Consider the following two sets:
Set X
P. Lexical Analyzer
Q. Syntax Analyzer
R. Intermediate Code Generator
S. Code Optimizer
Set Y
1. Abstract Syntax Tree
2. Token
3. Parse Tree
4. Constant Folding
Which one of the following options is the correct match from Set X to Set Y?
Which of the following statements is/are FALSE?
Consider the following context-free grammar where the start symbol is S and the set of terminals is {a,b,c,d}.
$ S \rightarrow AaAb \mid BbBa $
$ A \rightarrow cS \mid \epsilon $
$ B \rightarrow dS \mid \epsilon $
The following is a partially-filled LL(1) parsing table.
| a | b | c | d | $ | |
|---|---|---|---|---|---|
| S | S $\rightarrow$ AaAb | S $\rightarrow$ BbBa | (1) | (2) | |
| A | A $\rightarrow \epsilon$ | (3) | A $\rightarrow$ cS | ||
| B | (4) | B $\rightarrow \epsilon$ | B $\rightarrow$ dS |
Which one of the following options represents the CORRECT combination for the numbered cells in the parsing table?
Note: In the options, “blank” denotes that the corresponding cell is empty.
Consider the following expression: $x[i] = (p + r) * -s[i] + \frac{u}{w}$. The following sequence shows the list of triples representing the given expression, with entries missing for triples (1), (3), and (6).
| (0) | + | p | r |
| (1) | |||
| (2) | uminus | (1) | |
| (3) | |||
| (4) | / | u | w |
| (5) | + | (3) | (4) |
| (6) | |||
| (7) | = | (6) | (5) |
Which one of the following options fills in the missing entries CORRECTLY?
GATE CSE Papers
All year-wise previous year question papers