During the Compilers course in the second semester of my junior year, MODEMINGZ and I implemented an educational programming language named Cilly.
The Cilly programming language is a subset of JavaScript specifically designed for teaching purposes.
We implemented the following components for this language:
- A complete compiler front-end: Including Lexer and Parser. Through the Parser, we can convert plain-text Cilly code into an Abstract Syntax Tree (AST) for use by different compiler backends.
- An evaluator: Capable of evaluating user-input Cilly code (specifically expressions) by performing post-order traversals of the AST.
- A bytecode compiler and its accompanying virtual machine:
- The compiler generates corresponding Cilly Byte Code (CBC) instructions through post-order traversal of the AST
- The virtual machine executes these instructions sequentially to complete the final evaluation tasks.