Arithmetic evaluation/C: Difference between revisions

no edit summary
m (Make it more explicit that G_STRING_ITERATOR needs to be reset with each top level usage of expression function)
No edit summary
 
Line 2:
 
This is a LL(1) recursive descent parser. Only performs integer division. There is a function for every non-terminal in the grammar, save add_op and mult_op, which were lumped into term_tail and factor_tail respectively.
<syntaxhighlight lang="c">
<lang c>#include <stdlib.h>
#include <stdio.h>
#include <ctype.h>
Line 235 ⟶ 236:
return 0;
}
</syntaxhighlight>
</lang>
404

edits