SLR(1) Parser

Creator
Creator
Seonglae ChoSeonglae Cho
Created
Created
2022 Oct 26 23:38
Editor
Edited
Edited
2022 Oct 26 23:41
Refs
Refs

Parsing driven by current state + next token

Builds DFA the same as LR(0)
But allows some “conflicts” that LR(0) cannot tolerate
Resolves the “conflicts” by lookahead one token
Conflicts may still exists
More powerful than LR(0)
A grammar is SLR(1) if and only if, for any state s, we have
 
 
 
 

Recommendations