mirror of https://github.com/Wilfred/difftastic/
8048 lines
180 KiB
JSON
8048 lines
180 KiB
JSON
{
|
|
"name": "scala",
|
|
"word": "_alpha_identifier",
|
|
"rules": {
|
|
"compilation_unit": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_shebang"
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_top_level_definition"
|
|
},
|
|
{
|
|
"type": "REPEAT",
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_semicolon"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_top_level_definition"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_semicolon"
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"_top_level_definition": {
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "package_clause"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "package_object"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_definition"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_end_marker"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "expression"
|
|
}
|
|
]
|
|
},
|
|
"_definition": {
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "given_definition"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "extension_definition"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "class_definition"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "import_declaration"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "export_declaration"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "object_definition"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "enum_definition"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "trait_definition"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "val_definition"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "val_declaration"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "var_definition"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "var_declaration"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "type_definition"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "function_definition"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "function_declaration"
|
|
}
|
|
]
|
|
},
|
|
"enum_definition": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "REPEAT",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "annotation"
|
|
}
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "enum"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_class_constructor"
|
|
},
|
|
{
|
|
"type": "FIELD",
|
|
"name": "extend",
|
|
"content": {
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "extends_clause"
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "FIELD",
|
|
"name": "derive",
|
|
"content": {
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "derives_clause"
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "FIELD",
|
|
"name": "body",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "enum_body"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"_enum_block": {
|
|
"type": "PREC_LEFT",
|
|
"value": 0,
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "enum_case_definitions"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "expression"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_definition"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "REPEAT",
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_semicolon"
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "enum_case_definitions"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "expression"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_definition"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_semicolon"
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"enum_body": {
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "PREC_LEFT",
|
|
"value": 1,
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": ":"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_indent"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_enum_block"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_outdent"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "{"
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_enum_block"
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "}"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"enum_case_definitions": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "REPEAT",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "annotation"
|
|
}
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "case"
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "simple_enum_case"
|
|
},
|
|
{
|
|
"type": "REPEAT",
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": ","
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "simple_enum_case"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "full_enum_case"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"simple_enum_case": {
|
|
"type": "PREC_LEFT",
|
|
"value": 0,
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "FIELD",
|
|
"name": "name",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "_identifier"
|
|
}
|
|
},
|
|
{
|
|
"type": "FIELD",
|
|
"name": "extend",
|
|
"content": {
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "extends_clause"
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"full_enum_case": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "FIELD",
|
|
"name": "name",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "_identifier"
|
|
}
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_full_enum_def"
|
|
}
|
|
]
|
|
},
|
|
"_full_enum_def": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "FIELD",
|
|
"name": "type_parameters",
|
|
"content": {
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "type_parameters"
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "FIELD",
|
|
"name": "class_parameters",
|
|
"content": {
|
|
"type": "REPEAT1",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "class_parameters"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "FIELD",
|
|
"name": "extend",
|
|
"content": {
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "extends_clause"
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"package_clause": {
|
|
"type": "PREC_RIGHT",
|
|
"value": 0,
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "package"
|
|
},
|
|
{
|
|
"type": "FIELD",
|
|
"name": "name",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "package_identifier"
|
|
}
|
|
},
|
|
{
|
|
"type": "FIELD",
|
|
"name": "body",
|
|
"content": {
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "template_body"
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"package_identifier": {
|
|
"type": "PREC_RIGHT",
|
|
"value": 0,
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_identifier"
|
|
},
|
|
{
|
|
"type": "REPEAT",
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "."
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_identifier"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"package_object": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "package"
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "object"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_object_definition"
|
|
}
|
|
]
|
|
},
|
|
"import_declaration": {
|
|
"type": "PREC_LEFT",
|
|
"value": 0,
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "import"
|
|
},
|
|
{
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_namespace_expression"
|
|
},
|
|
{
|
|
"type": "REPEAT",
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": ","
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_namespace_expression"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"export_declaration": {
|
|
"type": "PREC_LEFT",
|
|
"value": 0,
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "export"
|
|
},
|
|
{
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_namespace_expression"
|
|
},
|
|
{
|
|
"type": "REPEAT",
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": ","
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_namespace_expression"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"_namespace_expression": {
|
|
"type": "PREC_LEFT",
|
|
"value": 0,
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "FIELD",
|
|
"name": "path",
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_identifier"
|
|
},
|
|
{
|
|
"type": "REPEAT",
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "."
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_identifier"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "."
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "namespace_wildcard"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "namespace_selectors"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "as_renamed_identifier"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"namespace_wildcard": {
|
|
"type": "PREC_LEFT",
|
|
"value": 1,
|
|
"content": {
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "*"
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "_"
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "given"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"_namespace_given_by_type": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "given"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_type"
|
|
}
|
|
]
|
|
},
|
|
"namespace_selectors": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "{"
|
|
},
|
|
{
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_namespace_given_by_type"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "namespace_wildcard"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_identifier"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "arrow_renamed_identifier"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "as_renamed_identifier"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "REPEAT",
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": ","
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_namespace_given_by_type"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "namespace_wildcard"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_identifier"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "arrow_renamed_identifier"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "as_renamed_identifier"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": ","
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "}"
|
|
}
|
|
]
|
|
},
|
|
"_import_selectors": {
|
|
"type": "ALIAS",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "namespace_selectors"
|
|
},
|
|
"named": true,
|
|
"value": "import_selectors"
|
|
},
|
|
"arrow_renamed_identifier": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "FIELD",
|
|
"name": "name",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "_identifier"
|
|
}
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "=>"
|
|
},
|
|
{
|
|
"type": "FIELD",
|
|
"name": "alias",
|
|
"content": {
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_identifier"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "wildcard"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"as_renamed_identifier": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "FIELD",
|
|
"name": "name",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "_identifier"
|
|
}
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "as"
|
|
},
|
|
{
|
|
"type": "FIELD",
|
|
"name": "alias",
|
|
"content": {
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_identifier"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "wildcard"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"object_definition": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "REPEAT",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "annotation"
|
|
}
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "modifiers"
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "case"
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "object"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_object_definition"
|
|
}
|
|
]
|
|
},
|
|
"_object_definition": {
|
|
"type": "PREC_LEFT",
|
|
"value": 0,
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "FIELD",
|
|
"name": "name",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "_identifier"
|
|
}
|
|
},
|
|
{
|
|
"type": "FIELD",
|
|
"name": "extend",
|
|
"content": {
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "extends_clause"
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "FIELD",
|
|
"name": "derive",
|
|
"content": {
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "derives_clause"
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "FIELD",
|
|
"name": "body",
|
|
"content": {
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_definition_body"
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"class_definition": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "REPEAT",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "annotation"
|
|
}
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "modifiers"
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "case"
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "class"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_class_definition"
|
|
}
|
|
]
|
|
},
|
|
"_class_definition": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_class_constructor"
|
|
},
|
|
{
|
|
"type": "FIELD",
|
|
"name": "extend",
|
|
"content": {
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "extends_clause"
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "FIELD",
|
|
"name": "derive",
|
|
"content": {
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "derives_clause"
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "FIELD",
|
|
"name": "body",
|
|
"content": {
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_definition_body"
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"_definition_body": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_automatic_semicolon"
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "FIELD",
|
|
"name": "body",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "template_body"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"_class_constructor": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "FIELD",
|
|
"name": "name",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "_identifier"
|
|
}
|
|
},
|
|
{
|
|
"type": "FIELD",
|
|
"name": "type_parameters",
|
|
"content": {
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "type_parameters"
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "annotation"
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "access_modifier"
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "FIELD",
|
|
"name": "class_parameters",
|
|
"content": {
|
|
"type": "REPEAT",
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_automatic_semicolon"
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "class_parameters"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"trait_definition": {
|
|
"type": "PREC_LEFT",
|
|
"value": 0,
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "REPEAT",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "annotation"
|
|
}
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "modifiers"
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "trait"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_class_definition"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"type_parameters": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "["
|
|
},
|
|
{
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_variant_type_parameter"
|
|
},
|
|
{
|
|
"type": "REPEAT",
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": ","
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_variant_type_parameter"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": ","
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "]"
|
|
}
|
|
]
|
|
},
|
|
"_variant_type_parameter": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "REPEAT",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "annotation"
|
|
}
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "covariant_type_parameter"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "contravariant_type_parameter"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_type_parameter"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "type_lambda"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"covariant_type_parameter": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "+"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_type_parameter"
|
|
}
|
|
]
|
|
},
|
|
"contravariant_type_parameter": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "-"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_type_parameter"
|
|
}
|
|
]
|
|
},
|
|
"_type_parameter": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "FIELD",
|
|
"name": "name",
|
|
"content": {
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "wildcard"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_identifier"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "FIELD",
|
|
"name": "type_parameters",
|
|
"content": {
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "type_parameters"
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "FIELD",
|
|
"name": "bound",
|
|
"content": {
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "lower_bound"
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "FIELD",
|
|
"name": "bound",
|
|
"content": {
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "upper_bound"
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "FIELD",
|
|
"name": "bound",
|
|
"content": {
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "REPEAT",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "view_bound"
|
|
}
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "FIELD",
|
|
"name": "bound",
|
|
"content": {
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "REPEAT",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "context_bound"
|
|
}
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"upper_bound": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "<:"
|
|
},
|
|
{
|
|
"type": "FIELD",
|
|
"name": "type",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "_type"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"lower_bound": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": ">:"
|
|
},
|
|
{
|
|
"type": "FIELD",
|
|
"name": "type",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "_type"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"view_bound": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "<%"
|
|
},
|
|
{
|
|
"type": "FIELD",
|
|
"name": "type",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "_type"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"context_bound": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": ":"
|
|
},
|
|
{
|
|
"type": "FIELD",
|
|
"name": "type",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "_type"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"template_body": {
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_indented_template_body"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_braced_template_body"
|
|
}
|
|
]
|
|
},
|
|
"_indented_template_body": {
|
|
"type": "PREC_LEFT",
|
|
"value": 1,
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": ":"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_indent"
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "self_type"
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_block"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_outdent"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"_braced_template_body": {
|
|
"type": "PREC_LEFT",
|
|
"value": 1,
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "{"
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_braced_template_body1"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_braced_template_body2"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "}"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"_braced_template_body1": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "self_type"
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_block"
|
|
}
|
|
]
|
|
},
|
|
"_braced_template_body2": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_indent"
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "self_type"
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "self_type"
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_indent"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_block"
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_outdent"
|
|
}
|
|
]
|
|
},
|
|
"with_template_body": {
|
|
"type": "PREC_LEFT",
|
|
"value": 1,
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_indent"
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "self_type"
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_block"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_outdent"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"_extension_template_body": {
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "PREC_LEFT",
|
|
"value": 1,
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_indent"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_block"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_outdent"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "{"
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_block"
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "}"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"_end_marker": {
|
|
"type": "PREC_LEFT",
|
|
"value": "end",
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "end"
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "if"
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "while"
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "for"
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "match"
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "try"
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "new"
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "this"
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "given"
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "extension"
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "val"
|
|
},
|
|
{
|
|
"type": "ALIAS",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "_identifier"
|
|
},
|
|
"named": false,
|
|
"value": "_end_ident"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"self_type": {
|
|
"type": "PREC_DYNAMIC",
|
|
"value": 1,
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_identifier"
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_self_type_ascription"
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "=>"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"_self_type_ascription": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": ":"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_type"
|
|
}
|
|
]
|
|
},
|
|
"annotation": {
|
|
"type": "PREC_RIGHT",
|
|
"value": 0,
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "@"
|
|
},
|
|
{
|
|
"type": "FIELD",
|
|
"name": "name",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "_simple_type"
|
|
}
|
|
},
|
|
{
|
|
"type": "FIELD",
|
|
"name": "arguments",
|
|
"content": {
|
|
"type": "REPEAT",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "arguments"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"val_definition": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_start_val"
|
|
},
|
|
{
|
|
"type": "FIELD",
|
|
"name": "pattern",
|
|
"content": {
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_pattern"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "identifiers"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": ":"
|
|
},
|
|
{
|
|
"type": "FIELD",
|
|
"name": "type",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "_type"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "="
|
|
},
|
|
{
|
|
"type": "FIELD",
|
|
"name": "value",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "_indentable_expression"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"val_declaration": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_start_val"
|
|
},
|
|
{
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "FIELD",
|
|
"name": "name",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "_identifier"
|
|
}
|
|
},
|
|
{
|
|
"type": "REPEAT",
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": ","
|
|
},
|
|
{
|
|
"type": "FIELD",
|
|
"name": "name",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "_identifier"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": ":"
|
|
},
|
|
{
|
|
"type": "FIELD",
|
|
"name": "type",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "_type"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"_start_val": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "REPEAT",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "annotation"
|
|
}
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "modifiers"
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "val"
|
|
}
|
|
]
|
|
},
|
|
"var_declaration": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_start_var"
|
|
},
|
|
{
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "FIELD",
|
|
"name": "name",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "_identifier"
|
|
}
|
|
},
|
|
{
|
|
"type": "REPEAT",
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": ","
|
|
},
|
|
{
|
|
"type": "FIELD",
|
|
"name": "name",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "_identifier"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": ":"
|
|
},
|
|
{
|
|
"type": "FIELD",
|
|
"name": "type",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "_type"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"var_definition": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_start_var"
|
|
},
|
|
{
|
|
"type": "FIELD",
|
|
"name": "pattern",
|
|
"content": {
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_pattern"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "identifiers"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": ":"
|
|
},
|
|
{
|
|
"type": "FIELD",
|
|
"name": "type",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "_type"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "="
|
|
},
|
|
{
|
|
"type": "FIELD",
|
|
"name": "value",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "_indentable_expression"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"_start_var": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "REPEAT",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "annotation"
|
|
}
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "modifiers"
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "var"
|
|
}
|
|
]
|
|
},
|
|
"type_definition": {
|
|
"type": "PREC_LEFT",
|
|
"value": 0,
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "REPEAT",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "annotation"
|
|
}
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "modifiers"
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "opaque_modifier"
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "type"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_type_constructor"
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "="
|
|
},
|
|
{
|
|
"type": "FIELD",
|
|
"name": "type",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "_type"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"_type_constructor": {
|
|
"type": "PREC_LEFT",
|
|
"value": 0,
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "FIELD",
|
|
"name": "name",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "_type_identifier"
|
|
}
|
|
},
|
|
{
|
|
"type": "FIELD",
|
|
"name": "type_parameters",
|
|
"content": {
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "type_parameters"
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "FIELD",
|
|
"name": "bound",
|
|
"content": {
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "lower_bound"
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "FIELD",
|
|
"name": "bound",
|
|
"content": {
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "upper_bound"
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"function_definition": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_function_declaration"
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "="
|
|
},
|
|
{
|
|
"type": "FIELD",
|
|
"name": "body",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "_indentable_expression"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "FIELD",
|
|
"name": "body",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "block"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"function_declaration": {
|
|
"type": "SYMBOL",
|
|
"name": "_function_declaration"
|
|
},
|
|
"_function_declaration": {
|
|
"type": "PREC_LEFT",
|
|
"value": 0,
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "REPEAT",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "annotation"
|
|
}
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "modifiers"
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "def"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_function_constructor"
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": ":"
|
|
},
|
|
{
|
|
"type": "FIELD",
|
|
"name": "return_type",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "_type"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"_function_constructor": {
|
|
"type": "PREC_RIGHT",
|
|
"value": 0,
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "FIELD",
|
|
"name": "name",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "_identifier"
|
|
}
|
|
},
|
|
{
|
|
"type": "FIELD",
|
|
"name": "type_parameters",
|
|
"content": {
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "type_parameters"
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "FIELD",
|
|
"name": "parameters",
|
|
"content": {
|
|
"type": "REPEAT",
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_automatic_semicolon"
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "parameters"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_automatic_semicolon"
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"opaque_modifier": {
|
|
"type": "PREC",
|
|
"value": "mod",
|
|
"content": {
|
|
"type": "STRING",
|
|
"value": "opaque"
|
|
}
|
|
},
|
|
"extension_definition": {
|
|
"type": "PREC_LEFT",
|
|
"value": 0,
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "extension"
|
|
},
|
|
{
|
|
"type": "FIELD",
|
|
"name": "type_parameters",
|
|
"content": {
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "type_parameters"
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "FIELD",
|
|
"name": "parameters",
|
|
"content": {
|
|
"type": "REPEAT",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "parameters"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "FIELD",
|
|
"name": "body",
|
|
"content": {
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_extension_template_body"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "function_definition"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "function_declaration"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"given_definition": {
|
|
"type": "PREC_LEFT",
|
|
"value": 0,
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "REPEAT",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "annotation"
|
|
}
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "modifiers"
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "given"
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_given_constructor"
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "FIELD",
|
|
"name": "return_type",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "_structural_instance"
|
|
}
|
|
},
|
|
{
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "FIELD",
|
|
"name": "return_type",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "_annotated_type"
|
|
}
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "="
|
|
},
|
|
{
|
|
"type": "FIELD",
|
|
"name": "body",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "_indentable_expression"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"_given_constructor": {
|
|
"type": "PREC_RIGHT",
|
|
"value": 0,
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "FIELD",
|
|
"name": "name",
|
|
"content": {
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_identifier"
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "FIELD",
|
|
"name": "type_parameters",
|
|
"content": {
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "type_parameters"
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "FIELD",
|
|
"name": "parameters",
|
|
"content": {
|
|
"type": "REPEAT",
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_automatic_semicolon"
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "parameters"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_automatic_semicolon"
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": ":"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"_structural_instance": {
|
|
"type": "PREC_LEFT",
|
|
"value": 7,
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_constructor_application"
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "with"
|
|
},
|
|
{
|
|
"type": "FIELD",
|
|
"name": "body",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "with_template_body"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"_constructor_application": {
|
|
"type": "PREC_LEFT",
|
|
"value": 7,
|
|
"content": {
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_annotated_type"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "compound_type"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_structural_type"
|
|
},
|
|
{
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_simple_type"
|
|
},
|
|
{
|
|
"type": "FIELD",
|
|
"name": "arguments",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "arguments"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_annotated_type"
|
|
},
|
|
{
|
|
"type": "FIELD",
|
|
"name": "arguments",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "arguments"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "compound_type"
|
|
},
|
|
{
|
|
"type": "FIELD",
|
|
"name": "arguments",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "arguments"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"_constructor_applications": {
|
|
"type": "PREC_LEFT",
|
|
"value": 0,
|
|
"content": {
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_constructor_application"
|
|
},
|
|
{
|
|
"type": "REPEAT",
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": ","
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_constructor_application"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_constructor_application"
|
|
},
|
|
{
|
|
"type": "REPEAT",
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "with"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_constructor_application"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"modifiers": {
|
|
"type": "PREC_LEFT",
|
|
"value": 0,
|
|
"content": {
|
|
"type": "REPEAT1",
|
|
"content": {
|
|
"type": "PREC_LEFT",
|
|
"value": 0,
|
|
"content": {
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "abstract"
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "final"
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "sealed"
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "implicit"
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "lazy"
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "override"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "access_modifier"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "inline_modifier"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "infix_modifier"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "open_modifier"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "transparent_modifier"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"access_modifier": {
|
|
"type": "PREC_LEFT",
|
|
"value": 0,
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "private"
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "protected"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "access_qualifier"
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"access_qualifier": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "["
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_identifier"
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "]"
|
|
}
|
|
]
|
|
},
|
|
"inline_modifier": {
|
|
"type": "PREC",
|
|
"value": "mod",
|
|
"content": {
|
|
"type": "STRING",
|
|
"value": "inline"
|
|
}
|
|
},
|
|
"infix_modifier": {
|
|
"type": "PREC",
|
|
"value": "mod",
|
|
"content": {
|
|
"type": "STRING",
|
|
"value": "infix"
|
|
}
|
|
},
|
|
"open_modifier": {
|
|
"type": "PREC",
|
|
"value": "mod",
|
|
"content": {
|
|
"type": "STRING",
|
|
"value": "open"
|
|
}
|
|
},
|
|
"transparent_modifier": {
|
|
"type": "PREC",
|
|
"value": "mod",
|
|
"content": {
|
|
"type": "STRING",
|
|
"value": "transparent"
|
|
}
|
|
},
|
|
"extends_clause": {
|
|
"type": "PREC_LEFT",
|
|
"value": 0,
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "extends"
|
|
},
|
|
{
|
|
"type": "FIELD",
|
|
"name": "type",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "_constructor_applications"
|
|
}
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "arguments"
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"derives_clause": {
|
|
"type": "PREC_LEFT",
|
|
"value": 0,
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "derives"
|
|
},
|
|
{
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "FIELD",
|
|
"name": "type",
|
|
"content": {
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_type_identifier"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "stable_type_identifier"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "REPEAT",
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": ","
|
|
},
|
|
{
|
|
"type": "FIELD",
|
|
"name": "type",
|
|
"content": {
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_type_identifier"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "stable_type_identifier"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"class_parameters": {
|
|
"type": "PREC",
|
|
"value": 1,
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_automatic_semicolon"
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "("
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "implicit"
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "using"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "class_parameter"
|
|
},
|
|
{
|
|
"type": "REPEAT",
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": ","
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "class_parameter"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": ","
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": ")"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"parameters": {
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "("
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "implicit"
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "parameter"
|
|
},
|
|
{
|
|
"type": "REPEAT",
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": ","
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "parameter"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": ","
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": ")"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_using_parameters_clause"
|
|
}
|
|
]
|
|
},
|
|
"_using_parameters_clause": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "("
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "using"
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "parameter"
|
|
},
|
|
{
|
|
"type": "REPEAT",
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": ","
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "parameter"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": ","
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_param_type"
|
|
},
|
|
{
|
|
"type": "REPEAT",
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": ","
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_param_type"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": ","
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": ")"
|
|
}
|
|
]
|
|
},
|
|
"class_parameter": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "REPEAT",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "annotation"
|
|
}
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "modifiers"
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "val"
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "var"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "FIELD",
|
|
"name": "name",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "_identifier"
|
|
}
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": ":"
|
|
},
|
|
{
|
|
"type": "FIELD",
|
|
"name": "type",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "_param_type"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "="
|
|
},
|
|
{
|
|
"type": "FIELD",
|
|
"name": "default_value",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "expression"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"parameter": {
|
|
"type": "PREC_LEFT",
|
|
"value": 1,
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "REPEAT",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "annotation"
|
|
}
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "inline_modifier"
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "FIELD",
|
|
"name": "name",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "_identifier"
|
|
}
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": ":"
|
|
},
|
|
{
|
|
"type": "FIELD",
|
|
"name": "type",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "_param_type"
|
|
}
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "="
|
|
},
|
|
{
|
|
"type": "FIELD",
|
|
"name": "default_value",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "expression"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"_block": {
|
|
"type": "PREC_LEFT",
|
|
"value": 0,
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "expression"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_definition"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_end_marker"
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": ";"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "REPEAT",
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_semicolon"
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "expression"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_definition"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_end_marker"
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": ";"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_semicolon"
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"_indentable_expression": {
|
|
"type": "PREC_RIGHT",
|
|
"value": 0,
|
|
"content": {
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "indented_block"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "indented_cases"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "expression"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"block": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "{"
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_block"
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "}"
|
|
}
|
|
]
|
|
},
|
|
"indented_block": {
|
|
"type": "PREC_LEFT",
|
|
"value": 1,
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_indent"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_block"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_outdent"
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_end_marker"
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"indented_cases": {
|
|
"type": "PREC_LEFT",
|
|
"value": 0,
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_indent"
|
|
},
|
|
{
|
|
"type": "REPEAT1",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "case_clause"
|
|
}
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_outdent"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"_indented_type_cases": {
|
|
"type": "PREC_LEFT",
|
|
"value": 0,
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_indent"
|
|
},
|
|
{
|
|
"type": "REPEAT1",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "type_case_clause"
|
|
}
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_outdent"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"_type": {
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "function_type"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "compound_type"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "infix_type"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "match_type"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_annotated_type"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "literal_type"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_structural_type"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "type_lambda"
|
|
}
|
|
]
|
|
},
|
|
"_annotated_type": {
|
|
"type": "PREC_RIGHT",
|
|
"value": 0,
|
|
"content": {
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "annotated_type"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_simple_type"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"annotated_type": {
|
|
"type": "PREC_RIGHT",
|
|
"value": 0,
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_simple_type"
|
|
},
|
|
{
|
|
"type": "REPEAT1",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "annotation"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"_simple_type": {
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "generic_type"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "projected_type"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "tuple_type"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "singleton_type"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "stable_type_identifier"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_type_identifier"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "wildcard"
|
|
}
|
|
]
|
|
},
|
|
"compound_type": {
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "PREC_LEFT",
|
|
"value": 7,
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "FIELD",
|
|
"name": "base",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "_annotated_type"
|
|
}
|
|
},
|
|
{
|
|
"type": "REPEAT1",
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "with"
|
|
},
|
|
{
|
|
"type": "FIELD",
|
|
"name": "extra",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "_annotated_type"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "PREC_LEFT",
|
|
"value": 0,
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "FIELD",
|
|
"name": "base",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "_annotated_type"
|
|
}
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_refinement"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "PREC_LEFT",
|
|
"value": -1,
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "PREC_LEFT",
|
|
"value": 7,
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "FIELD",
|
|
"name": "base",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "_annotated_type"
|
|
}
|
|
},
|
|
{
|
|
"type": "REPEAT1",
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "with"
|
|
},
|
|
{
|
|
"type": "FIELD",
|
|
"name": "extra",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "_annotated_type"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_refinement"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"_structural_type": {
|
|
"type": "PREC",
|
|
"value": "structural_type",
|
|
"content": {
|
|
"type": "ALIAS",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "template_body"
|
|
},
|
|
"named": true,
|
|
"value": "structural_type"
|
|
}
|
|
},
|
|
"_refinement": {
|
|
"type": "ALIAS",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "template_body"
|
|
},
|
|
"named": true,
|
|
"value": "refinement"
|
|
},
|
|
"_infix_type_choice": {
|
|
"type": "PREC_LEFT",
|
|
"value": 6,
|
|
"content": {
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "compound_type"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "infix_type"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_annotated_type"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"infix_type": {
|
|
"type": "PREC_LEFT",
|
|
"value": 6,
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "FIELD",
|
|
"name": "left",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "_infix_type_choice"
|
|
}
|
|
},
|
|
{
|
|
"type": "FIELD",
|
|
"name": "operator",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "_identifier"
|
|
}
|
|
},
|
|
{
|
|
"type": "FIELD",
|
|
"name": "right",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "_infix_type_choice"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"tuple_type": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "("
|
|
},
|
|
{
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_type"
|
|
},
|
|
{
|
|
"type": "REPEAT",
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": ","
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_type"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": ","
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": ")"
|
|
}
|
|
]
|
|
},
|
|
"singleton_type": {
|
|
"type": "PREC_LEFT",
|
|
"value": 2,
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_identifier"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "stable_identifier"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "."
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "type"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"stable_type_identifier": {
|
|
"type": "PREC_LEFT",
|
|
"value": 2,
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_identifier"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "stable_identifier"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "."
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_type_identifier"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"stable_identifier": {
|
|
"type": "PREC_LEFT",
|
|
"value": 4,
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_identifier"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "stable_identifier"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "."
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_identifier"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"generic_type": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "FIELD",
|
|
"name": "type",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "_simple_type"
|
|
}
|
|
},
|
|
{
|
|
"type": "FIELD",
|
|
"name": "type_arguments",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "type_arguments"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"projected_type": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "FIELD",
|
|
"name": "type",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "_simple_type"
|
|
}
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "#"
|
|
},
|
|
{
|
|
"type": "FIELD",
|
|
"name": "selector",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "_type_identifier"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"match_type": {
|
|
"type": "PREC_LEFT",
|
|
"value": 0,
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_infix_type_choice"
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "match"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_indented_type_cases"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"type_case_clause": {
|
|
"type": "PREC_LEFT",
|
|
"value": 1,
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "case"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_infix_type_choice"
|
|
},
|
|
{
|
|
"type": "FIELD",
|
|
"name": "body",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "_arrow_then_type"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"function_type": {
|
|
"type": "PREC_LEFT",
|
|
"value": 0,
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "FIELD",
|
|
"name": "parameter_types",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "parameter_types"
|
|
}
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_arrow_then_type"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"_arrow_then_type": {
|
|
"type": "PREC_RIGHT",
|
|
"value": 0,
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "=>"
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "?=>"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "FIELD",
|
|
"name": "return_type",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "_type"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"parameter_types": {
|
|
"type": "PREC",
|
|
"value": -1,
|
|
"content": {
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_annotated_type"
|
|
},
|
|
{
|
|
"type": "PREC_DYNAMIC",
|
|
"value": 1,
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "("
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_param_type"
|
|
},
|
|
{
|
|
"type": "REPEAT",
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": ","
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_param_type"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": ","
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": ")"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "compound_type"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "infix_type"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"_param_type": {
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_type"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "lazy_parameter_type"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "repeated_parameter_type"
|
|
}
|
|
]
|
|
},
|
|
"lazy_parameter_type": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "=>"
|
|
},
|
|
{
|
|
"type": "FIELD",
|
|
"name": "type",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "_type"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"repeated_parameter_type": {
|
|
"type": "PREC_LEFT",
|
|
"value": 5,
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "FIELD",
|
|
"name": "type",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "_type"
|
|
}
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "*"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"_type_identifier": {
|
|
"type": "ALIAS",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "_identifier"
|
|
},
|
|
"named": true,
|
|
"value": "type_identifier"
|
|
},
|
|
"type_lambda": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "["
|
|
},
|
|
{
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_type_parameter"
|
|
},
|
|
{
|
|
"type": "REPEAT",
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": ","
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_type_parameter"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": ","
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "]"
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "=>>"
|
|
},
|
|
{
|
|
"type": "FIELD",
|
|
"name": "return_type",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "_type"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"_pattern": {
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_identifier"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "stable_identifier"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "interpolated_string_expression"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "capture_pattern"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "tuple_pattern"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "case_class_pattern"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "infix_pattern"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "alternative_pattern"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "typed_pattern"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "given_pattern"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "quote_expression"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "literal"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "wildcard"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "repeat_pattern"
|
|
}
|
|
]
|
|
},
|
|
"case_class_pattern": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "FIELD",
|
|
"name": "type",
|
|
"content": {
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_type_identifier"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "stable_type_identifier"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "("
|
|
},
|
|
{
|
|
"type": "FIELD",
|
|
"name": "pattern",
|
|
"content": {
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_pattern"
|
|
},
|
|
{
|
|
"type": "REPEAT",
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": ","
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_pattern"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": ","
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": ")"
|
|
}
|
|
]
|
|
},
|
|
"infix_pattern": {
|
|
"type": "PREC_LEFT",
|
|
"value": 6,
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "FIELD",
|
|
"name": "left",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "_pattern"
|
|
}
|
|
},
|
|
{
|
|
"type": "FIELD",
|
|
"name": "operator",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "_identifier"
|
|
}
|
|
},
|
|
{
|
|
"type": "FIELD",
|
|
"name": "right",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "_pattern"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"capture_pattern": {
|
|
"type": "PREC_RIGHT",
|
|
"value": 8,
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "FIELD",
|
|
"name": "name",
|
|
"content": {
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_identifier"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "wildcard"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "@"
|
|
},
|
|
{
|
|
"type": "FIELD",
|
|
"name": "pattern",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "_pattern"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"repeat_pattern": {
|
|
"type": "PREC_RIGHT",
|
|
"value": 0,
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "FIELD",
|
|
"name": "pattern",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "_pattern"
|
|
}
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "*"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"typed_pattern": {
|
|
"type": "PREC_RIGHT",
|
|
"value": 0,
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "FIELD",
|
|
"name": "pattern",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "_pattern"
|
|
}
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": ":"
|
|
},
|
|
{
|
|
"type": "FIELD",
|
|
"name": "type",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "_type"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"given_pattern": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "given"
|
|
},
|
|
{
|
|
"type": "FIELD",
|
|
"name": "type",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "_type"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"alternative_pattern": {
|
|
"type": "PREC_LEFT",
|
|
"value": -1,
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_pattern"
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "|"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_pattern"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"tuple_pattern": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "("
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_pattern"
|
|
},
|
|
{
|
|
"type": "REPEAT",
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": ","
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_pattern"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": ")"
|
|
}
|
|
]
|
|
},
|
|
"expression": {
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "if_expression"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "match_expression"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "try_expression"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "assignment_expression"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "lambda_expression"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "postfix_expression"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "ascription_expression"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "infix_expression"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "prefix_expression"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "return_expression"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "throw_expression"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "while_expression"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "do_while_expression"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "for_expression"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "macro_body"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_simple_expression"
|
|
}
|
|
]
|
|
},
|
|
"_simple_expression": {
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "identifier"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "operator_identifier"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "literal"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "interpolated_string_expression"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "unit"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "tuple_expression"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "wildcard"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "block"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "splice_expression"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "case_block"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "quote_expression"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "instance_expression"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "parenthesized_expression"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "field_expression"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "generic_function"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "call_expression"
|
|
}
|
|
]
|
|
},
|
|
"lambda_expression": {
|
|
"type": "PREC_RIGHT",
|
|
"value": 0,
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "FIELD",
|
|
"name": "parameters",
|
|
"content": {
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "bindings"
|
|
},
|
|
{
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "implicit"
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_identifier"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "wildcard"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "=>"
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "?=>"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_indentable_expression"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"if_expression": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "inline_modifier"
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "if"
|
|
},
|
|
{
|
|
"type": "FIELD",
|
|
"name": "condition",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "_if_condition"
|
|
}
|
|
},
|
|
{
|
|
"type": "FIELD",
|
|
"name": "consequence",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "_indentable_expression"
|
|
}
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": ";"
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "else"
|
|
},
|
|
{
|
|
"type": "FIELD",
|
|
"name": "alternative",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "_indentable_expression"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"_if_condition": {
|
|
"type": "PREC_DYNAMIC",
|
|
"value": 4,
|
|
"content": {
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "parenthesized_expression"
|
|
},
|
|
{
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_indentable_expression"
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "then"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"match_expression": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "inline_modifier"
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "FIELD",
|
|
"name": "value",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "expression"
|
|
}
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "match"
|
|
},
|
|
{
|
|
"type": "FIELD",
|
|
"name": "body",
|
|
"content": {
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "case_block"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "indented_cases"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"try_expression": {
|
|
"type": "PREC_RIGHT",
|
|
"value": 1,
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "try"
|
|
},
|
|
{
|
|
"type": "FIELD",
|
|
"name": "body",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "_indentable_expression"
|
|
}
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "catch_clause"
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "finally_clause"
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"catch_clause": {
|
|
"type": "PREC_RIGHT",
|
|
"value": 0,
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "catch"
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_indentable_expression"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_expr_case_clause"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"_expr_case_clause": {
|
|
"type": "PREC_LEFT",
|
|
"value": 0,
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "case"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_case_pattern"
|
|
},
|
|
{
|
|
"type": "FIELD",
|
|
"name": "body",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "expression"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"finally_clause": {
|
|
"type": "PREC_RIGHT",
|
|
"value": 0,
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "finally"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_indentable_expression"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"binding": {
|
|
"type": "PREC_DYNAMIC",
|
|
"value": 10,
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "FIELD",
|
|
"name": "name",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "_identifier"
|
|
}
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "wildcard"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": ":"
|
|
},
|
|
{
|
|
"type": "FIELD",
|
|
"name": "type",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "_param_type"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"bindings": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "("
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "binding"
|
|
},
|
|
{
|
|
"type": "REPEAT",
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": ","
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "binding"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": ","
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": ")"
|
|
}
|
|
]
|
|
},
|
|
"case_block": {
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "PREC",
|
|
"value": -1,
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "{"
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "}"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "{"
|
|
},
|
|
{
|
|
"type": "REPEAT1",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "case_clause"
|
|
}
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "}"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"case_clause": {
|
|
"type": "PREC_LEFT",
|
|
"value": 0,
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "case"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_case_pattern"
|
|
},
|
|
{
|
|
"type": "FIELD",
|
|
"name": "body",
|
|
"content": {
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_block"
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"_case_pattern": {
|
|
"type": "PREC_RIGHT",
|
|
"value": 10,
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "FIELD",
|
|
"name": "pattern",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "_pattern"
|
|
}
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "guard"
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "=>"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"guard": {
|
|
"type": "PREC_LEFT",
|
|
"value": 1,
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "if"
|
|
},
|
|
{
|
|
"type": "FIELD",
|
|
"name": "condition",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "_postfix_expression_choice"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"assignment_expression": {
|
|
"type": "PREC_RIGHT",
|
|
"value": 3,
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "FIELD",
|
|
"name": "left",
|
|
"content": {
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "prefix_expression"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_simple_expression"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "="
|
|
},
|
|
{
|
|
"type": "FIELD",
|
|
"name": "right",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "expression"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"generic_function": {
|
|
"type": "PREC",
|
|
"value": 8,
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "FIELD",
|
|
"name": "function",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "expression"
|
|
}
|
|
},
|
|
{
|
|
"type": "FIELD",
|
|
"name": "type_arguments",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "type_arguments"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"call_expression": {
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "PREC_LEFT",
|
|
"value": 8,
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "FIELD",
|
|
"name": "function",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "_simple_expression"
|
|
}
|
|
},
|
|
{
|
|
"type": "FIELD",
|
|
"name": "arguments",
|
|
"content": {
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "arguments"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "case_block"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "block"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "PREC_RIGHT",
|
|
"value": 5,
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "FIELD",
|
|
"name": "function",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "_postfix_expression_choice"
|
|
}
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": ":"
|
|
},
|
|
{
|
|
"type": "FIELD",
|
|
"name": "arguments",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "colon_argument"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"colon_argument": {
|
|
"type": "PREC_LEFT",
|
|
"value": 5,
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "FIELD",
|
|
"name": "lambda_start",
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "bindings"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_identifier"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "wildcard"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "=>"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "indented_block"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "indented_cases"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"field_expression": {
|
|
"type": "PREC_LEFT",
|
|
"value": 8,
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "FIELD",
|
|
"name": "value",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "_simple_expression"
|
|
}
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "."
|
|
},
|
|
{
|
|
"type": "FIELD",
|
|
"name": "field",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "_identifier"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"instance_expression": {
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "PREC_DYNAMIC",
|
|
"value": 0,
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "new"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_constructor_application"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "template_body"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "PREC",
|
|
"value": "new",
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "new"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "template_body"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "new"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_constructor_application"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"ascription_expression": {
|
|
"type": "PREC_DYNAMIC",
|
|
"value": 4,
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_postfix_expression_choice"
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": ":"
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_param_type"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "annotation"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"infix_expression": {
|
|
"type": "PREC_LEFT",
|
|
"value": 6,
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "FIELD",
|
|
"name": "left",
|
|
"content": {
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "infix_expression"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "prefix_expression"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_simple_expression"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "FIELD",
|
|
"name": "operator",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "_identifier"
|
|
}
|
|
},
|
|
{
|
|
"type": "FIELD",
|
|
"name": "right",
|
|
"content": {
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "prefix_expression"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_simple_expression"
|
|
},
|
|
{
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": ":"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "colon_argument"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"postfix_expression": {
|
|
"type": "PREC_LEFT",
|
|
"value": 5,
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "infix_expression"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "prefix_expression"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_simple_expression"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_identifier"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"_postfix_expression_choice": {
|
|
"type": "PREC_LEFT",
|
|
"value": 5,
|
|
"content": {
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "postfix_expression"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "infix_expression"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "prefix_expression"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_simple_expression"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"macro_body": {
|
|
"type": "PREC_LEFT",
|
|
"value": 10,
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "macro"
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "infix_expression"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "prefix_expression"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_simple_expression"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"prefix_expression": {
|
|
"type": "PREC",
|
|
"value": 7,
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "+"
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "-"
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "!"
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "~"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_simple_expression"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"tuple_expression": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "("
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "expression"
|
|
},
|
|
{
|
|
"type": "REPEAT1",
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": ","
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "expression"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": ","
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": ")"
|
|
}
|
|
]
|
|
},
|
|
"parenthesized_expression": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "("
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "expression"
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": ")"
|
|
}
|
|
]
|
|
},
|
|
"type_arguments": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "["
|
|
},
|
|
{
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_type"
|
|
},
|
|
{
|
|
"type": "REPEAT",
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": ","
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_type"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": ","
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "]"
|
|
}
|
|
]
|
|
},
|
|
"arguments": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "("
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_exprs_in_parens"
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "using"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_exprs_in_parens"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": ")"
|
|
}
|
|
]
|
|
},
|
|
"_exprs_in_parens": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "expression"
|
|
},
|
|
{
|
|
"type": "REPEAT",
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": ","
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "expression"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": ","
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"splice_expression": {
|
|
"type": "PREC_LEFT",
|
|
"value": 10,
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "$"
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "{"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_block"
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "}"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "["
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_type"
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "]"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "identifier"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"quote_expression": {
|
|
"type": "PREC_LEFT",
|
|
"value": 10,
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "'"
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "{"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_block"
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "}"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "["
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_type"
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "]"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "identifier"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"symbol_literal": {
|
|
"type": "STRING",
|
|
"value": "__no_longer_used_symbol_literal_"
|
|
},
|
|
"identifier": {
|
|
"type": "PREC_LEFT",
|
|
"value": 0,
|
|
"content": {
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_alpha_identifier"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_backquoted_id"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_soft_identifier"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"_soft_identifier": {
|
|
"type": "PREC",
|
|
"value": "soft_id",
|
|
"content": {
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "infix"
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "inline"
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "opaque"
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "open"
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "transparent"
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "end"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"_alpha_identifier": {
|
|
"type": "PATTERN",
|
|
"value": "[\\p{Lu}\\p{Lt}\\p{Nl}\\p{Lo}\\p{Lm}\\$\\p{Ll}_\\u00AA\\u00BB\\u02B0-\\u02B8\\u02C0-\\u02C1\\u02E0-\\u02E4\\u037A\\u1D78\\u1D9B-\\u1DBF\\u2071\\u207F\\u2090-\\u209C\\u2C7C-\\u2C7D\\uA69C-\\uA69D\\uA770\\uA7F8-\\uA7F9\\uAB5C-\\uAB5F\\$][\\p{Lu}\\p{Lt}\\p{Nl}\\p{Lo}\\p{Lm}\\$\\p{Ll}_\\u00AA\\u00BB\\u02B0-\\u02B8\\u02C0-\\u02C1\\u02E0-\\u02E4\\u037A\\u1D78\\u1D9B-\\u1DBF\\u2071\\u207F\\u2090-\\u209C\\u2C7C-\\u2C7D\\uA69C-\\uA69D\\uA770\\uA7F8-\\uA7F9\\uAB5C-\\uAB5F0-9\\$_\\p{Ll}]*(_[\\-!#%&*+\\/\\\\:<=>?@\\u005e\\u007c~\\p{Sm}\\p{So}]+)?"
|
|
},
|
|
"_interpolation_identifier": {
|
|
"type": "PATTERN",
|
|
"value": "[\\p{Lu}\\p{Lt}\\p{Nl}\\p{Lo}\\p{Lm}\\p{Ll}_\\u00AA\\u00BB\\u02B0-\\u02B8\\u02C0-\\u02C1\\u02E0-\\u02E4\\u037A\\u1D78\\u1D9B-\\u1DBF\\u2071\\u207F\\u2090-\\u209C\\u2C7C-\\u2C7D\\uA69C-\\uA69D\\uA770\\uA7F8-\\uA7F9\\uAB5C-\\uAB5F][\\p{Lu}\\p{Lt}\\p{Nl}\\p{Lo}\\p{Lm}\\p{Ll}_\\u00AA\\u00BB\\u02B0-\\u02B8\\u02C0-\\u02C1\\u02E0-\\u02E4\\u037A\\u1D78\\u1D9B-\\u1DBF\\u2071\\u207F\\u2090-\\u209C\\u2C7C-\\u2C7D\\uA69C-\\uA69D\\uA770\\uA7F8-\\uA7F9\\uAB5C-\\uAB5F0-9_\\p{Ll}]*"
|
|
},
|
|
"_backquoted_id": {
|
|
"type": "PATTERN",
|
|
"value": "`[^\\n`]+`"
|
|
},
|
|
"_identifier": {
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "identifier"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "operator_identifier"
|
|
}
|
|
]
|
|
},
|
|
"identifiers": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "identifier"
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": ","
|
|
},
|
|
{
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "identifier"
|
|
},
|
|
{
|
|
"type": "REPEAT",
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": ","
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "identifier"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"wildcard": {
|
|
"type": "STRING",
|
|
"value": "_"
|
|
},
|
|
"operator_identifier": {
|
|
"type": "TOKEN",
|
|
"content": {
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "PATTERN",
|
|
"value": "[\\-!#%&*+\\/\\\\<>?\\u005e\\u007c~\\u00ac\\u00b1\\u00d7\\u00f7\\u2190-\\u2194\\p{So}]"
|
|
},
|
|
{
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "PATTERN",
|
|
"value": "[\\-!#%&*+\\\\:<=>?@\\u005e\\u007c~\\p{Sm}\\p{So}]"
|
|
},
|
|
{
|
|
"type": "REPEAT1",
|
|
"content": {
|
|
"type": "PATTERN",
|
|
"value": "[\\-!#%&*+\\/\\\\:<=>?@\\u005e\\u007c~\\p{Sm}\\p{So}]"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "PATTERN",
|
|
"value": "[\\-!#%&*+\\/\\\\:<=>?@\\u005e\\u007c~\\p{Sm}\\p{So}]"
|
|
},
|
|
{
|
|
"type": "PATTERN",
|
|
"value": "[\\-!#%&+\\\\:<=>?@\\u005e\\u007c~\\p{Sm}\\p{So}]"
|
|
},
|
|
{
|
|
"type": "REPEAT",
|
|
"content": {
|
|
"type": "PATTERN",
|
|
"value": "[\\-!#%&*+\\/\\\\:<=>?@\\u005e\\u007c~\\p{Sm}\\p{So}]"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"_non_null_literal": {
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "integer_literal"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "floating_point_literal"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "boolean_literal"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "character_literal"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "string"
|
|
}
|
|
]
|
|
},
|
|
"literal_type": {
|
|
"type": "SYMBOL",
|
|
"name": "_non_null_literal"
|
|
},
|
|
"literal": {
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_non_null_literal"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "null_literal"
|
|
}
|
|
]
|
|
},
|
|
"integer_literal": {
|
|
"type": "TOKEN",
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "PATTERN",
|
|
"value": "[-]"
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "PATTERN",
|
|
"value": "[\\d](_?\\d)*"
|
|
},
|
|
{
|
|
"type": "PATTERN",
|
|
"value": "0[xX][\\da-fA-F](_?[\\da-fA-F])*"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "PATTERN",
|
|
"value": "[lL]"
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"floating_point_literal": {
|
|
"type": "TOKEN",
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "PATTERN",
|
|
"value": "[-]"
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "PATTERN",
|
|
"value": "[\\d]+\\.[\\d]+"
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "PATTERN",
|
|
"value": "[eE][+-]?[\\d]+"
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "PATTERN",
|
|
"value": "[dfDF]"
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "PATTERN",
|
|
"value": "\\.[\\d]+"
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "PATTERN",
|
|
"value": "[eE][+-]?[\\d]+"
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "PATTERN",
|
|
"value": "[dfDF]"
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "PATTERN",
|
|
"value": "[\\d]+"
|
|
},
|
|
{
|
|
"type": "PATTERN",
|
|
"value": "[eE][+-]?[\\d]+"
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "PATTERN",
|
|
"value": "[dfDF]"
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "PATTERN",
|
|
"value": "[\\d]+"
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "PATTERN",
|
|
"value": "[eE][+-]?[\\d]+"
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "PATTERN",
|
|
"value": "[dfDF]"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"boolean_literal": {
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "true"
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "false"
|
|
}
|
|
]
|
|
},
|
|
"character_literal": {
|
|
"type": "TOKEN",
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "'"
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "\\"
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "PATTERN",
|
|
"value": "[^xu]"
|
|
},
|
|
{
|
|
"type": "PATTERN",
|
|
"value": "uu?[0-9a-fA-F]{4}"
|
|
},
|
|
{
|
|
"type": "PATTERN",
|
|
"value": "x[0-9a-fA-F]{2}"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "PATTERN",
|
|
"value": "[^\\\\'\\n]"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "'"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"interpolated_string_expression": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "FIELD",
|
|
"name": "interpolator",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "identifier"
|
|
}
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "interpolated_string"
|
|
}
|
|
]
|
|
},
|
|
"_interpolated_string_start": {
|
|
"type": "STRING",
|
|
"value": "\""
|
|
},
|
|
"_interpolated_multiline_string_start": {
|
|
"type": "STRING",
|
|
"value": "\"\"\""
|
|
},
|
|
"_dollar_escape": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "$"
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "$"
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "\""
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"_aliased_interpolation_identifier": {
|
|
"type": "ALIAS",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "_interpolation_identifier"
|
|
},
|
|
"named": true,
|
|
"value": "identifier"
|
|
},
|
|
"interpolation": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "$"
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_aliased_interpolation_identifier"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "block"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"interpolated_string": {
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_interpolated_string_start"
|
|
},
|
|
{
|
|
"type": "REPEAT",
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_interpolated_string_middle"
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_dollar_escape"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "interpolation"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_interpolated_string_end"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_interpolated_multiline_string_start"
|
|
},
|
|
{
|
|
"type": "REPEAT",
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_interpolated_multiline_string_middle"
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_dollar_escape"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "interpolation"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_interpolated_multiline_string_end"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"string": {
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_simple_string"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_simple_multiline_string"
|
|
}
|
|
]
|
|
},
|
|
"_semicolon": {
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": ";"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_automatic_semicolon"
|
|
}
|
|
]
|
|
},
|
|
"null_literal": {
|
|
"type": "STRING",
|
|
"value": "null"
|
|
},
|
|
"unit": {
|
|
"type": "PREC",
|
|
"value": 4,
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "("
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": ")"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"return_expression": {
|
|
"type": "PREC_LEFT",
|
|
"value": 0,
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "return"
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "expression"
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"throw_expression": {
|
|
"type": "PREC_LEFT",
|
|
"value": 0,
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "throw"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "expression"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"while_expression": {
|
|
"type": "PREC",
|
|
"value": 2,
|
|
"content": {
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "PREC_RIGHT",
|
|
"value": 0,
|
|
"content": {
|
|
"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": "expression"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "PREC_RIGHT",
|
|
"value": 0,
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "while"
|
|
},
|
|
{
|
|
"type": "FIELD",
|
|
"name": "condition",
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_indentable_expression"
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "do"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "FIELD",
|
|
"name": "body",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "_indentable_expression"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"do_while_expression": {
|
|
"type": "PREC_RIGHT",
|
|
"value": 0,
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "do"
|
|
},
|
|
{
|
|
"type": "FIELD",
|
|
"name": "body",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "expression"
|
|
}
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "while"
|
|
},
|
|
{
|
|
"type": "FIELD",
|
|
"name": "condition",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "parenthesized_expression"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"for_expression": {
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "PREC_RIGHT",
|
|
"value": 1,
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "for"
|
|
},
|
|
{
|
|
"type": "FIELD",
|
|
"name": "enumerators",
|
|
"content": {
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "("
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "enumerators"
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": ")"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "{"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "enumerators"
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "}"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "FIELD",
|
|
"name": "body",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "expression"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "yield"
|
|
},
|
|
{
|
|
"type": "FIELD",
|
|
"name": "body",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "_indentable_expression"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "PREC_RIGHT",
|
|
"value": 1,
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "for"
|
|
},
|
|
{
|
|
"type": "FIELD",
|
|
"name": "enumerators",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "enumerators"
|
|
}
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "do"
|
|
},
|
|
{
|
|
"type": "FIELD",
|
|
"name": "body",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "_indentable_expression"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "yield"
|
|
},
|
|
{
|
|
"type": "FIELD",
|
|
"name": "body",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "_indentable_expression"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"enumerators": {
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "enumerator"
|
|
},
|
|
{
|
|
"type": "REPEAT",
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_semicolon"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "enumerator"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_automatic_semicolon"
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_indent"
|
|
},
|
|
{
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "enumerator"
|
|
},
|
|
{
|
|
"type": "REPEAT",
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_semicolon"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "enumerator"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_automatic_semicolon"
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_outdent"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"enumerator": {
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "case"
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_pattern"
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "<-"
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "="
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "expression"
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "guard"
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "REPEAT1",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "guard"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"_shebang": {
|
|
"type": "ALIAS",
|
|
"content": {
|
|
"type": "TOKEN",
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "#!"
|
|
},
|
|
{
|
|
"type": "PATTERN",
|
|
"value": ".*"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"named": true,
|
|
"value": "comment"
|
|
},
|
|
"comment": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "TOKEN",
|
|
"content": {
|
|
"type": "STRING",
|
|
"value": "//"
|
|
}
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "using_directive"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_comment_text"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"_comment_text": {
|
|
"type": "TOKEN",
|
|
"content": {
|
|
"type": "PREC",
|
|
"value": 1,
|
|
"content": {
|
|
"type": "PATTERN",
|
|
"value": ".*"
|
|
}
|
|
}
|
|
},
|
|
"using_directive": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "IMMEDIATE_TOKEN",
|
|
"content": {
|
|
"type": "PREC",
|
|
"value": 2,
|
|
"content": {
|
|
"type": "STRING",
|
|
"value": ">"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "TOKEN",
|
|
"content": {
|
|
"type": "STRING",
|
|
"value": "using"
|
|
}
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "using_directive_key"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "using_directive_value"
|
|
}
|
|
]
|
|
},
|
|
"using_directive_key": {
|
|
"type": "TOKEN",
|
|
"content": {
|
|
"type": "PATTERN",
|
|
"value": "[^\\s]+"
|
|
}
|
|
},
|
|
"using_directive_value": {
|
|
"type": "TOKEN",
|
|
"content": {
|
|
"type": "PATTERN",
|
|
"value": ".*"
|
|
}
|
|
},
|
|
"block_comment": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "TOKEN",
|
|
"content": {
|
|
"type": "STRING",
|
|
"value": "/*"
|
|
}
|
|
},
|
|
{
|
|
"type": "REPEAT",
|
|
"content": {
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "TOKEN",
|
|
"content": {
|
|
"type": "PATTERN",
|
|
"value": "."
|
|
}
|
|
},
|
|
{
|
|
"type": "TOKEN",
|
|
"content": {
|
|
"type": "STRING",
|
|
"value": "//"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "TOKEN",
|
|
"content": {
|
|
"type": "STRING",
|
|
"value": "*/"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"extras": [
|
|
{
|
|
"type": "PATTERN",
|
|
"value": "\\s"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "comment"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "block_comment"
|
|
}
|
|
],
|
|
"conflicts": [
|
|
[
|
|
"tuple_type",
|
|
"parameter_types"
|
|
],
|
|
[
|
|
"binding",
|
|
"_simple_expression"
|
|
],
|
|
[
|
|
"binding",
|
|
"_type_identifier"
|
|
],
|
|
[
|
|
"while_expression",
|
|
"_simple_expression"
|
|
],
|
|
[
|
|
"if_expression"
|
|
],
|
|
[
|
|
"match_expression"
|
|
],
|
|
[
|
|
"_function_constructor",
|
|
"_type_identifier"
|
|
],
|
|
[
|
|
"_given_constructor",
|
|
"_type_identifier"
|
|
],
|
|
[
|
|
"instance_expression"
|
|
],
|
|
[
|
|
"_simple_expression",
|
|
"lambda_expression"
|
|
],
|
|
[
|
|
"self_type",
|
|
"_simple_expression"
|
|
],
|
|
[
|
|
"self_type",
|
|
"lambda_expression"
|
|
],
|
|
[
|
|
"_class_definition"
|
|
],
|
|
[
|
|
"_class_constructor"
|
|
],
|
|
[
|
|
"_full_enum_def"
|
|
],
|
|
[
|
|
"identifiers",
|
|
"val_declaration"
|
|
],
|
|
[
|
|
"class_parameters"
|
|
],
|
|
[
|
|
"_type",
|
|
"compound_type"
|
|
],
|
|
[
|
|
"lambda_expression",
|
|
"modifiers"
|
|
],
|
|
[
|
|
"_if_condition",
|
|
"_simple_expression"
|
|
],
|
|
[
|
|
"binding",
|
|
"_simple_type"
|
|
]
|
|
],
|
|
"precedences": [
|
|
[
|
|
{
|
|
"type": "STRING",
|
|
"value": "mod"
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "soft_id"
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"type": "STRING",
|
|
"value": "end"
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "soft_id"
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"type": "STRING",
|
|
"value": "new"
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "structural_type"
|
|
}
|
|
]
|
|
],
|
|
"externals": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_automatic_semicolon"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_indent"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_interpolated_string_middle"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_interpolated_string_end"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_interpolated_multiline_string_middle"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_interpolated_multiline_string_end"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_outdent"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_simple_multiline_string"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_simple_string"
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "else"
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "catch"
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "finally"
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "extends"
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "derives"
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "with"
|
|
}
|
|
],
|
|
"inline": [
|
|
"_pattern",
|
|
"_semicolon",
|
|
"_definition",
|
|
"_param_type",
|
|
"_identifier",
|
|
"literal"
|
|
],
|
|
"supertypes": [
|
|
"expression",
|
|
"_definition",
|
|
"_pattern"
|
|
]
|
|
}
|