0% found this document useful (0 votes)
34 views9 pages

Bcse307l Cat1 C1 2024 25

The document outlines the details for the CAT I exam for the Compiler Design course (BCSE307L) at the School of Computer Science and Engineering for the Fall Semester 2024-25. It includes information on class numbers, faculty names, exam duration, and maximum marks, along with a list of questions covering compiler phases, regular expressions, finite automata, grammar suitability for LL(1) parsing, and shift-reduce parsing. The exam is structured to assess students' understanding of key concepts in compiler design.
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)
34 views9 pages

Bcse307l Cat1 C1 2024 25

The document outlines the details for the CAT I exam for the Compiler Design course (BCSE307L) at the School of Computer Science and Engineering for the Fall Semester 2024-25. It includes information on class numbers, faculty names, exam duration, and maximum marks, along with a list of questions covering compiler phases, regular expressions, finite automata, grammar suitability for LL(1) parsing, and shift-reduce parsing. The exam is structured to assess students' understanding of key concepts in compiler design.
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

School of Computer Science and Engineering

Fall Semester 2024-25


CAT I
SLOT: C1
Programme Name & Branch: [Link]
Course Name & Code: BCSE307L – Compiler Design
Class Number (s): VL2024250101542, VL2024250101548, VL2024250101555,
VL2024250101587, VL2024250101605, VL2024250101612, VL2024250101623,
VL2024250101633, VL2024250101641, VL2024250101651, VL2024250101660,
VL2024250101669, VL2024250101673, VL2024250101676, VL2024250101684,
VL2024250101725, VL2024250101734, VL2024250101740, VL2024250101746,
VL2024250107999
Faculty Name (s): PROF. SAHAAYA ARUL MARY S A, PROF. KANNADASAN R,
PROF. VISHNUPRIYA, PROF. VETRISELVI T, PROF. BHUVANESWARI M, PROF.
KANAGARAJ R, PROF. KALAIVANI K, PROF. SATHYA K, PROF. BASKARAN P,
PROF. SABYASACHI KAMILA, PROF. UMA PRIYA D, PROF. MUKKU NISANTH
KARTHEEK, PROF. ARUMUGA ARUN R, PROF. ISLABUDEEN M, PROF.
SUGANTHINI C, PROF. NAGA PRIYADARSINI R, PROF. BHAWANA TYAGI,
PROF. DEBI PRASANNA ACHARJYA, PROF. BAIJU B V, PROF.
UMAMAHESWARI M
Exam Duration: 90 Min. Maximum Marks: 50

ANSWER ALL THE QUESTIONS


Q. Question Max
No. Marks
1. Show the output of each compiler phase for the following source 10
program. Assume c is an integer and d is a float type of variables. Use
BRGE (Branch greater than or equal to) and goto mnemonics
wherever it is required.
if(x>=y)
{
x = c *d ;
}

Page 1 of 2
2. Write the regular expression for C++ language identifier and convert 10
it into deterministic finite automata using direct method. Consider
C++ language identifier start with underscore ( _ ) or letter (L)
followed by zero or more occurrence of underscore ( _ ) or letter (L)
or digit (D).
3. a) Construct a finite automata for the given language L = {w ∈ (0+1)* 5+5
| w has no pair of consecutive zeros} and check the given strings
w1=1011010 and w2=111001 are accepted by the finite automata or
not.
b) Write regular definition for identifiers in C language. Assume a
valid identifier must follow the given below set of rules.
 An identifier can include letters (a-z or A-Z), and digits (0-9).
 An identifier cannot include special characters except the ‘_’
underscore.
 Spaces are not allowed while naming an identifier.
 An identifier can only begin with an underscore or letters.
4. Consider the given Grammar G = (V,T,P,S) where S→ACB|cbB|Ba, 10
A→da|BC, B→g|ε, C→h|ε are the production rules. Is the given
grammar is suitable for LL(1) parser construction? Justify your
answer with explanation. Construct LL(1) predictive parsing table for
the given grammar. Illustrate the LL(1) string parsing procedure for
the given string w=dag.
5. a) Consider the given Grammar G=(V,T,P,S) where S→aABb, 5+5
A→aAc|c|ε, B→d| ε are the production rules and a string w=aaccdb.
Show all possible handles and handle pruning process of shift reduce
parser.
b) Compare and contrast operator relation table and operator function
table with a suitable example.
**********

Page 2 of 2

You might also like