108 lines
1.9 KiB
JSON
108 lines
1.9 KiB
JSON
|
|
{
|
|||
|
|
"lexer_rules": [
|
|||
|
|
{
|
|||
|
|
"type": "ignore",
|
|||
|
|
"parameters": {
|
|||
|
|
"pattern": " |\\t|\\n"
|
|||
|
|
}
|
|||
|
|
},
|
|||
|
|
{
|
|||
|
|
"type": "boolean",
|
|||
|
|
"parameters": {
|
|||
|
|
"pattern": "false|0",
|
|||
|
|
"id": "const",
|
|||
|
|
"value": false
|
|||
|
|
}
|
|||
|
|
},
|
|||
|
|
{
|
|||
|
|
"type": "boolean",
|
|||
|
|
"parameters": {
|
|||
|
|
"pattern": "true|1",
|
|||
|
|
"id": "const",
|
|||
|
|
"value": true
|
|||
|
|
}
|
|||
|
|
},
|
|||
|
|
{
|
|||
|
|
"type": "void",
|
|||
|
|
"parameters": {
|
|||
|
|
"pattern": "¬|-|\\!|not",
|
|||
|
|
"id": "not"
|
|||
|
|
}
|
|||
|
|
},
|
|||
|
|
{
|
|||
|
|
"type": "void",
|
|||
|
|
"parameters": {
|
|||
|
|
"pattern": "∧|&|and",
|
|||
|
|
"id": "and"
|
|||
|
|
}
|
|||
|
|
},
|
|||
|
|
{
|
|||
|
|
"type": "void",
|
|||
|
|
"parameters": {
|
|||
|
|
"pattern": "∨|\\||or",
|
|||
|
|
"id": "or"
|
|||
|
|
}
|
|||
|
|
},
|
|||
|
|
{
|
|||
|
|
"type": "void",
|
|||
|
|
"parameters": {
|
|||
|
|
"pattern": "\\(|\\[",
|
|||
|
|
"id": "open"
|
|||
|
|
}
|
|||
|
|
},
|
|||
|
|
{
|
|||
|
|
"type": "void",
|
|||
|
|
"parameters": {
|
|||
|
|
"pattern": "\\)|\\]",
|
|||
|
|
"id": "close"
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
],
|
|||
|
|
"parser_start": "formula",
|
|||
|
|
"parser_rules": [
|
|||
|
|
{
|
|||
|
|
"label": "constant",
|
|||
|
|
"premise": "formula",
|
|||
|
|
"conclusion": [
|
|||
|
|
{"type": "terminal", "parameters": {"id": "const"}}
|
|||
|
|
]
|
|||
|
|
},
|
|||
|
|
{
|
|||
|
|
"label": "negation",
|
|||
|
|
"premise": "formula",
|
|||
|
|
"conclusion": [
|
|||
|
|
{"type": "terminal", "parameters": {"id": "not"}},
|
|||
|
|
{"type": "variable", "parameters": {"id": "formula"}}
|
|||
|
|
]
|
|||
|
|
},
|
|||
|
|
{
|
|||
|
|
"label": "conjunction",
|
|||
|
|
"premise": "formula",
|
|||
|
|
"conclusion": [
|
|||
|
|
{"type": "variable", "parameters": {"id": "formula"}},
|
|||
|
|
{"type": "terminal", "parameters": {"id": "and"}},
|
|||
|
|
{"type": "variable", "parameters": {"id": "formula"}}
|
|||
|
|
]
|
|||
|
|
},
|
|||
|
|
{
|
|||
|
|
"label": "disjunction",
|
|||
|
|
"premise": "formula",
|
|||
|
|
"conclusion": [
|
|||
|
|
{"type": "variable", "parameters": {"id": "formula"}},
|
|||
|
|
{"type": "terminal", "parameters": {"id": "or"}},
|
|||
|
|
{"type": "variable", "parameters": {"id": "formula"}}
|
|||
|
|
]
|
|||
|
|
},
|
|||
|
|
{
|
|||
|
|
"label": "priorised",
|
|||
|
|
"premise": "formula",
|
|||
|
|
"conclusion": [
|
|||
|
|
{"type": "terminal", "parameters": {"id": "open"}},
|
|||
|
|
{"type": "variable", "parameters": {"id": "formula"}},
|
|||
|
|
{"type": "terminal", "parameters": {"id": "close"}}
|
|||
|
|
]
|
|||
|
|
}
|
|||
|
|
]
|
|||
|
|
}
|
|||
|
|
|