The document provides details of an assignment for a compiler design course, including 13 questions related to various phases of compilers such as lexical analysis, syntax analysis, parsing and grammar. The questions examine concepts like lexical analysis input buffering methods, constructing transition diagrams for tokens, generating LL(1) parsing tables, eliminating left recursion from grammars, left factoring grammars, shift-reduce parsing and constructing first and follow sets. Students are asked to analyze sample grammars and expressions to demonstrate their understanding of the compiler design principles and techniques.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
43 views
JSS Academy of Technical Education, Bangalore
The document provides details of an assignment for a compiler design course, including 13 questions related to various phases of compilers such as lexical analysis, syntax analysis, parsing and grammar. The questions examine concepts like lexical analysis input buffering methods, constructing transition diagrams for tokens, generating LL(1) parsing tables, eliminating left recursion from grammars, left factoring grammars, shift-reduce parsing and constructing first and follow sets. Students are asked to analyze sample grammars and expressions to demonstrate their understanding of the compiler design principles and techniques.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2
JSS Academy of Technical Education, Bangalore
Department of Computer Science & Engineering
System software and Complier Design [17CS63]
Faculty in charge : Mrs. K. S. Rajeshwari and Mrs. Shweta Kaddi
Branch : Computer Science and Engineering
Semester : VI 'B' and ‘C’
Assignment 1 Announcement date: 28-2-2020
Submission date : 13-3-2020
Course Outcomes (Cos):
COs Description RBT Levels
C312.3 Examine the role of lexical and syntax analyzer in compilers. L4
Sl.No. Quesions
1 With the help of diagram examine the various phases of compiler?
2 Examine the concept of input buffering in the lexical analysis? List the different methods of input buffering and explain any one of them. 3 Develop a lex program for tokens given below : LEXEMES TOKEN NAME ATTRIBUTE VALUE Any WS - - if if - then then - Else else - Any id id ptr to table entry Any number number ptr to table entry < reloop LT <= reloop LE = reloop EQ <> reloop NE > reloop GT >= reloop GE 4 Examine the regular definitions for unsigned numbers and draw the transition diagram same. 5 List and explain each phase of compiler and show the output of each phase for the expressions a := b+c*25 ? 6 Construct the transition diagram for recognizing relational operators. Sketch the program segment to implement it , showing the first state and one in final state? 7 Construct the transition diagram to recognize token of Identifiers. 8 Construct the LL(1) parsing table for following productions E->E+T|T; T->T*F|F; F->(E)|id 9 How left recursions can be eliminated from the grammars? Discover the simple arithmetic expression grammar and write down the grammar after removing left recursion? 10 Analyze the meaning of left factoring? Examine the following grammar after “left factored” S->iEts|iEtSeS|a E->b 11 Define left recursion grammar, eliminate left recursion from following grammar S->aB|ac|sd|se B->bBc|f C-> g 12 Discover the action of shift reduce parsers. Design shift reduce parser for following grammar on input 10201 S->0S0|1S1|2 13 Consider following grammar with terminals (,[,),]
(Ebook) Introduction to Compiler Construction in a Java World by Bill Campbell; Swami Iyer; Bahar Akbal-Delibas ISBN 9781439860885, 1439860882 instant download