The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
0 votes
526 views
SET OF VIABLE PREFIXES FOR A GIVEN SLR(1) GRAMMAR IS REGULAR LANGUAGE ?
asked in Compiler Design by Junior (649 points)
edited by | 526 views

2 Answers

0 votes

True I feel it set of viable prefixes of any grammar is regular   as we can create a NFA to recognize them

answered by Junior (751 points)
0
yes it is true but can you give me one example.
0

sorry i never did it.

but i had seen it is sum what similar to SLR parsing where we shift the "." from left to right on seeing apropriate symbol but here even ∊ moves are allowed. i got no idea of it 

 don't worry i am sure sirs and others gonna help you here . 

0

ANI do you know LIVE VARIABLE concept i mean to say is how to analysis variable is live or dead.

0

a variable x is said to be live if

there is any statement that uses value of x next to that statement  

or x is in RHS of any statement as a function or determinant .

if x is not refered in the next statement the liveness will be unaltered .

if betwn two statement S and S' x is not assinged the value assigned value  as any assingment would kill its present value

0 votes
Yes. From dragon book

"For every grammar G, the GOTO function of the canonical collection of sets of items defines a DFA that recognizes viable prefixes of G"
answered by (187 points)

Related questions



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

47,080 questions
51,333 answers
177,708 comments
66,675 users