Recursive Decent Parsing:Functions to parse the Toy Grammar I
This is the first of the four functions that parse the Toy Grammar. This first function handles the root non-terminal that is the root of the Parse Tree for this Grammar. All other productions reduce to this one.
error(Missing identifier);
scanner(); /* get the next lookahead token */
if( tokentype != EQUALS )
scanner(); /* get the next lookahead token */
expression(); /* non-terminal is function call */
if( tokentype != SEMICOLON )
scanner(); /* get the next lookahead token */