Redirected
retagged by
1,229 views
0 votes
0 votes
Total number of Handles for $(w=aa)$ in the following grammar ?

$S\rightarrow DT$

$D\rightarrow aa$

$T\rightarrow \epsilon$
retagged by

5 Answers

1 votes
1 votes
Handle means rhs can be reduced to a matching LHS so in that case
D->DT
DT->aaT
aaT->aa€

 

SO 3 handles.
0 votes
0 votes

the handle always appears at the top of the stack just before it is identified as the handle. handle will always be reduced to the LHS part of a production. 

so answer is 3 handle or  1 handle. 

edited by
0 votes
0 votes

3 HANDLE

S--->DT            ( 1 handle)

D---->aa           (second handle)

T----->NULL       (third handle)

Related questions

0 votes
0 votes
1 answer
1
1 votes
1 votes
1 answer
2
Hira Thakur asked Nov 16, 2015
611 views
how to verify weather given grammer is ambigious or not???
1 votes
1 votes
1 answer
3
0 votes
0 votes
1 answer
4
Adiaspirant asked Jan 8, 2017
1,865 views
An unambiguous grammar has same leftmost and rightmost derivationPlease provide an example to show this.