Fixed BNF concept evaluations

This commit is contained in:
2020-01-03 19:19:57 +01:00
parent adcbc6bb2e
commit ffd98d7407
20 changed files with 682 additions and 237 deletions
+9
View File
@@ -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)