A compiler for a simple language that compiles to Human Resource Machine assembly-like language
Project description
HRM Compiler
============
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.
## Install
```
virtualenv .hrm
source .hrm/bin/activate
pip install -e .
```
## Usage
`hrmc <script>`
## Examples
There is no formal doc about the accepted grammar (check _parser.py_),
but you can find some examples in the `examples` folder.
## Development
### Run tests
To run the unit tests, execute `pytest`.
### Run differential testing
To check that a new optimization does not introduces bugs, it is possible to
use [hrm-interpreter](https://github.com/alfateam123/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:
1. install rust and cargo via rustup
2. clone and build `hrm-interpreter` in the parent directory of this repository
3. run `run_all_on_interpreter.py`
If something is wrong, you should see an AssertionError.
============
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.
## Install
```
virtualenv .hrm
source .hrm/bin/activate
pip install -e .
```
## Usage
`hrmc <script>`
## Examples
There is no formal doc about the accepted grammar (check _parser.py_),
but you can find some examples in the `examples` folder.
## Development
### Run tests
To run the unit tests, execute `pytest`.
### Run differential testing
To check that a new optimization does not introduces bugs, it is possible to
use [hrm-interpreter](https://github.com/alfateam123/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:
1. install rust and cargo via rustup
2. clone and build `hrm-interpreter` in the parent directory of this repository
3. run `run_all_on_interpreter.py`
If something is wrong, you should see an AssertionError.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
hrmcompiler-0.2.0.tar.gz
(9.8 kB
view hashes)
Built Distribution
Close
Hashes for hrmcompiler-0.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1d8f7393f18a5d9ad17f95467bfded58864dbf95d5a7bda37e401a627a738c0a |
|
MD5 | bae27307472c0b3cea4cd5166aa9a40d |
|
BLAKE2b-256 | 0a60911b1616c66448d8d8c09e31a4a093c4aee6eb42d4f7d577d80824f4d840 |