var ALL_TESTS = { "tests": [ { "grammarSrc": "grammar: \n\trules:\n\t\trule-str: STR(txtA) \n\t\trule-bool: BOOL(hasZ) | STR \n\t\trule-obj: OBJ(obj1):_obj \n\t\t_obj: STR(v1) BOOL(v2)? \n\t\trule-arr: (vs)+ \n\ttokens:\n\t\tX: X \n\t\tY: Y \n\t\tBOOL: BOOL | exists \n\t\tOBJ: OBJ\n\t\tSTR: STR \n\t\tARR: ARR \n", "inputSources": [ { "parseResult": { "ok": true, "ast": { "loc": { "start": { "column": 0, "line": 0 }, "end": { "column": 6, "line": 0 } }, "type": "Object", "vs": { "value": [ { "value": "vv11", "loc": { "start": { "column": 0, "line": 0 }, "end": { "column": 3, "line": 0 } }, "type": "StringLiteral" }, { "value": "v2", "loc": { "start": { "column": 5, "line": 0 }, "end": { "column": 6, "line": 0 } }, "type": "StringLiteral" } ], "loc": { "start": { "column": 0, "line": 0 }, "end": { "column": 6, "line": 0 } }, "type": "ArrayLiteral" } }, "data": { "__cls": "Object", "vs": [ "vv11", "v2" ], "__uid": 9046 } }, "inputSrc": "vv11 v2", "rule": "rule-arr" } ], "grammarAST": { "ast": { "tokens": { "value": [ { "name": { "value": "X", "loc": { "start": { "column": 2, "line": 8 }, "end": { "column": 2, "line": 8 } }, "type": "StringLiteral" }, "prefix": { "value": "X", "loc": { "start": { "column": 5, "line": 8 }, "end": { "column": 5, "line": 8 } }, "type": "StringLiteral" }, "loc": { "start": { "column": 2, "line": 8 }, "end": { "column": 5, "line": 8 } }, "type": "GRuleToken" }, { "name": { "value": "Y", "loc": { "start": { "column": 2, "line": 9 }, "end": { "column": 2, "line": 9 } }, "type": "StringLiteral" }, "prefix": { "value": "Y", "loc": { "start": { "column": 5, "line": 9 }, "end": { "column": 5, "line": 9 } }, "type": "StringLiteral" }, "loc": { "start": { "column": 2, "line": 9 }, "end": { "column": 5, "line": 9 } }, "type": "GRuleToken" }, { "name": { "value": "BOOL", "loc": { "start": { "column": 2, "line": 10 }, "end": { "column": 5, "line": 10 } }, "type": "StringLiteral" }, "prefix": { "value": "BOOL", "loc": { "start": { "column": 8, "line": 10 }, "end": { "column": 11, "line": 10 } }, "type": "StringLiteral" }, "loc": { "start": { "column": 2, "line": 10 }, "end": { "column": 20, "line": 10 } }, "type": "GRuleToken", "filter": { "value": "exists", "loc": { "start": { "column": 15, "line": 10 }, "end": { "column": 20, "line": 10 } }, "type": "StringLiteral" } }, { "name": { "value": "OBJ", "loc": { "start": { "column": 2, "line": 11 }, "end": { "column": 4, "line": 11 } }, "type": "StringLiteral" }, "prefix": { "value": "OBJ", "loc": { "start": { "column": 7, "line": 11 }, "end": { "column": 9, "line": 11 } }, "type": "StringLiteral" }, "loc": { "start": { "column": 2, "line": 11 }, "end": { "column": 9, "line": 11 } }, "type": "GRuleToken" }, { "name": { "value": "STR", "loc": { "start": { "column": 2, "line": 12 }, "end": { "column": 4, "line": 12 } }, "type": "StringLiteral" }, "prefix": { "value": "STR", "loc": { "start": { "column": 7, "line": 12 }, "end": { "column": 9, "line": 12 } }, "type": "StringLiteral" }, "loc": { "start": { "column": 2, "line": 12 }, "end": { "column": 9, "line": 12 } }, "type": "GRuleToken" }, { "name": { "value": "ARR", "loc": { "start": { "column": 2, "line": 13 }, "end": { "column": 4, "line": 13 } }, "type": "StringLiteral" }, "prefix": { "value": "ARR", "loc": { "start": { "column": 7, "line": 13 }, "end": { "column": 9, "line": 13 } }, "type": "StringLiteral" }, "loc": { "start": { "column": 2, "line": 13 }, "end": { "column": 9, "line": 13 } }, "type": "GRuleToken" } ], "loc": { "start": { "column": 2, "line": 8 }, "end": { "column": 9, "line": 13 } }, "type": "ArrayLiteral" }, "loc": { "start": { "column": 8, "line": 0 }, "end": { "column": 9, "line": 13 } }, "type": "SeepGrammar", "rules": { "value": [ { "name": { "value": "rule-str", "loc": { "start": { "column": 2, "line": 2 }, "end": { "column": 9, "line": 2 } }, "type": "StringLiteral" }, "elements": { "value": [ { "varName": { "value": "txtA", "loc": { "start": { "column": 18, "line": 2 }, "end": { "column": 21, "line": 2 } }, "type": "StringLiteral" }, "tokenName": { "value": "STR", "loc": { "start": { "column": 14, "line": 2 }, "end": { "column": 16, "line": 2 } }, "type": "StringLiteral" }, "loc": { "start": { "column": 14, "line": 2 }, "end": { "column": 23, "line": 2 } }, "type": "GElement", "explicitRequireWS": { "value": " ", "loc": { "start": { "column": 23, "line": 2 }, "end": { "column": 23, "line": 2 } }, "type": "StringLiteral" } } ], "loc": { "start": { "column": 14, "line": 2 }, "end": { "column": 23, "line": 2 } }, "type": "ArrayLiteral" }, "loc": { "start": { "column": 2, "line": 2 }, "end": { "column": 23, "line": 2 } }, "type": "GRule" }, { "name": { "value": "rule-bool", "loc": { "start": { "column": 2, "line": 3 }, "end": { "column": 10, "line": 3 } }, "type": "StringLiteral" }, "elements": { "value": [ { "varName": { "value": "hasZ", "loc": { "start": { "column": 19, "line": 3 }, "end": { "column": 22, "line": 3 } }, "type": "StringLiteral" }, "tokenName": { "value": "BOOL", "loc": { "start": { "column": 14, "line": 3 }, "end": { "column": 17, "line": 3 } }, "type": "StringLiteral" }, "isOR": { "value": true, "loc": { "start": { "column": 25, "line": 3 }, "end": { "column": 25, "line": 3 } }, "type": "BooleanLiteral" }, "loc": { "start": { "column": 14, "line": 3 }, "end": { "column": 25, "line": 3 } }, "type": "GElement", "explicitRequireWS": { "value": " ", "loc": { "start": { "column": 24, "line": 3 }, "end": { "column": 24, "line": 3 } }, "type": "StringLiteral" } }, { "explicitRequireWS": { "value": " ", "loc": { "start": { "column": 30, "line": 3 }, "end": { "column": 30, "line": 3 } }, "type": "StringLiteral" }, "tokenName": { "value": "STR", "loc": { "start": { "column": 27, "line": 3 }, "end": { "column": 29, "line": 3 } }, "type": "StringLiteral" }, "loc": { "start": { "column": 27, "line": 3 }, "end": { "column": 30, "line": 3 } }, "type": "GElement" } ], "loc": { "start": { "column": 14, "line": 3 }, "end": { "column": 30, "line": 3 } }, "type": "ArrayLiteral" }, "loc": { "start": { "column": 2, "line": 3 }, "end": { "column": 30, "line": 3 } }, "type": "GRule" }, { "name": { "value": "rule-obj", "loc": { "start": { "column": 2, "line": 4 }, "end": { "column": 9, "line": 4 } }, "type": "StringLiteral" }, "elements": { "value": [ { "varName": { "value": "obj1", "loc": { "start": { "column": 18, "line": 4 }, "end": { "column": 21, "line": 4 } }, "type": "StringLiteral" }, "childRuleName": { "value": "_obj", "loc": { "start": { "column": 24, "line": 4 }, "end": { "column": 27, "line": 4 } }, "type": "StringLiteral" }, "tokenName": { "value": "OBJ", "loc": { "start": { "column": 14, "line": 4 }, "end": { "column": 16, "line": 4 } }, "type": "StringLiteral" }, "loc": { "start": { "column": 14, "line": 4 }, "end": { "column": 28, "line": 4 } }, "type": "GElement", "explicitRequireWS": { "value": " ", "loc": { "start": { "column": 28, "line": 4 }, "end": { "column": 28, "line": 4 } }, "type": "StringLiteral" } } ], "loc": { "start": { "column": 14, "line": 4 }, "end": { "column": 28, "line": 4 } }, "type": "ArrayLiteral" }, "loc": { "start": { "column": 2, "line": 4 }, "end": { "column": 28, "line": 4 } }, "type": "GRule" }, { "name": { "value": "_obj", "loc": { "start": { "column": 2, "line": 5 }, "end": { "column": 5, "line": 5 } }, "type": "StringLiteral" }, "elements": { "value": [ { "varName": { "value": "v1", "loc": { "start": { "column": 17, "line": 5 }, "end": { "column": 18, "line": 5 } }, "type": "StringLiteral" }, "tokenName": { "value": "STR", "loc": { "start": { "column": 13, "line": 5 }, "end": { "column": 15, "line": 5 } }, "type": "StringLiteral" }, "loc": { "start": { "column": 13, "line": 5 }, "end": { "column": 20, "line": 5 } }, "type": "GElement", "explicitRequireWS": { "value": " ", "loc": { "start": { "column": 20, "line": 5 }, "end": { "column": 20, "line": 5 } }, "type": "StringLiteral" } }, { "varName": { "value": "v2", "loc": { "start": { "column": 26, "line": 5 }, "end": { "column": 27, "line": 5 } }, "type": "StringLiteral" }, "explicitRequireWS": { "value": " ", "loc": { "start": { "column": 30, "line": 5 }, "end": { "column": 30, "line": 5 } }, "type": "StringLiteral" }, "multiplicity": { "value": "?", "loc": { "start": { "column": 29, "line": 5 }, "end": { "column": 29, "line": 5 } }, "type": "StringLiteral" }, "loc": { "start": { "column": 21, "line": 5 }, "end": { "column": 30, "line": 5 } }, "type": "GElement", "tokenName": { "value": "BOOL", "loc": { "start": { "column": 21, "line": 5 }, "end": { "column": 24, "line": 5 } }, "type": "StringLiteral" } } ], "loc": { "start": { "column": 13, "line": 5 }, "end": { "column": 30, "line": 5 } }, "type": "ArrayLiteral" }, "loc": { "start": { "column": 2, "line": 5 }, "end": { "column": 30, "line": 5 } }, "type": "GRule" }, { "name": { "value": "rule-arr", "loc": { "start": { "column": 2, "line": 6 }, "end": { "column": 9, "line": 6 } }, "type": "StringLiteral" }, "elements": { "value": [ { "varName": { "value": "vs", "loc": { "start": { "column": 15, "line": 6 }, "end": { "column": 16, "line": 6 } }, "type": "StringLiteral" }, "multiplicity": { "value": "+", "loc": { "start": { "column": 18, "line": 6 }, "end": { "column": 18, "line": 6 } }, "type": "StringLiteral" }, "loc": { "start": { "column": 15, "line": 6 }, "end": { "column": 19, "line": 6 } }, "type": "GElement", "explicitRequireWS": { "value": " ", "loc": { "start": { "column": 19, "line": 6 }, "end": { "column": 19, "line": 6 } }, "type": "StringLiteral" } } ], "loc": { "start": { "column": 15, "line": 6 }, "end": { "column": 19, "line": 6 } }, "type": "ArrayLiteral" }, "loc": { "start": { "column": 2, "line": 6 }, "end": { "column": 19, "line": 6 } }, "type": "GRule" } ], "loc": { "start": { "column": 2, "line": 2 }, "end": { "column": 19, "line": 6 } }, "type": "ArrayLiteral" } }, "data": { "__cls": "org.subalternproductions.seepResource.dsl.parser::SeepGrammar", "tokens": [ { "__cls": "org.subalternproductions.seepResource.dsl.parser.grammar::GRuleToken", "name": "X", "prefix": "X" }, { "__cls": "org.subalternproductions.seepResource.dsl.parser.grammar::GRuleToken", "name": "Y", "prefix": "Y" }, { "__cls": "org.subalternproductions.seepResource.dsl.parser.grammar::GRuleToken", "name": "BOOL", "prefix": "BOOL", "filter": "exists" }, { "__cls": "org.subalternproductions.seepResource.dsl.parser.grammar::GRuleToken", "name": "OBJ", "prefix": "OBJ" }, { "__cls": "org.subalternproductions.seepResource.dsl.parser.grammar::GRuleToken", "name": "STR", "prefix": "STR" }, { "__cls": "org.subalternproductions.seepResource.dsl.parser.grammar::GRuleToken", "name": "ARR", "prefix": "ARR" } ], "rules": [ { "__cls": "org.subalternproductions.seepResource.dsl.parser.grammar::GRule", "name": "rule-str", "elements": [ { "__cls": "org.subalternproductions.seepResource.dsl.parser.grammar::GElement", "varName": "txtA", "tokenName": "STR", "explicitRequireWS": " " } ] }, { "__cls": "org.subalternproductions.seepResource.dsl.parser.grammar::GRule", "name": "rule-bool", "elements": [ { "__cls": "org.subalternproductions.seepResource.dsl.parser.grammar::GElement", "varName": "hasZ", "isOR": true, "tokenName": "BOOL", "explicitRequireWS": " " }, { "__cls": "org.subalternproductions.seepResource.dsl.parser.grammar::GElement", "tokenName": "STR", "explicitRequireWS": " " } ] }, { "__cls": "org.subalternproductions.seepResource.dsl.parser.grammar::GRule", "name": "rule-obj", "elements": [ { "__cls": "org.subalternproductions.seepResource.dsl.parser.grammar::GElement", "varName": "obj1", "tokenName": "OBJ", "explicitRequireWS": " ", "childRuleName": "_obj" } ] }, { "__cls": "org.subalternproductions.seepResource.dsl.parser.grammar::GRule", "name": "_obj", "elements": [ { "__cls": "org.subalternproductions.seepResource.dsl.parser.grammar::GElement", "varName": "v1", "tokenName": "STR", "explicitRequireWS": " " }, { "__cls": "org.subalternproductions.seepResource.dsl.parser.grammar::GElement", "varName": "v2", "multiplicity": "?", "tokenName": "BOOL", "explicitRequireWS": " " } ] }, { "__cls": "org.subalternproductions.seepResource.dsl.parser.grammar::GRule", "name": "rule-arr", "elements": [ { "__cls": "org.subalternproductions.seepResource.dsl.parser.grammar::GElement", "varName": "vs", "multiplicity": "+", "explicitRequireWS": " " } ] } ] } } } ] } export default ALL_TESTS