-
Notifications
You must be signed in to change notification settings - Fork 0
dmsalomon/scc
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Dov Salomon <dms833@nyu.edu> --------------------| Running the Code Generator |-------------------- The code is in `gen.py`. It requires the llvmlite library and a relatively new version of python 3 (probably python 3.6 or newer, I used python 3.7). Run it as follows: python3 gen.py <input>. The file parameter is optional, in which case input will be read from stdin. If all goes well, the output is an llvm ir file called `o.ll`. Run `make` to compile `o.ll` into a binary called `o`. (You will need the llvm compiler `llc` to compile, and `gcc` for linking against libc). I have some sample programs in the txt/ directory using the .xx extension. If you want to only run the previous stages of the compiler (i.e. only scanner, or only checker+parser+scanner), you can do so by running the appropriate python file (scan.py, parse.py, check.py). They are invoked in exactly the same as the code generator. -- ignore my vim modeline :) -- vim:et:tw=80:fo-=l:
About
Compiler for a Simple Language
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published