10000 GitHub - dmsalomon/scc: Compiler for a Simple Language
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

dmsalomon/scc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

85 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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

No packages published
0