Ce diaporama a bien été signalé.
Le téléchargement de votre SlideShare est en cours. ×
Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Prochain SlideShare
CD
CD
Chargement dans…3
×

Consultez-les par la suite

1 sur 10 Publicité

Plus De Contenu Connexe

Publicité

Plus récents (20)

CD-1.pptx

  1. 1. NADAR SARASWATHI COLLEGE OF ARTS AND SCIENCE THENI SLR AND LR PARSER P.Anusuya Msc( cs)
  2. 2. SLR PARSER: •The SLR parser is simple to LR. •It’s the smaller class of grammer having few number of states. •SLR is very easy to construct and is similar to LR parser .
  3. 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. 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)
  5. 5. EXAMPLE STEP1: S—>AA A-aA/b S’-S(0th production) S-.AA(1st production) A-.aA(2nd production) A-.b(3rd production )
  6. 6. STEP2:
  7. 7. STEP3: Find follow of LHS of production FOLLOW (s)=Ş To find FOLLOW of non terminal.
  8. 8. STEP4: Definiting 2 function Goto, action.
  9. 9. LR PARSER: It’s 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.
  10. 10. THANK YOU

×