The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
0 votes
I am confused in the Concept of Handles in right sentential form and Viable Prefix. Can Please anybody explain these two concepts Briefly using Examples :)
asked in Compiler Design by Loyal (8.3k points) | 94 views

1 Answer

0 votes

A viable prefix of a sentential form φβt, where β denotes the handle, is any prefix of φβ. A viable prefix cannot contain symbols to the right of the handle.

(source: )


S → E#,

E → E + T | E − T | T,

T → id | (E)


S ⇒ E#E + T # ⇒ E + (E)# ⇒ E + (T)# ⇒ E + (id)#

(bold and underlined are the handles for that right sentential form)


all viable prefixes of the right sentential form E + (id)# :

E, E+, E + (, and E + (id

as ' id ' is the handle of this sentential form so we cant take any other symbol in its right( for viable prefix)



E + (id)# is a right sentential form

id is its handle and,

E, E+, E + (, and E + (id  are its Viable prefixes.

answered by (223 points)

Related questions

+2 votes
1 answer
asked Nov 12, 2016 in Compiler Design by KISHALAY DAS Loyal (6.6k points) | 1k views
+2 votes
1 answer
asked Dec 2, 2015 in Compiler Design by yes Active (1.8k points) | 808 views
+2 votes
1 answer
asked Jul 18, 2015 in Compiler Design by Suvam Chatterjee Junior (523 points) | 782 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

47,198 questions
51,428 answers
66,728 users