1 #undef YYBTYACC 2 #define YYBTYACC 0 3 #define YYDEBUGSTR YYPREFIX "debug" 4 typedef short YYINT; 5 const YYINT calc_lhs[] = { -1, 6 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 7 2, 2, 2, 2, 2, 2, 3, 3, 8 }; 9 const YYINT calc_len[] = { 2, 10 0, 3, 3, 1, 3, 3, 3, 3, 3, 3, 11 3, 3, 3, 2, 1, 1, 1, 2, 12 }; 13 const YYINT calc_defred[] = { 1, 14 0, 0, 17, 0, 0, 0, 0, 0, 0, 3, 15 0, 15, 14, 0, 2, 0, 0, 0, 0, 0, 16 0, 0, 18, 0, 6, 0, 0, 0, 0, 9, 17 10, 11, 18 }; 19 const YYINT calc_stos[] = { 0, 20 261, 256, 257, 258, 45, 40, 262, 263, 264, 10, 21 61, 258, 263, 263, 10, 124, 38, 43, 45, 42, 22 47, 37, 257, 263, 41, 263, 263, 263, 263, 263, 23 263, 263, 24 }; 25 const YYINT calc_dgoto[] = { 1, 26 7, 8, 9, 27 }; 28 const YYINT calc_sindex[] = { 0, 29 -40, -7, 0, -55, -38, -38, 1, -29, -247, 0, 30 -38, 0, 0, 22, 0, -38, -38, -38, -38, -38, 31 -38, -38, 0, -29, 0, 51, 60, -20, -20, 0, 32 0, 0, 33 }; 34 const YYINT calc_rindex[] = { 0, 35 0, 0, 0, 2, 0, 0, 0, 9, -9, 0, 36 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 37 0, 0, 0, 10, 0, -6, 14, 5, 13, 0, 38 0, 0, 39 }; 40 #if YYBTYACC 41 const YYINT calc_cindex[] = { 0, 42 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 43 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 44 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 45 0, 0, 46 }; 47 #endif 48 const YYINT calc_gindex[] = { 0, 49 0, 65, 0, 50 }; 51 const YYINT calc_table[] = { 6, 52 16, 6, 10, 13, 5, 11, 5, 22, 17, 23, 53 15, 15, 20, 18, 7, 19, 22, 21, 4, 5, 54 0, 20, 8, 12, 0, 0, 21, 16, 16, 0, 55 0, 16, 16, 16, 13, 16, 0, 16, 15, 15, 56 0, 0, 7, 15, 15, 7, 15, 7, 15, 7, 57 8, 12, 0, 8, 12, 8, 0, 8, 22, 17, 58 0, 0, 25, 20, 18, 0, 19, 0, 21, 13, 59 14, 0, 0, 0, 0, 24, 0, 0, 0, 0, 60 26, 27, 28, 29, 30, 31, 32, 22, 17, 0, 61 0, 0, 20, 18, 16, 19, 22, 21, 0, 0, 62 0, 20, 18, 0, 19, 0, 21, 0, 0, 0, 63 0, 0, 0, 0, 16, 0, 0, 13, 0, 0, 64 0, 0, 0, 0, 0, 15, 0, 0, 7, 0, 65 0, 0, 0, 0, 0, 0, 8, 12, 0, 0, 66 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 67 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 69 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 70 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 71 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 72 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 73 0, 0, 0, 0, 0, 2, 3, 4, 3, 12, 74 }; 75 const YYINT calc_check[] = { 40, 76 10, 40, 10, 10, 45, 61, 45, 37, 38, 257, 77 10, 10, 42, 43, 10, 45, 37, 47, 10, 10, 78 -1, 42, 10, 10, -1, -1, 47, 37, 38, -1, 79 -1, 41, 42, 43, 41, 45, -1, 47, 37, 38, 80 -1, -1, 38, 42, 43, 41, 45, 43, 47, 45, 81 38, 38, -1, 41, 41, 43, -1, 45, 37, 38, 82 -1, -1, 41, 42, 43, -1, 45, -1, 47, 5, 83 6, -1, -1, -1, -1, 11, -1, -1, -1, -1, 84 16, 17, 18, 19, 20, 21, 22, 37, 38, -1, 85 -1, -1, 42, 43, 124, 45, 37, 47, -1, -1, 86 -1, 42, 43, -1, 45, -1, 47, -1, -1, -1, 87 -1, -1, -1, -1, 124, -1, -1, 124, -1, -1, 88 -1, -1, -1, -1, -1, 124, -1, -1, 124, -1, 89 -1, -1, -1, -1, -1, -1, 124, 124, -1, -1, 90 -1, -1, -1, -1, -1, 124, -1, -1, -1, -1, 91 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 92 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 93 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 94 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 95 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 96 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 97 -1, -1, -1, -1, -1, 256, 257, 258, 257, 258, 98 }; 99 #if YYBTYACC 100 const YYINT calc_ctable[] = { -1, 101 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 102 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 103 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 104 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 105 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 106 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 107 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 108 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 109 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 110 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 111 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 112 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 113 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 114 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 115 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 116 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 117 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 118 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 119 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 120 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 121 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 122 -1, -1, -1, -1, -1, -1, -1, -1, -1, 123 }; 124 #endif 125 #ifndef YYDEBUG 126 #define YYDEBUG 0 127 #endif 128 const char *const calc_name[] = { 129 130 "$end",0,0,0,0,0,0,0,0,0,"'\\n'",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 131 0,0,0,"'%'","'&'",0,"'('","')'","'*'","'+'",0,"'-'",0,"'/'",0,0,0,0,0,0,0,0,0,0, 132 0,0,0,"'='",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 133 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"'|'",0,0,0,0,0,0,0,0,0, 134 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 135 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 136 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 137 0,0,"error","DIGIT","LETTER","UMINUS","$accept","list","stat","expr","number", 138 "illegal-symbol", 139 }; 140 #if YYDEBUG 141 const char *const calc_rule[] = { 142 "$accept : list", 143 "list :", 144 "list : list stat '\\n'", 145 "list : list error '\\n'", 146 "stat : expr", 147 "stat : LETTER '=' expr", 148 "expr : '(' expr ')'", 149 "expr : expr '+' expr", 150 "expr : expr '-' expr", 151 "expr : expr '*' expr", 152 "expr : expr '/' expr", 153 "expr : expr '%' expr", 154 "expr : expr '&' expr", 155 "expr : expr '|' expr", 156 "expr : '-' expr", 157 "expr : LETTER", 158 "expr : number", 159 "number : DIGIT", 160 "number : number DIGIT", 161 162 }; 163 #endif 164