2 ms·
This is beside your point, but I've found PEG to be a nice step up in usability from lex&yacc, as again, you only have to write one grammar definition. Wiki: h
by fwip 8y ago
This is beside your point, but I've found PEG to be a nice step up in usability from lex&yacc, as again, you only have to write one grammar definition.
Wiki: https://en.wikipedia.org/wiki/Parsing_expression_grammar https://en.wikipedia.org/wiki/Parsing_expression_grammar
Example Implementation: https://pegjs.org/ https://pegjs.org/
- minxomat 8y agoYep, PEGs are seriously underutilized. Here's a nice introduction using LPeg: http://leafo.net/guides/parsing-expression-grammars.html http://leafo.net/guides/parsing-expression-grammars.html
- int_19h 8y agoFor Rust: https://github.com/kevinmehall/rust-peg https://github.com/kevinmehall/rust-peg