Fixed BNF concept evaluations
This commit is contained in:
@@ -220,6 +220,15 @@ def strip_tokens(tokens, strip_eof=False):
|
||||
return tokens[start: end + 1]
|
||||
|
||||
|
||||
def escape_char(text, to_escape):
|
||||
res = ""
|
||||
|
||||
for c in text:
|
||||
res += ("\\" + c) if c in to_escape else c
|
||||
|
||||
return res
|
||||
|
||||
|
||||
def pp(items):
|
||||
if not hasattr(items, "__iter__"):
|
||||
return str(items)
|
||||
|
||||
Reference in New Issue
Block a user