1229 lines
24 KiB
JSON
1229 lines
24 KiB
JSON
{
|
|
"name": "hcl",
|
|
"rules": {
|
|
"config_file": {
|
|
"type": "SYMBOL",
|
|
"name": "body"
|
|
},
|
|
"body": {
|
|
"type": "REPEAT1",
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "attribute"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "block"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"attribute": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "FIELD",
|
|
"name": "name",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "identifier"
|
|
}
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "="
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "expression"
|
|
}
|
|
]
|
|
},
|
|
"block": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "FIELD",
|
|
"name": "name",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "identifier"
|
|
}
|
|
},
|
|
{
|
|
"type": "REPEAT",
|
|
"content": {
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "string_lit"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "identifier"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "{"
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "body"
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "}"
|
|
}
|
|
]
|
|
},
|
|
"identifier": {
|
|
"type": "TOKEN",
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "PATTERN",
|
|
"value": "\\p{L}"
|
|
},
|
|
{
|
|
"type": "REPEAT",
|
|
"content": {
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "PATTERN",
|
|
"value": "\\p{L}"
|
|
},
|
|
{
|
|
"type": "PATTERN",
|
|
"value": "[0-9]"
|
|
},
|
|
{
|
|
"type": "PATTERN",
|
|
"value": "\\p{Pc}"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"expression": {
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "expr_term"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "operation"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "conditional"
|
|
}
|
|
]
|
|
},
|
|
"expr_term": {
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "literal_value"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "template_expr"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "collection_value"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "variable_expr"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "function_call"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "for_expr"
|
|
},
|
|
{
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "expr_term"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "index"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "expr_term"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "get_attr"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "expr_term"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "splat"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "("
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "expression"
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": ")"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"literal_value": {
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "numeric_lit"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "bool_lit"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "null_lit"
|
|
}
|
|
]
|
|
},
|
|
"numeric_lit": {
|
|
"type": "PATTERN",
|
|
"value": "[0-9]+(\\.[0-9]+([eE][-+]?[0-9]+)?)?"
|
|
},
|
|
"bool_lit": {
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "true"
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "false"
|
|
}
|
|
]
|
|
},
|
|
"null_lit": {
|
|
"type": "STRING",
|
|
"value": "null"
|
|
},
|
|
"collection_value": {
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "tuple"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "object"
|
|
}
|
|
]
|
|
},
|
|
"tuple": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "["
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "expression"
|
|
},
|
|
{
|
|
"type": "REPEAT",
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": ","
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "expression"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "]"
|
|
}
|
|
]
|
|
},
|
|
"object": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "{"
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "object_elem"
|
|
},
|
|
{
|
|
"type": "REPEAT",
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": ","
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "object_elem"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "}"
|
|
}
|
|
]
|
|
},
|
|
"object_elem": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "identifier"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "expression"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "="
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": ":"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "expression"
|
|
}
|
|
]
|
|
},
|
|
"index": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "["
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "expression"
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "]"
|
|
}
|
|
]
|
|
},
|
|
"get_attr": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "."
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "identifier"
|
|
}
|
|
]
|
|
},
|
|
"splat": {
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "attr_splat"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "full_splat"
|
|
}
|
|
]
|
|
},
|
|
"attr_splat": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "."
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "*"
|
|
},
|
|
{
|
|
"type": "REPEAT",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "get_attr"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"full_splat": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "["
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "*"
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "]"
|
|
},
|
|
{
|
|
"type": "REPEAT",
|
|
"content": {
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "get_attr"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "index"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"for_expr": {
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "for_tuple_expr"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "for_object_expr"
|
|
}
|
|
]
|
|
},
|
|
"for_tuple_expr": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "["
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "for_intro"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "expression"
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "for_cond"
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "]"
|
|
}
|
|
]
|
|
},
|
|
"for_object_expr": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "{"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "for_intro"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "expression"
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "=>"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "expression"
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "ellipsis"
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "for_cond"
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "}"
|
|
}
|
|
]
|
|
},
|
|
"for_intro": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "for"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "identifier"
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": ","
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "identifier"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "in"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "expression"
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": ":"
|
|
}
|
|
]
|
|
},
|
|
"for_cond": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "if"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "expression"
|
|
}
|
|
]
|
|
},
|
|
"variable_expr": {
|
|
"type": "SYMBOL",
|
|
"name": "identifier"
|
|
},
|
|
"function_call": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "FIELD",
|
|
"name": "name",
|
|
"content": {
|
|
"type": "SYMBOL",
|
|
"name": "identifier"
|
|
}
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "("
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "function_arguments"
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": ")"
|
|
}
|
|
]
|
|
},
|
|
"function_arguments": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "expression"
|
|
},
|
|
{
|
|
"type": "REPEAT",
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": ","
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "expression"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": ","
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "ellipsis"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BLANK"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"ellipsis": {
|
|
"type": "TOKEN",
|
|
"content": {
|
|
"type": "STRING",
|
|
"value": "..."
|
|
}
|
|
},
|
|
"conditional": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "expression"
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "?"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "expression"
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": ":"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "expression"
|
|
}
|
|
]
|
|
},
|
|
"operation": {
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "unary_operation"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "binary_operation"
|
|
}
|
|
]
|
|
},
|
|
"unary_operation": {
|
|
"type": "PREC_LEFT",
|
|
"value": 7,
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "-"
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "!"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "expr_term"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"binary_operation": {
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "PREC_LEFT",
|
|
"value": 6,
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "expr_term"
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "*"
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "/"
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "%"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "expr_term"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "PREC_LEFT",
|
|
"value": 5,
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "expr_term"
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "+"
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "-"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "expr_term"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "PREC_LEFT",
|
|
"value": 4,
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "expr_term"
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": ">"
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": ">="
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "<"
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "<="
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "expr_term"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "PREC_LEFT",
|
|
"value": 3,
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "expr_term"
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "=="
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "!="
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "expr_term"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "PREC_LEFT",
|
|
"value": 2,
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "expr_term"
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "&&"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "expr_term"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "PREC_LEFT",
|
|
"value": 1,
|
|
"content": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "expr_term"
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "||"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "expr_term"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"template_expr": {
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "quoted_template"
|
|
}
|
|
]
|
|
},
|
|
"string_lit": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "\""
|
|
},
|
|
{
|
|
"type": "REPEAT",
|
|
"content": {
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_template_char"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "escape_sequence"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "\""
|
|
}
|
|
]
|
|
},
|
|
"quoted_template": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "\""
|
|
},
|
|
{
|
|
"type": "REPEAT",
|
|
"content": {
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_template_char"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "escape_sequence"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "template_interpolation"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "\""
|
|
}
|
|
]
|
|
},
|
|
"template_interpolation": {
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "${"
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "${~"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "REPEAT",
|
|
"content": {
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_template_char_in_interpolation"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "escape_sequence"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "}"
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "~}"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"comment": {
|
|
"type": "TOKEN",
|
|
"content": {
|
|
"type": "CHOICE",
|
|
"members": [
|
|
{
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "#"
|
|
},
|
|
{
|
|
"type": "PATTERN",
|
|
"value": ".*"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "//"
|
|
},
|
|
{
|
|
"type": "PATTERN",
|
|
"value": ".*"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "SEQ",
|
|
"members": [
|
|
{
|
|
"type": "STRING",
|
|
"value": "/*"
|
|
},
|
|
{
|
|
"type": "PATTERN",
|
|
"value": "[^*]*\\*+([^/*][^*]*\\*+)*"
|
|
},
|
|
{
|
|
"type": "STRING",
|
|
"value": "/"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"extras": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "comment"
|
|
},
|
|
{
|
|
"type": "PATTERN",
|
|
"value": "\\s"
|
|
}
|
|
],
|
|
"conflicts": [
|
|
[
|
|
"body"
|
|
],
|
|
[
|
|
"object_elem",
|
|
"variable_expr"
|
|
],
|
|
[
|
|
"attr_splat"
|
|
],
|
|
[
|
|
"full_splat"
|
|
],
|
|
[
|
|
"conditional"
|
|
],
|
|
[
|
|
"string_lit",
|
|
"quoted_template"
|
|
]
|
|
],
|
|
"precedences": [],
|
|
"externals": [
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_template_char"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "_template_char_in_interpolation"
|
|
},
|
|
{
|
|
"type": "SYMBOL",
|
|
"name": "escape_sequence"
|
|
}
|
|
],
|
|
"inline": [],
|
|
"supertypes": []
|
|
}
|
|
|