3 ms·
I used the pest[1] library in Rust, it uses something a bit like an EBNF syntax to write the grammar and generate a PEG parser. [1] - https://pest.rs/ https://
by linkdd 6y ago
I used the pest[1] library in Rust, it uses something a bit like an EBNF syntax to write the grammar and generate a PEG parser.
[1] - https://pest.rs/ https://pest.rs/
- cphoover 6y agoThanks
- cphoover 6y agoBTW you should finish your project. You built the parser already!
- linkdd 6y agoI wanted to use the LLVM Rust bindings to generate LLVM IR, but I still need to do some more reading on how to represent high-level constructs in such a low-level language. Also, generics and type inference is hard to implement! :p I don't have the focus required for that at the moment, but it's still in my TODO list :) I might publish the parser on github and post it on Hackernews to see if anyone would be interested to help. NB: the project started with the thought "what my ideal language would look like?"