Simple LR parser: Difference between revisions

Content deleted Content added
expanded example: explicitly showed follow set, explained which reduce actions may be removed
less -> fewer
Line 1:
{{context|date=December 2011}}
In [[computer science]], a '''simple LR''' or '''SLR parser''' is an [[LR parser]] which uses a follow set to remove conflicts from its action table. It has lessfewer conflict states than an LR(0) Parser, but will typically have more conflict states than an [[LALR parser]]. For real-world computer languages, an SLR parser is usually not adequate, but for student projects in a compiler class it is a good learning tool.
 
A grammar that has no conflicts reported by an SLR parser generator is an ''[[SLR grammar]]''.