CFG_Lec1
CFG_Lec1
4+2*3
So Ambiguity is
A CFG is ambiguous if there is
some word it generates which
has two different parse trees
E is expression, T is term of
expression and F is factor of a term
Derivation of 4+2*3 using AE Productions
Derivation
E - Expression
T - Term
F - Factor
E is expression, T is term of
expression and F is factor of a term
Simple Example
Suppose CFG is
(1) S→S+S
(2) S→1
(3) S→a
Grammar
E - Expression
T - Term
F - Factor
E is expression, T is term of
expression and F is factor of a term
Parse Tree from given input string
Language Input String:
: