
"To provide readers with low-threshold access to the full field of parsing techniques, this book uses a two-tiered structure. The basic ideas behind the existing parsing techniques are explained in an intuitive and narrative style, starting from the first principles of data structures and algorithms; this provides breadth and accessibility. The hundreds of realizations and improvements of these basic ideas are explained in an extensive annotated bibliography, in a much terser, yet still informal, style; this provides depth. The reader should have an understanding of algorithmic thinking, especially recursion; however, knowledge of any particular programming language is not required."--Jacket.
Not exactly cheap, but pretty good.
There’s also https://www.amazon.com/Automata-Formal-Languages-Turing-Mach... which focuses more on the Chomsky hierarchy and automata, and doesn’t go into practical parsers and the related grammar types like the first book.
Nobody uses it, not even me... but damn was I happy when all the tests passed for the first time
- "Compilers: Principles, Techniques, and Tools" (v popular, generally referred to as the 'dragon book' on account of its cover): http://ce.sharif.edu/courses/94-95/1/ce414-2/resources/root/...
- "Parsing Techniques": https://staff.polito.it/silvano.rivoira/LingTrad/ParsingTech...
- Not quite about compilers, but the website 'Crafting Interpreters' touches on the pre-compilation parts of a compiler (scanning, lexing, parsing, optimisation): https://www.craftinginterpreters.com/
- If you're compiling a typed language, this blog post is a good intro to type inference algorithms, esp with a view to implementing a Hindley-Milner (bidirectional) type system: https://eli.thegreenplace.net/2018/type-inference/
I highly, highly recommend at least trying to write a compiler or interpreter. It's a fantastic way to understand more about PL theory, and improve your proficiency with data structures and algorithms.
As for functional programming, it's basically the art of removing the word 'self' from your programs.