| |
| | [No title] |
 | | Canonical LR(1) parser: Parsing action Goto section cd(SCcdA0SSA1A2A3A1SSA4A5A6A2SSA7A2A3A3R,3R,3A4R,1(acc)A5SSA8A5A6A6R,3A7R,2R,2A8R,2 In constructing LALR parser, we merge tables with the same common cores. |
 | | A78 I: [C —> cC., cd(] LALR(1) parser: Parsing action Goto section cd(SCcdA0SSA1A25A36A1SSA4A25A36A25SSA78A25A36A36R,3R,3R,3A4R,1(acc)A78R,2R,2R,2 When presented with a string from the language c*dc*d, both the LR parser and the LALR parser make exactly the same sequence of shifts and reductions, although the names of the states on the stack may differ. |
 | | However, when presented with erroneous input, the LALR parser may proceed to do some reductions after the LR parser has declared an error, although the LALR parser will never shift another symbol after the LR parser declares an error. |
| www.csupomona.edu /~fcsang/www/cs440/LALR.doc (413 words) |
|