Recursive ascent parser: Difference between revisions

Content deleted Content added
DBSand (talk | contribs)
remove link to specific subheading in LR article
DBSand (talk | contribs)
No edit summary
Line 31:
;</pre>
 
This grammar is [[LR parsingparser|LR(0)]] in that it is left-recursive (in the '''expr''' non-terminal) but does not require any lookahead. Recursive ascent is also capable of handling grammars which are LALR(1) in much the same way that table-driven parsers handle such cases (by pre-computing conflict resolutions based on possible lookahead).
 
The following is a [[Scala (programming language)|Scala]] implementation of a recursive ascent parser based on the above grammar: