/* * These integer codes correspond to production rules in c-calctree.y * The numbers are almost arbitrary, except (a) we'd like to not overlap * with any terminal symbol codes, including ASCII codes, and (b) ideally * it would be trivial to tell from the code what non-terminal is involved. */ #define INPUT 1000 #define INPUT_R1 1001 #define INPUT_R2 1002 #define LINE 2000 #define LINE_R1 2001 #define LINE_R2 2002 #define EXP 3000 #define EXP_R1 3001 /* NUM */ #define EXP_R2 3002 /* E+E */ #define EXP_R3 3003 /* E-E */ #define EXP_R4 3004 /* E*E */ #define EXP_R5 3005 /* E/E */ #define EXP_R6 3006 /* -E */ #define EXP_R7 3007 /* E^E */ #define EXP_R8 3008 /* (E) */