Professional Documents
Culture Documents
declare that by attempting the paper for the course ___Compiler Construction______, I will not
paper of Final Term Examination Spring 2021. I take full responsibility of my conduct. If I
Student Signature
Final Exam / Spring 2021 (Paper Duration 24 hours)
(Online Assignment Based Question Paper)
To be filled by Student
(PRACTICAL EXAMINATION)
Rules and regulations:
To be filled by Student
(PRACTICAL EXAMINATION)
Rules and regulations:
Answer:
Not possible.
2.
Answer:
Not possible.
3.
Grammer: First:
A→ BB | c | aa F(A)→ {a, b, e, c, c, a}
B→ Sd | e | ca F(B)→ {a, b, e, c}
Follow:
Fo(S)→ {d}
Fo(A)→ {a, b}
Fo(B)→ {a, b, e, c, c, a}
4.
a b c d e &
S→ ①⑤ ⑧ ②
≠ θ
A→ ①⑤ ⑧ ② ④⑧ ⑦
B→ ①⑤ ⑧ ② ④⑧ ⑦
If value of
table is equal
to θ then grammar is LL①.
5.
Table for checking:
a b c d e $
0 Accepted
1 S2 S2
2
3 S3 S3
4 R2 S4
5 R4
6 R5
7 S7
Here is point that the work going perfectly and the grammer SLR is SLR(1) because there is
no conflict.
6.
Reason 1:
To limit the number of passes, the compilers are divided down into steps. Check the
functionality of each phase at various levels in this way. For the correct tuning of a program
the compiler is needed and the phases are logical.
Reason 2:
We have broken down the compiler into phases to save time on the schedule. Phases are
grouped to limit the number of passes and hence save the program time during the
interpretation of the inputs.