4 ms·
I've used PEGs to create a compiler, and it results in clear, readable code, easy to maintain. Because the parser structure it's cleaner, it feels natural to wr
by lucio 12y ago
I've used PEGs to create a compiler, and it results in clear, readable code, easy to maintain. Because the parser structure it's cleaner, it feels natural to write the parser manually with PEGs. The key is to handle parse-fail with exceptions.
Instead of having a syntax-file and a generated parser, the code is clear enough to act as low-level documentation.
see: https://github.com/luciotato/LiteScript https://github.com/luciotato/LiteScript