Created
June 21, 2018 02:04
-
-
Save marcelogdeandrade/d0d18af902059257633baa32dc99a20e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from lexer import Lexer | |
from parser import Parser | |
text_input = """ | |
print(4 + 4 - 2); | |
""" | |
lexer = Lexer().get_lexer() | |
tokens = lexer.lex(text_input) | |
pg = Parser() | |
pg.parse() | |
parser = pg.get_parser() | |
parser.parse(tokens).eval() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment