blob: 9310ffc726e092cce508f428bef249ec72137396 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
from lexer import lex
def _get_debug():
return True
def main():
print("### neb :)(:")
print("version: < 0")
idx = 1
while True:
inp = input(f"#{idx}> ")
if len(inp.strip()) == 0:
continue
try:
lexed = lex(inp)
#lexed = lex(inp, [])
if _get_debug():
acc = " ".join([f"{l}" for l in lexed])
print(f" - LEX: {acc}")
idx += 1
except Exception as e:
print(f"panic! {e}")
if __name__ == "__main__":
main()
|