Friday, October 4, 2013

Classification of parsing Techniques

There are two parsing techniques, these parsing techniques work on the following principle
1. The parser scans the input string from left to right and identifiers that the derivation is leftmost or rightmost.
2. The parser makes use of production rules for choosing the appropriate derivation. The different parsing techniques use different approaches in selecting the appropriate rules for derivation and finally a parse tree is constructed.
When the parse tree can be constructed from root and expanded to leaves, then such type of parse is called top-down parser. The name itself tells us that the parse tree can be built from top to bottom.

When the parse tree can be constructed from leaves to root, then such type of parse is called as bottom–up parse. Thus the parse tree is built in bottom up manner.


0 comments:

Post a Comment