We will keep you updated from latest technical news.

What is Parser, Handle & Handle Truning in Compiler

Parser: A parser for a grammar G is a program that the input string w & produce as output either a parser tree for w, if w is a sentence of G or an error message indicating that w is not a sentence of G.

Types of Parser:
->Top-Down Parser
Recursive Descent
Predictive Parser
LL Parser

->Bottom-Up Parser
Shift Reduce
Operator Precedence

Representation:
->Explicit (By Link List)
->Implicit (Sequence of productions)

A derivation in which leftmost non-terminal is replaced at each step is said to be Left Most Derivation.


Right most derivation is sometimes called canonical derivation.


Handles: Information about which production have used at which is known as Handle.

Unambiguous: Every right sentential form of a grammar has exactly 1 grammar.

In Ambiguous grammar we can have multiple handles.

Handle Truning: A right most derivative in reverse often called a canonical reduction sequence is obtain by handle truning.
Share this article :
 

Post a Comment

 
Copyright © 2012. Tech Bombs