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

CD Questions (1)

The document outlines an examination for the subject CS3501-Compiler Design at Apollo Engineering College, detailing the structure of the exam including three parts: Part A with five short answer questions, Part B with one extended discussion question, and Part C with two sets of complex problems. Topics covered include compiler definitions, phases of compilation, lexical analysis, regular expressions, and parsing techniques. The exam is designed for third-year computer science students and is worth a total of 50 marks.

Uploaded by

Robert Harris
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views

CD Questions (1)

The document outlines an examination for the subject CS3501-Compiler Design at Apollo Engineering College, detailing the structure of the exam including three parts: Part A with five short answer questions, Part B with one extended discussion question, and Part C with two sets of complex problems. Topics covered include compiler definitions, phases of compilation, lexical analysis, regular expressions, and parsing techniques. The exam is designed for third-year computer science students and is worth a total of 50 marks.

Uploaded by

Robert Harris
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

APOLLO ENGINEERING COLLEGE

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING


CIA-IMARKS: 50
SUBJECT: CS3501-COMPILER DESIGN TIME: 1.30 HRS
YEAR/SEM: III / V DATE: / /2023

PART-A (Answer all question ) 5*2=10

1.Define Compiler
2. What are the two parts of compilation?Explain.
3 Do LeftRecursion for the given grammar AAC|Aad|bd|c
4.Draw a transition diagram to represent relational operator.
5. Explain the Role of Parser.

PART-B 1*8=8
6.Discuss the various phases of compiler with suitable example, a=b+c*60

PART-C 2*16=32

7)a).(i)Explain the role of Lexical analyzer,write a functions of it. (6)


(ii)Explain the terms Tokens,Patterns, and Lexemes with example (5)
(iii)Explain the input buffering techniques in detail (5)
or
b)(i)Convert the regular expression to FA using Direct method 0*1+10,a*b(a+b)* (4)
(ii)Convert the regular expression to FA using Thompson method( a+b)*b, (0+1)*01 (4)
(iii)Convert the NFA with epsilon to without epsilon NFA (8)

8)a)i) Convert the NFA to DFA (8)


ii.Minimizing the DFA with Table filling method (8)
or
b)i).Construct the Predictive Parser for the grammer,S->(L)|a,L->L,S|S (8)
(ii).Find FIRST and FOLLOW function for S->ABCDE,A->a| (4)
(iii) Do LeftFeactoring for the given grammar A->aAB|aA|a,B->bB|b (4)

APOLLO ENGINEERING COLLEGE


DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING
CIA-IMARKS: 50
SUBJECT: CS3501-COMPILER DESIGN TIME: 1.30 HRS
YEAR/SEM: III / V DATE: / /2023

PART-A (Answer all question ) 5*2=10

1.Define Compiler
2. What are the two parts of compilation?Explain.
3 Do LeftRecursion for the given grammar AAC|Aad|bd|c
4.Draw a transition diagram to represent relational operator.
5. Explain the Role of Parser.

PART-B 1*8=8
6.Discuss the various phases of compiler with suitable example, a=b+c*60

PART-C 2*16=32

7)a).(i)Explain the role of Lexical analyzer,write a functions of it. (6)


(ii)Explain the terms Tokens,Patterns, and Lexemes with example (5)
(iii)Explain the input buffering techniques in detail (5)
or
b)(i)Convert the regular expression to FA using Direct method 0*1+10,a*b(a+b)* (4)
(ii)Convert the regular expression to FA using Thompson method( a+b)*b, (0+1)*01 (4)
(iii)Convert the NFA with epsilon to without epsilon NFA (8)

8)a)i) Convert the NFA to DFA (8)


ii.Minimizing the DFA with Table filling method (8)
or
b)i).Construct the Predictive Parser for the grammer,S->(L)|a,L->L,S|S (8)
(ii).Find FIRST and FOLLOW function for S->ABCDE,A->a| (4)
(iii) Do LeftFeactoring for the given grammar A->aAB|aA|a,B->bB|b (4)

----------------------------------------------------------------------------------------------------------------

You might also like