Consider the canonical $L R(0)$ parsing of the grammar below using terminals $\{a, b, c\}$ and non-terminals $\{A, B, C, S\}$ with $S$ as the start symbol.
$$ \begin{aligned} & S \rightarrow A C B \\ & A \rightarrow \alpha A \mid \in \\ & C \rightarrow c C \mid \in \\ & B \rightarrow b B \mid b \end{aligned} $$
Which one of the following options gives the number of shift-reduce conflicts that will occur in the $L R(0)$ ACTION table?
Given a Context-Free Grammar G as follows :
$S \rightarrow A a|b a c| d c \mid b d a$
$A \rightarrow d$
Which ONE of the following statements is TRUE?
Consider two grammars $G_1$ and $G_2$ with the production rules given below:
$G_1: S \rightarrow$ if $E$ then $S \mid$ if $E$ then $S$ else $S \mid a$
$$\mathrm{E} \rightarrow \mathrm{~b}$$
$G_2: S \rightarrow$ if $E$ then $S \mid M$
$E \rightarrow$ if $E$ then $M$ else $S \mid c$
$$\mathrm{E} \rightarrow \mathrm{~b}$$
where if, then, else, $a, b, c$ are the terminals.
Which of the following option(s) is/are CORRECT?
Which of the following statement(s) is/are TRUE while computing First and Follow during top down parsing by a compiler?
GATE CSE Subjects
Browse all chapters by subject