Content deleted Content added
Magioladitis (talk | contribs) |
No edit summary |
||
Line 43:
The action and goto tables:
{|
|- align="center"
| || colspan="2" |''action''||''goto''
Line 59:
As can be observed there is a shift-reduce conflict for state 1 and terminal '1'. This occurs because, when the action table for an LR(0) parser is created, reduce actions are inserted on a per-row basis. However, by using a follow set, reduce actions can be added with finer granularity. The follow set for this grammar:
{|
|- align="center"
| symbol||S||E||1
Line 79:
By using mustBeAdded on each reduce action in the action table, the result is a conflict-free action table:
{|
|- align="center"
| || colspan="2" |''action''||''goto''
|