Refactored parsers to introduce priority
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user