 The program fragment depends on a global variable, "sym", which contains the current symbol from the input, and the function "nextsym", which updates "sym" when called.The implementations of the functions "nextsym" and "error" are omitted for simplicity.typedef enum {ident, number, lparen, rparen, times, slash, plus,

Symbol sym;
void nextsym(void);
void error(const char msg[]);

int accept(Symbol s) {

int expect(Symbol s) {

void factor(void) {

void term(void) {

void expression(void) {

void condition(void) {

void statement(void) {

void block(void) {

void program(void) {

Some recursive descent parser generators