2 ms·
I know embarrassingly little parser theory - I definitely couldn't write a decent parser generator without looking it up in a book for a few hours - but at leas
by mhh__ 6y ago
I know embarrassingly little parser theory - I definitely couldn't write a decent parser generator without looking it up in a book for a few hours - but at least there is a theory: Semantic analysis has lots of mathematical symbology to describe it, doesn't help you write code for the most part.
- marcosdumay 6y agoAs strange as it looks, parser theory is not very relevant on practice for writing parsers. You just use some parser generator or a parser combinators library if your language allows them, and you won't have many problems (except for maybe they being slow). It is way more relevant for optimizing parsers performance and for designing languages syntax.
- vidarh 6y agoAnd when hand-writing parsers, it's fairly common to just use simple recursive descent and all it a day. Anyone can "invent" recursive descent with fairly little prodding about how to divide and conquer.