I can now use keyword in concept definition and parsing

This commit is contained in:
2020-05-22 15:46:04 +02:00
parent 37d3d16e21
commit 3ce6ce2a76
14 changed files with 127 additions and 45 deletions
+2 -1
View File
@@ -103,9 +103,10 @@ class TestBnfParser(TestUsingMemoryBasedSheerka):
("'str''='var", Sequence(StrMatch("str"), StrMatch("="), c("var"))),
("foo=f", c("foo", "f")),
("foo=f 'constant'", Sequence(c("foo", "f"), StrMatch("constant"))),
("def 'concept'", Sequence(c("def"), StrMatch("concept"))),
])
def test_i_can_parse_regex_with_concept(self, expression, expected):
sheerka, context, parser, foo, bar, var = self.init_parser("foo", "bar", "var")
sheerka, context, parser, foo, bar, var, _def = self.init_parser("foo", "bar", "var", "def")
res = parser.parse(context, Tokenizer(expression))