0% found this document useful (0 votes)
57 views

Assignment 1 Group2

The document outlines an assignment for a compiler design course. It provides short answer and essay questions about compiler concepts and phases, lexical analysis, parsing, grammars, and error handling. Students are asked to submit their responses online by September 10, 2020. The questions cover topics like the phases of a compiler, symbol tables, compiler tools, lexical analysis tokens vs patterns vs lexemes, regular expressions, context free grammars, parsing techniques, and ambiguous grammars.

Uploaded by

mick hanson
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
57 views

Assignment 1 Group2

The document outlines an assignment for a compiler design course. It provides short answer and essay questions about compiler concepts and phases, lexical analysis, parsing, grammars, and error handling. Students are asked to submit their responses online by September 10, 2020. The questions cover topics like the phases of a compiler, symbol tables, compiler tools, lexical analysis tokens vs patterns vs lexemes, regular expressions, context free grammars, parsing techniques, and ambiguous grammars.

Uploaded by

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

Unity University

Principles of Compiler Design


Assignment-1

The assignment will submitted online by the representatives of each section.


The submission deadline will be on September 10, 2020.

Part I – Give your short answer questions on the space provided.

1. Compiler translates the source code to __________________________________.



2. Compiler should report the presence of _______________ in the source program, in translation
process.

3. What is the output of lexical analyzer? Ans. _______________________________________.

4. Grammar of the programming is checked at _______________________________ phase of compiler.

5. _____________________________________ is a process of finding a parse tree for a string of
tokens.


6. Compiler can check ______________________________ error.

7. A grammar that produces more than one parse tree for some sentence is called as

______________________________.

8. Lexical analysis is about breaking a sequence of characters into ___________________________.

9. ___________________________ is considered as a sequence of characters in a token.



10. When expression result=3+2*8 is tokenized then identify the token category of each token in
expression?
Ans. _____________________________________________________________

1
Part II – Give brief answers for the following questions.

1. List the various phases of a compiler?

2. What is a Symbol Table?

3. Mention some of the cousins of a compiler.

4. List the phases that constitute the Front-end and Back-end Phases of a compiler.

5. List the various compiler construction tools.

6. Differentiate Tokens, Patterns, Lexeme.

7. List the operations on languages.

8. Write a Regular Expression for an Identifier.

9. Describe the languages denoted by the following regular expressions: a(a|b)*a

10. Mention the various notational short hands for representing Regular Expressions.

11. List the various Error Recovery strategies for a Lexical Analysis.

12. Define a Context Free Grammar.

13. Define Ambiguous Grammar.

14. What are the problems with Top-Down Parsing?

15. Given the grammar G:

G: S  aABf
A  bc|d
Be

Draw the parse tree for the input string adef using RDP.

You might also like