Changeset 609 for branches/GNU/src/binutils/binutils/defparse.c
- Timestamp:
- Aug 16, 2003, 6:59:22 PM (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/GNU/src/binutils/binutils/defparse.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r608 r609 1 2 /* A Bison parser, made from defparse.y 3 by GNU Bison version 1.28 */ 1 /* A Bison parser, made from defparse.y 2 by GNU bison 1.35. */ 4 3 5 4 #define YYBISON 1 /* Identify Bison output. */ 6 5 7 # define NAME 2578 # define LIBRARY 2589 # define DESCRIPTION 25910 # define STACKSIZE 26011 # define HEAPSIZE 26112 # define CODE 26213 # define DATA 26314 # define SECTIONS 26415 # define EXPORTS 26516 # define IMPORTS 26617 # define VERSIONK 26718 # define BASE 26819 # define CONSTANT 26920 # define READ 27021 # define WRITE 27122 # define EXECUTE 27223 # define SHARED 27324 # define NONSHARED 27425 # define NONAME 27526 # define SINGLE 27627 # define MULTIPLE 27728 # define INITINSTANCE 27829 # define INITGLOBAL 27930 # define TERMINSTANCE 28031 # define TERMGLOBAL 28132 # define ID 28233 # define NUMBER 2836 # define NAME 257 7 # define LIBRARY 258 8 # define DESCRIPTION 259 9 # define STACKSIZE 260 10 # define HEAPSIZE 261 11 # define CODE 262 12 # define DATA 263 13 # define SECTIONS 264 14 # define EXPORTS 265 15 # define IMPORTS 266 16 # define VERSIONK 267 17 # define BASE 268 18 # define CONSTANT 269 19 # define READ 270 20 # define WRITE 271 21 # define EXECUTE 272 22 # define SHARED 273 23 # define NONSHARED 274 24 # define NONAME 275 25 # define SINGLE 276 26 # define MULTIPLE 277 27 # define INITINSTANCE 278 28 # define INITGLOBAL 279 29 # define TERMINSTANCE 280 30 # define TERMGLOBAL 281 31 # define ID 282 32 # define NUMBER 283 34 33 35 34 #line 1 "defparse.y" … … 59 58 60 59 #line 26 "defparse.y" 60 #ifndef YYSTYPE 61 61 typedef union { 62 62 char *id; 63 63 int number; 64 } YYSTYPE; 65 #include <stdio.h> 66 67 #ifndef __cplusplus 68 #ifndef __STDC__ 69 #define const 70 #endif 71 #endif 72 73 74 75 #define YYFINAL 94 64 } yystype; 65 # define YYSTYPE yystype 66 # define YYSTYPE_IS_TRIVIAL 1 67 #endif 68 #ifndef YYDEBUG 69 # define YYDEBUG 0 70 #endif 71 72 73 74 #define YYFINAL 96 76 75 #define YYFLAG -32768 77 76 #define YYNTBASE 34 78 77 78 /* YYTRANSLATE(YYLEX) -- Bison token number corresponding to YYLEX. */ 79 79 #define YYTRANSLATE(x) ((unsigned)(x) <= 283 ? yytranslate[x] : 55) 80 80 81 static const char yytranslate[] = { 0, 82 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 83 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 84 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 85 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 86 2, 2, 2, 32, 2, 30, 2, 2, 2, 2, 87 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 88 31, 2, 2, 33, 2, 2, 2, 2, 2, 2, 89 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 90 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 91 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 92 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 93 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 94 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 95 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 96 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 97 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 98 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 99 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 100 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 101 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 102 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 103 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 104 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 105 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 106 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 107 2, 2, 2, 2, 2, 1, 3, 4, 5, 6, 108 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 109 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 110 27, 28, 29 81 /* YYTRANSLATE[YYLEX] -- Bison token number corresponding to YYLEX. */ 82 static const char yytranslate[] = 83 { 84 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 85 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 86 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 87 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 88 2, 2, 2, 2, 32, 2, 30, 2, 2, 2, 89 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 90 2, 31, 2, 2, 33, 2, 2, 2, 2, 2, 91 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 92 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 93 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 94 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 95 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 96 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 97 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 98 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 99 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 100 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 101 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 102 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 103 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 104 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 105 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 106 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 107 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 108 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 109 2, 2, 2, 2, 2, 2, 1, 3, 4, 5, 110 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 111 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 112 26, 27, 28, 29 111 113 }; 112 114 113 #if YYDEBUG != 0 114 static const short yyprhs[] = { 0, 115 0, 3, 5, 9, 14, 17, 20, 24, 28, 31, 116 34, 37, 40, 43, 48, 49, 52, 59, 62, 64, 117 72, 80, 86, 92, 98, 104, 108, 112, 115, 117, 118 120, 124, 126, 128, 129, 132, 133, 135, 137, 139, 119 141, 143, 145, 147, 149, 150, 152, 153, 155, 156, 120 158, 162, 163, 166, 167, 170, 171, 175, 176, 177, 121 181, 183, 185, 187 115 #if YYDEBUG 116 static const short yyprhs[] = 117 { 118 0, 0, 3, 5, 9, 14, 17, 20, 24, 28, 119 31, 34, 37, 40, 43, 48, 49, 52, 59, 62, 120 64, 72, 80, 86, 92, 98, 104, 108, 112, 115, 121 117, 120, 124, 126, 128, 129, 132, 133, 135, 137, 122 139, 141, 143, 145, 147, 149, 150, 152, 153, 155, 123 156, 158, 162, 163, 166, 167, 170, 175, 176, 180, 124 181, 182, 186, 188, 190, 192 122 125 }; 123 124 static const short yyrhs[] = { 34, 125 35, 0, 35, 0, 3, 49, 52, 0, 4, 49, 126 52, 53, 0, 11, 36, 0, 5, 28, 0, 6, 127 29, 44, 0, 7, 29, 44, 0, 8, 42, 0, 128 9, 42, 0, 10, 40, 0, 12, 38, 0, 13, 129 29, 0, 13, 29, 30, 29, 0, 0, 36, 37, 130 0, 28, 51, 50, 47, 46, 48, 0, 38, 39, 131 0, 39, 0, 28, 31, 28, 30, 28, 30, 28, 132 0, 28, 31, 28, 30, 28, 30, 29, 0, 28, 133 31, 28, 30, 28, 0, 28, 31, 28, 30, 29, 134 0, 28, 30, 28, 30, 28, 0, 28, 30, 28, 135 30, 29, 0, 28, 30, 28, 0, 28, 30, 29, 136 0, 40, 41, 0, 41, 0, 28, 42, 0, 42, 137 43, 45, 0, 45, 0, 32, 0, 0, 32, 29, 138 0, 0, 16, 0, 17, 0, 18, 0, 19, 0, 139 20, 0, 22, 0, 23, 0, 15, 0, 0, 21, 140 0, 0, 9, 0, 0, 28, 0, 28, 30, 28, 141 0, 0, 33, 29, 0, 0, 31, 28, 0, 0, 142 14, 31, 29, 0, 0, 0, 53, 43, 54, 0, 143 24, 0, 25, 0, 26, 0, 27, 0 126 static const short yyrhs[] = 127 { 128 34, 35, 0, 35, 0, 3, 49, 52, 0, 4, 129 49, 52, 53, 0, 11, 36, 0, 5, 28, 0, 130 6, 29, 44, 0, 7, 29, 44, 0, 8, 42, 131 0, 9, 42, 0, 10, 40, 0, 12, 38, 0, 132 13, 29, 0, 13, 29, 30, 29, 0, 0, 36, 133 37, 0, 28, 51, 50, 47, 46, 48, 0, 38, 134 39, 0, 39, 0, 28, 31, 28, 30, 28, 30, 135 28, 0, 28, 31, 28, 30, 28, 30, 29, 0, 136 28, 31, 28, 30, 28, 0, 28, 31, 28, 30, 137 29, 0, 28, 30, 28, 30, 28, 0, 28, 30, 138 28, 30, 29, 0, 28, 30, 28, 0, 28, 30, 139 29, 0, 40, 41, 0, 41, 0, 28, 42, 0, 140 42, 43, 45, 0, 45, 0, 32, 0, 0, 32, 141 29, 0, 0, 16, 0, 17, 0, 18, 0, 19, 142 0, 20, 0, 22, 0, 23, 0, 15, 0, 0, 143 21, 0, 0, 9, 0, 0, 28, 0, 28, 30, 144 28, 0, 0, 33, 29, 0, 0, 31, 28, 0, 145 31, 28, 30, 28, 0, 0, 14, 31, 29, 0, 146 0, 0, 53, 43, 54, 0, 24, 0, 25, 0, 147 26, 0, 27, 0 144 148 }; 145 149 146 150 #endif 147 151 148 #if YYDEBUG != 0 149 static const short yyrline[] = { 0, 150 43, 44, 47, 49, 50, 51, 52, 53, 54, 55, 151 56, 57, 58, 59, 63, 65, 68, 72, 74, 77, 152 79, 80, 81, 82, 83, 84, 85, 88, 90, 93, 153 97, 99, 102, 104, 106, 107, 110, 112, 113, 114, 154 115, 116, 117, 120, 122, 125, 127, 130, 132, 135, 155 136, 142, 145, 147, 150, 152, 155, 156, 159, 161, 156 164, 166, 167, 168 152 #if YYDEBUG 153 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ 154 static const short yyrline[] = 155 { 156 0, 43, 44, 47, 49, 50, 51, 52, 53, 54, 157 55, 56, 57, 58, 59, 63, 65, 68, 72, 74, 158 77, 79, 80, 81, 82, 83, 84, 85, 88, 90, 159 93, 97, 99, 102, 104, 106, 107, 110, 112, 113, 160 114, 115, 116, 117, 120, 122, 125, 127, 130, 132, 161 135, 136, 142, 145, 147, 150, 152, 158, 161, 162, 162 165, 167, 170, 172, 173, 174 157 163 }; 158 164 #endif 159 165 160 166 161 #if YYDEBUG != 0 || defined (YYERROR_VERBOSE) 162 163 static const char * const yytname[] = { "$","error","$undefined.","NAME","LIBRARY", 164 "DESCRIPTION","STACKSIZE","HEAPSIZE","CODE","DATA","SECTIONS","EXPORTS","IMPORTS", 165 "VERSIONK","BASE","CONSTANT","READ","WRITE","EXECUTE","SHARED","NONSHARED","NONAME", 166 "SINGLE","MULTIPLE","INITINSTANCE","INITGLOBAL","TERMINSTANCE","TERMGLOBAL", 167 "ID","NUMBER","'.'","'='","','","'@'","start","command","explist","expline", 168 "implist","impline","seclist","secline","attr_list","opt_comma","opt_number", 169 "attr","opt_CONSTANT","opt_NONAME","opt_DATA","opt_name","opt_ordinal","opt_equal_name", 170 "opt_base","option_list","option", NULL 167 #if (YYDEBUG) || defined YYERROR_VERBOSE 168 169 /* YYTNAME[TOKEN_NUM] -- String name of the token TOKEN_NUM. */ 170 static const char *const yytname[] = 171 { 172 "$", "error", "$undefined.", "NAME", "LIBRARY", "DESCRIPTION", 173 "STACKSIZE", "HEAPSIZE", "CODE", "DATA", "SECTIONS", "EXPORTS", 174 "IMPORTS", "VERSIONK", "BASE", "CONSTANT", "READ", "WRITE", "EXECUTE", 175 "SHARED", "NONSHARED", "NONAME", "SINGLE", "MULTIPLE", "INITINSTANCE", 176 "INITGLOBAL", "TERMINSTANCE", "TERMGLOBAL", "ID", "NUMBER", "'.'", 177 "'='", "','", "'@'", "start", "command", "explist", "expline", 178 "implist", "impline", "seclist", "secline", "attr_list", "opt_comma", 179 "opt_number", "attr", "opt_CONSTANT", "opt_NONAME", "opt_DATA", 180 "opt_name", "opt_ordinal", "opt_equal_name", "opt_base", "option_list", 181 "option", 0 171 182 }; 172 183 #endif 173 184 174 static const short yyr1[] = { 0, 175 34, 34, 35, 35, 35, 35, 35, 35, 35, 35, 176 35, 35, 35, 35, 36, 36, 37, 38, 38, 39, 177 39, 39, 39, 39, 39, 39, 39, 40, 40, 41, 178 42, 42, 43, 43, 44, 44, 45, 45, 45, 45, 179 45, 45, 45, 46, 46, 47, 47, 48, 48, 49, 180 49, 49, 50, 50, 51, 51, 52, 52, 53, 53, 181 54, 54, 54, 54 185 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ 186 static const short yyr1[] = 187 { 188 0, 34, 34, 35, 35, 35, 35, 35, 35, 35, 189 35, 35, 35, 35, 35, 36, 36, 37, 38, 38, 190 39, 39, 39, 39, 39, 39, 39, 39, 40, 40, 191 41, 42, 42, 43, 43, 44, 44, 45, 45, 45, 192 45, 45, 45, 45, 46, 46, 47, 47, 48, 48, 193 49, 49, 49, 50, 50, 51, 51, 51, 52, 52, 194 53, 53, 54, 54, 54, 54 182 195 }; 183 196 184 static const short yyr2[] = { 0, 185 2, 1, 3, 4, 2, 2, 3, 3, 2, 2, 186 2, 2, 2, 4, 0, 2, 6, 2, 1, 7, 187 7, 5, 5, 5, 5, 3, 3, 2, 1, 2, 188 3, 1, 1, 0, 2, 0, 1, 1, 1, 1, 189 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 190 3, 0, 2, 0, 2, 0, 3, 0, 0, 3, 191 1, 1, 1, 1 197 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ 198 static const short yyr2[] = 199 { 200 0, 2, 1, 3, 4, 2, 2, 3, 3, 2, 201 2, 2, 2, 2, 4, 0, 2, 6, 2, 1, 202 7, 7, 5, 5, 5, 5, 3, 3, 2, 1, 203 2, 3, 1, 1, 0, 2, 0, 1, 1, 1, 204 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 205 1, 3, 0, 2, 0, 2, 4, 0, 3, 0, 206 0, 3, 1, 1, 1, 1 192 207 }; 193 208 194 static const short yydefact[] = { 0, 195 52, 52, 0, 0, 0, 0, 0, 0, 15, 0, 196 0, 0, 2, 50, 58, 58, 6, 36, 36, 37, 197 38, 39, 40, 41, 42, 43, 9, 32, 10, 0, 198 11, 29, 5, 0, 12, 19, 13, 1, 0, 0, 199 3, 59, 0, 7, 8, 33, 0, 30, 28, 56, 200 16, 0, 0, 18, 0, 51, 0, 4, 35, 31, 201 0, 54, 26, 27, 0, 14, 57, 0, 55, 0, 202 47, 0, 0, 61, 62, 63, 64, 60, 53, 46, 203 45, 24, 25, 22, 23, 44, 49, 0, 48, 17, 204 20, 21, 0, 0 209 /* YYDEFACT[S] -- default rule to reduce with in state S when YYTABLE 210 doesn't specify something else to do. Zero means the default is an 211 error. */ 212 static const short yydefact[] = 213 { 214 0, 52, 52, 0, 0, 0, 0, 0, 0, 15, 215 0, 0, 0, 2, 50, 59, 59, 6, 36, 36, 216 37, 38, 39, 40, 41, 42, 43, 9, 32, 10, 217 0, 11, 29, 5, 0, 12, 19, 13, 1, 0, 218 0, 3, 60, 0, 7, 8, 33, 0, 30, 28, 219 57, 16, 0, 0, 18, 0, 51, 0, 4, 35, 220 31, 0, 54, 26, 27, 0, 14, 58, 0, 55, 221 0, 47, 0, 0, 62, 63, 64, 65, 61, 0, 222 53, 46, 45, 24, 25, 22, 23, 56, 44, 49, 223 0, 48, 17, 20, 21, 0, 0 205 224 }; 206 225 207 static const short yydefgoto[] = { 12, 208 13, 33, 51, 35, 36, 31, 32, 27, 47, 44, 209 28, 87, 81, 90, 15, 71, 62, 41, 58, 78 226 static const short yydefgoto[] = 227 { 228 12, 13, 33, 51, 35, 36, 31, 32, 27, 47, 229 44, 28, 89, 82, 92, 15, 71, 62, 41, 58, 230 78 210 231 }; 211 232 212 static const short yypact[] = { 32, 213 -22, -22, -19, -13, 22, 30, 30, -6,-32768, 26, 214 38, 21,-32768, 29, 46, 46,-32768, 36, 36,-32768, 215 -32768,-32768,-32768,-32768,-32768,-32768, -15,-32768, -15, 30, 216 -6,-32768, 41, -16, 26,-32768, 40,-32768, 43, 42, 217 -32768,-32768, 45,-32768,-32768,-32768, 30, -15,-32768, 44, 218 -32768, -9, 48,-32768, 49,-32768, 50, -14,-32768,-32768, 219 52, 39, 47,-32768, 51,-32768,-32768, 31,-32768, 53, 220 62, 33, 35,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 221 69,-32768,-32768, 55,-32768,-32768, 77, 37,-32768,-32768, 222 -32768,-32768, 87,-32768 233 static const short yypact[] = 234 { 235 32, -22, -22, -19, -13, 22, 30, 30, -6,-32768, 236 26, 38, 21,-32768, 29, 46, 46,-32768, 36, 36, 237 -32768,-32768,-32768,-32768,-32768,-32768,-32768, -15,-32768, -15, 238 30, -6,-32768, 41, -16, 26,-32768, 40,-32768, 43, 239 42,-32768,-32768, 45,-32768,-32768,-32768, 30, -15,-32768, 240 44,-32768, -9, 48,-32768, 49,-32768, 50, -14,-32768, 241 -32768, 52, 39, 47,-32768, 51,-32768,-32768, 31, 53, 242 55, 61, 33, 35,-32768,-32768,-32768,-32768,-32768, 57, 243 -32768,-32768, 71,-32768,-32768, 58,-32768,-32768,-32768, 78, 244 37,-32768,-32768,-32768,-32768, 89,-32768 223 245 }; 224 246 225 static const short yypgoto[] = {-32768, 226 76,-32768,-32768,-32768, 54,-32768, 59, -7, 34, 72, 227 56,-32768,-32768,-32768, 91,-32768,-32768, 78,-32768,-32768 247 static const short yypgoto[] = 248 { 249 -32768, 79,-32768,-32768,-32768, 59,-32768, 62, -7, 34, 250 76, 54,-32768,-32768,-32768, 88,-32768,-32768, 80,-32768, 251 -32768 228 252 }; 229 253 230 254 231 #define YYLAST 103 232 233 234 static const short yytable[] = { 29, 235 -34, -34, -34, -34, -34, 14, -34, -34, 17, -34, 236 -34, -34, -34, 52, 53, 18, 46, 46, 63, 64, 237 93, 30, 48, 1, 2, 3, 4, 5, 6, 7, 238 8, 9, 10, 11, 1, 2, 3, 4, 5, 6, 239 7, 8, 9, 10, 11, 20, 21, 22, 23, 24, 240 19, 25, 26, 34, 74, 75, 76, 77, 39, 40, 241 82, 83, 84, 85, 91, 92, 37, 43, 50, 55, 242 56, 70, 57, 59, 61, 65, 72, 66, 67, 69, 243 73, 79, 80, 86, 88, 89, 94, 38, 54, 49, 244 45, 68, 16, 42, 0, 0, 0, 0, 0, 0, 245 0, 0, 60 255 #define YYLAST 101 256 257 258 static const short yytable[] = 259 { 260 29, -34, -34, -34, -34, -34, 14, -34, -34, 17, 261 -34, -34, -34, -34, 52, 53, 18, 46, 46, 63, 262 64, 95, 30, 48, 1, 2, 3, 4, 5, 6, 263 7, 8, 9, 10, 11, 1, 2, 3, 4, 5, 264 6, 7, 8, 9, 10, 11, 20, 21, 22, 23, 265 24, 19, 25, 26, 34, 74, 75, 76, 77, 39, 266 40, 83, 84, 85, 86, 93, 94, 37, 43, 50, 267 55, 56, 70, 57, 59, 61, 65, 72, 66, 67, 268 69, 73, 81, 79, 80, 87, 88, 91, 90, 96, 269 16, 38, 68, 49, 54, 45, 42, 0, 0, 0, 270 0, 60 246 271 }; 247 272 248 static const short yycheck[] = { 7, 249 16, 17, 18, 19, 20, 28, 22, 23, 28, 24, 250 25, 26, 27, 30, 31, 29, 32, 32, 28, 29, 251 0, 28, 30, 3, 4, 5, 6, 7, 8, 9, 252 10, 11, 12, 13, 3, 4, 5, 6, 7, 8, 253 9, 10, 11, 12, 13, 16, 17, 18, 19, 20, 254 29, 22, 23, 28, 24, 25, 26, 27, 30, 14, 255 28, 29, 28, 29, 28, 29, 29, 32, 28, 30, 256 28, 33, 31, 29, 31, 28, 30, 29, 29, 28, 257 30, 29, 21, 15, 30, 9, 0, 12, 35, 31, 258 19, 58, 2, 16, -1, -1, -1, -1, -1, -1, 259 -1, -1, 47 273 static const short yycheck[] = 274 { 275 7, 16, 17, 18, 19, 20, 28, 22, 23, 28, 276 24, 25, 26, 27, 30, 31, 29, 32, 32, 28, 277 29, 0, 28, 30, 3, 4, 5, 6, 7, 8, 278 9, 10, 11, 12, 13, 3, 4, 5, 6, 7, 279 8, 9, 10, 11, 12, 13, 16, 17, 18, 19, 280 20, 29, 22, 23, 28, 24, 25, 26, 27, 30, 281 14, 28, 29, 28, 29, 28, 29, 29, 32, 28, 282 30, 28, 33, 31, 29, 31, 28, 30, 29, 29, 283 28, 30, 21, 30, 29, 28, 15, 9, 30, 0, 284 2, 12, 58, 31, 35, 19, 16, -1, -1, -1, 285 -1, 47 260 286 }; 261 287 /* -*-C-*- Note some compilers choke on comments on `#line' lines. */ 262 #line 3 "/usr/share/bison/bison.simple" 263 /* This file comes from bison-1.28. */ 288 #line 3 "/usr/share/bison-1.35/bison.simple" 264 289 265 290 /* Skeleton output parser for bison, 266 Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc. 291 292 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software 293 Foundation, Inc. 267 294 268 295 This program is free software; you can redistribute it and/or modify … … 286 313 in version 1.24 of Bison. */ 287 314 288 /* This is the parser code that is written into each bison parser 289 when the %semantic_parser declaration is not specified in the grammar. 290 It was written by Richard Stallman by simplifying the hairy parser 291 used when %semantic_parser is specified. */ 292 293 #ifndef YYSTACK_USE_ALLOCA 294 #ifdef alloca 295 #define YYSTACK_USE_ALLOCA 296 #else /* alloca not defined */ 297 #ifdef __GNUC__ 298 #define YYSTACK_USE_ALLOCA 299 #define alloca __builtin_alloca 300 #else /* not GNU C. */ 301 #if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) || (defined (__sun) && defined (__i386)) 302 #define YYSTACK_USE_ALLOCA 303 #include <alloca.h> 304 #else /* not sparc */ 305 /* We think this test detects Watcom and Microsoft C. */ 306 /* This used to test MSDOS, but that is a bad idea 307 since that symbol is in the user namespace. */ 308 #if (defined (_MSDOS) || defined (_MSDOS_)) && !defined (__TURBOC__) 309 #if 0 /* No need for malloc.h, which pollutes the namespace; 310 instead, just don't use alloca. */ 311 #include <malloc.h> 312 #endif 313 #else /* not MSDOS, or __TURBOC__ */ 314 #if defined(_AIX) 315 /* I don't know what this was needed for, but it pollutes the namespace. 316 So I turned it off. rms, 2 May 1997. */ 317 /* #include <malloc.h> */ 318 #pragma alloca 319 #define YYSTACK_USE_ALLOCA 320 #else /* not MSDOS, or __TURBOC__, or _AIX */ 321 #if 0 322 #ifdef __hpux /* haible@ilog.fr says this works for HPUX 9.05 and up, 323 and on HPUX 10. Eventually we can turn this on. */ 324 #define YYSTACK_USE_ALLOCA 325 #define alloca __builtin_alloca 326 #endif /* __hpux */ 327 #endif 328 #endif /* not _AIX */ 329 #endif /* not MSDOS, or __TURBOC__ */ 330 #endif /* not sparc */ 331 #endif /* not GNU C */ 332 #endif /* alloca not defined */ 333 #endif /* YYSTACK_USE_ALLOCA not defined */ 334 335 #ifdef YYSTACK_USE_ALLOCA 336 #define YYSTACK_ALLOC alloca 337 #else 338 #define YYSTACK_ALLOC malloc 339 #endif 340 341 /* Note: there must be only one dollar sign in this file. 342 It is replaced by the list of actions, each action 343 as one case of the switch. */ 315 /* This is the parser code that is written into each bison parser when 316 the %semantic_parser declaration is not specified in the grammar. 317 It was written by Richard Stallman by simplifying the hairy parser 318 used when %semantic_parser is specified. */ 319 320 /* All symbols defined below should begin with yy or YY, to avoid 321 infringing on user name space. This should be done even for local 322 variables, as they might otherwise be expanded by user macros. 323 There are some unavoidable exceptions within include files to 324 define necessary library symbols; they are noted "INFRINGES ON 325 USER NAME SPACE" below. */ 326 327 #if ! defined (yyoverflow) || defined (YYERROR_VERBOSE) 328 329 /* The parser invokes alloca or malloc; define the necessary symbols. */ 330 331 # if YYSTACK_USE_ALLOCA 332 # define YYSTACK_ALLOC alloca 333 # else 334 # ifndef YYSTACK_USE_ALLOCA 335 # if defined (alloca) || defined (_ALLOCA_H) 336 # define YYSTACK_ALLOC alloca 337 # else 338 # ifdef __GNUC__ 339 # define YYSTACK_ALLOC __builtin_alloca 340 # endif 341 # endif 342 # endif 343 # endif 344 345 # ifdef YYSTACK_ALLOC 346 /* Pacify GCC's `empty if-body' warning. */ 347 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) 348 # else 349 # if defined (__STDC__) || defined (__cplusplus) 350 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ 351 # define YYSIZE_T size_t 352 # endif 353 # define YYSTACK_ALLOC malloc 354 # define YYSTACK_FREE free 355 # endif 356 #endif /* ! defined (yyoverflow) || defined (YYERROR_VERBOSE) */ 357 358 359 #if (! defined (yyoverflow) \ 360 && (! defined (__cplusplus) \ 361 || (YYLTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) 362 363 /* A type that is properly aligned for any stack member. */ 364 union yyalloc 365 { 366 short yyss; 367 YYSTYPE yyvs; 368 # if YYLSP_NEEDED 369 YYLTYPE yyls; 370 # endif 371 }; 372 373 /* The size of the maximum gap between one aligned stack and the next. */ 374 # define YYSTACK_GAP_MAX (sizeof (union yyalloc) - 1) 375 376 /* The size of an array large to enough to hold all stacks, each with 377 N elements. */ 378 # if YYLSP_NEEDED 379 # define YYSTACK_BYTES(N) \ 380 ((N) * (sizeof (short) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \ 381 + 2 * YYSTACK_GAP_MAX) 382 # else 383 # define YYSTACK_BYTES(N) \ 384 ((N) * (sizeof (short) + sizeof (YYSTYPE)) \ 385 + YYSTACK_GAP_MAX) 386 # endif 387 388 /* Copy COUNT objects from FROM to TO. The source and destination do 389 not overlap. */ 390 # ifndef YYCOPY 391 # if 1 < __GNUC__ 392 # define YYCOPY(To, From, Count) \ 393 __builtin_memcpy (To, From, (Count) * sizeof (*(From))) 394 # else 395 # define YYCOPY(To, From, Count) \ 396 do \ 397 { \ 398 register YYSIZE_T yyi; \ 399 for (yyi = 0; yyi < (Count); yyi++) \ 400 (To)[yyi] = (From)[yyi]; \ 401 } \ 402 while (0) 403 # endif 404 # endif 405 406 /* Relocate STACK from its old location to the new one. The 407 local variables YYSIZE and YYSTACKSIZE give the old and new number of 408 elements in the stack, and YYPTR gives the new location of the 409 stack. Advance YYPTR to a properly aligned location for the next 410 stack. */ 411 # define YYSTACK_RELOCATE(Stack) \ 412 do \ 413 { \ 414 YYSIZE_T yynewbytes; \ 415 YYCOPY (&yyptr->Stack, Stack, yysize); \ 416 Stack = &yyptr->Stack; \ 417 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAX; \ 418 yyptr += yynewbytes / sizeof (*yyptr); \ 419 } \ 420 while (0) 421 422 #endif 423 424 425 #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__) 426 # define YYSIZE_T __SIZE_TYPE__ 427 #endif 428 #if ! defined (YYSIZE_T) && defined (size_t) 429 # define YYSIZE_T size_t 430 #endif 431 #if ! defined (YYSIZE_T) 432 # if defined (__STDC__) || defined (__cplusplus) 433 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */ 434 # define YYSIZE_T size_t 435 # endif 436 #endif 437 #if ! defined (YYSIZE_T) 438 # define YYSIZE_T unsigned int 439 #endif 344 440 345 441 #define yyerrok (yyerrstatus = 0) … … 350 446 #define YYABORT goto yyabortlab 351 447 #define YYERROR goto yyerrlab1 352 /* Like YYERROR except do call yyerror. 353 This remains here temporarily to ease the 354 transition to the new meaning of YYERROR, for GCC. 448 /* Like YYERROR except do call yyerror. This remains here temporarily 449 to ease the transition to the new meaning of YYERROR, for GCC. 355 450 Once GCC version 2 has supplanted version 1, this can go. */ 356 451 #define YYFAIL goto yyerrlab 357 452 #define YYRECOVERING() (!!yyerrstatus) 358 #define YYBACKUP( token, value)\453 #define YYBACKUP(Token, Value) \ 359 454 do \ 360 455 if (yychar == YYEMPTY && yylen == 1) \ 361 { yychar = (token), yylval = (value); \ 456 { \ 457 yychar = (Token); \ 458 yylval = (Value); \ 362 459 yychar1 = YYTRANSLATE (yychar); \ 363 460 YYPOPSTACK; \ … … 365 462 } \ 366 463 else \ 367 { yyerror ("syntax error: cannot back up"); YYERROR; } \ 464 { \ 465 yyerror ("syntax error: cannot back up"); \ 466 YYERROR; \ 467 } \ 368 468 while (0) 369 469 … … 371 471 #define YYERRCODE 256 372 472 373 #ifndef YYPURE 374 #define YYLEX yylex() 375 #endif 376 377 #ifdef YYPURE 378 #ifdef YYLSP_NEEDED 379 #ifdef YYLEX_PARAM 380 #define YYLEX yylex(&yylval, &yylloc, YYLEX_PARAM) 381 #else 382 #define YYLEX yylex(&yylval, &yylloc) 383 #endif 384 #else /* not YYLSP_NEEDED */ 385 #ifdef YYLEX_PARAM 386 #define YYLEX yylex(&yylval, YYLEX_PARAM) 387 #else 388 #define YYLEX yylex(&yylval) 389 #endif 390 #endif /* not YYLSP_NEEDED */ 391 #endif 392 393 /* If nonreentrant, generate the variables here */ 394 395 #ifndef YYPURE 396 397 int yychar; /* the lookahead symbol */ 398 YYSTYPE yylval; /* the semantic value of the */ 399 /* lookahead symbol */ 400 401 #ifdef YYLSP_NEEDED 402 YYLTYPE yylloc; /* location data for the lookahead */ 403 /* symbol */ 404 #endif 405 406 int yynerrs; /* number of parse errors so far */ 407 #endif /* not YYPURE */ 408 409 #if YYDEBUG != 0 410 int yydebug; /* nonzero means print parse trace */ 411 /* Since this is uninitialized, it does not stop multiple parsers 412 from coexisting. */ 413 #endif 414 415 /* YYINITDEPTH indicates the initial size of the parser's stacks */ 416 473 474 /* YYLLOC_DEFAULT -- Compute the default location (before the actions 475 are run). 476 477 When YYLLOC_DEFAULT is run, CURRENT is set the location of the 478 first token. By default, to implement support for ranges, extend 479 its range to the last symbol. */ 480 481 #ifndef YYLLOC_DEFAULT 482 # define YYLLOC_DEFAULT(Current, Rhs, N) \ 483 Current.last_line = Rhs[N].last_line; \ 484 Current.last_column = Rhs[N].last_column; 485 #endif 486 487 488 /* YYLEX -- calling `yylex' with the right arguments. */ 489 490 #if YYPURE 491 # if YYLSP_NEEDED 492 # ifdef YYLEX_PARAM 493 # define YYLEX yylex (&yylval, &yylloc, YYLEX_PARAM) 494 # else 495 # define YYLEX yylex (&yylval, &yylloc) 496 # endif 497 # else /* !YYLSP_NEEDED */ 498 # ifdef YYLEX_PARAM 499 # define YYLEX yylex (&yylval, YYLEX_PARAM) 500 # else 501 # define YYLEX yylex (&yylval) 502 # endif 503 # endif /* !YYLSP_NEEDED */ 504 #else /* !YYPURE */ 505 # define YYLEX yylex () 506 #endif /* !YYPURE */ 507 508 509 /* Enable debugging if requested. */ 510 #if YYDEBUG 511 512 # ifndef YYFPRINTF 513 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */ 514 # define YYFPRINTF fprintf 515 # endif 516 517 # define YYDPRINTF(Args) \ 518 do { \ 519 if (yydebug) \ 520 YYFPRINTF Args; \ 521 } while (0) 522 /* Nonzero means print parse trace. It is left uninitialized so that 523 multiple parsers can coexist. */ 524 int yydebug; 525 #else /* !YYDEBUG */ 526 # define YYDPRINTF(Args) 527 #endif /* !YYDEBUG */ 528 529 /* YYINITDEPTH -- initial size of the parser's stacks. */ 417 530 #ifndef YYINITDEPTH 418 #define YYINITDEPTH 200 419 #endif 420 421 /* YYMAXDEPTH is the maximum size the stacks can grow to 422 (effective only if the built-in stack extension method is used). */ 531 # define YYINITDEPTH 200 532 #endif 533 534 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only 535 if the built-in stack extension method is used). 536 537 Do not make this value too large; the results are undefined if 538 SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH) 539 evaluated with infinite-precision integer arithmetic. */ 423 540 424 541 #if YYMAXDEPTH == 0 425 # undef YYMAXDEPTH542 # undef YYMAXDEPTH 426 543 #endif 427 544 428 545 #ifndef YYMAXDEPTH 429 #define YYMAXDEPTH 10000 430 #endif 431 432 433 /* Define __yy_memcpy. Note that the size argument 434 should be passed with type unsigned int, because that is what the non-GCC 435 definitions require. With GCC, __builtin_memcpy takes an arg 436 of type size_t, but it can handle unsigned int. */ 437 438 #if __GNUC__ > 1 /* GNU C and GNU C++ define this. */ 439 #define __yy_memcpy(TO,FROM,COUNT) __builtin_memcpy(TO,FROM,COUNT) 440 #else /* not GNU C or C++ */ 441 #ifndef __cplusplus 442 443 /* This is the most reliable way to avoid incompatibilities 444 in available built-in functions on various systems. */ 445 static void 446 __yy_memcpy (to, from, count) 447 char *to; 448 char *from; 449 unsigned int count; 450 { 451 register char *f = from; 452 register char *t = to; 453 register int i = count; 454 455 while (i-- > 0) 456 *t++ = *f++; 546 # define YYMAXDEPTH 10000 547 #endif 548 549 550 #ifdef YYERROR_VERBOSE 551 552 # ifndef yystrlen 553 # if defined (__GLIBC__) && defined (_STRING_H) 554 # define yystrlen strlen 555 # else 556 /* Return the length of YYSTR. */ 557 static YYSIZE_T 558 # if defined (__STDC__) || defined (__cplusplus) 559 yystrlen (const char *yystr) 560 # else 561 yystrlen (yystr) 562 const char *yystr; 563 # endif 564 { 565 register const char *yys = yystr; 566 567 while (*yys++ != '\0') 568 continue; 569 570 return yys - yystr - 1; 457 571 } 458 459 #else /* __cplusplus */ 460 461 /* This is the most reliable way to avoid incompatibilities 462 in available built-in functions on various systems. */ 463 static void 464 __yy_memcpy (char *to, char *from, unsigned int count) 465 { 466 register char *t = to; 467 register char *f = from; 468 register int i = count; 469 470 while (i-- > 0) 471 *t++ = *f++; 572 # endif 573 # endif 574 575 # ifndef yystpcpy 576 # if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE) 577 # define yystpcpy stpcpy 578 # else 579 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in 580 YYDEST. */ 581 static char * 582 # if defined (__STDC__) || defined (__cplusplus) 583 yystpcpy (char *yydest, const char *yysrc) 584 # else 585 yystpcpy (yydest, yysrc) 586 char *yydest; 587 const char *yysrc; 588 # endif 589 { 590 register char *yyd = yydest; 591 register const char *yys = yysrc; 592 593 while ((*yyd++ = *yys++) != '\0') 594 continue; 595 596 return yyd - 1; 472 597 } 473 474 #endif 475 #endif 476 477 478 #line 217 "/usr/share/bison/bison.simple" 598 # endif 599 # endif 600 #endif 601 602 603 #line 315 "/usr/share/bison-1.35/bison.simple" 604 479 605 480 606 /* The user can define YYPARSE_PARAM as the name of an argument to be passed … … 485 611 486 612 #ifdef YYPARSE_PARAM 487 # ifdef __cplusplus488 # define YYPARSE_PARAM_ARG void *YYPARSE_PARAM489 # define YYPARSE_PARAM_DECL490 # else /* not __cplusplus */491 # define YYPARSE_PARAM_ARG YYPARSE_PARAM492 # define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;493 # endif /* not __cplusplus */494 #else /* notYYPARSE_PARAM */495 # define YYPARSE_PARAM_ARG496 # define YYPARSE_PARAM_DECL497 #endif /* notYYPARSE_PARAM */613 # if defined (__STDC__) || defined (__cplusplus) 614 # define YYPARSE_PARAM_ARG void *YYPARSE_PARAM 615 # define YYPARSE_PARAM_DECL 616 # else 617 # define YYPARSE_PARAM_ARG YYPARSE_PARAM 618 # define YYPARSE_PARAM_DECL void *YYPARSE_PARAM; 619 # endif 620 #else /* !YYPARSE_PARAM */ 621 # define YYPARSE_PARAM_ARG 622 # define YYPARSE_PARAM_DECL 623 #endif /* !YYPARSE_PARAM */ 498 624 499 625 /* Prevent warning if -Wstrict-prototypes. */ 500 626 #ifdef __GNUC__ 501 # ifdef YYPARSE_PARAM627 # ifdef YYPARSE_PARAM 502 628 int yyparse (void *); 629 # else 630 int yyparse (void); 631 # endif 632 #endif 633 634 /* YY_DECL_VARIABLES -- depending whether we use a pure parser, 635 variables are global, or local to YYPARSE. */ 636 637 #define YY_DECL_NON_LSP_VARIABLES \ 638 /* The lookahead symbol. */ \ 639 int yychar; \ 640 \ 641 /* The semantic value of the lookahead symbol. */ \ 642 YYSTYPE yylval; \ 643 \ 644 /* Number of parse errors so far. */ \ 645 int yynerrs; 646 647 #if YYLSP_NEEDED 648 # define YY_DECL_VARIABLES \ 649 YY_DECL_NON_LSP_VARIABLES \ 650 \ 651 /* Location data for the lookahead symbol. */ \ 652 YYLTYPE yylloc; 503 653 #else 504 int yyparse (void); 505 #endif 506 #endif 654 # define YY_DECL_VARIABLES \ 655 YY_DECL_NON_LSP_VARIABLES 656 #endif 657 658 659 /* If nonreentrant, generate the variables here. */ 660 661 #if !YYPURE 662 YY_DECL_VARIABLES 663 #endif /* !YYPURE */ 507 664 508 665 int 509 yyparse (YYPARSE_PARAM_ARG)666 yyparse (YYPARSE_PARAM_ARG) 510 667 YYPARSE_PARAM_DECL 511 668 { 669 /* If reentrant, generate the variables here. */ 670 #if YYPURE 671 YY_DECL_VARIABLES 672 #endif /* !YYPURE */ 673 512 674 register int yystate; 513 675 register int yyn; 676 int yyresult; 677 /* Number of tokens to shift before error messages enabled. */ 678 int yyerrstatus; 679 /* Lookahead token as an internal (translated) token number. */ 680 int yychar1 = 0; 681 682 /* Three stacks and their tools: 683 `yyss': related to states, 684 `yyvs': related to semantic values, 685 `yyls': related to locations. 686 687 Refer to the stacks thru separate pointers, to allow yyoverflow 688 to reallocate them elsewhere. */ 689 690 /* The state stack. */ 691 short yyssa[YYINITDEPTH]; 692 short *yyss = yyssa; 514 693 register short *yyssp; 694 695 /* The semantic value stack. */ 696 YYSTYPE yyvsa[YYINITDEPTH]; 697 YYSTYPE *yyvs = yyvsa; 515 698 register YYSTYPE *yyvsp; 516 int yyerrstatus; /* number of tokens to shift before error messages enabled */ 517 int yychar1 = 0; /* lookahead token as an internal (translated) token number */ 518 519 short yyssa[YYINITDEPTH]; /* the state stack */ 520 YYSTYPE yyvsa[YYINITDEPTH]; /* the semantic value stack */ 521 522 short *yyss = yyssa; /* refer to the stacks thru separate pointers */ 523 YYSTYPE *yyvs = yyvsa; /* to allow yyoverflow to reallocate them elsewhere */ 524 525 #ifdef YYLSP_NEEDED 526 YYLTYPE yylsa[YYINITDEPTH]; /* the location stack */ 699 700 #if YYLSP_NEEDED 701 /* The location stack. */ 702 YYLTYPE yylsa[YYINITDEPTH]; 527 703 YYLTYPE *yyls = yylsa; 528 704 YYLTYPE *yylsp; 529 530 #define YYPOPSTACK (yyvsp--, yyssp--, yylsp--) 705 #endif 706 707 #if YYLSP_NEEDED 708 # define YYPOPSTACK (yyvsp--, yyssp--, yylsp--) 531 709 #else 532 #define YYPOPSTACK (yyvsp--, yyssp--) 533 #endif 534 535 int yystacksize = YYINITDEPTH; 536 int yyfree_stacks = 0; 537 538 #ifdef YYPURE 539 int yychar; 540 YYSTYPE yylval; 541 int yynerrs; 542 #ifdef YYLSP_NEEDED 543 YYLTYPE yylloc; 544 #endif 545 #endif 546 547 YYSTYPE yyval; /* the variable used to return */ 548 /* semantic values from the action */ 549 /* routines */ 550 710 # define YYPOPSTACK (yyvsp--, yyssp--) 711 #endif 712 713 YYSIZE_T yystacksize = YYINITDEPTH; 714 715 716 /* The variables used to return semantic value and location from the 717 action routines. */ 718 YYSTYPE yyval; 719 #if YYLSP_NEEDED 720 YYLTYPE yyloc; 721 #endif 722 723 /* When reducing, the number of symbols on the RHS of the reduced 724 rule. */ 551 725 int yylen; 552 726 553 #if YYDEBUG != 0 554 if (yydebug) 555 fprintf(stderr, "Starting parse\n"); 556 #endif 727 YYDPRINTF ((stderr, "Starting parse\n")); 557 728 558 729 yystate = 0; … … 566 737 The wasted elements are never initialized. */ 567 738 568 yyssp = yyss - 1;739 yyssp = yyss; 569 740 yyvsp = yyvs; 570 #if defYYLSP_NEEDED741 #if YYLSP_NEEDED 571 742 yylsp = yyls; 572 743 #endif 573 574 /* Push a new state, which is found in yystate . */ 575 /* In all cases, when you get here, the value and location stacks 576 have just been pushed. so pushing a state here evens the stacks. */ 577 yynewstate: 578 579 *++yyssp = yystate; 744 goto yysetstate; 745 746 /*------------------------------------------------------------. 747 | yynewstate -- Push a new state, which is found in yystate. | 748 `------------------------------------------------------------*/ 749 yynewstate: 750 /* In all cases, when you get here, the value and location stacks 751 have just been pushed. so pushing a state here evens the stacks. 752 */ 753 yyssp++; 754 755 yysetstate: 756 *yyssp = yystate; 580 757 581 758 if (yyssp >= yyss + yystacksize - 1) 582 759 { 583 /* Give user a chance to reallocate the stack */584 /* Use copies of these so that the &'s don't force the real ones into memory. */585 YYSTYPE *yyvs1 = yyvs;586 short *yyss1 = yyss;587 #ifdef YYLSP_NEEDED588 YYLTYPE *yyls1 = yyls;589 #endif590 591 760 /* Get the current used size of the three stacks, in elements. */ 592 intsize = yyssp - yyss + 1;761 YYSIZE_T yysize = yyssp - yyss + 1; 593 762 594 763 #ifdef yyoverflow 595 /* Each stack pointer address is followed by the size of 596 the data in use in that stack, in bytes. */ 597 #ifdef YYLSP_NEEDED 598 /* This used to be a conditional around just the two extra args, 599 but that might be undefined if yyoverflow is a macro. */ 600 yyoverflow("parser stack overflow", 601 &yyss1, size * sizeof (*yyssp), 602 &yyvs1, size * sizeof (*yyvsp), 603 &yyls1, size * sizeof (*yylsp), 604 &yystacksize); 605 #else 606 yyoverflow("parser stack overflow", 607 &yyss1, size * sizeof (*yyssp), 608 &yyvs1, size * sizeof (*yyvsp), 609 &yystacksize); 610 #endif 611 612 yyss = yyss1; yyvs = yyvs1; 613 #ifdef YYLSP_NEEDED 614 yyls = yyls1; 615 #endif 764 { 765 /* Give user a chance to reallocate the stack. Use copies of 766 these so that the &'s don't force the real ones into 767 memory. */ 768 YYSTYPE *yyvs1 = yyvs; 769 short *yyss1 = yyss; 770 771 /* Each stack pointer address is followed by the size of the 772 data in use in that stack, in bytes. */ 773 # if YYLSP_NEEDED 774 YYLTYPE *yyls1 = yyls; 775 /* This used to be a conditional around just the two extra args, 776 but that might be undefined if yyoverflow is a macro. */ 777 yyoverflow ("parser stack overflow", 778 &yyss1, yysize * sizeof (*yyssp), 779 &yyvs1, yysize * sizeof (*yyvsp), 780 &yyls1, yysize * sizeof (*yylsp), 781 &yystacksize); 782 yyls = yyls1; 783 # else 784 yyoverflow ("parser stack overflow", 785 &yyss1, yysize * sizeof (*yyssp), 786 &yyvs1, yysize * sizeof (*yyvsp), 787 &yystacksize); 788 # endif 789 yyss = yyss1; 790 yyvs = yyvs1; 791 } 616 792 #else /* no yyoverflow */ 793 # ifndef YYSTACK_RELOCATE 794 goto yyoverflowlab; 795 # else 617 796 /* Extend the stack our own way. */ 618 797 if (yystacksize >= YYMAXDEPTH) 619 { 620 yyerror("parser stack overflow"); 621 if (yyfree_stacks) 622 { 623 free (yyss); 624 free (yyvs); 625 #ifdef YYLSP_NEEDED 626 free (yyls); 627 #endif 628 } 629 return 2; 630 } 798 goto yyoverflowlab; 631 799 yystacksize *= 2; 632 800 if (yystacksize > YYMAXDEPTH) 633 801 yystacksize = YYMAXDEPTH; 634 #ifndef YYSTACK_USE_ALLOCA 635 yyfree_stacks = 1; 636 #endif 637 yyss = (short *) YYSTACK_ALLOC (yystacksize * sizeof (*yyssp)); 638 __yy_memcpy ((char *)yyss, (char *)yyss1, 639 size * (unsigned int) sizeof (*yyssp)); 640 yyvs = (YYSTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yyvsp)); 641 __yy_memcpy ((char *)yyvs, (char *)yyvs1, 642 size * (unsigned int) sizeof (*yyvsp)); 643 #ifdef YYLSP_NEEDED 644 yyls = (YYLTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yylsp)); 645 __yy_memcpy ((char *)yyls, (char *)yyls1, 646 size * (unsigned int) sizeof (*yylsp)); 647 #endif 802 803 { 804 short *yyss1 = yyss; 805 union yyalloc *yyptr = 806 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); 807 if (! yyptr) 808 goto yyoverflowlab; 809 YYSTACK_RELOCATE (yyss); 810 YYSTACK_RELOCATE (yyvs); 811 # if YYLSP_NEEDED 812 YYSTACK_RELOCATE (yyls); 813 # endif 814 # undef YYSTACK_RELOCATE 815 if (yyss1 != yyssa) 816 YYSTACK_FREE (yyss1); 817 } 818 # endif 648 819 #endif /* no yyoverflow */ 649 820 650 yyssp = yyss + size - 1; 651 yyvsp = yyvs + size - 1; 652 #ifdef YYLSP_NEEDED 653 yylsp = yyls + size - 1; 654 #endif 655 656 #if YYDEBUG != 0 657 if (yydebug) 658 fprintf(stderr, "Stack size increased to %d\n", yystacksize); 659 #endif 821 yyssp = yyss + yysize - 1; 822 yyvsp = yyvs + yysize - 1; 823 #if YYLSP_NEEDED 824 yylsp = yyls + yysize - 1; 825 #endif 826 827 YYDPRINTF ((stderr, "Stack size increased to %lu\n", 828 (unsigned long int) yystacksize)); 660 829 661 830 if (yyssp >= yyss + yystacksize - 1) … … 663 832 } 664 833 665 #if YYDEBUG != 0 666 if (yydebug) 667 fprintf(stderr, "Entering state %d\n", yystate); 668 #endif 834 YYDPRINTF ((stderr, "Entering state %d\n", yystate)); 669 835 670 836 goto yybackup; 671 yybackup: 837 838 839 /*-----------. 840 | yybackup. | 841 `-----------*/ 842 yybackup: 672 843 673 844 /* Do appropriate processing given the current state. */ … … 688 859 if (yychar == YYEMPTY) 689 860 { 690 #if YYDEBUG != 0 691 if (yydebug) 692 fprintf(stderr, "Reading a token: "); 693 #endif 861 YYDPRINTF ((stderr, "Reading a token: ")); 694 862 yychar = YYLEX; 695 863 } … … 702 870 yychar = YYEOF; /* Don't call YYLEX any more */ 703 871 704 #if YYDEBUG != 0 705 if (yydebug) 706 fprintf(stderr, "Now at end of input.\n"); 707 #endif 872 YYDPRINTF ((stderr, "Now at end of input.\n")); 708 873 } 709 874 else 710 875 { 711 yychar1 = YYTRANSLATE(yychar); 712 713 #if YYDEBUG != 0 876 yychar1 = YYTRANSLATE (yychar); 877 878 #if YYDEBUG 879 /* We have to keep this `#if YYDEBUG', since we use variables 880 which are defined only if `YYDEBUG' is set. */ 714 881 if (yydebug) 715 882 { 716 fprintf (stderr, "Next token is %d (%s", yychar, yytname[yychar1]); 717 /* Give the individual parser a way to print the precise meaning 718 of a token, for further debugging info. */ 719 #ifdef YYPRINT 883 YYFPRINTF (stderr, "Next token is %d (%s", 884 yychar, yytname[yychar1]); 885 /* Give the individual parser a way to print the precise 886 meaning of a token, for further debugging info. */ 887 # ifdef YYPRINT 720 888 YYPRINT (stderr, yychar, yylval); 721 # endif722 fprintf(stderr, ")\n");889 # endif 890 YYFPRINTF (stderr, ")\n"); 723 891 } 724 892 #endif … … 752 920 753 921 /* Shift the lookahead token. */ 754 755 #if YYDEBUG != 0 756 if (yydebug) 757 fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]); 758 #endif 922 YYDPRINTF ((stderr, "Shifting token %d (%s), ", 923 yychar, yytname[yychar1])); 759 924 760 925 /* Discard the token being shifted unless it is eof. */ … … 763 928 764 929 *++yyvsp = yylval; 765 #if defYYLSP_NEEDED930 #if YYLSP_NEEDED 766 931 *++yylsp = yylloc; 767 932 #endif 768 933 769 /* count tokens shifted since error; after three, turn off error status. */ 770 if (yyerrstatus) yyerrstatus--; 934 /* Count tokens shifted since error; after three, turn off error 935 status. */ 936 if (yyerrstatus) 937 yyerrstatus--; 771 938 772 939 yystate = yyn; 773 940 goto yynewstate; 774 941 775 /* Do the default action for the current state. */ 942 943 /*-----------------------------------------------------------. 944 | yydefault -- do the default action for the current state. | 945 `-----------------------------------------------------------*/ 776 946 yydefault: 777 778 947 yyn = yydefact[yystate]; 779 948 if (yyn == 0) 780 949 goto yyerrlab; 781 782 /* Do a reduction. yyn is the number of a rule to reduce with. */ 950 goto yyreduce; 951 952 953 /*-----------------------------. 954 | yyreduce -- Do a reduction. | 955 `-----------------------------*/ 783 956 yyreduce: 957 /* yyn is the number of a rule to reduce with. */ 784 958 yylen = yyr2[yyn]; 785 if (yylen > 0) 786 yyval = yyvsp[1-yylen]; /* implement default value of the action */ 787 788 #if YYDEBUG != 0 959 960 /* If YYLEN is nonzero, implement the default value of the action: 961 `$$ = $1'. 962 963 Otherwise, the following line sets YYVAL to the semantic value of 964 the lookahead token. This behavior is undocumented and Bison 965 users should not rely upon it. Assigning to YYVAL 966 unconditionally makes the parser a bit smaller, and it avoids a 967 GCC warning that YYVAL may be used uninitialized. */ 968 yyval = yyvsp[1-yylen]; 969 970 #if YYLSP_NEEDED 971 /* Similarly for the default location. Let the user run additional 972 commands if for instance locations are ranges. */ 973 yyloc = yylsp[1-yylen]; 974 YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen); 975 #endif 976 977 #if YYDEBUG 978 /* We have to keep this `#if YYDEBUG', since we use variables which 979 are defined only if `YYDEBUG' is set. */ 789 980 if (yydebug) 790 981 { 791 int i;792 793 fprintf(stderr, "Reducing via rule %d (line %d), ",794 982 int yyi; 983 984 YYFPRINTF (stderr, "Reducing via rule %d (line %d), ", 985 yyn, yyrline[yyn]); 795 986 796 987 /* Print the symbols being reduced, and their result. */ 797 for ( i = yyprhs[yyn]; yyrhs[i] > 0;i++)798 fprintf (stderr, "%s ", yytname[yyrhs[i]]);799 fprintf(stderr, " -> %s\n", yytname[yyr1[yyn]]);988 for (yyi = yyprhs[yyn]; yyrhs[yyi] > 0; yyi++) 989 YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]); 990 YYFPRINTF (stderr, " -> %s\n", yytname[yyr1[yyn]]); 800 991 } 801 992 #endif 802 803 993 804 994 switch (yyn) { … … 806 996 case 3: 807 997 #line 48 "defparse.y" 808 { def_name (yyvsp[-1].id, yyvsp[0].number); ;809 break; }998 { def_name (yyvsp[-1].id, yyvsp[0].number); } 999 break; 810 1000 case 4: 811 1001 #line 49 "defparse.y" 812 { def_library (yyvsp[-2].id, yyvsp[-1].number); ;813 break; }1002 { def_library (yyvsp[-2].id, yyvsp[-1].number); } 1003 break; 814 1004 case 6: 815 1005 #line 51 "defparse.y" 816 { def_description (yyvsp[0].id); ;817 break; }1006 { def_description (yyvsp[0].id);} 1007 break; 818 1008 case 7: 819 1009 #line 52 "defparse.y" 820 { def_stacksize (yyvsp[-1].number, yyvsp[0].number); ;821 break; }1010 { def_stacksize (yyvsp[-1].number, yyvsp[0].number);} 1011 break; 822 1012 case 8: 823 1013 #line 53 "defparse.y" 824 { def_heapsize (yyvsp[-1].number, yyvsp[0].number); ;825 break; }1014 { def_heapsize (yyvsp[-1].number, yyvsp[0].number);} 1015 break; 826 1016 case 9: 827 1017 #line 54 "defparse.y" 828 { def_code (yyvsp[0].number); ;829 break; }1018 { def_code (yyvsp[0].number);} 1019 break; 830 1020 case 10: 831 1021 #line 55 "defparse.y" 832 { def_data (yyvsp[0].number); ;833 break; }1022 { def_data (yyvsp[0].number);} 1023 break; 834 1024 case 13: 835 1025 #line 58 "defparse.y" 836 { def_version (yyvsp[0].number,0); ;837 break; }1026 { def_version (yyvsp[0].number,0);} 1027 break; 838 1028 case 14: 839 1029 #line 59 "defparse.y" 840 { def_version (yyvsp[-2].number,yyvsp[0].number); ;841 break; }1030 { def_version (yyvsp[-2].number,yyvsp[0].number);} 1031 break; 842 1032 case 17: 843 1033 #line 70 "defparse.y" 844 { def_exports (yyvsp[-5].id, yyvsp[-4].id, yyvsp[-3].number, yyvsp[-2].number, yyvsp[-1].number, yyvsp[0].number); ;845 break; }1034 { def_exports (yyvsp[-5].id, yyvsp[-4].id, yyvsp[-3].number, yyvsp[-2].number, yyvsp[-1].number, yyvsp[0].number);} 1035 break; 846 1036 case 20: 847 1037 #line 78 "defparse.y" 848 { def_import (yyvsp[-6].id,yyvsp[-4].id,yyvsp[-2].id,yyvsp[0].id, 0); ;849 break; }1038 { def_import (yyvsp[-6].id,yyvsp[-4].id,yyvsp[-2].id,yyvsp[0].id, 0); } 1039 break; 850 1040 case 21: 851 1041 #line 79 "defparse.y" 852 { def_import (yyvsp[-6].id,yyvsp[-4].id,yyvsp[-2].id, 0,yyvsp[0].number); ;853 break; }1042 { def_import (yyvsp[-6].id,yyvsp[-4].id,yyvsp[-2].id, 0,yyvsp[0].number); } 1043 break; 854 1044 case 22: 855 1045 #line 80 "defparse.y" 856 { def_import (yyvsp[-4].id,yyvsp[-2].id, 0,yyvsp[0].id, 0); ;857 break; }1046 { def_import (yyvsp[-4].id,yyvsp[-2].id, 0,yyvsp[0].id, 0); } 1047 break; 858 1048 case 23: 859 1049 #line 81 "defparse.y" 860 { def_import (yyvsp[-4].id,yyvsp[-2].id, 0, 0,yyvsp[0].number); ;861 break; }1050 { def_import (yyvsp[-4].id,yyvsp[-2].id, 0, 0,yyvsp[0].number); } 1051 break; 862 1052 case 24: 863 1053 #line 82 "defparse.y" 864 { def_import ( 0,yyvsp[-4].id,yyvsp[-2].id,yyvsp[0].id, 0); ;865 break; }1054 { def_import ( 0,yyvsp[-4].id,yyvsp[-2].id,yyvsp[0].id, 0); } 1055 break; 866 1056 case 25: 867 1057 #line 83 "defparse.y" 868 { def_import ( 0,yyvsp[-4].id,yyvsp[-2].id, 0,yyvsp[0].number); ;869 break; }1058 { def_import ( 0,yyvsp[-4].id,yyvsp[-2].id, 0,yyvsp[0].number); } 1059 break; 870 1060 case 26: 871 1061 #line 84 "defparse.y" 872 { def_import ( 0,yyvsp[-2].id, 0,yyvsp[0].id, 0); ;873 break; }1062 { def_import ( 0,yyvsp[-2].id, 0,yyvsp[0].id, 0); } 1063 break; 874 1064 case 27: 875 1065 #line 85 "defparse.y" 876 { def_import ( 0,yyvsp[-2].id, 0, 0,yyvsp[0].number); ;877 break; }1066 { def_import ( 0,yyvsp[-2].id, 0, 0,yyvsp[0].number); } 1067 break; 878 1068 case 30: 879 1069 #line 94 "defparse.y" 880 { def_section (yyvsp[-1].id,yyvsp[0].number); ;881 break; }1070 { def_section (yyvsp[-1].id,yyvsp[0].number);} 1071 break; 882 1072 case 35: 883 1073 #line 106 "defparse.y" 884 { yyval.number=yyvsp[0].number; ;885 break; }1074 { yyval.number=yyvsp[0].number;} 1075 break; 886 1076 case 36: 887 1077 #line 107 "defparse.y" 888 { yyval.number=-1; ;889 break; }1078 { yyval.number=-1;} 1079 break; 890 1080 case 37: 891 1081 #line 111 "defparse.y" 892 { yyval.number = 1; ;893 break; }1082 { yyval.number = 1; } 1083 break; 894 1084 case 38: 895 1085 #line 112 "defparse.y" 896 { yyval.number = 2; ;897 break; }1086 { yyval.number = 2; } 1087 break; 898 1088 case 39: 899 1089 #line 113 "defparse.y" 900 { yyval.number = 4; ;901 break; }1090 { yyval.number = 4; } 1091 break; 902 1092 case 40: 903 1093 #line 114 "defparse.y" 904 { yyval.number = 8; ;905 break; }1094 { yyval.number = 8; } 1095 break; 906 1096 case 41: 907 1097 #line 115 "defparse.y" 908 { yyval.number = 0; ;909 break; }1098 { yyval.number = 0; } 1099 break; 910 1100 case 42: 911 1101 #line 116 "defparse.y" 912 { yyval.number = 0; ;913 break; }1102 { yyval.number = 0; } 1103 break; 914 1104 case 43: 915 1105 #line 117 "defparse.y" 916 { yyval.number = 0; ;917 break; }1106 { yyval.number = 0; } 1107 break; 918 1108 case 44: 919 1109 #line 121 "defparse.y" 920 {yyval.number=1; ;921 break; }1110 {yyval.number=1;} 1111 break; 922 1112 case 45: 923 1113 #line 122 "defparse.y" 924 {yyval.number=0; ;925 break; }1114 {yyval.number=0;} 1115 break; 926 1116 case 46: 927 1117 #line 126 "defparse.y" 928 {yyval.number=1; ;929 break; }1118 {yyval.number=1;} 1119 break; 930 1120 case 47: 931 1121 #line 127 "defparse.y" 932 {yyval.number=0; ;933 break; }1122 {yyval.number=0;} 1123 break; 934 1124 case 48: 935 1125 #line 131 "defparse.y" 936 { yyval.number = 1; ;937 break; }1126 { yyval.number = 1; } 1127 break; 938 1128 case 49: 939 1129 #line 132 "defparse.y" 940 { yyval.number = 0; ;941 break; }1130 { yyval.number = 0; } 1131 break; 942 1132 case 50: 943 1133 #line 135 "defparse.y" 944 { yyval.id =yyvsp[0].id; ;945 break; }1134 { yyval.id =yyvsp[0].id; } 1135 break; 946 1136 case 51: 947 1137 #line 137 "defparse.y" … … 950 1140 sprintf (name, "%s.%s", yyvsp[-2].id, yyvsp[0].id); 951 1141 yyval.id = name; 952 ;953 break; }1142 } 1143 break; 954 1144 case 52: 955 1145 #line 142 "defparse.y" 956 { yyval.id=""; ;957 break; }1146 { yyval.id=""; } 1147 break; 958 1148 case 53: 959 1149 #line 146 "defparse.y" 960 { yyval.number=yyvsp[0].number; ;961 break; }1150 { yyval.number=yyvsp[0].number;} 1151 break; 962 1152 case 54: 963 1153 #line 147 "defparse.y" 964 { yyval.number=-1; ;965 break; }1154 { yyval.number=-1;} 1155 break; 966 1156 case 55: 967 1157 #line 151 "defparse.y" 968 { yyval.id = yyvsp[0].id; ;969 break; }1158 { yyval.id = yyvsp[0].id; } 1159 break; 970 1160 case 56: 971 #line 152 "defparse.y" 972 { yyval.id = 0; ; 973 break;} 1161 #line 153 "defparse.y" 1162 { 1163 char *name = xmalloc (strlen (yyvsp[-2].id) + 1 + strlen (yyvsp[0].id) + 1); 1164 sprintf (name, "%s.%s", yyvsp[-2].id, yyvsp[0].id); 1165 yyval.id = name; 1166 } 1167 break; 974 1168 case 57: 975 #line 15 5"defparse.y"976 { yyval. number= yyvsp[0].number;;977 break; }1169 #line 158 "defparse.y" 1170 { yyval.id = 0; } 1171 break; 978 1172 case 58: 979 #line 156 "defparse.y" 980 { yyval.number=-1;; 981 break;} 1173 #line 161 "defparse.y" 1174 { yyval.number= yyvsp[0].number;} 1175 break; 1176 case 59: 1177 #line 162 "defparse.y" 1178 { yyval.number=-1;} 1179 break; 982 1180 } 983 /* the action file gets copied in in place of this dollarsign */ 984 #line 543 "/usr/share/bison/bison.simple" 1181 1182 #line 705 "/usr/share/bison-1.35/bison.simple" 1183 985 1184 986 1185 987 1186 yyvsp -= yylen; 988 1187 yyssp -= yylen; 989 #if defYYLSP_NEEDED1188 #if YYLSP_NEEDED 990 1189 yylsp -= yylen; 991 1190 #endif 992 1191 993 #if YYDEBUG != 01192 #if YYDEBUG 994 1193 if (yydebug) 995 1194 { 996 short * ssp1 = yyss - 1;997 fprintf(stderr, "state stack now");998 while ( ssp1 != yyssp)999 fprintf (stderr, " %d", *++ssp1);1000 fprintf(stderr, "\n");1195 short *yyssp1 = yyss - 1; 1196 YYFPRINTF (stderr, "state stack now"); 1197 while (yyssp1 != yyssp) 1198 YYFPRINTF (stderr, " %d", *++yyssp1); 1199 YYFPRINTF (stderr, "\n"); 1001 1200 } 1002 1201 #endif 1003 1202 1004 1203 *++yyvsp = yyval; 1005 1006 #ifdef YYLSP_NEEDED 1007 yylsp++; 1008 if (yylen == 0) 1009 { 1010 yylsp->first_line = yylloc.first_line; 1011 yylsp->first_column = yylloc.first_column; 1012 yylsp->last_line = (yylsp-1)->last_line; 1013 yylsp->last_column = (yylsp-1)->last_column; 1014 yylsp->text = 0; 1015 } 1016 else 1017 { 1018 yylsp->last_line = (yylsp+yylen-1)->last_line; 1019 yylsp->last_column = (yylsp+yylen-1)->last_column; 1020 } 1021 #endif 1022 1023 /* Now "shift" the result of the reduction. 1024 Determine what state that goes to, 1025 based on the state we popped back to 1026 and the rule number reduced by. */ 1204 #if YYLSP_NEEDED 1205 *++yylsp = yyloc; 1206 #endif 1207 1208 /* Now `shift' the result of the reduction. Determine what state 1209 that goes to, based on the state we popped back to and the rule 1210 number reduced by. */ 1027 1211 1028 1212 yyn = yyr1[yyn]; … … 1036 1220 goto yynewstate; 1037 1221 1038 yyerrlab: /* here on detecting error */ 1039 1040 if (! yyerrstatus) 1041 /* If not already recovering from an error, report this error. */ 1222 1223 /*------------------------------------. 1224 | yyerrlab -- here on detecting error | 1225 `------------------------------------*/ 1226 yyerrlab: 1227 /* If not already recovering from an error, report this error. */ 1228 if (!yyerrstatus) 1042 1229 { 1043 1230 ++yynerrs; … … 1048 1235 if (yyn > YYFLAG && yyn < YYLAST) 1049 1236 { 1050 int size = 0; 1051 char *msg; 1052 int x, count; 1053 1054 count = 0; 1055 /* Start X at -yyn if nec to avoid negative indexes in yycheck. */ 1056 for (x = (yyn < 0 ? -yyn : 0); 1057 x < (sizeof(yytname) / sizeof(char *)); x++) 1058 if (yycheck[x + yyn] == x) 1059 size += strlen(yytname[x]) + 15, count++; 1060 msg = (char *) malloc(size + 15); 1061 if (msg != 0) 1237 YYSIZE_T yysize = 0; 1238 char *yymsg; 1239 int yyx, yycount; 1240 1241 yycount = 0; 1242 /* Start YYX at -YYN if negative to avoid negative indexes in 1243 YYCHECK. */ 1244 for (yyx = yyn < 0 ? -yyn : 0; 1245 yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++) 1246 if (yycheck[yyx + yyn] == yyx) 1247 yysize += yystrlen (yytname[yyx]) + 15, yycount++; 1248 yysize += yystrlen ("parse error, unexpected ") + 1; 1249 yysize += yystrlen (yytname[YYTRANSLATE (yychar)]); 1250 yymsg = (char *) YYSTACK_ALLOC (yysize); 1251 if (yymsg != 0) 1062 1252 { 1063 strcpy(msg, "parse error"); 1064 1065 if (count < 5) 1253 char *yyp = yystpcpy (yymsg, "parse error, unexpected "); 1254 yyp = yystpcpy (yyp, yytname[YYTRANSLATE (yychar)]); 1255 1256 if (yycount < 5) 1066 1257 { 1067 count = 0; 1068 for (x = (yyn < 0 ? -yyn : 0); 1069 x < (sizeof(yytname) / sizeof(char *)); x++) 1070 if (yycheck[x + yyn] == x) 1258 yycount = 0; 1259 for (yyx = yyn < 0 ? -yyn : 0; 1260 yyx < (int) (sizeof (yytname) / sizeof (char *)); 1261 yyx++) 1262 if (yycheck[yyx + yyn] == yyx) 1071 1263 { 1072 strcat(msg, count == 0 ? ", expecting `" : " or `");1073 strcat(msg, yytname[x]);1074 strcat(msg, "'");1075 count++;1264 const char *yyq = ! yycount ? ", expecting " : " or "; 1265 yyp = yystpcpy (yyp, yyq); 1266 yyp = yystpcpy (yyp, yytname[yyx]); 1267 yycount++; 1076 1268 } 1077 1269 } 1078 yyerror (msg);1079 free(msg);1270 yyerror (yymsg); 1271 YYSTACK_FREE (yymsg); 1080 1272 } 1081 1273 else 1082 yyerror ("parse error; also virtual memory ex ceeded");1274 yyerror ("parse error; also virtual memory exhausted"); 1083 1275 } 1084 1276 else 1085 #endif /* YYERROR_VERBOSE*/1086 yyerror ("parse error");1277 #endif /* defined (YYERROR_VERBOSE) */ 1278 yyerror ("parse error"); 1087 1279 } 1088 1089 1280 goto yyerrlab1; 1090 yyerrlab1: /* here on error raised explicitly by an action */ 1091 1281 1282 1283 /*--------------------------------------------------. 1284 | yyerrlab1 -- error raised explicitly by an action | 1285 `--------------------------------------------------*/ 1286 yyerrlab1: 1092 1287 if (yyerrstatus == 3) 1093 1288 { 1094 /* if just tried and failed to reuse lookahead token after an error, discard it. */ 1289 /* If just tried and failed to reuse lookahead token after an 1290 error, discard it. */ 1095 1291 1096 1292 /* return failure if at end of input */ 1097 1293 if (yychar == YYEOF) 1098 1294 YYABORT; 1099 1100 #if YYDEBUG != 0 1101 if (yydebug) 1102 fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]); 1103 #endif 1104 1295 YYDPRINTF ((stderr, "Discarding token %d (%s).\n", 1296 yychar, yytname[yychar1])); 1105 1297 yychar = YYEMPTY; 1106 1298 } 1107 1299 1108 /* Else will try to reuse lookahead token 1109 after shifting the errortoken. */1300 /* Else will try to reuse lookahead token after shifting the error 1301 token. */ 1110 1302 1111 1303 yyerrstatus = 3; /* Each real token shifted decrements this */ … … 1113 1305 goto yyerrhandle; 1114 1306 1115 yyerrdefault: /* current state does not do anything special for the error token. */ 1116 1307 1308 /*-------------------------------------------------------------------. 1309 | yyerrdefault -- current state does not do anything special for the | 1310 | error token. | 1311 `-------------------------------------------------------------------*/ 1312 yyerrdefault: 1117 1313 #if 0 1118 1314 /* This is wrong; only states that explicitly want error tokens 1119 1315 should shift them. */ 1120 yyn = yydefact[yystate]; /* If its default is to accept any token, ok. Otherwise pop it.*/ 1121 if (yyn) goto yydefault; 1122 #endif 1123 1124 yyerrpop: /* pop the current state because it cannot handle the error token */ 1125 1126 if (yyssp == yyss) YYABORT; 1316 1317 /* If its default is to accept any token, ok. Otherwise pop it. */ 1318 yyn = yydefact[yystate]; 1319 if (yyn) 1320 goto yydefault; 1321 #endif 1322 1323 1324 /*---------------------------------------------------------------. 1325 | yyerrpop -- pop the current state because it cannot handle the | 1326 | error token | 1327 `---------------------------------------------------------------*/ 1328 yyerrpop: 1329 if (yyssp == yyss) 1330 YYABORT; 1127 1331 yyvsp--; 1128 1332 yystate = *--yyssp; 1129 #if defYYLSP_NEEDED1333 #if YYLSP_NEEDED 1130 1334 yylsp--; 1131 1335 #endif 1132 1336 1133 #if YYDEBUG != 01337 #if YYDEBUG 1134 1338 if (yydebug) 1135 1339 { 1136 short * ssp1 = yyss - 1;1137 fprintf(stderr, "Error: state stack now");1138 while ( ssp1 != yyssp)1139 fprintf (stderr, " %d", *++ssp1);1140 fprintf(stderr, "\n");1340 short *yyssp1 = yyss - 1; 1341 YYFPRINTF (stderr, "Error: state stack now"); 1342 while (yyssp1 != yyssp) 1343 YYFPRINTF (stderr, " %d", *++yyssp1); 1344 YYFPRINTF (stderr, "\n"); 1141 1345 } 1142 1346 #endif 1143 1347 1348 /*--------------. 1349 | yyerrhandle. | 1350 `--------------*/ 1144 1351 yyerrhandle: 1145 1146 1352 yyn = yypact[yystate]; 1147 1353 if (yyn == YYFLAG) … … 1166 1372 YYACCEPT; 1167 1373 1168 #if YYDEBUG != 0 1169 if (yydebug) 1170 fprintf(stderr, "Shifting error token, "); 1171 #endif 1374 YYDPRINTF ((stderr, "Shifting error token, ")); 1172 1375 1173 1376 *++yyvsp = yylval; 1174 #if defYYLSP_NEEDED1377 #if YYLSP_NEEDED 1175 1378 *++yylsp = yylloc; 1176 1379 #endif … … 1179 1382 goto yynewstate; 1180 1383 1181 yyacceptlab: 1182 /* YYACCEPT comes here. */ 1183 if (yyfree_stacks) 1184 { 1185 free (yyss); 1186 free (yyvs); 1187 #ifdef YYLSP_NEEDED 1188 free (yyls); 1189 #endif 1190 } 1191 return 0; 1192 1193 yyabortlab: 1194 /* YYABORT comes here. */ 1195 if (yyfree_stacks) 1196 { 1197 free (yyss); 1198 free (yyvs); 1199 #ifdef YYLSP_NEEDED 1200 free (yyls); 1201 #endif 1202 } 1203 return 1; 1384 1385 /*-------------------------------------. 1386 | yyacceptlab -- YYACCEPT comes here. | 1387 `-------------------------------------*/ 1388 yyacceptlab: 1389 yyresult = 0; 1390 goto yyreturn; 1391 1392 /*-----------------------------------. 1393 | yyabortlab -- YYABORT comes here. | 1394 `-----------------------------------*/ 1395 yyabortlab: 1396 yyresult = 1; 1397 goto yyreturn; 1398 1399 /*---------------------------------------------. 1400 | yyoverflowab -- parser overflow comes here. | 1401 `---------------------------------------------*/ 1402 yyoverflowlab: 1403 yyerror ("parser stack overflow"); 1404 yyresult = 2; 1405 /* Fall through. */ 1406 1407 yyreturn: 1408 #ifndef yyoverflow 1409 if (yyss != yyssa) 1410 YYSTACK_FREE (yyss); 1411 #endif 1412 return yyresult; 1204 1413 } 1205 #line 17 0"defparse.y"1414 #line 176 "defparse.y" -
Property cvs2svn:cvs-rev
changed from
Note:
See TracChangeset
for help on using the changeset viewer.