mini-compiler / src /folder.txt
tareque101's picture
Upload 11 files
753d525 verified
Raw
History Blame Contribute Delete
576 Bytes
mini_compiler/
β”œβ”€β”€ main.py # Entry point: links all phases together
β”œβ”€β”€ lexer.py # Phase 1: Tokenizer
β”œβ”€β”€ parser_ast.py # Phase 2: Recursive Descent Parser & AST Nodes
β”œβ”€β”€ semantic_analyzer.py # Phase 3: Symbol Table & Type Checking
β”œβ”€β”€ icg.py # Phase 4: Three-Address Code Generator
β”œβ”€β”€ optimizer.py # Bonus: Constant Folding
β”œβ”€β”€ code_gen.py # Bonus: Assembly-like Generator
└── tests/
└── sample_code.txt # Input file with custom language code