No description
Find a file
Antoine Viallon a2b7b3d099
Fixed global variables in IR
For some reason, recursive functions still doesn't work
2021-03-11 11:24:12 +01:00
alang_compiler Fixed global variables in IR 2021-03-11 11:24:12 +01:00
examples Fixed global variables in IR 2021-03-11 11:24:12 +01:00
.gitignore Try to debug ambiguity issues 2021-03-04 21:24:58 +01:00
LICENSE Warn about unused variables 2021-03-06 19:09:32 +01:00
main.py Add some information about the arguments 2021-03-09 17:31:23 +01:00
README.md Added a README 2021-03-04 21:34:15 +01:00
requirements.txt Add requirements.txt 2021-03-06 17:40:23 +01:00

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.