The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
+1 vote
60 views

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.

 

asked in Compiler Design by Boss (24.9k points) | 60 views

Please log in or register to answer this question.

Related questions

+2 votes
1 answer
1
asked Nov 12, 2016 in Compiler Design by KISHALAY DAS Loyal (6.6k points) | 1.1k views
+2 votes
1 answer
3
asked Dec 2, 2015 in Compiler Design by yes Active (1.8k points) | 825 views
+2 votes
1 answer
4
asked Jul 18, 2015 in Compiler Design by Suvam Chatterjee Junior (523 points) | 809 views
Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
48,756 questions
52,850 answers
183,548 comments
68,742 users