{ "_copyright": "The MIT License (MIT)\nCopyright (c) 2015-2022 spgennard\nSource: https://github.com/spgennard/vscode_cobol/blob/main/syntaxes/COBOL.tmLanguage.json", "$schema": "https://raw.githubusercontent.com/spgennard/vscode_cobol/main/schemas/tmlanguage.json", "fileTypes": [ "ccp", "scbl", "cobol", "cbl", "cblle", "cblsrce", "cblcpy", "lks", "pdv", "cpy", "copybook", "cobcopy", "fd", "sel", "scb", "scbl", "sqlcblle", "cob", "dds", "def", "src", "ss", "wks", "bib", "pco" ], "name": "cobol", "patterns": [ { "match": "(^[ \\*][ \\*][ \\*][ \\*][ \\*][ \\*])([dD]\\s.*$)", "name": "token.info-token.cobol" }, { "match": "(^[ \\*][ \\*][ \\*][ \\*][ \\*][ \\*])(\\/.*$)", "captures": { "1": { "name": "constant.numeric.cobol" }, "2": { "name": "comment.line.cobol.newpage" } } }, { "match": "(^[ \\*][ \\*][ \\*][ \\*][ \\*][ \\*])(\\*.*$)", "captures": { "1": { "name": "constant.numeric.cobol" }, "2": { "name": "comment.line.cobol.fixed" } } }, { "match": "(^[0-9\\s][0-9\\s][0-9\\s][0-9\\s][0-9\\s][0-9\\s])(\\/.*$)", "captures": { "1": { "name": "constant.numeric.cobol" }, "2": { "name": "comment.line.cobol.newpage" } } }, { "match": "^[0-9\\s][0-9\\s][0-9\\s][0-9\\s][0-9\\s][0-9\\s]$", "name": "constant.numeric.cobol" }, { "match": "(^[0-9\\s][0-9\\s][0-9\\s][0-9\\s][0-9\\s][0-9\\s])(\\*.*$)", "captures": { "1": { "name": "constant.numeric.cobol" }, "2": { "name": "comment.line.cobol.fixed" } } }, { "match": "(^[0-9a-zA-Z\\s\\$#%\\.@\\- ][0-9a-zA-Z\\s\\$#%\\.@\\- ][0-9a-zA-Z\\s\\$#%\\.@\\- ][0-9a-zA-Z\\s\\$#%\\.@\\- ][0-9a-zA-Z\\s\\$#%\\.@\\- ][0-9a-zA-Z\\s\\$#%\\.@\\- ])(\\*.*$)", "captures": { "1": { "name": "constant.cobol" }, "2": { "name": "comment.line.cobol.fixed" } } }, { "match": "^\\s+(78)\\s+([0-9a-zA-Z][a-zA-Z\\-0-9_]+)", "captures": { "1": { "name": "constant.numeric.cobol" }, "2": { "name": "variable.other.constant" } } }, { "match": "^\\s+([0-9]+)\\s+([0-9a-zA-Z][a-zA-Z\\-0-9_]+)\\s+((?i:constant))", "captures": { "1": { "name": "constant.numeric.cobol" }, "2": { "name": "variable.other.constant" }, "3": { "name": "keyword.identifers.cobol" } } }, { "match": "(^[0-9a-zA-Z\\s\\$#%\\.@][0-9a-zA-Z\\s\\$#%\\.@][0-9a-zA-Z\\s\\$#%\\.@][0-9a-zA-Z\\s\\$#%\\.@][0-9a-zA-Z\\s\\$#%\\.@][0-9a-zA-Z\\s\\$#%\\.@])(\\/.*$)", "captures": { "1": { "name": "constant.cobol" }, "2": { "name": "comment.line.cobol.newpage" } } }, { "match": "^\\*.*$", "name": "comment.line.cobol.fixed" }, { "match": "((?:^|\\s+)(?i:\\$set)\\s+)((?i:constant)\\s+)([0-9a-zA-Z][a-zA-Z\\-0-9]+\\s*)([a-zA-Z\\-0-9]*)", "captures": { "1": { "name": "keyword.control.directive.conditional.cobol" }, "2": { "name": "entity.name.function.preprocessor.cobol" }, "3": { "name": "entity.name.function.cobol" }, "4": { "name": "keyword.control.directive.conditional.cobol" } } }, { "match": "((?i:\\$\\s*set\\s+)(ilusing)(\\()(.*)(\\)))", "captures": { "1": { "name": "entity.name.function.preprocessor.cobol" }, "2": { "name": "storage.modifier.import.cobol" }, "3": { "name": "punctuation.begin.bracket.round.cobol" }, "4": { "name": "string.quoted.other.cobol" }, "5": { "name": "punctuation.end.bracket.round.cobol" } } }, { "match": "((?i:\\$\\s*set\\s+)(ilusing)(\")(.*)(\"))", "captures": { "1": { "name": "entity.name.function.preprocessor.cobol" }, "2": { "name": "storage.modifier.import.cobol" }, "3": { "name": "punctuation.definition.string.begin.cobol" }, "4": { "name": "string.quoted.other.cobol" }, "5": { "name": "punctuation.definition.string.begin.cobol" } } }, { "match": "((?i:\\$set))\\s+(\\w+)\\s*(\")(\\w*)(\")", "captures": { "1": { "name": "keyword.control.directive.conditional.cobol" }, "2": { "name": "entity.name.function.preprocessor.cobol" }, "3": { "name": "punctuation.definition.string.begin.cobol" }, "4": { "name": "string.quoted.other.cobol" }, "5": { "name": "punctuation.definition.string.begin.cobol" } } }, { "match": "((?i:\\$set))\\s+(\\w+)\\s*(\\()(.*)(\\))", "captures": { "1": { "name": "keyword.control.directive.conditional.cobol" }, "2": { "name": "entity.name.function.preprocessor.cobol" }, "3": { "name": "punctuation.begin.bracket.round.cobol" }, "4": { "name": "string.quoted.other.cobol" }, "5": { "name": "punctuation.end.bracket.round.cobol" } } }, { "match": "(?:^|\\s+)(?i:\\$\\s*set\\s)((?i:01SHUFFLE|64KPARA|64KSECT|AUXOPT|CHIP|DATALIT|EANIM|EXPANDDATA|FIXING|FLAG-CHIP|MASM|MODEL|OPTSIZE|OPTSPEED|PARAS|PROTMODE|REGPARM|SEGCROSS|SEGSIZE|SIGNCOMPARE|SMALLDD|TABLESEGCROSS|TRICKLECHECK|\\s)+).*$", "captures": { "0": { "name": "keyword.control.directive.conditional.cobol" }, "1": { "name": "invalid.illegal.directive" }, "2": { "name": "comment.line.set.cobol" } } }, { "match": "(\\$region|\\$end-region)(.*$)", "captures": { "1": { "name": "keyword.control.directive.cobol" }, "2": { "name": "entity.other.attribute-name.preprocessor.cobol" } } }, { "begin": "\\$(?i:doc)(.*$)", "end": "\\$(?i:end-doc)(.*$)", "name": "invalid.illegal.iscobol" }, { "match": ">>\\s*(?i:turn|page|listing|leap-seconds|d)\\s+.*$", "name": "invalid.illegal.meta.preprocessor.cobolit" }, { "match": "((((>>|\\$)[\\s]*)(?i:if|else|elif|end-if|end-evaluate|end|define|evaluate|when|display|call-convention|set))(.*$))", "captures": { "1": { "name": "keyword.control.directive.conditional.cobol" }, "2": { "name": "entity.name.function.preprocessor.cobol" }, "3": { "name": "entity.name.function.preprocessor.cobol" } } }, { "match": "(\\*>)\\s+(@[0-9a-zA-Z][a-zA-Z\\-0-9]+)\\s+(.*$)", "captures": { "1": { "name": "comment.line.scantoken.cobol" }, "2": { "name": "keyword.cobol" }, "3": { "name": "string.cobol" } } }, { "match": "(\\*>.*$)", "name": "comment.line.modern" }, { "match": "(>>.*)$", "name": "strong comment.line.set.acucobol" }, { "match": "([nNuU][xX]|[hHxX])'\\h*'", "name": "constant.numeric.integer.hexadecimal.cobol" }, { "match": "([nNuU][xX]|[hHxX])'.*'", "name": "invalid.illegal.hexadecimal.cobol" }, { "match": "([nNuU][xX]|[hHxX])\"\\h*\"", "name": "constant.numeric.integer.hexadecimal.cobol" }, { "match": "([nNuU][xX]|[hHxX])\".*\"", "name": "invalid.illegal.hexadecimal.cobol" }, { "match": "[bB]\"[0-1]\"", "name": "constant.numeric.integer.boolean.cobol" }, { "match": "[bB]'[0-1]'", "name": "constant.numeric.integer.boolean.cobol" }, { "match": "[oO]\"[0-7]*\"", "name": "constant.numeric.integer.octal.cobol" }, { "match": "[oO]\".*\"", "name": "invalid.illegal.octal.cobol" }, { "match": "(#)([0-9a-zA-Z][a-zA-Z\\-0-9]+)", "name": "meta.symbol.cobol.forced" }, { "begin": "((?|<=|>=|<>|\\+|\\-|\\*|\\/|(?