meta-language 1.0.0

A self-describing links-network core for lossless language representation
Documentation
(grammar (start translation_unit) (matching longest) (settling tokens precedence dynamic ambiguity))
(extra (choice unordered (class plain (char %20) (char %09) (char %0A) (char %0D) (char %0C) (char %0B)) (seq (literal %5C) (optional (literal %0D)) (literal %0A))))
(extra (ref comment))
(conflict type_specifier declarator)
(conflict type_specifier declarator macro_type_specifier)
(conflict type_specifier expression)
(conflict type_specifier expression macro_type_specifier)
(conflict type_specifier macro_type_specifier)
(conflict type_specifier sized_type_specifier)
(conflict sized_type_specifier)
(conflict attributed_statement)
(conflict declaration_modifiers attributed_statement)
(conflict enumeration_specifier)
(conflict type_specifier old_style_parameter_list)
(conflict parameter_list old_style_parameter_list)
(conflict function_declarator function_declaration_declarator)
(conflict block_item statement)
(conflict top_level_item top_level_statement)
(conflict type_specifier top_level_expression_statement)
(conflict type_qualifier extension_expression)
(rule translation_unit normal (repeat0 (ref top_level_item)) (concept grammar.translation-unit))
(rule top_level_item silent (choice unordered (ref function_definition) (alias function_definition (ref old_style_function_definition)) (ref linkage_specification) (ref declaration) (ref top_level_statement) (ref attributed_statement) (ref type_definition) (ref empty_declaration) (ref preprocessor_if) (ref preprocessor_if_defined) (ref preprocessor_include) (ref preprocessor_definition) (ref preprocessor_function_definition) (ref preprocessor_call)) (concept grammar.top-level-item) (source-names (tree-sitter _top_level_item)))
(rule block_item silent (choice unordered (ref function_definition) (alias function_definition (ref old_style_function_definition)) (ref linkage_specification) (ref declaration) (ref statement) (ref attributed_statement) (ref type_definition) (ref empty_declaration) (ref preprocessor_if) (ref preprocessor_if_defined) (ref preprocessor_include) (ref preprocessor_definition) (ref preprocessor_function_definition) (ref preprocessor_call)) (concept grammar.block-item) (source-names (tree-sitter _block_item)))
(rule preprocessor_include normal (seq (alias %27%23include (token (seq (literal %23) (repeat0 (class plain (char %20) (char %09))) (literal include)))) (capture labeled path (choice unordered (ref string_literal) (ref system_library_string) (ref identifier) (alias call_expression (ref preprocessor_call_expression)))) (alias unnamed_token (immediateToken (seq (optional (literal %0D)) (literal %0A))))) (concept grammar.preprocessor-include-directive) (source-names (tree-sitter preproc_include)))
(rule preprocessor_definition normal (seq (alias %27%23define (token (seq (literal %23) (repeat0 (class plain (char %20) (char %09))) (literal define)))) (capture labeled name (ref identifier)) (capture labeled value (optional (ref preprocessor_argument))) (alias unnamed_token (immediateToken (seq (optional (literal %0D)) (literal %0A))))) (concept grammar.preprocessor-definition) (source-names (tree-sitter preproc_def)))
(rule preprocessor_function_definition normal (seq (alias %27%23define (token (seq (literal %23) (repeat0 (class plain (char %20) (char %09))) (literal define)))) (capture labeled name (ref identifier)) (capture labeled parameters (ref preprocessor_parameters)) (capture labeled value (optional (ref preprocessor_argument))) (alias unnamed_token (immediateToken (seq (optional (literal %0D)) (literal %0A))))) (concept grammar.preprocessor-function-definition) (source-names (tree-sitter preproc_function_def)))
(rule preprocessor_parameters normal (seq (immediateToken (literal %28)) (optional (seq (choice unordered (ref identifier) (literal ...)) (repeat0 (seq (literal %2C) (choice unordered (ref identifier) (literal ...)))))) (literal %29)) (concept grammar.preprocessor-parameters) (source-names (tree-sitter preproc_params)))
(rule preprocessor_call normal (seq (capture labeled directive (ref preprocessor_directive)) (capture labeled argument (optional (ref preprocessor_argument))) (alias unnamed_token (immediateToken (seq (optional (literal %0D)) (literal %0A))))) (concept grammar.preprocessor-call) (source-names (tree-sitter preproc_call)))
(rule preprocessor_if normal (precedence 0 none (seq (alias %27%23if (token (seq (literal %23) (repeat0 (class plain (char %20) (char %09))) (literal if)))) (capture labeled condition (ref preprocessor_expression)) (literal %0A) (repeat0 (ref block_item)) (capture labeled alternative (optional (choice unordered (ref preprocessor_else) (ref preprocessor_else_if) (ref preprocessor_else_if_defined)))) (alias %27%23endif (token (seq (literal %23) (repeat0 (class plain (char %20) (char %09))) (literal endif)))))) (concept grammar.preprocessor-if-directive) (source-names (tree-sitter preproc_if)))
(rule preprocessor_if_defined normal (precedence 0 none (seq (choice unordered (alias %27%23ifdef (token (seq (literal %23) (repeat0 (class plain (char %20) (char %09))) (literal ifdef)))) (alias %27%23ifndef (token (seq (literal %23) (repeat0 (class plain (char %20) (char %09))) (literal ifndef))))) (capture labeled name (ref identifier)) (repeat0 (ref block_item)) (capture labeled alternative (optional (choice unordered (ref preprocessor_else) (ref preprocessor_else_if) (ref preprocessor_else_if_defined)))) (alias %27%23endif (token (seq (literal %23) (repeat0 (class plain (char %20) (char %09))) (literal endif)))))) (concept grammar.preprocessor-if-defined-directive) (source-names (tree-sitter preproc_ifdef)))
(rule preprocessor_else normal (precedence 0 none (seq (alias %27%23else (token (seq (literal %23) (repeat0 (class plain (char %20) (char %09))) (literal else)))) (repeat0 (ref block_item)))) (concept grammar.preprocessor-else-branch) (source-names (tree-sitter preproc_else)))
(rule preprocessor_else_if normal (precedence 0 none (seq (alias %27%23elif (token (seq (literal %23) (repeat0 (class plain (char %20) (char %09))) (literal elif)))) (capture labeled condition (ref preprocessor_expression)) (literal %0A) (repeat0 (ref block_item)) (capture labeled alternative (optional (choice unordered (ref preprocessor_else) (ref preprocessor_else_if) (ref preprocessor_else_if_defined)))))) (concept grammar.preprocessor-else-if-branch) (source-names (tree-sitter preproc_elif)))
(rule preprocessor_else_if_defined normal (precedence 0 none (seq (choice unordered (alias %27%23elifdef (token (seq (literal %23) (repeat0 (class plain (char %20) (char %09))) (literal elifdef)))) (alias %27%23elifndef (token (seq (literal %23) (repeat0 (class plain (char %20) (char %09))) (literal elifndef))))) (capture labeled name (ref identifier)) (repeat0 (ref block_item)) (capture labeled alternative (optional (choice unordered (ref preprocessor_else) (ref preprocessor_else_if) (ref preprocessor_else_if_defined)))))) (concept grammar.preprocessor-else-if-defined-branch) (source-names (tree-sitter preproc_elifdef)))
(rule preprocessor_if_in_field_declaration_list normal (precedence 0 none (seq (alias %27%23if (token (seq (literal %23) (repeat0 (class plain (char %20) (char %09))) (literal if)))) (capture labeled condition (ref preprocessor_expression)) (literal %0A) (repeat0 (ref field_declaration_list_item)) (capture labeled alternative (optional (choice unordered (alias preprocessor_else (ref preprocessor_else_in_field_declaration_list)) (alias preprocessor_else_if (ref preprocessor_else_if_in_field_declaration_list)) (alias preprocessor_else_if_defined (ref preprocessor_else_if_defined_in_field_declaration_list))))) (alias %27%23endif (token (seq (literal %23) (repeat0 (class plain (char %20) (char %09))) (literal endif)))))) (concept grammar.preprocessor-if-in-field-declaration-list) (source-names (tree-sitter preproc_if_in_field_declaration_list)))
(rule preprocessor_if_defined_in_field_declaration_list normal (precedence 0 none (seq (choice unordered (alias %27%23ifdef (token (seq (literal %23) (repeat0 (class plain (char %20) (char %09))) (literal ifdef)))) (alias %27%23ifndef (token (seq (literal %23) (repeat0 (class plain (char %20) (char %09))) (literal ifndef))))) (capture labeled name (ref identifier)) (repeat0 (ref field_declaration_list_item)) (capture labeled alternative (optional (choice unordered (alias preprocessor_else (ref preprocessor_else_in_field_declaration_list)) (alias preprocessor_else_if (ref preprocessor_else_if_in_field_declaration_list)) (alias preprocessor_else_if_defined (ref preprocessor_else_if_defined_in_field_declaration_list))))) (alias %27%23endif (token (seq (literal %23) (repeat0 (class plain (char %20) (char %09))) (literal endif)))))) (concept grammar.preprocessor-if-defined-in-field-declaration-list) (source-names (tree-sitter preproc_ifdef_in_field_declaration_list)))
(rule preprocessor_else_in_field_declaration_list normal (precedence 0 none (seq (alias %27%23else (token (seq (literal %23) (repeat0 (class plain (char %20) (char %09))) (literal else)))) (repeat0 (ref field_declaration_list_item)))) (concept grammar.preprocessor-else-in-field-declaration-list) (source-names (tree-sitter preproc_else_in_field_declaration_list)))
(rule preprocessor_else_if_in_field_declaration_list normal (precedence 0 none (seq (alias %27%23elif (token (seq (literal %23) (repeat0 (class plain (char %20) (char %09))) (literal elif)))) (capture labeled condition (ref preprocessor_expression)) (literal %0A) (repeat0 (ref field_declaration_list_item)) (capture labeled alternative (optional (choice unordered (alias preprocessor_else (ref preprocessor_else_in_field_declaration_list)) (alias preprocessor_else_if (ref preprocessor_else_if_in_field_declaration_list)) (alias preprocessor_else_if_defined (ref preprocessor_else_if_defined_in_field_declaration_list))))))) (concept grammar.preprocessor-else-if-in-field-declaration-list) (source-names (tree-sitter preproc_elif_in_field_declaration_list)))
(rule preprocessor_else_if_defined_in_field_declaration_list normal (precedence 0 none (seq (choice unordered (alias %27%23elifdef (token (seq (literal %23) (repeat0 (class plain (char %20) (char %09))) (literal elifdef)))) (alias %27%23elifndef (token (seq (literal %23) (repeat0 (class plain (char %20) (char %09))) (literal elifndef))))) (capture labeled name (ref identifier)) (repeat0 (ref field_declaration_list_item)) (capture labeled alternative (optional (choice unordered (alias preprocessor_else (ref preprocessor_else_in_field_declaration_list)) (alias preprocessor_else_if (ref preprocessor_else_if_in_field_declaration_list)) (alias preprocessor_else_if_defined (ref preprocessor_else_if_defined_in_field_declaration_list))))))) (concept grammar.preprocessor-else-if-defined-in-field-declaration-list) (source-names (tree-sitter preproc_elifdef_in_field_declaration_list)))
(rule preprocessor_if_in_enumerator_list normal (precedence 0 none (seq (alias %27%23if (token (seq (literal %23) (repeat0 (class plain (char %20) (char %09))) (literal if)))) (capture labeled condition (ref preprocessor_expression)) (literal %0A) (repeat0 (seq (ref enumerator) (literal %2C))) (capture labeled alternative (optional (choice unordered (alias preprocessor_else (ref preprocessor_else_in_enumerator_list)) (alias preprocessor_else_if (ref preprocessor_else_if_in_enumerator_list)) (alias preprocessor_else_if_defined (ref preprocessor_else_if_defined_in_enumerator_list))))) (alias %27%23endif (token (seq (literal %23) (repeat0 (class plain (char %20) (char %09))) (literal endif)))))) (concept grammar.preprocessor-if-in-enumerator-list) (source-names (tree-sitter preproc_if_in_enumerator_list)))
(rule preprocessor_if_defined_in_enumerator_list normal (precedence 0 none (seq (choice unordered (alias %27%23ifdef (token (seq (literal %23) (repeat0 (class plain (char %20) (char %09))) (literal ifdef)))) (alias %27%23ifndef (token (seq (literal %23) (repeat0 (class plain (char %20) (char %09))) (literal ifndef))))) (capture labeled name (ref identifier)) (repeat0 (seq (ref enumerator) (literal %2C))) (capture labeled alternative (optional (choice unordered (alias preprocessor_else (ref preprocessor_else_in_enumerator_list)) (alias preprocessor_else_if (ref preprocessor_else_if_in_enumerator_list)) (alias preprocessor_else_if_defined (ref preprocessor_else_if_defined_in_enumerator_list))))) (alias %27%23endif (token (seq (literal %23) (repeat0 (class plain (char %20) (char %09))) (literal endif)))))) (concept grammar.preprocessor-if-defined-in-enumerator-list) (source-names (tree-sitter preproc_ifdef_in_enumerator_list)))
(rule preprocessor_else_in_enumerator_list normal (precedence 0 none (seq (alias %27%23else (token (seq (literal %23) (repeat0 (class plain (char %20) (char %09))) (literal else)))) (repeat0 (seq (ref enumerator) (literal %2C))))) (concept grammar.preprocessor-else-in-enumerator-list) (source-names (tree-sitter preproc_else_in_enumerator_list)))
(rule preprocessor_else_if_in_enumerator_list normal (precedence 0 none (seq (alias %27%23elif (token (seq (literal %23) (repeat0 (class plain (char %20) (char %09))) (literal elif)))) (capture labeled condition (ref preprocessor_expression)) (literal %0A) (repeat0 (seq (ref enumerator) (literal %2C))) (capture labeled alternative (optional (choice unordered (alias preprocessor_else (ref preprocessor_else_in_enumerator_list)) (alias preprocessor_else_if (ref preprocessor_else_if_in_enumerator_list)) (alias preprocessor_else_if_defined (ref preprocessor_else_if_defined_in_enumerator_list))))))) (concept grammar.preprocessor-else-if-in-enumerator-list) (source-names (tree-sitter preproc_elif_in_enumerator_list)))
(rule preprocessor_else_if_defined_in_enumerator_list normal (precedence 0 none (seq (choice unordered (alias %27%23elifdef (token (seq (literal %23) (repeat0 (class plain (char %20) (char %09))) (literal elifdef)))) (alias %27%23elifndef (token (seq (literal %23) (repeat0 (class plain (char %20) (char %09))) (literal elifndef))))) (capture labeled name (ref identifier)) (repeat0 (seq (ref enumerator) (literal %2C))) (capture labeled alternative (optional (choice unordered (alias preprocessor_else (ref preprocessor_else_in_enumerator_list)) (alias preprocessor_else_if (ref preprocessor_else_if_in_enumerator_list)) (alias preprocessor_else_if_defined (ref preprocessor_else_if_defined_in_enumerator_list))))))) (concept grammar.preprocessor-else-if-defined-in-enumerator-list) (source-names (tree-sitter preproc_elifdef_in_enumerator_list)))
(rule preprocessor_if_in_enumerator_list_no_comma normal (precedence -1 none (seq (alias %27%23if (token (seq (literal %23) (repeat0 (class plain (char %20) (char %09))) (literal if)))) (capture labeled condition (ref preprocessor_expression)) (literal %0A) (repeat0 (ref enumerator)) (capture labeled alternative (optional (choice unordered (alias preprocessor_else (ref preprocessor_else_in_enumerator_list_no_comma)) (alias preprocessor_else_if (ref preprocessor_else_if_in_enumerator_list_no_comma)) (alias preprocessor_else_if_defined (ref preprocessor_else_if_defined_in_enumerator_list_no_comma))))) (alias %27%23endif (token (seq (literal %23) (repeat0 (class plain (char %20) (char %09))) (literal endif)))))) (concept grammar.preprocessor-if-in-enumerator-list-no-comma) (source-names (tree-sitter preproc_if_in_enumerator_list_no_comma)))
(rule preprocessor_if_defined_in_enumerator_list_no_comma normal (precedence -1 none (seq (choice unordered (alias %27%23ifdef (token (seq (literal %23) (repeat0 (class plain (char %20) (char %09))) (literal ifdef)))) (alias %27%23ifndef (token (seq (literal %23) (repeat0 (class plain (char %20) (char %09))) (literal ifndef))))) (capture labeled name (ref identifier)) (repeat0 (ref enumerator)) (capture labeled alternative (optional (choice unordered (alias preprocessor_else (ref preprocessor_else_in_enumerator_list_no_comma)) (alias preprocessor_else_if (ref preprocessor_else_if_in_enumerator_list_no_comma)) (alias preprocessor_else_if_defined (ref preprocessor_else_if_defined_in_enumerator_list_no_comma))))) (alias %27%23endif (token (seq (literal %23) (repeat0 (class plain (char %20) (char %09))) (literal endif)))))) (concept grammar.preprocessor-if-defined-in-enumerator-list-no-comma) (source-names (tree-sitter preproc_ifdef_in_enumerator_list_no_comma)))
(rule preprocessor_else_in_enumerator_list_no_comma normal (precedence -1 none (seq (alias %27%23else (token (seq (literal %23) (repeat0 (class plain (char %20) (char %09))) (literal else)))) (repeat0 (ref enumerator)))) (concept grammar.preprocessor-else-in-enumerator-list-no-comma) (source-names (tree-sitter preproc_else_in_enumerator_list_no_comma)))
(rule preprocessor_else_if_in_enumerator_list_no_comma normal (precedence -1 none (seq (alias %27%23elif (token (seq (literal %23) (repeat0 (class plain (char %20) (char %09))) (literal elif)))) (capture labeled condition (ref preprocessor_expression)) (literal %0A) (repeat0 (ref enumerator)) (capture labeled alternative (optional (choice unordered (alias preprocessor_else (ref preprocessor_else_in_enumerator_list_no_comma)) (alias preprocessor_else_if (ref preprocessor_else_if_in_enumerator_list_no_comma)) (alias preprocessor_else_if_defined (ref preprocessor_else_if_defined_in_enumerator_list_no_comma))))))) (concept grammar.preprocessor-else-if-in-enumerator-list-no-comma) (source-names (tree-sitter preproc_elif_in_enumerator_list_no_comma)))
(rule preprocessor_else_if_defined_in_enumerator_list_no_comma normal (precedence -1 none (seq (choice unordered (alias %27%23elifdef (token (seq (literal %23) (repeat0 (class plain (char %20) (char %09))) (literal elifdef)))) (alias %27%23elifndef (token (seq (literal %23) (repeat0 (class plain (char %20) (char %09))) (literal elifndef))))) (capture labeled name (ref identifier)) (repeat0 (ref enumerator)) (capture labeled alternative (optional (choice unordered (alias preprocessor_else (ref preprocessor_else_in_enumerator_list_no_comma)) (alias preprocessor_else_if (ref preprocessor_else_if_in_enumerator_list_no_comma)) (alias preprocessor_else_if_defined (ref preprocessor_else_if_defined_in_enumerator_list_no_comma))))))) (concept grammar.preprocessor-else-if-defined-in-enumerator-list-no-comma) (source-names (tree-sitter preproc_elifdef_in_enumerator_list_no_comma)))
(rule preprocessor_argument token (lexicalPrecedence -1 (seq (class negated (char %20) (char %09) (char %0A) (char %0D) (char %0C) (char %0B)) (repeat0 (choice unordered (class negated (char %2F) (char %0A)) (seq (literal %2F) (class negated (char %2A))) (seq (literal %5C) (optional (literal %0D)) (literal %0A)))))) (concept grammar.preprocessor-argument) (source-names (tree-sitter preproc_arg)))
(rule preprocessor_directive token (seq (literal %23) (repeat0 (class plain (char %20) (char %09))) (class plain (range a z) (range A Z) (range 0 9)) (repeat0 (class plain (range a z) (range A Z) (range 0 9) (char _)))) (concept grammar.preprocessor-directive) (source-names (tree-sitter preproc_directive)))
(rule preprocessor_expression silent (choice unordered (ref identifier) (alias call_expression (ref preprocessor_call_expression)) (ref number_literal) (ref character_literal) (ref preprocessor_defined) (alias unary_expression (ref preprocessor_unary_expression)) (alias binary_expression (ref preprocessor_binary_expression)) (alias parenthesized_expression (ref preprocessor_parenthesized_expression))) (concept grammar.preprocessor-expression) (source-names (tree-sitter _preproc_expression)))
(rule preprocessor_parenthesized_expression normal (seq (literal %28) (ref preprocessor_expression) (literal %29)) (concept grammar.preprocessor-parenthesized-expression) (source-names (tree-sitter preproc_parenthesized_expression)))
(rule preprocessor_defined normal (choice unordered (precedence 15 none (seq (token (seq (literal defined) (not (ref word_characters)))) (literal %28) (ref identifier) (literal %29))) (seq (token (seq (literal defined) (not (ref word_characters)))) (ref identifier))) (concept grammar.preprocessor-defined-operator) (source-names (tree-sitter preproc_defined)))
(rule preprocessor_unary_expression normal (precedence 14 left (seq (capture labeled operator (choice unordered (literal %21) (literal %7E) (literal -) (literal %2B))) (capture labeled argument (ref preprocessor_expression)))) (concept grammar.preprocessor-unary-expression) (source-names (tree-sitter preproc_unary_expression)))
(rule preprocessor_call_expression normal (precedence 15 none (seq (capture labeled function (ref identifier)) (capture labeled arguments (alias argument_list (ref preprocessor_argument_list))))) (concept grammar.preprocessor-call-expression) (source-names (tree-sitter preproc_call_expression)))
(rule preprocessor_argument_list normal (seq (literal %28) (optional (seq (ref preprocessor_expression) (repeat0 (seq (literal %2C) (ref preprocessor_expression))))) (literal %29)) (concept grammar.preprocessor-argument-list) (source-names (tree-sitter preproc_argument_list)))
(rule preprocessor_binary_expression normal (choice unordered (precedence 10 left (seq (capture labeled left (ref preprocessor_expression)) (capture labeled operator (literal %2B)) (capture labeled right (ref preprocessor_expression)))) (precedence 10 left (seq (capture labeled left (ref preprocessor_expression)) (capture labeled operator (literal -)) (capture labeled right (ref preprocessor_expression)))) (precedence 11 left (seq (capture labeled left (ref preprocessor_expression)) (capture labeled operator (literal %2A)) (capture labeled right (ref preprocessor_expression)))) (precedence 11 left (seq (capture labeled left (ref preprocessor_expression)) (capture labeled operator (literal %2F)) (capture labeled right (ref preprocessor_expression)))) (precedence 11 left (seq (capture labeled left (ref preprocessor_expression)) (capture labeled operator (literal %25)) (capture labeled right (ref preprocessor_expression)))) (precedence 1 left (seq (capture labeled left (ref preprocessor_expression)) (capture labeled operator (literal %7C%7C)) (capture labeled right (ref preprocessor_expression)))) (precedence 2 left (seq (capture labeled left (ref preprocessor_expression)) (capture labeled operator (literal %26%26)) (capture labeled right (ref preprocessor_expression)))) (precedence 3 left (seq (capture labeled left (ref preprocessor_expression)) (capture labeled operator (literal %7C)) (capture labeled right (ref preprocessor_expression)))) (precedence 4 left (seq (capture labeled left (ref preprocessor_expression)) (capture labeled operator (literal %5E)) (capture labeled right (ref preprocessor_expression)))) (precedence 5 left (seq (capture labeled left (ref preprocessor_expression)) (capture labeled operator (literal %26)) (capture labeled right (ref preprocessor_expression)))) (precedence 6 left (seq (capture labeled left (ref preprocessor_expression)) (capture labeled operator (literal %3D%3D)) (capture labeled right (ref preprocessor_expression)))) (precedence 6 left (seq (capture labeled left (ref preprocessor_expression)) (capture labeled operator (literal %21%3D)) (capture labeled right (ref preprocessor_expression)))) (precedence 7 left (seq (capture labeled left (ref preprocessor_expression)) (capture labeled operator (literal %3E)) (capture labeled right (ref preprocessor_expression)))) (precedence 7 left (seq (capture labeled left (ref preprocessor_expression)) (capture labeled operator (literal %3E%3D)) (capture labeled right (ref preprocessor_expression)))) (precedence 7 left (seq (capture labeled left (ref preprocessor_expression)) (capture labeled operator (literal %3C%3D)) (capture labeled right (ref preprocessor_expression)))) (precedence 7 left (seq (capture labeled left (ref preprocessor_expression)) (capture labeled operator (literal %3C)) (capture labeled right (ref preprocessor_expression)))) (precedence 9 left (seq (capture labeled left (ref preprocessor_expression)) (capture labeled operator (literal %3C%3C)) (capture labeled right (ref preprocessor_expression)))) (precedence 9 left (seq (capture labeled left (ref preprocessor_expression)) (capture labeled operator (literal %3E%3E)) (capture labeled right (ref preprocessor_expression))))) (concept grammar.preprocessor-binary-expression) (source-names (tree-sitter preproc_binary_expression)))
(rule function_definition normal (seq (optional (ref microsoft_call_modifier)) (ref declaration_specifiers) (optional (ref microsoft_call_modifier)) (capture labeled declarator (ref declarator)) (capture labeled body (ref compound_statement))) (concept grammar.function-definition))
(rule old_style_function_definition silent (seq (optional (ref microsoft_call_modifier)) (ref declaration_specifiers) (capture labeled declarator (alias function_declarator (ref old_style_function_declarator))) (repeat1 (ref declaration)) (capture labeled body (ref compound_statement))) (concept grammar.old-style-function-definition) (source-names (tree-sitter _old_style_function_definition)))
(rule declaration normal (seq (ref declaration_specifiers) (seq (capture labeled declarator (choice unordered (seq (optional (ref microsoft_call_modifier)) (ref declaration_declarator) (optional (ref gnu_assembly_expression))) (ref initialized_declarator))) (repeat0 (seq (literal %2C) (capture labeled declarator (choice unordered (seq (optional (ref microsoft_call_modifier)) (ref declaration_declarator) (optional (ref gnu_assembly_expression))) (ref initialized_declarator)))))) (literal %3B)) (concept grammar.declaration))
(rule type_definition normal (seq (optional (token (seq (literal __extension__) (not (ref word_characters))))) (token (seq (literal typedef) (not (ref word_characters)))) (ref type_definition_type) (ref type_definition_declarator_list) (repeat0 (ref attribute_specifier)) (literal %3B)) (concept grammar.type-definition))
(rule type_definition_type silent (seq (repeat0 (ref type_qualifier)) (capture labeled type (ref type_specifier)) (repeat0 (ref type_qualifier))) (concept grammar.type-definition-type) (source-names (tree-sitter _type_definition_type)))
(rule type_definition_declarator_list silent (seq (capture labeled declarator (ref type_declarator)) (repeat0 (seq (literal %2C) (capture labeled declarator (ref type_declarator))))) (concept grammar.type-definition-declarator-list) (source-names (tree-sitter _type_definition_declarators)))
(rule declaration_modifiers silent (choice unordered (ref storage_class_specifier) (ref type_qualifier) (ref attribute_specifier) (ref attribute_declaration) (ref microsoft_declaration_specifier_modifier)) (concept grammar.declaration-modifiers) (source-names (tree-sitter _declaration_modifiers)))
(rule declaration_specifiers silent (precedence 0 right (seq (repeat0 (ref declaration_modifiers)) (capture labeled type (ref type_specifier)) (repeat0 (ref declaration_modifiers)))) (concept grammar.declaration-specifiers) (source-names (tree-sitter _declaration_specifiers)))
(rule linkage_specification normal (seq (token (seq (literal extern) (not (ref word_characters)))) (capture labeled value (ref string_literal)) (capture labeled body (choice unordered (ref function_definition) (ref declaration) (ref declaration_list)))) (concept grammar.linkage-specification))
(rule attribute_specifier normal (seq (choice unordered (token (seq (literal __attribute__) (not (ref word_characters)))) (token (seq (literal __attribute) (not (ref word_characters))))) (literal %28) (ref argument_list) (literal %29)) (concept grammar.attribute-specifier))
(rule attribute normal (seq (optional (seq (capture labeled prefix (ref identifier)) (literal %3A%3A))) (capture labeled name (ref identifier)) (optional (ref argument_list))) (concept program.attributes))
(rule attribute_declaration normal (seq (literal %5B%5B) (seq (ref attribute) (repeat0 (seq (literal %2C) (ref attribute)))) (literal %5D%5D)) (concept grammar.attribute-declaration))
(rule microsoft_declaration_specifier_modifier normal (seq (token (seq (literal __declspec) (not (ref word_characters)))) (literal %28) (ref identifier) (literal %29)) (concept grammar.microsoft-declaration-specifier-modifier) (source-names (tree-sitter ms_declspec_modifier)))
(rule microsoft_based_modifier normal (seq (token (seq (literal __based) (not (ref word_characters)))) (ref argument_list)) (concept grammar.microsoft-based-modifier) (source-names (tree-sitter ms_based_modifier)))
(rule microsoft_call_modifier normal (choice unordered (token (seq (literal __cdecl) (not (ref word_characters)))) (token (seq (literal __clrcall) (not (ref word_characters)))) (token (seq (literal __stdcall) (not (ref word_characters)))) (token (seq (literal __fastcall) (not (ref word_characters)))) (token (seq (literal __thiscall) (not (ref word_characters)))) (token (seq (literal __vectorcall) (not (ref word_characters))))) (concept grammar.microsoft-call-modifier) (source-names (tree-sitter ms_call_modifier)))
(rule microsoft_restrict_modifier token (seq (literal __restrict) (not (ref word_characters))) (concept grammar.microsoft-restrict-modifier) (source-names (tree-sitter ms_restrict_modifier)))
(rule microsoft_unsigned_pointer_modifier token (seq (literal __uptr) (not (ref word_characters))) (concept grammar.microsoft-unsigned-pointer-modifier) (source-names (tree-sitter ms_unsigned_ptr_modifier)))
(rule microsoft_signed_pointer_modifier token (seq (literal __sptr) (not (ref word_characters))) (concept grammar.microsoft-signed-pointer-modifier) (source-names (tree-sitter ms_signed_ptr_modifier)))
(rule microsoft_unaligned_pointer_modifier normal (choice unordered (token (seq (literal _unaligned) (not (ref word_characters)))) (token (seq (literal __unaligned) (not (ref word_characters))))) (concept grammar.microsoft-unaligned-pointer-modifier) (source-names (tree-sitter ms_unaligned_ptr_modifier)))
(rule microsoft_pointer_modifier normal (choice unordered (ref microsoft_unaligned_pointer_modifier) (ref microsoft_restrict_modifier) (ref microsoft_unsigned_pointer_modifier) (ref microsoft_signed_pointer_modifier)) (concept grammar.microsoft-pointer-modifier) (source-names (tree-sitter ms_pointer_modifier)))
(rule declaration_list normal (seq (literal %7B) (repeat0 (ref block_item)) (literal %7D)) (concept grammar.declaration-list))
(rule declarator silent (choice unordered (ref attributed_declarator) (ref pointer_declarator) (ref function_declarator) (ref array_declarator) (ref parenthesized_declarator) (ref identifier)) (concept grammar.declarator) (source-names (tree-sitter _declarator)))
(rule declaration_declarator silent (choice unordered (ref attributed_declarator) (ref pointer_declarator) (alias function_declarator (ref function_declaration_declarator)) (ref array_declarator) (ref parenthesized_declarator) (ref identifier)) (concept grammar.declaration-declarator) (source-names (tree-sitter _declaration_declarator)))
(rule field_declarator silent (choice unordered (alias attributed_declarator (ref attributed_field_declarator)) (alias pointer_declarator (ref pointer_field_declarator)) (alias function_declarator (ref function_field_declarator)) (alias array_declarator (ref array_field_declarator)) (alias parenthesized_declarator (ref parenthesized_field_declarator)) (ref field_identifier_alias)) (concept grammar.field-declarator) (source-names (tree-sitter _field_declarator)))
(rule type_declarator silent (choice unordered (alias attributed_declarator (ref attributed_type_declarator)) (alias pointer_declarator (ref pointer_type_declarator)) (alias function_declarator (ref function_type_declarator)) (alias array_declarator (ref array_type_declarator)) (alias parenthesized_declarator (ref parenthesized_type_declarator)) (ref type_identifier_alias) (alias primitive_type (choice unordered (token (seq (literal signed) (not (ref word_characters)))) (token (seq (literal unsigned) (not (ref word_characters)))) (token (seq (literal long) (not (ref word_characters)))) (token (seq (literal short) (not (ref word_characters)))))) (ref primitive_type)) (concept grammar.type-declarator) (source-names (tree-sitter _type_declarator)))
(rule abstract_declarator silent (choice unordered (ref abstract_pointer_declarator) (ref abstract_function_declarator) (ref abstract_array_declarator) (ref abstract_parenthesized_declarator)) (concept grammar.abstract-declarator) (source-names (tree-sitter _abstract_declarator)))
(rule parenthesized_declarator normal (dynamicPrecedence -10 (seq (literal %28) (optional (ref microsoft_call_modifier)) (ref declarator) (literal %29))) (concept grammar.parenthesized-declarator))
(rule parenthesized_field_declarator normal (dynamicPrecedence -10 (seq (literal %28) (optional (ref microsoft_call_modifier)) (ref field_declarator) (literal %29))) (concept grammar.parenthesized-field-declarator))
(rule parenthesized_type_declarator normal (dynamicPrecedence -10 (seq (literal %28) (optional (ref microsoft_call_modifier)) (ref type_declarator) (literal %29))) (concept grammar.parenthesized-type-declarator))
(rule abstract_parenthesized_declarator normal (precedence 1 none (seq (literal %28) (optional (ref microsoft_call_modifier)) (ref abstract_declarator) (literal %29))) (concept grammar.abstract-parenthesized-declarator))
(rule attributed_declarator normal (precedence 0 right (seq (ref declarator) (repeat1 (ref attribute_declaration)))) (concept grammar.attributed-declarator))
(rule attributed_field_declarator normal (precedence 0 right (seq (ref field_declarator) (repeat1 (ref attribute_declaration)))) (concept grammar.attributed-field-declarator))
(rule attributed_type_declarator normal (precedence 0 right (seq (ref type_declarator) (repeat1 (ref attribute_declaration)))) (concept grammar.attributed-type-declarator))
(rule pointer_declarator normal (dynamicPrecedence 1 (precedence 0 right (seq (optional (ref microsoft_based_modifier)) (literal %2A) (repeat0 (ref microsoft_pointer_modifier)) (repeat0 (ref type_qualifier)) (capture labeled declarator (ref declarator))))) (concept grammar.pointer-declarator))
(rule pointer_field_declarator normal (dynamicPrecedence 1 (precedence 0 right (seq (optional (ref microsoft_based_modifier)) (literal %2A) (repeat0 (ref microsoft_pointer_modifier)) (repeat0 (ref type_qualifier)) (capture labeled declarator (ref field_declarator))))) (concept grammar.pointer-field-declarator))
(rule pointer_type_declarator normal (dynamicPrecedence 1 (precedence 0 right (seq (optional (ref microsoft_based_modifier)) (literal %2A) (repeat0 (ref microsoft_pointer_modifier)) (repeat0 (ref type_qualifier)) (capture labeled declarator (ref type_declarator))))) (concept grammar.pointer-type-declarator))
(rule abstract_pointer_declarator normal (dynamicPrecedence 1 (precedence 0 right (seq (literal %2A) (repeat0 (ref microsoft_pointer_modifier)) (repeat0 (ref type_qualifier)) (capture labeled declarator (optional (ref abstract_declarator)))))) (concept grammar.abstract-pointer-declarator))
(rule function_declarator normal (precedence 1 right (seq (capture labeled declarator (ref declarator)) (capture labeled parameters (ref parameter_list)) (optional (ref gnu_assembly_expression)) (repeat0 (choice unordered (ref attribute_specifier) (ref identifier) (alias call_expression (ref preprocessor_call_expression)))))) (concept grammar.function-declarator))
(rule function_declaration_declarator silent (precedence 1 right (seq (capture labeled declarator (ref declarator)) (capture labeled parameters (ref parameter_list)) (optional (ref gnu_assembly_expression)) (repeat0 (ref attribute_specifier)))) (concept grammar.function-declaration-declarator) (source-names (tree-sitter _function_declaration_declarator)))
(rule function_field_declarator normal (precedence 1 none (seq (capture labeled declarator (ref field_declarator)) (capture labeled parameters (ref parameter_list)))) (concept grammar.function-field-declarator))
(rule function_type_declarator normal (precedence 1 none (seq (capture labeled declarator (ref type_declarator)) (capture labeled parameters (ref parameter_list)))) (concept grammar.function-type-declarator))
(rule abstract_function_declarator normal (precedence 1 none (seq (capture labeled declarator (optional (ref abstract_declarator))) (capture labeled parameters (ref parameter_list)))) (concept grammar.abstract-function-declarator))
(rule old_style_function_declarator silent (seq (capture labeled declarator (ref declarator)) (capture labeled parameters (alias parameter_list (ref old_style_parameter_list)))) (concept grammar.old-style-function-declarator) (source-names (tree-sitter _old_style_function_declarator)))
(rule array_declarator normal (precedence 1 none (seq (capture labeled declarator (ref declarator)) (literal %5B) (repeat0 (choice unordered (ref type_qualifier) (token (seq (literal static) (not (ref word_characters)))))) (capture labeled size (optional (choice unordered (ref expression) (literal %2A)))) (literal %5D))) (concept grammar.array-declarator))
(rule array_field_declarator normal (precedence 1 none (seq (capture labeled declarator (ref field_declarator)) (literal %5B) (repeat0 (choice unordered (ref type_qualifier) (token (seq (literal static) (not (ref word_characters)))))) (capture labeled size (optional (choice unordered (ref expression) (literal %2A)))) (literal %5D))) (concept grammar.array-field-declarator))
(rule array_type_declarator normal (precedence 1 none (seq (capture labeled declarator (ref type_declarator)) (literal %5B) (repeat0 (choice unordered (ref type_qualifier) (token (seq (literal static) (not (ref word_characters)))))) (capture labeled size (optional (choice unordered (ref expression) (literal %2A)))) (literal %5D))) (concept grammar.array-type-declarator))
(rule abstract_array_declarator normal (precedence 1 none (seq (capture labeled declarator (optional (ref abstract_declarator))) (literal %5B) (repeat0 (choice unordered (ref type_qualifier) (token (seq (literal static) (not (ref word_characters)))))) (capture labeled size (optional (choice unordered (ref expression) (literal %2A)))) (literal %5D))) (concept grammar.abstract-array-declarator))
(rule initialized_declarator normal (seq (capture labeled declarator (ref declarator)) (literal %3D) (capture labeled value (choice unordered (ref initializer_list) (ref expression)))) (concept grammar.initialized-declarator) (source-names (tree-sitter init_declarator)))
(rule compound_statement normal (seq (literal %7B) (repeat0 (ref block_item)) (literal %7D)) (concept grammar.compound-statement))
(rule storage_class_specifier normal (choice unordered (token (seq (literal extern) (not (ref word_characters)))) (token (seq (literal static) (not (ref word_characters)))) (token (seq (literal auto) (not (ref word_characters)))) (token (seq (literal register) (not (ref word_characters)))) (token (seq (literal inline) (not (ref word_characters)))) (token (seq (literal __inline) (not (ref word_characters)))) (token (seq (literal __inline__) (not (ref word_characters)))) (token (seq (literal __forceinline) (not (ref word_characters)))) (token (seq (literal thread_local) (not (ref word_characters)))) (token (seq (literal __thread) (not (ref word_characters))))) (concept grammar.storage-class-specifier))
(rule type_qualifier normal (choice unordered (token (seq (literal const) (not (ref word_characters)))) (token (seq (literal constexpr) (not (ref word_characters)))) (token (seq (literal volatile) (not (ref word_characters)))) (token (seq (literal restrict) (not (ref word_characters)))) (token (seq (literal __restrict__) (not (ref word_characters)))) (token (seq (literal __extension__) (not (ref word_characters)))) (token (seq (literal _Atomic) (not (ref word_characters)))) (token (seq (literal _Noreturn) (not (ref word_characters)))) (token (seq (literal noreturn) (not (ref word_characters)))) (token (seq (literal _Nonnull) (not (ref word_characters)))) (ref align_as_qualifier)) (concept grammar.type-qualifier))
(rule align_as_qualifier normal (seq (choice unordered (token (seq (literal alignas) (not (ref word_characters)))) (token (seq (literal _Alignas) (not (ref word_characters))))) (literal %28) (choice unordered (ref expression) (ref type_descriptor)) (literal %29)) (concept grammar.align-as-qualifier) (source-names (tree-sitter alignas_qualifier)))
(rule type_specifier silent (choice unordered (ref structure_specifier) (ref union_specifier) (ref enumeration_specifier) (ref macro_type_specifier) (ref sized_type_specifier) (ref primitive_type) (ref type_identifier_alias)) (concept grammar.type-specifier))
(rule sized_type_specifier normal (choice unordered (seq (repeat0 (choice unordered (token (seq (literal signed) (not (ref word_characters)))) (token (seq (literal unsigned) (not (ref word_characters)))) (token (seq (literal long) (not (ref word_characters)))) (token (seq (literal short) (not (ref word_characters)))))) (capture labeled type (optional (choice unordered (dynamicPrecedence -1 (ref type_identifier_alias)) (ref primitive_type)))) (repeat1 (choice unordered (token (seq (literal signed) (not (ref word_characters)))) (token (seq (literal unsigned) (not (ref word_characters)))) (token (seq (literal long) (not (ref word_characters)))) (token (seq (literal short) (not (ref word_characters))))))) (seq (repeat1 (choice unordered (token (seq (literal signed) (not (ref word_characters)))) (token (seq (literal unsigned) (not (ref word_characters)))) (token (seq (literal long) (not (ref word_characters)))) (token (seq (literal short) (not (ref word_characters)))))) (repeat0 (ref type_qualifier)) (capture labeled type (optional (choice unordered (dynamicPrecedence -1 (ref type_identifier_alias)) (ref primitive_type)))) (repeat0 (choice unordered (token (seq (literal signed) (not (ref word_characters)))) (token (seq (literal unsigned) (not (ref word_characters)))) (token (seq (literal long) (not (ref word_characters)))) (token (seq (literal short) (not (ref word_characters)))))))) (concept grammar.sized-type-specifier))
(rule primitive_type token (seq (choice unordered (literal bool) (literal char) (literal int) (literal float) (literal double) (literal void) (literal size_t) (literal ssize_t) (literal ptrdiff_t) (literal intptr_t) (literal uintptr_t) (literal charptr_t) (literal nullptr_t) (literal max_align_t) (literal int8_t) (literal int16_t) (literal int32_t) (literal int64_t) (literal uint8_t) (literal uint16_t) (literal uint32_t) (literal uint64_t) (literal char8_t) (literal char16_t) (literal char32_t) (literal char64_t)) (not (ref word_characters))) (concept grammar.primitive-type))
(rule enumeration_specifier normal (seq (token (seq (literal enum) (not (ref word_characters)))) (choice unordered (seq (capture labeled name (ref type_identifier_alias)) (optional (seq (literal %3A) (capture labeled underlying_type (ref primitive_type)))) (capture labeled body (optional (ref enumerator_list)))) (capture labeled body (ref enumerator_list))) (optional (ref attribute_specifier))) (concept grammar.enumeration-specifier) (source-names (tree-sitter enum_specifier)))
(rule enumerator_list normal (seq (literal %7B) (repeat0 (choice unordered (seq (ref enumerator) (literal %2C)) (alias preprocessor_if (ref preprocessor_if_in_enumerator_list)) (alias preprocessor_if_defined (ref preprocessor_if_defined_in_enumerator_list)) (seq (ref preprocessor_call) (literal %2C)))) (optional (choice unordered (ref enumerator) (alias preprocessor_if (ref preprocessor_if_in_enumerator_list_no_comma)) (alias preprocessor_if_defined (ref preprocessor_if_defined_in_enumerator_list_no_comma)) (ref preprocessor_call))) (literal %7D)) (concept grammar.enumerator-list))
(rule structure_specifier normal (precedence 0 right (seq (token (seq (literal struct) (not (ref word_characters)))) (optional (ref attribute_specifier)) (optional (ref microsoft_declaration_specifier_modifier)) (choice unordered (seq (capture labeled name (ref type_identifier_alias)) (capture labeled body (optional (ref field_declaration_list)))) (capture labeled body (ref field_declaration_list))) (optional (ref attribute_specifier)))) (concept grammar.structure-specifier) (source-names (tree-sitter struct_specifier)))
(rule union_specifier normal (precedence 0 right (seq (token (seq (literal union) (not (ref word_characters)))) (optional (ref microsoft_declaration_specifier_modifier)) (choice unordered (seq (capture labeled name (ref type_identifier_alias)) (capture labeled body (optional (ref field_declaration_list)))) (capture labeled body (ref field_declaration_list))) (optional (ref attribute_specifier)))) (concept grammar.union-specifier))
(rule field_declaration_list normal (seq (literal %7B) (repeat0 (ref field_declaration_list_item)) (literal %7D)) (concept grammar.field-declaration-list))
(rule field_declaration_list_item silent (choice unordered (ref field_declaration) (ref preprocessor_definition) (ref preprocessor_function_definition) (ref preprocessor_call) (alias preprocessor_if (ref preprocessor_if_in_field_declaration_list)) (alias preprocessor_if_defined (ref preprocessor_if_defined_in_field_declaration_list))) (concept grammar.field-declaration-list-item) (source-names (tree-sitter _field_declaration_list_item)))
(rule field_declaration normal (seq (ref declaration_specifiers) (optional (ref field_declaration_declarator)) (optional (ref attribute_specifier)) (literal %3B)) (concept grammar.field-declaration))
(rule field_declaration_declarator silent (seq (seq (capture labeled declarator (ref field_declarator)) (optional (ref bit_field_clause))) (repeat0 (seq (literal %2C) (seq (capture labeled declarator (ref field_declarator)) (optional (ref bit_field_clause)))))) (concept grammar.field-declaration-declarator) (source-names (tree-sitter _field_declaration_declarator)))
(rule bit_field_clause normal (seq (literal %3A) (ref expression)) (concept grammar.bit-field-clause) (source-names (tree-sitter bitfield_clause)))
(rule enumerator normal (seq (capture labeled name (ref identifier)) (optional (seq (literal %3D) (capture labeled value (ref expression))))) (concept grammar.enumerator))
(rule variadic_parameter normal (literal ...) (concept grammar.variadic-parameter))
(rule parameter_list normal (seq (literal %28) (choice unordered (optional (seq (choice unordered (ref parameter_declaration) (ref variadic_parameter)) (repeat0 (seq (literal %2C) (choice unordered (ref parameter_declaration) (ref variadic_parameter)))))) (ref compound_statement)) (literal %29)) (concept grammar.parameter-list))
(rule old_style_parameter_list silent (seq (literal %28) (optional (seq (choice unordered (ref identifier) (ref variadic_parameter)) (repeat0 (seq (literal %2C) (choice unordered (ref identifier) (ref variadic_parameter)))))) (literal %29)) (concept grammar.old-style-parameter-list) (source-names (tree-sitter _old_style_parameter_list)))
(rule parameter_declaration normal (seq (ref declaration_specifiers) (optional (capture labeled declarator (choice unordered (ref declarator) (ref abstract_declarator)))) (repeat0 (ref attribute_specifier))) (concept grammar.parameter-declaration))
(rule attributed_statement normal (seq (repeat1 (ref attribute_declaration)) (ref statement)) (concept grammar.attributed-statement))
(rule statement silent (choice unordered (ref case_statement) (ref non_case_statement)) (concept grammar.statement))
(rule non_case_statement silent (choice unordered (ref attributed_statement) (ref labeled_statement) (ref compound_statement) (ref expression_statement) (ref if_statement) (ref switch_statement) (ref do_statement) (ref while_statement) (ref for_statement) (ref return_statement) (ref break_statement) (ref continue_statement) (ref go_to_statement) (ref structured_exception_handling_try_statement) (ref structured_exception_handling_leave_statement)) (concept grammar.non-case-statement) (source-names (tree-sitter _non_case_statement)))
(rule top_level_statement silent (choice unordered (ref case_statement) (ref attributed_statement) (ref labeled_statement) (ref compound_statement) (alias expression_statement (ref top_level_expression_statement)) (ref if_statement) (ref switch_statement) (ref do_statement) (ref while_statement) (ref for_statement) (ref return_statement) (ref break_statement) (ref continue_statement) (ref go_to_statement)) (concept grammar.top-level-statement) (source-names (tree-sitter _top_level_statement)))
(rule labeled_statement normal (seq (capture labeled label (ref statement_identifier_alias)) (literal %3A) (choice unordered (ref declaration) (ref statement))) (concept grammar.labeled-statement))
(rule top_level_expression_statement silent (seq (optional (ref expression_not_binary)) (literal %3B)) (concept grammar.top-level-expression-statement) (source-names (tree-sitter _top_level_expression_statement)))
(rule expression_statement normal (seq (optional (choice unordered (ref expression) (ref comma_expression))) (literal %3B)) (concept grammar.expression-statement))
(rule if_statement normal (precedence 0 right (seq (token (seq (literal if) (not (ref word_characters)))) (capture labeled condition (ref parenthesized_expression)) (capture labeled consequence (ref statement)) (optional (capture labeled alternative (ref else_clause))))) (concept grammar.if-statement))
(rule else_clause normal (seq (token (seq (literal else) (not (ref word_characters)))) (ref statement)) (concept grammar.else-clause))
(rule switch_statement normal (seq (token (seq (literal switch) (not (ref word_characters)))) (capture labeled condition (ref parenthesized_expression)) (capture labeled body (ref compound_statement))) (concept grammar.switch-statement))
(rule case_statement normal (precedence 0 right (seq (choice unordered (seq (token (seq (literal case) (not (ref word_characters)))) (capture labeled value (ref expression))) (token (seq (literal default) (not (ref word_characters))))) (literal %3A) (repeat0 (choice unordered (ref non_case_statement) (ref declaration) (ref type_definition))))) (concept grammar.case-statement))
(rule while_statement normal (seq (token (seq (literal while) (not (ref word_characters)))) (capture labeled condition (ref parenthesized_expression)) (capture labeled body (ref statement))) (concept grammar.while-statement))
(rule do_statement normal (seq (token (seq (literal do) (not (ref word_characters)))) (capture labeled body (ref statement)) (token (seq (literal while) (not (ref word_characters)))) (capture labeled condition (ref parenthesized_expression)) (literal %3B)) (concept grammar.do-statement))
(rule for_statement normal (seq (token (seq (literal for) (not (ref word_characters)))) (literal %28) (ref for_statement_body) (literal %29) (capture labeled body (ref statement))) (concept grammar.for-statement))
(rule for_statement_body silent (seq (choice unordered (capture labeled initializer (ref declaration)) (seq (capture labeled initializer (optional (choice unordered (ref expression) (ref comma_expression)))) (literal %3B))) (capture labeled condition (optional (choice unordered (ref expression) (ref comma_expression)))) (literal %3B) (capture labeled update (optional (choice unordered (ref expression) (ref comma_expression))))) (concept grammar.for-statement-body) (source-names (tree-sitter _for_statement_body)))
(rule return_statement normal (seq (token (seq (literal return) (not (ref word_characters)))) (optional (choice unordered (ref expression) (ref comma_expression))) (literal %3B)) (concept grammar.return-statement))
(rule break_statement normal (seq (token (seq (literal break) (not (ref word_characters)))) (literal %3B)) (concept grammar.break-statement))
(rule continue_statement normal (seq (token (seq (literal continue) (not (ref word_characters)))) (literal %3B)) (concept grammar.continue-statement))
(rule go_to_statement normal (seq (token (seq (literal goto) (not (ref word_characters)))) (capture labeled label (ref statement_identifier_alias)) (literal %3B)) (concept grammar.go-to-statement) (source-names (tree-sitter goto_statement)))
(rule structured_exception_handling_try_statement normal (seq (token (seq (literal __try) (not (ref word_characters)))) (capture labeled body (ref compound_statement)) (choice unordered (ref structured_exception_handling_except_clause) (ref structured_exception_handling_finally_clause))) (concept grammar.structured-exception-handling-try-statement) (source-names (tree-sitter seh_try_statement)))
(rule structured_exception_handling_except_clause normal (seq (token (seq (literal __except) (not (ref word_characters)))) (capture labeled filter (ref parenthesized_expression)) (capture labeled body (ref compound_statement))) (concept grammar.structured-exception-handling-except-clause) (source-names (tree-sitter seh_except_clause)))
(rule structured_exception_handling_finally_clause normal (seq (token (seq (literal __finally) (not (ref word_characters)))) (capture labeled body (ref compound_statement))) (concept grammar.structured-exception-handling-finally-clause) (source-names (tree-sitter seh_finally_clause)))
(rule structured_exception_handling_leave_statement normal (seq (token (seq (literal __leave) (not (ref word_characters)))) (literal %3B)) (concept grammar.structured-exception-handling-leave-statement) (source-names (tree-sitter seh_leave_statement)))
(rule expression silent (choice unordered (ref expression_not_binary) (ref binary_expression)) (concept grammar.expression))
(rule expression_not_binary silent (choice unordered (ref conditional_expression) (ref assignment_expression) (ref unary_expression) (ref update_expression) (ref cast_expression) (ref pointer_expression) (ref size_of_expression) (ref alignment_of_expression) (ref offset_of_expression) (ref generic_expression) (ref subscript_expression) (ref call_expression) (ref field_expression) (ref compound_literal_expression) (ref identifier) (ref number_literal) (ref string) (ref true) (ref false) (ref null) (ref character_literal) (ref parenthesized_expression) (ref gnu_assembly_expression) (ref extension_expression)) (concept grammar.expression-not-binary) (source-names (tree-sitter _expression_not_binary)))
(rule string silent (precedence 0 left (choice unordered (ref string_literal) (ref concatenated_string))) (concept grammar.string) (source-names (tree-sitter _string)))
(rule comma_expression normal (seq (capture labeled left (ref expression)) (literal %2C) (capture labeled right (choice unordered (ref expression) (ref comma_expression)))) (concept grammar.comma-expression))
(rule conditional_expression normal (precedence -1 right (seq (capture labeled condition (ref expression)) (literal %3F) (optional (capture labeled consequence (choice unordered (ref expression) (ref comma_expression)))) (literal %3A) (capture labeled alternative (ref expression)))) (concept grammar.conditional-expression))
(rule assignment_left_expression silent (choice unordered (ref identifier) (ref call_expression) (ref field_expression) (ref pointer_expression) (ref subscript_expression) (ref parenthesized_expression)) (concept grammar.assignment-left-expression) (source-names (tree-sitter _assignment_left_expression)))
(rule assignment_expression normal (precedence -2 right (seq (capture labeled left (ref assignment_left_expression)) (capture labeled operator (choice unordered (literal %3D) (literal %2A%3D) (literal %2F%3D) (literal %25%3D) (literal %2B%3D) (literal -%3D) (literal %3C%3C%3D) (literal %3E%3E%3D) (literal %26%3D) (literal %5E%3D) (literal %7C%3D))) (capture labeled right (ref expression)))) (concept grammar.assignment-expression))
(rule pointer_expression normal (precedence 12 left (seq (capture labeled operator (choice unordered (literal %2A) (literal %26))) (capture labeled argument (ref expression)))) (concept grammar.pointer-expression))
(rule unary_expression normal (precedence 14 left (seq (capture labeled operator (choice unordered (literal %21) (literal %7E) (literal -) (literal %2B))) (capture labeled argument (ref expression)))) (concept grammar.unary-expression))
(rule binary_expression normal (choice unordered (precedence 10 left (seq (capture labeled left (ref expression)) (capture labeled operator (literal %2B)) (capture labeled right (ref expression)))) (precedence 10 left (seq (capture labeled left (ref expression)) (capture labeled operator (literal -)) (capture labeled right (ref expression)))) (precedence 11 left (seq (capture labeled left (ref expression)) (capture labeled operator (literal %2A)) (capture labeled right (ref expression)))) (precedence 11 left (seq (capture labeled left (ref expression)) (capture labeled operator (literal %2F)) (capture labeled right (ref expression)))) (precedence 11 left (seq (capture labeled left (ref expression)) (capture labeled operator (literal %25)) (capture labeled right (ref expression)))) (precedence 1 left (seq (capture labeled left (ref expression)) (capture labeled operator (literal %7C%7C)) (capture labeled right (ref expression)))) (precedence 2 left (seq (capture labeled left (ref expression)) (capture labeled operator (literal %26%26)) (capture labeled right (ref expression)))) (precedence 3 left (seq (capture labeled left (ref expression)) (capture labeled operator (literal %7C)) (capture labeled right (ref expression)))) (precedence 4 left (seq (capture labeled left (ref expression)) (capture labeled operator (literal %5E)) (capture labeled right (ref expression)))) (precedence 5 left (seq (capture labeled left (ref expression)) (capture labeled operator (literal %26)) (capture labeled right (ref expression)))) (precedence 6 left (seq (capture labeled left (ref expression)) (capture labeled operator (literal %3D%3D)) (capture labeled right (ref expression)))) (precedence 6 left (seq (capture labeled left (ref expression)) (capture labeled operator (literal %21%3D)) (capture labeled right (ref expression)))) (precedence 7 left (seq (capture labeled left (ref expression)) (capture labeled operator (literal %3E)) (capture labeled right (ref expression)))) (precedence 7 left (seq (capture labeled left (ref expression)) (capture labeled operator (literal %3E%3D)) (capture labeled right (ref expression)))) (precedence 7 left (seq (capture labeled left (ref expression)) (capture labeled operator (literal %3C%3D)) (capture labeled right (ref expression)))) (precedence 7 left (seq (capture labeled left (ref expression)) (capture labeled operator (literal %3C)) (capture labeled right (ref expression)))) (precedence 9 left (seq (capture labeled left (ref expression)) (capture labeled operator (literal %3C%3C)) (capture labeled right (ref expression)))) (precedence 9 left (seq (capture labeled left (ref expression)) (capture labeled operator (literal %3E%3E)) (capture labeled right (ref expression))))) (concept grammar.binary-expression))
(rule update_expression normal (precedence 14 right (choice unordered (seq (capture labeled operator (choice unordered (literal --) (literal %2B%2B))) (capture labeled argument (ref expression))) (seq (capture labeled argument (ref expression)) (capture labeled operator (choice unordered (literal --) (literal %2B%2B)))))) (concept grammar.update-expression))
(rule cast_expression normal (precedence 12 none (seq (literal %28) (capture labeled type (ref type_descriptor)) (literal %29) (capture labeled value (ref expression)))) (concept grammar.cast-expression))
(rule type_descriptor normal (seq (repeat0 (ref type_qualifier)) (capture labeled type (ref type_specifier)) (repeat0 (ref type_qualifier)) (capture labeled declarator (optional (ref abstract_declarator)))) (concept grammar.type-descriptor))
(rule size_of_expression normal (precedence 13 none (seq (token (seq (literal sizeof) (not (ref word_characters)))) (choice unordered (capture labeled value (ref expression)) (seq (literal %28) (capture labeled type (ref type_descriptor)) (literal %29))))) (concept grammar.size-of-expression) (source-names (tree-sitter sizeof_expression)))
(rule alignment_of_expression normal (precedence 13 none (seq (choice unordered (token (seq (literal __alignof__) (not (ref word_characters)))) (token (seq (literal __alignof) (not (ref word_characters)))) (token (seq (literal _alignof) (not (ref word_characters)))) (token (seq (literal alignof) (not (ref word_characters)))) (token (seq (literal _Alignof) (not (ref word_characters))))) (seq (literal %28) (capture labeled type (ref type_descriptor)) (literal %29)))) (concept grammar.alignment-of-expression) (source-names (tree-sitter alignof_expression)))
(rule offset_of_expression normal (precedence 8 none (seq (token (seq (literal offsetof) (not (ref word_characters)))) (seq (literal %28) (capture labeled type (ref type_descriptor)) (literal %2C) (capture labeled member (ref field_identifier_alias)) (literal %29)))) (concept grammar.offset-of-expression) (source-names (tree-sitter offsetof_expression)))
(rule generic_expression normal (precedence 15 none (seq (token (seq (literal _Generic) (not (ref word_characters)))) (literal %28) (ref expression) (literal %2C) (seq (seq (ref type_descriptor) (literal %3A) (ref expression)) (repeat0 (seq (literal %2C) (seq (ref type_descriptor) (literal %3A) (ref expression))))) (literal %29))) (concept grammar.generic-expression))
(rule subscript_expression normal (precedence 17 none (seq (capture labeled argument (ref expression)) (literal %5B) (capture labeled index (ref expression)) (literal %5D))) (concept grammar.subscript-expression))
(rule call_expression normal (precedence 15 none (seq (capture labeled function (ref expression)) (capture labeled arguments (ref argument_list)))) (concept grammar.call-expression))
(rule gnu_assembly_expression normal (precedence 15 none (seq (choice unordered (token (seq (literal asm) (not (ref word_characters)))) (token (seq (literal __asm__) (not (ref word_characters)))) (token (seq (literal __asm) (not (ref word_characters))))) (repeat0 (ref gnu_assembly_qualifier)) (literal %28) (capture labeled assembly_code (ref string)) (optional (seq (capture labeled output_operands (ref gnu_assembly_output_operand_list)) (optional (seq (capture labeled input_operands (ref gnu_assembly_input_operand_list)) (optional (seq (capture labeled clobbers (ref gnu_assembly_clobber_list)) (optional (capture labeled goto_labels (ref gnu_assembly_go_to_list))))))))) (literal %29))) (concept grammar.gnu-assembly-expression) (source-names (tree-sitter gnu_asm_expression)))
(rule gnu_assembly_qualifier normal (choice unordered (token (seq (literal volatile) (not (ref word_characters)))) (token (seq (literal __volatile__) (not (ref word_characters)))) (token (seq (literal inline) (not (ref word_characters)))) (token (seq (literal goto) (not (ref word_characters))))) (concept grammar.gnu-assembly-qualifier) (source-names (tree-sitter gnu_asm_qualifier)))
(rule gnu_assembly_output_operand_list normal (seq (literal %3A) (optional (seq (capture labeled operand (ref gnu_assembly_output_operand)) (repeat0 (seq (literal %2C) (capture labeled operand (ref gnu_assembly_output_operand))))))) (concept grammar.gnu-assembly-output-operand-list) (source-names (tree-sitter gnu_asm_output_operand_list)))
(rule gnu_assembly_output_operand normal (seq (optional (seq (literal %5B) (capture labeled symbol (ref identifier)) (literal %5D))) (capture labeled constraint (ref string_literal)) (literal %28) (capture labeled value (ref expression)) (literal %29)) (concept grammar.gnu-assembly-output-operand) (source-names (tree-sitter gnu_asm_output_operand)))
(rule gnu_assembly_input_operand_list normal (seq (literal %3A) (optional (seq (capture labeled operand (ref gnu_assembly_input_operand)) (repeat0 (seq (literal %2C) (capture labeled operand (ref gnu_assembly_input_operand))))))) (concept grammar.gnu-assembly-input-operand-list) (source-names (tree-sitter gnu_asm_input_operand_list)))
(rule gnu_assembly_input_operand normal (seq (optional (seq (literal %5B) (capture labeled symbol (ref identifier)) (literal %5D))) (capture labeled constraint (ref string_literal)) (literal %28) (capture labeled value (ref expression)) (literal %29)) (concept grammar.gnu-assembly-input-operand) (source-names (tree-sitter gnu_asm_input_operand)))
(rule gnu_assembly_clobber_list normal (seq (literal %3A) (optional (seq (capture labeled register (ref string)) (repeat0 (seq (literal %2C) (capture labeled register (ref string))))))) (concept grammar.gnu-assembly-clobber-list) (source-names (tree-sitter gnu_asm_clobber_list)))
(rule gnu_assembly_go_to_list normal (seq (literal %3A) (optional (seq (capture labeled label (ref identifier)) (repeat0 (seq (literal %2C) (capture labeled label (ref identifier))))))) (concept grammar.gnu-assembly-go-to-list) (source-names (tree-sitter gnu_asm_goto_list)))
(rule extension_expression normal (seq (token (seq (literal __extension__) (not (ref word_characters)))) (ref expression)) (concept grammar.extension-expression))
(rule argument_list normal (seq (literal %28) (optional (seq (choice unordered (ref expression) (ref compound_statement)) (repeat0 (seq (literal %2C) (choice unordered (ref expression) (ref compound_statement)))))) (literal %29)) (concept grammar.argument-list))
(rule field_expression normal (seq (precedence 16 none (seq (capture labeled argument (ref expression)) (capture labeled operator (choice unordered (literal .) (literal -%3E))))) (capture labeled field (ref field_identifier_alias))) (concept grammar.field-expression))
(rule compound_literal_expression normal (seq (literal %28) (capture labeled type (ref type_descriptor)) (literal %29) (capture labeled value (ref initializer_list))) (concept grammar.compound-literal-expression))
(rule parenthesized_expression normal (seq (literal %28) (choice unordered (ref expression) (ref comma_expression) (ref compound_statement)) (literal %29)) (concept grammar.parenthesized-expression))
(rule initializer_list normal (seq (literal %7B) (optional (seq (choice unordered (ref initializer_pair) (ref expression) (ref initializer_list)) (repeat0 (seq (literal %2C) (choice unordered (ref initializer_pair) (ref expression) (ref initializer_list)))))) (optional (literal %2C)) (literal %7D)) (concept grammar.initializer-list))
(rule initializer_pair normal (choice unordered (seq (capture labeled designator (repeat1 (choice unordered (ref subscript_designator) (ref field_designator) (ref subscript_range_designator)))) (literal %3D) (capture labeled value (choice unordered (ref expression) (ref initializer_list)))) (seq (capture labeled designator (ref field_identifier_alias)) (literal %3A) (capture labeled value (choice unordered (ref expression) (ref initializer_list))))) (concept grammar.initializer-pair))
(rule subscript_designator normal (seq (literal %5B) (ref expression) (literal %5D)) (concept grammar.subscript-designator))
(rule subscript_range_designator normal (seq (literal %5B) (capture labeled start (ref expression)) (literal ...) (capture labeled end (ref expression)) (literal %5D)) (concept grammar.subscript-range-designator))
(rule field_designator normal (seq (literal .) (ref field_identifier_alias)) (concept grammar.field-designator))
(rule number_literal token (seq (optional (class plain (char -) (char %2B))) (optional (choice unordered (seq (literal 0) (class plain (char x) (char X))) (seq (literal 0) (class plain (char b) (char B))))) (choice unordered (seq (choice unordered (seq (repeat1 (class plain (range 0 9))) (repeat0 (seq (literal %27) (repeat1 (class plain (range 0 9)))))) (seq (seq (literal 0) (class plain (char b) (char B))) (seq (repeat1 (class plain (range 0 9))) (repeat0 (seq (literal %27) (repeat1 (class plain (range 0 9))))))) (seq (seq (literal 0) (class plain (char x) (char X))) (seq (repeat1 (class plain (range 0 9) (range a f) (range A F))) (repeat0 (seq (literal %27) (repeat1 (class plain (range 0 9) (range a f) (range A F)))))))) (optional (seq (literal .) (optional (seq (repeat1 (class plain (range 0 9) (range a f) (range A F))) (repeat0 (seq (literal %27) (repeat1 (class plain (range 0 9) (range a f) (range A F)))))))))) (seq (literal .) (seq (repeat1 (class plain (range 0 9))) (repeat0 (seq (literal %27) (repeat1 (class plain (range 0 9)))))))) (optional (seq (class plain (char e) (char E) (char p) (char P)) (optional (seq (optional (class plain (char -) (char %2B))) (seq (repeat1 (class plain (range 0 9) (range a f) (range A F))) (repeat0 (seq (literal %27) (repeat1 (class plain (range 0 9) (range a f) (range A F)))))))))) (repeat0 (class plain (char u) (char U) (char l) (char L) (char w) (char W) (char f) (char F) (char b) (char B) (char d) (char D)))) (concept grammar.number-literal))
(rule character_literal normal (seq (choice unordered (literal L%27) (literal u%27) (literal U%27) (literal u8%27) (literal %27)) (repeat1 (choice unordered (ref escape_sequence) (alias character (immediateToken (class negated (char %0A) (char %27)))))) (literal %27)) (concept grammar.character-literal) (source-names (tree-sitter char_literal)))
(rule concatenated_string normal (precedence 0 right (seq (choice unordered (seq (ref identifier) (ref string_literal)) (seq (ref string_literal) (ref string_literal)) (seq (ref string_literal) (ref identifier))) (repeat0 (choice unordered (ref string_literal) (ref identifier))))) (concept grammar.concatenated-string))
(rule string_literal normal (seq (choice unordered (literal L%22) (literal u%22) (literal U%22) (literal u8%22) (literal %22)) (repeat0 (choice unordered (alias string_content (immediateToken (lexicalPrecedence 1 (repeat1 (class negated (char %5C) (char %22) (char %0A)))))) (ref escape_sequence))) (literal %22)) (concept grammar.string-literal))
(rule escape_sequence token (lexicalPrecedence 1 (seq (literal %5C) (choice unordered (class negated (char x) (char u) (char U)) (repeat 2 3 (class plain (range 0 9))) (seq (literal x) (repeat 1 4 (class plain (range 0 9) (range a f) (range A F)))) (seq (literal u) (repeat 4 4 (class plain (range 0 9) (range a f) (range A F)))) (seq (literal U) (repeat 8 8 (class plain (range 0 9) (range a f) (range A F))))))) (concept grammar.escape-sequence))
(rule system_library_string token (seq (literal %3C) (repeat0 (choice unordered (class negated (char %3E) (char %0A)) (literal %5C%3E))) (literal %3E)) (concept grammar.system-library-string) (source-names (tree-sitter system_lib_string)))
(rule true token (seq (choice unordered (literal TRUE) (literal true)) (not (ref word_characters))) (concept grammar.true-value))
(rule false token (seq (choice unordered (literal FALSE) (literal false)) (not (ref word_characters))) (concept grammar.false-value))
(rule null normal (choice unordered (token (seq (literal NULL) (not (ref word_characters)))) (token (seq (literal nullptr) (not (ref word_characters))))) (concept grammar.null))
(rule identifier token (seq (choice unordered (class plain (category Lu) (category Ll) (category Lt) (category Lm) (category Lo) (category Nl)) (literal %24) (literal _) (seq (literal %5Cu) (repeat 4 4 (class plain (range 0 9) (range A F) (range a f)))) (seq (literal %5CU) (repeat 8 8 (class plain (range 0 9) (range A F) (range a f))))) (repeat0 (choice unordered (class plain (category Lu) (category Ll) (category Lt) (category Lm) (category Lo) (category Nl) (category Mn) (category Mc) (category Nd) (category Pc)) (literal %24) (seq (literal %5Cu) (repeat 4 4 (class plain (range 0 9) (range A F) (range a f)))) (seq (literal %5CU) (repeat 8 8 (class plain (range 0 9) (range A F) (range a f))))))) (concept grammar.identifier))
(rule type_identifier_alias silent (alias type_identifier (ref identifier)) (concept grammar.type-identifier-alias) (source-names (tree-sitter _type_identifier)))
(rule field_identifier_alias silent (alias field_identifier (ref identifier)) (concept grammar.field-identifier-alias) (source-names (tree-sitter _field_identifier)))
(rule statement_identifier_alias silent (alias statement_identifier (ref identifier)) (concept grammar.statement-identifier-alias) (source-names (tree-sitter _statement_identifier)))
(rule empty_declaration silent (seq (ref type_specifier) (literal %3B)) (concept grammar.empty-declaration) (source-names (tree-sitter _empty_declaration)))
(rule macro_type_specifier normal (dynamicPrecedence -1 (seq (capture labeled name (ref identifier)) (literal %28) (capture labeled type (ref type_descriptor)) (literal %29))) (concept grammar.macro-type-specifier))
(rule comment token (choice unordered (seq (literal %2F%2F) (repeat0 (choice unordered (seq (repeat1 (literal %5C)) (choice unordered (class negated (char %0A)) (seq (optional (literal %0D)) (literal %0A)))) (class negated (char %5C) (char %0A))))) (seq (literal %2F%2A) (seq (repeat0 (class negated (char %2A))) (repeat1 (literal %2A)) (repeat0 (seq (class negated (char %2F) (char %2A)) (repeat0 (class negated (char %2A))) (repeat1 (literal %2A))))) (literal %2F))) (concept grammar.comment))
(rule word_characters token (seq (choice unordered (class plain (category Lu) (category Ll) (category Lt) (category Lm) (category Lo) (category Nl)) (literal %24) (literal _) (seq (literal %5Cu) (repeat 4 4 (class plain (range 0 9) (range A F) (range a f)))) (seq (literal %5CU) (repeat 8 8 (class plain (range 0 9) (range A F) (range a f))))) (repeat0 (choice unordered (class plain (category Lu) (category Ll) (category Lt) (category Lm) (category Lo) (category Nl) (category Mn) (category Mc) (category Nd) (category Pc)) (literal %24) (seq (literal %5Cu) (repeat 4 4 (class plain (range 0 9) (range A F) (range a f)))) (seq (literal %5CU) (repeat 8 8 (class plain (range 0 9) (range A F) (range a f))))))) (concept grammar.word-characters))