CSC365 Compiler Design and Construction
Compiler Design and Construction: most repeated questions
Questions that have come up in more than one paper, matched by what they ask rather than exact wording. Most repeated first.
- 6×Asked in 2081, 2080, 2076, 2075Construct the LL(1) parsing table for the following grammar. S → AS1 C A → 0 C → 2C εAnswer coming5
See the wording in each paper
- Construct the LL(1) parsing table for the following grammar. S → AS1 C A → 0 C → 2C εTU Board 2081 (new course)
- Create the LR(1) parsing table for following grammar. S → AA A → 0A A → εTU Board 2081 (new course)
- Give an example of reduce reduce conflict. Construct the SLR parsing table for the following grammar. E→ (L) a L → L, E ETU Board 2081
- Construct the LR(1) parsing table for the following grammar. S → AaAb A → BbBa A → ε B → εTU Board 2080
- Construct SLR parsing table for the following grammar. S aAa bAb baTU Board 2076
- Construct SLR parse table for the following grammar S→E E→E+T T T→T F F F→idTU Board 2075
- 3×Asked in 2081, 2080Compute the FIRST and FOLLOW of all the non terminals in following grammar. S → AB A → 0A' 1A' ε A' → SSA' ε B → AS 1Answer coming5
See the wording in each paper
- Compute the FIRST and FOLLOW of all the non terminals in following grammar. S → AB A → 0A' 1A' ε A' → SSA' ε B → AS 1TU Board 2081 (new course)
- Compute the FIRST and FOLLOW of the non terminals in the following grammar: S → (L) ∣ 1 L → LS ∣∗STU Board 2081
- Find the FIRST and FOLLOW of all the non terminals in following grammar. S → aAbCD ε A → SD ε C → Sa D → aBD εTU Board 2080
- 2×Asked in 2081Define core item. Compute the LR(1) item sets for the following grammar: S → AA A → aA ∣ bAnswer coming10
See the wording in each paper
- 2×Asked in 2076, 2075Define Syntax directed definition. Construct annotated parse tree for the input expression (5 3+2) 5 according to the following syntax directed definition. [figure in the original paper]Answer coming
See the wording in each paper
- Define Syntax directed definition. Construct annotated parse tree for the input expression (5 3+2) 5 according to the following syntax directed definition. [figure in the original paper]TU Board 2076
- Define Syntax directed definition. Construct annotated parse tree for the input expression (5 3+2) 5 according to the following syntax directed definition. [figure in the original paper]TU Board 2075
- 2×Asked in 2081Describe the synthesized attribute and inherited attribute with an example.Answer coming10
See the wording in each paper
- Describe the synthesized attribute and inherited attribute with an example.TU Board 2081
- Differentiate between synthesized and inherited attributes with example.TU Board 2081 (new course)
- 2×Asked in 2076, 2075Write Syntax Directed Definition to carry out type checking for the following expression. E id E1 op E2 E1 relop E2 E1[E2] E1 ↑Answer coming
See the wording in each paper
- Write Syntax Directed Definition to carry out type checking for the following expression. E id E1 op E2 E1 relop E2 E1[E2] E1 ↑TU Board 2076
- Differentiate between static and dynamic type checking. How can we carry out type checking for the following expression using syntax directed defination? S→ id = E S→ if E then S1 S→ while E do S1…TU Board 2075
- 2×Asked in 2076, 2075Discuss about the different factors affecting target code generation.Answer coming
See the wording in each paper
- 2×Asked in 2080, 2076Why code optimization is needed? Describe any two techniques for loop optimization.Answer coming5
See the wording in each paper