387 views
1 votes
1 votes

I have one doubt regarding getting viable prefixes for a grammar.
 

Suppose I am given a grammar G which is told to be LR(0).I have observed, if I draw LR(0) DFA for it, and see if there is a path labeled $\gamma$ from initial state to some state of DFA, then $\gamma$ is a viable prefix.Is my understanding correct?

Sometimes, it is not told what the grammar is.?Like is it LR(0) or SLR(1) or LALR(1) or LR(1) or not LR(1).

Like below

https://gateoverflow.in/29094/find-viable-prefix

In such cases, how Do i start making DFA? Do i first check directly for LR(1)? 

I want a good process to give me viable prefix in a reasonable amount of time and accurate answer.

Pleas help.

 

Please log in or register to answer this question.

Related questions

2 votes
2 votes
1 answer
1
4 votes
4 votes
2 answers
2
4 votes
4 votes
2 answers
3
Suvam Chatterjee asked Sep 28, 2015
13,963 views
Can someone describe what is a viable prefix with an example?
4 votes
4 votes
3 answers
4