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

CAT-1_QB_191CSC603T_COMPILER_DESIGN

The document outlines the course structure for Compiler Design (191CSC603T) for the academic year 2024-2025, detailing course outcomes and topics covered. It includes various units such as Introduction to Compilers, Syntax Analysis, and Intermediate Code Generation, along with specific questions categorized by Bloom's taxonomy levels. The course aims to equip students with skills in compiler phases, lexical analysis, parsing algorithms, and code optimization techniques.

Uploaded by

surya.s2710153
Copyright
© © All Rights Reserved
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% found this document useful (0 votes)
3 views

CAT-1_QB_191CSC603T_COMPILER_DESIGN

The document outlines the course structure for Compiler Design (191CSC603T) for the academic year 2024-2025, detailing course outcomes and topics covered. It includes various units such as Introduction to Compilers, Syntax Analysis, and Intermediate Code Generation, along with specific questions categorized by Bloom's taxonomy levels. The course aims to equip students with skills in compiler phases, lexical analysis, parsing algorithms, and code optimization techniques.

Uploaded by

surya.s2710153
Copyright
© © All Rights Reserved
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/ 5

COMMON TO CSE AND CSE (CS)

COURSE CODE / TITLE : 191CSC603T - COMPILER DESIGN


ACADEMIC YEAR :2024-2025 (EVEN SEM)
COURSE OUTCOMES:
At the end of the course, the student should be able to:
CO1 Understand the different phases of compiler.
CO2 Design a lexical analyzer for a sample language.
CO3 Apply different parsing algorithms to develop the parsers for a given grammar.
CO1 Understand syntax-directed translation and run-time environment.
CO2 Learn to implement code optimization techniques and a simple code generator.
CO3 Design and implement a scanner and a parser using LEX and YACC tools.

UNIT I INTRODUCTION TO COMPILERS


Bloom’s
Q.No Questions CO’s
Level
PART A
1. What is a compiler? CO1 K1
2. Point out why is buffering used in lexical analysis? CO1 K1
3. Illustrate diagrammatically how a language is processed. CO1 K2
4. List out the issues in a lexical analyzer. CO1 K1
5. Find the differentiate between tokens, patterns, lexeme. CO1 K3
6. List the operations on languages. CO1 K1
7. Perform regular expression for an identifier and number. CO1 K3
Show the various notational shorthands for representing regular CO1
8. K3
expressions.
Perform the Regular expression for the language L= {w ε{a,b}/w CO1
9. K3
ends in abb}
Examine the variouos advantage of having sentinels at the end of CO1
10. K3
each buffer halves in buffer pairs.
11. What are the various parts in LEX program? CO1 K1
12. Define Lexeme. CO1 K1
Write a regular expression to describe a language consist of strings CO1
13. K1
made of even numbers a and b.
14. Differentiate NFA and DFA. CO1 K2
15. Draw a transition diagram to represent relational operators. CO1 K1

Bloom’s
Q.No Questions CO’s
Level
PART-B
Illustrate the various phases of compiler and trace it with the
1. CO1 K4
program segment (position: =initial rate*60)
2. Summarize the concept of token specification. CO1 K5
i) Outline how input buffering can be explained with an example.
3. CO1 K4
ii) Assess the process of token recognition.
Analyze the role of Lexical Analyzer in detail with necessary
4. CO1 K4
examples.
Summarize in detail about how the tokens are specified by the
5. CO1 K5
compiler with suitable example.
Construct the minimized DFA for the following expression.
6. CO1 K5
(a | b)* abb.

Infer how to convert the given NFA to a DFA.

7. CO1 K4

Infer how Convert the following Non-Deterministic Finite Automata


(NFA) to Deterministic Finite Automata (DFA)

8. CO1 K4

Bloom’s
Q.No Questions CO’s
Level
PART C
Create a Deterministic Finite Automata for the given regular
1. CO1 K6
expression. (0+1)* 01
Build an NFA from a regular expression using Thompson's
construction.
2. CO1 K6
i)(a/b)* abb (a/b)*.
ii)ab*/ab
UNIT II : SYNTAX ANALYSIS
Q.N Bloom’s
Questions CO’s
o Level
PART A
1. Define a context free grammar. CO2 K1
2. Write the basic issues in parsing. CO2 K1
3. Explain ambiguous grammar. CO2 K2
4. Write the algorithm for FIRST and FOLLOW. CO2 K1
Apply Elimination of left recursion from the following grammar. A-
5. CO2 K3
>Ac/Aad/bd
6. Show the parse tree for the given expression -(id + id ) CO2 K3
7. Draw syntax tree for the expression a=b*-c+b*-c. CO2 K1
Let Σ={ a, b}
Write down the language generated by the following
i) a/b
8. CO2 K1
ii) a*
iii) (a/b)*
iv) (a/b)(a/b)
9. What is meant by handle pruning? CO2 K1
Derive the string and construct a syntax tree for the input string
ceaedae using the grammar
10. S->SaA|A, CO2 K3
A->AbB|B,
B- >cSd|e
Compute FIRST for all the non-terminals for the following grammar.
11. S→ (L) | a CO2 K3
L→ L, S | S
12. Draw the transition diagram for identifier and keyword CO2 K1
Apply Elimination of left recursion for the following grammar
E-->E+T/T
13. CO2 K2
T-->T*F/F
F-->(E)/id
14. What do you mean by a syntax tree? CO2 K1
15. Write the rules to construct the SLR parsing table. CO2 K1

Q.N Bloom’s
Questions CO’s
o Level
PART B
Check whether the following grammar can be implemented using
predictive parser. Check whether the string “abfg” is accepted or not
using predictive parsing.
1. A→A CO2 K4
A→aB|Ad
B→bBC|f
C→g
Construct LR (0) parsing table for the grammar. Also assess whether
the input string “aabb” is accepted or not.
2. CO2 K5
S→AA
A→aA|b
Analyze and evaluate the leftmost derivation, rightmost derivation, and
derivation tree for the string "aaabbabbba" with respect to the given
grammar.
3. CO2 K4
S→aB | bA
A→aS| bAA|a
B→bS | aBB | b
Analyze and evaluate the predictive parsing table for the grammar:
S → (L) | a
4. CO2 K4
L → L, S | S
Then, determine if the string "(a, (a, (a, a)))" will be accepted.
Consider the following grammar
E→E+E
5. E→E*E CO2 K4
E→id
Perform shift reducing parser for the input string “id1+id2*id3”
Construct stack implementation of shift reduce parsing for the
grammar
E->E+S
6. CO2 K5
E->E*E
E->( E )
E->id and the input string id1+id2*id3
Construct LR(0) items for this following grammar and draw the
transition Representing transition among CLR items
7 S→CC CO2 K4
C→cC
C→d
Generate SLR Parsing table for the following grammar.
S->As|bAc|Bc|bBa
8 CO2 K4
A-> d
B->d

Q.N Bloom’s
Questions CO’s
o Level
PART- C
Create a Parsing table for the grammar and find states made by
predictive parser on input “id + id * id” and find FIRST and
FOLLOW.
1. E -> E + T | T CO2 K6
T -> T * F | F
F -> (E)
F-> id
Compose the analysis to determine if the following grammar is LL(1):
S → iEtS | iEtSeS | a
2. CO2 K6
E→b
Additionally, formulate the FIRST and FOLLOW procedures.

UNIT III : INTERMEDIATE CODE GENERATION


Q.N Bloom’s
Questions CO’s
o Level
PART A
1. Write SDT for Arithmetic and Boolean expressions CO3 K1
2. Draw the syntax tree for the assignment statement a := b * -c + b * -c CO3 K1
3. What do you mean by syntax directed translation scheme? CO3 K1
4. Compare syntax tree and parse tree. CO3 K2
5. List three kinds of intermediate representation. CO3 K1
6. Design a parse tree for -(id+id) CO3 K3
7. Illustrate Annotated parse tree? CO3 K3
Examine the differencebetween synthesized attributes and inherited
8. CO3 K3
attributes.
Q.N Bloom’s
Questions CO’s
o Level
PART – B
1. Classify the types of Syntax Directed Definitions. CO3 K4
2. Illustrate Synthesized attributes and inherited attributes. CO3 K4
Produce quadruple, triples and indirect triples for following
3. CO3 K5
expression: (x + y) * (y + z) + (x + y + z)
4. Critique the different types of intermediate code representations. CO3 K5

Q.N CO’s Bloom’s


Questions
o Level
PART C
Evaluate the representation of Three Address Codes with suitable
1. CO3 K6
examples.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy