sic, short for simplified C, is a language designed for the course project of Compilers taken during Monsoon 2019. Its context free grammar can be found in the manual.
This repo contains a lexical analyzer and parser, written using Flex and Bison. These were used to construct an abstract syntax tree using the visitor design pattern. Contains a visitor that formats obfuscated source code, one that interprets the source code, and one that generates LLVM IR(ongoing).
- llvm 9
- flex
- bison
./run.sh prettify
./prettify <source code>
./run.sh interpret
./interpret <source code>
./run.sh codegen
./runllvm.sh <source code>
- Codegen is not fully tested, arrays are not supported