Simple language for evaluating expressions. Features: (1) Addition (2) Subtraction (3) Multiplication (4) Division
NOTE: the above operations can only be carried out on integers of size 'word'
Please be sure you have a C compiler installed on your system. On linux, this can be obtained through your distribution's package manager. On MacOS, this can be installed through Homebrew. If you're on Windows, good luck sucker.
To be able to compile your programs, you will need to install QBE compiler to compile the QBE Intermediate Representation (IR).
Once you are able to compiler C and QBE IR, you can now compiler the Alang compiler simply by doing the following:
git clone https://github.com/Num0Programmer/alang.git
cd alang
make
Now that the compiler is built, you can compile and run your own Alang programs. For a reference, check out examples in the 'examples/' directory. Try building and running the addition example by running the following:
./alc examples/add.a add.qbe
qbe add.qbe -o add.s
cc add.s -o add
./add
The result should be:
19