Refactor code

Change mpc.py to auto generate antlr4 files without having to run manualy. Also add a small command line ultility.
Remove commented import in others files, and update README
This commit is contained in:
Nguyễn Anh Khoa
2018-12-18 01:06:36 +07:00
parent d33f3a54ba
commit d6be336a0c
7 changed files with 136 additions and 110 deletions

View File

@ -2,19 +2,15 @@ from parser.MPVisitor import MPVisitor
from parser.MPParser import MPParser
from functools import reduce
# * is not a good use case
from utils.AST import (
IntType,
FloatType,
BoolType,
StringType,
ArrayType,
# VoidType,
Program,
# Decl,
VarDecl,
FuncDecl,
# Stmt,
Assign,
If,
While,
@ -24,14 +20,11 @@ from utils.AST import (
Return,
With,
CallStmt,
# Expr,
BinaryOp,
UnaryOp,
CallExpr,
# LHS,
Id,
ArrayCell,
# Literal,
IntLiteral,
FloatLiteral,
StringLiteral,