3 ms·
Nah. Source: have done it without formal language theory. You can do most things by printf debugging and kludging. (Left-recursion? Use a while loop! Mutable s
by FeepingCreature 10mo ago
Nah. Source: have done it without formal language theory. You can do most things by printf debugging and kludging.
(Left-recursion? Use a while loop! Mutable state is a pathway to many abilities functional programmers consider unnatural.)
- PaulHoule 10mo agoYou can definitely write parsers and lexers knowing just enough to be dangerous. I remember being in the PHP culture where people wrote regex-based hacks instead of the character-at-a-time or token-at-a-time state machines or state machine + a stack kind of things which would be too slow in a language like that. The less you know the faster you get in trouble when things get tough.
- Maxatar 10mo agoMy statement was specific to recursive descent parsing.
- FeepingCreature 10mo agoBut recursive descent parsing is implemented with functions operating on parser state. The whole point of it is that it's very easy to write a parser because the abstraction exactly matches to function calling in programming languages. So you can do the whole range of pl primitives too.