An RTLIL frontend that includes a lexer and parser auto-generated by LALRPOP.
Most of this code was originally authored by XHE.
It has been re-factored to support more portable custom visitor enter and exit methods that might be more appropriate for a re-usable RTLIL frontend.
Currently, one visitor implementation is provided, namely, dumper, which takes an RTLIL ast and converts it back into valid RTLIL text.
bin/parse.rs consumes an RTLIL file, generates an AST, and the uses
dumper to generate RTLIL text again, which could be written to a file.
To run bin/parse, do the following:
cargo run examples/alu.rtlil
- Make dumper return string