Work-in-progress compiler to have an high-level tool to reason about problems in Human Resources Machines.
I hate pseudo-assembly, and I want to write a compiler.
virtualenv .hrm
source .hrm/bin/activate
pip install -e .
hrmc <script>
There is no formal doc about the accepted grammar (check parser.py),
but you can find some examples in the examples folder.
To run the unit tests, execute pytest.
To check that a new optimization does not introduces bugs, it is possible to use hrm-interpreter and a custom script to compile the examples with different flags and run the different builds.
To be able to perform this kind of testing:
- install rust and cargo via rustup
- clone and build
hrm-interpreterin the parent directory of this repository - run
run_all_on_interpreter.py
If something is wrong, you should see an AssertionError.