/* (C) Copyright 2008 Nick Mudge * This code can be freely copied and modified. */ #include #include /* Token Ids */ #define NUM 1 #define END_OF_TOKENS 126 #define ERROR_CHAR 127 typedef struct token { char id; int value; } Token; /* Lexical functions */ void peek(void); void next(void); static void memory_error(void) { printf("Ran out of memory.\n"); exit(1); }