Casper

A general-purpose programming language

Language Project
COMS W4115 Programming Languages and Translators
Fall 2018

Use:
 - make options for Casper:
     make         - Compile the compiler casper.native
                    same as: make casper.native
     make all     - Compile the compiler and libraries
     make test    - Make all and then run regression suite
     make testS   - Load a version of the scanner that
                    prints out the tokens instead of feeding
                    to parser and then scans a program
     make testP   - Use menhir to evaluate some token
                    strings with the parser
     make clean   - Remove all generated files
     make cleang  - Leave compiler, remove other generated files
     make casper.tar.gz  - Create tarball
     make help    - Display this list of options

 - casper.native usage:
    ./casper.native [-a|-s|-l|-c] [file.goo]
        -a Print the AST
        -s Print the SAST
        -l Print the generated LLVM IR
        -c Check and print the generated LLVM IR (default)
        -help  Display this list of options
        --help Display this list of options

 - to compile a Casper program:
    ./casper.sh <program filename with no extension>
        - Create executable ./<filename>.exe
          and control-flow graph <filename>.png

## Documentation
 README
 /docs/CasperFinalReport.pdf


Casper is an extension of MicroC.


Environment setup under Ubuntu 16.04
$ sudo apt install ocaml llvm llvm-runtime m4 opam
$ opam init
$ opam install llvm.3.8
$ eval `opam config env`

$ sudo apt-get install opt
$ sudo apt-get install graphviz

$ tar -xvf casper.tar.gz

$ make
$ ./casper.sh <program filename with no extension>