Awesome
SER502_Compiler_and_Interpreter
Language Design Project using flex and bison for compiler and C# for interpreter [Run time environment]
Steps to generate G28.g28 executable
- flex LOL.l
- bison -d LOL.y
- gcc -o Compiler_Lol lex.yy.c LOL.tab.c -ll -lm
Steps to compile .lol code
- ./Compiler_Lol [file-name].lol
Steps to interpret and run code [on Windows/mac OSX/LINUX]
- mcs Runtime_Lol.cs
- mono Runtime_Lol.exe [file-name].lol.asm
Installation Note:
Steps to install mono framework on
a) mac OSX
- Download Mono 32-bit from http://www.mono-project.com/download/ (Works on 64 bit machines too)
- Follow the installation guidelines from http://www.mono-project.com/docs/about-mono/supported-platforms/osx/
b) Windows
- Download Mono 32-bit from http://www.mono-project.com/download/ (Works on 64 bit machines too)
- Follow the installation guidelines from http://www.mono-project.com/docs/getting-started/install/windows/
c) LINUX
Run the following commands from the terminal:
-
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
-
echo "deb http://download.mono-project.com/repo/debian wheezy-apache24-compat main" | sudo tee -a /etc/apt/sources.list.d/mono-xamarin.list
-
sudo apt-get update
-
sudo apt-get install mono-mcs