No description
- Python 100%
|
|
||
|---|---|---|
| alang_compiler | ||
| examples | ||
| .gitignore | ||
| LICENSE | ||
| main.py | ||
| README.md | ||
| requirements.txt | ||
Alang Compiler
A compiler for a C-like language called A, written in Python with the Lark library. Work in progress, currently able to generate IR, and still has some bugs/ambiguity issues.
Progress
- Grammar
- Base
- Statements
- Function declarations
- Variable declarations
- Function calls
- Arithmetic
- Sum & Subtraction
- Modulo
- Mul & Div
- Power
- Global variables
- Lexer & Paser (automagically done by Lark)
- Tree annotation (semantic tree)
- Intermediate Represenation generation
- All known bugs fixed
Why it's on Gitlab
I had a terrible time trying to figure out how it worked on my own. Here is my result, after the EIGHTH failed attempt.
The hardest part was trying to find a well-document library, with good examples. Unfortunately, Lark examples were a bit too simple or too specific, so it wasn't appropriate...
So here it is: I hope my project is organized enough to be understandable by other people. If not, feel free to create an issue.