{ "name": "objc", "word": "identifier", "rules": { "translation_unit": { "type": "REPEAT", "content": { "type": "SYMBOL", "name": "_top_level_item" } }, "_top_level_item": { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "function_definition" }, { "type": "SYMBOL", "name": "linkage_specification" }, { "type": "SYMBOL", "name": "declaration" }, { "type": "SYMBOL", "name": "_statement" }, { "type": "SYMBOL", "name": "type_definition" }, { "type": "SYMBOL", "name": "_empty_declaration" }, { "type": "SYMBOL", "name": "preproc_if" }, { "type": "SYMBOL", "name": "preproc_ifdef" }, { "type": "SYMBOL", "name": "preproc_include" }, { "type": "SYMBOL", "name": "preproc_def" }, { "type": "SYMBOL", "name": "preproc_function_def" }, { "type": "SYMBOL", "name": "_import" }, { "type": "SYMBOL", "name": "class_interface" }, { "type": "SYMBOL", "name": "class_implementation" }, { "type": "SYMBOL", "name": "category_interface" }, { "type": "SYMBOL", "name": "category_implementation" }, { "type": "SYMBOL", "name": "protocol_declaration" }, { "type": "SYMBOL", "name": "protocol_forward_declaration" }, { "type": "SYMBOL", "name": "class_forward_declaration" }, { "type": "SYMBOL", "name": "_ns_assume_nonnull_declaration" }, { "type": "SYMBOL", "name": "compatibility_alias_declaration" } ] }, "preproc_include": { "type": "SEQ", "members": [ { "type": "ALIAS", "content": { "type": "PATTERN", "value": "#[ \t]*include" }, "named": false, "value": "#include" }, { "type": "FIELD", "name": "path", "content": { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "string_literal" }, { "type": "SYMBOL", "name": "system_lib_string" }, { "type": "SYMBOL", "name": "identifier" }, { "type": "ALIAS", "content": { "type": "SYMBOL", "name": "preproc_call_expression" }, "named": true, "value": "call_expression" } ] } }, { "type": "STRING", "value": "\n" } ] }, "preproc_def": { "type": "SEQ", "members": [ { "type": "ALIAS", "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": "STRING", "value": "\n" } ] }, "preproc_function_def": { "type": "SEQ", "members": [ { "type": "ALIAS", "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": "STRING", "value": "\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_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": "STRING", "value": "\n" } ] }, "preproc_if": { "type": "SEQ", "members": [ { "type": "ALIAS", "content": { "type": "PATTERN", "value": "#[ \t]*if" }, "named": false, "value": "#if" }, { "type": "FIELD", "name": "condition", "content": { "type": "SYMBOL", "name": "_preproc_expression" } }, { "type": "STRING", "value": "\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": "PATTERN", "value": "#[ \t]*endif" }, "named": false, "value": "#endif" } ] }, "preproc_ifdef": { "type": "SEQ", "members": [ { "type": "CHOICE", "members": [ { "type": "ALIAS", "content": { "type": "PATTERN", "value": "#[ \t]*ifdef" }, "named": false, "value": "#ifdef" }, { "type": "ALIAS", "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": "PATTERN", "value": "#[ \t]*endif" }, "named": false, "value": "#endif" } ] }, "preproc_else": { "type": "SEQ", "members": [ { "type": "ALIAS", "content": { "type": "PATTERN", "value": "#[ \t]*else" }, "named": false, "value": "#else" }, { "type": "REPEAT", "content": { "type": "SYMBOL", "name": "_top_level_item" } } ] }, "preproc_elif": { "type": "SEQ", "members": [ { "type": "ALIAS", "content": { "type": "PATTERN", "value": "#[ \t]*elif" }, "named": false, "value": "#elif" }, { "type": "FIELD", "name": "condition", "content": { "type": "SYMBOL", "name": "_preproc_expression" } }, { "type": "STRING", "value": "\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_field_declaration_list": { "type": "SEQ", "members": [ { "type": "ALIAS", "content": { "type": "PATTERN", "value": "#[ \t]*if" }, "named": false, "value": "#if" }, { "type": "FIELD", "name": "condition", "content": { "type": "SYMBOL", "name": "_preproc_expression" } }, { "type": "STRING", "value": "\n" }, { "type": "REPEAT", "content": { "type": "SYMBOL", "name": "_field_declaration_list_item" } }, { "type": "FIELD", "name": "alternative", "content": { "type": "CHOICE", "members": [ { "type": "CHOICE", "members": [ { "type": "ALIAS", "content": { "type": "SYMBOL", "name": "preproc_else_in_field_declaration_list" }, "named": true, "value": "preproc_else" }, { "type": "ALIAS", "content": { "type": "SYMBOL", "name": "preproc_elif_in_field_declaration_list" }, "named": true, "value": "preproc_elif" } ] }, { "type": "BLANK" } ] } }, { "type": "ALIAS", "content": { "type": "PATTERN", "value": "#[ \t]*endif" }, "named": false, "value": "#endif" } ] }, "preproc_ifdef_in_field_declaration_list": { "type": "SEQ", "members": [ { "type": "CHOICE", "members": [ { "type": "ALIAS", "content": { "type": "PATTERN", "value": "#[ \t]*ifdef" }, "named": false, "value": "#ifdef" }, { "type": "ALIAS", "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_list_item" } }, { "type": "FIELD", "name": "alternative", "content": { "type": "CHOICE", "members": [ { "type": "CHOICE", "members": [ { "type": "ALIAS", "content": { "type": "SYMBOL", "name": "preproc_else_in_field_declaration_list" }, "named": true, "value": "preproc_else" }, { "type": "ALIAS", "content": { "type": "SYMBOL", "name": "preproc_elif_in_field_declaration_list" }, "named": true, "value": "preproc_elif" } ] }, { "type": "BLANK" } ] } }, { "type": "ALIAS", "content": { "type": "PATTERN", "value": "#[ \t]*endif" }, "named": false, "value": "#endif" } ] }, "preproc_else_in_field_declaration_list": { "type": "SEQ", "members": [ { "type": "ALIAS", "content": { "type": "PATTERN", "value": "#[ \t]*else" }, "named": false, "value": "#else" }, { "type": "REPEAT", "content": { "type": "SYMBOL", "name": "_field_declaration_list_item" } } ] }, "preproc_elif_in_field_declaration_list": { "type": "SEQ", "members": [ { "type": "ALIAS", "content": { "type": "PATTERN", "value": "#[ \t]*elif" }, "named": false, "value": "#elif" }, { "type": "FIELD", "name": "condition", "content": { "type": "SYMBOL", "name": "_preproc_expression" } }, { "type": "STRING", "value": "\n" }, { "type": "REPEAT", "content": { "type": "SYMBOL", "name": "_field_declaration_list_item" } }, { "type": "FIELD", "name": "alternative", "content": { "type": "CHOICE", "members": [ { "type": "CHOICE", "members": [ { "type": "ALIAS", "content": { "type": "SYMBOL", "name": "preproc_else_in_field_declaration_list" }, "named": true, "value": "preproc_else" }, { "type": "ALIAS", "content": { "type": "SYMBOL", "name": "preproc_elif_in_field_declaration_list" }, "named": true, "value": "preproc_elif" } ] }, { "type": "BLANK" } ] } } ] }, "preproc_directive": { "type": "PATTERN", "value": "#[ \\t]*[a-zA-Z]\\w*" }, "preproc_arg": { "type": "TOKEN", "content": { "type": "PREC", "value": -1, "content": { "type": "REPEAT1", "content": { "type": "PATTERN", "value": ".|\\\\\\r?\\n" } } } }, "_preproc_expression": { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "preproc_has_include" }, { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "identifier" }, { "type": "ALIAS", "content": { "type": "SYMBOL", "name": "preproc_call_expression" }, "named": true, "value": "call_expression" }, { "type": "SYMBOL", "name": "number_literal" }, { "type": "SYMBOL", "name": "char_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": 14, "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": 13, "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_call_expression": { "type": "PREC", "value": 14, "content": { "type": "SEQ", "members": [ { "type": "FIELD", "name": "function", "content": { "type": "SYMBOL", "name": "identifier" } }, { "type": "FIELD", "name": "arguments", "content": { "type": "ALIAS", "content": { "type": "SYMBOL", "name": "preproc_argument_list" }, "named": true, "value": "argument_list" } } ] } }, "preproc_argument_list": { "type": "SEQ", "members": [ { "type": "STRING", "value": "(" }, { "type": "CHOICE", "members": [ { "type": "SEQ", "members": [ { "type": "SYMBOL", "name": "_preproc_expression" }, { "type": "REPEAT", "content": { "type": "SEQ", "members": [ { "type": "STRING", "value": "," }, { "type": "SYMBOL", "name": "_preproc_expression" } ] } } ] }, { "type": "BLANK" } ] }, { "type": "STRING", "value": ")" } ] }, "preproc_binary_expression": { "type": "CHOICE", "members": [ { "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": "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": "STRING", "value": "-" } }, { "type": "FIELD", "name": "right", "content": { "type": "SYMBOL", "name": "_preproc_expression" } } ] } }, { "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": "STRING", "value": "*" } }, { "type": "FIELD", "name": "right", "content": { "type": "SYMBOL", "name": "_preproc_expression" } } ] } }, { "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": "STRING", "value": "/" } }, { "type": "FIELD", "name": "right", "content": { "type": "SYMBOL", "name": "_preproc_expression" } } ] } }, { "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": "STRING", "value": "%" } }, { "type": "FIELD", "name": "right", "content": { "type": "SYMBOL", "name": "_preproc_expression" } } ] } }, { "type": "PREC_LEFT", "value": 1, "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" } } ] } }, { "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": 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": 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": 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": 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": 7, "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": 7, "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": 7, "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": 7, "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": 9, "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": 9, "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" } } ] } } ] }, "function_definition": { "type": "SEQ", "members": [ { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "ms_call_modifier" }, { "type": "BLANK" } ] }, { "type": "SYMBOL", "name": "_declaration_specifiers" }, { "type": "FIELD", "name": "declarator", "content": { "type": "SYMBOL", "name": "_declarator" } }, { "type": "FIELD", "name": "body", "content": { "type": "SYMBOL", "name": "compound_statement" } } ] }, "declaration": { "type": "SEQ", "members": [ { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "swift_name_attribute_sepcifier" }, { "type": "BLANK" } ] }, { "type": "SYMBOL", "name": "_declaration_specifiers" }, { "type": "SEQ", "members": [ { "type": "FIELD", "name": "declarator", "content": { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "_declarator" }, { "type": "SYMBOL", "name": "init_declarator" } ] } }, { "type": "REPEAT", "content": { "type": "SEQ", "members": [ { "type": "STRING", "value": "," }, { "type": "FIELD", "name": "declarator", "content": { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "_declarator" }, { "type": "SYMBOL", "name": "init_declarator" } ] } } ] } } ] }, { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "attribute_specifier" }, { "type": "BLANK" } ] }, { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "type_qualifier" }, { "type": "BLANK" } ] }, { "type": "STRING", "value": ";" } ] }, "type_definition": { "type": "PREC", "value": 1, "content": { "type": "SEQ", "members": [ { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "attribute_specifier" }, { "type": "BLANK" } ] }, { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "swift_name_attribute_sepcifier" }, { "type": "BLANK" } ] }, { "type": "STRING", "value": "typedef" }, { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "attribute_specifier" }, { "type": "BLANK" } ] }, { "type": "REPEAT", "content": { "type": "SYMBOL", "name": "type_qualifier" } }, { "type": "FIELD", "name": "type", "content": { "type": "SYMBOL", "name": "_type_specifier" } }, { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "attribute_specifier" }, { "type": "BLANK" } ] }, { "type": "REPEAT", "content": { "type": "SYMBOL", "name": "type_qualifier" } }, { "type": "CHOICE", "members": [ { "type": "FIELD", "name": "declarator", "content": { "type": "SYMBOL", "name": "_type_declarator" } }, { "type": "BLANK" } ] }, { "type": "CHOICE", "members": [ { "type": "CHOICE", "members": [ { "type": "FIELD", "name": "attributes", "content": { "type": "SYMBOL", "name": "identifier" } }, { "type": "SYMBOL", "name": "attribute_specifier" } ] }, { "type": "BLANK" } ] }, { "type": "STRING", "value": ";" } ] } }, "_declaration_specifiers": { "type": "SEQ", "members": [ { "type": "REPEAT", "content": { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "storage_class_specifier" }, { "type": "SYMBOL", "name": "type_qualifier" }, { "type": "SYMBOL", "name": "attribute_specifier" }, { "type": "SYMBOL", "name": "ms_declspec_modifier" } ] } }, { "type": "FIELD", "name": "type", "content": { "type": "SYMBOL", "name": "_type_specifier" } }, { "type": "REPEAT", "content": { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "storage_class_specifier" }, { "type": "SYMBOL", "name": "type_qualifier" }, { "type": "SYMBOL", "name": "attribute_specifier" }, { "type": "SYMBOL", "name": "ms_declspec_modifier" } ] } } ] }, "linkage_specification": { "type": "SEQ", "members": [ { "type": "STRING", "value": "extern" }, { "type": "FIELD", "name": "value", "content": { "type": "SYMBOL", "name": "string_literal" } }, { "type": "FIELD", "name": "body", "content": { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "function_definition" }, { "type": "SYMBOL", "name": "declaration" }, { "type": "SYMBOL", "name": "declaration_list" } ] } } ] }, "attribute_specifier": { "type": "PREC_DYNAMIC", "value": 1, "content": { "type": "PREC_LEFT", "value": 0, "content": { "type": "CHOICE", "members": [ { "type": "STRING", "value": "__attribute__((unused))" }, { "type": "SEQ", "members": [ { "type": "CHOICE", "members": [ { "type": "STRING", "value": "__attribute" }, { "type": "STRING", "value": "__attribute__" } ] }, { "type": "STRING", "value": "(" }, { "type": "SYMBOL", "name": "argument_list" }, { "type": "STRING", "value": ")" } ] }, { "type": "SYMBOL", "name": "method_attribute_specifier" }, { "type": "SYMBOL", "name": "method_variadic_arguments_attribute_specifier" }, { "type": "SYMBOL", "name": "availability_attribute_specifier" } ] } } }, "ms_declspec_modifier": { "type": "SEQ", "members": [ { "type": "STRING", "value": "__declspec" }, { "type": "STRING", "value": "(" }, { "type": "SYMBOL", "name": "identifier" }, { "type": "STRING", "value": ")" } ] }, "ms_based_modifier": { "type": "SEQ", "members": [ { "type": "STRING", "value": "__based" }, { "type": "SYMBOL", "name": "argument_list" } ] }, "ms_call_modifier": { "type": "CHOICE", "members": [ { "type": "STRING", "value": "__cdecl" }, { "type": "STRING", "value": "__clrcall" }, { "type": "STRING", "value": "__stdcall" }, { "type": "STRING", "value": "__fastcall" }, { "type": "STRING", "value": "__thiscall" }, { "type": "STRING", "value": "__vectorcall" } ] }, "ms_restrict_modifier": { "type": "STRING", "value": "__restrict" }, "ms_unsigned_ptr_modifier": { "type": "STRING", "value": "__uptr" }, "ms_signed_ptr_modifier": { "type": "STRING", "value": "__sptr" }, "ms_unaligned_ptr_modifier": { "type": "CHOICE", "members": [ { "type": "STRING", "value": "_unaligned" }, { "type": "STRING", "value": "__unaligned" } ] }, "ms_pointer_modifier": { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "ms_unaligned_ptr_modifier" }, { "type": "SYMBOL", "name": "ms_restrict_modifier" }, { "type": "SYMBOL", "name": "ms_unsigned_ptr_modifier" }, { "type": "SYMBOL", "name": "ms_signed_ptr_modifier" } ] }, "declaration_list": { "type": "SEQ", "members": [ { "type": "STRING", "value": "{" }, { "type": "REPEAT", "content": { "type": "SYMBOL", "name": "_top_level_item" } }, { "type": "STRING", "value": "}" } ] }, "_declarator": { "type": "CHOICE", "members": [ { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "pointer_declarator" }, { "type": "SYMBOL", "name": "function_declarator" }, { "type": "SYMBOL", "name": "array_declarator" }, { "type": "SYMBOL", "name": "parenthesized_declarator" }, { "type": "SYMBOL", "name": "identifier" } ] }, { "type": "SYMBOL", "name": "block_declarator" } ] }, "_field_declarator": { "type": "CHOICE", "members": [ { "type": "CHOICE", "members": [ { "type": "ALIAS", "content": { "type": "SYMBOL", "name": "pointer_field_declarator" }, "named": true, "value": "pointer_declarator" }, { "type": "ALIAS", "content": { "type": "SYMBOL", "name": "function_field_declarator" }, "named": true, "value": "function_declarator" }, { "type": "ALIAS", "content": { "type": "SYMBOL", "name": "array_field_declarator" }, "named": true, "value": "array_declarator" }, { "type": "ALIAS", "content": { "type": "SYMBOL", "name": "parenthesized_field_declarator" }, "named": true, "value": "parenthesized_declarator" }, { "type": "SYMBOL", "name": "_field_identifier" } ] }, { "type": "SYMBOL", "name": "block_declarator" } ] }, "_type_declarator": { "type": "CHOICE", "members": [ { "type": "CHOICE", "members": [ { "type": "ALIAS", "content": { "type": "SYMBOL", "name": "pointer_type_declarator" }, "named": true, "value": "pointer_declarator" }, { "type": "ALIAS", "content": { "type": "SYMBOL", "name": "function_type_declarator" }, "named": true, "value": "function_declarator" }, { "type": "ALIAS", "content": { "type": "SYMBOL", "name": "array_type_declarator" }, "named": true, "value": "array_declarator" }, { "type": "ALIAS", "content": { "type": "SYMBOL", "name": "parenthesized_type_declarator" }, "named": true, "value": "parenthesized_declarator" }, { "type": "SYMBOL", "name": "_type_identifier" } ] }, { "type": "SYMBOL", "name": "block_declarator" } ] }, "_abstract_declarator": { "type": "CHOICE", "members": [ { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "abstract_pointer_declarator" }, { "type": "SYMBOL", "name": "abstract_function_declarator" }, { "type": "SYMBOL", "name": "abstract_array_declarator" }, { "type": "SYMBOL", "name": "abstract_parenthesized_declarator" } ] }, { "type": "SYMBOL", "name": "block_abstract_declarator" } ] }, "parenthesized_declarator": { "type": "PREC_DYNAMIC", "value": -10, "content": { "type": "SEQ", "members": [ { "type": "STRING", "value": "(" }, { "type": "SYMBOL", "name": "_declarator" }, { "type": "STRING", "value": ")" } ] } }, "parenthesized_field_declarator": { "type": "PREC_DYNAMIC", "value": -10, "content": { "type": "SEQ", "members": [ { "type": "STRING", "value": "(" }, { "type": "SYMBOL", "name": "_field_declarator" }, { "type": "STRING", "value": ")" } ] } }, "parenthesized_type_declarator": { "type": "PREC_DYNAMIC", "value": -10, "content": { "type": "SEQ", "members": [ { "type": "STRING", "value": "(" }, { "type": "SYMBOL", "name": "_type_declarator" }, { "type": "STRING", "value": ")" } ] } }, "abstract_parenthesized_declarator": { "type": "PREC", "value": 1, "content": { "type": "SEQ", "members": [ { "type": "STRING", "value": "(" }, { "type": "SYMBOL", "name": "_abstract_declarator" }, { "type": "STRING", "value": ")" } ] } }, "pointer_declarator": { "type": "PREC_DYNAMIC", "value": 1, "content": { "type": "PREC_RIGHT", "value": 0, "content": { "type": "SEQ", "members": [ { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "ms_based_modifier" }, { "type": "BLANK" } ] }, { "type": "STRING", "value": "*" }, { "type": "REPEAT", "content": { "type": "SYMBOL", "name": "ms_pointer_modifier" } }, { "type": "REPEAT", "content": { "type": "SYMBOL", "name": "type_qualifier" } }, { "type": "FIELD", "name": "declarator", "content": { "type": "SYMBOL", "name": "_declarator" } } ] } } }, "pointer_field_declarator": { "type": "PREC_DYNAMIC", "value": 1, "content": { "type": "PREC_RIGHT", "value": 0, "content": { "type": "SEQ", "members": [ { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "ms_based_modifier" }, { "type": "BLANK" } ] }, { "type": "STRING", "value": "*" }, { "type": "REPEAT", "content": { "type": "SYMBOL", "name": "ms_pointer_modifier" } }, { "type": "REPEAT", "content": { "type": "SYMBOL", "name": "type_qualifier" } }, { "type": "FIELD", "name": "declarator", "content": { "type": "SYMBOL", "name": "_field_declarator" } } ] } } }, "pointer_type_declarator": { "type": "PREC_DYNAMIC", "value": 1, "content": { "type": "PREC_RIGHT", "value": 0, "content": { "type": "SEQ", "members": [ { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "ms_based_modifier" }, { "type": "BLANK" } ] }, { "type": "STRING", "value": "*" }, { "type": "REPEAT", "content": { "type": "SYMBOL", "name": "ms_pointer_modifier" } }, { "type": "REPEAT", "content": { "type": "SYMBOL", "name": "type_qualifier" } }, { "type": "FIELD", "name": "declarator", "content": { "type": "SYMBOL", "name": "_type_declarator" } } ] } } }, "abstract_pointer_declarator": { "type": "PREC_DYNAMIC", "value": 1, "content": { "type": "PREC_RIGHT", "value": 0, "content": { "type": "SEQ", "members": [ { "type": "STRING", "value": "*" }, { "type": "REPEAT", "content": { "type": "SYMBOL", "name": "type_qualifier" } }, { "type": "FIELD", "name": "declarator", "content": { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "_abstract_declarator" }, { "type": "BLANK" } ] } } ] } } }, "function_declarator": { "type": "PREC", "value": 1, "content": { "type": "SEQ", "members": [ { "type": "FIELD", "name": "declarator", "content": { "type": "SYMBOL", "name": "_declarator" } }, { "type": "FIELD", "name": "parameters", "content": { "type": "SYMBOL", "name": "parameter_list" } }, { "type": "REPEAT", "content": { "type": "SYMBOL", "name": "attribute_specifier" } } ] } }, "function_field_declarator": { "type": "PREC", "value": 1, "content": { "type": "SEQ", "members": [ { "type": "FIELD", "name": "declarator", "content": { "type": "SYMBOL", "name": "_field_declarator" } }, { "type": "FIELD", "name": "parameters", "content": { "type": "SYMBOL", "name": "parameter_list" } } ] } }, "function_type_declarator": { "type": "PREC", "value": 1, "content": { "type": "SEQ", "members": [ { "type": "FIELD", "name": "declarator", "content": { "type": "SYMBOL", "name": "_type_declarator" } }, { "type": "FIELD", "name": "parameters", "content": { "type": "SYMBOL", "name": "parameter_list" } } ] } }, "abstract_function_declarator": { "type": "PREC", "value": 1, "content": { "type": "SEQ", "members": [ { "type": "FIELD", "name": "declarator", "content": { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "_abstract_declarator" }, { "type": "BLANK" } ] } }, { "type": "FIELD", "name": "parameters", "content": { "type": "SYMBOL", "name": "parameter_list" } } ] } }, "array_declarator": { "type": "PREC", "value": 1, "content": { "type": "SEQ", "members": [ { "type": "FIELD", "name": "declarator", "content": { "type": "SYMBOL", "name": "_declarator" } }, { "type": "STRING", "value": "[" }, { "type": "REPEAT", "content": { "type": "SYMBOL", "name": "type_qualifier" } }, { "type": "FIELD", "name": "size", "content": { "type": "CHOICE", "members": [ { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "_expression" }, { "type": "STRING", "value": "*" } ] }, { "type": "BLANK" } ] } }, { "type": "STRING", "value": "]" } ] } }, "array_field_declarator": { "type": "PREC", "value": 1, "content": { "type": "SEQ", "members": [ { "type": "FIELD", "name": "declarator", "content": { "type": "SYMBOL", "name": "_field_declarator" } }, { "type": "STRING", "value": "[" }, { "type": "REPEAT", "content": { "type": "SYMBOL", "name": "type_qualifier" } }, { "type": "FIELD", "name": "size", "content": { "type": "CHOICE", "members": [ { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "_expression" }, { "type": "STRING", "value": "*" } ] }, { "type": "BLANK" } ] } }, { "type": "STRING", "value": "]" } ] } }, "array_type_declarator": { "type": "PREC", "value": 1, "content": { "type": "SEQ", "members": [ { "type": "FIELD", "name": "declarator", "content": { "type": "SYMBOL", "name": "_type_declarator" } }, { "type": "STRING", "value": "[" }, { "type": "REPEAT", "content": { "type": "SYMBOL", "name": "type_qualifier" } }, { "type": "FIELD", "name": "size", "content": { "type": "CHOICE", "members": [ { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "_expression" }, { "type": "STRING", "value": "*" } ] }, { "type": "BLANK" } ] } }, { "type": "STRING", "value": "]" } ] } }, "abstract_array_declarator": { "type": "PREC", "value": 1, "content": { "type": "SEQ", "members": [ { "type": "FIELD", "name": "declarator", "content": { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "_abstract_declarator" }, { "type": "BLANK" } ] } }, { "type": "STRING", "value": "[" }, { "type": "REPEAT", "content": { "type": "SYMBOL", "name": "type_qualifier" } }, { "type": "FIELD", "name": "size", "content": { "type": "CHOICE", "members": [ { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "_expression" }, { "type": "STRING", "value": "*" } ] }, { "type": "BLANK" } ] } }, { "type": "STRING", "value": "]" } ] } }, "init_declarator": { "type": "SEQ", "members": [ { "type": "FIELD", "name": "declarator", "content": { "type": "SYMBOL", "name": "_declarator" } }, { "type": "STRING", "value": "=" }, { "type": "FIELD", "name": "value", "content": { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "initializer_list" }, { "type": "SYMBOL", "name": "_expression" } ] } } ] }, "compound_statement": { "type": "SEQ", "members": [ { "type": "STRING", "value": "{" }, { "type": "REPEAT", "content": { "type": "SYMBOL", "name": "_top_level_item" } }, { "type": "STRING", "value": "}" } ] }, "storage_class_specifier": { "type": "CHOICE", "members": [ { "type": "CHOICE", "members": [ { "type": "STRING", "value": "extern" }, { "type": "STRING", "value": "static" }, { "type": "STRING", "value": "auto" }, { "type": "STRING", "value": "register" }, { "type": "STRING", "value": "inline" } ] }, { "type": "STRING", "value": "FOUNDATION_EXPORT" }, { "type": "STRING", "value": "FOUNDATION_EXTERN" }, { "type": "STRING", "value": "FOUNDATION_STATIC_INLINE" }, { "type": "STRING", "value": "NS_INLINE" }, { "type": "STRING", "value": "UIKIT_EXTERN" }, { "type": "STRING", "value": "CG_EXTERN" }, { "type": "STRING", "value": "CG_INLINE" } ] }, "type_qualifier": { "type": "CHOICE", "members": [ { "type": "CHOICE", "members": [ { "type": "STRING", "value": "const" }, { "type": "STRING", "value": "volatile" }, { "type": "STRING", "value": "restrict" }, { "type": "STRING", "value": "_Atomic" } ] }, { "type": "STRING", "value": "in" }, { "type": "STRING", "value": "out" }, { "type": "STRING", "value": "inout" }, { "type": "STRING", "value": "bycopy" }, { "type": "STRING", "value": "byref" }, { "type": "STRING", "value": "oneway" }, { "type": "STRING", "value": "_Nullable" }, { "type": "STRING", "value": "_Nonnull" }, { "type": "STRING", "value": "_Nullable_result" }, { "type": "STRING", "value": "_Null_unspecified" }, { "type": "STRING", "value": "__autoreleasing" }, { "type": "STRING", "value": "__nullable" }, { "type": "STRING", "value": "__nonnull" }, { "type": "STRING", "value": "__strong" }, { "type": "STRING", "value": "__weak" }, { "type": "STRING", "value": "__bridge" }, { "type": "STRING", "value": "__bridge_transfer" }, { "type": "STRING", "value": "__bridge_retained" }, { "type": "STRING", "value": "__unsafe_unretained" }, { "type": "STRING", "value": "__block" }, { "type": "STRING", "value": "__kindof" }, { "type": "STRING", "value": "__unused" }, { "type": "STRING", "value": "_Complex" }, { "type": "STRING", "value": "__complex" }, { "type": "STRING", "value": "IBOutlet" }, { "type": "STRING", "value": "IBInspectable" }, { "type": "STRING", "value": "NS_VALID_UNTIL_END_OF_SCOPE" } ] }, "_type_specifier": { "type": "CHOICE", "members": [ { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "struct_specifier" }, { "type": "SYMBOL", "name": "union_specifier" }, { "type": "SYMBOL", "name": "enum_specifier" }, { "type": "SYMBOL", "name": "macro_type_specifier" }, { "type": "SYMBOL", "name": "sized_type_specifier" }, { "type": "SYMBOL", "name": "primitive_type" }, { "type": "SYMBOL", "name": "_type_identifier" } ] }, { "type": "SYMBOL", "name": "id" }, { "type": "SYMBOL", "name": "SEL" }, { "type": "SYMBOL", "name": "IMP" }, { "type": "SYMBOL", "name": "Class" }, { "type": "SYMBOL", "name": "BOOL" }, { "type": "SYMBOL", "name": "auto" }, { "type": "SYMBOL", "name": "instancetype" }, { "type": "SYMBOL", "name": "typeof_specifier" }, { "type": "SYMBOL", "name": "atomic_specifier" }, { "type": "SYMBOL", "name": "generic_type_specifier" } ] }, "sized_type_specifier": { "type": "SEQ", "members": [ { "type": "REPEAT1", "content": { "type": "CHOICE", "members": [ { "type": "STRING", "value": "signed" }, { "type": "STRING", "value": "unsigned" }, { "type": "STRING", "value": "long" }, { "type": "STRING", "value": "short" } ] } }, { "type": "FIELD", "name": "type", "content": { "type": "CHOICE", "members": [ { "type": "CHOICE", "members": [ { "type": "PREC_DYNAMIC", "value": -1, "content": { "type": "SYMBOL", "name": "_type_identifier" } }, { "type": "SYMBOL", "name": "primitive_type" } ] }, { "type": "BLANK" } ] } } ] }, "primitive_type": { "type": "TOKEN", "content": { "type": "CHOICE", "members": [ { "type": "STRING", "value": "bool" }, { "type": "STRING", "value": "char" }, { "type": "STRING", "value": "int" }, { "type": "STRING", "value": "float" }, { "type": "STRING", "value": "double" }, { "type": "STRING", "value": "void" }, { "type": "STRING", "value": "size_t" }, { "type": "STRING", "value": "ssize_t" }, { "type": "STRING", "value": "intptr_t" }, { "type": "STRING", "value": "uintptr_t" }, { "type": "STRING", "value": "charptr_t" }, { "type": "STRING", "value": "int8_t" }, { "type": "STRING", "value": "int16_t" }, { "type": "STRING", "value": "int32_t" }, { "type": "STRING", "value": "int64_t" }, { "type": "STRING", "value": "uint8_t" }, { "type": "STRING", "value": "uint16_t" }, { "type": "STRING", "value": "uint32_t" }, { "type": "STRING", "value": "uint64_t" }, { "type": "STRING", "value": "char8_t" }, { "type": "STRING", "value": "char16_t" }, { "type": "STRING", "value": "char32_t" }, { "type": "STRING", "value": "char64_t" } ] } }, "enum_specifier": { "type": "CHOICE", "members": [ { "type": "SEQ", "members": [ { "type": "STRING", "value": "enum" }, { "type": "CHOICE", "members": [ { "type": "SEQ", "members": [ { "type": "FIELD", "name": "name", "content": { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "_type_identifier" }, { "type": "BLANK" } ] } }, { "type": "FIELD", "name": "superclass", "content": { "type": "CHOICE", "members": [ { "type": "SEQ", "members": [ { "type": "STRING", "value": ":" }, { "type": "SYMBOL", "name": "_type_specifier" } ] }, { "type": "BLANK" } ] } }, { "type": "FIELD", "name": "body", "content": { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "enumerator_list" }, { "type": "BLANK" } ] } } ] }, { "type": "FIELD", "name": "body", "content": { "type": "SYMBOL", "name": "enumerator_list" } } ] } ] }, { "type": "SEQ", "members": [ { "type": "CHOICE", "members": [ { "type": "STRING", "value": "NS_ENUM" }, { "type": "STRING", "value": "NS_ERROR_ENUM" }, { "type": "STRING", "value": "NS_OPTIONS" } ] }, { "type": "STRING", "value": "(" }, { "type": "FIELD", "name": "type", "content": { "type": "SYMBOL", "name": "_type_specifier" } }, { "type": "CHOICE", "members": [ { "type": "SEQ", "members": [ { "type": "STRING", "value": "," }, { "type": "FIELD", "name": "name", "content": { "type": "SYMBOL", "name": "_type_identifier" } } ] }, { "type": "BLANK" } ] }, { "type": "STRING", "value": ")" }, { "type": "FIELD", "name": "body", "content": { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "enumerator_list" }, { "type": "BLANK" } ] } } ] } ] }, "enumerator_list": { "type": "SEQ", "members": [ { "type": "STRING", "value": "{" }, { "type": "CHOICE", "members": [ { "type": "SEQ", "members": [ { "type": "SYMBOL", "name": "enumerator" }, { "type": "REPEAT", "content": { "type": "SEQ", "members": [ { "type": "STRING", "value": "," }, { "type": "SYMBOL", "name": "enumerator" } ] } } ] }, { "type": "BLANK" } ] }, { "type": "CHOICE", "members": [ { "type": "STRING", "value": "," }, { "type": "BLANK" } ] }, { "type": "STRING", "value": "}" } ] }, "struct_specifier": { "type": "CHOICE", "members": [ { "type": "SEQ", "members": [ { "type": "STRING", "value": "struct" }, { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "attribute_specifier" }, { "type": "BLANK" } ] }, { "type": "CHOICE", "members": [ { "type": "SEQ", "members": [ { "type": "FIELD", "name": "name", "content": { "type": "SYMBOL", "name": "_type_identifier" } }, { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "superclass_reference" }, { "type": "BLANK" } ] }, { "type": "FIELD", "name": "body", "content": { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "field_declaration_list" }, { "type": "BLANK" } ] } } ] }, { "type": "FIELD", "name": "body", "content": { "type": "SYMBOL", "name": "field_declaration_list" } } ] } ] }, { "type": "SEQ", "members": [ { "type": "STRING", "value": "struct" }, { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "attribute_specifier" }, { "type": "BLANK" } ] }, { "type": "FIELD", "name": "name", "content": { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "identifier" }, { "type": "BLANK" } ] } }, { "type": "FIELD", "name": "body", "content": { "type": "SEQ", "members": [ { "type": "STRING", "value": "@defs" }, { "type": "STRING", "value": "(" }, { "type": "FIELD", "name": "class_name", "content": { "type": "SYMBOL", "name": "identifier" } }, { "type": "STRING", "value": ")" } ] } } ] } ] }, "union_specifier": { "type": "SEQ", "members": [ { "type": "STRING", "value": "union" }, { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "ms_declspec_modifier" }, { "type": "BLANK" } ] }, { "type": "CHOICE", "members": [ { "type": "SEQ", "members": [ { "type": "FIELD", "name": "name", "content": { "type": "SYMBOL", "name": "_type_identifier" } }, { "type": "FIELD", "name": "body", "content": { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "field_declaration_list" }, { "type": "BLANK" } ] } } ] }, { "type": "FIELD", "name": "body", "content": { "type": "SYMBOL", "name": "field_declaration_list" } } ] } ] }, "field_declaration_list": { "type": "SEQ", "members": [ { "type": "STRING", "value": "{" }, { "type": "REPEAT", "content": { "type": "SYMBOL", "name": "_field_declaration_list_item" } }, { "type": "STRING", "value": "}" } ] }, "_field_declaration_list_item": { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "field_declaration" }, { "type": "SYMBOL", "name": "preproc_def" }, { "type": "SYMBOL", "name": "preproc_function_def" }, { "type": "SYMBOL", "name": "preproc_call" }, { "type": "ALIAS", "content": { "type": "SYMBOL", "name": "preproc_if_in_field_declaration_list" }, "named": true, "value": "preproc_if" }, { "type": "ALIAS", "content": { "type": "SYMBOL", "name": "preproc_ifdef_in_field_declaration_list" }, "named": true, "value": "preproc_ifdef" } ] }, "field_declaration": { "type": "SEQ", "members": [ { "type": "SYMBOL", "name": "_declaration_specifiers" }, { "type": "CHOICE", "members": [ { "type": "SEQ", "members": [ { "type": "FIELD", "name": "declarator", "content": { "type": "SYMBOL", "name": "_field_declarator" } }, { "type": "REPEAT", "content": { "type": "SEQ", "members": [ { "type": "STRING", "value": "," }, { "type": "FIELD", "name": "declarator", "content": { "type": "SYMBOL", "name": "_field_declarator" } } ] } } ] }, { "type": "BLANK" } ] }, { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "bitfield_clause" }, { "type": "BLANK" } ] }, { "type": "STRING", "value": ";" } ] }, "bitfield_clause": { "type": "SEQ", "members": [ { "type": "STRING", "value": ":" }, { "type": "SYMBOL", "name": "_expression" } ] }, "enumerator": { "type": "SEQ", "members": [ { "type": "FIELD", "name": "name", "content": { "type": "SYMBOL", "name": "identifier" } }, { "type": "CHOICE", "members": [ { "type": "SEQ", "members": [ { "type": "STRING", "value": "=" }, { "type": "FIELD", "name": "value", "content": { "type": "SYMBOL", "name": "_expression" } } ] }, { "type": "BLANK" } ] }, { "type": "REPEAT", "content": { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "attribute_specifier" }, { "type": "SYMBOL", "name": "swift_name_attribute_sepcifier" } ] } } ] }, "parameter_list": { "type": "SEQ", "members": [ { "type": "STRING", "value": "(" }, { "type": "CHOICE", "members": [ { "type": "SEQ", "members": [ { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "parameter_declaration" }, { "type": "STRING", "value": "..." } ] }, { "type": "REPEAT", "content": { "type": "SEQ", "members": [ { "type": "STRING", "value": "," }, { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "parameter_declaration" }, { "type": "STRING", "value": "..." } ] } ] } } ] }, { "type": "BLANK" } ] }, { "type": "STRING", "value": ")" } ] }, "parameter_declaration": { "type": "SEQ", "members": [ { "type": "SYMBOL", "name": "_declaration_specifiers" }, { "type": "CHOICE", "members": [ { "type": "FIELD", "name": "declarator", "content": { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "_declarator" }, { "type": "SYMBOL", "name": "_abstract_declarator" } ] } }, { "type": "BLANK" } ] } ] }, "_statement": { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "case_statement" }, { "type": "SYMBOL", "name": "_non_case_statement" } ] }, "_non_case_statement": { "type": "CHOICE", "members": [ { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "labeled_statement" }, { "type": "SYMBOL", "name": "compound_statement" }, { "type": "SYMBOL", "name": "expression_statement" }, { "type": "SYMBOL", "name": "if_statement" }, { "type": "SYMBOL", "name": "switch_statement" }, { "type": "SYMBOL", "name": "do_statement" }, { "type": "SYMBOL", "name": "while_statement" }, { "type": "SYMBOL", "name": "for_statement" }, { "type": "SYMBOL", "name": "return_statement" }, { "type": "SYMBOL", "name": "break_statement" }, { "type": "SYMBOL", "name": "continue_statement" }, { "type": "SYMBOL", "name": "goto_statement" } ] }, { "type": "SYMBOL", "name": "autoreleasepool_statement" }, { "type": "SYMBOL", "name": "synchronized_statement" }, { "type": "SYMBOL", "name": "for_in_statement" }, { "type": "SYMBOL", "name": "try_catch_statement" }, { "type": "SYMBOL", "name": "throw_statement" } ] }, "labeled_statement": { "type": "SEQ", "members": [ { "type": "FIELD", "name": "label", "content": { "type": "SYMBOL", "name": "_statement_identifier" } }, { "type": "STRING", "value": ":" }, { "type": "SYMBOL", "name": "_statement" } ] }, "expression_statement": { "type": "SEQ", "members": [ { "type": "CHOICE", "members": [ { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "_expression" }, { "type": "SYMBOL", "name": "comma_expression" } ] }, { "type": "BLANK" } ] }, { "type": "STRING", "value": ";" } ] }, "if_statement": { "type": "PREC_RIGHT", "value": 0, "content": { "type": "SEQ", "members": [ { "type": "STRING", "value": "if" }, { "type": "FIELD", "name": "condition", "content": { "type": "SYMBOL", "name": "parenthesized_expression" } }, { "type": "FIELD", "name": "consequence", "content": { "type": "SYMBOL", "name": "_statement" } }, { "type": "CHOICE", "members": [ { "type": "SEQ", "members": [ { "type": "STRING", "value": "else" }, { "type": "FIELD", "name": "alternative", "content": { "type": "SYMBOL", "name": "_statement" } } ] }, { "type": "BLANK" } ] } ] } }, "switch_statement": { "type": "SEQ", "members": [ { "type": "STRING", "value": "switch" }, { "type": "FIELD", "name": "condition", "content": { "type": "SYMBOL", "name": "parenthesized_expression" } }, { "type": "FIELD", "name": "body", "content": { "type": "SYMBOL", "name": "compound_statement" } } ] }, "case_statement": { "type": "PREC_RIGHT", "value": 0, "content": { "type": "SEQ", "members": [ { "type": "CHOICE", "members": [ { "type": "SEQ", "members": [ { "type": "STRING", "value": "case" }, { "type": "FIELD", "name": "value", "content": { "type": "SYMBOL", "name": "_expression" } } ] }, { "type": "STRING", "value": "default" } ] }, { "type": "STRING", "value": ":" }, { "type": "REPEAT", "content": { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "_non_case_statement" }, { "type": "SYMBOL", "name": "declaration" }, { "type": "SYMBOL", "name": "type_definition" } ] } } ] } }, "while_statement": { "type": "SEQ", "members": [ { "type": "STRING", "value": "while" }, { "type": "FIELD", "name": "condition", "content": { "type": "SYMBOL", "name": "parenthesized_expression" } }, { "type": "FIELD", "name": "body", "content": { "type": "SYMBOL", "name": "_statement" } } ] }, "do_statement": { "type": "SEQ", "members": [ { "type": "STRING", "value": "do" }, { "type": "FIELD", "name": "body", "content": { "type": "SYMBOL", "name": "_statement" } }, { "type": "STRING", "value": "while" }, { "type": "FIELD", "name": "condition", "content": { "type": "SYMBOL", "name": "parenthesized_expression" } }, { "type": "STRING", "value": ";" } ] }, "for_statement": { "type": "SEQ", "members": [ { "type": "STRING", "value": "for" }, { "type": "STRING", "value": "(" }, { "type": "CHOICE", "members": [ { "type": "FIELD", "name": "initializer", "content": { "type": "SYMBOL", "name": "declaration" } }, { "type": "SEQ", "members": [ { "type": "FIELD", "name": "initializer", "content": { "type": "CHOICE", "members": [ { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "_expression" }, { "type": "SYMBOL", "name": "comma_expression" } ] }, { "type": "BLANK" } ] } }, { "type": "STRING", "value": ";" } ] } ] }, { "type": "FIELD", "name": "condition", "content": { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "_expression" }, { "type": "BLANK" } ] } }, { "type": "STRING", "value": ";" }, { "type": "FIELD", "name": "update", "content": { "type": "CHOICE", "members": [ { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "_expression" }, { "type": "SYMBOL", "name": "comma_expression" } ] }, { "type": "BLANK" } ] } }, { "type": "STRING", "value": ")" }, { "type": "SYMBOL", "name": "_statement" } ] }, "return_statement": { "type": "SEQ", "members": [ { "type": "STRING", "value": "return" }, { "type": "CHOICE", "members": [ { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "_expression" }, { "type": "SYMBOL", "name": "comma_expression" } ] }, { "type": "BLANK" } ] }, { "type": "STRING", "value": ";" } ] }, "break_statement": { "type": "SEQ", "members": [ { "type": "STRING", "value": "break" }, { "type": "STRING", "value": ";" } ] }, "continue_statement": { "type": "SEQ", "members": [ { "type": "STRING", "value": "continue" }, { "type": "STRING", "value": ";" } ] }, "goto_statement": { "type": "SEQ", "members": [ { "type": "STRING", "value": "goto" }, { "type": "FIELD", "name": "label", "content": { "type": "SYMBOL", "name": "_statement_identifier" } }, { "type": "STRING", "value": ";" } ] }, "_expression": { "type": "CHOICE", "members": [ { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "conditional_expression" }, { "type": "SYMBOL", "name": "assignment_expression" }, { "type": "SYMBOL", "name": "binary_expression" }, { "type": "SYMBOL", "name": "unary_expression" }, { "type": "SYMBOL", "name": "update_expression" }, { "type": "SYMBOL", "name": "cast_expression" }, { "type": "SYMBOL", "name": "pointer_expression" }, { "type": "SYMBOL", "name": "sizeof_expression" }, { "type": "SYMBOL", "name": "subscript_expression" }, { "type": "SYMBOL", "name": "call_expression" }, { "type": "SYMBOL", "name": "field_expression" }, { "type": "SYMBOL", "name": "compound_literal_expression" }, { "type": "SYMBOL", "name": "identifier" }, { "type": "SYMBOL", "name": "number_literal" }, { "type": "SYMBOL", "name": "string_literal" }, { "type": "SYMBOL", "name": "true" }, { "type": "SYMBOL", "name": "false" }, { "type": "SYMBOL", "name": "null" }, { "type": "SYMBOL", "name": "concatenated_string" }, { "type": "SYMBOL", "name": "char_literal" }, { "type": "SYMBOL", "name": "parenthesized_expression" } ] }, { "type": "SYMBOL", "name": "self" }, { "type": "SYMBOL", "name": "super" }, { "type": "SYMBOL", "name": "nil" }, { "type": "SYMBOL", "name": "YES" }, { "type": "SYMBOL", "name": "NO" }, { "type": "SYMBOL", "name": "message_expression" }, { "type": "SYMBOL", "name": "selector_expression" }, { "type": "SYMBOL", "name": "protocol_expression" }, { "type": "SYMBOL", "name": "encode_expression" }, { "type": "SYMBOL", "name": "number_expression" }, { "type": "SYMBOL", "name": "string_expression" }, { "type": "SYMBOL", "name": "object_expression" }, { "type": "SYMBOL", "name": "dictionary_expression" }, { "type": "SYMBOL", "name": "array_expression" }, { "type": "SYMBOL", "name": "boolean_expression" }, { "type": "SYMBOL", "name": "block_expression" }, { "type": "SYMBOL", "name": "available_expression" }, { "type": "SYMBOL", "name": "statement_expression" }, { "type": "SYMBOL", "name": "va_arg_expression" } ] }, "comma_expression": { "type": "SEQ", "members": [ { "type": "FIELD", "name": "left", "content": { "type": "SYMBOL", "name": "_expression" } }, { "type": "STRING", "value": "," }, { "type": "FIELD", "name": "right", "content": { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "_expression" }, { "type": "SYMBOL", "name": "comma_expression" } ] } } ] }, "conditional_expression": { "type": "PREC_RIGHT", "value": -2, "content": { "type": "CHOICE", "members": [ { "type": "PREC_RIGHT", "value": -2, "content": { "type": "SEQ", "members": [ { "type": "FIELD", "name": "condition", "content": { "type": "SYMBOL", "name": "_expression" } }, { "type": "STRING", "value": "?" }, { "type": "FIELD", "name": "consequence", "content": { "type": "SYMBOL", "name": "_expression" } }, { "type": "STRING", "value": ":" }, { "type": "FIELD", "name": "alternative", "content": { "type": "SYMBOL", "name": "_expression" } } ] } }, { "type": "SEQ", "members": [ { "type": "FIELD", "name": "condition", "content": { "type": "SYMBOL", "name": "_expression" } }, { "type": "STRING", "value": "?" }, { "type": "STRING", "value": ":" }, { "type": "FIELD", "name": "alternative", "content": { "type": "SYMBOL", "name": "_expression" } } ] } ] } }, "_assignment_left_expression": { "type": "CHOICE", "members": [ { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "identifier" }, { "type": "SYMBOL", "name": "call_expression" }, { "type": "SYMBOL", "name": "field_expression" }, { "type": "SYMBOL", "name": "pointer_expression" }, { "type": "SYMBOL", "name": "subscript_expression" }, { "type": "SYMBOL", "name": "parenthesized_expression" } ] }, { "type": "SYMBOL", "name": "self" } ] }, "assignment_expression": { "type": "PREC_RIGHT", "value": -1, "content": { "type": "SEQ", "members": [ { "type": "FIELD", "name": "left", "content": { "type": "SYMBOL", "name": "_assignment_left_expression" } }, { "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": "|=" } ] }, { "type": "FIELD", "name": "right", "content": { "type": "SYMBOL", "name": "_expression" } } ] } }, "pointer_expression": { "type": "PREC_LEFT", "value": 12, "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": "_expression" } } ] } }, "unary_expression": { "type": "PREC_LEFT", "value": 13, "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": "_expression" } } ] } }, "binary_expression": { "type": "CHOICE", "members": [ { "type": "PREC_LEFT", "value": 10, "content": { "type": "SEQ", "members": [ { "type": "FIELD", "name": "left", "content": { "type": "SYMBOL", "name": "_expression" } }, { "type": "FIELD", "name": "operator", "content": { "type": "STRING", "value": "+" } }, { "type": "FIELD", "name": "right", "content": { "type": "SYMBOL", "name": "_expression" } } ] } }, { "type": "PREC_LEFT", "value": 10, "content": { "type": "SEQ", "members": [ { "type": "FIELD", "name": "left", "content": { "type": "SYMBOL", "name": "_expression" } }, { "type": "FIELD", "name": "operator", "content": { "type": "STRING", "value": "-" } }, { "type": "FIELD", "name": "right", "content": { "type": "SYMBOL", "name": "_expression" } } ] } }, { "type": "PREC_LEFT", "value": 11, "content": { "type": "SEQ", "members": [ { "type": "FIELD", "name": "left", "content": { "type": "SYMBOL", "name": "_expression" } }, { "type": "FIELD", "name": "operator", "content": { "type": "STRING", "value": "*" } }, { "type": "FIELD", "name": "right", "content": { "type": "SYMBOL", "name": "_expression" } } ] } }, { "type": "PREC_LEFT", "value": 11, "content": { "type": "SEQ", "members": [ { "type": "FIELD", "name": "left", "content": { "type": "SYMBOL", "name": "_expression" } }, { "type": "FIELD", "name": "operator", "content": { "type": "STRING", "value": "/" } }, { "type": "FIELD", "name": "right", "content": { "type": "SYMBOL", "name": "_expression" } } ] } }, { "type": "PREC_LEFT", "value": 11, "content": { "type": "SEQ", "members": [ { "type": "FIELD", "name": "left", "content": { "type": "SYMBOL", "name": "_expression" } }, { "type": "FIELD", "name": "operator", "content": { "type": "STRING", "value": "%" } }, { "type": "FIELD", "name": "right", "content": { "type": "SYMBOL", "name": "_expression" } } ] } }, { "type": "PREC_LEFT", "value": 1, "content": { "type": "SEQ", "members": [ { "type": "FIELD", "name": "left", "content": { "type": "SYMBOL", "name": "_expression" } }, { "type": "FIELD", "name": "operator", "content": { "type": "STRING", "value": "||" } }, { "type": "FIELD", "name": "right", "content": { "type": "SYMBOL", "name": "_expression" } } ] } }, { "type": "PREC_LEFT", "value": 2, "content": { "type": "SEQ", "members": [ { "type": "FIELD", "name": "left", "content": { "type": "SYMBOL", "name": "_expression" } }, { "type": "FIELD", "name": "operator", "content": { "type": "STRING", "value": "&&" } }, { "type": "FIELD", "name": "right", "content": { "type": "SYMBOL", "name": "_expression" } } ] } }, { "type": "PREC_LEFT", "value": 3, "content": { "type": "SEQ", "members": [ { "type": "FIELD", "name": "left", "content": { "type": "SYMBOL", "name": "_expression" } }, { "type": "FIELD", "name": "operator", "content": { "type": "STRING", "value": "|" } }, { "type": "FIELD", "name": "right", "content": { "type": "SYMBOL", "name": "_expression" } } ] } }, { "type": "PREC_LEFT", "value": 4, "content": { "type": "SEQ", "members": [ { "type": "FIELD", "name": "left", "content": { "type": "SYMBOL", "name": "_expression" } }, { "type": "FIELD", "name": "operator", "content": { "type": "STRING", "value": "^" } }, { "type": "FIELD", "name": "right", "content": { "type": "SYMBOL", "name": "_expression" } } ] } }, { "type": "PREC_LEFT", "value": 5, "content": { "type": "SEQ", "members": [ { "type": "FIELD", "name": "left", "content": { "type": "SYMBOL", "name": "_expression" } }, { "type": "FIELD", "name": "operator", "content": { "type": "STRING", "value": "&" } }, { "type": "FIELD", "name": "right", "content": { "type": "SYMBOL", "name": "_expression" } } ] } }, { "type": "PREC_LEFT", "value": 6, "content": { "type": "SEQ", "members": [ { "type": "FIELD", "name": "left", "content": { "type": "SYMBOL", "name": "_expression" } }, { "type": "FIELD", "name": "operator", "content": { "type": "STRING", "value": "==" } }, { "type": "FIELD", "name": "right", "content": { "type": "SYMBOL", "name": "_expression" } } ] } }, { "type": "PREC_LEFT", "value": 6, "content": { "type": "SEQ", "members": [ { "type": "FIELD", "name": "left", "content": { "type": "SYMBOL", "name": "_expression" } }, { "type": "FIELD", "name": "operator", "content": { "type": "STRING", "value": "!=" } }, { "type": "FIELD", "name": "right", "content": { "type": "SYMBOL", "name": "_expression" } } ] } }, { "type": "PREC_LEFT", "value": 7, "content": { "type": "SEQ", "members": [ { "type": "FIELD", "name": "left", "content": { "type": "SYMBOL", "name": "_expression" } }, { "type": "FIELD", "name": "operator", "content": { "type": "STRING", "value": ">" } }, { "type": "FIELD", "name": "right", "content": { "type": "SYMBOL", "name": "_expression" } } ] } }, { "type": "PREC_LEFT", "value": 7, "content": { "type": "SEQ", "members": [ { "type": "FIELD", "name": "left", "content": { "type": "SYMBOL", "name": "_expression" } }, { "type": "FIELD", "name": "operator", "content": { "type": "STRING", "value": ">=" } }, { "type": "FIELD", "name": "right", "content": { "type": "SYMBOL", "name": "_expression" } } ] } }, { "type": "PREC_LEFT", "value": 7, "content": { "type": "SEQ", "members": [ { "type": "FIELD", "name": "left", "content": { "type": "SYMBOL", "name": "_expression" } }, { "type": "FIELD", "name": "operator", "content": { "type": "STRING", "value": "<=" } }, { "type": "FIELD", "name": "right", "content": { "type": "SYMBOL", "name": "_expression" } } ] } }, { "type": "PREC_LEFT", "value": 7, "content": { "type": "SEQ", "members": [ { "type": "FIELD", "name": "left", "content": { "type": "SYMBOL", "name": "_expression" } }, { "type": "FIELD", "name": "operator", "content": { "type": "STRING", "value": "<" } }, { "type": "FIELD", "name": "right", "content": { "type": "SYMBOL", "name": "_expression" } } ] } }, { "type": "PREC_LEFT", "value": 9, "content": { "type": "SEQ", "members": [ { "type": "FIELD", "name": "left", "content": { "type": "SYMBOL", "name": "_expression" } }, { "type": "FIELD", "name": "operator", "content": { "type": "STRING", "value": "<<" } }, { "type": "FIELD", "name": "right", "content": { "type": "SYMBOL", "name": "_expression" } } ] } }, { "type": "PREC_LEFT", "value": 9, "content": { "type": "SEQ", "members": [ { "type": "FIELD", "name": "left", "content": { "type": "SYMBOL", "name": "_expression" } }, { "type": "FIELD", "name": "operator", "content": { "type": "STRING", "value": ">>" } }, { "type": "FIELD", "name": "right", "content": { "type": "SYMBOL", "name": "_expression" } } ] } } ] }, "update_expression": { "type": "PREC_RIGHT", "value": 13, "content": { "type": "CHOICE", "members": [ { "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": "_expression" } } ] }, { "type": "SEQ", "members": [ { "type": "FIELD", "name": "argument", "content": { "type": "SYMBOL", "name": "_expression" } }, { "type": "FIELD", "name": "operator", "content": { "type": "CHOICE", "members": [ { "type": "STRING", "value": "--" }, { "type": "STRING", "value": "++" } ] } } ] } ] } }, "cast_expression": { "type": "PREC", "value": 12, "content": { "type": "SEQ", "members": [ { "type": "STRING", "value": "(" }, { "type": "FIELD", "name": "type", "content": { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "type_descriptor" }, { "type": "SYMBOL", "name": "block_abstract_declarator" } ] } }, { "type": "STRING", "value": ")" }, { "type": "FIELD", "name": "value", "content": { "type": "SYMBOL", "name": "_expression" } } ] } }, "type_descriptor": { "type": "SEQ", "members": [ { "type": "REPEAT", "content": { "type": "SYMBOL", "name": "type_qualifier" } }, { "type": "FIELD", "name": "type", "content": { "type": "SYMBOL", "name": "_type_specifier" } }, { "type": "REPEAT", "content": { "type": "SYMBOL", "name": "type_qualifier" } }, { "type": "FIELD", "name": "declarator", "content": { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "_abstract_declarator" }, { "type": "BLANK" } ] } } ] }, "sizeof_expression": { "type": "PREC", "value": 8, "content": { "type": "SEQ", "members": [ { "type": "STRING", "value": "sizeof" }, { "type": "CHOICE", "members": [ { "type": "FIELD", "name": "value", "content": { "type": "SYMBOL", "name": "_expression" } }, { "type": "SEQ", "members": [ { "type": "STRING", "value": "(" }, { "type": "FIELD", "name": "type", "content": { "type": "SYMBOL", "name": "type_descriptor" } }, { "type": "STRING", "value": ")" } ] } ] } ] } }, "subscript_expression": { "type": "PREC", "value": 16, "content": { "type": "SEQ", "members": [ { "type": "FIELD", "name": "argument", "content": { "type": "SYMBOL", "name": "_expression" } }, { "type": "STRING", "value": "[" }, { "type": "FIELD", "name": "index", "content": { "type": "SYMBOL", "name": "_expression" } }, { "type": "STRING", "value": "]" } ] } }, "call_expression": { "type": "PREC", "value": 14, "content": { "type": "SEQ", "members": [ { "type": "FIELD", "name": "function", "content": { "type": "SYMBOL", "name": "_expression" } }, { "type": "FIELD", "name": "arguments", "content": { "type": "SYMBOL", "name": "argument_list" } } ] } }, "argument_list": { "type": "SEQ", "members": [ { "type": "STRING", "value": "(" }, { "type": "CHOICE", "members": [ { "type": "SEQ", "members": [ { "type": "SYMBOL", "name": "_expression" }, { "type": "REPEAT", "content": { "type": "SEQ", "members": [ { "type": "STRING", "value": "," }, { "type": "SYMBOL", "name": "_expression" } ] } } ] }, { "type": "BLANK" } ] }, { "type": "STRING", "value": ")" } ] }, "field_expression": { "type": "SEQ", "members": [ { "type": "PREC", "value": 15, "content": { "type": "SEQ", "members": [ { "type": "FIELD", "name": "argument", "content": { "type": "SYMBOL", "name": "_expression" } }, { "type": "CHOICE", "members": [ { "type": "STRING", "value": "." }, { "type": "STRING", "value": "->" } ] } ] } }, { "type": "FIELD", "name": "field", "content": { "type": "SYMBOL", "name": "_field_identifier" } } ] }, "compound_literal_expression": { "type": "SEQ", "members": [ { "type": "STRING", "value": "(" }, { "type": "FIELD", "name": "type", "content": { "type": "SYMBOL", "name": "type_descriptor" } }, { "type": "STRING", "value": ")" }, { "type": "FIELD", "name": "value", "content": { "type": "SYMBOL", "name": "initializer_list" } } ] }, "parenthesized_expression": { "type": "SEQ", "members": [ { "type": "STRING", "value": "(" }, { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "_expression" }, { "type": "SYMBOL", "name": "comma_expression" } ] }, { "type": "STRING", "value": ")" } ] }, "initializer_list": { "type": "SEQ", "members": [ { "type": "STRING", "value": "{" }, { "type": "CHOICE", "members": [ { "type": "SEQ", "members": [ { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "initializer_pair" }, { "type": "SYMBOL", "name": "_expression" }, { "type": "SYMBOL", "name": "initializer_list" } ] }, { "type": "REPEAT", "content": { "type": "SEQ", "members": [ { "type": "STRING", "value": "," }, { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "initializer_pair" }, { "type": "SYMBOL", "name": "_expression" }, { "type": "SYMBOL", "name": "initializer_list" } ] } ] } } ] }, { "type": "BLANK" } ] }, { "type": "CHOICE", "members": [ { "type": "STRING", "value": "," }, { "type": "BLANK" } ] }, { "type": "STRING", "value": "}" } ] }, "initializer_pair": { "type": "SEQ", "members": [ { "type": "FIELD", "name": "designator", "content": { "type": "REPEAT1", "content": { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "subscript_designator" }, { "type": "SYMBOL", "name": "field_designator" } ] } } }, { "type": "STRING", "value": "=" }, { "type": "FIELD", "name": "value", "content": { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "_expression" }, { "type": "SYMBOL", "name": "initializer_list" } ] } } ] }, "subscript_designator": { "type": "SEQ", "members": [ { "type": "STRING", "value": "[" }, { "type": "SYMBOL", "name": "_expression" }, { "type": "STRING", "value": "]" } ] }, "field_designator": { "type": "SEQ", "members": [ { "type": "STRING", "value": "." }, { "type": "SYMBOL", "name": "_field_identifier" } ] }, "number_literal": { "type": "TOKEN", "content": { "type": "SEQ", "members": [ { "type": "CHOICE", "members": [ { "type": "PATTERN", "value": "[-\\+]" }, { "type": "BLANK" } ] }, { "type": "CHOICE", "members": [ { "type": "CHOICE", "members": [ { "type": "STRING", "value": "0x" }, { "type": "STRING", "value": "0b" } ] }, { "type": "BLANK" } ] }, { "type": "CHOICE", "members": [ { "type": "SEQ", "members": [ { "type": "CHOICE", "members": [ { "type": "SEQ", "members": [ { "type": "REPEAT1", "content": { "type": "PATTERN", "value": "[0-9]" } }, { "type": "REPEAT", "content": { "type": "SEQ", "members": [ { "type": "STRING", "value": "'" }, { "type": "REPEAT1", "content": { "type": "PATTERN", "value": "[0-9]" } } ] } } ] }, { "type": "SEQ", "members": [ { "type": "STRING", "value": "0b" }, { "type": "SEQ", "members": [ { "type": "REPEAT1", "content": { "type": "PATTERN", "value": "[0-9]" } }, { "type": "REPEAT", "content": { "type": "SEQ", "members": [ { "type": "STRING", "value": "'" }, { "type": "REPEAT1", "content": { "type": "PATTERN", "value": "[0-9]" } } ] } } ] } ] }, { "type": "SEQ", "members": [ { "type": "STRING", "value": "0x" }, { "type": "SEQ", "members": [ { "type": "REPEAT1", "content": { "type": "PATTERN", "value": "[0-9a-fA-F]" } }, { "type": "REPEAT", "content": { "type": "SEQ", "members": [ { "type": "STRING", "value": "'" }, { "type": "REPEAT1", "content": { "type": "PATTERN", "value": "[0-9a-fA-F]" } } ] } } ] } ] } ] }, { "type": "CHOICE", "members": [ { "type": "SEQ", "members": [ { "type": "STRING", "value": "." }, { "type": "CHOICE", "members": [ { "type": "SEQ", "members": [ { "type": "REPEAT1", "content": { "type": "PATTERN", "value": "[0-9a-fA-F]" } }, { "type": "REPEAT", "content": { "type": "SEQ", "members": [ { "type": "STRING", "value": "'" }, { "type": "REPEAT1", "content": { "type": "PATTERN", "value": "[0-9a-fA-F]" } } ] } } ] }, { "type": "BLANK" } ] } ] }, { "type": "BLANK" } ] } ] }, { "type": "SEQ", "members": [ { "type": "STRING", "value": "." }, { "type": "SEQ", "members": [ { "type": "REPEAT1", "content": { "type": "PATTERN", "value": "[0-9]" } }, { "type": "REPEAT", "content": { "type": "SEQ", "members": [ { "type": "STRING", "value": "'" }, { "type": "REPEAT1", "content": { "type": "PATTERN", "value": "[0-9]" } } ] } } ] } ] } ] }, { "type": "CHOICE", "members": [ { "type": "SEQ", "members": [ { "type": "PATTERN", "value": "[eEpP]" }, { "type": "CHOICE", "members": [ { "type": "SEQ", "members": [ { "type": "CHOICE", "members": [ { "type": "PATTERN", "value": "[-\\+]" }, { "type": "BLANK" } ] }, { "type": "SEQ", "members": [ { "type": "REPEAT1", "content": { "type": "PATTERN", "value": "[0-9a-fA-F]" } }, { "type": "REPEAT", "content": { "type": "SEQ", "members": [ { "type": "STRING", "value": "'" }, { "type": "REPEAT1", "content": { "type": "PATTERN", "value": "[0-9a-fA-F]" } } ] } } ] } ] }, { "type": "BLANK" } ] } ] }, { "type": "BLANK" } ] }, { "type": "REPEAT", "content": { "type": "CHOICE", "members": [ { "type": "STRING", "value": "u" }, { "type": "STRING", "value": "l" }, { "type": "STRING", "value": "U" }, { "type": "STRING", "value": "L" }, { "type": "STRING", "value": "f" }, { "type": "STRING", "value": "F" } ] } } ] } }, "char_literal": { "type": "SEQ", "members": [ { "type": "CHOICE", "members": [ { "type": "STRING", "value": "L'" }, { "type": "STRING", "value": "u'" }, { "type": "STRING", "value": "U'" }, { "type": "STRING", "value": "u8'" }, { "type": "STRING", "value": "'" } ] }, { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "escape_sequence" }, { "type": "IMMEDIATE_TOKEN", "content": { "type": "PATTERN", "value": "[^\\n']" } } ] }, { "type": "STRING", "value": "'" } ] }, "concatenated_string": { "type": "SEQ", "members": [ { "type": "SYMBOL", "name": "string_literal" }, { "type": "REPEAT1", "content": { "type": "SYMBOL", "name": "string_literal" } } ] }, "string_literal": { "type": "SEQ", "members": [ { "type": "CHOICE", "members": [ { "type": "STRING", "value": "L\"" }, { "type": "STRING", "value": "u\"" }, { "type": "STRING", "value": "U\"" }, { "type": "STRING", "value": "u8\"" }, { "type": "STRING", "value": "\"" } ] }, { "type": "REPEAT", "content": { "type": "CHOICE", "members": [ { "type": "IMMEDIATE_TOKEN", "content": { "type": "PREC", "value": 1, "content": { "type": "PATTERN", "value": "[^\\\\\"\\n]+" } } }, { "type": "SYMBOL", "name": "escape_sequence" } ] } }, { "type": "STRING", "value": "\"" } ] }, "escape_sequence": { "type": "TOKEN", "content": { "type": "PREC", "value": 1, "content": { "type": "SEQ", "members": [ { "type": "STRING", "value": "\\" }, { "type": "CHOICE", "members": [ { "type": "PATTERN", "value": "[^xuU]" }, { "type": "PATTERN", "value": "\\d{2,3}" }, { "type": "PATTERN", "value": "x[0-9a-fA-F]{2,}" }, { "type": "PATTERN", "value": "u[0-9a-fA-F]{4}" }, { "type": "PATTERN", "value": "U[0-9a-fA-F]{8}" } ] } ] } } }, "system_lib_string": { "type": "TOKEN", "content": { "type": "SEQ", "members": [ { "type": "STRING", "value": "<" }, { "type": "REPEAT", "content": { "type": "CHOICE", "members": [ { "type": "PATTERN", "value": "[^>\\n]" }, { "type": "STRING", "value": "\\>" } ] } }, { "type": "STRING", "value": ">" } ] } }, "true": { "type": "TOKEN", "content": { "type": "CHOICE", "members": [ { "type": "STRING", "value": "TRUE" }, { "type": "STRING", "value": "true" } ] } }, "false": { "type": "TOKEN", "content": { "type": "CHOICE", "members": [ { "type": "STRING", "value": "FALSE" }, { "type": "STRING", "value": "false" } ] } }, "null": { "type": "STRING", "value": "NULL" }, "identifier": { "type": "PATTERN", "value": "[$a-zA-Z_](\\w|\\$)*" }, "_type_identifier": { "type": "ALIAS", "content": { "type": "SYMBOL", "name": "identifier" }, "named": true, "value": "type_identifier" }, "_field_identifier": { "type": "ALIAS", "content": { "type": "SYMBOL", "name": "identifier" }, "named": true, "value": "field_identifier" }, "_statement_identifier": { "type": "ALIAS", "content": { "type": "SYMBOL", "name": "identifier" }, "named": true, "value": "statement_identifier" }, "_empty_declaration": { "type": "SEQ", "members": [ { "type": "SYMBOL", "name": "_type_specifier" }, { "type": "STRING", "value": ";" } ] }, "macro_type_specifier": { "type": "PREC_DYNAMIC", "value": -1, "content": { "type": "SEQ", "members": [ { "type": "FIELD", "name": "name", "content": { "type": "SYMBOL", "name": "identifier" } }, { "type": "STRING", "value": "(" }, { "type": "FIELD", "name": "type", "content": { "type": "SYMBOL", "name": "type_descriptor" } }, { "type": "STRING", "value": ")" } ] } }, "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": "/" } ] } ] } }, "_name": { "type": "FIELD", "name": "name", "content": { "type": "SYMBOL", "name": "identifier" } }, "_import": { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "preproc_import" }, { "type": "SYMBOL", "name": "module_import" } ] }, "preproc_import": { "type": "SEQ", "members": [ { "type": "STRING", "value": "#import" }, { "type": "FIELD", "name": "path", "content": { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "system_lib_string" }, { "type": "SYMBOL", "name": "string_literal" } ] } } ] }, "module_import": { "type": "SEQ", "members": [ { "type": "STRING", "value": "@import" }, { "type": "FIELD", "name": "module", "content": { "type": "SYMBOL", "name": "module_string" } } ] }, "module_string": { "type": "PATTERN", "value": "[a-zA-Z_]\\w*(\\.[a-zA-Z_]\\w*)*" }, "_ns_assume_nonnull_declaration": { "type": "IMMEDIATE_TOKEN", "content": { "type": "PATTERN", "value": "NS_ASSUME_NONNULL_BEGIN|NS_ASSUME_NONNULL_END|CF_EXTERN_C_BEGIN|CF_EXTERN_C_END" } }, "compatibility_alias_declaration": { "type": "SEQ", "members": [ { "type": "STRING", "value": "@compatibility_alias" }, { "type": "FIELD", "name": "class_name", "content": { "type": "SYMBOL", "name": "identifier" } }, { "type": "FIELD", "name": "alias_name", "content": { "type": "SYMBOL", "name": "identifier" } }, { "type": "STRING", "value": ";" } ] }, "protocol_forward_declaration": { "type": "PREC", "value": 6, "content": { "type": "SEQ", "members": [ { "type": "STRING", "value": "@protocol" }, { "type": "SEQ", "members": [ { "type": "SYMBOL", "name": "_name" }, { "type": "REPEAT", "content": { "type": "SEQ", "members": [ { "type": "STRING", "value": "," }, { "type": "SYMBOL", "name": "_name" } ] } } ] }, { "type": "STRING", "value": ";" } ] } }, "class_forward_declaration": { "type": "SEQ", "members": [ { "type": "STRING", "value": "@class" }, { "type": "SEQ", "members": [ { "type": "SEQ", "members": [ { "type": "SYMBOL", "name": "_name" }, { "type": "CHOICE", "members": [ { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "protocol_qualifiers" }, { "type": "SYMBOL", "name": "parameterized_class_type_arguments" } ] }, { "type": "BLANK" } ] } ] }, { "type": "REPEAT", "content": { "type": "SEQ", "members": [ { "type": "STRING", "value": "," }, { "type": "SEQ", "members": [ { "type": "SYMBOL", "name": "_name" }, { "type": "CHOICE", "members": [ { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "protocol_qualifiers" }, { "type": "SYMBOL", "name": "parameterized_class_type_arguments" } ] }, { "type": "BLANK" } ] } ] } ] } } ] }, { "type": "STRING", "value": ";" } ] }, "class_interface": { "type": "CHOICE", "members": [ { "type": "SEQ", "members": [ { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "class_interface_attribute_sepcifier" }, { "type": "BLANK" } ] }, { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "swift_name_attribute_sepcifier" }, { "type": "BLANK" } ] }, { "type": "REPEAT", "content": { "type": "SYMBOL", "name": "attribute_specifier" } }, { "type": "STRING", "value": "@interface" }, { "type": "CHOICE", "members": [ { "type": "SEQ", "members": [ { "type": "SYMBOL", "name": "_name" }, { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "parameterized_class_type_arguments" }, { "type": "BLANK" } ] } ] }, { "type": "SYMBOL", "name": "generics_type_reference" } ] }, { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "superclass_reference" }, { "type": "BLANK" } ] }, { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "parameterized_class_type_arguments" }, { "type": "BLANK" } ] }, { "type": "SYMBOL", "name": "protocol_qualifiers" }, { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "_instance_variables" }, { "type": "BLANK" } ] }, { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "_interface_declaration" }, { "type": "BLANK" } ] }, { "type": "STRING", "value": "@end" } ] }, { "type": "SEQ", "members": [ { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "class_interface_attribute_sepcifier" }, { "type": "BLANK" } ] }, { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "swift_name_attribute_sepcifier" }, { "type": "BLANK" } ] }, { "type": "REPEAT", "content": { "type": "SYMBOL", "name": "attribute_specifier" } }, { "type": "STRING", "value": "@interface" }, { "type": "CHOICE", "members": [ { "type": "SEQ", "members": [ { "type": "SYMBOL", "name": "_name" }, { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "parameterized_class_type_arguments" }, { "type": "BLANK" } ] }, { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "protocol_qualifiers" }, { "type": "BLANK" } ] } ] }, { "type": "SYMBOL", "name": "generics_type_reference" } ] }, { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "superclass_reference" }, { "type": "BLANK" } ] }, { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "_instance_variables" }, { "type": "BLANK" } ] }, { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "_interface_declaration" }, { "type": "BLANK" } ] }, { "type": "STRING", "value": "@end" } ] } ] }, "category_interface": { "type": "SEQ", "members": [ { "type": "STRING", "value": "@interface" }, { "type": "CHOICE", "members": [ { "type": "SEQ", "members": [ { "type": "SYMBOL", "name": "_name" }, { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "parameterized_class_type_arguments" }, { "type": "BLANK" } ] }, { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "protocol_qualifiers" }, { "type": "BLANK" } ] } ] }, { "type": "SYMBOL", "name": "generics_type_reference" } ] }, { "type": "STRING", "value": "(" }, { "type": "CHOICE", "members": [ { "type": "FIELD", "name": "category", "content": { "type": "SYMBOL", "name": "identifier" } }, { "type": "BLANK" } ] }, { "type": "STRING", "value": ")" }, { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "protocol_qualifiers" }, { "type": "BLANK" } ] }, { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "_instance_variables" }, { "type": "BLANK" } ] }, { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "_interface_declaration" }, { "type": "BLANK" } ] }, { "type": "STRING", "value": "@end" } ] }, "protocol_declaration": { "type": "SEQ", "members": [ { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "swift_name_attribute_sepcifier" }, { "type": "BLANK" } ] }, { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "attribute_specifier" }, { "type": "BLANK" } ] }, { "type": "STRING", "value": "@protocol" }, { "type": "SYMBOL", "name": "_name" }, { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "protocol_qualifiers" }, { "type": "BLANK" } ] }, { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "_interface_declaration" }, { "type": "BLANK" } ] }, { "type": "STRING", "value": "@end" } ] }, "superclass_reference": { "type": "SEQ", "members": [ { "type": "STRING", "value": ":" }, { "type": "SYMBOL", "name": "_name" }, { "type": "FIELD", "name": "type_reference", "content": { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "generic_type_references" }, { "type": "BLANK" } ] } } ] }, "protocol_qualifiers": { "type": "SEQ", "members": [ { "type": "STRING", "value": "<" }, { "type": "SEQ", "members": [ { "type": "SYMBOL", "name": "protocol_identifier" }, { "type": "REPEAT", "content": { "type": "SEQ", "members": [ { "type": "STRING", "value": "," }, { "type": "SYMBOL", "name": "protocol_identifier" } ] } } ] }, { "type": "STRING", "value": ">" } ] }, "protocol_identifier": { "type": "PREC_DYNAMIC", "value": 5, "content": { "type": "ALIAS", "content": { "type": "SYMBOL", "name": "identifier" }, "named": false, "value": "protocol_identifier" } }, "parameterized_class_type_arguments": { "type": "SEQ", "members": [ { "type": "STRING", "value": "<" }, { "type": "SEQ", "members": [ { "type": "SYMBOL", "name": "_parameterized_class_type_arguments" }, { "type": "REPEAT", "content": { "type": "SEQ", "members": [ { "type": "STRING", "value": "," }, { "type": "SYMBOL", "name": "_parameterized_class_type_arguments" } ] } } ] }, { "type": "STRING", "value": ">" } ] }, "_parameterized_class_type_arguments": { "type": "SEQ", "members": [ { "type": "CHOICE", "members": [ { "type": "CHOICE", "members": [ { "type": "STRING", "value": "__covariant" }, { "type": "STRING", "value": "__contravariant" } ] }, { "type": "BLANK" } ] }, { "type": "FIELD", "name": "type", "content": { "type": "SYMBOL", "name": "identifier" } }, { "type": "CHOICE", "members": [ { "type": "SEQ", "members": [ { "type": "STRING", "value": ":" }, { "type": "SYMBOL", "name": "type_descriptor" } ] }, { "type": "BLANK" } ] } ] }, "generics_type_reference": { "type": "SEQ", "members": [ { "type": "STRING", "value": "__GENERICS" }, { "type": "STRING", "value": "(" }, { "type": "SEQ", "members": [ { "type": "SYMBOL", "name": "_name" }, { "type": "REPEAT", "content": { "type": "SEQ", "members": [ { "type": "STRING", "value": "," }, { "type": "SYMBOL", "name": "_type_specifier" } ] } } ] }, { "type": "STRING", "value": ")" } ] }, "_instance_variables": { "type": "SEQ", "members": [ { "type": "STRING", "value": "{" }, { "type": "REPEAT", "content": { "type": "SYMBOL", "name": "_instance_variable_declaration" } }, { "type": "STRING", "value": "}" } ] }, "_instance_variable_declaration": { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "_visibility_specification" }, { "type": "SYMBOL", "name": "field_declaration" } ] }, "_visibility_specification": { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "private" }, { "type": "SYMBOL", "name": "public" }, { "type": "SYMBOL", "name": "protected" }, { "type": "SYMBOL", "name": "package" } ] }, "private": { "type": "STRING", "value": "@private" }, "public": { "type": "STRING", "value": "@public" }, "protected": { "type": "STRING", "value": "@protected" }, "package": { "type": "STRING", "value": "@package" }, "_interface_declaration": { "type": "REPEAT1", "content": { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "_ns_assume_nonnull_declaration" }, { "type": "SYMBOL", "name": "_interface_declaration_specifier" }, { "type": "SYMBOL", "name": "declaration" }, { "type": "SYMBOL", "name": "method_declaration" }, { "type": "SYMBOL", "name": "property_declaration" }, { "type": "SYMBOL", "name": "_empty_declaration" }, { "type": "SYMBOL", "name": "type_definition" }, { "type": "SYMBOL", "name": "preproc_def" }, { "type": "SYMBOL", "name": "preproc_function_def" } ] } }, "_interface_declaration_specifier": { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "optional" }, { "type": "SYMBOL", "name": "required" } ] }, "optional": { "type": "STRING", "value": "@optional" }, "required": { "type": "STRING", "value": "@required" }, "method_declaration": { "type": "SEQ", "members": [ { "type": "FIELD", "name": "scope", "content": { "type": "SYMBOL", "name": "_class_member_scope" } }, { "type": "FIELD", "name": "return_type", "content": { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "_method_argument_type_specifier" }, { "type": "BLANK" } ] } }, { "type": "FIELD", "name": "selector", "content": { "type": "SYMBOL", "name": "_method_selector" } }, { "type": "REPEAT", "content": { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "attribute_specifier" }, { "type": "SYMBOL", "name": "swift_name_attribute_sepcifier" } ] } }, { "type": "STRING", "value": ";" } ] }, "_class_member_scope": { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "class_scope" }, { "type": "SYMBOL", "name": "instance_scope" } ] }, "class_scope": { "type": "STRING", "value": "+" }, "instance_scope": { "type": "STRING", "value": "-" }, "property_declaration": { "type": "SEQ", "members": [ { "type": "STRING", "value": "@property" }, { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "property_attributes" }, { "type": "BLANK" } ] }, { "type": "SEQ", "members": [ { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "attribute_specifier" }, { "type": "BLANK" } ] }, { "type": "REPEAT", "content": { "type": "SYMBOL", "name": "type_qualifier" } }, { "type": "FIELD", "name": "type", "content": { "type": "SYMBOL", "name": "_type_specifier" } }, { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "attribute_specifier" }, { "type": "BLANK" } ] }, { "type": "REPEAT", "content": { "type": "SYMBOL", "name": "type_qualifier" } }, { "type": "SEQ", "members": [ { "type": "FIELD", "name": "declarator", "content": { "type": "SYMBOL", "name": "_declarator" } }, { "type": "REPEAT", "content": { "type": "SEQ", "members": [ { "type": "STRING", "value": "," }, { "type": "FIELD", "name": "declarator", "content": { "type": "SYMBOL", "name": "_declarator" } } ] } } ] } ] }, { "type": "REPEAT", "content": { "type": "SYMBOL", "name": "attribute_specifier" } }, { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "swift_name_attribute_sepcifier" }, { "type": "BLANK" } ] }, { "type": "STRING", "value": ";" } ] }, "property_attributes": { "type": "SEQ", "members": [ { "type": "STRING", "value": "(" }, { "type": "CHOICE", "members": [ { "type": "SEQ", "members": [ { "type": "SYMBOL", "name": "_property_attribute" }, { "type": "REPEAT", "content": { "type": "SEQ", "members": [ { "type": "STRING", "value": "," }, { "type": "SYMBOL", "name": "_property_attribute" } ] } } ] }, { "type": "BLANK" } ] }, { "type": "STRING", "value": ")" } ] }, "_property_attribute": { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "getter" }, { "type": "SYMBOL", "name": "setter" }, { "type": "SYMBOL", "name": "nonnull" }, { "type": "SYMBOL", "name": "nullable" }, { "type": "SYMBOL", "name": "null_resettable" }, { "type": "SYMBOL", "name": "unsafe_unretained" }, { "type": "SYMBOL", "name": "null_unspecified" }, { "type": "SYMBOL", "name": "direct" }, { "type": "SYMBOL", "name": "readwrite" }, { "type": "SYMBOL", "name": "readonly" }, { "type": "SYMBOL", "name": "strong" }, { "type": "SYMBOL", "name": "weak" }, { "type": "SYMBOL", "name": "copy" }, { "type": "SYMBOL", "name": "assign" }, { "type": "SYMBOL", "name": "retain" }, { "type": "SYMBOL", "name": "atomic" }, { "type": "SYMBOL", "name": "nonatomic" }, { "type": "SYMBOL", "name": "class" }, { "type": "SYMBOL", "name": "NS_NONATOMIC_IOSONLY" }, { "type": "SYMBOL", "name": "DISPATCH_QUEUE_REFERENCE_TYPE" } ] }, "class_interface_attribute_sepcifier": { "type": "IMMEDIATE_TOKEN", "content": { "type": "PATTERN", "value": "IB_DESIGNABLE|NS_ROOT_CLASS" } }, "method_attribute_specifier": { "type": "CHOICE", "members": [ { "type": "STRING", "value": "NS_DESIGNATED_INITIALIZER" }, { "type": "STRING", "value": "NS_REQUIRES_SUPER" }, { "type": "STRING", "value": "CF_RETURNS_RETAINED" }, { "type": "STRING", "value": "CF_RETURNS_NOT_RETAINED" }, { "type": "STRING", "value": "NS_REQUIRES_NIL_TERMINATION" }, { "type": "STRING", "value": "NS_DIRECT" } ] }, "method_variadic_arguments_attribute_specifier": { "type": "SEQ", "members": [ { "type": "CHOICE", "members": [ { "type": "STRING", "value": "NS_FORMAT_FUNCTION" }, { "type": "STRING", "value": "CF_FORMAT_FUNCTION" } ] }, { "type": "STRING", "value": "(" }, { "type": "SYMBOL", "name": "number_literal" }, { "type": "STRING", "value": "," }, { "type": "SYMBOL", "name": "number_literal" }, { "type": "STRING", "value": ")" } ] }, "availability_attribute_specifier": { "type": "PREC", "value": 1, "content": { "type": "CHOICE", "members": [ { "type": "STRING", "value": "NS_UNAVAILABLE" }, { "type": "STRING", "value": "DEPRECATED_ATTRIBUTE" }, { "type": "STRING", "value": "UI_APPEARANCE_SELECTOR" }, { "type": "STRING", "value": "UNAVAILABLE_ATTRIBUTE" }, { "type": "SEQ", "members": [ { "type": "CHOICE", "members": [ { "type": "STRING", "value": "NS_AVAILABLE" }, { "type": "STRING", "value": "__IOS_AVAILABLE" }, { "type": "STRING", "value": "NS_AVAILABLE_IOS" }, { "type": "STRING", "value": "API_AVAILABLE" }, { "type": "STRING", "value": "API_UNAVAILABLE" }, { "type": "STRING", "value": "API_DEPRECATED" }, { "type": "STRING", "value": "NS_ENUM_AVAILABLE_IOS" }, { "type": "STRING", "value": "NS_DEPRECATED_IOS" }, { "type": "STRING", "value": "NS_ENUM_DEPRECATED_IOS" }, { "type": "STRING", "value": "DEPRECATED_MSG_ATTRIBUTE" }, { "type": "STRING", "value": "__deprecated_msg" }, { "type": "STRING", "value": "__deprecated_enum_msg" }, { "type": "STRING", "value": "NS_SWIFT_UNAVAILABLE" }, { "type": "STRING", "value": "NS_EXTENSION_UNAVAILABLE_IOS" }, { "type": "STRING", "value": "NS_CLASS_AVAILABLE_IOS" }, { "type": "STRING", "value": "NS_CLASS_DEPRECATED_IOS" } ] }, { "type": "STRING", "value": "(" }, { "type": "SEQ", "members": [ { "type": "CHOICE", "members": [ { "type": "FIELD", "name": "message", "content": { "type": "SYMBOL", "name": "string_literal" } }, { "type": "SYMBOL", "name": "platform_version" } ] }, { "type": "REPEAT", "content": { "type": "SEQ", "members": [ { "type": "STRING", "value": "," }, { "type": "CHOICE", "members": [ { "type": "FIELD", "name": "message", "content": { "type": "SYMBOL", "name": "string_literal" } }, { "type": "SYMBOL", "name": "platform_version" } ] } ] } } ] }, { "type": "STRING", "value": ")" } ] } ] } }, "platform_version": { "type": "CHOICE", "members": [ { "type": "FIELD", "name": "version", "content": { "type": "PATTERN", "value": "\\d+_\\d+" } }, { "type": "FIELD", "name": "version", "content": { "type": "SYMBOL", "name": "number_literal" } }, { "type": "FIELD", "name": "platform", "content": { "type": "SYMBOL", "name": "platform" } }, { "type": "SEQ", "members": [ { "type": "FIELD", "name": "platform", "content": { "type": "SYMBOL", "name": "platform" } }, { "type": "STRING", "value": "(" }, { "type": "FIELD", "name": "version", "content": { "type": "SEQ", "members": [ { "type": "CHOICE", "members": [ { "type": "PATTERN", "value": "\\d+_\\d+" }, { "type": "SYMBOL", "name": "number_literal" }, { "type": "SYMBOL", "name": "identifier" } ] }, { "type": "REPEAT", "content": { "type": "SEQ", "members": [ { "type": "STRING", "value": "," }, { "type": "CHOICE", "members": [ { "type": "PATTERN", "value": "\\d+_\\d+" }, { "type": "SYMBOL", "name": "number_literal" }, { "type": "SYMBOL", "name": "identifier" } ] } ] } } ] } }, { "type": "STRING", "value": ")" } ] } ] }, "platform": { "type": "CHOICE", "members": [ { "type": "STRING", "value": "ios" }, { "type": "STRING", "value": "tvos" }, { "type": "STRING", "value": "macos" }, { "type": "STRING", "value": "macosx" }, { "type": "STRING", "value": "watchos" } ] }, "swift_name_attribute_sepcifier": { "type": "CHOICE", "members": [ { "type": "STRING", "value": "NS_REFINED_FOR_SWIFT" }, { "type": "SEQ", "members": [ { "type": "STRING", "value": "NS_SWIFT_NAME" }, { "type": "STRING", "value": "(" }, { "type": "FIELD", "name": "class", "content": { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "identifier" }, { "type": "BLANK" } ] } }, { "type": "FIELD", "name": "method", "content": { "type": "SYMBOL", "name": "identifier" } }, { "type": "FIELD", "name": "parameters", "content": { "type": "CHOICE", "members": [ { "type": "SEQ", "members": [ { "type": "STRING", "value": "(" }, { "type": "REPEAT", "content": { "type": "SEQ", "members": [ { "type": "REPEAT", "content": { "type": "SYMBOL", "name": "_type_specifier" } }, { "type": "STRING", "value": ":" } ] } }, { "type": "STRING", "value": ")" } ] }, { "type": "BLANK" } ] } }, { "type": "STRING", "value": ")" } ] } ] }, "getter": { "type": "SEQ", "members": [ { "type": "STRING", "value": "getter" }, { "type": "STRING", "value": "=" }, { "type": "SYMBOL", "name": "_name" } ] }, "setter": { "type": "SEQ", "members": [ { "type": "STRING", "value": "setter" }, { "type": "STRING", "value": "=" }, { "type": "SEQ", "members": [ { "type": "SYMBOL", "name": "_name" }, { "type": "CHOICE", "members": [ { "type": "STRING", "value": ":" }, { "type": "BLANK" } ] } ] } ] }, "nonnull": { "type": "STRING", "value": "nonnull" }, "nullable": { "type": "STRING", "value": "nullable" }, "null_resettable": { "type": "STRING", "value": "null_resettable" }, "unsafe_unretained": { "type": "STRING", "value": "unsafe_unretained" }, "null_unspecified": { "type": "STRING", "value": "null_unspecified" }, "direct": { "type": "STRING", "value": "direct" }, "readwrite": { "type": "STRING", "value": "readwrite" }, "readonly": { "type": "STRING", "value": "readonly" }, "strong": { "type": "STRING", "value": "strong" }, "weak": { "type": "STRING", "value": "weak" }, "copy": { "type": "STRING", "value": "copy" }, "assign": { "type": "STRING", "value": "assign" }, "retain": { "type": "STRING", "value": "retain" }, "atomic": { "type": "STRING", "value": "atomic" }, "nonatomic": { "type": "STRING", "value": "nonatomic" }, "class": { "type": "STRING", "value": "class" }, "NS_NONATOMIC_IOSONLY": { "type": "STRING", "value": "NS_NONATOMIC_IOSONLY" }, "DISPATCH_QUEUE_REFERENCE_TYPE": { "type": "STRING", "value": "DISPATCH_QUEUE_REFERENCE_TYPE" }, "class_implementation": { "type": "SEQ", "members": [ { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "attribute_specifier" }, { "type": "BLANK" } ] }, { "type": "STRING", "value": "@implementation" }, { "type": "SYMBOL", "name": "_name" }, { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "superclass_reference" }, { "type": "BLANK" } ] }, { "type": "CHOICE", "members": [ { "type": "STRING", "value": "NS_UNAVAILABLE" }, { "type": "BLANK" } ] }, { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "_instance_variables" }, { "type": "BLANK" } ] }, { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "_implementation_definition" }, { "type": "BLANK" } ] }, { "type": "STRING", "value": "@end" } ] }, "category_implementation": { "type": "SEQ", "members": [ { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "attribute_specifier" }, { "type": "BLANK" } ] }, { "type": "STRING", "value": "@implementation" }, { "type": "SYMBOL", "name": "_name" }, { "type": "STRING", "value": "(" }, { "type": "FIELD", "name": "category", "content": { "type": "SYMBOL", "name": "identifier" } }, { "type": "STRING", "value": ")" }, { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "_implementation_definition" }, { "type": "BLANK" } ] }, { "type": "STRING", "value": "@end" } ] }, "_implementation_definition": { "type": "REPEAT1", "content": { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "_ns_assume_nonnull_declaration" }, { "type": "SYMBOL", "name": "function_definition" }, { "type": "SYMBOL", "name": "declaration" }, { "type": "SYMBOL", "name": "synthesize_definition" }, { "type": "SYMBOL", "name": "dynamic_definition" }, { "type": "SYMBOL", "name": "method_definition" }, { "type": "SYMBOL", "name": "type_definition" }, { "type": "SYMBOL", "name": "preproc_def" }, { "type": "SYMBOL", "name": "preproc_function_def" } ] } }, "synthesize_definition": { "type": "SEQ", "members": [ { "type": "STRING", "value": "@synthesize" }, { "type": "SEQ", "members": [ { "type": "SYMBOL", "name": "synthesize_property" }, { "type": "REPEAT", "content": { "type": "SEQ", "members": [ { "type": "STRING", "value": "," }, { "type": "SYMBOL", "name": "synthesize_property" } ] } } ] }, { "type": "STRING", "value": ";" } ] }, "synthesize_property": { "type": "SEQ", "members": [ { "type": "FIELD", "name": "property", "content": { "type": "SYMBOL", "name": "identifier" } }, { "type": "CHOICE", "members": [ { "type": "SEQ", "members": [ { "type": "STRING", "value": "=" }, { "type": "FIELD", "name": "instance_variable", "content": { "type": "SYMBOL", "name": "identifier" } } ] }, { "type": "BLANK" } ] } ] }, "dynamic_definition": { "type": "SEQ", "members": [ { "type": "STRING", "value": "@dynamic" }, { "type": "SEQ", "members": [ { "type": "FIELD", "name": "property", "content": { "type": "SYMBOL", "name": "identifier" } }, { "type": "REPEAT", "content": { "type": "SEQ", "members": [ { "type": "STRING", "value": "," }, { "type": "FIELD", "name": "property", "content": { "type": "SYMBOL", "name": "identifier" } } ] } } ] }, { "type": "STRING", "value": ";" } ] }, "method_definition": { "type": "SEQ", "members": [ { "type": "FIELD", "name": "scope", "content": { "type": "SYMBOL", "name": "_class_member_scope" } }, { "type": "FIELD", "name": "return_type", "content": { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "_method_argument_type_specifier" }, { "type": "BLANK" } ] } }, { "type": "FIELD", "name": "selector", "content": { "type": "SYMBOL", "name": "_method_selector" } }, { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "attribute_specifier" }, { "type": "BLANK" } ] }, { "type": "CHOICE", "members": [ { "type": "STRING", "value": ";" }, { "type": "BLANK" } ] }, { "type": "FIELD", "name": "body", "content": { "type": "SYMBOL", "name": "compound_statement" } }, { "type": "CHOICE", "members": [ { "type": "STRING", "value": ";" }, { "type": "BLANK" } ] } ] }, "_method_selector": { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "_unary_selector" }, { "type": "SEQ", "members": [ { "type": "SYMBOL", "name": "keyword_selector" }, { "type": "CHOICE", "members": [ { "type": "SEQ", "members": [ { "type": "STRING", "value": "," }, { "type": "STRING", "value": "..." } ] }, { "type": "BLANK" } ] } ] } ] }, "_unary_selector": { "type": "SYMBOL", "name": "identifier" }, "keyword_selector": { "type": "REPEAT1", "content": { "type": "SYMBOL", "name": "keyword_declarator" } }, "keyword_declarator": { "type": "PREC_RIGHT", "value": 0, "content": { "type": "SEQ", "members": [ { "type": "FIELD", "name": "keyword", "content": { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "identifier" }, { "type": "BLANK" } ] } }, { "type": "STRING", "value": ":" }, { "type": "FIELD", "name": "type", "content": { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "_method_argument_type_specifier" }, { "type": "BLANK" } ] } }, { "type": "SYMBOL", "name": "_name" }, { "type": "CHOICE", "members": [ { "type": "STRING", "value": "__unused" }, { "type": "BLANK" } ] } ] } }, "_method_argument_type_specifier": { "type": "PREC", "value": 1, "content": { "type": "SEQ", "members": [ { "type": "STRING", "value": "(" }, { "type": "SYMBOL", "name": "_argument_type_declarator" }, { "type": "STRING", "value": ")" }, { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "attribute_specifier" }, { "type": "BLANK" } ] } ] } }, "_argument_type_declarator": { "type": "PREC", "value": 10, "content": { "type": "SEQ", "members": [ { "type": "CHOICE", "members": [ { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "nullable" }, { "type": "SYMBOL", "name": "nonnull" } ] }, { "type": "BLANK" } ] }, { "type": "CHOICE", "members": [ { "type": "STRING", "value": "NS_NOESCAPE" }, { "type": "BLANK" } ] }, { "type": "SYMBOL", "name": "_declaration_specifiers" }, { "type": "CHOICE", "members": [ { "type": "FIELD", "name": "declarator", "content": { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "_declarator" }, { "type": "SYMBOL", "name": "_abstract_declarator" } ] } }, { "type": "BLANK" } ] }, { "type": "REPEAT", "content": { "type": "SYMBOL", "name": "attribute_specifier" } } ] } }, "typeof_specifier": { "type": "SEQ", "members": [ { "type": "FIELD", "name": "operator", "content": { "type": "CHOICE", "members": [ { "type": "STRING", "value": "typeof" }, { "type": "STRING", "value": "__typeof" }, { "type": "STRING", "value": "__typeof__" } ] } }, { "type": "STRING", "value": "(" }, { "type": "FIELD", "name": "type", "content": { "type": "SYMBOL", "name": "_expression" } }, { "type": "STRING", "value": ")" } ] }, "atomic_specifier": { "type": "PREC", "value": -1, "content": { "type": "SEQ", "members": [ { "type": "FIELD", "name": "operator", "content": { "type": "STRING", "value": "_Atomic" } }, { "type": "STRING", "value": "(" }, { "type": "FIELD", "name": "type", "content": { "type": "SYMBOL", "name": "type_descriptor" } }, { "type": "STRING", "value": ")" } ] } }, "generic_type_specifier": { "type": "PREC_DYNAMIC", "value": 1, "content": { "type": "CHOICE", "members": [ { "type": "SEQ", "members": [ { "type": "FIELD", "name": "class_name", "content": { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "_type_identifier" }, { "type": "SYMBOL", "name": "id" }, { "type": "SYMBOL", "name": "Class" } ] } }, { "type": "FIELD", "name": "type_reference", "content": { "type": "REPEAT1", "content": { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "protocol_qualifiers" }, { "type": "SYMBOL", "name": "generic_type_references" } ] } } } ] } ] } }, "generic_type_references": { "type": "SEQ", "members": [ { "type": "STRING", "value": "<" }, { "type": "SEQ", "members": [ { "type": "SYMBOL", "name": "type_descriptor" }, { "type": "REPEAT", "content": { "type": "SEQ", "members": [ { "type": "STRING", "value": "," }, { "type": "SYMBOL", "name": "type_descriptor" } ] } } ] }, { "type": "STRING", "value": ">" } ] }, "block_abstract_declarator": { "type": "SEQ", "members": [ { "type": "STRING", "value": "(" }, { "type": "CHOICE", "members": [ { "type": "STRING", "value": "NS_NOESCAPE" }, { "type": "BLANK" } ] }, { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "type_qualifier" }, { "type": "BLANK" } ] }, { "type": "STRING", "value": "^" }, { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "type_qualifier" }, { "type": "BLANK" } ] }, { "type": "STRING", "value": ")" }, { "type": "FIELD", "name": "parameters", "content": { "type": "SYMBOL", "name": "parameter_list" } } ] }, "block_declarator": { "type": "SEQ", "members": [ { "type": "STRING", "value": "(" }, { "type": "STRING", "value": "^" }, { "type": "CHOICE", "members": [ { "type": "SEQ", "members": [ { "type": "REPEAT", "content": { "type": "SYMBOL", "name": "type_qualifier" } }, { "type": "FIELD", "name": "declarator", "content": { "type": "SYMBOL", "name": "identifier" } }, { "type": "REPEAT", "content": { "type": "SYMBOL", "name": "type_qualifier" } } ] }, { "type": "FIELD", "name": "return_type", "content": { "type": "SYMBOL", "name": "block_declarator" } } ] }, { "type": "STRING", "value": ")" }, { "type": "FIELD", "name": "parameters", "content": { "type": "SYMBOL", "name": "parameter_list" } } ] }, "block_expression": { "type": "SEQ", "members": [ { "type": "STRING", "value": "^" }, { "type": "FIELD", "name": "declarator", "content": { "type": "CHOICE", "members": [ { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "type_descriptor" }, { "type": "SYMBOL", "name": "type_qualifier" } ] }, { "type": "BLANK" } ] } }, { "type": "FIELD", "name": "parameters", "content": { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "parameter_list" }, { "type": "BLANK" } ] } }, { "type": "SYMBOL", "name": "compound_statement" } ] }, "self": { "type": "STRING", "value": "self" }, "super": { "type": "STRING", "value": "super" }, "nil": { "type": "STRING", "value": "nil" }, "id": { "type": "STRING", "value": "id" }, "instancetype": { "type": "STRING", "value": "instancetype" }, "Class": { "type": "STRING", "value": "Class" }, "Method": { "type": "STRING", "value": "Method" }, "SEL": { "type": "STRING", "value": "SEL" }, "IMP": { "type": "STRING", "value": "IMP" }, "BOOL": { "type": "STRING", "value": "BOOL" }, "auto": { "type": "STRING", "value": "__auto_type" }, "autoreleasepool_statement": { "type": "PREC_RIGHT", "value": 0, "content": { "type": "SEQ", "members": [ { "type": "STRING", "value": "@autoreleasepool" }, { "type": "FIELD", "name": "consequence", "content": { "type": "SYMBOL", "name": "_statement" } } ] } }, "synchronized_statement": { "type": "PREC_RIGHT", "value": 0, "content": { "type": "SEQ", "members": [ { "type": "STRING", "value": "@synchronized" }, { "type": "FIELD", "name": "condition", "content": { "type": "SYMBOL", "name": "parenthesized_expression" } }, { "type": "FIELD", "name": "consequence", "content": { "type": "SYMBOL", "name": "_statement" } } ] } }, "for_in_statement": { "type": "PREC_DYNAMIC", "value": 1, "content": { "type": "SEQ", "members": [ { "type": "STRING", "value": "for" }, { "type": "STRING", "value": "(" }, { "type": "FIELD", "name": "initializer", "content": { "type": "SYMBOL", "name": "_argument_type_declarator" } }, { "type": "STRING", "value": "in" }, { "type": "FIELD", "name": "loop", "content": { "type": "SYMBOL", "name": "_expression" } }, { "type": "STRING", "value": ")" }, { "type": "SYMBOL", "name": "_statement" } ] } }, "try_catch_statement": { "type": "PREC_RIGHT", "value": 0, "content": { "type": "SEQ", "members": [ { "type": "STRING", "value": "@try" }, { "type": "FIELD", "name": "body", "content": { "type": "SYMBOL", "name": "_statement" } }, { "type": "REPEAT", "content": { "type": "SEQ", "members": [ { "type": "STRING", "value": "@catch" }, { "type": "FIELD", "name": "declaration", "content": { "type": "SEQ", "members": [ { "type": "STRING", "value": "(" }, { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "parameter_declaration" }, { "type": "STRING", "value": "..." } ] }, { "type": "STRING", "value": ")" } ] } }, { "type": "FIELD", "name": "catch", "content": { "type": "SYMBOL", "name": "_statement" } } ] } }, { "type": "CHOICE", "members": [ { "type": "SEQ", "members": [ { "type": "STRING", "value": "@finally" }, { "type": "FIELD", "name": "finally", "content": { "type": "SYMBOL", "name": "_statement" } } ] }, { "type": "BLANK" } ] } ] } }, "throw_statement": { "type": "SEQ", "members": [ { "type": "STRING", "value": "@throw" }, { "type": "CHOICE", "members": [ { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "_expression" }, { "type": "SYMBOL", "name": "comma_expression" } ] }, { "type": "BLANK" } ] }, { "type": "STRING", "value": ";" } ] }, "message_expression": { "type": "SEQ", "members": [ { "type": "STRING", "value": "[" }, { "type": "FIELD", "name": "receiver", "content": { "type": "SYMBOL", "name": "_receiver" } }, { "type": "FIELD", "name": "selector", "content": { "type": "SYMBOL", "name": "_message_selector" } }, { "type": "STRING", "value": "]" } ] }, "_receiver": { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "_type_specifier" }, { "type": "SYMBOL", "name": "_expression" } ] }, "_message_selector": { "type": "CHOICE", "members": [ { "type": "FIELD", "name": "selector", "content": { "type": "SYMBOL", "name": "identifier" } }, { "type": "SYMBOL", "name": "keyword_argument_list" } ] }, "keyword_argument_list": { "type": "REPEAT1", "content": { "type": "SYMBOL", "name": "keyword_argument" } }, "keyword_argument": { "type": "SEQ", "members": [ { "type": "CHOICE", "members": [ { "type": "FIELD", "name": "keyword", "content": { "type": "SYMBOL", "name": "identifier" } }, { "type": "BLANK" } ] }, { "type": "STRING", "value": ":" }, { "type": "FIELD", "name": "argument", "content": { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "_expression" }, { "type": "SYMBOL", "name": "_variadic_arguments" } ] } } ] }, "_variadic_arguments": { "type": "PREC", "value": 1, "content": { "type": "SEQ", "members": [ { "type": "SYMBOL", "name": "_expression" }, { "type": "REPEAT", "content": { "type": "SEQ", "members": [ { "type": "STRING", "value": "," }, { "type": "SYMBOL", "name": "_expression" } ] } } ] } }, "selector_expression": { "type": "SEQ", "members": [ { "type": "STRING", "value": "@selector" }, { "type": "STRING", "value": "(" }, { "type": "SYMBOL", "name": "_selector_name" }, { "type": "STRING", "value": ")" } ] }, "_selector_name": { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "_name" }, { "type": "REPEAT1", "content": { "type": "SYMBOL", "name": "_keyword_name" } } ] }, "_keyword_name": { "type": "CHOICE", "members": [ { "type": "SEQ", "members": [ { "type": "SYMBOL", "name": "_name" }, { "type": "STRING", "value": ":" } ] }, { "type": "STRING", "value": ":" } ] }, "protocol_expression": { "type": "SEQ", "members": [ { "type": "STRING", "value": "@protocol" }, { "type": "STRING", "value": "(" }, { "type": "SYMBOL", "name": "identifier" }, { "type": "STRING", "value": ")" } ] }, "encode_expression": { "type": "SEQ", "members": [ { "type": "STRING", "value": "@encode" }, { "type": "STRING", "value": "(" }, { "type": "SYMBOL", "name": "type_descriptor" }, { "type": "STRING", "value": ")" } ] }, "number_expression": { "type": "PREC", "value": 1, "content": { "type": "SEQ", "members": [ { "type": "STRING", "value": "@" }, { "type": "CHOICE", "members": [ { "type": "SEQ", "members": [ { "type": "STRING", "value": "(" }, { "type": "CHOICE", "members": [ { "type": "ALIAS", "content": { "type": "SYMBOL", "name": "number_literal" }, "named": false, "value": "number_literal" }, { "type": "SEQ", "members": [ { "type": "STRING", "value": "'" }, { "type": "PATTERN", "value": "[A-Za-z0-9]" }, { "type": "STRING", "value": "'" } ] } ] }, { "type": "STRING", "value": ")" } ] }, { "type": "SEQ", "members": [ { "type": "CHOICE", "members": [ { "type": "ALIAS", "content": { "type": "SYMBOL", "name": "number_literal" }, "named": false, "value": "number_literal" }, { "type": "SEQ", "members": [ { "type": "STRING", "value": "'" }, { "type": "PATTERN", "value": "[A-Za-z0-9]" }, { "type": "STRING", "value": "'" } ] } ] } ] } ] } ] } }, "string_expression": { "type": "SEQ", "members": [ { "type": "SEQ", "members": [ { "type": "STRING", "value": "@" }, { "type": "ALIAS", "content": { "type": "SYMBOL", "name": "string_literal" }, "named": false, "value": "string_literal" } ] }, { "type": "REPEAT", "content": { "type": "SEQ", "members": [ { "type": "CHOICE", "members": [ { "type": "STRING", "value": "@" }, { "type": "BLANK" } ] }, { "type": "ALIAS", "content": { "type": "SYMBOL", "name": "string_literal" }, "named": false, "value": "string_literal" } ] } } ] }, "object_expression": { "type": "SEQ", "members": [ { "type": "STRING", "value": "@" }, { "type": "STRING", "value": "(" }, { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "_expression" }, { "type": "BLANK" } ] }, { "type": "STRING", "value": ")" } ] }, "dictionary_expression": { "type": "SEQ", "members": [ { "type": "STRING", "value": "@" }, { "type": "STRING", "value": "{" }, { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "_dictionary_key_value_list" }, { "type": "BLANK" } ] }, { "type": "STRING", "value": "}" } ] }, "_dictionary_key_value_list": { "type": "SEQ", "members": [ { "type": "SEQ", "members": [ { "type": "SYMBOL", "name": "_dictionary_key_value_pair" }, { "type": "REPEAT", "content": { "type": "SEQ", "members": [ { "type": "STRING", "value": "," }, { "type": "SYMBOL", "name": "_dictionary_key_value_pair" } ] } } ] }, { "type": "CHOICE", "members": [ { "type": "STRING", "value": "," }, { "type": "BLANK" } ] } ] }, "_dictionary_key_value_pair": { "type": "SEQ", "members": [ { "type": "FIELD", "name": "key", "content": { "type": "SYMBOL", "name": "_expression" } }, { "type": "STRING", "value": ":" }, { "type": "FIELD", "name": "value", "content": { "type": "SYMBOL", "name": "_expression" } } ] }, "array_expression": { "type": "SEQ", "members": [ { "type": "STRING", "value": "@" }, { "type": "STRING", "value": "[" }, { "type": "CHOICE", "members": [ { "type": "SEQ", "members": [ { "type": "SYMBOL", "name": "_expression" }, { "type": "REPEAT", "content": { "type": "SEQ", "members": [ { "type": "STRING", "value": "," }, { "type": "SYMBOL", "name": "_expression" } ] } } ] }, { "type": "BLANK" } ] }, { "type": "CHOICE", "members": [ { "type": "STRING", "value": "," }, { "type": "BLANK" } ] }, { "type": "STRING", "value": "]" } ] }, "YES": { "type": "STRING", "value": "YES" }, "NO": { "type": "STRING", "value": "NO" }, "boolean_expression": { "type": "SEQ", "members": [ { "type": "STRING", "value": "@" }, { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "YES" }, { "type": "SYMBOL", "name": "NO" }, { "type": "STRING", "value": "__objc_no" }, { "type": "STRING", "value": "__objc_yes" } ] } ] }, "available_expression": { "type": "SEQ", "members": [ { "type": "CHOICE", "members": [ { "type": "STRING", "value": "__builtin_available" }, { "type": "STRING", "value": "@available" } ] }, { "type": "STRING", "value": "(" }, { "type": "SEQ", "members": [ { "type": "SEQ", "members": [ { "type": "FIELD", "name": "platform", "content": { "type": "SYMBOL", "name": "identifier" } }, { "type": "FIELD", "name": "version", "content": { "type": "PATTERN", "value": "[0-9]+(\\.[0-9]+)*" } } ] }, { "type": "REPEAT", "content": { "type": "SEQ", "members": [ { "type": "STRING", "value": "," }, { "type": "SEQ", "members": [ { "type": "FIELD", "name": "platform", "content": { "type": "SYMBOL", "name": "identifier" } }, { "type": "FIELD", "name": "version", "content": { "type": "PATTERN", "value": "[0-9]+(\\.[0-9]+)*" } } ] } ] } } ] }, { "type": "CHOICE", "members": [ { "type": "SEQ", "members": [ { "type": "STRING", "value": "," }, { "type": "STRING", "value": "*" } ] }, { "type": "BLANK" } ] }, { "type": "STRING", "value": ")" } ] }, "statement_expression": { "type": "SEQ", "members": [ { "type": "STRING", "value": "(" }, { "type": "FIELD", "name": "body", "content": { "type": "SYMBOL", "name": "_statement" } }, { "type": "STRING", "value": ")" } ] }, "va_arg_expression": { "type": "SEQ", "members": [ { "type": "STRING", "value": "va_arg" }, { "type": "STRING", "value": "(" }, { "type": "FIELD", "name": "va_list", "content": { "type": "SYMBOL", "name": "_expression" } }, { "type": "STRING", "value": "," }, { "type": "FIELD", "name": "type", "content": { "type": "SYMBOL", "name": "type_descriptor" } }, { "type": "STRING", "value": ")" } ] }, "preproc_has_include": { "type": "SEQ", "members": [ { "type": "STRING", "value": "__has_include" }, { "type": "STRING", "value": "(" }, { "type": "FIELD", "name": "path", "content": { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "string_literal" }, { "type": "SYMBOL", "name": "system_lib_string" }, { "type": "SYMBOL", "name": "module_string" } ] } }, { "type": "STRING", "value": ")" } ] }, "pragma": { "type": "TOKEN", "content": { "type": "PATTERN", "value": "#[ \\t]*(pragma|warning|error)[^\\r\\n]*\\r?\\n" } }, "_ifdef_if_retain": { "type": "TOKEN", "content": { "type": "CHOICE", "members": [ { "type": "PATTERN", "value": "#if[^\\r\\n]*\\r?\\n" }, { "type": "SEQ", "members": [ { "type": "PATTERN", "value": "#if[^\\r\\\\\\n]*\\\\\\r?\\n" }, { "type": "REPEAT", "content": { "type": "PATTERN", "value": "[^\\r\\\\\\n]*\\\\\\r?\\n" } }, { "type": "PATTERN", "value": "[^#\\\\\\n]+\\r?\\n" } ] }, { "type": "SEQ", "members": [ { "type": "PATTERN", "value": "#if[^\\r\\n]*\\r?\\n" }, { "type": "PATTERN", "value": "#else[ \\t]*\\r?\\n" } ] } ] } }, "_ifdef_elif_ignore": { "type": "TOKEN", "content": { "type": "SEQ", "members": [ { "type": "PATTERN", "value": "#elif[^\\r\\n]*\\r?\\n" }, { "type": "REPEAT", "content": { "type": "CHOICE", "members": [ { "type": "PATTERN", "value": "([ \\t]*[^#][^#]*)?\\r?\\n" }, { "type": "PATTERN", "value": "[ \\t]*#[ \\t]*(elif|else|import|include|pragma|define|undef|line|warning|error).*\\r?\\n" } ] } }, { "type": "PATTERN", "value": "[ \\t]*#endif" } ] } }, "_ifdef_else_ignore": { "type": "TOKEN", "content": { "type": "CHOICE", "members": [ { "type": "STRING", "value": "#else" }, { "type": "SEQ", "members": [ { "type": "PATTERN", "value": "#else[ \\t]*\\r?\\n" }, { "type": "REPEAT", "content": { "type": "CHOICE", "members": [ { "type": "PATTERN", "value": "([ \\t]*[^#][^#]*)?\\r?\\n" }, { "type": "PATTERN", "value": "[ \\t]*#[ \\t]*(import|include|pragma|define|undef|line|warning|error).*\\r?\\n" } ] } }, { "type": "PATTERN", "value": "[ \\t]*#endif" } ] } ] } }, "_ifdef_endif_retain": { "type": "TOKEN", "content": { "type": "PATTERN", "value": "#endif[^\\r\\n]*\\r?\\n?" } }, "_ifdef_undef_retain": { "type": "TOKEN", "content": { "type": "PATTERN", "value": "#undef[^\\r\\n]*\\r?\\n?" } } }, "extras": [ { "type": "PATTERN", "value": "\\u00A0|\\s|\\\\\\r?\\n" }, { "type": "SYMBOL", "name": "comment" }, { "type": "SYMBOL", "name": "pragma" }, { "type": "SYMBOL", "name": "_ifdef_if_retain" }, { "type": "SYMBOL", "name": "_ifdef_elif_ignore" }, { "type": "SYMBOL", "name": "_ifdef_else_ignore" }, { "type": "SYMBOL", "name": "_ifdef_endif_retain" }, { "type": "SYMBOL", "name": "_ifdef_undef_retain" } ], "conflicts": [ [ "_type_specifier", "_declarator" ], [ "_type_specifier", "_declarator", "macro_type_specifier" ], [ "_type_specifier", "_expression" ], [ "_type_specifier", "_expression", "macro_type_specifier" ], [ "_type_specifier", "macro_type_specifier" ], [ "sized_type_specifier" ], [ "struct_specifier" ], [ "union_specifier" ], [ "enum_specifier" ], [ "function_declarator" ], [ "type_descriptor" ], [ "superclass_reference" ], [ "_expression", "macro_type_specifier" ], [ "_expression", "generic_type_specifier" ], [ "_declaration_specifiers" ], [ "_declaration_specifiers", "class_interface" ], [ "protocol_identifier", "_type_specifier" ], [ "protocol_identifier", "_parameterized_class_type_arguments" ], [ "declaration", "_argument_type_declarator" ] ], "precedences": [], "externals": [], "inline": [ "_top_level_item", "_type_identifier", "_field_identifier", "_statement_identifier", "_non_case_statement", "_assignment_left_expression" ], "supertypes": [ "_expression", "_statement", "_declarator", "_field_declarator", "_type_declarator", "_abstract_declarator" ] }