Bottom-Up Parsing/Example 2: SLR(1): Difference between revisions

From Wiki**3

< Bottom-Up Parsing
No edit summary
Line 15: Line 15:
== Solution ==
== Solution ==


[[category:Teaching]]
[[category:Compiladores]]
[[category:Compilers]]
[[category:Ensino]]

Revision as of 14:27, 6 April 2015

Problem

S -> 1 S 1 | 1 X 0 | 2
X -> 2 | S 1 | X 2

Initial symbol: S

Terminals: { 0, 1, 2 }

Input: 112110

Is this an LR(0) grammar?

Solution