1193 lines
23 KiB
JSON
1193 lines
23 KiB
JSON
{
|
|
"name": "cmake",
|
|
"rules": {
|
|
"source_file": {
|
|
"type": "REPEAT",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "_untrimmed_command_invocation"
|
|
}
|
|
},
|
|
"escape_sequence": {
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_escape_identity"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_escape_encoded"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_escape_semicolon"
|
|
}
|
|
]
|
|
},
|
|
"_escape_identity": {
|
|
"type": "PATTERN",
|
|
"value": "\\\\[^A-Za-z0-9;]"
|
|
},
|
|
"_escape_encoded": {
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "\\t"
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "\\r"
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "\\n"
|
|
}
|
|
]
|
|
},
|
|
"_escape_semicolon": {
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": ";"
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "\\;"
|
|
}
|
|
]
|
|
},
|
|
"variable": {
|
|
"type": "PREC_LEFT",
|
|
"value": 0,
|
|
"content": {
|
|
"type": "REPEAT1",
|
|
"content": {
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "PATTERN",
|
|
"value": "[a-zA-Z0-9/_.+-]"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "escape_sequence"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "variable_ref"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"variable_ref": {
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "normal_var"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "env_var"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "cache_var"
|
|
}
|
|
]
|
|
},
|
|
"normal_var": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "$"
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "{"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "variable"
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "}"
|
|
}
|
|
]
|
|
},
|
|
"env_var": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "$"
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "ENV"
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "{"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "variable"
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "}"
|
|
}
|
|
]
|
|
},
|
|
"cache_var": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "$"
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "CACHE"
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "{"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "variable"
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "}"
|
|
}
|
|
]
|
|
},
|
|
"gen_exp": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "$"
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "<"
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_gen_exp_content"
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": ">"
|
|
}
|
|
]
|
|
},
|
|
"_gen_exp_content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "argument"
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_gen_exp_arguments"
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"_gen_exp_arguments": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": ":"
|
|
},
|
|
{
|
|
"type": "REPEAT",
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "argument"
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "PATTERN",
|
|
"value": "[,;]"
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"argument": {
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "bracket_argument"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "quoted_argument"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "unquoted_argument"
|
|
}
|
|
]
|
|
},
|
|
"_untrimmed_argument": {
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "PATTERN",
|
|
"value": "\\s"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "bracket_comment"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "line_comment"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "argument"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_paren_argument"
|
|
}
|
|
]
|
|
},
|
|
"_paren_argument": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "("
|
|
},
|
|
{
|
|
"type": "REPEAT",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "_untrimmed_argument"
|
|
}
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": ")"
|
|
}
|
|
]
|
|
},
|
|
"quoted_argument": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "\""
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "quoted_element"
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "\""
|
|
}
|
|
]
|
|
},
|
|
"quoted_element": {
|
|
"type": "REPEAT1",
|
|
"content": {
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "variable_ref"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "gen_exp"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_quoted_text"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "escape_sequence"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"_quoted_text": {
|
|
"type": "PREC_LEFT",
|
|
"value": 0,
|
|
"content": {
|
|
"type": "REPEAT1",
|
|
"content": {
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "$"
|
|
},
|
|
{
|
|
"type": "PATTERN",
|
|
"value": "[^\\\\\"]"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"unquoted_argument": {
|
|
"type": "PREC_RIGHT",
|
|
"value": 0,
|
|
"content": {
|
|
"type": "REPEAT1",
|
|
"content": {
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "variable_ref"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "gen_exp"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_unquoted_text"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "escape_sequence"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"_unquoted_text": {
|
|
"type": "PREC_LEFT",
|
|
"value": 0,
|
|
"content": {
|
|
"type": "REPEAT1",
|
|
"content": {
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "$"
|
|
},
|
|
{
|
|
"type": "PATTERN",
|
|
"value": "[^()#\"\\\\']"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"body": {
|
|
"type": "PREC_RIGHT",
|
|
"value": 0,
|
|
"content": {
|
|
"type": "REPEAT1",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "_untrimmed_command_invocation"
|
|
}
|
|
}
|
|
},
|
|
"if_command": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "if"
|
|
},
|
|
{
|
|
"type": "REPEAT",
|
|
"content": {
|
|
"type": "PATTERN",
|
|
"value": "[\\t ]"
|
|
}
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "("
|
|
},
|
|
{
|
|
"type": "REPEAT",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "_untrimmed_argument"
|
|
}
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": ")"
|
|
}
|
|
]
|
|
},
|
|
"elseif_command": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "elseif"
|
|
},
|
|
{
|
|
"type": "REPEAT",
|
|
"content": {
|
|
"type": "PATTERN",
|
|
"value": "[\\t ]"
|
|
}
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "("
|
|
},
|
|
{
|
|
"type": "REPEAT",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "_untrimmed_argument"
|
|
}
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": ")"
|
|
}
|
|
]
|
|
},
|
|
"else_command": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "else"
|
|
},
|
|
{
|
|
"type": "REPEAT",
|
|
"content": {
|
|
"type": "PATTERN",
|
|
"value": "[\\t ]"
|
|
}
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "("
|
|
},
|
|
{
|
|
"type": "REPEAT",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "_untrimmed_argument"
|
|
}
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": ")"
|
|
}
|
|
]
|
|
},
|
|
"endif_command": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "endif"
|
|
},
|
|
{
|
|
"type": "REPEAT",
|
|
"content": {
|
|
"type": "PATTERN",
|
|
"value": "[\\t ]"
|
|
}
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "("
|
|
},
|
|
{
|
|
"type": "REPEAT",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "_untrimmed_argument"
|
|
}
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": ")"
|
|
}
|
|
]
|
|
},
|
|
"if_condition": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "if_command"
|
|
},
|
|
{
|
|
"type": "REPEAT",
|
|
"content": {
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "body"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "elseif_command"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "else_command"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "endif_command"
|
|
}
|
|
]
|
|
},
|
|
"foreach_command": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "foreach"
|
|
},
|
|
{
|
|
"type": "REPEAT",
|
|
"content": {
|
|
"type": "PATTERN",
|
|
"value": "[\\t ]"
|
|
}
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "("
|
|
},
|
|
{
|
|
"type": "REPEAT",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "_untrimmed_argument"
|
|
}
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": ")"
|
|
}
|
|
]
|
|
},
|
|
"endforeach_command": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "endforeach"
|
|
},
|
|
{
|
|
"type": "REPEAT",
|
|
"content": {
|
|
"type": "PATTERN",
|
|
"value": "[\\t ]"
|
|
}
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "("
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "argument"
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": ")"
|
|
}
|
|
]
|
|
},
|
|
"foreach_loop": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "foreach_command"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "body"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "endforeach_command"
|
|
}
|
|
]
|
|
},
|
|
"while_command": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "while"
|
|
},
|
|
{
|
|
"type": "REPEAT",
|
|
"content": {
|
|
"type": "PATTERN",
|
|
"value": "[\\t ]"
|
|
}
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "("
|
|
},
|
|
{
|
|
"type": "REPEAT",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "_untrimmed_argument"
|
|
}
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": ")"
|
|
}
|
|
]
|
|
},
|
|
"endwhile_command": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "endwhile"
|
|
},
|
|
{
|
|
"type": "REPEAT",
|
|
"content": {
|
|
"type": "PATTERN",
|
|
"value": "[\\t ]"
|
|
}
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "("
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "PATTERN",
|
|
"value": "\\s*"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "argument"
|
|
},
|
|
{
|
|
"type": "PATTERN",
|
|
"value": "\\s*"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": ")"
|
|
}
|
|
]
|
|
},
|
|
"while_loop": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "while_command"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "body"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "endwhile_command"
|
|
}
|
|
]
|
|
},
|
|
"function_command": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "function"
|
|
},
|
|
{
|
|
"type": "REPEAT",
|
|
"content": {
|
|
"type": "PATTERN",
|
|
"value": "[\\t ]"
|
|
}
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "("
|
|
},
|
|
{
|
|
"type": "REPEAT",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "_untrimmed_argument"
|
|
}
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": ")"
|
|
}
|
|
]
|
|
},
|
|
"endfunction_command": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "endfunction"
|
|
},
|
|
{
|
|
"type": "REPEAT",
|
|
"content": {
|
|
"type": "PATTERN",
|
|
"value": "[\\t ]"
|
|
}
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "("
|
|
},
|
|
{
|
|
"type": "REPEAT",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "_untrimmed_argument"
|
|
}
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": ")"
|
|
}
|
|
]
|
|
},
|
|
"function_def": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "function_command"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "body"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "endfunction_command"
|
|
}
|
|
]
|
|
},
|
|
"macro_command": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "macro"
|
|
},
|
|
{
|
|
"type": "REPEAT",
|
|
"content": {
|
|
"type": "PATTERN",
|
|
"value": "[\\t ]"
|
|
}
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "("
|
|
},
|
|
{
|
|
"type": "REPEAT",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "_untrimmed_argument"
|
|
}
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": ")"
|
|
}
|
|
]
|
|
},
|
|
"endmacro_command": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "endmacro"
|
|
},
|
|
{
|
|
"type": "REPEAT",
|
|
"content": {
|
|
"type": "PATTERN",
|
|
"value": "[\\t ]"
|
|
}
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "("
|
|
},
|
|
{
|
|
"type": "REPEAT",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "_untrimmed_argument"
|
|
}
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": ")"
|
|
}
|
|
]
|
|
},
|
|
"macro_def": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "macro_command"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "body"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "endmacro_command"
|
|
}
|
|
]
|
|
},
|
|
"block_command": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "block"
|
|
},
|
|
{
|
|
"type": "REPEAT",
|
|
"content": {
|
|
"type": "PATTERN",
|
|
"value": "[\\t ]"
|
|
}
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "("
|
|
},
|
|
{
|
|
"type": "REPEAT",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "_untrimmed_argument"
|
|
}
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": ")"
|
|
}
|
|
]
|
|
},
|
|
"endblock_command": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "endblock"
|
|
},
|
|
{
|
|
"type": "REPEAT",
|
|
"content": {
|
|
"type": "PATTERN",
|
|
"value": "[\\t ]"
|
|
}
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "("
|
|
},
|
|
{
|
|
"type": "REPEAT",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "_untrimmed_argument"
|
|
}
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": ")"
|
|
}
|
|
]
|
|
},
|
|
"block_def": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "block_command"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "body"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "endblock_command"
|
|
}
|
|
]
|
|
},
|
|
"normal_command": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "identifier"
|
|
},
|
|
{
|
|
"type": "REPEAT",
|
|
"content": {
|
|
"type": "PATTERN",
|
|
"value": "[\\t ]"
|
|
}
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "("
|
|
},
|
|
{
|
|
"type": "REPEAT",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "_untrimmed_argument"
|
|
}
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": ")"
|
|
}
|
|
]
|
|
},
|
|
"_command_invocation": {
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "normal_command"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "if_condition"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "foreach_loop"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "while_loop"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "function_def"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "macro_def"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "block_def"
|
|
}
|
|
]
|
|
},
|
|
"_untrimmed_command_invocation": {
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "PATTERN",
|
|
"value": "\\s"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "bracket_comment"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "line_comment"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_command_invocation"
|
|
}
|
|
]
|
|
},
|
|
"if": {
|
|
"type": "PATTERN",
|
|
"value": "[iI][fF]"
|
|
},
|
|
"elseif": {
|
|
"type": "PATTERN",
|
|
"value": "[eE][lL][sS][eE][iI][fF]"
|
|
},
|
|
"else": {
|
|
"type": "PATTERN",
|
|
"value": "[eE][lL][sS][eE]"
|
|
},
|
|
"endif": {
|
|
"type": "PATTERN",
|
|
"value": "[eE][nN][dD][iI][fF]"
|
|
},
|
|
"foreach": {
|
|
"type": "PATTERN",
|
|
"value": "[fF][oO][rR][eE][aA][cC][hH]"
|
|
},
|
|
"endforeach": {
|
|
"type": "PATTERN",
|
|
"value": "[eE][nN][dD][fF][oO][rR][eE][aA][cC][hH]"
|
|
},
|
|
"while": {
|
|
"type": "PATTERN",
|
|
"value": "[wW][hH][iI][lL][eE]"
|
|
},
|
|
"endwhile": {
|
|
"type": "PATTERN",
|
|
"value": "[eE][nN][dD][wW][hH][iI][lL][eE]"
|
|
},
|
|
"function": {
|
|
"type": "PATTERN",
|
|
"value": "[fF][uU][nN][cC][tT][iI][oO][nN]"
|
|
},
|
|
"endfunction": {
|
|
"type": "PATTERN",
|
|
"value": "[eE][nN][dD][fF][uU][nN][cC][tT][iI][oO][nN]"
|
|
},
|
|
"macro": {
|
|
"type": "PATTERN",
|
|
"value": "[mM][aA][cC][rR][oO]"
|
|
},
|
|
"endmacro": {
|
|
"type": "PATTERN",
|
|
"value": "[eE][nN][dD][mM][aA][cC][rR][oO]"
|
|
},
|
|
"block": {
|
|
"type": "PATTERN",
|
|
"value": "[bB][lL][oO][cC][kK]"
|
|
},
|
|
"endblock": {
|
|
"type": "PATTERN",
|
|
"value": "[eE][nN][dD][bB][lL][oO][cC][kK]"
|
|
},
|
|
"identifier": {
|
|
"type": "PATTERN",
|
|
"value": "[A-Za-z_][A-Za-z0-9_]*"
|
|
},
|
|
"integer": {
|
|
"type": "PATTERN",
|
|
"value": "[+-]*\\d+"
|
|
}
|
|
},
|
|
"extras": [],
|
|
"conflicts": [],
|
|
"precedences": [],
|
|
"externals": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "bracket_argument"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "bracket_comment"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "line_comment"
|
|
}
|
|
],
|
|
"inline": [],
|
|
"supertypes": []
|
|
}
|
|
|