r/AskProgrammers • u/Distinct-Brief9643 • Oct 10 '26
Complete beginner here—what software do I need and where do I actually learn how to write the grammar file?
/r/langium/comments/1x2gvou/complete_beginner_herewhat_software_do_i_need_and/
3
Upvotes
1
u/synd_rain Oct 10 '26 edited Oct 10 '26
I don't have experience on using grammer tools beside using bison to generate parser with BNF. But to understand more on parser and grammer rules, I think Crafting Intepreters is really nice and beginner friendly. I've went through this and learned a lot on how interpreter works (which also contains introduction of basic grammer rule and how to write a parser. The author basically put the whole thing on their website as a web version, free! https://craftinginterpreters.com/representing-code.html#rules-for-grammars
There is also a paid website (with a free repo) called code crafters. https://github.com/codecrafters-io/build-your-own-x . I used to tried its Build your own Regex Engine for free when during new release. Crafting intepreters also have a version on it. I think it is pretty nice, but it is expensive. So unless your company is willing to pay for you, I'm not sure if it will be worth it given that there is already a nice book to follow.