{
"$schema": "https://tree-sitter.github.io/tree-sitter/assets/schemas/grammar.schema.json",
"name": "glsl",
"word": "identifier",
"rules": {
"translation_unit": {
"type": "REPEAT",
"content": {
"type": "SYMBOL",
"name": "_top_level_item"
}
},
"_external_declaration": {
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "function_definition"
},
{
"type": "SYMBOL",
"name": "declaration"
},
{
"type": "STRING",
"value": ";"
}
]
},
"function_definition": {
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "function_declarator"
},
{
"type": "SYMBOL",
"name": "compound_statement"
}
]
},
"_primary_expression": {
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "identifier"
},
{
"type": "SYMBOL",
"name": "number_literal"
},
{
"type": "SYMBOL",
"name": "bool_literal"
},
{
"type": "SYMBOL",
"name": "parenthesized_expression"
},
{
"type": "PREC_DYNAMIC",
"value": -1,
"content": {
"type": "SYMBOL",
"name": "macro_invocation"
}
}
]
},
"bool_literal": {
"type": "CHOICE",
"members": [
{
"type": "STRING",
"value": "true"
},
{
"type": "STRING",
"value": "false"
}
]
},
"parenthesized_expression": {
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": "("
},
{
"type": "SYMBOL",
"name": "_expression"
},
{
"type": "STRING",
"value": ")"
}
]
},
"_postfix_expression": {
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "_primary_expression"
},
{
"type": "SYMBOL",
"name": "subscript_expression"
},
{
"type": "SYMBOL",
"name": "function_call"
},
{
"type": "SYMBOL",
"name": "field_expression"
},
{
"type": "ALIAS",
"content": {
"type": "SYMBOL",
"name": "_postfix_update"
},
"named": true,
"value": "update_expression"
}
]
},
"_postfix_update": {
"type": "PREC_LEFT",
"value": 16,
"content": {
"type": "SEQ",
"members": [
{
"type": "FIELD",
"name": "argument",
"content": {
"type": "SYMBOL",
"name": "_postfix_expression"
}
},
{
"type": "FIELD",
"name": "operator",
"content": {
"type": "CHOICE",
"members": [
{
"type": "STRING",
"value": "++"
},
{
"type": "STRING",
"value": "--"
}
]
}
}
]
}
},
"subscript_expression": {
"type": "PREC",
"value": 16,
"content": {
"type": "SEQ",
"members": [
{
"type": "FIELD",
"name": "argument",
"content": {
"type": "SYMBOL",
"name": "_postfix_expression"
}
},
{
"type": "STRING",
"value": "["
},
{
"type": "FIELD",
"name": "index",
"content": {
"type": "SYMBOL",
"name": "_expression"
}
},
{
"type": "STRING",
"value": "]"
}
]
}
},
"field_expression": {
"type": "PREC",
"value": 16,
"content": {
"type": "SEQ",
"members": [
{
"type": "FIELD",
"name": "argument",
"content": {
"type": "SYMBOL",
"name": "_postfix_expression"
}
},
{
"type": "STRING",
"value": "."
},
{
"type": "FIELD",
"name": "field",
"content": {
"type": "ALIAS",
"content": {
"type": "SYMBOL",
"name": "identifier"
},
"named": true,
"value": "field_identifier"
}
}
]
}
},
"function_call": {
"type": "PREC_DYNAMIC",
"value": 1,
"content": {
"type": "PREC",
"value": 16,
"content": {
"type": "SEQ",
"members": [
{
"type": "FIELD",
"name": "function",
"content": {
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "type_specifier"
},
{
"type": "SYMBOL",
"name": "_postfix_expression"
}
]
}
},
{
"type": "STRING",
"value": "("
},
{
"type": "CHOICE",
"members": [
{
"type": "FIELD",
"name": "arguments",
"content": {
"type": "SYMBOL",
"name": "argument_list"
}
},
{
"type": "BLANK"
}
]
},
{
"type": "STRING",
"value": ")"
}
]
}
}
},
"argument_list": {
"type": "CHOICE",
"members": [
{
"type": "STRING",
"value": "void"
},
{
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "_assignment_expression"
},
{
"type": "REPEAT",
"content": {
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": ","
},
{
"type": "SYMBOL",
"name": "_assignment_expression"
}
]
}
}
]
}
]
},
"_unary_expression": {
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "_postfix_expression"
},
{
"type": "ALIAS",
"content": {
"type": "SYMBOL",
"name": "_prefix_update"
},
"named": true,
"value": "update_expression"
},
{
"type": "SYMBOL",
"name": "unary_expression"
}
]
},
"_prefix_update": {
"type": "PREC_RIGHT",
"value": 15,
"content": {
"type": "SEQ",
"members": [
{
"type": "FIELD",
"name": "operator",
"content": {
"type": "CHOICE",
"members": [
{
"type": "STRING",
"value": "++"
},
{
"type": "STRING",
"value": "--"
}
]
}
},
{
"type": "FIELD",
"name": "argument",
"content": {
"type": "SYMBOL",
"name": "_unary_expression"
}
}
]
}
},
"unary_expression": {
"type": "PREC_RIGHT",
"value": 15,
"content": {
"type": "SEQ",
"members": [
{
"type": "FIELD",
"name": "operator",
"content": {
"type": "CHOICE",
"members": [
{
"type": "STRING",
"value": "+"
},
{
"type": "STRING",
"value": "-"
},
{
"type": "STRING",
"value": "!"
},
{
"type": "STRING",
"value": "~"
}
]
}
},
{
"type": "FIELD",
"name": "argument",
"content": {
"type": "SYMBOL",
"name": "_unary_expression"
}
}
]
}
},
"update_expression": {
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "_postfix_update"
},
{
"type": "SYMBOL",
"name": "_prefix_update"
}
]
},
"_multiplicative_expression": {
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "_unary_expression"
},
{
"type": "ALIAS",
"content": {
"type": "SYMBOL",
"name": "_multiplicative_operation"
},
"named": true,
"value": "binary_expression"
}
]
},
"_multiplicative_operation": {
"type": "PREC_LEFT",
"value": 14,
"content": {
"type": "SEQ",
"members": [
{
"type": "FIELD",
"name": "left",
"content": {
"type": "SYMBOL",
"name": "_multiplicative_expression"
}
},
{
"type": "FIELD",
"name": "operator",
"content": {
"type": "CHOICE",
"members": [
{
"type": "STRING",
"value": "*"
},
{
"type": "STRING",
"value": "/"
},
{
"type": "STRING",
"value": "%"
}
]
}
},
{
"type": "FIELD",
"name": "right",
"content": {
"type": "SYMBOL",
"name": "_unary_expression"
}
}
]
}
},
"_additive_expression": {
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "_multiplicative_expression"
},
{
"type": "ALIAS",
"content": {
"type": "SYMBOL",
"name": "_additive_operation"
},
"named": true,
"value": "binary_expression"
}
]
},
"_additive_operation": {
"type": "PREC_LEFT",
"value": 13,
"content": {
"type": "SEQ",
"members": [
{
"type": "FIELD",
"name": "left",
"content": {
"type": "SYMBOL",
"name": "_additive_expression"
}
},
{
"type": "FIELD",
"name": "operator",
"content": {
"type": "CHOICE",
"members": [
{
"type": "STRING",
"value": "+"
},
{
"type": "STRING",
"value": "-"
}
]
}
},
{
"type": "FIELD",
"name": "right",
"content": {
"type": "SYMBOL",
"name": "_multiplicative_expression"
}
}
]
}
},
"_shift_expression": {
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "_additive_expression"
},
{
"type": "ALIAS",
"content": {
"type": "SYMBOL",
"name": "_shift_operation"
},
"named": true,
"value": "binary_expression"
}
]
},
"_shift_operation": {
"type": "PREC_LEFT",
"value": 12,
"content": {
"type": "SEQ",
"members": [
{
"type": "FIELD",
"name": "left",
"content": {
"type": "SYMBOL",
"name": "_shift_expression"
}
},
{
"type": "FIELD",
"name": "operator",
"content": {
"type": "CHOICE",
"members": [
{
"type": "STRING",
"value": "<<"
},
{
"type": "STRING",
"value": ">>"
}
]
}
},
{
"type": "FIELD",
"name": "right",
"content": {
"type": "SYMBOL",
"name": "_additive_expression"
}
}
]
}
},
"_relational_expression": {
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "_shift_expression"
},
{
"type": "ALIAS",
"content": {
"type": "SYMBOL",
"name": "_relational_operation"
},
"named": true,
"value": "binary_expression"
}
]
},
"_relational_operation": {
"type": "PREC_LEFT",
"value": 11,
"content": {
"type": "SEQ",
"members": [
{
"type": "FIELD",
"name": "left",
"content": {
"type": "SYMBOL",
"name": "_relational_expression"
}
},
{
"type": "FIELD",
"name": "operator",
"content": {
"type": "CHOICE",
"members": [
{
"type": "STRING",
"value": "<"
},
{
"type": "STRING",
"value": ">"
},
{
"type": "STRING",
"value": "<="
},
{
"type": "STRING",
"value": ">="
}
]
}
},
{
"type": "FIELD",
"name": "right",
"content": {
"type": "SYMBOL",
"name": "_shift_expression"
}
}
]
}
},
"_equality_expression": {
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "_relational_expression"
},
{
"type": "ALIAS",
"content": {
"type": "SYMBOL",
"name": "_equality_operation"
},
"named": true,
"value": "binary_expression"
}
]
},
"_equality_operation": {
"type": "PREC_LEFT",
"value": 10,
"content": {
"type": "SEQ",
"members": [
{
"type": "FIELD",
"name": "left",
"content": {
"type": "SYMBOL",
"name": "_equality_expression"
}
},
{
"type": "FIELD",
"name": "operator",
"content": {
"type": "CHOICE",
"members": [
{
"type": "STRING",
"value": "=="
},
{
"type": "STRING",
"value": "!="
}
]
}
},
{
"type": "FIELD",
"name": "right",
"content": {
"type": "SYMBOL",
"name": "_relational_expression"
}
}
]
}
},
"_and_expression": {
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "_equality_expression"
},
{
"type": "ALIAS",
"content": {
"type": "SYMBOL",
"name": "_and_operation"
},
"named": true,
"value": "binary_expression"
}
]
},
"_and_operation": {
"type": "PREC_LEFT",
"value": 9,
"content": {
"type": "SEQ",
"members": [
{
"type": "FIELD",
"name": "left",
"content": {
"type": "SYMBOL",
"name": "_and_expression"
}
},
{
"type": "FIELD",
"name": "operator",
"content": {
"type": "STRING",
"value": "&"
}
},
{
"type": "FIELD",
"name": "right",
"content": {
"type": "SYMBOL",
"name": "_equality_expression"
}
}
]
}
},
"_exclusive_or_expression": {
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "_and_expression"
},
{
"type": "ALIAS",
"content": {
"type": "SYMBOL",
"name": "_exclusive_or_operation"
},
"named": true,
"value": "binary_expression"
}
]
},
"_exclusive_or_operation": {
"type": "PREC_LEFT",
"value": 8,
"content": {
"type": "SEQ",
"members": [
{
"type": "FIELD",
"name": "left",
"content": {
"type": "SYMBOL",
"name": "_exclusive_or_expression"
}
},
{
"type": "FIELD",
"name": "operator",
"content": {
"type": "STRING",
"value": "^"
}
},
{
"type": "FIELD",
"name": "right",
"content": {
"type": "SYMBOL",
"name": "_and_expression"
}
}
]
}
},
"_inclusive_or_expression": {
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "_exclusive_or_expression"
},
{
"type": "ALIAS",
"content": {
"type": "SYMBOL",
"name": "_inclusive_or_operation"
},
"named": true,
"value": "binary_expression"
}
]
},
"_inclusive_or_operation": {
"type": "PREC_LEFT",
"value": 7,
"content": {
"type": "SEQ",
"members": [
{
"type": "FIELD",
"name": "left",
"content": {
"type": "SYMBOL",
"name": "_inclusive_or_expression"
}
},
{
"type": "FIELD",
"name": "operator",
"content": {
"type": "STRING",
"value": "|"
}
},
{
"type": "FIELD",
"name": "right",
"content": {
"type": "SYMBOL",
"name": "_exclusive_or_expression"
}
}
]
}
},
"_logical_and_expression": {
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "_inclusive_or_expression"
},
{
"type": "ALIAS",
"content": {
"type": "SYMBOL",
"name": "_logical_and_operation"
},
"named": true,
"value": "binary_expression"
}
]
},
"_logical_and_operation": {
"type": "PREC_LEFT",
"value": 6,
"content": {
"type": "SEQ",
"members": [
{
"type": "FIELD",
"name": "left",
"content": {
"type": "SYMBOL",
"name": "_logical_and_expression"
}
},
{
"type": "FIELD",
"name": "operator",
"content": {
"type": "STRING",
"value": "&&"
}
},
{
"type": "FIELD",
"name": "right",
"content": {
"type": "SYMBOL",
"name": "_inclusive_or_expression"
}
}
]
}
},
"_logical_xor_expression": {
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "_logical_and_expression"
},
{
"type": "ALIAS",
"content": {
"type": "SYMBOL",
"name": "_logical_xor_operation"
},
"named": true,
"value": "binary_expression"
}
]
},
"_logical_xor_operation": {
"type": "PREC_LEFT",
"value": 5,
"content": {
"type": "SEQ",
"members": [
{
"type": "FIELD",
"name": "left",
"content": {
"type": "SYMBOL",
"name": "_logical_xor_expression"
}
},
{
"type": "FIELD",
"name": "operator",
"content": {
"type": "STRING",
"value": "^^"
}
},
{
"type": "FIELD",
"name": "right",
"content": {
"type": "SYMBOL",
"name": "_logical_and_expression"
}
}
]
}
},
"_logical_or_expression": {
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "_logical_xor_expression"
},
{
"type": "ALIAS",
"content": {
"type": "SYMBOL",
"name": "_logical_or_operation"
},
"named": true,
"value": "binary_expression"
}
]
},
"_logical_or_operation": {
"type": "PREC_LEFT",
"value": 4,
"content": {
"type": "SEQ",
"members": [
{
"type": "FIELD",
"name": "left",
"content": {
"type": "SYMBOL",
"name": "_logical_or_expression"
}
},
{
"type": "FIELD",
"name": "operator",
"content": {
"type": "STRING",
"value": "||"
}
},
{
"type": "FIELD",
"name": "right",
"content": {
"type": "SYMBOL",
"name": "_logical_xor_expression"
}
}
]
}
},
"binary_expression": {
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "_multiplicative_operation"
},
{
"type": "SYMBOL",
"name": "_additive_operation"
},
{
"type": "SYMBOL",
"name": "_shift_operation"
},
{
"type": "SYMBOL",
"name": "_relational_operation"
},
{
"type": "SYMBOL",
"name": "_equality_operation"
},
{
"type": "SYMBOL",
"name": "_and_operation"
},
{
"type": "SYMBOL",
"name": "_exclusive_or_operation"
},
{
"type": "SYMBOL",
"name": "_inclusive_or_operation"
},
{
"type": "SYMBOL",
"name": "_logical_and_operation"
},
{
"type": "SYMBOL",
"name": "_logical_xor_operation"
},
{
"type": "SYMBOL",
"name": "_logical_or_operation"
}
]
},
"_conditional_expression": {
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "_logical_or_expression"
},
{
"type": "SYMBOL",
"name": "conditional_expression"
}
]
},
"conditional_expression": {
"type": "PREC_RIGHT",
"value": 3,
"content": {
"type": "SEQ",
"members": [
{
"type": "FIELD",
"name": "condition",
"content": {
"type": "SYMBOL",
"name": "_logical_or_expression"
}
},
{
"type": "STRING",
"value": "?"
},
{
"type": "FIELD",
"name": "consequence",
"content": {
"type": "SYMBOL",
"name": "_expression"
}
},
{
"type": "STRING",
"value": ":"
},
{
"type": "FIELD",
"name": "alternative",
"content": {
"type": "SYMBOL",
"name": "_assignment_expression"
}
}
]
}
},
"_assignment_expression": {
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "_conditional_expression"
},
{
"type": "SYMBOL",
"name": "assignment_expression"
}
]
},
"assignment_expression": {
"type": "PREC_RIGHT",
"value": 2,
"content": {
"type": "SEQ",
"members": [
{
"type": "FIELD",
"name": "left",
"content": {
"type": "SYMBOL",
"name": "_unary_expression"
}
},
{
"type": "FIELD",
"name": "operator",
"content": {
"type": "SYMBOL",
"name": "assignment_operator"
}
},
{
"type": "FIELD",
"name": "right",
"content": {
"type": "SYMBOL",
"name": "_assignment_expression"
}
}
]
}
},
"assignment_operator": {
"type": "CHOICE",
"members": [
{
"type": "STRING",
"value": "="
},
{
"type": "STRING",
"value": "*="
},
{
"type": "STRING",
"value": "/="
},
{
"type": "STRING",
"value": "%="
},
{
"type": "STRING",
"value": "+="
},
{
"type": "STRING",
"value": "-="
},
{
"type": "STRING",
"value": "<<="
},
{
"type": "STRING",
"value": ">>="
},
{
"type": "STRING",
"value": "&="
},
{
"type": "STRING",
"value": "^="
},
{
"type": "STRING",
"value": "|="
}
]
},
"_expression": {
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "_assignment_expression"
},
{
"type": "SYMBOL",
"name": "comma_expression"
}
]
},
"comma_expression": {
"type": "PREC_LEFT",
"value": 1,
"content": {
"type": "SEQ",
"members": [
{
"type": "FIELD",
"name": "left",
"content": {
"type": "SYMBOL",
"name": "_expression"
}
},
{
"type": "STRING",
"value": ","
},
{
"type": "FIELD",
"name": "right",
"content": {
"type": "SYMBOL",
"name": "_assignment_expression"
}
}
]
}
},
"_constant_expression": {
"type": "SYMBOL",
"name": "_conditional_expression"
},
"type": {
"type": "CHOICE",
"members": [
{
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "type_qualifier"
},
{
"type": "SYMBOL",
"name": "type_specifier"
}
]
},
{
"type": "SYMBOL",
"name": "type_specifier"
}
]
},
"type_qualifier": {
"type": "REPEAT1",
"content": {
"type": "SYMBOL",
"name": "single_type_qualifier"
}
},
"single_type_qualifier": {
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "storage_qualifier"
},
{
"type": "SYMBOL",
"name": "layout_qualifier"
},
{
"type": "SYMBOL",
"name": "precision_qualifier"
},
{
"type": "SYMBOL",
"name": "interpolation_qualifier"
},
{
"type": "SYMBOL",
"name": "invariant_qualifier"
},
{
"type": "SYMBOL",
"name": "precise_qualifier"
},
{
"type": "PREC_DYNAMIC",
"value": -1,
"content": {
"type": "SYMBOL",
"name": "macro_invocation"
}
}
]
},
"storage_qualifier": {
"type": "CHOICE",
"members": [
{
"type": "STRING",
"value": "attribute"
},
{
"type": "STRING",
"value": "buffer"
},
{
"type": "STRING",
"value": "centroid"
},
{
"type": "STRING",
"value": "coherent"
},
{
"type": "STRING",
"value": "const"
},
{
"type": "STRING",
"value": "in"
},
{
"type": "STRING",
"value": "inout"
},
{
"type": "STRING",
"value": "out"
},
{
"type": "STRING",
"value": "patch"
},
{
"type": "STRING",
"value": "readonly"
},
{
"type": "STRING",
"value": "restrict"
},
{
"type": "STRING",
"value": "sample"
},
{
"type": "STRING",
"value": "shared"
},
{
"type": "STRING",
"value": "uniform"
},
{
"type": "STRING",
"value": "varying"
},
{
"type": "STRING",
"value": "volatile"
},
{
"type": "STRING",
"value": "writeonly"
},
{
"type": "STRING",
"value": "subroutine"
},
{
"type": "STRING",
"value": "nonuniformEXT"
},
{
"type": "STRING",
"value": "subgroupuniformEXT"
},
{
"type": "STRING",
"value": "pervertexEXT"
},
{
"type": "STRING",
"value": "perprimitiveEXT"
},
{
"type": "STRING",
"value": "taskPayloadSharedEXT"
},
{
"type": "STRING",
"value": "nontemporal"
},
{
"type": "STRING",
"value": "callableDataEXT"
},
{
"type": "STRING",
"value": "callableDataInEXT"
},
{
"type": "STRING",
"value": "hitAttributeEXT"
},
{
"type": "STRING",
"value": "rayPayloadEXT"
},
{
"type": "STRING",
"value": "rayPayloadInEXT"
},
{
"type": "STRING",
"value": "shaderRecordEXT"
},
{
"type": "STRING",
"value": "shadercallcoherent"
},
{
"type": "STRING",
"value": "hitObjectAttributeEXT"
},
{
"type": "STRING",
"value": "tileImageEXT"
},
{
"type": "STRING",
"value": "pervertexNV"
},
{
"type": "STRING",
"value": "perprimitiveNV"
},
{
"type": "STRING",
"value": "perviewNV"
},
{
"type": "STRING",
"value": "taskNV"
},
{
"type": "STRING",
"value": "callableDataInNV"
},
{
"type": "STRING",
"value": "callableDataNV"
},
{
"type": "STRING",
"value": "hitAttributeNV"
},
{
"type": "STRING",
"value": "rayPayloadInNV"
},
{
"type": "STRING",
"value": "rayPayloadNV"
},
{
"type": "STRING",
"value": "shaderRecordNV"
},
{
"type": "STRING",
"value": "hitObjectAttributeNV"
},
{
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": "subroutine"
},
{
"type": "STRING",
"value": "("
},
{
"type": "SYMBOL",
"name": "type_name_list"
},
{
"type": "STRING",
"value": ")"
}
]
}
]
},
"type_name_list": {
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "identifier"
},
{
"type": "REPEAT",
"content": {
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": ","
},
{
"type": "SYMBOL",
"name": "identifier"
}
]
}
}
]
},
"layout_qualifier": {
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": "layout"
},
{
"type": "STRING",
"value": "("
},
{
"type": "SYMBOL",
"name": "_layout_arguments"
},
{
"type": "STRING",
"value": ")"
}
]
},
"_layout_arguments": {
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "layout_argument"
},
{
"type": "REPEAT",
"content": {
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": ","
},
{
"type": "SYMBOL",
"name": "layout_argument"
}
]
}
}
]
},
"layout_argument": {
"type": "CHOICE",
"members": [
{
"type": "SEQ",
"members": [
{
"type": "FIELD",
"name": "name",
"content": {
"type": "SYMBOL",
"name": "identifier"
}
},
{
"type": "STRING",
"value": "="
},
{
"type": "FIELD",
"name": "value",
"content": {
"type": "SYMBOL",
"name": "_constant_expression"
}
}
]
},
{
"type": "SYMBOL",
"name": "identifier"
},
{
"type": "STRING",
"value": "shared"
}
]
},
"precision_qualifier": {
"type": "CHOICE",
"members": [
{
"type": "STRING",
"value": "highp"
},
{
"type": "STRING",
"value": "lowp"
},
{
"type": "STRING",
"value": "mediump"
}
]
},
"interpolation_qualifier": {
"type": "CHOICE",
"members": [
{
"type": "STRING",
"value": "flat"
},
{
"type": "STRING",
"value": "noperspective"
},
{
"type": "STRING",
"value": "smooth"
}
]
},
"invariant_qualifier": {
"type": "STRING",
"value": "invariant"
},
"precise_qualifier": {
"type": "STRING",
"value": "precise"
},
"type_specifier": {
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "_type_specifier_nonarray"
},
{
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "array_specifier"
},
{
"type": "BLANK"
}
]
}
]
},
"array_specifier": {
"type": "REPEAT1",
"content": {
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": "["
},
{
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "_conditional_expression"
},
{
"type": "BLANK"
}
]
},
{
"type": "STRING",
"value": "]"
}
]
}
},
"_type_specifier_nonarray": {
"type": "CHOICE",
"members": [
{
"type": "STRING",
"value": "atomic_uint"
},
{
"type": "STRING",
"value": "bool"
},
{
"type": "STRING",
"value": "bvec2"
},
{
"type": "STRING",
"value": "bvec3"
},
{
"type": "STRING",
"value": "bvec4"
},
{
"type": "STRING",
"value": "float"
},
{
"type": "STRING",
"value": "iimage2D"
},
{
"type": "STRING",
"value": "iimage2DArray"
},
{
"type": "STRING",
"value": "iimage3D"
},
{
"type": "STRING",
"value": "iimageBuffer"
},
{
"type": "STRING",
"value": "iimageCube"
},
{
"type": "STRING",
"value": "iimageCubeArray"
},
{
"type": "STRING",
"value": "image2D"
},
{
"type": "STRING",
"value": "image2DArray"
},
{
"type": "STRING",
"value": "image3D"
},
{
"type": "STRING",
"value": "imageBuffer"
},
{
"type": "STRING",
"value": "imageCube"
},
{
"type": "STRING",
"value": "imageCubeArray"
},
{
"type": "STRING",
"value": "int"
},
{
"type": "STRING",
"value": "isampler2D"
},
{
"type": "STRING",
"value": "isampler2DArray"
},
{
"type": "STRING",
"value": "isampler2DMS"
},
{
"type": "STRING",
"value": "isampler2DMSArray"
},
{
"type": "STRING",
"value": "isampler3D"
},
{
"type": "STRING",
"value": "isamplerBuffer"
},
{
"type": "STRING",
"value": "isamplerCube"
},
{
"type": "STRING",
"value": "isamplerCubeArray"
},
{
"type": "STRING",
"value": "ivec2"
},
{
"type": "STRING",
"value": "ivec3"
},
{
"type": "STRING",
"value": "ivec4"
},
{
"type": "STRING",
"value": "mat2"
},
{
"type": "STRING",
"value": "mat2x2"
},
{
"type": "STRING",
"value": "mat2x3"
},
{
"type": "STRING",
"value": "mat2x4"
},
{
"type": "STRING",
"value": "mat3"
},
{
"type": "STRING",
"value": "mat3x2"
},
{
"type": "STRING",
"value": "mat3x3"
},
{
"type": "STRING",
"value": "mat3x4"
},
{
"type": "STRING",
"value": "mat4"
},
{
"type": "STRING",
"value": "mat4x2"
},
{
"type": "STRING",
"value": "mat4x3"
},
{
"type": "STRING",
"value": "mat4x4"
},
{
"type": "STRING",
"value": "sampler2D"
},
{
"type": "STRING",
"value": "sampler2DArray"
},
{
"type": "STRING",
"value": "sampler2DArrayShadow"
},
{
"type": "STRING",
"value": "sampler2DMS"
},
{
"type": "STRING",
"value": "sampler2DMSArray"
},
{
"type": "STRING",
"value": "sampler2DShadow"
},
{
"type": "STRING",
"value": "sampler3D"
},
{
"type": "STRING",
"value": "samplerBuffer"
},
{
"type": "STRING",
"value": "samplerCube"
},
{
"type": "STRING",
"value": "samplerCubeArray"
},
{
"type": "STRING",
"value": "samplerCubeArrayShadow"
},
{
"type": "STRING",
"value": "samplerCubeShadow"
},
{
"type": "STRING",
"value": "uimage2D"
},
{
"type": "STRING",
"value": "uimage2DArray"
},
{
"type": "STRING",
"value": "uimage3D"
},
{
"type": "STRING",
"value": "uimageBuffer"
},
{
"type": "STRING",
"value": "uimageCube"
},
{
"type": "STRING",
"value": "uimageCubeArray"
},
{
"type": "STRING",
"value": "uint"
},
{
"type": "STRING",
"value": "usampler2D"
},
{
"type": "STRING",
"value": "usampler2DArray"
},
{
"type": "STRING",
"value": "usampler2DMS"
},
{
"type": "STRING",
"value": "usampler2DMSArray"
},
{
"type": "STRING",
"value": "usampler3D"
},
{
"type": "STRING",
"value": "usamplerBuffer"
},
{
"type": "STRING",
"value": "usamplerCube"
},
{
"type": "STRING",
"value": "usamplerCubeArray"
},
{
"type": "STRING",
"value": "uvec2"
},
{
"type": "STRING",
"value": "uvec3"
},
{
"type": "STRING",
"value": "uvec4"
},
{
"type": "STRING",
"value": "vec2"
},
{
"type": "STRING",
"value": "vec3"
},
{
"type": "STRING",
"value": "vec4"
},
{
"type": "STRING",
"value": "void"
},
{
"type": "STRING",
"value": "dmat2"
},
{
"type": "STRING",
"value": "dmat2x2"
},
{
"type": "STRING",
"value": "dmat2x3"
},
{
"type": "STRING",
"value": "dmat2x4"
},
{
"type": "STRING",
"value": "dmat3"
},
{
"type": "STRING",
"value": "dmat3x2"
},
{
"type": "STRING",
"value": "dmat3x3"
},
{
"type": "STRING",
"value": "dmat3x4"
},
{
"type": "STRING",
"value": "dmat4"
},
{
"type": "STRING",
"value": "dmat4x2"
},
{
"type": "STRING",
"value": "dmat4x3"
},
{
"type": "STRING",
"value": "dmat4x4"
},
{
"type": "STRING",
"value": "double"
},
{
"type": "STRING",
"value": "dvec2"
},
{
"type": "STRING",
"value": "dvec3"
},
{
"type": "STRING",
"value": "dvec4"
},
{
"type": "STRING",
"value": "iimage1D"
},
{
"type": "STRING",
"value": "iimage1DArray"
},
{
"type": "STRING",
"value": "iimage2DMS"
},
{
"type": "STRING",
"value": "iimage2DMSArray"
},
{
"type": "STRING",
"value": "iimage2DRect"
},
{
"type": "STRING",
"value": "image1D"
},
{
"type": "STRING",
"value": "image1DArray"
},
{
"type": "STRING",
"value": "image2DMS"
},
{
"type": "STRING",
"value": "image2DMSArray"
},
{
"type": "STRING",
"value": "image2DRect"
},
{
"type": "STRING",
"value": "isampler1D"
},
{
"type": "STRING",
"value": "isampler1DArray"
},
{
"type": "STRING",
"value": "isampler2DRect"
},
{
"type": "STRING",
"value": "itexture2DRect"
},
{
"type": "STRING",
"value": "sampler1D"
},
{
"type": "STRING",
"value": "sampler1DArray"
},
{
"type": "STRING",
"value": "sampler1DArrayShadow"
},
{
"type": "STRING",
"value": "sampler1DShadow"
},
{
"type": "STRING",
"value": "sampler2DRect"
},
{
"type": "STRING",
"value": "sampler2DRectShadow"
},
{
"type": "STRING",
"value": "texture2DRect"
},
{
"type": "STRING",
"value": "uimage1D"
},
{
"type": "STRING",
"value": "uimage1DArray"
},
{
"type": "STRING",
"value": "uimage2DMS"
},
{
"type": "STRING",
"value": "uimage2DMSArray"
},
{
"type": "STRING",
"value": "uimage2DRect"
},
{
"type": "STRING",
"value": "usampler1D"
},
{
"type": "STRING",
"value": "usampler1DArray"
},
{
"type": "STRING",
"value": "usampler2DRect"
},
{
"type": "STRING",
"value": "utexture2DRect"
},
{
"type": "STRING",
"value": "isubpassInput"
},
{
"type": "STRING",
"value": "isubpassInputMS"
},
{
"type": "STRING",
"value": "itexture1D"
},
{
"type": "STRING",
"value": "itexture1DArray"
},
{
"type": "STRING",
"value": "itexture2D"
},
{
"type": "STRING",
"value": "itexture2DArray"
},
{
"type": "STRING",
"value": "itexture2DMS"
},
{
"type": "STRING",
"value": "itexture2DMSArray"
},
{
"type": "STRING",
"value": "itexture3D"
},
{
"type": "STRING",
"value": "itextureBuffer"
},
{
"type": "STRING",
"value": "itextureCube"
},
{
"type": "STRING",
"value": "itextureCubeArray"
},
{
"type": "STRING",
"value": "sampler"
},
{
"type": "STRING",
"value": "samplerShadow"
},
{
"type": "STRING",
"value": "subpassInput"
},
{
"type": "STRING",
"value": "subpassInputMS"
},
{
"type": "STRING",
"value": "texture1D"
},
{
"type": "STRING",
"value": "texture1DArray"
},
{
"type": "STRING",
"value": "texture2D"
},
{
"type": "STRING",
"value": "texture2DArray"
},
{
"type": "STRING",
"value": "texture2DMS"
},
{
"type": "STRING",
"value": "texture2DMSArray"
},
{
"type": "STRING",
"value": "texture3D"
},
{
"type": "STRING",
"value": "textureBuffer"
},
{
"type": "STRING",
"value": "textureCube"
},
{
"type": "STRING",
"value": "textureCubeArray"
},
{
"type": "STRING",
"value": "usubpassInput"
},
{
"type": "STRING",
"value": "usubpassInputMS"
},
{
"type": "STRING",
"value": "utexture1D"
},
{
"type": "STRING",
"value": "utexture1DArray"
},
{
"type": "STRING",
"value": "utexture2D"
},
{
"type": "STRING",
"value": "utexture2DArray"
},
{
"type": "STRING",
"value": "utexture2DMS"
},
{
"type": "STRING",
"value": "utexture2DMSArray"
},
{
"type": "STRING",
"value": "utexture3D"
},
{
"type": "STRING",
"value": "utextureBuffer"
},
{
"type": "STRING",
"value": "utextureCube"
},
{
"type": "STRING",
"value": "utextureCubeArray"
},
{
"type": "STRING",
"value": "tensorARM"
},
{
"type": "STRING",
"value": "bf16vec2"
},
{
"type": "STRING",
"value": "bf16vec3"
},
{
"type": "STRING",
"value": "bf16vec4"
},
{
"type": "STRING",
"value": "bfloat16_t"
},
{
"type": "STRING",
"value": "fe4m3vec2"
},
{
"type": "STRING",
"value": "fe4m3vec3"
},
{
"type": "STRING",
"value": "fe4m3vec4"
},
{
"type": "STRING",
"value": "floate4m3_t"
},
{
"type": "STRING",
"value": "fe5m2vec2"
},
{
"type": "STRING",
"value": "fe5m2vec3"
},
{
"type": "STRING",
"value": "fe5m2vec4"
},
{
"type": "STRING",
"value": "floate5m2_t"
},
{
"type": "STRING",
"value": "f16mat2"
},
{
"type": "STRING",
"value": "f16mat2x2"
},
{
"type": "STRING",
"value": "f16mat2x3"
},
{
"type": "STRING",
"value": "f16mat2x4"
},
{
"type": "STRING",
"value": "f16mat3"
},
{
"type": "STRING",
"value": "f16mat3x2"
},
{
"type": "STRING",
"value": "f16mat3x3"
},
{
"type": "STRING",
"value": "f16mat3x4"
},
{
"type": "STRING",
"value": "f16mat4"
},
{
"type": "STRING",
"value": "f16mat4x2"
},
{
"type": "STRING",
"value": "f16mat4x3"
},
{
"type": "STRING",
"value": "f16mat4x4"
},
{
"type": "STRING",
"value": "f16vec2"
},
{
"type": "STRING",
"value": "f16vec3"
},
{
"type": "STRING",
"value": "f16vec4"
},
{
"type": "STRING",
"value": "f32mat2"
},
{
"type": "STRING",
"value": "f32mat2x2"
},
{
"type": "STRING",
"value": "f32mat2x3"
},
{
"type": "STRING",
"value": "f32mat2x4"
},
{
"type": "STRING",
"value": "f32mat3"
},
{
"type": "STRING",
"value": "f32mat3x2"
},
{
"type": "STRING",
"value": "f32mat3x3"
},
{
"type": "STRING",
"value": "f32mat3x4"
},
{
"type": "STRING",
"value": "f32mat4"
},
{
"type": "STRING",
"value": "f32mat4x2"
},
{
"type": "STRING",
"value": "f32mat4x3"
},
{
"type": "STRING",
"value": "f32mat4x4"
},
{
"type": "STRING",
"value": "f32vec2"
},
{
"type": "STRING",
"value": "f32vec3"
},
{
"type": "STRING",
"value": "f32vec4"
},
{
"type": "STRING",
"value": "f64mat2"
},
{
"type": "STRING",
"value": "f64mat2x2"
},
{
"type": "STRING",
"value": "f64mat2x3"
},
{
"type": "STRING",
"value": "f64mat2x4"
},
{
"type": "STRING",
"value": "f64mat3"
},
{
"type": "STRING",
"value": "f64mat3x2"
},
{
"type": "STRING",
"value": "f64mat3x3"
},
{
"type": "STRING",
"value": "f64mat3x4"
},
{
"type": "STRING",
"value": "f64mat4"
},
{
"type": "STRING",
"value": "f64mat4x2"
},
{
"type": "STRING",
"value": "f64mat4x3"
},
{
"type": "STRING",
"value": "f64mat4x4"
},
{
"type": "STRING",
"value": "f64vec2"
},
{
"type": "STRING",
"value": "f64vec3"
},
{
"type": "STRING",
"value": "f64vec4"
},
{
"type": "STRING",
"value": "float16_t"
},
{
"type": "STRING",
"value": "float32_t"
},
{
"type": "STRING",
"value": "float64_t"
},
{
"type": "STRING",
"value": "i16vec2"
},
{
"type": "STRING",
"value": "i16vec3"
},
{
"type": "STRING",
"value": "i16vec4"
},
{
"type": "STRING",
"value": "i32vec2"
},
{
"type": "STRING",
"value": "i32vec3"
},
{
"type": "STRING",
"value": "i32vec4"
},
{
"type": "STRING",
"value": "i64vec2"
},
{
"type": "STRING",
"value": "i64vec3"
},
{
"type": "STRING",
"value": "i64vec4"
},
{
"type": "STRING",
"value": "i8vec2"
},
{
"type": "STRING",
"value": "i8vec3"
},
{
"type": "STRING",
"value": "i8vec4"
},
{
"type": "STRING",
"value": "int16_t"
},
{
"type": "STRING",
"value": "int32_t"
},
{
"type": "STRING",
"value": "int64_t"
},
{
"type": "STRING",
"value": "int8_t"
},
{
"type": "STRING",
"value": "u16vec2"
},
{
"type": "STRING",
"value": "u16vec3"
},
{
"type": "STRING",
"value": "u16vec4"
},
{
"type": "STRING",
"value": "u32vec2"
},
{
"type": "STRING",
"value": "u32vec3"
},
{
"type": "STRING",
"value": "u32vec4"
},
{
"type": "STRING",
"value": "u64vec2"
},
{
"type": "STRING",
"value": "u64vec3"
},
{
"type": "STRING",
"value": "u64vec4"
},
{
"type": "STRING",
"value": "u8vec2"
},
{
"type": "STRING",
"value": "u8vec3"
},
{
"type": "STRING",
"value": "u8vec4"
},
{
"type": "STRING",
"value": "uint16_t"
},
{
"type": "STRING",
"value": "uint32_t"
},
{
"type": "STRING",
"value": "uint64_t"
},
{
"type": "STRING",
"value": "uint8_t"
},
{
"type": "STRING",
"value": "accelerationStructureEXT"
},
{
"type": "STRING",
"value": "rayQueryEXT"
},
{
"type": "STRING",
"value": "hitObjectEXT"
},
{
"type": "STRING",
"value": "attachmentEXT"
},
{
"type": "STRING",
"value": "iattachmentEXT"
},
{
"type": "STRING",
"value": "uattachmentEXT"
},
{
"type": "STRING",
"value": "coopmat"
},
{
"type": "STRING",
"value": "coopmatNV"
},
{
"type": "STRING",
"value": "fcoopmatNV"
},
{
"type": "STRING",
"value": "icoopmatNV"
},
{
"type": "STRING",
"value": "ucoopmatNV"
},
{
"type": "STRING",
"value": "tensorLayoutNV"
},
{
"type": "STRING",
"value": "tensorViewNV"
},
{
"type": "STRING",
"value": "coopvecNV"
},
{
"type": "STRING",
"value": "accelerationStructureNV"
},
{
"type": "STRING",
"value": "hitObjectNV"
},
{
"type": "SYMBOL",
"name": "struct_specifier"
},
{
"type": "PREC_DYNAMIC",
"value": -1,
"content": {
"type": "SYMBOL",
"name": "_type_identifier"
}
},
{
"type": "PREC_DYNAMIC",
"value": -3,
"content": {
"type": "ALIAS",
"content": {
"type": "SYMBOL",
"name": "_macro_function_call"
},
"named": true,
"value": "macro_invocation"
}
}
]
},
"struct_specifier": {
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": "struct"
},
{
"type": "CHOICE",
"members": [
{
"type": "FIELD",
"name": "name",
"content": {
"type": "SYMBOL",
"name": "identifier"
}
},
{
"type": "BLANK"
}
]
},
{
"type": "STRING",
"value": "{"
},
{
"type": "SYMBOL",
"name": "field_declaration_list"
},
{
"type": "STRING",
"value": "}"
}
]
},
"field_declaration_list": {
"type": "REPEAT1",
"content": {
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "field_declaration"
},
{
"type": "SYMBOL",
"name": "preproc_call"
},
{
"type": "SYMBOL",
"name": "preproc_def"
},
{
"type": "SYMBOL",
"name": "preproc_function_def"
},
{
"type": "SYMBOL",
"name": "preproc_undef"
},
{
"type": "ALIAS",
"content": {
"type": "SYMBOL",
"name": "preproc_if_in_struct_declaration"
},
"named": true,
"value": "preproc_if"
},
{
"type": "ALIAS",
"content": {
"type": "SYMBOL",
"name": "preproc_ifdef_in_struct_declaration"
},
"named": true,
"value": "preproc_ifdef"
}
]
}
},
"field_declaration": {
"type": "SEQ",
"members": [
{
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "type_qualifier"
},
{
"type": "BLANK"
}
]
},
{
"type": "SYMBOL",
"name": "type_specifier"
},
{
"type": "SYMBOL",
"name": "field_declarator_list"
},
{
"type": "STRING",
"value": ";"
}
]
},
"field_declarator_list": {
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "field_declarator"
},
{
"type": "REPEAT",
"content": {
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": ","
},
{
"type": "SYMBOL",
"name": "field_declarator"
}
]
}
}
]
},
"field_declarator": {
"type": "SEQ",
"members": [
{
"type": "FIELD",
"name": "name",
"content": {
"type": "SYMBOL",
"name": "identifier"
}
},
{
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "array_specifier"
},
{
"type": "BLANK"
}
]
}
]
},
"declaration": {
"type": "CHOICE",
"members": [
{
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "function_declarator"
},
{
"type": "STRING",
"value": ";"
}
]
},
{
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "declarator_list"
},
{
"type": "STRING",
"value": ";"
}
]
},
{
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": "precision"
},
{
"type": "SYMBOL",
"name": "precision_qualifier"
},
{
"type": "SYMBOL",
"name": "type_specifier"
},
{
"type": "STRING",
"value": ";"
}
]
},
{
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "type_qualifier"
},
{
"type": "FIELD",
"name": "name",
"content": {
"type": "SYMBOL",
"name": "identifier"
}
},
{
"type": "STRING",
"value": "{"
},
{
"type": "SYMBOL",
"name": "field_declaration_list"
},
{
"type": "STRING",
"value": "}"
},
{
"type": "CHOICE",
"members": [
{
"type": "SEQ",
"members": [
{
"type": "FIELD",
"name": "instance_name",
"content": {
"type": "SYMBOL",
"name": "identifier"
}
},
{
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "array_specifier"
},
{
"type": "BLANK"
}
]
}
]
},
{
"type": "BLANK"
}
]
},
{
"type": "STRING",
"value": ";"
}
]
},
{
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "type_qualifier"
},
{
"type": "STRING",
"value": ";"
}
]
},
{
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "type_qualifier"
},
{
"type": "SYMBOL",
"name": "identifier_list"
},
{
"type": "STRING",
"value": ";"
}
]
}
]
},
"identifier_list": {
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "identifier"
},
{
"type": "REPEAT",
"content": {
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": ","
},
{
"type": "SYMBOL",
"name": "identifier"
}
]
}
}
]
},
"function_declarator": {
"type": "SEQ",
"members": [
{
"type": "FIELD",
"name": "return_type",
"content": {
"type": "SYMBOL",
"name": "type"
}
},
{
"type": "FIELD",
"name": "name",
"content": {
"type": "SYMBOL",
"name": "identifier"
}
},
{
"type": "STRING",
"value": "("
},
{
"type": "CHOICE",
"members": [
{
"type": "FIELD",
"name": "parameters",
"content": {
"type": "SYMBOL",
"name": "parameter_list"
}
},
{
"type": "BLANK"
}
]
},
{
"type": "STRING",
"value": ")"
}
]
},
"parameter_list": {
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "parameter_declaration"
},
{
"type": "REPEAT",
"content": {
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": ","
},
{
"type": "SYMBOL",
"name": "parameter_declaration"
}
]
}
}
]
},
"parameter_declaration": {
"type": "CHOICE",
"members": [
{
"type": "SEQ",
"members": [
{
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "type_qualifier"
},
{
"type": "BLANK"
}
]
},
{
"type": "FIELD",
"name": "type",
"content": {
"type": "SYMBOL",
"name": "type_specifier"
}
},
{
"type": "FIELD",
"name": "name",
"content": {
"type": "SYMBOL",
"name": "identifier"
}
},
{
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "array_specifier"
},
{
"type": "BLANK"
}
]
}
]
},
{
"type": "SEQ",
"members": [
{
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "type_qualifier"
},
{
"type": "BLANK"
}
]
},
{
"type": "FIELD",
"name": "type",
"content": {
"type": "SYMBOL",
"name": "type_specifier"
}
}
]
}
]
},
"declarator_list": {
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "declarator"
},
{
"type": "REPEAT",
"content": {
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": ","
},
{
"type": "ALIAS",
"content": {
"type": "SYMBOL",
"name": "_subsequent_declarator"
},
"named": true,
"value": "declarator"
}
]
}
}
]
},
"declarator": {
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "type"
},
{
"type": "CHOICE",
"members": [
{
"type": "SEQ",
"members": [
{
"type": "FIELD",
"name": "name",
"content": {
"type": "SYMBOL",
"name": "identifier"
}
},
{
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "array_specifier"
},
{
"type": "BLANK"
}
]
},
{
"type": "CHOICE",
"members": [
{
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": "="
},
{
"type": "FIELD",
"name": "value",
"content": {
"type": "SYMBOL",
"name": "_initializer"
}
}
]
},
{
"type": "BLANK"
}
]
}
]
},
{
"type": "BLANK"
}
]
}
]
},
"_subsequent_declarator": {
"type": "SEQ",
"members": [
{
"type": "FIELD",
"name": "name",
"content": {
"type": "SYMBOL",
"name": "identifier"
}
},
{
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "array_specifier"
},
{
"type": "BLANK"
}
]
},
{
"type": "CHOICE",
"members": [
{
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": "="
},
{
"type": "FIELD",
"name": "value",
"content": {
"type": "SYMBOL",
"name": "_initializer"
}
}
]
},
{
"type": "BLANK"
}
]
}
]
},
"_initializer": {
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "_assignment_expression"
},
{
"type": "SYMBOL",
"name": "initializer"
}
]
},
"initializer": {
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": "{"
},
{
"type": "SYMBOL",
"name": "initializer_list"
},
{
"type": "STRING",
"value": "}"
}
]
},
"initializer_list": {
"type": "SEQ",
"members": [
{
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "_initializer"
},
{
"type": "REPEAT",
"content": {
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": ","
},
{
"type": "SYMBOL",
"name": "_initializer"
}
]
}
}
]
},
{
"type": "CHOICE",
"members": [
{
"type": "STRING",
"value": ","
},
{
"type": "BLANK"
}
]
}
]
},
"_declaration_statement": {
"type": "PREC_DYNAMIC",
"value": -1,
"content": {
"type": "SYMBOL",
"name": "local_declaration"
}
},
"local_declaration": {
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "declarator_list"
},
{
"type": "STRING",
"value": ";"
}
]
},
"statement": {
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "compound_statement"
},
{
"type": "SYMBOL",
"name": "simple_statement"
}
]
},
"simple_statement": {
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "expression_statement"
},
{
"type": "SYMBOL",
"name": "_declaration_statement"
},
{
"type": "SYMBOL",
"name": "if_statement"
},
{
"type": "SYMBOL",
"name": "switch_statement"
},
{
"type": "SYMBOL",
"name": "case_label"
},
{
"type": "SYMBOL",
"name": "_iteration_statement"
},
{
"type": "SYMBOL",
"name": "_jump_statement"
},
{
"type": "SYMBOL",
"name": "demote_statement"
},
{
"type": "SYMBOL",
"name": "preproc_call"
},
{
"type": "SYMBOL",
"name": "preproc_def"
},
{
"type": "SYMBOL",
"name": "preproc_function_def"
},
{
"type": "SYMBOL",
"name": "preproc_undef"
},
{
"type": "ALIAS",
"content": {
"type": "SYMBOL",
"name": "preproc_if_in_statement"
},
"named": true,
"value": "preproc_if"
},
{
"type": "ALIAS",
"content": {
"type": "SYMBOL",
"name": "preproc_ifdef_in_statement"
},
"named": true,
"value": "preproc_ifdef"
}
]
},
"compound_statement": {
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": "{"
},
{
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "statement_list"
},
{
"type": "BLANK"
}
]
},
{
"type": "STRING",
"value": "}"
}
]
},
"_statement_no_new_scope": {
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "compound_statement"
},
{
"type": "SYMBOL",
"name": "simple_statement"
}
]
},
"statement_list": {
"type": "REPEAT1",
"content": {
"type": "SYMBOL",
"name": "statement"
}
},
"expression_statement": {
"type": "CHOICE",
"members": [
{
"type": "PREC_DYNAMIC",
"value": 1,
"content": {
"type": "SEQ",
"members": [
{
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "_expression"
},
{
"type": "BLANK"
}
]
},
{
"type": "STRING",
"value": ";"
}
]
}
},
{
"type": "PREC_DYNAMIC",
"value": -2,
"content": {
"type": "ALIAS",
"content": {
"type": "SYMBOL",
"name": "_macro_function_call"
},
"named": true,
"value": "function_call"
}
}
]
},
"if_statement": {
"type": "PREC_RIGHT",
"value": 0,
"content": {
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": "if"
},
{
"type": "STRING",
"value": "("
},
{
"type": "FIELD",
"name": "condition",
"content": {
"type": "SYMBOL",
"name": "_expression"
}
},
{
"type": "STRING",
"value": ")"
},
{
"type": "FIELD",
"name": "consequence",
"content": {
"type": "SYMBOL",
"name": "statement"
}
},
{
"type": "CHOICE",
"members": [
{
"type": "FIELD",
"name": "alternative",
"content": {
"type": "SYMBOL",
"name": "else_clause"
}
},
{
"type": "BLANK"
}
]
}
]
}
},
"else_clause": {
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": "else"
},
{
"type": "SYMBOL",
"name": "statement"
}
]
},
"_condition": {
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "_expression"
},
{
"type": "SYMBOL",
"name": "condition"
}
]
},
"condition": {
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "type"
},
{
"type": "FIELD",
"name": "name",
"content": {
"type": "SYMBOL",
"name": "identifier"
}
},
{
"type": "STRING",
"value": "="
},
{
"type": "SYMBOL",
"name": "_initializer"
}
]
},
"switch_statement": {
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": "switch"
},
{
"type": "STRING",
"value": "("
},
{
"type": "FIELD",
"name": "condition",
"content": {
"type": "SYMBOL",
"name": "_expression"
}
},
{
"type": "STRING",
"value": ")"
},
{
"type": "STRING",
"value": "{"
},
{
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "statement_list"
},
{
"type": "BLANK"
}
]
},
{
"type": "STRING",
"value": "}"
}
]
},
"case_label": {
"type": "CHOICE",
"members": [
{
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": "case"
},
{
"type": "FIELD",
"name": "value",
"content": {
"type": "SYMBOL",
"name": "_expression"
}
},
{
"type": "STRING",
"value": ":"
}
]
},
{
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": "default"
},
{
"type": "STRING",
"value": ":"
}
]
}
]
},
"_iteration_statement": {
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "while_statement"
},
{
"type": "SYMBOL",
"name": "do_statement"
},
{
"type": "SYMBOL",
"name": "for_statement"
}
]
},
"while_statement": {
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": "while"
},
{
"type": "STRING",
"value": "("
},
{
"type": "FIELD",
"name": "condition",
"content": {
"type": "SYMBOL",
"name": "_condition"
}
},
{
"type": "STRING",
"value": ")"
},
{
"type": "FIELD",
"name": "body",
"content": {
"type": "SYMBOL",
"name": "_statement_no_new_scope"
}
}
]
},
"do_statement": {
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": "do"
},
{
"type": "FIELD",
"name": "body",
"content": {
"type": "SYMBOL",
"name": "statement"
}
},
{
"type": "STRING",
"value": "while"
},
{
"type": "STRING",
"value": "("
},
{
"type": "FIELD",
"name": "condition",
"content": {
"type": "SYMBOL",
"name": "_expression"
}
},
{
"type": "STRING",
"value": ")"
},
{
"type": "STRING",
"value": ";"
}
]
},
"for_statement": {
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": "for"
},
{
"type": "STRING",
"value": "("
},
{
"type": "FIELD",
"name": "initializer",
"content": {
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "expression_statement"
},
{
"type": "SYMBOL",
"name": "_declaration_statement"
}
]
}
},
{
"type": "FIELD",
"name": "condition",
"content": {
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "_condition"
},
{
"type": "BLANK"
}
]
}
},
{
"type": "STRING",
"value": ";"
},
{
"type": "FIELD",
"name": "update",
"content": {
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "_expression"
},
{
"type": "BLANK"
}
]
}
},
{
"type": "STRING",
"value": ")"
},
{
"type": "FIELD",
"name": "body",
"content": {
"type": "SYMBOL",
"name": "_statement_no_new_scope"
}
}
]
},
"_jump_statement": {
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "continue_statement"
},
{
"type": "SYMBOL",
"name": "break_statement"
},
{
"type": "SYMBOL",
"name": "return_statement"
},
{
"type": "SYMBOL",
"name": "discard_statement"
},
{
"type": "SYMBOL",
"name": "terminate_invocation_statement"
}
]
},
"continue_statement": {
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": "continue"
},
{
"type": "STRING",
"value": ";"
}
]
},
"break_statement": {
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": "break"
},
{
"type": "STRING",
"value": ";"
}
]
},
"return_statement": {
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": "return"
},
{
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "_expression"
},
{
"type": "BLANK"
}
]
},
{
"type": "STRING",
"value": ";"
}
]
},
"discard_statement": {
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": "discard"
},
{
"type": "STRING",
"value": ";"
}
]
},
"identifier": {
"type": "PATTERN",
"value": "[a-zA-Z_][a-zA-Z0-9_]*"
},
"_type_identifier": {
"type": "ALIAS",
"content": {
"type": "SYMBOL",
"name": "identifier"
},
"named": true,
"value": "type_identifier"
},
"comment": {
"type": "TOKEN",
"content": {
"type": "CHOICE",
"members": [
{
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": "//"
},
{
"type": "PATTERN",
"value": "(\\\\+(.|\\r?\\n)|[^\\\\\\n])*"
}
]
},
{
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": "/*"
},
{
"type": "PATTERN",
"value": "[^*]*\\*+([^/*][^*]*\\*+)*"
},
{
"type": "STRING",
"value": "/"
}
]
}
]
}
},
"number_literal": {
"type": "TOKEN",
"content": {
"type": "CHOICE",
"members": [
{
"type": "SEQ",
"members": [
{
"type": "CHOICE",
"members": [
{
"type": "SEQ",
"members": [
{
"type": "PATTERN",
"value": "[1-9]"
},
{
"type": "CHOICE",
"members": [
{
"type": "PATTERN",
"value": "[0-9]+"
},
{
"type": "BLANK"
}
]
}
]
},
{
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": "0"
},
{
"type": "CHOICE",
"members": [
{
"type": "PATTERN",
"value": "[0-7]+"
},
{
"type": "BLANK"
}
]
}
]
},
{
"type": "SEQ",
"members": [
{
"type": "CHOICE",
"members": [
{
"type": "STRING",
"value": "0x"
},
{
"type": "STRING",
"value": "0X"
}
]
},
{
"type": "PATTERN",
"value": "[0-9a-fA-F]+"
}
]
}
]
},
{
"type": "CHOICE",
"members": [
{
"type": "CHOICE",
"members": [
{
"type": "STRING",
"value": "u"
},
{
"type": "STRING",
"value": "U"
}
]
},
{
"type": "BLANK"
}
]
}
]
},
{
"type": "SEQ",
"members": [
{
"type": "CHOICE",
"members": [
{
"type": "SEQ",
"members": [
{
"type": "CHOICE",
"members": [
{
"type": "SEQ",
"members": [
{
"type": "PATTERN",
"value": "[0-9]+"
},
{
"type": "STRING",
"value": "."
},
{
"type": "CHOICE",
"members": [
{
"type": "PATTERN",
"value": "[0-9]+"
},
{
"type": "BLANK"
}
]
}
]
},
{
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": "."
},
{
"type": "PATTERN",
"value": "[0-9]+"
}
]
}
]
},
{
"type": "CHOICE",
"members": [
{
"type": "SEQ",
"members": [
{
"type": "CHOICE",
"members": [
{
"type": "STRING",
"value": "e"
},
{
"type": "STRING",
"value": "E"
}
]
},
{
"type": "CHOICE",
"members": [
{
"type": "CHOICE",
"members": [
{
"type": "STRING",
"value": "+"
},
{
"type": "STRING",
"value": "-"
}
]
},
{
"type": "BLANK"
}
]
},
{
"type": "PATTERN",
"value": "[0-9]+"
}
]
},
{
"type": "BLANK"
}
]
}
]
},
{
"type": "SEQ",
"members": [
{
"type": "PATTERN",
"value": "[0-9]+"
},
{
"type": "SEQ",
"members": [
{
"type": "CHOICE",
"members": [
{
"type": "STRING",
"value": "e"
},
{
"type": "STRING",
"value": "E"
}
]
},
{
"type": "CHOICE",
"members": [
{
"type": "CHOICE",
"members": [
{
"type": "STRING",
"value": "+"
},
{
"type": "STRING",
"value": "-"
}
]
},
{
"type": "BLANK"
}
]
},
{
"type": "PATTERN",
"value": "[0-9]+"
}
]
}
]
}
]
},
{
"type": "CHOICE",
"members": [
{
"type": "CHOICE",
"members": [
{
"type": "STRING",
"value": "f"
},
{
"type": "STRING",
"value": "F"
},
{
"type": "STRING",
"value": "lf"
},
{
"type": "STRING",
"value": "LF"
}
]
},
{
"type": "BLANK"
}
]
}
]
}
]
}
},
"preproc_version": {
"type": "SEQ",
"members": [
{
"type": "PATTERN",
"value": "#[ \\t]*version"
},
{
"type": "PATTERN",
"value": "[^\\n]*"
}
]
},
"preproc_call": {
"type": "SEQ",
"members": [
{
"type": "FIELD",
"name": "directive",
"content": {
"type": "SYMBOL",
"name": "preproc_directive"
}
},
{
"type": "FIELD",
"name": "argument",
"content": {
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "preproc_arg"
},
{
"type": "BLANK"
}
]
}
},
{
"type": "IMMEDIATE_TOKEN",
"content": {
"type": "PATTERN",
"value": "\\r?\\n"
}
}
]
},
"preproc_nothing": {
"type": "SEQ",
"members": [
{
"type": "PATTERN",
"value": "#[ \\t]*"
},
{
"type": "IMMEDIATE_TOKEN",
"content": {
"type": "PATTERN",
"value": "\\r?\\n"
}
}
]
},
"preproc_arg": {
"type": "TOKEN",
"content": {
"type": "PREC",
"value": -1,
"content": {
"type": "PATTERN",
"value": "\\S([^/\\n]|\\/[^*]|\\\\\\r?\\n)*"
}
}
},
"preproc_directive": {
"type": "PATTERN",
"value": "#[ \\t]*[a-zA-Z0-9]\\w*"
},
"_top_level_item": {
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "_external_declaration"
},
{
"type": "SYMBOL",
"name": "preproc_version"
},
{
"type": "SYMBOL",
"name": "preproc_call"
},
{
"type": "SYMBOL",
"name": "preproc_nothing"
},
{
"type": "SYMBOL",
"name": "preproc_language_if"
},
{
"type": "SYMBOL",
"name": "preproc_language_ifdef"
},
{
"type": "SYMBOL",
"name": "preproc_language_ifndef"
},
{
"type": "SYMBOL",
"name": "preproc_def"
},
{
"type": "SYMBOL",
"name": "preproc_function_def"
},
{
"type": "SYMBOL",
"name": "preproc_undef"
},
{
"type": "SYMBOL",
"name": "preproc_error"
},
{
"type": "SYMBOL",
"name": "preproc_pragma"
},
{
"type": "SYMBOL",
"name": "preproc_extension"
},
{
"type": "SYMBOL",
"name": "preproc_line"
},
{
"type": "SYMBOL",
"name": "preproc_if"
},
{
"type": "SYMBOL",
"name": "preproc_ifdef"
}
]
},
"preproc_def": {
"type": "SEQ",
"members": [
{
"type": "ALIAS",
"content": {
"type": "TOKEN",
"content": {
"type": "PREC",
"value": 1,
"content": {
"type": "PATTERN",
"value": "#[ \\t]*define"
}
}
},
"named": false,
"value": "#define"
},
{
"type": "FIELD",
"name": "name",
"content": {
"type": "SYMBOL",
"name": "identifier"
}
},
{
"type": "FIELD",
"name": "value",
"content": {
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "preproc_arg"
},
{
"type": "BLANK"
}
]
}
},
{
"type": "IMMEDIATE_TOKEN",
"content": {
"type": "PATTERN",
"value": "\\r?\\n"
}
}
]
},
"preproc_function_def": {
"type": "SEQ",
"members": [
{
"type": "ALIAS",
"content": {
"type": "TOKEN",
"content": {
"type": "PREC",
"value": 1,
"content": {
"type": "PATTERN",
"value": "#[ \\t]*define"
}
}
},
"named": false,
"value": "#define"
},
{
"type": "FIELD",
"name": "name",
"content": {
"type": "SYMBOL",
"name": "identifier"
}
},
{
"type": "FIELD",
"name": "parameters",
"content": {
"type": "SYMBOL",
"name": "preproc_params"
}
},
{
"type": "FIELD",
"name": "value",
"content": {
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "preproc_arg"
},
{
"type": "BLANK"
}
]
}
},
{
"type": "IMMEDIATE_TOKEN",
"content": {
"type": "PATTERN",
"value": "\\r?\\n"
}
}
]
},
"preproc_params": {
"type": "SEQ",
"members": [
{
"type": "IMMEDIATE_TOKEN",
"content": {
"type": "STRING",
"value": "("
}
},
{
"type": "CHOICE",
"members": [
{
"type": "SEQ",
"members": [
{
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "identifier"
},
{
"type": "STRING",
"value": "..."
}
]
},
{
"type": "REPEAT",
"content": {
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": ","
},
{
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "identifier"
},
{
"type": "STRING",
"value": "..."
}
]
}
]
}
}
]
},
{
"type": "BLANK"
}
]
},
{
"type": "STRING",
"value": ")"
}
]
},
"preproc_undef": {
"type": "SEQ",
"members": [
{
"type": "ALIAS",
"content": {
"type": "TOKEN",
"content": {
"type": "PREC",
"value": 1,
"content": {
"type": "PATTERN",
"value": "#[ \\t]*undef"
}
}
},
"named": false,
"value": "#undef"
},
{
"type": "FIELD",
"name": "name",
"content": {
"type": "SYMBOL",
"name": "identifier"
}
},
{
"type": "IMMEDIATE_TOKEN",
"content": {
"type": "PATTERN",
"value": "\\r?\\n"
}
}
]
},
"preproc_error": {
"type": "SEQ",
"members": [
{
"type": "ALIAS",
"content": {
"type": "TOKEN",
"content": {
"type": "PREC",
"value": 1,
"content": {
"type": "PATTERN",
"value": "#[ \\t]*error"
}
}
},
"named": false,
"value": "#error"
},
{
"type": "FIELD",
"name": "message",
"content": {
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "preproc_arg"
},
{
"type": "BLANK"
}
]
}
},
{
"type": "IMMEDIATE_TOKEN",
"content": {
"type": "PATTERN",
"value": "\\r?\\n"
}
}
]
},
"preproc_pragma": {
"type": "SEQ",
"members": [
{
"type": "ALIAS",
"content": {
"type": "TOKEN",
"content": {
"type": "PREC",
"value": 1,
"content": {
"type": "PATTERN",
"value": "#[ \\t]*pragma"
}
}
},
"named": false,
"value": "#pragma"
},
{
"type": "FIELD",
"name": "argument",
"content": {
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "preproc_arg"
},
{
"type": "BLANK"
}
]
}
},
{
"type": "IMMEDIATE_TOKEN",
"content": {
"type": "PATTERN",
"value": "\\r?\\n"
}
}
]
},
"preproc_extension": {
"type": "SEQ",
"members": [
{
"type": "ALIAS",
"content": {
"type": "TOKEN",
"content": {
"type": "PREC",
"value": 1,
"content": {
"type": "PATTERN",
"value": "#[ \\t]*extension"
}
}
},
"named": false,
"value": "#extension"
},
{
"type": "FIELD",
"name": "argument",
"content": {
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "preproc_arg"
},
{
"type": "BLANK"
}
]
}
},
{
"type": "IMMEDIATE_TOKEN",
"content": {
"type": "PATTERN",
"value": "\\r?\\n"
}
}
]
},
"preproc_line": {
"type": "SEQ",
"members": [
{
"type": "ALIAS",
"content": {
"type": "TOKEN",
"content": {
"type": "PREC",
"value": 1,
"content": {
"type": "PATTERN",
"value": "#[ \\t]*line"
}
}
},
"named": false,
"value": "#line"
},
{
"type": "FIELD",
"name": "argument",
"content": {
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "preproc_arg"
},
{
"type": "BLANK"
}
]
}
},
{
"type": "IMMEDIATE_TOKEN",
"content": {
"type": "PATTERN",
"value": "\\r?\\n"
}
}
]
},
"_preproc_expression": {
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "identifier"
},
{
"type": "SYMBOL",
"name": "number_literal"
},
{
"type": "SYMBOL",
"name": "preproc_defined"
},
{
"type": "ALIAS",
"content": {
"type": "SYMBOL",
"name": "preproc_unary_expression"
},
"named": true,
"value": "unary_expression"
},
{
"type": "ALIAS",
"content": {
"type": "SYMBOL",
"name": "preproc_binary_expression"
},
"named": true,
"value": "binary_expression"
},
{
"type": "ALIAS",
"content": {
"type": "SYMBOL",
"name": "preproc_parenthesized_expression"
},
"named": true,
"value": "parenthesized_expression"
}
]
},
"preproc_parenthesized_expression": {
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": "("
},
{
"type": "SYMBOL",
"name": "_preproc_expression"
},
{
"type": "STRING",
"value": ")"
}
]
},
"preproc_defined": {
"type": "CHOICE",
"members": [
{
"type": "PREC",
"value": 1,
"content": {
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": "defined"
},
{
"type": "STRING",
"value": "("
},
{
"type": "SYMBOL",
"name": "identifier"
},
{
"type": "STRING",
"value": ")"
}
]
}
},
{
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": "defined"
},
{
"type": "SYMBOL",
"name": "identifier"
}
]
}
]
},
"preproc_unary_expression": {
"type": "PREC_LEFT",
"value": 14,
"content": {
"type": "SEQ",
"members": [
{
"type": "FIELD",
"name": "operator",
"content": {
"type": "CHOICE",
"members": [
{
"type": "STRING",
"value": "!"
},
{
"type": "STRING",
"value": "~"
},
{
"type": "STRING",
"value": "-"
},
{
"type": "STRING",
"value": "+"
}
]
}
},
{
"type": "FIELD",
"name": "argument",
"content": {
"type": "SYMBOL",
"name": "_preproc_expression"
}
}
]
}
},
"preproc_binary_expression": {
"type": "CHOICE",
"members": [
{
"type": "PREC_LEFT",
"value": 11,
"content": {
"type": "SEQ",
"members": [
{
"type": "FIELD",
"name": "left",
"content": {
"type": "SYMBOL",
"name": "_preproc_expression"
}
},
{
"type": "FIELD",
"name": "operator",
"content": {
"type": "CHOICE",
"members": [
{
"type": "STRING",
"value": "*"
},
{
"type": "STRING",
"value": "/"
},
{
"type": "STRING",
"value": "%"
}
]
}
},
{
"type": "FIELD",
"name": "right",
"content": {
"type": "SYMBOL",
"name": "_preproc_expression"
}
}
]
}
},
{
"type": "PREC_LEFT",
"value": 10,
"content": {
"type": "SEQ",
"members": [
{
"type": "FIELD",
"name": "left",
"content": {
"type": "SYMBOL",
"name": "_preproc_expression"
}
},
{
"type": "FIELD",
"name": "operator",
"content": {
"type": "CHOICE",
"members": [
{
"type": "STRING",
"value": "+"
},
{
"type": "STRING",
"value": "-"
}
]
}
},
{
"type": "FIELD",
"name": "right",
"content": {
"type": "SYMBOL",
"name": "_preproc_expression"
}
}
]
}
},
{
"type": "PREC_LEFT",
"value": 9,
"content": {
"type": "SEQ",
"members": [
{
"type": "FIELD",
"name": "left",
"content": {
"type": "SYMBOL",
"name": "_preproc_expression"
}
},
{
"type": "FIELD",
"name": "operator",
"content": {
"type": "CHOICE",
"members": [
{
"type": "STRING",
"value": "<<"
},
{
"type": "STRING",
"value": ">>"
}
]
}
},
{
"type": "FIELD",
"name": "right",
"content": {
"type": "SYMBOL",
"name": "_preproc_expression"
}
}
]
}
},
{
"type": "PREC_LEFT",
"value": 8,
"content": {
"type": "SEQ",
"members": [
{
"type": "FIELD",
"name": "left",
"content": {
"type": "SYMBOL",
"name": "_preproc_expression"
}
},
{
"type": "FIELD",
"name": "operator",
"content": {
"type": "CHOICE",
"members": [
{
"type": "STRING",
"value": "<"
},
{
"type": "STRING",
"value": ">"
},
{
"type": "STRING",
"value": "<="
},
{
"type": "STRING",
"value": ">="
}
]
}
},
{
"type": "FIELD",
"name": "right",
"content": {
"type": "SYMBOL",
"name": "_preproc_expression"
}
}
]
}
},
{
"type": "PREC_LEFT",
"value": 7,
"content": {
"type": "SEQ",
"members": [
{
"type": "FIELD",
"name": "left",
"content": {
"type": "SYMBOL",
"name": "_preproc_expression"
}
},
{
"type": "FIELD",
"name": "operator",
"content": {
"type": "CHOICE",
"members": [
{
"type": "STRING",
"value": "=="
},
{
"type": "STRING",
"value": "!="
}
]
}
},
{
"type": "FIELD",
"name": "right",
"content": {
"type": "SYMBOL",
"name": "_preproc_expression"
}
}
]
}
},
{
"type": "PREC_LEFT",
"value": 6,
"content": {
"type": "SEQ",
"members": [
{
"type": "FIELD",
"name": "left",
"content": {
"type": "SYMBOL",
"name": "_preproc_expression"
}
},
{
"type": "FIELD",
"name": "operator",
"content": {
"type": "STRING",
"value": "&"
}
},
{
"type": "FIELD",
"name": "right",
"content": {
"type": "SYMBOL",
"name": "_preproc_expression"
}
}
]
}
},
{
"type": "PREC_LEFT",
"value": 5,
"content": {
"type": "SEQ",
"members": [
{
"type": "FIELD",
"name": "left",
"content": {
"type": "SYMBOL",
"name": "_preproc_expression"
}
},
{
"type": "FIELD",
"name": "operator",
"content": {
"type": "STRING",
"value": "^"
}
},
{
"type": "FIELD",
"name": "right",
"content": {
"type": "SYMBOL",
"name": "_preproc_expression"
}
}
]
}
},
{
"type": "PREC_LEFT",
"value": 4,
"content": {
"type": "SEQ",
"members": [
{
"type": "FIELD",
"name": "left",
"content": {
"type": "SYMBOL",
"name": "_preproc_expression"
}
},
{
"type": "FIELD",
"name": "operator",
"content": {
"type": "STRING",
"value": "|"
}
},
{
"type": "FIELD",
"name": "right",
"content": {
"type": "SYMBOL",
"name": "_preproc_expression"
}
}
]
}
},
{
"type": "PREC_LEFT",
"value": 3,
"content": {
"type": "SEQ",
"members": [
{
"type": "FIELD",
"name": "left",
"content": {
"type": "SYMBOL",
"name": "_preproc_expression"
}
},
{
"type": "FIELD",
"name": "operator",
"content": {
"type": "STRING",
"value": "&&"
}
},
{
"type": "FIELD",
"name": "right",
"content": {
"type": "SYMBOL",
"name": "_preproc_expression"
}
}
]
}
},
{
"type": "PREC_LEFT",
"value": 2,
"content": {
"type": "SEQ",
"members": [
{
"type": "FIELD",
"name": "left",
"content": {
"type": "SYMBOL",
"name": "_preproc_expression"
}
},
{
"type": "FIELD",
"name": "operator",
"content": {
"type": "STRING",
"value": "||"
}
},
{
"type": "FIELD",
"name": "right",
"content": {
"type": "SYMBOL",
"name": "_preproc_expression"
}
}
]
}
}
]
},
"preproc_if": {
"type": "PREC",
"value": 0,
"content": {
"type": "SEQ",
"members": [
{
"type": "ALIAS",
"content": {
"type": "TOKEN",
"content": {
"type": "PREC",
"value": 1,
"content": {
"type": "PATTERN",
"value": "#[ \\t]*if"
}
}
},
"named": false,
"value": "#if"
},
{
"type": "FIELD",
"name": "condition",
"content": {
"type": "SYMBOL",
"name": "_preproc_expression"
}
},
{
"type": "IMMEDIATE_TOKEN",
"content": {
"type": "PATTERN",
"value": "\\r?\\n"
}
},
{
"type": "REPEAT",
"content": {
"type": "SYMBOL",
"name": "_top_level_item"
}
},
{
"type": "FIELD",
"name": "alternative",
"content": {
"type": "CHOICE",
"members": [
{
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "preproc_else"
},
{
"type": "SYMBOL",
"name": "preproc_elif"
}
]
},
{
"type": "BLANK"
}
]
}
},
{
"type": "ALIAS",
"content": {
"type": "TOKEN",
"content": {
"type": "PREC",
"value": 1,
"content": {
"type": "PATTERN",
"value": "#[ \\t]*endif"
}
}
},
"named": false,
"value": "#endif"
}
]
}
},
"preproc_ifdef": {
"type": "PREC",
"value": 0,
"content": {
"type": "SEQ",
"members": [
{
"type": "CHOICE",
"members": [
{
"type": "ALIAS",
"content": {
"type": "TOKEN",
"content": {
"type": "PREC",
"value": 1,
"content": {
"type": "PATTERN",
"value": "#[ \\t]*ifdef"
}
}
},
"named": false,
"value": "#ifdef"
},
{
"type": "ALIAS",
"content": {
"type": "TOKEN",
"content": {
"type": "PREC",
"value": 1,
"content": {
"type": "PATTERN",
"value": "#[ \\t]*ifndef"
}
}
},
"named": false,
"value": "#ifndef"
}
]
},
{
"type": "FIELD",
"name": "name",
"content": {
"type": "SYMBOL",
"name": "identifier"
}
},
{
"type": "REPEAT",
"content": {
"type": "SYMBOL",
"name": "_top_level_item"
}
},
{
"type": "FIELD",
"name": "alternative",
"content": {
"type": "CHOICE",
"members": [
{
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "preproc_else"
},
{
"type": "SYMBOL",
"name": "preproc_elif"
}
]
},
{
"type": "BLANK"
}
]
}
},
{
"type": "ALIAS",
"content": {
"type": "TOKEN",
"content": {
"type": "PREC",
"value": 1,
"content": {
"type": "PATTERN",
"value": "#[ \\t]*endif"
}
}
},
"named": false,
"value": "#endif"
}
]
}
},
"preproc_else": {
"type": "PREC",
"value": 0,
"content": {
"type": "SEQ",
"members": [
{
"type": "ALIAS",
"content": {
"type": "TOKEN",
"content": {
"type": "PREC",
"value": 1,
"content": {
"type": "PATTERN",
"value": "#[ \\t]*else"
}
}
},
"named": false,
"value": "#else"
},
{
"type": "REPEAT",
"content": {
"type": "SYMBOL",
"name": "_top_level_item"
}
}
]
}
},
"preproc_elif": {
"type": "PREC",
"value": 0,
"content": {
"type": "SEQ",
"members": [
{
"type": "ALIAS",
"content": {
"type": "TOKEN",
"content": {
"type": "PREC",
"value": 1,
"content": {
"type": "PATTERN",
"value": "#[ \\t]*elif"
}
}
},
"named": false,
"value": "#elif"
},
{
"type": "FIELD",
"name": "condition",
"content": {
"type": "SYMBOL",
"name": "_preproc_expression"
}
},
{
"type": "IMMEDIATE_TOKEN",
"content": {
"type": "PATTERN",
"value": "\\r?\\n"
}
},
{
"type": "REPEAT",
"content": {
"type": "SYMBOL",
"name": "_top_level_item"
}
},
{
"type": "FIELD",
"name": "alternative",
"content": {
"type": "CHOICE",
"members": [
{
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "preproc_else"
},
{
"type": "SYMBOL",
"name": "preproc_elif"
}
]
},
{
"type": "BLANK"
}
]
}
}
]
}
},
"preproc_if_in_statement": {
"type": "PREC",
"value": 0,
"content": {
"type": "SEQ",
"members": [
{
"type": "ALIAS",
"content": {
"type": "TOKEN",
"content": {
"type": "PREC",
"value": 1,
"content": {
"type": "PATTERN",
"value": "#[ \\t]*if"
}
}
},
"named": false,
"value": "#if"
},
{
"type": "FIELD",
"name": "condition",
"content": {
"type": "SYMBOL",
"name": "_preproc_expression"
}
},
{
"type": "IMMEDIATE_TOKEN",
"content": {
"type": "PATTERN",
"value": "\\r?\\n"
}
},
{
"type": "REPEAT",
"content": {
"type": "SYMBOL",
"name": "statement"
}
},
{
"type": "FIELD",
"name": "alternative",
"content": {
"type": "CHOICE",
"members": [
{
"type": "CHOICE",
"members": [
{
"type": "ALIAS",
"content": {
"type": "SYMBOL",
"name": "preproc_else_in_statement"
},
"named": true,
"value": "preproc_else"
},
{
"type": "ALIAS",
"content": {
"type": "SYMBOL",
"name": "preproc_elif_in_statement"
},
"named": true,
"value": "preproc_elif"
}
]
},
{
"type": "BLANK"
}
]
}
},
{
"type": "ALIAS",
"content": {
"type": "TOKEN",
"content": {
"type": "PREC",
"value": 1,
"content": {
"type": "PATTERN",
"value": "#[ \\t]*endif"
}
}
},
"named": false,
"value": "#endif"
}
]
}
},
"preproc_ifdef_in_statement": {
"type": "PREC",
"value": 0,
"content": {
"type": "SEQ",
"members": [
{
"type": "CHOICE",
"members": [
{
"type": "ALIAS",
"content": {
"type": "TOKEN",
"content": {
"type": "PREC",
"value": 1,
"content": {
"type": "PATTERN",
"value": "#[ \\t]*ifdef"
}
}
},
"named": false,
"value": "#ifdef"
},
{
"type": "ALIAS",
"content": {
"type": "TOKEN",
"content": {
"type": "PREC",
"value": 1,
"content": {
"type": "PATTERN",
"value": "#[ \\t]*ifndef"
}
}
},
"named": false,
"value": "#ifndef"
}
]
},
{
"type": "FIELD",
"name": "name",
"content": {
"type": "SYMBOL",
"name": "identifier"
}
},
{
"type": "REPEAT",
"content": {
"type": "SYMBOL",
"name": "statement"
}
},
{
"type": "FIELD",
"name": "alternative",
"content": {
"type": "CHOICE",
"members": [
{
"type": "CHOICE",
"members": [
{
"type": "ALIAS",
"content": {
"type": "SYMBOL",
"name": "preproc_else_in_statement"
},
"named": true,
"value": "preproc_else"
},
{
"type": "ALIAS",
"content": {
"type": "SYMBOL",
"name": "preproc_elif_in_statement"
},
"named": true,
"value": "preproc_elif"
}
]
},
{
"type": "BLANK"
}
]
}
},
{
"type": "ALIAS",
"content": {
"type": "TOKEN",
"content": {
"type": "PREC",
"value": 1,
"content": {
"type": "PATTERN",
"value": "#[ \\t]*endif"
}
}
},
"named": false,
"value": "#endif"
}
]
}
},
"preproc_else_in_statement": {
"type": "PREC",
"value": 0,
"content": {
"type": "SEQ",
"members": [
{
"type": "ALIAS",
"content": {
"type": "TOKEN",
"content": {
"type": "PREC",
"value": 1,
"content": {
"type": "PATTERN",
"value": "#[ \\t]*else"
}
}
},
"named": false,
"value": "#else"
},
{
"type": "REPEAT",
"content": {
"type": "SYMBOL",
"name": "statement"
}
}
]
}
},
"preproc_elif_in_statement": {
"type": "PREC",
"value": 0,
"content": {
"type": "SEQ",
"members": [
{
"type": "ALIAS",
"content": {
"type": "TOKEN",
"content": {
"type": "PREC",
"value": 1,
"content": {
"type": "PATTERN",
"value": "#[ \\t]*elif"
}
}
},
"named": false,
"value": "#elif"
},
{
"type": "FIELD",
"name": "condition",
"content": {
"type": "SYMBOL",
"name": "_preproc_expression"
}
},
{
"type": "IMMEDIATE_TOKEN",
"content": {
"type": "PATTERN",
"value": "\\r?\\n"
}
},
{
"type": "REPEAT",
"content": {
"type": "SYMBOL",
"name": "statement"
}
},
{
"type": "FIELD",
"name": "alternative",
"content": {
"type": "CHOICE",
"members": [
{
"type": "CHOICE",
"members": [
{
"type": "ALIAS",
"content": {
"type": "SYMBOL",
"name": "preproc_else_in_statement"
},
"named": true,
"value": "preproc_else"
},
{
"type": "ALIAS",
"content": {
"type": "SYMBOL",
"name": "preproc_elif_in_statement"
},
"named": true,
"value": "preproc_elif"
}
]
},
{
"type": "BLANK"
}
]
}
}
]
}
},
"preproc_if_in_struct_declaration": {
"type": "PREC",
"value": 0,
"content": {
"type": "SEQ",
"members": [
{
"type": "ALIAS",
"content": {
"type": "TOKEN",
"content": {
"type": "PREC",
"value": 1,
"content": {
"type": "PATTERN",
"value": "#[ \\t]*if"
}
}
},
"named": false,
"value": "#if"
},
{
"type": "FIELD",
"name": "condition",
"content": {
"type": "SYMBOL",
"name": "_preproc_expression"
}
},
{
"type": "IMMEDIATE_TOKEN",
"content": {
"type": "PATTERN",
"value": "\\r?\\n"
}
},
{
"type": "REPEAT",
"content": {
"type": "SYMBOL",
"name": "field_declaration"
}
},
{
"type": "FIELD",
"name": "alternative",
"content": {
"type": "CHOICE",
"members": [
{
"type": "CHOICE",
"members": [
{
"type": "ALIAS",
"content": {
"type": "SYMBOL",
"name": "preproc_else_in_struct_declaration"
},
"named": true,
"value": "preproc_else"
},
{
"type": "ALIAS",
"content": {
"type": "SYMBOL",
"name": "preproc_elif_in_struct_declaration"
},
"named": true,
"value": "preproc_elif"
}
]
},
{
"type": "BLANK"
}
]
}
},
{
"type": "ALIAS",
"content": {
"type": "TOKEN",
"content": {
"type": "PREC",
"value": 1,
"content": {
"type": "PATTERN",
"value": "#[ \\t]*endif"
}
}
},
"named": false,
"value": "#endif"
}
]
}
},
"preproc_ifdef_in_struct_declaration": {
"type": "PREC",
"value": 0,
"content": {
"type": "SEQ",
"members": [
{
"type": "CHOICE",
"members": [
{
"type": "ALIAS",
"content": {
"type": "TOKEN",
"content": {
"type": "PREC",
"value": 1,
"content": {
"type": "PATTERN",
"value": "#[ \\t]*ifdef"
}
}
},
"named": false,
"value": "#ifdef"
},
{
"type": "ALIAS",
"content": {
"type": "TOKEN",
"content": {
"type": "PREC",
"value": 1,
"content": {
"type": "PATTERN",
"value": "#[ \\t]*ifndef"
}
}
},
"named": false,
"value": "#ifndef"
}
]
},
{
"type": "FIELD",
"name": "name",
"content": {
"type": "SYMBOL",
"name": "identifier"
}
},
{
"type": "REPEAT",
"content": {
"type": "SYMBOL",
"name": "field_declaration"
}
},
{
"type": "FIELD",
"name": "alternative",
"content": {
"type": "CHOICE",
"members": [
{
"type": "CHOICE",
"members": [
{
"type": "ALIAS",
"content": {
"type": "SYMBOL",
"name": "preproc_else_in_struct_declaration"
},
"named": true,
"value": "preproc_else"
},
{
"type": "ALIAS",
"content": {
"type": "SYMBOL",
"name": "preproc_elif_in_struct_declaration"
},
"named": true,
"value": "preproc_elif"
}
]
},
{
"type": "BLANK"
}
]
}
},
{
"type": "ALIAS",
"content": {
"type": "TOKEN",
"content": {
"type": "PREC",
"value": 1,
"content": {
"type": "PATTERN",
"value": "#[ \\t]*endif"
}
}
},
"named": false,
"value": "#endif"
}
]
}
},
"preproc_else_in_struct_declaration": {
"type": "PREC",
"value": 0,
"content": {
"type": "SEQ",
"members": [
{
"type": "ALIAS",
"content": {
"type": "TOKEN",
"content": {
"type": "PREC",
"value": 1,
"content": {
"type": "PATTERN",
"value": "#[ \\t]*else"
}
}
},
"named": false,
"value": "#else"
},
{
"type": "REPEAT",
"content": {
"type": "SYMBOL",
"name": "field_declaration"
}
}
]
}
},
"preproc_elif_in_struct_declaration": {
"type": "PREC",
"value": 0,
"content": {
"type": "SEQ",
"members": [
{
"type": "ALIAS",
"content": {
"type": "TOKEN",
"content": {
"type": "PREC",
"value": 1,
"content": {
"type": "PATTERN",
"value": "#[ \\t]*elif"
}
}
},
"named": false,
"value": "#elif"
},
{
"type": "FIELD",
"name": "condition",
"content": {
"type": "SYMBOL",
"name": "_preproc_expression"
}
},
{
"type": "IMMEDIATE_TOKEN",
"content": {
"type": "PATTERN",
"value": "\\r?\\n"
}
},
{
"type": "REPEAT",
"content": {
"type": "SYMBOL",
"name": "field_declaration"
}
},
{
"type": "FIELD",
"name": "alternative",
"content": {
"type": "CHOICE",
"members": [
{
"type": "CHOICE",
"members": [
{
"type": "ALIAS",
"content": {
"type": "SYMBOL",
"name": "preproc_else_in_struct_declaration"
},
"named": true,
"value": "preproc_else"
},
{
"type": "ALIAS",
"content": {
"type": "SYMBOL",
"name": "preproc_elif_in_struct_declaration"
},
"named": true,
"value": "preproc_elif"
}
]
},
{
"type": "BLANK"
}
]
}
}
]
}
},
"macro_invocation": {
"type": "CHOICE",
"members": [
{
"type": "ALIAS",
"content": {
"type": "SYMBOL",
"name": "_macro_function_call"
},
"named": true,
"value": "function_call"
},
{
"type": "SYMBOL",
"name": "identifier"
}
]
},
"_macro_function_call": {
"type": "SEQ",
"members": [
{
"type": "FIELD",
"name": "function",
"content": {
"type": "SYMBOL",
"name": "identifier"
}
},
{
"type": "STRING",
"value": "("
},
{
"type": "CHOICE",
"members": [
{
"type": "FIELD",
"name": "arguments",
"content": {
"type": "SYMBOL",
"name": "macro_argument_list"
}
},
{
"type": "BLANK"
}
]
},
{
"type": "STRING",
"value": ")"
}
]
},
"macro_argument_list": {
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "macro_argument"
},
{
"type": "REPEAT",
"content": {
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": ","
},
{
"type": "SYMBOL",
"name": "macro_argument"
}
]
}
}
]
},
"macro_argument": {
"type": "REPEAT1",
"content": {
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "_macro_paren_group"
},
{
"type": "SYMBOL",
"name": "_macro_token"
}
]
}
},
"_macro_paren_group": {
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": "("
},
{
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "_macro_paren_content"
},
{
"type": "BLANK"
}
]
},
{
"type": "STRING",
"value": ")"
}
]
},
"_macro_paren_content": {
"type": "REPEAT1",
"content": {
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "_macro_paren_group"
},
{
"type": "SYMBOL",
"name": "_macro_token"
},
{
"type": "STRING",
"value": ","
}
]
}
},
"_macro_token": {
"type": "TOKEN",
"content": {
"type": "PREC",
"value": -1,
"content": {
"type": "PATTERN",
"value": "[^\\s,()]+"
}
}
},
"preproc_cpp_language_macro": {
"type": "STRING",
"value": "__cplusplus"
},
"preproc_c_language_macro": {
"type": "CHOICE",
"members": [
{
"type": "STRING",
"value": "__STDC__"
},
{
"type": "STRING",
"value": "__GNUC__"
},
{
"type": "STRING",
"value": "__clang__"
},
{
"type": "STRING",
"value": "_MSC_VER"
}
]
},
"preproc_cpp_language_check": {
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "preproc_cpp_language_macro"
},
{
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": "defined"
},
{
"type": "SYMBOL",
"name": "preproc_cpp_language_macro"
}
]
},
{
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": "defined"
},
{
"type": "STRING",
"value": "("
},
{
"type": "SYMBOL",
"name": "preproc_cpp_language_macro"
},
{
"type": "STRING",
"value": ")"
}
]
}
]
},
"preproc_c_language_check": {
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "preproc_c_language_macro"
},
{
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": "defined"
},
{
"type": "SYMBOL",
"name": "preproc_c_language_macro"
}
]
},
{
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": "defined"
},
{
"type": "STRING",
"value": "("
},
{
"type": "SYMBOL",
"name": "preproc_c_language_macro"
},
{
"type": "STRING",
"value": ")"
}
]
}
]
},
"preproc_cpp_condition": {
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "preproc_cpp_language_check"
},
{
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": "("
},
{
"type": "SYMBOL",
"name": "preproc_cpp_language_check"
},
{
"type": "STRING",
"value": "||"
},
{
"type": "SYMBOL",
"name": "preproc_c_language_check"
},
{
"type": "STRING",
"value": ")"
}
]
},
{
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": "("
},
{
"type": "SYMBOL",
"name": "preproc_c_language_check"
},
{
"type": "STRING",
"value": "||"
},
{
"type": "SYMBOL",
"name": "preproc_cpp_language_check"
},
{
"type": "STRING",
"value": ")"
}
]
},
{
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": "("
},
{
"type": "SYMBOL",
"name": "preproc_cpp_language_check"
},
{
"type": "STRING",
"value": "&&"
},
{
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": "!"
},
{
"type": "SYMBOL",
"name": "preproc_c_language_check"
}
]
},
{
"type": "STRING",
"value": ")"
}
]
},
{
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": "("
},
{
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": "!"
},
{
"type": "SYMBOL",
"name": "preproc_c_language_check"
}
]
},
{
"type": "STRING",
"value": "&&"
},
{
"type": "SYMBOL",
"name": "preproc_cpp_language_check"
},
{
"type": "STRING",
"value": ")"
}
]
},
{
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "preproc_cpp_language_check"
},
{
"type": "STRING",
"value": "||"
},
{
"type": "SYMBOL",
"name": "preproc_c_language_check"
}
]
},
{
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "preproc_c_language_check"
},
{
"type": "STRING",
"value": "||"
},
{
"type": "SYMBOL",
"name": "preproc_cpp_language_check"
}
]
},
{
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "preproc_cpp_language_check"
},
{
"type": "STRING",
"value": "&&"
},
{
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": "!"
},
{
"type": "SYMBOL",
"name": "preproc_c_language_check"
}
]
}
]
},
{
"type": "SEQ",
"members": [
{
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": "!"
},
{
"type": "SYMBOL",
"name": "preproc_c_language_check"
}
]
},
{
"type": "STRING",
"value": "&&"
},
{
"type": "SYMBOL",
"name": "preproc_cpp_language_check"
}
]
}
]
},
"preproc_c_condition": {
"type": "SYMBOL",
"name": "preproc_c_language_check"
},
"preproc_not_cpp_condition": {
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": "!"
},
{
"type": "SYMBOL",
"name": "preproc_cpp_language_check"
}
]
},
"preproc_not_c_condition": {
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": "!"
},
{
"type": "SYMBOL",
"name": "preproc_c_language_check"
}
]
},
"multilingual_code_line": {
"type": "TOKEN",
"content": {
"type": "PREC",
"value": -1,
"content": {
"type": "PATTERN",
"value": "(?:[^\\n]+\\r?\\n?|\\r?\\n)"
}
}
},
"multilingual_cpp_code_block": {
"type": "REPEAT1",
"content": {
"type": "SYMBOL",
"name": "multilingual_code_line"
}
},
"multilingual_c_code_block": {
"type": "REPEAT1",
"content": {
"type": "SYMBOL",
"name": "multilingual_code_line"
}
},
"preproc_cpp_else": {
"type": "SEQ",
"members": [
{
"type": "ALIAS",
"content": {
"type": "TOKEN",
"content": {
"type": "PREC",
"value": 1,
"content": {
"type": "PATTERN",
"value": "#[ \\t]*else"
}
}
},
"named": false,
"value": "#else"
},
{
"type": "FIELD",
"name": "body",
"content": {
"type": "SYMBOL",
"name": "multilingual_cpp_code_block"
}
}
]
},
"preproc_c_else": {
"type": "SEQ",
"members": [
{
"type": "ALIAS",
"content": {
"type": "TOKEN",
"content": {
"type": "PREC",
"value": 1,
"content": {
"type": "PATTERN",
"value": "#[ \\t]*else"
}
}
},
"named": false,
"value": "#else"
},
{
"type": "FIELD",
"name": "body",
"content": {
"type": "SYMBOL",
"name": "multilingual_c_code_block"
}
}
]
},
"preproc_glsl_else": {
"type": "SEQ",
"members": [
{
"type": "ALIAS",
"content": {
"type": "TOKEN",
"content": {
"type": "PREC",
"value": 1,
"content": {
"type": "PATTERN",
"value": "#[ \\t]*else"
}
}
},
"named": false,
"value": "#else"
},
{
"type": "REPEAT",
"content": {
"type": "SYMBOL",
"name": "_top_level_item"
}
}
]
},
"_found_cpp_marker": {
"type": "SEQ",
"members": [
{
"type": "FIELD",
"name": "condition",
"content": {
"type": "SYMBOL",
"name": "preproc_cpp_condition"
}
},
{
"type": "IMMEDIATE_TOKEN",
"content": {
"type": "PATTERN",
"value": "\\r?\\n"
}
},
{
"type": "FIELD",
"name": "consequence",
"content": {
"type": "SYMBOL",
"name": "multilingual_cpp_code_block"
}
}
]
},
"_found_c_marker": {
"type": "SEQ",
"members": [
{
"type": "FIELD",
"name": "condition",
"content": {
"type": "SYMBOL",
"name": "preproc_c_condition"
}
},
{
"type": "IMMEDIATE_TOKEN",
"content": {
"type": "PATTERN",
"value": "\\r?\\n"
}
},
{
"type": "FIELD",
"name": "consequence",
"content": {
"type": "SYMBOL",
"name": "multilingual_c_code_block"
}
}
]
},
"_found_not_cpp_marker": {
"type": "SEQ",
"members": [
{
"type": "FIELD",
"name": "condition",
"content": {
"type": "SYMBOL",
"name": "preproc_not_cpp_condition"
}
},
{
"type": "REPEAT",
"content": {
"type": "SYMBOL",
"name": "_top_level_item"
}
},
{
"type": "FIELD",
"name": "alternative",
"content": {
"type": "CHOICE",
"members": [
{
"type": "ALIAS",
"content": {
"type": "SYMBOL",
"name": "preproc_cpp_else"
},
"named": true,
"value": "preproc_else"
},
{
"type": "BLANK"
}
]
}
}
]
},
"_found_not_c_marker": {
"type": "SEQ",
"members": [
{
"type": "FIELD",
"name": "condition",
"content": {
"type": "SYMBOL",
"name": "preproc_not_c_condition"
}
},
{
"type": "REPEAT",
"content": {
"type": "SYMBOL",
"name": "_top_level_item"
}
},
{
"type": "FIELD",
"name": "alternative",
"content": {
"type": "CHOICE",
"members": [
{
"type": "ALIAS",
"content": {
"type": "SYMBOL",
"name": "preproc_c_else"
},
"named": true,
"value": "preproc_else"
},
{
"type": "BLANK"
}
]
}
}
]
},
"preproc_language_ifdef": {
"type": "SEQ",
"members": [
{
"type": "ALIAS",
"content": {
"type": "TOKEN",
"content": {
"type": "PREC",
"value": 1,
"content": {
"type": "PATTERN",
"value": "#[ \\t]*ifdef"
}
}
},
"named": false,
"value": "#ifdef"
},
{
"type": "CHOICE",
"members": [
{
"type": "SEQ",
"members": [
{
"type": "FIELD",
"name": "name",
"content": {
"type": "SYMBOL",
"name": "preproc_cpp_language_macro"
}
},
{
"type": "FIELD",
"name": "consequence",
"content": {
"type": "SYMBOL",
"name": "multilingual_cpp_code_block"
}
},
{
"type": "FIELD",
"name": "alternative",
"content": {
"type": "CHOICE",
"members": [
{
"type": "ALIAS",
"content": {
"type": "SYMBOL",
"name": "preproc_glsl_else"
},
"named": true,
"value": "preproc_else"
},
{
"type": "BLANK"
}
]
}
}
]
},
{
"type": "SEQ",
"members": [
{
"type": "FIELD",
"name": "name",
"content": {
"type": "SYMBOL",
"name": "preproc_c_language_macro"
}
},
{
"type": "FIELD",
"name": "consequence",
"content": {
"type": "SYMBOL",
"name": "multilingual_c_code_block"
}
},
{
"type": "FIELD",
"name": "alternative",
"content": {
"type": "CHOICE",
"members": [
{
"type": "ALIAS",
"content": {
"type": "SYMBOL",
"name": "preproc_glsl_else"
},
"named": true,
"value": "preproc_else"
},
{
"type": "BLANK"
}
]
}
}
]
}
]
},
{
"type": "ALIAS",
"content": {
"type": "TOKEN",
"content": {
"type": "PREC",
"value": 1,
"content": {
"type": "PATTERN",
"value": "#[ \\t]*endif"
}
}
},
"named": false,
"value": "#endif"
}
]
},
"preproc_language_ifndef": {
"type": "SEQ",
"members": [
{
"type": "ALIAS",
"content": {
"type": "TOKEN",
"content": {
"type": "PREC",
"value": 1,
"content": {
"type": "PATTERN",
"value": "#[ \\t]*ifndef"
}
}
},
"named": false,
"value": "#ifndef"
},
{
"type": "CHOICE",
"members": [
{
"type": "SEQ",
"members": [
{
"type": "FIELD",
"name": "name",
"content": {
"type": "SYMBOL",
"name": "preproc_cpp_language_macro"
}
},
{
"type": "REPEAT",
"content": {
"type": "SYMBOL",
"name": "_top_level_item"
}
},
{
"type": "FIELD",
"name": "alternative",
"content": {
"type": "CHOICE",
"members": [
{
"type": "ALIAS",
"content": {
"type": "SYMBOL",
"name": "preproc_cpp_else"
},
"named": true,
"value": "preproc_else"
},
{
"type": "BLANK"
}
]
}
}
]
},
{
"type": "SEQ",
"members": [
{
"type": "FIELD",
"name": "name",
"content": {
"type": "SYMBOL",
"name": "preproc_c_language_macro"
}
},
{
"type": "REPEAT",
"content": {
"type": "SYMBOL",
"name": "_top_level_item"
}
},
{
"type": "FIELD",
"name": "alternative",
"content": {
"type": "CHOICE",
"members": [
{
"type": "ALIAS",
"content": {
"type": "SYMBOL",
"name": "preproc_c_else"
},
"named": true,
"value": "preproc_else"
},
{
"type": "BLANK"
}
]
}
}
]
}
]
},
{
"type": "ALIAS",
"content": {
"type": "TOKEN",
"content": {
"type": "PREC",
"value": 1,
"content": {
"type": "PATTERN",
"value": "#[ \\t]*endif"
}
}
},
"named": false,
"value": "#endif"
}
]
},
"preproc_language_elif": {
"type": "SEQ",
"members": [
{
"type": "ALIAS",
"content": {
"type": "TOKEN",
"content": {
"type": "PREC",
"value": 1,
"content": {
"type": "PATTERN",
"value": "#[ \\t]*elif"
}
}
},
"named": false,
"value": "#elif"
},
{
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "_found_cpp_marker"
},
{
"type": "SYMBOL",
"name": "_found_c_marker"
}
]
},
{
"type": "FIELD",
"name": "alternative",
"content": {
"type": "CHOICE",
"members": [
{
"type": "CHOICE",
"members": [
{
"type": "ALIAS",
"content": {
"type": "SYMBOL",
"name": "preproc_language_elif"
},
"named": true,
"value": "preproc_elif"
},
{
"type": "ALIAS",
"content": {
"type": "SYMBOL",
"name": "preproc_glsl_else"
},
"named": true,
"value": "preproc_else"
}
]
},
{
"type": "BLANK"
}
]
}
}
]
},
"preproc_language_if": {
"type": "SEQ",
"members": [
{
"type": "ALIAS",
"content": {
"type": "TOKEN",
"content": {
"type": "PREC",
"value": 1,
"content": {
"type": "PATTERN",
"value": "#[ \\t]*if"
}
}
},
"named": false,
"value": "#if"
},
{
"type": "CHOICE",
"members": [
{
"type": "SEQ",
"members": [
{
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "_found_cpp_marker"
},
{
"type": "SYMBOL",
"name": "_found_c_marker"
}
]
},
{
"type": "FIELD",
"name": "alternative",
"content": {
"type": "CHOICE",
"members": [
{
"type": "CHOICE",
"members": [
{
"type": "ALIAS",
"content": {
"type": "SYMBOL",
"name": "preproc_language_elif"
},
"named": true,
"value": "preproc_elif"
},
{
"type": "ALIAS",
"content": {
"type": "SYMBOL",
"name": "preproc_glsl_else"
},
"named": true,
"value": "preproc_else"
}
]
},
{
"type": "BLANK"
}
]
}
}
]
},
{
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "_found_not_cpp_marker"
},
{
"type": "SYMBOL",
"name": "_found_not_c_marker"
}
]
}
]
},
{
"type": "ALIAS",
"content": {
"type": "TOKEN",
"content": {
"type": "PREC",
"value": 1,
"content": {
"type": "PATTERN",
"value": "#[ \\t]*endif"
}
}
},
"named": false,
"value": "#endif"
}
]
},
"demote_statement": {
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": "demote"
},
{
"type": "STRING",
"value": ";"
}
]
},
"terminate_invocation_statement": {
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": "terminateInvocation"
},
{
"type": "STRING",
"value": ";"
}
]
}
},
"extras": [
{
"type": "PATTERN",
"value": "\\s|\\\\\\r?\\n"
},
{
"type": "SYMBOL",
"name": "comment"
}
],
"conflicts": [
[
"identifier_list",
"_type_identifier"
],
[
"_type_identifier",
"macro_invocation"
],
[
"_type_specifier_nonarray",
"macro_invocation"
],
[
"_primary_expression",
"_type_identifier",
"macro_invocation",
"_macro_function_call"
],
[
"_primary_expression",
"macro_invocation"
],
[
"_primary_expression",
"_type_identifier",
"macro_invocation"
],
[
"type_qualifier"
],
[
"expression_statement",
"macro_invocation"
],
[
"expression_statement",
"_type_specifier_nonarray",
"macro_invocation"
]
],
"precedences": [],
"externals": [],
"inline": [],
"supertypes": [
"statement",
"simple_statement",
"single_type_qualifier"
],
"reserved": {}
}