Bottom-Up Parsing/LALR(1) Example 1

From Wiki**3

< Bottom-Up Parsing
Revision as of 10:51, 5 May 2008 by Root (talk | contribs) (New page: Consider the following grammar. <text> A -> C x A | ϵ B -> x C y | x C C -> x B x | z </text> # Build the LALR(1) parser table. If conflicts exist, assume YACC's behavior. # Show the dif...)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Consider the following grammar. <text> A -> C x A | ϵ B -> x C y | x C C -> x B x | z </text>

  1. Build the LALR(1) parser table. If conflicts exist, assume YACC's behavior.
  2. Show the differences to LR(0) and SLR(1) parsers.
  3. Compact the parse table, eliminating and propagating reductins.
  4. Show the stack and input states, as well as the parser actions, for the sequence xxzxx.