retagged by
1,491 views
4 votes
4 votes

Which of the following statements on Viable Prefixes is incorrect?

  1. A viable prefix does not extend past the right end of the handle
  2. For any context-free grammar, the set of viable prefixes is a regular  language
  3. A viable prefix by default is a suffix of the handle
  4. As long as a parser has viable prefixes on the stack no parsing error has been detected
retagged by

1 Answer

5 votes
5 votes
As its name also suggests, a viable prefix is always a prefix to the handle. It can never be suffix to a handle because as soon as a handle appears on the top of the stack, there will be reduce action by the parser and handle will be reduced to the LHS side of the matching production.

So, (C) is the incorrect statement which is the correct option!
Answer:

Related questions

2 votes
2 votes
3 answers
1
3 votes
3 votes
1 answer
3
5 votes
5 votes
1 answer
4
Vijay Thakur asked Jan 13, 2017
1,237 views
Consider the following grammar:$S\rightarrow0S1 | 01$How many of the following are the viable prefixes of the grammar?i. 01 ii. 001iii. 00011iv. 00S1PS: given answers ...