Question: please answer the question for b ) and c ) like the diagram provided for a ) 1 . ( AU ex . 1 1

please answer the question for b) and c) like the diagram provided for
a)
1.(AU ex.11.6.1) Recall the program in AU, fig. 11.27:
TREE B()
{
TREE firstB, secondB;
if(*nextTerminal =='('){/* follow production 2*/
nextTerminal++ ;
firstB = B() ;
if( firstB != FAILED && *nextTerminal ==')'){
nextTerminal++ ;
secondB = B() ;
if( secondB == FAILED )
return FAILED ;
else
return makeNode4(
'B',
makeNode0('('),
firstB,
makeNode0(')'),
secondB
);
}
else /* first call to B failed */
}
return FAILED ;
else /* follow production 1*/
return makeNode1('B', makeNode0('e')) ;
}
Show the sequence of calls made by the program of Fig. 11.27 on the inputs:
a.(())
b.(()())
c.())(
(Each string is followed by the endmarker symbol, ENDM)
 please answer the question for b) and c) like the diagram

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!