Fixed #29: Parsers: Implement parsing memoization
Fixed #77 : Parser: ShortTermMemoryParser should be called separately Fixed #78 : Remove VariableNode usage Fixed #79 : ConceptManager: Implement compile caching Fixed #80 : SheerkaExecute : parsers_key is not correctly computed Fixed #81 : ValidateConceptEvaluator : Validate concept's where and pre clauses right after the parsing Fixed #82 : SheerkaIsAManager: isa() failed when the set as a body Fixed #83 : ValidateConceptEvaluator : Support BNF and SYA Concepts Fixed #84 : ExpressionParser: Implement the parser as a standard parser Fixed #85 : Services: Give order to services Fixed #86 : cannot manage smart_get_attr(the short, color)
This commit is contained in:
@@ -71,7 +71,15 @@ class UnexpectedEofParsingError(ParsingError):
|
||||
class BaseParser:
|
||||
PREFIX = "parsers."
|
||||
|
||||
def __init__(self, name, priority: int, enabled=True, yield_eof=False):
|
||||
def __init__(self, name, priority: int, enabled=True, yield_eof=False, hints=None):
|
||||
"""
|
||||
|
||||
:param name:
|
||||
:param priority:
|
||||
:param enabled:
|
||||
:param yield_eof:
|
||||
:param hints: Dictionary context_hint: priority. When not null, priority is taken from it
|
||||
"""
|
||||
# self.log = get_logger("parsers." + self.__class__.__name__)
|
||||
# self.init_log = get_logger("init." + self.PREFIX + self.__class__.__name__)
|
||||
# self.verbose_log = get_logger("verbose." + self.PREFIX + self.__class__.__name__)
|
||||
@@ -81,6 +89,7 @@ class BaseParser:
|
||||
self.priority = priority
|
||||
self.enabled = enabled
|
||||
self.yield_eof = yield_eof
|
||||
self.hints = hints
|
||||
|
||||
def __eq__(self, other):
|
||||
if not isinstance(other, self.__class__):
|
||||
|
||||
Reference in New Issue
Block a user