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:
@ -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,
|
||||
|
Reference in New Issue
Block a user