From 0e5f5596b959c6c19e4525ed65f5c7488fc2f97e Mon Sep 17 00:00:00 2001 From: mryouse Date: Wed, 18 May 2022 05:04:49 +0000 Subject: parser rewrite --- repl.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'repl.py') diff --git a/repl.py b/repl.py index 9310ffc..d22c8b8 100644 --- a/repl.py +++ b/repl.py @@ -1,4 +1,5 @@ from lexer import lex +from parser import parse def _get_debug(): return True @@ -13,10 +14,13 @@ def main(): continue try: lexed = lex(inp) - #lexed = lex(inp, []) if _get_debug(): acc = " ".join([f"{l}" for l in lexed]) print(f" - LEX: {acc}") + parsed = parse(lexed) + if _get_debug(): + acc = " ".join([f"{p}" for p in parsed]) + print(f" - PARSE: {acc}") idx += 1 except Exception as e: print(f"panic! {e}") -- cgit v1.2.3