edited by
304 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.
edited by

1 Answer

Answer:

Related questions

4 votes
4 votes
0 answers
1