edited by
954 views
3 votes
3 votes

Fill in the blanks

Consider the $SDTS$ below

$E1\rightarrow E \ out (*2)$

$E \rightarrow +T \ out('1')$

$E \rightarrow T \ out (10^*)$

$E \rightarrow T*F \ out ( ' * ' )$

$T \rightarrow F \ out ('100+')$

$F \rightarrow num \ out (num \ val)$

The input is $1+1*1$ and the output generated is evaluated as an arithmetic expression . The value obtained is _____________.

Ans =2200

  correct ans 2212


I am not getting the answer, plz help. [SDT tracing by default is left-recursive, right??]

edited by

1 Answer

3 votes
3 votes

Got 1100+10*1100+1*1*2

which is equal to 12102 and is the correct answer.

Related questions