The Gateway to Computer Science Excellence
+2 votes
153 views
what is viable prefix in compiler??
in Compiler Design by Active (2k points) | 153 views

1 Answer

+2 votes

The set of prefixes of right sentential forms that can appear on the stack of a shift-reduce parser are called viable prefixes. An equivalent definition of a viable prefixis that it is a prefix of right sentential form that does not continue past the right end of the rightmost handle of that sentential form

Link: https://en.wikipedia.org/wiki/Viable_prefix

by Active (4.8k points)
0
Please give some example
0
+1

@Bikram sir confirm this,

right sentential form viable prefix
E e,E
E+T e,E,E+,E+T
E+F e,E,E+,E+F
E+id e,E,E+,E+id
T+id e,T
T*F+id e,T,T*,T*F
T*id+id e,T,T*,T*id
F*id+id e,F,
id*id+id e,id
0
correct, viable prefix also includes handles..
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
50,737 questions
57,322 answers
198,393 comments
105,142 users