Working on #48 : Added BaseExprParser and BaseNodeParser.py
This commit is contained in:
@@ -2,7 +2,7 @@ from core.builtin_concepts import BuiltinConcepts
|
||||
from core.rule import Rule
|
||||
from core.sheerka.services.SheerkaExecute import ParserInput
|
||||
from core.tokenizer import TokenKind
|
||||
from parsers.BaseParser import BaseParser, ParsingError, UnexpectedTokenParsingError
|
||||
from parsers.BaseParser import BaseParser, ParsingError, UnexpectedTokenParsingError, BaseParserInputParser
|
||||
|
||||
|
||||
class RuleNotFoundError(ParsingError):
|
||||
@@ -14,7 +14,7 @@ class RuleNotFoundError(ParsingError):
|
||||
return f"RuleNotFoundError(id={self.id}, key={self.key}"
|
||||
|
||||
|
||||
class RuleParser(BaseParser):
|
||||
class RuleParser(BaseParserInputParser):
|
||||
"""
|
||||
Tries to recognize rules
|
||||
"""
|
||||
@@ -22,7 +22,7 @@ class RuleParser(BaseParser):
|
||||
NAME = "Rule"
|
||||
|
||||
def __init__(self, **kwargs):
|
||||
BaseParser.__init__(self, RuleParser.NAME, 80)
|
||||
BaseParserInputParser.__init__(self, RuleParser.NAME, 80)
|
||||
|
||||
def parse(self, context, parser_input: ParserInput):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user