Análise Descendente Recursiva
Implementação)
(
.
..
*
/
<
expr> -> <termo> + <termo>
| <termo> - <termo>
*
/
int expr(FILE *code_file, int next_token, NextChar *next_char)
{
printf("Enter <expr>\n");
next_token = termo(code_file, next_token, next_char);
while (next_token == ADD_OP || next_token == SUB_OP)
{
next_token = lex(code_file, next_char);
next_token = termo(code_file, next_token, next_char);
}
printf("Exit <expr>\n");
return next_token;
}
.
..