Sie sind auf Seite 1von 8

Code No: 16026/16026 NR Set No.

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]

2. Construct cannonical LR pars table for the following grammer.


S → L =R
S→L
L →∗ R
R→L [16]

3. Given the following source program


START 100
A DS 3
MOVER X,B
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]

4. (a) What are dataflow equations. [8]


(b) Explain how copy propagation can be done using dataflow equation. [8]

5. Explain in detail the various storage allocation strategies. [16]

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]

7. Write type expression for the following types

(a) An array of pointers to real, where the array


index ranges from 1 to 100. [5]
(b) A two dimensional array of integers ( i.e an array of arrays)
whose rows are indexed from 0 to 9 and whose columns
are indexed from 10 to 10. [5]
(c) Functions whose domains are functions from integers to pointers to integers
and whose ranges are records consisting of an integer and a character. [6]

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
?????

1. Write type expression for the following types

(a) An array of pointers to real, where the array


index ranges from 1 to 100. [5]
(b) A two dimensional array of integers ( i.e an array of arrays)
whose rows are indexed from 0 to 9 and whose columns
are indexed from 10 to 10. [5]
(c) Functions whose domains are functions from integers to pointers to integers
and whose ranges are records consisting of an integer and a character. [6]

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]

3. Given the following source program


START 100
A DS 3
MOVER X,B
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]

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]

6. (a) What are dataflow equations. [8]


(b) Explain how copy propagation can be done using dataflow equation. [8]

7. Construct cannonical LR pars table for the following grammer.


S → L =R
S→L
L →∗ R
R→L [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
?????

1. (a) What are dataflow equations. [8]


(b) Explain how copy propagation can be done using dataflow equation. [8]

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]

3. Write type expression for the following types

(a) An array of pointers to real, where the array


index ranges from 1 to 100. [5]
(b) A two dimensional array of integers ( i.e an array of arrays)
whose rows are indexed from 0 to 9 and whose columns
are indexed from 10 to 10. [5]
(c) Functions whose domains are functions from integers to pointers to integers
and whose ranges are records consisting of an integer and a character. [6]

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]

6. Construct cannonical LR pars table for the following grammer.


S → L =R
S→L
L →∗ R
R→L [16]

7. Given the following source program


START 100
A DS 3
MOVER X,B

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]

8. Explain in detail the various storage allocation strategies. [16]

?????

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
?????

1. Write type expression for the following types

(a) An array of pointers to real, where the array


index ranges from 1 to 100. [5]
(b) A two dimensional array of integers ( i.e an array of arrays)
whose rows are indexed from 0 to 9 and whose columns
are indexed from 10 to 10. [5]
(c) Functions whose domains are functions from integers to pointers to integers
and whose ranges are records consisting of an integer and a character. [6]

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]

3. (a) What are dataflow equations. [8]


(b) Explain how copy propagation can be done using dataflow equation. [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. Given the following source program


START 100
A DS 3
MOVER X,B
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.

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]

6. Explain in detail the various storage allocation strategies. [16]

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]

8. Construct cannonical LR pars table for the following grammer.


S → L =R
S→L
L →∗ R
R→L [16]

?????

Das könnte Ihnen auch gefallen