3 ms·
Wirth also wrote an extremely accessible book on Compiler Construction, using exactly the hand written recursive descent parsing approach discussed by OP. The
by microtherion 10mo ago
Wirth also wrote an extremely accessible book on Compiler Construction, using exactly the hand written recursive descent parsing approach discussed by OP.
The initial edition was published in 1976, in German, but the latest version is available online:
https://people.inf.ethz.ch/wirth/CompilerConstruction/CompilerConstruction1.pdf https://people.inf.ethz.ch/wirth/CompilerConstruction/Compil...
There are also parser generators like ANTLR (https://en.wikipedia.org/wiki/ANTLR https://en.wikipedia.org/wiki/ANTLR) which take an input not unlike yacc, but generate a LL parser using explicit code, rather than the table driven LALR parsing of yacc.
- fuzztester 10mo agoThank you. Just to confirm, by "accessible", do you mean easy to understand? Anyway, I think I had come across that book on the net, but did not check it out at the time. I don't remember the exact reason, maybe it was because I didn't want to go into the subject of compilers at the time, and was only interested in interpreters, because I prefer to take things one step at a time. Now I will check it out.
- microtherion 10mo agoYes, accessible in the sense of being readable without extensive prior knowledge. If I recall correctly, I read the initial edition while still in high school.
- fuzztester 10mo agoGot it, thanks.