2021-06-07 20:50:00 +02:00
|
|
|
{
|
|
|
|
|
"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": "SYMBOL",
|
|
|
|
|
"name": "identifier"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"type": "STRING",
|
|
|
|
|
"value": "="
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"type": "SYMBOL",
|
|
|
|
|
"name": "expression"
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
"block": {
|
|
|
|
|
"type": "SEQ",
|
|
|
|
|
"members": [
|
|
|
|
|
{
|
|
|
|
|
"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": "}"
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
"expression": {
|
|
|
|
|
"type": "CHOICE",
|
|
|
|
|
"members": [
|
|
|
|
|
{
|
|
|
|
|
"type": "SYMBOL",
|
|
|
|
|
"name": "expr_term"
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
"expr_term": {
|
|
|
|
|
"type": "CHOICE",
|
|
|
|
|
"members": [
|
|
|
|
|
{
|
|
|
|
|
"type": "SYMBOL",
|
|
|
|
|
"name": "literal_value"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"type": "SYMBOL",
|
|
|
|
|
"name": "variable_expr"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"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": "string_lit"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"type": "STRING",
|
|
|
|
|
"value": "true"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"type": "STRING",
|
|
|
|
|
"value": "false"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"type": "STRING",
|
|
|
|
|
"value": "null"
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
"numeric_lit": {
|
2021-06-07 22:32:14 +02:00
|
|
|
"type": "PATTERN",
|
|
|
|
|
"value": "[0-9]+(\\.[0-9]+([eE][-+]?[0-9]+)?)?"
|
2021-06-07 20:50:00 +02:00
|
|
|
},
|
|
|
|
|
"variable_expr": {
|
|
|
|
|
"type": "SYMBOL",
|
|
|
|
|
"name": "identifier"
|
|
|
|
|
},
|
|
|
|
|
"string_lit": {
|
|
|
|
|
"type": "SEQ",
|
|
|
|
|
"members": [
|
|
|
|
|
{
|
|
|
|
|
"type": "STRING",
|
|
|
|
|
"value": "\""
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"type": "PATTERN",
|
|
|
|
|
"value": "\\w+"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"type": "STRING",
|
|
|
|
|
"value": "\""
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
"identifier": {
|
|
|
|
|
"type": "PATTERN",
|
|
|
|
|
"value": "\\w+"
|
|
|
|
|
},
|
|
|
|
|
"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"
|
|
|
|
|
]
|
|
|
|
|
],
|
|
|
|
|
"precedences": [],
|
|
|
|
|
"externals": [],
|
|
|
|
|
"inline": [],
|
|
|
|
|
"supertypes": []
|
|
|
|
|
}
|
|
|
|
|
|