Beruflich Dokumente
Kultur Dokumente
2
III B.Tech II Semester Supplimentary Examinations,January 2010
LANGUAGE PROCESSORS
Common to Information Technology, Computer Science And Engineering
Time: 3 hours Max Marks: 80
Answer any FIVE Questions
All Questions carry equal marks
?????
1. (a) Explain the reasons for separating lexial analysis phase from syntax analysis.
[6]
(b) Eliminate ambiguities from the following grammar
S → iEtSeS|iEtS|a
E → b|c|d [10]
(a) Show the contents of the symbol table at the end of the PASS I [5]
(b) Explain the significance of EQU and ORIGIN statements in the program. [6]
(c) Show the intermediate code generated for the given program. [5]
6. (a) Give a translator grammar for converting boolean expression into three address
code. [8]
1
Code No: 16026/16026 NR Set No. 2
(b) Apply the translation scheme on the following expression a< b or c< d and
e< f. [8]
8. Explain with one example how LEX program perform lexical analysis for the follow-
ing patterns in C : identifier, comments, numerical constants, arithmetic operators.
[16]
?????
2
Code No: 16026/16026 NR Set No. 4
III B.Tech II Semester Supplimentary Examinations,January 2010
LANGUAGE PROCESSORS
Common to Information Technology, Computer Science And Engineering
Time: 3 hours Max Marks: 80
Answer any FIVE Questions
All Questions carry equal marks
?????
2. (a) Give a translator grammar for converting boolean expression into three address
code. [8]
(b) Apply the translation scheme on the following expression a< b or c< d and
e< f. [8]
(a) Show the contents of the symbol table at the end of the PASS I [5]
(b) Explain the significance of EQU and ORIGIN statements in the program. [6]
(c) Show the intermediate code generated for the given program. [5]
4. Explain with one example how LEX program perform lexical analysis for the follow-
ing patterns in C : identifier, comments, numerical constants, arithmetic operators.
[16]
3
Code No: 16026/16026 NR Set No. 4
5. Explain in detail the various storage allocation strategies. [16]
8. (a) Explain the reasons for separating lexial analysis phase from syntax analysis.
[6]
(b) Eliminate ambiguities from the following grammar
S → iEtSeS|iEtS|a
E → b|c|d [10]
?????
4
Code No: 16026/16026 NR Set No. 1
III B.Tech II Semester Supplimentary Examinations,January 2010
LANGUAGE PROCESSORS
Common to Information Technology, Computer Science And Engineering
Time: 3 hours Max Marks: 80
Answer any FIVE Questions
All Questions carry equal marks
?????
2. (a) Give a translator grammar for converting boolean expression into three address
code. [8]
(b) Apply the translation scheme on the following expression a< b or c< d and
e< f. [8]
4. Explain with one example how LEX program perform lexical analysis for the follow-
ing patterns in C : identifier, comments, numerical constants, arithmetic operators.
[16]
5. (a) Explain the reasons for separating lexial analysis phase from syntax analysis.
[6]
(b) Eliminate ambiguities from the following grammar
S → iEtSeS|iEtS|a
E → b|c|d [10]
5
Code No: 16026/16026 NR Set No. 1
ADD X,C
MOVEM X,D
D EQU A+1
L2 PRINT D
ORIGIN A1
C DC ‘5’
ORIGIN L2 + 1
STOP
B DC ‘19’
END.
(a) Show the contents of the symbol table at the end of the PASS I [5]
(b) Explain the significance of EQU and ORIGIN statements in the program. [6]
(c) Show the intermediate code generated for the given program. [5]
?????
6
Code No: 16026/16026 NR Set No. 3
III B.Tech II Semester Supplimentary Examinations,January 2010
LANGUAGE PROCESSORS
Common to Information Technology, Computer Science And Engineering
Time: 3 hours Max Marks: 80
Answer any FIVE Questions
All Questions carry equal marks
?????
2. (a) Explain the reasons for separating lexial analysis phase from syntax analysis.
[6]
(b) Eliminate ambiguities from the following grammar
S → iEtSeS|iEtS|a
E → b|c|d [10]
4. Explain with one example how LEX program perform lexical analysis for the follow-
ing patterns in C : identifier, comments, numerical constants, arithmetic operators.
[16]
7
Code No: 16026/16026 NR Set No. 3
(a) Show the contents of the symbol table at the end of the PASS I [5]
(b) Explain the significance of EQU and ORIGIN statements in the program. [6]
(c) Show the intermediate code generated for the given program. [5]
7. (a) Give a translator grammar for converting boolean expression into three address
code. [8]
(b) Apply the translation scheme on the following expression a< b or c< d and
e< f. [8]
?????