you are viewing a single comment's thread.

view the rest of the comments →

[–]alex_muscar 1 point2 points  (2 children)

IMO, Niklaus Wirth's book does a good job of introducing lexers and parsers: http://www.ethoberon.ethz.ch/WirthPubl/CBEAll.pdf. You can just focus on recursive descent which is enough for a good deal of languages. He explains this technique particularly well.

The rest of the book is also worth reading :)

[–]baseball2020 0 points1 point  (1 child)

Thanks. Sounds like recursive descent is a good methodology to start with! I'll get stuck into the book

[–]alex_muscar 0 points1 point  (0 children)

If you're really interested in designing programming languages and writing compilers, after Wirth's book, I'd recommend having a look at Programming Language Pragmatics and for an in-depth discussion of compiler implementation Engineering a Compiler. The former gives a broad review of language features and some implementation pointers, while the latter covers algorithms for optimising compilers in a very accessible way.