News for hackers. Stuff that matters.
Re:Ask HN: How did you learn parsing? by smitchell2 on Wednesday April 17, 2019 @01:43PM (#19684721)
I would suggest Recursive Descent for general parsing, and Precedence Climbing for expressions.

Once you get the hang of Recursive Descent, parsing becomes mechanical. And with Precedence Climbing for expressions, you just plug in the appropriate operator priorities.

Some of the literature below refers to "parsing" as "syntax analysis".

See this introductory set of articles:

https://www.semware.com/html/compiler.html

Then see this (small, 160 page) book from Wirth:

http://www.ethoberon.ethz.ch/WirthPubl/CBEAll.pdf

See examples here - especially the C and Python examples: (lexical analysis examples included, since it must feed the parser)

http://rosettacode.org/wiki/Compiler/lexical_analyzer

http://rosettacode.org/wiki/Compiler/syntax_analyzer

There are no comments on this comment yet.