Skip to content

Should this be used for creating a programming language "from scratch"? #783

Answered by tomtau
devlzcode asked this question in Q&A
Discussion options

You must be logged in to vote

A few projects listed here are programming language implementations: https://github.com/pest-parser/pest#projects-using-pest

What benefits as well as the trade offs with using pest to parse grammar to create a programming language?

Benefits: simplicity (writing PEG is similar to writing regex), correctness (unlike handwritten parsers, parser code is automatically generated), and relatively good performance (case-by-case, but generally on par or slightly worse than handwritten parsers)

Tradeoffs: less flexibility (you may hit limitations of the current grammar), the current API may not fit well some use cases in programming language implementations (e.g. for IDE, one may want a separate …

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by tomtau
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants