in Compiler Design edited by
270 views
4 votes
4 votes

Consider the following given grammar and the parse tree for the sentence $x + y * z.$

The first reduction made by the shift-reduce parser is labeled as 1, and we keep labeling in the same increasing order, such that the 8th (here, the last) reduction made by the parser is labeled as 8.

Which of the following statements is TRUE regarding the labeling of reductions?

  1. $E \rightarrow T$ will be labeled 5.
  2. $E \rightarrow T$ will be labeled 3.
  3. $T \rightarrow T^* P$ will be labeled 6.
  4. $T \rightarrow T^* P$ will be labeled 7.
in Compiler Design edited by
270 views

1 Answer

5 votes
5 votes

edited by
Answer:

Related questions