for left associative operator grammar will change to Left Recursive ,right associative operator grammar will change to right recursive..
In this lecture i discussed Ambiguous Grammar,Unambiguous Grammar ,
How to convert Ambiguous to Unambiguous grammar with example
discussed following questions.
Find associativity & operator precedence of all the operator ?
S→S@W |W
W→W#Y|Y
Y→Y$A|A
A→B%A|A&B|id
GATE2000-21, ISRO2015-24:Given the following expression grammar:
E → E * F | F + E | F
F → F - F | id
which of the following is true?
(A) * has higher precedence than +
(B) – has higher precedence than *
(C) + and - have same precedence
(D) + has higher precedence than *
----------------------------------------------------
Subscribe my channel for more updates / monalisacs
----------------------------------------------------------
Join Telegram GATE CS study group: https://t.me/MonalisaCS
----------------------------------------------------------------
Compiler Design Lectures : • Ch 1.1:Language Processing System |CD...
----------------------------------------------------------------
Compiler Design PYQ : • Ch 1.1:Language Processing System |CD...
----------------------------------------------------------------------
Theory Of Computation Lectures • Video
-------------------------------------------------------------------
TOC GATE PYQ: • GATE CS 2010,Q39:Let L={w ∈ (0 + 1)* ...
-------------------------------------------------------------------
Data Structure Lecture: • Data Structure Syllabus for GATE
---------------------------------------------------------------------
Data Structure PYQ: • Data Structure Syllabus for GATE
-----------------------------------------------------------------------
#AmbiguousGrammar#GATECSE#CompilerDesign