Difference between revisions of "Bottom-Up Parsing/Example 3: SLR(1)"

From Wiki**3

< Bottom-Up Parsing
(Problem)
(Problem)
Line 4: Line 4:
 
  S -> x A y | x B y | x A z
 
  S -> x A y | x B y | x A z
 
  B -> k
 
  B -> k
  A w S | k
+
  A -> w S | k
  
 
Initial symbol: S
 
Initial symbol: S

Revision as of 17:18, 16 May 2011

Problem

S -> x A y | x B y | x A z
B -> k
A -> w S | k

Initial symbol: S

Terminals: { k, w, x, y, z }

Input: xwxkyy

Is this an SLR(1) grammar?

Solution