100% found this document useful (1 vote)
48 views

Final Review Paper Compiler Construction Spring 2020

The document provides a review for the final examination in Compiler Construction. It lists 10 topics to address in a report form, including questions about panic mode and phrase-level recovery, the phases of compiler construction using an example, computing FIRST and FOLLOWS sets for a grammar, constructing an LL(1) parse table, defining lexemes in an example, backtracking in parsing, differentiating top-down and bottom-up parsing, why shift-reduce is more general than other parsing methods, illustrating shift-reduce and reduce-reduce conflicts with an example, and verifying if a given grammar is LR(0), SLR(1), LALR(1), or CLR(1). Students are

Uploaded by

Faisal Shehzad
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
48 views

Final Review Paper Compiler Construction Spring 2020

The document provides a review for the final examination in Compiler Construction. It lists 10 topics to address in a report form, including questions about panic mode and phrase-level recovery, the phases of compiler construction using an example, computing FIRST and FOLLOWS sets for a grammar, constructing an LL(1) parse table, defining lexemes in an example, backtracking in parsing, differentiating top-down and bottom-up parsing, why shift-reduce is more general than other parsing methods, illustrating shift-reduce and reduce-reduce conflicts with an example, and verifying if a given grammar is LR(0), SLR(1), LALR(1), or CLR(1). Students are

Uploaded by

Faisal Shehzad
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Department of Computer Science

Final Examination Review Report

Compiler Construction Semester VI


Start Time : 14-07-2020 @ 11am Deadline : 14-07-2020 @ 05:00 PM

Write your answers in repot form to address following topics/questions?


1. At what stage of compilation panic mode and phrase level recovery is activated.
2. Select a suitable example and discuss all the phases of compiler construction
3. Use any CFG to explain how FIRST and FOLLOWS are computed.
4. Use your example and construct a parse table for LL(1) Parse using the grammar (part 3)
and First and Follows computed for the same grammar. Use any suitable example to
verify using your parse table
5. What is the significance of lexeme in compiler construction? Use following example and
divide the code into appropriate lexemes.
float getVal(int x){
return (x>10 ? 10 : x/2);
}
6. What is backtracking why it is not considered very fruitful?
7. Differentiate Top Down parsing and Bottom Up Parsing
8. In Bottom Up Parsing why shift reduce is considered more general than other parsing.
9. Illustrate the shift-reduce and reduce-reduce conflict with a suitable example.
10. Use the following example and verify that given grammar is LR(0), SLR(1), LALR(1) or
CLR(1). You need to show all steps in detail to support your answer.
E -> E + T | T
T -> TF | F
F -> F* | a | b
Show parse table of each of the Parser.

NOTE: Max file size is 5MB. Use Microsoft word. If you want to submit handwritten report then
make its pdf and then submit it. Only Microsoft word and pdf format is acceptable.

Best of Luck

You might also like