View more random threads:
- CS402 Theory of Automata Assignment no 3 spring May 2012
- CS606 Compiler Construction Assignment No.1 Solution Spring...
- PHY301 Circuit Theory Assignment No.1 Spring April 2012...
- CS403 Database Management System Assignment No. 3 spring...
- CS507 Information Systems Assignment No.3 Solution Spring...
- MTH603 Numerical Analysis Assignment 1 Idea Solution...
- CS602 Computer Graphics Assignment No.1 Solution Spring...
- CS506 Web Design and Development Assignment no 3 Solution...
- CS506 Web Design and Development Assignment N0 04 idea...
- CS506 Web Design and Development assignment no 1 spring...
Sponsored Links
Cs606 Compiler Construction Assignment No. 2 Fall Semester December 2012
Assignment No. 02
Semester Fall 2012
Compiler Construction CS606
Total Marks: 20
Due Date: 04-12-2012
Question No 1: Marks 10
Considering the following grammar, find the first sets for each non-terminal of the grammar.
S →aS | Ab
A →XYZ | ε
X →cX | ε
Y →dS | ε
Z →eS | ε
Question No 2: Marks 10
Prove that the following grammar is ambiguous because the sentence if ( id == id) then if ( id == id)
then id := id ; else id := id ;can be derived using two different parse trees.
S →id := id ;
S →if (E) then S
S →if (E) then S else S
E →id == id ;
There are currently 1 users browsing this thread. (0 members and 1 guests)