This is a reference implementation of Chop Language.
See interactive demo.
- Rust
- LLVM Tools
sudo apt install libpython2.7 libxml2 clang llvm-dev
cargo install --path ichop --force
cargo install --path cchop --force
ichop <code filename>
Hint: Usage of shebang is also possible.
cchop <code filename> -o <output filename>
- Interpret MVP ✔️
- Compile MVP via LLVM ✔️
- Mathematical operations and build-in functions ✔️
- Variables ✔️
- Primitive Types ✔️
- Objects
- Functions
- Code generation from intermediate steps
- Control flow
- Arrays and Strings
- Meta Programming
- Imports and Exports
- Heap
- Hooks
- Enums
- Iterators and Loops
- Caching
- Borrowing (and checks)
- FFI (foreign function interface)
- Debugging
- Container
- IO
- Rewrite compiler and interpreter in chop.
- Adjust and extend the language specs with findings on that way.
... Finally solve some of Graydon Hoare's problems
lexer
parser
generator (deprecated)
specializer
simplifier
exporter
llvm
interpreter
The steps parser
, generator
and specializer
are working on single statements.
Compile C code to LLVM:
clang -S -emit-llvm <c code file>