retagged by
851 views
3 votes
3 votes
The maximum number of reduce moves that can be taken by a bottom-up parser with no epsilon and unit productions to parse a string of length 3 tokens is ____ ?
retagged by

3 Answers

1 votes
1 votes
if grammar is CNF then total reduce move are 2n-1. put n=3 here .

number of reduced move = 5
0 votes
0 votes

Answer : 2

Total n-1 reduce moves taken by a bottom-up parser if there is no epsilon or unit production.

Intutive explaination  :  We can reduce except the start production. So, removing 1 production(token). 

Related questions

5.6k
views
1 answers
0 votes
syncronizing asked Sep 21, 2018
5,589 views
Question:Find the number of tokens in the following C code using lexical analyzer of the compiler.
2.4k
views
2 answers
0 votes
saumya mishra asked Jun 12, 2018
2,442 views
In this question we will take n-=n1 as n=n-n1 as 5 tokens or n-=n1 as 4 tokens ????
412
views
1 answers
2 votes
mohitbawankar asked Jan 6, 2018
412 views
here i got 44(i count &x and *x as one one) tokens but nas is 53 doubt ----> in general we count1. *x is one token or two?2. &x is one token? ... tell me i m right or wrong .for this q i think & x are two tokens bcs there is space?
19.7k
views
3 answers
6 votes
shikharV asked Jan 19, 2016
19,673 views
Given solution:Please explain how the number of tokens are 11.