LALR parsing attempts to find a happy medium.
, we will use the set of LR(1) items defined
by
{ [ N![]()
1 .
2 , x ] | for some
' in the LR(1) machine, [ N
![]()
1 .
2 , x ]
' &
= core(
' ) }
S id = A !
A ![]()
id = A | E E id
| ( id ! ) | ( A )
- 0
- 0
- 1
- 1
- 2
- 2
- 3
- 3
- 4
- 4, 15
- 5
- 5, 13
- 6
- 6, 12
- 7
- 7
- 8
- 8, 23
- 9
- 9, 18
- 10
- 10, 16
- 11
- 11, 17
- 12
- 14, 22
- 13
- 20, 21
- 14
- 24, 25
Note, there are no LALR(1) conflicts.