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

Be Computer Engineering Semester 6 2023 May System Programming Compiler Constructionrev 2019 C Scheme

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)
42 views

Be Computer Engineering Semester 6 2023 May System Programming Compiler Constructionrev 2019 C Scheme

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/ 1

2

92
4

B
A1
DE

CB
Paper / Subject Code: 89281 / System Programming & Compiler Construction

8B
10
4A
C4

12
0

92

BB
DE

CB
DA

AA

10

28
C4

12
0
77

B4
DE

09
DA

A
0A

21
A
C4

E0
77

4
DA

A1
B
DA

D
0A

0C
(3 Hours) Total Marks: 80

4A
B6

C4
77
DA

1
E
EF

CB
DA

AA
4D
0A
N.B: (1) Question No. 1 is compulsory.

B6
B7

E0
77

AC

B4
DA
(2) Attempt any three questions out of the remaining five questions.

EF
8B

D
0A

0C
D
(3) Make suitable assumptions wherever necessary.

B6

C4
B7
92

77
DA

DE
=====================================================================

EF

DA
8B
10

0A
B6

C4
B7
2

92

77
DA
A1
What is three-address code? Generate three-address code for –

E
Q.1. A. 5

EF

A
8B
10

4D
0A

7D
4A

B6
B7
2

92

AC
DA
A1

A7
CB

EF
8B
10

7D
4A

B6

A0
B7
2
0

92
A1
DE

A7
CB

EF
8B

6D
10
4A
C4

A0
B7
2
0

92

FB
A1
DE

7
CB
DA

8B

D
10

0A
7E
B. Compare between Compiler and Interpreter. 5

4A

B6
C4

2
0

92
7

DA
BB
A1
DE
A7

C. Explain absolute loader. State its advantages and disadvantages. 5

CB

EF
DA

10
4A
Discuss with example ‘forward reference’.

B6
C4

D.
A0

B7
2
0

92
7

A1
DE
A7

CB

EF
DA
6D

8B
10
Q.2. A. Construct SLR parser for the following grammar and parse the input 10

4A
C4
A0

B7
2
0

2
FB

“( )( )”: S → (S)S | .

A1
DE

09
A7

CB
DA
6D

8B
7E

21
4A
B. State and explain with examples, different types of statements used in 10
C4
A0

92
FB

7
BB

A1
DE
A7

CB
assemblers with respect to system programming.
DA
6D

10
7E
28

4A
C4
A0

12
0
FB

7
BB

DE
09

A. Explain the concept of basic blocks and flow graph with example the 10
A7

CB
DA

AA
6D

Q.3.
7E
21

28

three-address code. C4
A0

0
FB

77

B4
BB
1

DE
09

B. Explain with help of a flowchart, the first pass of two-pass macro


DA

10
AA

6D

0A
7E

0C
21

28

processor. C4
FB

77
B4

DA
BB
1

DE
09

DA
AA

0A
7E
0C

21

Q.4. A. Explain the phases of a compiler. Discuss the action taken in various 10
28

B6

C4
77
B4

DA
BB
A1
DE

09

phases to compile the statement:


EF

DA
0A
0C

21
4A

28

B6
C4

a=b*c+10, where, a, b, c are of type real.


B7

77
DA
1
DE

09
CB

EF
A

AA

B. Write short note on: 10


8B

0A
21
7D

B6
C4

B7
E0

(i) Syntax-directed Translation, (ii) Macro facilities


92
B4

DA
1
A7

EF
A

AA

8B
10
4D

C
7D

Q.5. A. What is code optimization? Explain with example, the following code 10
B6
A0

B7
12
E0

92
AC

B4
A7

optimization techniques:
EF
AA

8B
10
4D

C
7D
A0

(i) Common sub-expression elimination (ii) Code motion


B7
12
E0

92
AC

4
A7

CB

AA
6D

8B

(iii) Dead code elimination (iv)Constant propagation


10
4D
7D
A0

12
E0

92
FB

B. Explain Direct Linking Loader in suitable example. 10


AC

4
A7

CB

AA
6D

10
D
E

7D

Q.6. A. Test whether following grammar is LL(1) or not. If it is LL(1), construct 10


C4
A0
B7

12
E0
B

4
A7
EF

CB

parsing table for the same:


A

AA
6D

D
7D

C4
A0
7

E0

S1AB|
B

B4
BB

A7
EF

A
6D

A1AC|0C
C
7D
28

C4
A0
B7

E0
B

B0S
09

A7
EF

A
8B

6D

4D
21

7D

C1
A0
7
92

FB

AC
BB

A7

B. Draw and explain the flowchart of Pass-I of two pass assembler with 10
6D
10

7D
28

A0
B7

suitable example.
12

FB
09

A7
AA

8B

6D

____________________
E
21

A0
B7
92

FB
B4

A1

8B

6D
10

7E
0C

4A

12

92

B
BB
CB

EF
AA

10

28

B7
12
E0

B4

09
AA

8B
4D

0C

21

27651 Page 1 of 1
92
AC

B4

A1
DE

10
0C
7D

4A
C4

12
DE

CB
DA

AA
C4

E0

DA0A77DAC4DE0CB4AA1210928BB7EFB6
77

B4

You might also like