Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Look up keyword
Like this
1Activity
0 of .
Results for:
No results containing your search query
P. 1
Bottom Up Parsing

Bottom Up Parsing

Ratings: (0)|Views: 23 |Likes:
Published by Sunil Kumar
ABOUT BOTTOM PARSING TECHNIQUE
ABOUT BOTTOM PARSING TECHNIQUE

More info:

Published by: Sunil Kumar on Feb 21, 2013
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PPT, PDF, TXT or read online from Scribd
See more
See less

08/13/2013

pdf

text

original

 
CH4.1
Dewan Tanvir AhmedLecturer, CSEBUET
 
CH4.2
Parsing Techniques
Top-down parsers
(LL(1), recursive descent)
 
Start at the root of the parse tree from the start symbol and grow towardleaves (similar to a derivation)
Pick a production and try to match the input
Bad “pick”
may need to backtrack 
Some grammars are backtrack-free
(predictive parsing)
 
 Bottom-up parsers
(LR(1), operator precedence) 
Start at the leaves and grow toward root
We can think of the process as reducing the input string to the startsymbol
At each reduction step a particular substring matching the right-side of a production is replaced by the symbol on the left-side of the production
Bottom-up parsers handle a large class of grammars
 
CH4.3
lookaheadinput string
 A B
??
lookaheadstart symbolfringe of the parse tree
 A
?
lookaheadupper fringe of the parse treeleft-to-rightscan
Bottom-up Parsing
left-mostderivation
Top-down Parsing
 D D
right-mostderivationin reverse

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->