This document discusses SLR and LR parsing. It states that SLR parsing is simpler than LR parsing as it uses fewer states. The main difference between SLR and LR parsing is that SLR parsing allows 'shift reduce' conflicts during parsing. The document then provides steps for constructing an SLR parsing table, including writing a grammar, collecting LR(0) items, finding follow sets, and defining GOTO and ACTION functions. An example is given to illustrate the steps. Finally, it defines that LR parsing is an efficient bottom-up parsing technique that can parse languages defined by context-free grammars using leftmost derivation in reverse with lookahead.
2. SLR PARSER:
The SLR parser is simple to LR.
Its the smaller class of grammer
having few number of states.
SLR is very easy to construct and is
similar to LR parser .
3. The only difference between SLR parser
and LR parser is that in LR parsering table .
There is a change of 'SHIFT REDUCED
conflict because we are entering reduced
corresponding to all terminal states.
TYPES OF LR PARSERING METHODS:
1.SLR
2.CLR
3.LALR
4. STEPS FOR CONSTRUCTING SLR PARSERING
TABLE:
1.writing arguments grammer.
2.LR(O) collection of items to be found.
3.Find FOLLOW of LHS of production.
4.Defining 2 function:
GOTO( list of terminal)
ACTION(list of non terminal)
9. LR PARSER:
Its an efficient bottom up syntax analysis
techniques that can be used to parser language
classes of context free grammar is called LR(O)
parsing.
L stands for left to right scanning R stands for
rightmost derivation in reverse.
O stands for no of input symbols of looahead.