Tinjazz is a dataflow language with a netlist backend, based on minijazz https://github.com/inria-parkas/minijazz.
To build, you need a recent version of rustc and cargo. Then, run:
cargo build --release
The executable is in target/release.
To display a help page with all the options:
./tinyjazz --help
The build.rs file is used to generate the parser and lexer from .lalrpop files during compilation. All the code is in /src, organised in different files. In all folders, the mod.rs file contains explanations about the structure of the folder. Warning : the code is in need of a pretty big refactor currently, to make it faster and cleaner.
- The main file handles the command line interface, and calls all the other functions.
- USAGE.docopt is a high-level description of the command line interface, which the docopt crate uses to generates a command line parser.
- The ast folder contains all the different internal representation which are used in the compiler.
- The frontend folder contains all the code to convert the original file to the last intermediate representation. Each file is named after the object it handles, for example constants.rs replaces the constants with their value. The two folders correspond to the netlist parser and to the main parser.
- The backends folder contains code to convert the last intermediate representation into actual code. The only target is netlists.
- The optimization folder contains the code used to optimize the program. It only uses the last intermediate representation for that.
- The interpreter file contains the interpreters I made for the "graph.rs" representation.
- The util folder contains miscallenous utility features, such as error handling, the .dot file generation, and the rhai scripting.
- The test folder should contain unit test for the compiler. Currently, it doesn't.