Refactored parsers to introduce priority

This commit is contained in:
2020-01-08 19:45:54 +01:00
parent b4346b5af0
commit a62c1f0f13
13 changed files with 531 additions and 42 deletions
+6 -5
View File
@@ -13,7 +13,7 @@ class UnexpectedEndOfFileError(ErrorNode):
pass
class BnfParser:
class BnfParser(BaseParser):
"""
Parser used to transform litteral into ParsingExpression
example :
@@ -27,10 +27,11 @@ class BnfParser:
"""
def __init__(self):
self.has_error = False
self.error_sink = []
self.name = BaseParser.PREFIX + "Bnf"
def __init__(self, **kwargs):
super().__init__("Bnf", 50, False)
# self.has_error = False
# self.error_sink = []
# self.name = BaseParser.PREFIX + "Bnf"
self.lexer_iter = None
self._current = None