{
"$schema": "https://tree-sitter.github.io/tree-sitter/assets/schemas/grammar.schema.json",
"name": "onescript",
"word": "identifier",
"rules": {
"source_file": {
"type": "SEQ",
"members": [
{
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "module_var_block"
},
{
"type": "BLANK"
}
]
},
{
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "method_block"
},
{
"type": "BLANK"
}
]
},
{
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "_code_block"
},
{
"type": "BLANK"
}
]
}
]
},
"annotation": {
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": "&"
},
{
"type": "SYMBOL",
"name": "identifier"
},
{
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "_annotation_parameters"
},
{
"type": "BLANK"
}
]
}
]
},
"_annotation_parameters": {
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": "("
},
{
"type": "SYMBOL",
"name": "annotation_parameter"
},
{
"type": "CHOICE",
"members": [
{
"type": "REPEAT1",
"content": {
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": ","
},
{
"type": "SYMBOL",
"name": "annotation_parameter"
}
]
}
},
{
"type": "BLANK"
}
]
},
{
"type": "STRING",
"value": ")"
}
]
},
"annotation_parameter": {
"type": "CHOICE",
"members": [
{
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "identifier"
},
{
"type": "CHOICE",
"members": [
{
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": "="
},
{
"type": "SYMBOL",
"name": "_const_value"
}
]
},
{
"type": "BLANK"
}
]
}
]
},
{
"type": "SYMBOL",
"name": "_const_value"
}
]
},
"module_var_block": {
"type": "REPEAT1",
"content": {
"type": "SYMBOL",
"name": "module_var_declaration"
}
},
"module_var_declaration": {
"type": "SEQ",
"members": [
{
"type": "REPEAT",
"content": {
"type": "SYMBOL",
"name": "annotation"
}
},
{
"type": "PATTERN",
"value": "(?iu)(var|перем)"
},
{
"type": "SYMBOL",
"name": "identifier"
},
{
"type": "REPEAT",
"content": {
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": ","
},
{
"type": "SYMBOL",
"name": "identifier"
}
]
}
},
{
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "export"
},
{
"type": "BLANK"
}
]
},
{
"type": "STRING",
"value": ";"
}
]
},
"var_block": {
"type": "REPEAT1",
"content": {
"type": "SYMBOL",
"name": "var_declaration"
}
},
"method_block": {
"type": "REPEAT1",
"content": {
"type": "SYMBOL",
"name": "_method_declaration"
}
},
"var_declaration": {
"type": "SEQ",
"members": [
{
"type": "PATTERN",
"value": "(?iu)(var|перем)"
},
{
"type": "SYMBOL",
"name": "identifier"
},
{
"type": "REPEAT",
"content": {
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": ","
},
{
"type": "SYMBOL",
"name": "identifier"
}
]
}
},
{
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "export"
},
{
"type": "BLANK"
}
]
},
{
"type": "STRING",
"value": ";"
}
]
},
"_method_declaration": {
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "func_declaration"
},
{
"type": "SYMBOL",
"name": "proc_declaration"
}
]
},
"func_declaration": {
"type": "SEQ",
"members": [
{
"type": "REPEAT",
"content": {
"type": "SYMBOL",
"name": "annotation"
}
},
{
"type": "PATTERN",
"value": "(?iu)(function|функция)"
},
{
"type": "FIELD",
"name": "func_name",
"content": {
"type": "SYMBOL",
"name": "identifier"
}
},
{
"type": "SYMBOL",
"name": "argument_list"
},
{
"type": "CHOICE",
"members": [
{
"type": "PATTERN",
"value": "(?iu)(export|экспорт)"
},
{
"type": "BLANK"
}
]
},
{
"type": "SEQ",
"members": [
{
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "var_block"
},
{
"type": "BLANK"
}
]
},
{
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "_code_block"
},
{
"type": "BLANK"
}
]
}
]
},
{
"type": "PATTERN",
"value": "(?iu)(endfunction|конецфункции)"
}
]
},
"proc_declaration": {
"type": "SEQ",
"members": [
{
"type": "REPEAT",
"content": {
"type": "SYMBOL",
"name": "annotation"
}
},
{
"type": "PATTERN",
"value": "(?iu)(procedure|процедура)"
},
{
"type": "FIELD",
"name": "proc_name",
"content": {
"type": "SYMBOL",
"name": "identifier"
}
},
{
"type": "SYMBOL",
"name": "argument_list"
},
{
"type": "CHOICE",
"members": [
{
"type": "PATTERN",
"value": "(?iu)(export|экспорт)"
},
{
"type": "BLANK"
}
]
},
{
"type": "SEQ",
"members": [
{
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "var_block"
},
{
"type": "BLANK"
}
]
},
{
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "_code_block"
},
{
"type": "BLANK"
}
]
}
]
},
{
"type": "PATTERN",
"value": "(?iu)(endprocedure|конецпроцедуры)"
}
]
},
"argument_list": {
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": "("
},
{
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "arguments"
},
{
"type": "BLANK"
}
]
},
{
"type": "STRING",
"value": ")"
}
]
},
"export": {
"type": "PATTERN",
"value": "(?iu)(export|экспорт)"
},
"arguments": {
"type": "SEQ",
"members": [
{
"type": "REPEAT",
"content": {
"type": "SYMBOL",
"name": "annotation"
}
},
{
"type": "CHOICE",
"members": [
{
"type": "PATTERN",
"value": "(?iu)(val|знач)"
},
{
"type": "BLANK"
}
]
},
{
"type": "SYMBOL",
"name": "identifier"
},
{
"type": "CHOICE",
"members": [
{
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": "="
},
{
"type": "SYMBOL",
"name": "_const_value"
}
]
},
{
"type": "BLANK"
}
]
},
{
"type": "REPEAT",
"content": {
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": ","
},
{
"type": "CHOICE",
"members": [
{
"type": "REPEAT1",
"content": {
"type": "SYMBOL",
"name": "annotation"
}
},
{
"type": "BLANK"
}
]
},
{
"type": "CHOICE",
"members": [
{
"type": "PATTERN",
"value": "(?iu)(val|знач)"
},
{
"type": "BLANK"
}
]
},
{
"type": "SYMBOL",
"name": "identifier"
},
{
"type": "CHOICE",
"members": [
{
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": "="
},
{
"type": "SYMBOL",
"name": "_const_value"
}
]
},
{
"type": "BLANK"
}
]
}
]
}
}
]
},
"_code_block": {
"type": "REPEAT1",
"content": {
"type": "SEQ",
"members": [
{
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "_statement"
},
{
"type": "SYMBOL",
"name": "assignment"
}
]
}
]
}
},
"_statement": {
"type": "PREC_LEFT",
"value": 0,
"content": {
"type": "CHOICE",
"members": [
{
"type": "SEQ",
"members": [
{
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "if_statement"
},
{
"type": "SYMBOL",
"name": "while_loop"
},
{
"type": "SYMBOL",
"name": "for_loop"
},
{
"type": "SYMBOL",
"name": "for_each_loop"
},
{
"type": "SYMBOL",
"name": "return_statement"
},
{
"type": "SYMBOL",
"name": "raise_operator"
},
{
"type": "SYMBOL",
"name": "break_statement"
},
{
"type": "SYMBOL",
"name": "continue_statement"
},
{
"type": "SYMBOL",
"name": "try_statement"
},
{
"type": "SYMBOL",
"name": "call_statement"
},
{
"type": "SYMBOL",
"name": "add_handler"
},
{
"type": "SYMBOL",
"name": "remove_handler"
}
]
},
{
"type": "CHOICE",
"members": [
{
"type": "STRING",
"value": ";"
},
{
"type": "BLANK"
}
]
}
]
},
{
"type": "STRING",
"value": ";"
}
]
}
},
"add_handler": {
"type": "SEQ",
"members": [
{
"type": "PATTERN",
"value": "(?iu)(addHandler|добавитьОбработчик)"
},
{
"type": "SYMBOL",
"name": "_expression"
},
{
"type": "STRING",
"value": ","
},
{
"type": "SYMBOL",
"name": "_expression"
}
]
},
"remove_handler": {
"type": "SEQ",
"members": [
{
"type": "PATTERN",
"value": "(?iu)(removeHandler|удалитьОбработчик)"
},
{
"type": "SYMBOL",
"name": "_expression"
},
{
"type": "STRING",
"value": ","
},
{
"type": "SYMBOL",
"name": "_expression"
}
]
},
"call_statement": {
"type": "PREC_LEFT",
"value": 0,
"content": {
"type": "SEQ",
"members": [
{
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "method_call"
},
{
"type": "SYMBOL",
"name": "_member_call"
}
]
}
]
}
},
"raise_operator": {
"type": "PREC_RIGHT",
"value": 0,
"content": {
"type": "SEQ",
"members": [
{
"type": "PATTERN",
"value": "(?iu)(raise|вызватьисключение)"
},
{
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "_expression"
},
{
"type": "BLANK"
}
]
}
]
}
},
"return_statement": {
"type": "PREC_RIGHT",
"value": 0,
"content": {
"type": "SEQ",
"members": [
{
"type": "PATTERN",
"value": "(?iu)(return|возврат)"
},
{
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "_expression"
},
{
"type": "BLANK"
}
]
}
]
}
},
"break_statement": {
"type": "PATTERN",
"value": "(?iu)(break|прервать)"
},
"continue_statement": {
"type": "PATTERN",
"value": "(?iu)(continue|продолжить)"
},
"while_loop": {
"type": "SEQ",
"members": [
{
"type": "PATTERN",
"value": "(?iu)(while|пока)"
},
{
"type": "SYMBOL",
"name": "_expression"
},
{
"type": "PATTERN",
"value": "(?iu)(do|цикл)"
},
{
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "_code_block"
},
{
"type": "BLANK"
}
]
},
{
"type": "PATTERN",
"value": "(?iu)(endwhile|конеццикла)"
}
]
},
"for_loop": {
"type": "SEQ",
"members": [
{
"type": "PATTERN",
"value": "(?iu)(для|for)"
},
{
"type": "SYMBOL",
"name": "identifier"
},
{
"type": "STRING",
"value": "="
},
{
"type": "SYMBOL",
"name": "_expression"
},
{
"type": "PATTERN",
"value": "(?iu)(по|to)"
},
{
"type": "SYMBOL",
"name": "_expression"
},
{
"type": "PATTERN",
"value": "(?iu)(цикл|do)"
},
{
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "_code_block"
},
{
"type": "BLANK"
}
]
},
{
"type": "PATTERN",
"value": "(?iu)(конеццикла|enddo)"
}
]
},
"for_each_loop": {
"type": "SEQ",
"members": [
{
"type": "PATTERN",
"value": "(?iu)(for each|для каждого)"
},
{
"type": "SYMBOL",
"name": "identifier"
},
{
"type": "PATTERN",
"value": "(?iu)(из|in)"
},
{
"type": "SYMBOL",
"name": "member_access"
},
{
"type": "PATTERN",
"value": "(?iu)(do|цикл)"
},
{
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "_code_block"
},
{
"type": "BLANK"
}
]
},
{
"type": "PATTERN",
"value": "(?iu)(enddo|конеццикла)"
}
]
},
"try_statement": {
"type": "SEQ",
"members": [
{
"type": "PATTERN",
"value": "(?iu)(try|попытка)"
},
{
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "_code_block"
},
{
"type": "BLANK"
}
]
},
{
"type": "PATTERN",
"value": "(?iu)(исключение|except)"
},
{
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "_code_block"
},
{
"type": "BLANK"
}
]
},
{
"type": "PATTERN",
"value": "(?iu)(endtry|конецпопытки)"
}
]
},
"if_statement": {
"type": "SEQ",
"members": [
{
"type": "PATTERN",
"value": "(?iu)(if|если)"
},
{
"type": "SYMBOL",
"name": "_expression"
},
{
"type": "PATTERN",
"value": "(?iu)(then|тогда)"
},
{
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "_code_block"
},
{
"type": "BLANK"
}
]
},
{
"type": "REPEAT",
"content": {
"type": "SEQ",
"members": [
{
"type": "PATTERN",
"value": "(?iu)(elsif|иначеесли)"
},
{
"type": "SYMBOL",
"name": "_expression"
},
{
"type": "PATTERN",
"value": "(?iu)(then|тогда)"
},
{
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "_code_block"
},
{
"type": "BLANK"
}
]
}
]
}
},
{
"type": "CHOICE",
"members": [
{
"type": "SEQ",
"members": [
{
"type": "PATTERN",
"value": "(?iu)(else|иначе)"
},
{
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "_code_block"
},
{
"type": "BLANK"
}
]
}
]
},
{
"type": "BLANK"
}
]
},
{
"type": "PATTERN",
"value": "(?iu)(endif|конецесли)"
}
]
},
"ternary_operator": {
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": "?"
},
{
"type": "STRING",
"value": "("
},
{
"type": "SYMBOL",
"name": "_expression"
},
{
"type": "STRING",
"value": ","
},
{
"type": "SYMBOL",
"name": "_expression"
},
{
"type": "STRING",
"value": ","
},
{
"type": "SYMBOL",
"name": "_expression"
},
{
"type": "STRING",
"value": ")"
}
]
},
"new_operator": {
"type": "PREC_RIGHT",
"value": 0,
"content": {
"type": "CHOICE",
"members": [
{
"type": "SEQ",
"members": [
{
"type": "PATTERN",
"value": "(?iu)(новый|new)"
},
{
"type": "SYMBOL",
"name": "member_access"
},
{
"type": "CHOICE",
"members": [
{
"type": "STRING",
"value": ";"
},
{
"type": "BLANK"
}
]
}
]
},
{
"type": "SEQ",
"members": [
{
"type": "PATTERN",
"value": "(?iu)(новый|new)"
},
{
"type": "STRING",
"value": "("
},
{
"type": "FIELD",
"name": "type_name",
"content": {
"type": "SYMBOL",
"name": "identifier"
}
},
{
"type": "CHOICE",
"members": [
{
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": ","
},
{
"type": "SYMBOL",
"name": "identifier"
}
]
},
{
"type": "BLANK"
}
]
},
{
"type": "STRING",
"value": ")"
}
]
}
]
}
},
"_expression": {
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "unary_expression"
},
{
"type": "SYMBOL",
"name": "binary_expression"
},
{
"type": "SYMBOL",
"name": "member_access"
},
{
"type": "SYMBOL",
"name": "ternary_operator"
},
{
"type": "SYMBOL",
"name": "new_operator"
},
{
"type": "SYMBOL",
"name": "_const_value"
}
]
},
"_const_value": {
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "number"
},
{
"type": "SYMBOL",
"name": "string"
},
{
"type": "SYMBOL",
"name": "null_literal"
},
{
"type": "SYMBOL",
"name": "undefined_literal"
},
{
"type": "SYMBOL",
"name": "true_literal"
},
{
"type": "SYMBOL",
"name": "false_literal"
},
{
"type": "SYMBOL",
"name": "date_literal"
}
]
},
"assignment": {
"type": "PREC_LEFT",
"value": 0,
"content": {
"type": "SEQ",
"members": [
{
"type": "FIELD",
"name": "target",
"content": {
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "identifier"
},
{
"type": "SYMBOL",
"name": "index_access"
},
{
"type": "SYMBOL",
"name": "member_property"
}
]
}
},
{
"type": "STRING",
"value": "="
},
{
"type": "FIELD",
"name": "value",
"content": {
"type": "SYMBOL",
"name": "_expression"
}
},
{
"type": "CHOICE",
"members": [
{
"type": "STRING",
"value": ";"
},
{
"type": "BLANK"
}
]
}
]
}
},
"member_access": {
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "identifier"
},
{
"type": "SYMBOL",
"name": "index_access"
},
{
"type": "SYMBOL",
"name": "method_call"
},
{
"type": "SYMBOL",
"name": "_member_call"
},
{
"type": "SYMBOL",
"name": "member_property"
}
]
},
"_member_call": {
"type": "PREC_LEFT",
"value": 0,
"content": {
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "member_access"
},
{
"type": "STRING",
"value": "."
},
{
"type": "SYMBOL",
"name": "method_call"
}
]
}
},
"method_call": {
"type": "PREC_LEFT",
"value": 7,
"content": {
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "identifier"
},
{
"type": "STRING",
"value": "("
},
{
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "call_args"
},
{
"type": "BLANK"
}
]
},
{
"type": "STRING",
"value": ")"
}
]
}
},
"member_property": {
"type": "PREC_LEFT",
"value": 0,
"content": {
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "member_access"
},
{
"type": "STRING",
"value": "."
},
{
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "identifier"
},
{
"type": "SYMBOL",
"name": "index_access"
}
]
}
]
}
},
"index_access": {
"type": "SEQ",
"members": [
{
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "identifier"
},
{
"type": "SYMBOL",
"name": "method_call"
}
]
},
{
"type": "STRING",
"value": "["
},
{
"type": "SYMBOL",
"name": "_expression"
},
{
"type": "STRING",
"value": "]"
}
]
},
"call_args": {
"type": "CHOICE",
"members": [
{
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "_expression"
},
{
"type": "REPEAT",
"content": {
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": ","
},
{
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "_expression"
},
{
"type": "BLANK"
}
]
}
]
}
}
]
},
{
"type": "SEQ",
"members": [
{
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "_expression"
},
{
"type": "BLANK"
}
]
},
{
"type": "REPEAT1",
"content": {
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": ","
},
{
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "_expression"
},
{
"type": "BLANK"
}
]
}
]
}
}
]
}
]
},
"unary_expression": {
"type": "PREC",
"value": 6,
"content": {
"type": "CHOICE",
"members": [
{
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": "-"
},
{
"type": "SYMBOL",
"name": "_expression"
}
]
},
{
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": "+"
},
{
"type": "SYMBOL",
"name": "_expression"
}
]
},
{
"type": "SEQ",
"members": [
{
"type": "PATTERN",
"value": "(?iu)(not|не)"
},
{
"type": "SYMBOL",
"name": "_expression"
}
]
}
]
}
},
"binary_expression": {
"type": "CHOICE",
"members": [
{
"type": "PREC",
"value": 9,
"content": {
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": "("
},
{
"type": "SYMBOL",
"name": "_expression"
},
{
"type": "STRING",
"value": ")"
}
]
}
},
{
"type": "PREC_LEFT",
"value": 5,
"content": {
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "_expression"
},
{
"type": "STRING",
"value": "*"
},
{
"type": "SYMBOL",
"name": "_expression"
}
]
}
},
{
"type": "PREC_LEFT",
"value": 5,
"content": {
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "_expression"
},
{
"type": "STRING",
"value": "/"
},
{
"type": "SYMBOL",
"name": "_expression"
}
]
}
},
{
"type": "PREC_LEFT",
"value": 5,
"content": {
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "_expression"
},
{
"type": "STRING",
"value": "%"
},
{
"type": "SYMBOL",
"name": "_expression"
}
]
}
},
{
"type": "PREC_LEFT",
"value": 4,
"content": {
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "_expression"
},
{
"type": "STRING",
"value": "-"
},
{
"type": "SYMBOL",
"name": "_expression"
}
]
}
},
{
"type": "PREC_LEFT",
"value": 4,
"content": {
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "_expression"
},
{
"type": "STRING",
"value": "+"
},
{
"type": "SYMBOL",
"name": "_expression"
}
]
}
},
{
"type": "PREC_LEFT",
"value": 3,
"content": {
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "_expression"
},
{
"type": "STRING",
"value": "<"
},
{
"type": "SYMBOL",
"name": "_expression"
}
]
}
},
{
"type": "PREC_LEFT",
"value": 3,
"content": {
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "_expression"
},
{
"type": "STRING",
"value": "<="
},
{
"type": "SYMBOL",
"name": "_expression"
}
]
}
},
{
"type": "PREC_LEFT",
"value": 3,
"content": {
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "_expression"
},
{
"type": "STRING",
"value": "="
},
{
"type": "SYMBOL",
"name": "_expression"
}
]
}
},
{
"type": "PREC_LEFT",
"value": 3,
"content": {
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "_expression"
},
{
"type": "STRING",
"value": ">="
},
{
"type": "SYMBOL",
"name": "_expression"
}
]
}
},
{
"type": "PREC_LEFT",
"value": 3,
"content": {
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "_expression"
},
{
"type": "STRING",
"value": ">"
},
{
"type": "SYMBOL",
"name": "_expression"
}
]
}
},
{
"type": "PREC_LEFT",
"value": 3,
"content": {
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "_expression"
},
{
"type": "STRING",
"value": "<>"
},
{
"type": "SYMBOL",
"name": "_expression"
}
]
}
},
{
"type": "PREC_LEFT",
"value": 2,
"content": {
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "_expression"
},
{
"type": "PATTERN",
"value": "(?iu)(and|и)"
},
{
"type": "SYMBOL",
"name": "_expression"
}
]
}
},
{
"type": "PREC_LEFT",
"value": 1,
"content": {
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "_expression"
},
{
"type": "PATTERN",
"value": "(?iu)(or|или)"
},
{
"type": "SYMBOL",
"name": "_expression"
}
]
}
}
]
},
"number": {
"type": "TOKEN",
"content": {
"type": "SEQ",
"members": [
{
"type": "CHOICE",
"members": [
{
"type": "CHOICE",
"members": [
{
"type": "STRING",
"value": "+"
},
{
"type": "STRING",
"value": "-"
}
]
},
{
"type": "BLANK"
}
]
},
{
"type": "PATTERN",
"value": "\\d+"
},
{
"type": "CHOICE",
"members": [
{
"type": "PATTERN",
"value": "\\\\.d+"
},
{
"type": "BLANK"
}
]
}
]
}
},
"_comment": {
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": "//"
},
{
"type": "PATTERN",
"value": ".*"
}
]
},
"identifier": {
"type": "PATTERN",
"value": "[a-zA-Zа-яА-Я_][a-zA-Zа-яА-Я0-9_]*"
},
"_preprocessor_directive": {
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": "#"
},
{
"type": "PATTERN",
"value": ".*"
}
]
},
"string": {
"type": "CHOICE",
"members": [
{
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": "\""
},
{
"type": "TOKEN",
"content": {
"type": "PREC",
"value": 1,
"content": {
"type": "PATTERN",
"value": "([^\"\\r\\n]|\"\")*"
}
}
},
{
"type": "STRING",
"value": "\""
}
]
},
{
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": "\""
},
{
"type": "TOKEN",
"content": {
"type": "PREC",
"value": 1,
"content": {
"type": "PATTERN",
"value": "([^\"\\r\\n]|\"\")*"
}
}
},
{
"type": "REPEAT1",
"content": {
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": "|"
},
{
"type": "TOKEN",
"content": {
"type": "PREC",
"value": 1,
"content": {
"type": "PATTERN",
"value": "([^\"\\r\\n]|\"\")*"
}
}
}
]
}
},
{
"type": "STRING",
"value": "\""
}
]
}
]
},
"date_literal": {
"type": "PATTERN",
"value": "'\\d{8,14}'"
},
"null_literal": {
"type": "PATTERN",
"value": "(?iu)null"
},
"true_literal": {
"type": "PATTERN",
"value": "(?iu)True|Истина"
},
"false_literal": {
"type": "PATTERN",
"value": "(?iu)False|Ложь"
},
"undefined_literal": {
"type": "PATTERN",
"value": "(?iu)Undefined|Неопределено"
}
},
"extras": [
{
"type": "PATTERN",
"value": "\\s|\\r?\\n"
},
{
"type": "SYMBOL",
"name": "_comment"
},
{
"type": "SYMBOL",
"name": "_preprocessor_directive"
}
],
"conflicts": [
[
"module_var_block"
]
],
"precedences": [],
"externals": [],
"inline": [],
"supertypes": [],
"reserved": {}
}