I can now use keyword in concept definition and parsing
This commit is contained in:
@@ -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))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user