forked from luna/jorts
Luna
7ce0565de7
hell yeah i'm going down that path lark made confusing stuff, i'll probably get more confused with a handwritten one, but oh well, such is life
27 lines
451 B
Python
27 lines
451 B
Python
#!/usr/bin/python3
|
|
|
|
import sys
|
|
import pprint
|
|
import logging
|
|
|
|
from jortsc.parser.lexer import lex_jorts
|
|
from jortsc.parser.syntatic import syntatic
|
|
|
|
logging.basicConfig(level=logging.DEBUG)
|
|
|
|
def main():
|
|
"""main entry point"""
|
|
try:
|
|
in_data = sys.stdin.read()
|
|
except EOFError:
|
|
pass
|
|
|
|
tokens = lex_jorts(in_data)
|
|
pprint.pprint(tokens)
|
|
|
|
tree = syntatic(tokens)
|
|
print(tree)
|
|
|
|
|
|
if __name__ == '__main__':
|
|
main()
|