🔍
Shift-Reduce parsers perform the following : (A) Shift step that advances in the input stream by K(K>1) symbols and Reduce step that applies a completed grammar rule to some recent parse trees, joining them together as one tree with a new root symbol. (B) Shift step that advances in the input stream by one symbol and Reduce step that applies a completed grammar rule to some recent parse trees, joining them together as one tree with a new root symbol. (C) Shift step that advances in the input stream by K(K = 2) symbols and Reduce step that applies a completed grammar rule to form a single tree. (D) Shift step that does not advance in the input stream and Reduce step that applies a completed grammar rule to form a single tree.
0 like 0 dislike

1 Answer

(B) Shift step that advances in the input stream by one symbol and Reduce step that applies a completed grammar rule to some recent parse trees, joining them together as one tree with a new root symbol.
0 like 0 dislike

Related questions

Given the following statements : S1 : SLR uses follow information to guide reductions. In case of LR and LALR parsers, the look-aheads are associated with the items and they make use of the left context available to ... (C) S1 is correct and S2 is not correct. (D) S1 is correct and S2 is correct.
Answer : (D) S1 is correct and S2 is correct....

View solution
0 like 0 dislike
1 answer

Which of the following is true ? (A) Canonical LR parser is LR (1) parser with single look ahead terminal (B) All LR(K) parsers with K > 1 can be transformed into LR(1) parsers. (C) Both (A) and (B) (D) None of the above
Answer : (C) Both (A) and (B)...

View solution
0 like 0 dislike
1 answer

Consider a discrete memoryless channel and assume that H(x) is the amount of information per symbol at the input of the channel; H(y) is the amount of information per symbol at the output of the channel; H(x|y) is the amount of uncertainty ... (H(x) - H(x|y))]  p(x) (D) max H(x|y)  p(x)
Answer : (D) max H(x|y)   p(x)...

View solution
0 like 0 dislike
1 answer

If all the production rules have single non - terminal symbol on the left side, the grammar defined is : (A) context free grammar (B) context sensitive grammar (C) unrestricted grammar (D) phrase grammar
Answer : (A) context free grammar...

View solution
0 like 0 dislike
1 answer

................ is used in game trees to reduce the number of branches of the search tree to be traversed without affecting the solution. (A) Best first search (B) Goal stack planning (C) Alpha-beta pruning procedure (D) Min-max search
Answer : (C) Alpha-beta pruning procedure...

View solution
0 like 0 dislike
1 answer

50.5k questions

47.1k answers

240 comments

7.0k users