modules/up/src/rpsl/rpsl/rpsl.y.cc
/* [<][>][^][v][top][bottom][index][help] */
FUNCTIONS
This source file includes following functions.
- YYTRANSLATE
- YYRECOVERING
- YYBACKUP
- __yy_memcpy
- __yy_memcpy
- __yy_memcpy
- yyparse
- enable_yy_parser_debugging
- handleArgumentTypeError
- searchMethod
1
2 /* A Bison parser, made from rpsl.y
3 by GNU Bison version 1.25
4 */
5
6 #define YYBISON 1 /* Identify Bison output. */
7
8 #define yyparse rpslparse
9 #define yylex rpsllex
10 #define yyerror rpslerror
11 #define yylval rpsllval
12 #define yychar rpslchar
13 #define yydebug rpsldebug
14 #define yynerrs rpslnerrs
15 #define KEYW_TRUE 258
16 #define KEYW_FALSE 259
17 #define KEYW_ACTION 260
18 #define KEYW_ACCEPT 261
19 #define KEYW_ANNOUNCE 262
20 #define KEYW_FROM 263
21 #define KEYW_TO 264
22 #define KEYW_AT 265
23 #define KEYW_ANY 266
24 #define KEYW_REFINE 267
25 #define KEYW_EXCEPT 268
26 #define KEYW_STATIC 269
27 #define KEYW_NETWORKS 270
28 #define KEYW_MASKLEN 271
29 #define KEYW_UNION 272
30 #define KEYW_RANGE 273
31 #define KEYW_LIST 274
32 #define KEYW_OF 275
33 #define KEYW_OPERATOR 276
34 #define KEYW_SYNTAX 277
35 #define KEYW_SPECIAL 278
36 #define KEYW_OPTIONAL 279
37 #define KEYW_MANDATORY 280
38 #define KEYW_INTERNAL 281
39 #define KEYW_SINGLEVALUED 282
40 #define KEYW_MULTIVALUED 283
41 #define KEYW_LOOKUP 284
42 #define KEYW_KEY 285
43 #define KEYW_DELETED 286
44 #define KEYW_GENERATED 287
45 #define KEYW_OBSOLETE 288
46 #define KEYW_PEERAS 289
47 #define KEYW_PROTOCOL 290
48 #define KEYW_INTO 291
49 #define KEYW_ATOMIC 292
50 #define KEYW_INBOUND 293
51 #define KEYW_OUTBOUND 294
52 #define KEYW_UPON 295
53 #define KEYW_HAVE_COMPONENTS 296
54 #define KEYW_EXCLUDE 297
55 #define KEYW_NONE 298
56 #define KEYW_MAILFROM 299
57 #define KEYW_CRYPTPW 300
58 #define KEYW_ASSIGNED 301
59 #define KEYW_ALLOCATED 302
60 #define KEYW_PI 303
61 #define KEYW_PA 304
62 #define KEYW_UNSPECIFIED 305
63 #define KEYW_EXT 306
64 #define KEYW_SIMPLE 307
65 #define KEYW_RIPE 308
66 #define KEYW_INTERNIC 309
67 #define KEYW_CLIENTADDRESS 310
68 #define TKN_ERROR 311
69 #define TKN_UNKNOWN_CLASS 312
70 #define TKN_EOA 313
71 #define TKN_EOO 314
72 #define TKN_FREETEXT 315
73 #define TKN_INT 316
74 #define TKN_REAL 317
75 #define TKN_STRING 318
76 #define TKN_TIMESTAMP 319
77 #define TKN_BLOB 320
78 #define TKN_IPV4 321
79 #define TKN_PRFXV6 322
80 #define TKN_PRFXV4 323
81 #define TKN_PRFXV4RNG 324
82 #define TKN_ASNO 325
83 #define TKN_ASNAME 326
84 #define TKN_RSNAME 327
85 #define TKN_RTRSNAME 328
86 #define TKN_PRNGNAME 329
87 #define TKN_FLTRNAME 330
88 #define TKN_BOOLEAN 331
89 #define TKN_WORD 332
90 #define TKN_RP_ATTR 333
91 #define TKN_DNS 334
92 #define TKN_EMAIL 335
93 #define TKN_3DOTS 336
94 #define TKN_NICHDL 337
95 #define TKN_KEYCRTNAME 338
96 #define TKN_CRYPTEDPW 339
97 #define ATTR_GENERIC 340
98 #define ATTR_BLOBS 341
99 #define ATTR_IMPORT 342
100 #define ATTR_EXPORT 343
101 #define ATTR_DEFAULT 344
102 #define ATTR_FREETEXT 345
103 #define ATTR_CHANGED 346
104 #define ATTR_IFADDR 347
105 #define ATTR_PEER 348
106 #define ATTR_INJECT 349
107 #define ATTR_COMPONENTS 350
108 #define ATTR_AGGR_MTD 351
109 #define ATTR_AGGR_BNDRY 352
110 #define ATTR_RS_MEMBERS 353
111 #define ATTR_RP_ATTR 354
112 #define ATTR_TYPEDEF 355
113 #define ATTR_PROTOCOL 356
114 #define ATTR_FILTER 357
115 #define ATTR_PEERING 358
116 #define ATTR_ATTR 359
117 #define ATTR_MNT_ROUTES 360
118 #define ATTR_NICHDL 361
119 #define ATTR_AUTH 362
120 #define ATTR_STATUS_INET 363
121 #define ATTR_PHONE 364
122 #define ATTR_SOURCE 365
123 #define ATTR_REFER 366
124 #define ATTR_COUNTRY 367
125 #define ATTR_PERSON 368
126 #define OP_OR 369
127 #define OP_AND 370
128 #define OP_NOT 371
129 #define OP_MS 372
130 #define TKN_OPERATOR 373
131
132 #line 1 "rpsl.y"
133
134 // $Id: rpsl.y.cc,v 1.7 2001/04/04 09:37:28 engin Exp $
135 //
136 // Copyright (c) 1994 by the University of Southern California
137 // All rights reserved.
138 //
139 // Permission to use, copy, modify, and distribute this software and its
140 // documentation in source and binary forms for lawful non-commercial
141 // purposes and without fee is hereby granted, provided that the above
142 // copyright notice appear in all copies and that both the copyright
143 // notice and this permission notice appear in supporting documentation,
144 // and that any documentation, advertising materials, and other materials
145 // related to such distribution and use acknowledge that the software was
146 // developed by the University of Southern California, Information
147 // Sciences Institute. The name of the USC may not be used to endorse or
148 // promote products derived from this software without specific prior
149 // written permission.
150 //
151 // THE UNIVERSITY OF SOUTHERN CALIFORNIA DOES NOT MAKE ANY
152 // REPRESENTATIONS ABOUT THE SUITABILITY OF THIS SOFTWARE FOR ANY
153 // PURPOSE. THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
154 // IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
155 // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE,
156 // TITLE, AND NON-INFRINGEMENT.
157 //
158 // IN NO EVENT SHALL USC, OR ANY OTHER CONTRIBUTOR BE LIABLE FOR ANY
159 // SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES, WHETHER IN CONTRACT, TORT,
160 // OR OTHER FORM OF ACTION, ARISING OUT OF OR IN CONNECTION WITH, THE USE
161 // OR PERFORMANCE OF THIS SOFTWARE.
162 //
163 // Questions concerning this software should be directed to
164 // ratoolset@isi.edu.
165 //
166 // Author(s): Cengiz Alaettinoglu <cengiz@ISI.EDU>
167
168 #include "config.h"
169 #include "time.h"
170 #include "schema.hh"
171 #include "object.hh"
172 #include "regexp.hh"
173 #include "rptype.hh"
174
175 #ifdef DEBUG
176 #define YYDEBUG 1
177 #endif // DEBUG
178 #if YYDEBUG != 0
179 // stdio is needed for yydebug
180 #include <cstdio>
181 #endif
182
183 extern void handle_error(char *, ...);
184 extern void handle_object_error(char *, ...);
185 extern void handle_warning(char *, ...);
186 extern int yylex();
187 char *token_name(int token_id);
188 void rpslerror(char *s, ...);
189 Attr *changeCurrentAttr(Attr *b);
190 void handleArgumentTypeError(char *attr, char *method, int position,
191 const RPType *correctType,
192 bool isOperator = false);
193 const AttrMethod *searchMethod(const AttrRPAttr *rp_attr, char *method, ItemList *args);
194
195 /* argument to yyparse result of parsing should be stored here */
196 #define YYPARSE_PARAM object
197 #define yyschema schema
198 #define enable_yy_parser_debugging enable_rpsl_parser_debugging
199
200 extern Object *current_object;
201
202
203 #line 74 "rpsl.y"
204 typedef union {
205 long long int i;
206 double real;
207 char *string;
208 void *ptr;
209 time_t time;
210 Item *item;
211 ItemList *list;
212 regexp *re;
213 SymID sid;
214 IPAddr *ip;
215 Prefix *prfx;
216 PrefixRange *prfxrng;
217 RPType *typenode;
218
219 Filter *filter;
220 FilterMS *moreSpecOp;
221 PolicyPeering *peering;
222 PolicyActionList *actionList;
223 PolicyAction *actionNode;
224 PolicyFactor *policyFactor;
225 PolicyTerm *policyTerm;
226 PolicyExpr *policyExpr;
227 List<PolicyPeeringAction> *peeringActionList;
228
229 Attr *attr;
230 AttrAttr *rpslattr;
231 AttrMethod *method;
232 const AttrRPAttr *rp_attr;
233 const AttrProtocol *protocol;
234 AttrProtocolOption *protocol_option;
235 List<AttrProtocolOption> *protocol_option_list;
236
237 AttrPeerOption *peer_option;
238 List<AttrPeerOption> *peer_option_list;
239
240 List<RPTypeNode> *typelist;
241 List<AttrMethod> *methodlist;
242 List<WordNode> *wordlist;
243
244 List<AttrMntRoutes::MntPrfxPair> *listMntPrfxPair;
245 AttrMntRoutes::MntPrfxPair *mntPrfxPair;
246 } YYSTYPE;
247 #include <stdio.h>
248
249 #ifndef __cplusplus
250 #ifndef __STDC__
251 #define const
252 #endif
253 #endif
254
255
256
257 #define YYFINAL 743
258 #define YYFLAG -32768
259 #define YYNTBASE 138
260
261 #define YYTRANSLATE(x) ((unsigned)(x) <= 373 ? yytranslate[x] : 262)
/* [<][>][^][v][top][bottom][index][help] */
262
263 static const short yytranslate[] = { 0,
264 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
265 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
266 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
267 2, 2, 2, 2, 2, 137, 2, 2, 2, 120,
268 121, 134, 119, 124, 123, 122, 2, 2, 2, 2,
269 2, 2, 2, 2, 2, 2, 2, 125, 128, 131,
270 2, 132, 135, 2, 2, 2, 2, 2, 2, 2,
271 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
272 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
273 129, 2, 130, 136, 2, 2, 2, 2, 2, 2,
274 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
275 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
276 2, 2, 126, 133, 127, 2, 2, 2, 2, 2,
277 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
278 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
279 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
280 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
281 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
282 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
283 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
284 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
285 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
286 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
287 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
288 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
289 2, 2, 2, 2, 2, 1, 2, 3, 4, 5,
290 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
291 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
292 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
293 36, 37, 38, 39, 40, 41, 42, 43, 44, 45,
294 46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
295 56, 57, 58, 59, 60, 61, 62, 63, 64, 65,
296 66, 67, 68, 69, 70, 71, 72, 73, 74, 75,
297 76, 77, 78, 79, 80, 81, 82, 83, 84, 85,
298 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
299 96, 97, 98, 99, 100, 101, 102, 103, 104, 105,
300 106, 107, 108, 109, 110, 111, 112, 113, 114, 115,
301 116, 117, 118
302 };
303
304 #if YYDEBUG != 0
305 static const short yyprhs[] = { 0,
306 0, 3, 6, 9, 11, 13, 15, 16, 18, 21,
307 23, 25, 27, 29, 31, 33, 35, 37, 39, 41,
308 43, 45, 47, 49, 51, 53, 55, 57, 59, 61,
309 63, 65, 67, 69, 71, 73, 75, 77, 79, 82,
310 85, 90, 94, 98, 102, 106, 110, 115, 120, 124,
311 128, 133, 138, 143, 148, 153, 157, 162, 171, 179,
312 191, 195, 197, 200, 204, 208, 212, 216, 221, 227,
313 232, 238, 243, 249, 254, 260, 264, 268, 272, 277,
314 281, 283, 286, 289, 293, 297, 298, 300, 302, 306,
315 310, 314, 316, 319, 321, 325, 327, 329, 331, 333,
316 335, 337, 339, 341, 343, 347, 353, 357, 363, 365,
317 367, 369, 371, 373, 375, 377, 379, 381, 383, 385,
318 387, 391, 395, 397, 399, 401, 403, 405, 407, 409,
319 411, 413, 415, 417, 419, 421, 423, 425, 427, 429,
320 431, 433, 435, 437, 439, 441, 443, 445, 447, 449,
321 451, 453, 455, 457, 459, 461, 463, 465, 467, 469,
322 471, 473, 475, 477, 479, 481, 483, 485, 487, 489,
323 491, 493, 495, 497, 499, 501, 503, 505, 507, 509,
324 511, 513, 515, 517, 519, 521, 523, 524, 526, 530,
325 532, 536, 540, 542, 546, 548, 550, 552, 553, 555,
326 556, 559, 563, 565, 569, 573, 575, 579, 581, 583,
327 585, 587, 591, 593, 594, 597, 599, 602, 610, 615,
328 621, 627, 629, 633, 636, 638, 642, 644, 647, 651,
329 653, 655, 659, 661, 663, 665, 668, 670, 672, 674,
330 676, 678, 682, 683, 685, 687, 691, 693, 695, 699,
331 701, 704, 706, 709, 712, 715, 717, 719, 721, 725,
332 727, 729, 731, 733, 735, 739, 744, 745, 748, 751,
333 754, 759, 762, 769, 773, 778, 783, 787, 792, 796,
334 801, 805, 808, 812, 816, 819, 823, 826, 830, 833,
335 837, 839, 843, 847, 849, 853, 857, 858, 861, 862,
336 865, 871, 877, 881, 887, 893, 897, 898, 901, 908,
337 914, 918, 922, 926, 930, 934, 941, 948, 954, 959,
338 963, 964, 966, 968, 972, 977, 979, 981, 983, 985,
339 991, 997, 1002, 1006, 1010, 1014, 1018, 1023, 1028, 1033,
340 1037, 1038, 1041, 1045, 1047, 1051, 1053, 1057, 1059, 1061,
341 1066, 1071, 1077, 1081, 1082, 1084, 1085, 1087, 1092, 1097,
342 1101, 1102, 1104, 1106, 1110, 1112, 1115, 1117, 1120, 1122,
343 1125, 1127, 1129, 1133, 1137, 1142, 1147, 1151, 1153, 1156,
344 1160, 1165, 1172, 1178, 1186, 1190, 1195, 1199, 1202, 1207,
345 1211, 1213, 1217, 1220, 1224, 1226, 1233, 1240, 1245, 1254,
346 1258, 1263, 1265, 1269, 1274, 1279, 1283, 1284, 1287, 1290,
347 1293, 1294, 1296, 1298, 1302, 1306, 1311, 1318, 1320, 1322,
348 1324, 1326, 1328, 1330, 1332, 1334, 1336, 1338, 1343, 1348,
349 1352, 1356, 1358, 1362, 1364, 1367
350 };
351
352 static const short yyrhs[] = { 139,
353 59, 0, 57, 59, 0, 1, 59, 0, 139, 0,
354 57, 0, 1, 0, 0, 140, 0, 139, 140, 0,
355 153, 0, 156, 0, 141, 0, 218, 0, 219, 0,
356 221, 0, 229, 0, 224, 0, 240, 0, 237, 0,
357 231, 0, 230, 0, 248, 0, 252, 0, 245, 0,
358 244, 0, 222, 0, 223, 0, 258, 0, 152, 0,
359 259, 0, 142, 0, 143, 0, 144, 0, 145, 0,
360 147, 0, 148, 0, 149, 0, 150, 0, 56, 58,
361 0, 1, 58, 0, 91, 80, 61, 58, 0, 91,
362 80, 58, 0, 91, 1, 58, 0, 106, 82, 58,
363 0, 106, 1, 58, 0, 107, 162, 58, 0, 107,
364 163, 80, 58, 0, 107, 164, 84, 58, 0, 107,
365 83, 58, 0, 107, 1, 58, 0, 108, 165, 167,
366 58, 0, 108, 165, 168, 58, 0, 108, 166, 167,
367 58, 0, 108, 166, 168, 58, 0, 108, 166, 169,
368 58, 0, 108, 1, 58, 0, 109, 119, 146, 58,
369 0, 109, 119, 146, 120, 146, 121, 146, 58, 0,
370 109, 119, 146, 170, 122, 146, 58, 0, 109, 119,
371 146, 120, 146, 121, 146, 170, 122, 146, 58, 0,
372 109, 1, 58, 0, 61, 0, 146, 61, 0, 146,
373 123, 61, 0, 146, 122, 61, 0, 110, 160, 58,
374 0, 110, 1, 58, 0, 111, 171, 79, 58, 0,
375 111, 171, 79, 61, 58, 0, 111, 172, 79, 58,
376 0, 111, 172, 79, 61, 58, 0, 111, 173, 79,
377 58, 0, 111, 173, 79, 61, 58, 0, 111, 174,
378 79, 58, 0, 111, 174, 79, 61, 58, 0, 111,
379 1, 58, 0, 112, 160, 58, 0, 112, 1, 58,
380 0, 113, 160, 151, 58, 0, 113, 1, 58, 0,
381 160, 0, 151, 160, 0, 90, 58, 0, 85, 154,
382 58, 0, 85, 1, 58, 0, 0, 155, 0, 158,
383 0, 155, 124, 158, 0, 86, 157, 58, 0, 86,
384 1, 58, 0, 158, 0, 157, 158, 0, 159, 0,
385 159, 123, 159, 0, 70, 0, 61, 0, 62, 0,
386 63, 0, 64, 0, 66, 0, 68, 0, 67, 0,
387 69, 0, 66, 125, 61, 0, 66, 125, 61, 125,
388 61, 0, 79, 125, 61, 0, 79, 125, 61, 125,
389 61, 0, 71, 0, 72, 0, 73, 0, 74, 0,
390 75, 0, 76, 0, 77, 0, 161, 0, 79, 0,
391 80, 0, 83, 0, 65, 0, 126, 154, 127, 0,
392 120, 190, 121, 0, 77, 0, 70, 0, 71, 0,
393 72, 0, 73, 0, 74, 0, 75, 0, 82, 0,
394 76, 0, 161, 0, 172, 0, 173, 0, 171, 0,
395 174, 0, 3, 0, 4, 0, 5, 0, 6, 0,
396 7, 0, 8, 0, 9, 0, 10, 0, 11, 0,
397 12, 0, 13, 0, 14, 0, 15, 0, 16, 0,
398 17, 0, 18, 0, 19, 0, 20, 0, 21, 0,
399 22, 0, 23, 0, 24, 0, 25, 0, 26, 0,
400 31, 0, 27, 0, 32, 0, 28, 0, 29, 0,
401 30, 0, 33, 0, 34, 0, 35, 0, 36, 0,
402 37, 0, 38, 0, 39, 0, 43, 0, 44, 0,
403 45, 0, 46, 0, 47, 0, 48, 0, 49, 0,
404 50, 0, 51, 0, 52, 0, 53, 0, 54, 0,
405 55, 0, 0, 176, 0, 176, 114, 177, 0, 177,
406 0, 177, 115, 178, 0, 177, 13, 178, 0, 178,
407 0, 120, 176, 121, 0, 179, 0, 70, 0, 71,
408 0, 0, 182, 0, 0, 10, 182, 0, 182, 114,
409 183, 0, 183, 0, 183, 115, 184, 0, 183, 13,
410 184, 0, 184, 0, 120, 182, 121, 0, 185, 0,
411 66, 0, 79, 0, 73, 0, 176, 180, 181, 0,
412 74, 0, 0, 5, 188, 0, 189, 0, 188, 189,
413 0, 78, 122, 77, 120, 154, 121, 128, 0, 78,
414 118, 158, 128, 0, 78, 120, 154, 121, 128, 0,
415 78, 129, 154, 130, 128, 0, 128, 0, 190, 114,
416 191, 0, 190, 191, 0, 191, 0, 191, 115, 192,
417 0, 192, 0, 116, 192, 0, 120, 190, 121, 0,
418 193, 0, 11, 0, 131, 199, 132, 0, 205, 0,
419 75, 0, 194, 0, 195, 117, 0, 195, 0, 70,
420 0, 34, 0, 71, 0, 72, 0, 126, 196, 127,
421 0, 0, 197, 0, 198, 0, 197, 124, 198, 0,
422 68, 0, 69, 0, 199, 133, 200, 0, 200, 0,
423 200, 201, 0, 201, 0, 201, 134, 0, 201, 135,
424 0, 201, 119, 0, 202, 0, 136, 0, 137, 0,
425 120, 199, 121, 0, 203, 0, 70, 0, 34, 0,
426 71, 0, 122, 0, 129, 204, 130, 0, 129, 136,
427 204, 130, 0, 0, 204, 70, 0, 204, 34, 0,
428 204, 122, 0, 204, 70, 123, 70, 0, 204, 71,
429 0, 78, 122, 77, 120, 154, 121, 0, 78, 118,
430 158, 0, 78, 120, 154, 121, 0, 78, 129, 154,
431 130, 0, 8, 186, 187, 0, 206, 8, 186, 187,
432 0, 9, 186, 187, 0, 207, 9, 186, 187, 0,
433 206, 6, 190, 0, 208, 128, 0, 209, 208, 128,
434 0, 207, 7, 190, 0, 210, 128, 0, 211, 210,
435 128, 0, 208, 128, 0, 126, 209, 127, 0, 210,
436 128, 0, 126, 211, 127, 0, 212, 0, 212, 12,
437 214, 0, 212, 13, 214, 0, 213, 0, 213, 12,
438 215, 0, 213, 13, 215, 0, 0, 35, 160, 0,
439 0, 36, 160, 0, 87, 216, 217, 214, 58, 0,
440 87, 216, 217, 208, 58, 0, 87, 1, 58, 0,
441 88, 216, 217, 215, 58, 0, 88, 216, 217, 210,
442 58, 0, 88, 1, 58, 0, 0, 15, 190, 0,
443 89, 9, 186, 187, 220, 58, 0, 89, 9, 186,
444 1, 58, 0, 89, 1, 58, 0, 102, 190, 58,
445 0, 102, 1, 58, 0, 103, 186, 58, 0, 103,
446 1, 58, 0, 92, 66, 16, 61, 187, 58, 0,
447 92, 66, 16, 61, 1, 58, 0, 92, 66, 16,
448 1, 58, 0, 92, 66, 1, 58, 0, 92, 1,
449 58, 0, 0, 226, 0, 227, 0, 226, 124, 227,
450 0, 160, 120, 154, 121, 0, 66, 0, 79, 0,
451 73, 0, 74, 0, 93, 160, 228, 225, 58, 0,
452 93, 160, 66, 1, 58, 0, 93, 160, 1, 58,
453 0, 93, 1, 58, 0, 97, 176, 58, 0, 97,
454 1, 58, 0, 96, 38, 58, 0, 96, 39, 175,
455 58, 0, 96, 39, 1, 58, 0, 96, 38, 1,
456 58, 0, 96, 1, 58, 0, 0, 40, 233, 0,
457 233, 114, 234, 0, 234, 0, 234, 115, 235, 0,
458 235, 0, 120, 233, 121, 0, 236, 0, 14, 0,
459 41, 126, 196, 127, 0, 42, 126, 196, 127, 0,
460 94, 181, 187, 232, 58, 0, 94, 1, 58, 0,
461 0, 37, 0, 0, 190, 0, 239, 35, 160, 190,
462 0, 95, 238, 239, 58, 0, 95, 1, 58, 0,
463 0, 242, 0, 243, 0, 242, 124, 243, 0, 70,
464 0, 70, 117, 0, 71, 0, 71, 117, 0, 72,
465 0, 72, 117, 0, 68, 0, 69, 0, 98, 241,
466 58, 0, 98, 1, 58, 0, 99, 77, 246, 58,
467 0, 99, 78, 246, 58, 0, 99, 1, 58, 0,
468 247, 0, 246, 247, 0, 77, 120, 121, 0, 77,
469 120, 249, 121, 0, 77, 120, 249, 124, 81, 121,
470 0, 21, 118, 120, 249, 121, 0, 21, 118, 120,
471 249, 124, 81, 121, 0, 77, 1, 121, 0, 21,
472 118, 1, 121, 0, 21, 1, 121, 0, 1, 121,
473 0, 100, 77, 250, 58, 0, 100, 1, 58, 0,
474 250, 0, 249, 124, 250, 0, 17, 249, 0, 18,
475 20, 250, 0, 77, 0, 77, 129, 61, 124, 61,
476 130, 0, 77, 129, 62, 124, 62, 130, 0, 77,
477 129, 251, 130, 0, 19, 129, 61, 125, 61, 130,
478 20, 250, 0, 19, 20, 250, 0, 19, 1, 20,
479 250, 0, 160, 0, 251, 124, 160, 0, 101, 160,
480 253, 58, 0, 101, 160, 1, 58, 0, 101, 1,
481 58, 0, 0, 253, 254, 0, 25, 247, 0, 24,
482 247, 0, 0, 256, 0, 257, 0, 256, 124, 257,
483 0, 1, 124, 257, 0, 22, 120, 250, 121, 0,
484 22, 120, 23, 124, 160, 121, 0, 24, 0, 25,
485 0, 31, 0, 27, 0, 28, 0, 29, 0, 30,
486 0, 33, 0, 26, 0, 32, 0, 104, 160, 255,
487 58, 0, 104, 160, 1, 58, 0, 104, 1, 58,
488 0, 105, 260, 58, 0, 261, 0, 260, 124, 261,
489 0, 160, 0, 160, 11, 0, 160, 126, 196, 127,
490 0
491 };
492
493 #endif
494
495 #if YYDEBUG != 0
496 static const short yyrline[] = { 0,
497 384, 387, 390, 394, 397, 400, 404, 409, 412, 417,
498 418, 419, 420, 421, 422, 423, 424, 425, 426, 427,
499 428, 429, 430, 431, 432, 433, 434, 435, 436, 437,
500 438, 439, 440, 441, 442, 443, 444, 445, 446, 450,
501 459, 463, 467, 474, 478, 483, 486, 490, 494, 498,
502 509, 512, 515, 518, 521, 524, 530, 533, 536, 539,
503 542, 548, 552, 555, 558, 563, 572, 577, 580, 583,
504 586, 589, 592, 595, 598, 601, 606, 615, 620, 623,
505 628, 631, 636, 647, 656, 665, 668, 671, 675, 681,
506 684, 692, 696, 702, 705, 710, 713, 716, 719, 722,
507 725, 728, 731, 734, 737, 740, 743, 746, 749, 752,
508 755, 758, 761, 764, 767, 770, 773, 776, 779, 782,
509 785, 788, 793, 796, 801, 804, 807, 810, 813, 816,
510 819, 825, 826, 827, 828, 829, 832, 835, 838, 841,
511 844, 847, 850, 853, 856, 859, 862, 865, 868, 871,
512 874, 877, 880, 883, 886, 889, 892, 895, 898, 901,
513 904, 907, 910, 913, 916, 919, 922, 925, 928, 931,
514 934, 937, 940, 945, 949, 953, 957, 961, 965, 969,
515 973, 977, 981, 985, 989, 993, 1002, 1005, 1008, 1011,
516 1014, 1017, 1020, 1023, 1026, 1029, 1032, 1039, 1042, 1047,
517 1050, 1055, 1058, 1061, 1064, 1067, 1070, 1073, 1076, 1079,
518 1082, 1089, 1092, 1099, 1102, 1107, 1112, 1119, 1129, 1143,
519 1152, 1161, 1168, 1171, 1174, 1177, 1180, 1183, 1186, 1189,
520 1192, 1195, 1198, 1204, 1207, 1210, 1214, 1217, 1220, 1223,
521 1226, 1229, 1234, 1237, 1240, 1244, 1251, 1254, 1259, 1262,
522 1265, 1268, 1271, 1274, 1277, 1280, 1283, 1286, 1289, 1292,
523 1295, 1298, 1301, 1304, 1307, 1310, 1316, 1319, 1322, 1325,
524 1328, 1331, 1336, 1346, 1360, 1369, 1382, 1386, 1392, 1396,
525 1404, 1409, 1413, 1419, 1424, 1428, 1436, 1441, 1446, 1451,
526 1458, 1461, 1464, 1469, 1472, 1475, 1482, 1485, 1495, 1498,
527 1510, 1515, 1521, 1528, 1533, 1539, 1546, 1549, 1554, 1559,
528 1565, 1571, 1574, 1581, 1584, 1593, 1597, 1603, 1609, 1615,
529 1624, 1627, 1632, 1636, 1642, 1647, 1648, 1651, 1654, 1659,
530 1706, 1713, 1719, 1728, 1732, 1739, 1742, 1745, 1750, 1755,
531 1764, 1767, 1772, 1775, 1778, 1781, 1784, 1787, 1790, 1793,
532 1796, 1801, 1807, 1816, 1817, 1820, 1822, 1825, 1831, 1834,
533 1843, 1846, 1849, 1853, 1859, 1862, 1866, 1869, 1873, 1876,
534 1880, 1883, 1888, 1891, 1900, 1903, 1906, 1913, 1918, 1925,
535 1928, 1931, 1934, 1941, 1948, 1953, 1958, 1962, 1970, 1973,
536 1980, 1985, 1992, 1999, 2006, 2013, 2020, 2027, 2035, 2046,
537 2053, 2060, 2064, 2072, 2075, 2080, 2087, 2090, 2096, 2099,
538 2106, 2109, 2116, 2119, 2124, 2130, 2133, 2142, 2145, 2148,
539 2151, 2154, 2157, 2160, 2163, 2166, 2169, 2174, 2178, 2184,
540 2193, 2198, 2202, 2208, 2211, 2214
541 };
542 #endif
543
544
545 #if YYDEBUG != 0 || defined (YYERROR_VERBOSE)
546
547 static const char * const yytname[] = { "$","error","$undefined.","KEYW_TRUE",
548 "KEYW_FALSE","KEYW_ACTION","KEYW_ACCEPT","KEYW_ANNOUNCE","KEYW_FROM","KEYW_TO",
549 "KEYW_AT","KEYW_ANY","KEYW_REFINE","KEYW_EXCEPT","KEYW_STATIC","KEYW_NETWORKS",
550 "KEYW_MASKLEN","KEYW_UNION","KEYW_RANGE","KEYW_LIST","KEYW_OF","KEYW_OPERATOR",
551 "KEYW_SYNTAX","KEYW_SPECIAL","KEYW_OPTIONAL","KEYW_MANDATORY","KEYW_INTERNAL",
552 "KEYW_SINGLEVALUED","KEYW_MULTIVALUED","KEYW_LOOKUP","KEYW_KEY","KEYW_DELETED",
553 "KEYW_GENERATED","KEYW_OBSOLETE","KEYW_PEERAS","KEYW_PROTOCOL","KEYW_INTO","KEYW_ATOMIC",
554 "KEYW_INBOUND","KEYW_OUTBOUND","KEYW_UPON","KEYW_HAVE_COMPONENTS","KEYW_EXCLUDE",
555 "KEYW_NONE","KEYW_MAILFROM","KEYW_CRYPTPW","KEYW_ASSIGNED","KEYW_ALLOCATED",
556 "KEYW_PI","KEYW_PA","KEYW_UNSPECIFIED","KEYW_EXT","KEYW_SIMPLE","KEYW_RIPE",
557 "KEYW_INTERNIC","KEYW_CLIENTADDRESS","TKN_ERROR","TKN_UNKNOWN_CLASS","TKN_EOA",
558 "TKN_EOO","TKN_FREETEXT","TKN_INT","TKN_REAL","TKN_STRING","TKN_TIMESTAMP","TKN_BLOB",
559 "TKN_IPV4","TKN_PRFXV6","TKN_PRFXV4","TKN_PRFXV4RNG","TKN_ASNO","TKN_ASNAME",
560 "TKN_RSNAME","TKN_RTRSNAME","TKN_PRNGNAME","TKN_FLTRNAME","TKN_BOOLEAN","TKN_WORD",
561 "TKN_RP_ATTR","TKN_DNS","TKN_EMAIL","TKN_3DOTS","TKN_NICHDL","TKN_KEYCRTNAME",
562 "TKN_CRYPTEDPW","ATTR_GENERIC","ATTR_BLOBS","ATTR_IMPORT","ATTR_EXPORT","ATTR_DEFAULT",
563 "ATTR_FREETEXT","ATTR_CHANGED","ATTR_IFADDR","ATTR_PEER","ATTR_INJECT","ATTR_COMPONENTS",
564 "ATTR_AGGR_MTD","ATTR_AGGR_BNDRY","ATTR_RS_MEMBERS","ATTR_RP_ATTR","ATTR_TYPEDEF",
565 "ATTR_PROTOCOL","ATTR_FILTER","ATTR_PEERING","ATTR_ATTR","ATTR_MNT_ROUTES","ATTR_NICHDL",
566 "ATTR_AUTH","ATTR_STATUS_INET","ATTR_PHONE","ATTR_SOURCE","ATTR_REFER","ATTR_COUNTRY",
567 "ATTR_PERSON","OP_OR","OP_AND","OP_NOT","OP_MS","TKN_OPERATOR","'+'","'('","')'",
568 "'.'","'-'","','","':'","'{'","'}'","';'","'['","']'","'<'","'>'","'|'","'*'",
569 "'?'","'^'","'$'","object","attribute_list","attribute","changed_attribute",
570 "nichdl_attribute","auth_attribute","status_inet_attribute","phone_attribute",
571 "int_list","source_attribute","refer_attribute","country_attribute","person_attribute",
572 "name_list","freetext_attribute","generic_attribute","generic_list","generic_non_empty_list",
573 "blobs_attribute","blobs_list","list_item","list_item_0","tkn_word","tkn_word_from_keyw",
574 "tkn_word_from_keyw_none","tkn_word_from_keyw_mailfrom","tkn_word_from_keyw_cryptpw",
575 "tkn_word_from_keyw_assigned","tkn_word_from_keyw_allocated","tkn_word_from_keyw_pi",
576 "tkn_word_from_keyw_pa","tkn_word_from_keyw_unspecified","tkn_word_from_keyw_ext",
577 "tkn_word_from_keyw_simple","tkn_word_from_keyw_ripe","tkn_word_from_keyw_internic",
578 "tkn_word_from_keyw_clientaddress","opt_as_expr","as_expr","as_expr_term","as_expr_factor",
579 "as_expr_operand","opt_router_expr","opt_router_expr_with_at","router_expr",
580 "router_expr_term","router_expr_factor","router_expr_operand","peering","opt_action",
581 "action","single_action","filter","filter_term","filter_factor","filter_operand",
582 "filter_prefix","filter_prefix_operand","opt_filter_prefix_list","filter_prefix_list",
583 "filter_prefix_list_prefix","filter_aspath","filter_aspath_term","filter_aspath_closure",
584 "filter_aspath_factor","filter_aspath_no","filter_aspath_range","filter_rp_attribute",
585 "import_peering_action_list","export_peering_action_list","import_factor","import_factor_list",
586 "export_factor","export_factor_list","import_term","export_term","import_expr",
587 "export_expr","opt_protocol_from","opt_protocol_into","import_attribute","export_attribute",
588 "opt_default_filter","default_attribute","filter_attribute","peering_attribute",
589 "ifaddr_attribute","opt_peer_options","peer_options","peer_option","peer_id",
590 "peer_attribute","aggr_bndry_attribute","aggr_mtd_attribute","opt_inject_expr",
591 "inject_expr","inject_expr_term","inject_expr_factor","inject_expr_operand",
592 "inject_attribute","opt_atomic","components_list","components_attribute","opt_rs_members_list",
593 "rs_members_list","rs_member","rs_members_attribute","rpattr_attribute","methods",
594 "method","typedef_attribute","typedef_type_list","typedef_type","enum_list",
595 "protocol_attribute","protocol_options","protocol_option","opt_attr_options",
596 "attr_options","attr_option","attr_attribute","mnt_routes_attribute","mnt_routes_list",
597 "mnt_routes_list_item", NULL
598 };
599 #endif
600
601 static const short yyr1[] = { 0,
602 138, 138, 138, 138, 138, 138, 138, 139, 139, 140,
603 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
604 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
605 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
606 141, 141, 141, 142, 142, 143, 143, 143, 143, 143,
607 144, 144, 144, 144, 144, 144, 145, 145, 145, 145,
608 145, 146, 146, 146, 146, 147, 147, 148, 148, 148,
609 148, 148, 148, 148, 148, 148, 149, 149, 150, 150,
610 151, 151, 152, 153, 153, 154, 154, 155, 155, 156,
611 156, 157, 157, 158, 158, 159, 159, 159, 159, 159,
612 159, 159, 159, 159, 159, 159, 159, 159, 159, 159,
613 159, 159, 159, 159, 159, 159, 159, 159, 159, 159,
614 159, 159, 160, 160, 160, 160, 160, 160, 160, 160,
615 160, 160, 160, 160, 160, 160, 161, 161, 161, 161,
616 161, 161, 161, 161, 161, 161, 161, 161, 161, 161,
617 161, 161, 161, 161, 161, 161, 161, 161, 161, 161,
618 161, 161, 161, 161, 161, 161, 161, 161, 161, 161,
619 161, 161, 161, 162, 163, 164, 165, 166, 167, 168,
620 169, 170, 171, 172, 173, 174, 175, 175, 176, 176,
621 177, 177, 177, 178, 178, 179, 179, 180, 180, 181,
622 181, 182, 182, 183, 183, 183, 184, 184, 185, 185,
623 185, 186, 186, 187, 187, 188, 188, 189, 189, 189,
624 189, 189, 190, 190, 190, 191, 191, 192, 192, 192,
625 193, 193, 193, 193, 193, 194, 194, 195, 195, 195,
626 195, 195, 196, 196, 197, 197, 198, 198, 199, 199,
627 200, 200, 201, 201, 201, 201, 202, 202, 202, 202,
628 203, 203, 203, 203, 203, 203, 204, 204, 204, 204,
629 204, 204, 205, 205, 205, 205, 206, 206, 207, 207,
630 208, 209, 209, 210, 211, 211, 212, 212, 213, 213,
631 214, 214, 214, 215, 215, 215, 216, 216, 217, 217,
632 218, 218, 218, 219, 219, 219, 220, 220, 221, 221,
633 221, 222, 222, 223, 223, 224, 224, 224, 224, 224,
634 225, 225, 226, 226, 227, 228, 228, 228, 228, 229,
635 229, 229, 229, 230, 230, 231, 231, 231, 231, 231,
636 232, 232, 233, 233, 234, 234, 235, 235, 236, 236,
637 236, 237, 237, 238, 238, 239, 239, 239, 240, 240,
638 241, 241, 242, 242, 243, 243, 243, 243, 243, 243,
639 243, 243, 244, 244, 245, 245, 245, 246, 246, 247,
640 247, 247, 247, 247, 247, 247, 247, 247, 248, 248,
641 249, 249, 250, 250, 250, 250, 250, 250, 250, 250,
642 250, 251, 251, 252, 252, 252, 253, 253, 254, 254,
643 255, 255, 256, 256, 256, 257, 257, 257, 257, 257,
644 257, 257, 257, 257, 257, 257, 257, 258, 258, 258,
645 259, 260, 260, 261, 261, 261
646 };
647
648 static const short yyr2[] = { 0,
649 2, 2, 2, 1, 1, 1, 0, 1, 2, 1,
650 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
651 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
652 1, 1, 1, 1, 1, 1, 1, 1, 2, 2,
653 4, 3, 3, 3, 3, 3, 4, 4, 3, 3,
654 4, 4, 4, 4, 4, 3, 4, 8, 7, 11,
655 3, 1, 2, 3, 3, 3, 3, 4, 5, 4,
656 5, 4, 5, 4, 5, 3, 3, 3, 4, 3,
657 1, 2, 2, 3, 3, 0, 1, 1, 3, 3,
658 3, 1, 2, 1, 3, 1, 1, 1, 1, 1,
659 1, 1, 1, 1, 3, 5, 3, 5, 1, 1,
660 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
661 3, 3, 1, 1, 1, 1, 1, 1, 1, 1,
662 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
663 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
664 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
665 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
666 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
667 1, 1, 1, 1, 1, 1, 0, 1, 3, 1,
668 3, 3, 1, 3, 1, 1, 1, 0, 1, 0,
669 2, 3, 1, 3, 3, 1, 3, 1, 1, 1,
670 1, 3, 1, 0, 2, 1, 2, 7, 4, 5,
671 5, 1, 3, 2, 1, 3, 1, 2, 3, 1,
672 1, 3, 1, 1, 1, 2, 1, 1, 1, 1,
673 1, 3, 0, 1, 1, 3, 1, 1, 3, 1,
674 2, 1, 2, 2, 2, 1, 1, 1, 3, 1,
675 1, 1, 1, 1, 3, 4, 0, 2, 2, 2,
676 4, 2, 6, 3, 4, 4, 3, 4, 3, 4,
677 3, 2, 3, 3, 2, 3, 2, 3, 2, 3,
678 1, 3, 3, 1, 3, 3, 0, 2, 0, 2,
679 5, 5, 3, 5, 5, 3, 0, 2, 6, 5,
680 3, 3, 3, 3, 3, 6, 6, 5, 4, 3,
681 0, 1, 1, 3, 4, 1, 1, 1, 1, 5,
682 5, 4, 3, 3, 3, 3, 4, 4, 4, 3,
683 0, 2, 3, 1, 3, 1, 3, 1, 1, 4,
684 4, 5, 3, 0, 1, 0, 1, 4, 4, 3,
685 0, 1, 1, 3, 1, 2, 1, 2, 1, 2,
686 1, 1, 3, 3, 4, 4, 3, 1, 2, 3,
687 4, 6, 5, 7, 3, 4, 3, 2, 4, 3,
688 1, 3, 2, 3, 1, 6, 6, 4, 8, 3,
689 4, 1, 3, 4, 4, 3, 0, 2, 2, 2,
690 0, 1, 1, 3, 3, 4, 6, 1, 1, 1,
691 1, 1, 1, 1, 1, 1, 1, 4, 4, 3,
692 3, 1, 3, 1, 2, 4
693 };
694
695 static const short yydefact[] = { 0,
696 6, 0, 5, 0, 0, 0, 0, 0, 0, 0,
697 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
698 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
699 0, 0, 0, 8, 12, 31, 32, 33, 34, 35,
700 36, 37, 38, 29, 10, 11, 13, 14, 15, 26,
701 27, 17, 16, 21, 20, 19, 18, 25, 24, 22,
702 23, 28, 30, 40, 3, 39, 2, 0, 137, 138,
703 139, 140, 141, 142, 143, 144, 145, 146, 147, 148,
704 149, 150, 151, 152, 153, 154, 155, 156, 157, 158,
705 159, 160, 162, 164, 165, 166, 161, 163, 167, 168,
706 169, 170, 171, 172, 173, 97, 98, 99, 100, 120,
707 101, 103, 102, 104, 96, 109, 110, 111, 112, 113,
708 114, 115, 117, 118, 119, 0, 86, 0, 87, 88,
709 94, 116, 0, 0, 92, 0, 0, 299, 0, 299,
710 0, 0, 83, 0, 0, 0, 0, 0, 183, 184,
711 185, 186, 124, 125, 126, 127, 128, 129, 131, 123,
712 130, 0, 132, 135, 133, 134, 136, 0, 0, 214,
713 0, 355, 356, 0, 0, 0, 0, 196, 197, 0,
714 0, 190, 193, 195, 0, 371, 372, 365, 367, 369,
715 0, 362, 363, 0, 0, 0, 0, 0, 0, 0,
716 0, 231, 239, 238, 240, 241, 234, 0, 0, 0,
717 243, 0, 0, 225, 227, 230, 235, 237, 233, 0,
718 213, 198, 0, 0, 0, 434, 0, 432, 0, 0,
719 0, 174, 175, 176, 0, 0, 0, 0, 0, 177,
720 178, 0, 0, 0, 0, 0, 0, 0, 0, 0,
721 0, 0, 0, 0, 0, 0, 0, 1, 9, 85,
722 0, 0, 0, 0, 84, 0, 0, 91, 90, 93,
723 303, 298, 0, 0, 306, 0, 311, 0, 43, 42,
724 0, 320, 0, 0, 333, 0, 0, 328, 329, 327,
725 321, 353, 209, 211, 210, 0, 201, 203, 206, 208,
726 0, 341, 360, 357, 0, 340, 0, 336, 0, 0,
727 188, 335, 0, 334, 0, 0, 0, 374, 366, 368,
728 370, 373, 0, 377, 0, 0, 0, 0, 378, 0,
729 390, 0, 0, 0, 395, 0, 406, 0, 0, 313,
730 0, 86, 0, 86, 228, 0, 247, 248, 0, 244,
731 245, 262, 261, 263, 0, 264, 267, 257, 258, 0,
732 250, 252, 256, 260, 312, 0, 224, 0, 236, 315,
733 200, 199, 314, 430, 0, 0, 418, 419, 426, 421,
734 422, 423, 424, 420, 427, 425, 0, 412, 413, 435,
735 243, 431, 0, 45, 44, 50, 49, 46, 0, 0,
736 56, 179, 180, 0, 0, 181, 0, 0, 0, 61,
737 62, 0, 67, 66, 76, 0, 0, 0, 0, 78,
738 77, 80, 0, 81, 105, 107, 122, 121, 89, 95,
739 300, 0, 0, 0, 0, 291, 0, 0, 0, 0,
740 0, 294, 0, 0, 307, 41, 319, 0, 0, 332,
741 0, 0, 0, 322, 323, 0, 0, 0, 0, 0,
742 222, 215, 216, 0, 0, 0, 359, 339, 338, 337,
743 194, 189, 192, 191, 364, 388, 0, 0, 0, 0,
744 375, 379, 376, 393, 391, 0, 0, 0, 0, 0,
745 389, 405, 0, 0, 404, 408, 274, 0, 0, 0,
746 229, 242, 0, 0, 267, 0, 232, 0, 251, 255,
747 253, 254, 223, 226, 212, 429, 0, 0, 428, 0,
748 0, 433, 47, 48, 51, 52, 53, 54, 55, 182,
749 57, 63, 0, 0, 0, 0, 68, 0, 70, 0,
750 72, 0, 74, 0, 79, 82, 0, 0, 214, 0,
751 0, 0, 0, 302, 287, 0, 0, 301, 214, 0,
752 0, 0, 0, 305, 289, 0, 0, 304, 310, 0,
753 0, 318, 0, 0, 331, 86, 330, 0, 207, 202,
754 205, 204, 0, 86, 0, 86, 217, 349, 0, 0,
755 0, 342, 344, 346, 348, 352, 0, 387, 0, 0,
756 385, 380, 0, 0, 394, 0, 400, 0, 0, 0,
757 402, 0, 410, 409, 275, 86, 276, 246, 259, 0,
758 269, 268, 272, 270, 265, 249, 415, 0, 0, 414,
759 436, 0, 65, 64, 0, 69, 71, 73, 75, 106,
760 108, 277, 282, 288, 0, 281, 214, 0, 292, 293,
761 279, 285, 290, 0, 284, 214, 0, 295, 296, 308,
762 309, 317, 316, 0, 324, 0, 0, 0, 0, 243,
763 243, 0, 0, 0, 358, 386, 0, 381, 0, 392,
764 401, 0, 0, 0, 0, 398, 0, 266, 0, 0,
765 416, 0, 0, 283, 278, 286, 280, 325, 219, 0,
766 86, 0, 0, 0, 347, 343, 345, 383, 0, 0,
767 0, 0, 0, 403, 273, 271, 0, 0, 59, 220,
768 0, 221, 350, 351, 0, 382, 0, 396, 397, 417,
769 58, 0, 0, 384, 0, 0, 218, 399, 0, 60,
770 0, 0, 0
771 };
772
773 static const short yydefgoto[] = { 741,
774 33, 34, 35, 36, 37, 38, 39, 412, 40, 41,
775 42, 43, 423, 44, 45, 128, 129, 46, 134, 130,
776 131, 226, 163, 236, 237, 238, 242, 243, 404, 405,
777 409, 536, 164, 165, 166, 167, 310, 222, 182, 183,
778 184, 371, 170, 297, 298, 299, 300, 223, 302, 462,
779 463, 213, 214, 215, 216, 217, 218, 349, 350, 351,
780 360, 361, 362, 363, 364, 506, 219, 434, 440, 648,
781 551, 657, 561, 436, 442, 437, 443, 138, 274, 47,
782 48, 571, 49, 50, 51, 52, 453, 454, 455, 291,
783 53, 54, 55, 465, 592, 593, 594, 595, 56, 173,
784 305, 57, 191, 192, 193, 58, 59, 328, 329, 60,
785 484, 485, 612, 61, 339, 496, 387, 388, 389, 62,
786 63, 227, 228
787 };
788
789 static const short yypact[] = { 528,
790 182, -24, 47, 695, 819, 29, 32, 84, 24, 38,
791 184, 1271, 197, 25, 392, 55, 298, 134, 54, 1351,
792 37, 50, 1431, 1911, 31, 165, 275, 27, 1511, 410,
793 1591, 1671, 818,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
794 -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
795 -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
796 -32768,-32768,-32768,-32768,-32768,-32768,-32768, 58,-32768,-32768,
797 -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
798 -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
799 -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
800 -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
801 -14,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
802 -32768,-32768, 66,-32768,-32768, 16, 1067, 155, 97,-32768,
803 112,-32768, 195, 943,-32768, 225, 1911, 269, 249, 269,
804 267, 241,-32768, 276, 178, 284, 60, 286,-32768,-32768,
805 -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
806 -32768, 126,-32768,-32768,-32768,-32768,-32768, 290, 325, 359,
807 339,-32768, 16, 345, 203, 34, 351,-32768,-32768, 335,
808 217, 57,-32768,-32768, 363,-32768,-32768, 331, 343, 371,
809 394, 360,-32768, 417, 45, 45, 434, 357, 437, 202,
810 455,-32768,-32768,-32768,-32768,-32768,-32768, 350, 16, 16,
811 347, 243, 118, 422,-32768,-32768,-32768, 421,-32768, 481,
812 -32768, 323, 482, 484, 472, 52, 19,-32768, 485, 486,
813 487,-32768,-32768,-32768, 488, 489, 468, 465, 493,-32768,
814 -32768, 398, 378, 494, 495, 496, 497, 500, 471, 474,
815 478, 480, 502, 503, 504, 1911, 505,-32768,-32768,-32768,
816 506, 507, 153, 439,-32768, 1067, 1067,-32768,-32768,-32768,
817 -32768,-32768, 1911, 39,-32768, 33,-32768, 228,-32768,-32768,
818 512,-32768, 513, 53,-32768, 515, 1191,-32768,-32768,-32768,
819 1911,-32768,-32768,-32768,-32768, 325, 450, 71,-32768,-32768,
820 -26, 525,-32768, 257, 23,-32768, 516,-32768, 517, 519,
821 464,-32768, -42,-32768, 335, 335, 335,-32768,-32768,-32768,
822 -32768,-32768, 438,-32768, 460, 43, 28, 193,-32768, 194,
823 -32768, 357, 566, 20, 458, 530,-32768, 531, 400,-32768,
824 1067, 1067, 514, 1067,-32768, 231,-32768,-32768, 463, 469,
825 -32768,-32768,-32768,-32768, 243,-32768, 456,-32768,-32768, 334,
826 243, 111,-32768,-32768,-32768, 16, 422, 16,-32768,-32768,
827 584, 450,-32768,-32768, 148, 475,-32768,-32768,-32768,-32768,
828 -32768,-32768,-32768,-32768,-32768,-32768, 538, 473,-32768,-32768,
829 347,-32768, 1911,-32768,-32768,-32768,-32768,-32768, 540, 541,
830 -32768,-32768,-32768, 542, 543,-32768, 544, 545, 546,-32768,
831 -32768, 272,-32768,-32768,-32768, 362, 375, 377, 395,-32768,
832 -32768,-32768, 1831,-32768, 483, 518,-32768,-32768,-32768,-32768,
833 -32768, 241, 597, 72, 11, 470, 548, 241, 598, 432,
834 41, 499, 551, 552, 596,-32768,-32768, 586, 196,-32768,
835 587, 522, 588, 523,-32768, 179, 325, 325, 325, 358,
836 -32768, -26,-32768, 96, 590, 1911,-32768,-32768,-32768,-32768,
837 -32768, 57,-32768,-32768,-32768,-32768, 529, 30, 532, 56,
838 -32768,-32768,-32768, 527,-32768, 357, 629, 357, 591, 1751,
839 -32768,-32768, 45, 45,-32768,-32768,-32768, 533, 535, 526,
840 -32768,-32768, 347, -32,-32768, 186,-32768, 243, 111,-32768,
841 -32768,-32768, 422,-32768,-32768,-32768, 492, 367,-32768, 492,
842 534,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
843 -32768,-32768, 495, 599, 601, 536,-32768, 605,-32768, 606,
844 -32768, 607,-32768, 608,-32768,-32768, 609, 610, 359, 539,
845 35, 16, 241,-32768,-32768, 39, 39,-32768, 359, 547,
846 40, 16, 241,-32768,-32768, 33, 33,-32768,-32768, 16,
847 611,-32768, 614, 615,-32768, 1067,-32768, 1911,-32768, 71,
848 -32768,-32768, 1067, 1067, 580, 1067,-32768,-32768, 553, 554,
849 96, 560, 562,-32768,-32768,-32768, 16,-32768, 557, 357,
850 -32768,-32768, 365, 357,-32768, 357,-32768, 558, 561, 563,
851 -32768, 157,-32768,-32768,-32768, 1067,-32768,-32768,-32768, 188,
852 -32768, 559,-32768,-32768,-32768, 243,-32768, 564, 565,-32768,
853 -32768, 278,-32768,-32768, 495,-32768,-32768,-32768,-32768,-32768,
854 -32768,-32768,-32768,-32768, 556, 257, 359, 567,-32768,-32768,
855 -32768,-32768,-32768, 612, 257, 359, 613,-32768,-32768, 257,
856 -32768,-32768,-32768, 568,-32768, 616, 569, 571, 617, 347,
857 347, 205, 96, 96, 257,-32768, 369,-32768, 336,-32768,
858 -32768, 631, 632, 673, 1911,-32768, 573,-32768, 589, 1911,
859 -32768, 495, 227,-32768,-32768,-32768,-32768,-32768,-32768, 618,
860 1067, 620, 622, 623,-32768, 562,-32768,-32768, 341, 621,
861 624, 625, 643,-32768,-32768,-32768, 630, 285,-32768,-32768,
862 655,-32768,-32768,-32768, 656,-32768, 648,-32768,-32768,-32768,
863 -32768, 657, 652,-32768, 357, 495,-32768,-32768, 259,-32768,
864 736, 737,-32768
865 };
866
867 static const short yypgoto[] = {-32768,
868 -32768, 705,-32768,-32768,-32768,-32768,-32768, -518,-32768,-32768,
869 -32768,-32768,-32768,-32768,-32768, -125,-32768,-32768,-32768, 0,
870 476, -9, -4,-32768,-32768,-32768,-32768,-32768, 509, 549,
871 -32768, 21, 715, 751, 752, 753,-32768, 3, 479, 210,
872 -32768,-32768, 413, -177, 328, 73,-32768, -134, -269,-32768,
873 324, -120, -206, -184,-32768,-32768,-32768, -374,-32768, 287,
874 433, 279, -348,-32768,-32768, 288,-32768,-32768,-32768, -262,
875 -32768, -266,-32768,-32768,-32768, -23, -31, 782, 651,-32768,
876 -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 218,-32768,
877 -32768,-32768,-32768,-32768, 204, 124, 125,-32768,-32768,-32768,
878 -32768,-32768,-32768,-32768, 477,-32768,-32768, 602, -312,-32768,
879 -456, -194,-32768,-32768,-32768,-32768,-32768,-32768, -46,-32768,
880 -32768,-32768, 408
881 };
882
883
884 #define YYLAST 1993
885
886
887 static const short yytable[] = { 132,
888 132, 264, 162, 336, 135, 263, 367, 278, 445, 441,
889 200, 435, 509, 225, 632, 482, 521, 482, 181, 247,
890 487, 254, 256, 603, 345, 171, 202, 244, 479, 136,
891 599, 229, 139, 66, 309, -354, -297, 201, 144, 488,
892 -297, 438, 432, 477, 372, 325, 432, 202, 438, 203,
893 220, 460, 304, 448, 197, 177, 367, 466, -354, -354,
894 283, 172, 390, 137, -297, 326, 137, -297, 554, 316,
895 203, 315, 332, 333, 334, 284, 392, 552, 471, 553,
896 467, 143, -354, 458, 141, 204, 205, 206, 619, 346,
897 207, -187, 142, 208, -354, -354, -354, 367, 564, -354,
898 508, 461, -354, 178, 179, 67, 204, 205, 206, 588,
899 261, 207, 230, 449, 208, 260, 693, 145, 456, 178,
900 179, 327, 132, 221, 178, 179, 286, 272, 202, 132,
901 198, 209, 335, 270, 194, 210, 589, 590, 555, 367,
902 -354, 211, 393, 677, -354, 245, 212, 480, 489, 600,
903 -354, 203, 209, 180, -297, -354, 210, -297, 439, 513,
904 478, 644, 211, 202, 433, 231, 653, 212, 565, 180,
905 550, 317, 560, 718, 180, 365, 602, 391, 311, 574,
906 613, 614, 313, 514, 146, 459, 203, 204, 205, 206,
907 262, 287, 207, 325, 325, 208, 573, 168, 288, 289,
908 301, -200, 338, 307, 290, 516, 169, 232, 233, 234,
909 195, 196, 265, 326, 326, 591, 498, 739, 500, 621,
910 266, 621, 204, 205, 206, -407, -407, 207, 444, 510,
911 208, 366, 301, 209, 267, 280, -200, 210, 281, 64,
912 65, 202, -214, 211, 511, 512, 424, 235, 212, 147,
913 481, 483, 268, -214, -200, 622, 623, 622, 623, -407,
914 308, 132, 132, 431, 203, 429, 366, 202, 209, 327,
915 327, 517, 210, 427, 314, 239, 352, 509, 211, 642,
916 685, 452, 271, 212, 719, -214, 686, 532, 645, 651,
917 203, 605, 457, 607, 654, 703, 704, 549, 185, 579,
918 204, 205, 206, 559, 273, 207, 275, 624, 208, 624,
919 178, 179, 353, 354, 221, 625, 740, 688, 673, 532,
920 240, 241, 530, 629, 277, 705, 204, 205, 206, 531,
921 315, 207, 532, 279, 208, 530, 132, 132, 532, 132,
922 497, 282, 731, 285, 366, 532, 209, 292, 534, 535,
923 210, 501, 332, 333, 334, -361, 211, 332, 333, 334,
924 180, 212, 355, 301, 356, 186, 187, 188, 189, 190,
925 366, 357, 209, 332, 333, 334, 210, 695, 358, 359,
926 534, 535, 211, 332, 333, 334, 697, 212, 293, 628,
927 293, 533, 174, 534, 535, 294, 303, 294, 692, 534,
928 535, 295, 306, 295, 178, 179, 534, 535, 312, 680,
929 248, 681, 335, 546, 347, 348, 710, 335, 647, 537,
930 318, 725, 538, 493, 494, 402, 403, 406, 656, 175,
931 176, 646, 539, 335, 541, 540, 315, 542, 562, 367,
932 563, 655, 296, 335, 296, 402, 403, 319, 367, 660,
933 664, 322, 543, 367, 180, 544, 597, 495, 667, 320,
934 669, 149, 150, 151, 152, 507, 508, 341, 367, 342,
935 627, 343, 375, 630, 324, 583, 675, 584, 344, 585,
936 611, 556, 557, 323, 680, 678, 586, 321, 679, 708,
937 687, 331, 709, 376, 337, 377, 378, 379, 380, 381,
938 382, 383, 384, 385, 386, 186, 187, 188, 189, 190,
939 566, 567, 340, 376, 680, 377, 378, 379, 380, 381,
940 382, 383, 384, 385, 386, 473, 474, -7, 1, -411,
941 581, 582, 649, 650, 658, 659, 368, 369, 370, 373,
942 738, 374, 394, 395, 396, 397, 398, 399, 400, 416,
943 401, 410, 417, 413, 414, 411, 418, 415, 419, 420,
944 421, 422, 64, 457, 464, 428, 425, 426, 452, 446,
945 447, 132, 450, 468, 469, 721, 470, 315, 132, 132,
946 476, 132, 666, 2, 3, 486, 490, 491, 492, 502,
947 499, 505, 503, 169, 518, 519, 520, 523, 524, 525,
948 526, 527, 528, 529, 432, 558, 438, 547, 568, 569,
949 570, 132, 4, 5, 6, 7, 8, 9, 10, 11,
950 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
951 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
952 32, 576, 548, 572, 575, 577, 578, 596, 606, 598,
953 604, 608, 601, 615, 616, 617, 668, 635, 716, 633,
954 631, 634, 636, 637, 638, 639, 643, 735, 661, 640,
955 641, 662, 663, 673, 652, 714, 674, 676, 670, 671,
956 717, 689, 682, 694, 683, 691, 684, 690, 698, 700,
957 701, 711, 712, 715, 555, 68, 132, 69, 70, 71,
958 72, 73, 74, 75, 76, 77, 78, 79, 80, 81,
959 82, 83, 84, 85, 86, 87, 88, 89, 90, 91,
960 92, 93, 94, 95, 96, 97, 98, 99, 100, 101,
961 102, 103, 104, 105, 713, 742, 743, 259, 732, 696,
962 565, 726, 430, 699, 249, 720, 702, 722, 723, 724,
963 730, 407, -86, 727, 728, 106, 107, 108, 109, 110,
964 111, 112, 113, 114, 115, 116, 117, 118, 119, 120,
965 121, 122, 729, 123, 124, 733, 734, 125, 736, 737,
966 250, 251, 252, 515, 580, 587, 626, 504, 140, 618,
967 276, 408, 620, 472, 672, 665, 706, 330, 707, 475,
968 522, 0, 0, 0, 0, 0, 0, 0, 0, 0,
969 0, 0, 0, 0, 126, 0, 0, -4, 257, 133,
970 127, 69, 70, 71, 72, 73, 74, 75, 76, 77,
971 78, 79, 80, 81, 82, 83, 84, 85, 86, 87,
972 88, 89, 90, 91, 92, 93, 94, 95, 96, 97,
973 98, 99, 100, 101, 102, 103, 104, 105, 0, 0,
974 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
975 0, 0, 0, 2, 0, 0, 258, 0, 0, 106,
976 107, 108, 109, 110, 111, 112, 113, 114, 115, 116,
977 117, 118, 119, 120, 121, 122, 0, 123, 124, 0,
978 0, 125, 4, 5, 6, 7, 8, 9, 10, 11,
979 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
980 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
981 32, 0, 0, 0, 0, 0, 0, 0, 126, 0,
982 0, 0, 0, 0, 127, 69, 70, 71, 72, 73,
983 74, 75, 76, 77, 78, 79, 80, 81, 82, 83,
984 84, 85, 86, 87, 88, 89, 90, 91, 92, 93,
985 94, 95, 96, 97, 98, 99, 100, 101, 102, 103,
986 104, 105, 0, 0, 0, 0, 0, 0, 0, 0,
987 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
988 269, 0, 0, 106, 107, 108, 109, 110, 111, 112,
989 113, 114, 115, 116, 117, 118, 119, 120, 121, 122,
990 0, 123, 124, 0, 0, 125, 0, 0, 0, 0,
991 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
992 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
993 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
994 0, 0, 126, 0, 0, 0, 0, 0, 127, 69,
995 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
996 80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
997 90, 91, 92, 93, 94, 95, 96, 97, 98, 99,
998 100, 101, 102, 103, 104, 105, 0, 0, 0, 0,
999 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1000 0, 0, 0, 0, 0, 0, 0, 106, 107, 108,
1001 109, 110, 111, 112, 113, 114, 115, 116, 117, 118,
1002 119, 120, 121, 122, 0, 123, 124, 0, 0, 125,
1003 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1004 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1005 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1006 0, 0, 0, 0, 0, 0, 126, 0, 0, 0,
1007 0, 451, 127, -326, -326, -326, -326, -326, -326, -326,
1008 -326, -326, -326, -326, -326, -326, -326, -326, -326, -326,
1009 -326, -326, -326, -326, -326, -326, -326, -326, -326, -326,
1010 -326, -326, -326, -326, -326, -326, -326, -326, -326, -326,
1011 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1012 0, 0, -326, -326, -326, -326, 0, 0, -326, 0,
1013 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1014 -326, -326, -326, -326, -326, -326, -326, -326, 0, 0,
1015 0, 148, -326, 69, 70, 71, 72, 73, 74, 75,
1016 76, 77, 78, 79, 80, 81, 82, 83, 84, 85,
1017 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
1018 96, 97, 98, 99, 100, 101, 102, 103, 104, 105,
1019 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1020 0, 0, 149, 150, 151, 152, 0, 0, 0, 0,
1021 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1022 153, 154, 155, 156, 157, 158, 159, 160, 0, 0,
1023 0, 199, 161, 69, 70, 71, 72, 73, 74, 75,
1024 76, 77, 78, 79, 80, 81, 82, 83, 84, 85,
1025 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
1026 96, 97, 98, 99, 100, 101, 102, 103, 104, 105,
1027 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1028 0, 0, 149, 150, 151, 152, 0, 0, 0, 0,
1029 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1030 153, 154, 155, 156, 157, 158, 159, 160, 0, 0,
1031 0, 224, 161, 69, 70, 71, 72, 73, 74, 75,
1032 76, 77, 78, 79, 80, 81, 82, 83, 84, 85,
1033 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
1034 96, 97, 98, 99, 100, 101, 102, 103, 104, 105,
1035 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1036 0, 0, 149, 150, 151, 152, 0, 0, 0, 0,
1037 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1038 153, 154, 155, 156, 157, 158, 159, 160, 0, 0,
1039 0, 246, 161, 69, 70, 71, 72, 73, 74, 75,
1040 76, 77, 78, 79, 80, 81, 82, 83, 84, 85,
1041 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
1042 96, 97, 98, 99, 100, 101, 102, 103, 104, 105,
1043 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1044 0, 0, 149, 150, 151, 152, 0, 0, 0, 0,
1045 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1046 153, 154, 155, 156, 157, 158, 159, 160, 0, 0,
1047 0, 253, 161, 69, 70, 71, 72, 73, 74, 75,
1048 76, 77, 78, 79, 80, 81, 82, 83, 84, 85,
1049 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
1050 96, 97, 98, 99, 100, 101, 102, 103, 104, 105,
1051 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1052 0, 0, 149, 150, 151, 152, 0, 0, 0, 0,
1053 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1054 153, 154, 155, 156, 157, 158, 159, 160, 0, 0,
1055 0, 255, 161, 69, 70, 71, 72, 73, 74, 75,
1056 76, 77, 78, 79, 80, 81, 82, 83, 84, 85,
1057 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
1058 96, 97, 98, 99, 100, 101, 102, 103, 104, 105,
1059 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1060 0, 0, 149, 150, 151, 152, 0, 0, 0, 0,
1061 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1062 153, 154, 155, 156, 157, 158, 159, 160, 0, 0,
1063 0, 0, 161, 69, 70, 71, 72, 73, 74, 75,
1064 76, 77, 78, 79, 80, 81, 82, 83, 84, 85,
1065 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
1066 96, 97, 98, 99, 100, 101, 102, 103, 104, 105,
1067 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1068 0, 0, 149, 150, 151, 152, 0, 0, 0, 0,
1069 0, 609, 610, 0, 0, 0, 0, 0, 0, 0,
1070 153, 154, 155, 156, 157, 158, 159, 160, 0, 0,
1071 0, 0, 161, 69, 70, 71, 72, 73, 74, 75,
1072 76, 77, 78, 79, 80, 81, 82, 83, 84, 85,
1073 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
1074 96, 97, 98, 99, 100, 101, 102, 103, 104, 105,
1075 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1076 0, 0, 149, 150, 151, 152, 0, 0, 545, 0,
1077 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1078 153, 154, 155, 156, 157, 158, 159, 160, 0, 0,
1079 0, 0, 161, 69, 70, 71, 72, 73, 74, 75,
1080 76, 77, 78, 79, 80, 81, 82, 83, 84, 85,
1081 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
1082 96, 97, 98, 99, 100, 101, 102, 103, 104, 105,
1083 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1084 0, 0, 149, 150, 151, 152, 0, 0, 0, 0,
1085 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1086 153, 154, 155, 156, 157, 158, 159, 160, 0, 0,
1087 0, 0, 161
1088 };
1089
1090 static const short yycheck[] = { 4,
1091 5, 127, 12, 198, 5, 126, 213, 142, 278, 276,
1092 20, 274, 361, 23, 533, 328, 391, 330, 16, 29,
1093 1, 31, 32, 480, 209, 1, 11, 1, 1, 1,
1094 1, 1, 1, 58, 1, 11, 8, 1, 1, 20,
1095 9, 9, 8, 1, 222, 1, 8, 11, 9, 34,
1096 1, 78, 173, 1, 1, 1, 263, 35, 34, 35,
1097 1, 37, 11, 35, 36, 21, 35, 36, 58, 13,
1098 34, 114, 17, 18, 19, 16, 58, 6, 121, 8,
1099 58, 58, 58, 13, 1, 70, 71, 72, 121, 210,
1100 75, 58, 9, 78, 70, 71, 72, 304, 58, 75,
1101 133, 128, 78, 70, 71, 59, 70, 71, 72, 14,
1102 125, 75, 82, 61, 78, 58, 635, 80, 296, 70,
1103 71, 77, 127, 74, 70, 71, 1, 137, 11, 134,
1104 77, 116, 77, 134, 1, 120, 41, 42, 128, 346,
1105 116, 126, 124, 600, 120, 119, 131, 120, 129, 120,
1106 126, 34, 116, 120, 126, 131, 120, 126, 126, 366,
1107 118, 127, 126, 11, 126, 1, 127, 131, 128, 120,
1108 433, 115, 439, 692, 120, 58, 121, 126, 176, 449,
1109 493, 494, 180, 368, 1, 115, 34, 70, 71, 72,
1110 125, 66, 75, 1, 1, 78, 1, 1, 73, 74,
1111 5, 5, 1, 1, 79, 58, 10, 43, 44, 45,
1112 77, 78, 58, 21, 21, 120, 342, 736, 344, 34,
1113 124, 34, 70, 71, 72, 24, 25, 75, 1, 119,
1114 78, 114, 5, 116, 123, 58, 40, 120, 61, 58,
1115 59, 11, 15, 126, 134, 135, 256, 83, 131, 66,
1116 58, 58, 58, 58, 58, 70, 71, 70, 71, 58,
1117 58, 266, 267, 273, 34, 266, 114, 11, 116, 77,
1118 77, 124, 120, 121, 58, 1, 34, 626, 126, 549,
1119 124, 291, 58, 131, 58, 58, 130, 61, 551, 559,
1120 34, 486, 114, 488, 561, 670, 671, 432, 1, 121,
1121 70, 71, 72, 438, 36, 75, 58, 122, 78, 122,
1122 70, 71, 70, 71, 74, 130, 58, 130, 114, 61,
1123 46, 47, 51, 518, 58, 121, 70, 71, 72, 58,
1124 114, 75, 61, 58, 78, 51, 341, 342, 61, 344,
1125 341, 58, 58, 58, 114, 61, 116, 58, 122, 123,
1126 120, 121, 17, 18, 19, 58, 126, 17, 18, 19,
1127 120, 131, 120, 5, 122, 68, 69, 70, 71, 72,
1128 114, 129, 116, 17, 18, 19, 120, 647, 136, 137,
1129 122, 123, 126, 17, 18, 19, 656, 131, 66, 23,
1130 66, 120, 1, 122, 123, 73, 58, 73, 121, 122,
1131 123, 79, 58, 79, 70, 71, 122, 123, 58, 604,
1132 1, 606, 77, 423, 68, 69, 81, 77, 553, 58,
1133 58, 81, 61, 24, 25, 48, 49, 50, 563, 38,
1134 39, 552, 58, 77, 58, 61, 114, 61, 7, 646,
1135 9, 562, 120, 77, 120, 48, 49, 117, 655, 570,
1136 576, 58, 58, 660, 120, 61, 466, 58, 584, 117,
1137 586, 52, 53, 54, 55, 132, 133, 118, 675, 120,
1138 517, 122, 1, 520, 58, 118, 597, 120, 129, 122,
1139 490, 12, 13, 124, 679, 121, 129, 117, 124, 121,
1140 616, 58, 124, 22, 58, 24, 25, 26, 27, 28,
1141 29, 30, 31, 32, 33, 68, 69, 70, 71, 72,
1142 12, 13, 58, 22, 709, 24, 25, 26, 27, 28,
1143 29, 30, 31, 32, 33, 316, 317, 0, 1, 58,
1144 458, 459, 556, 557, 566, 567, 115, 117, 58, 58,
1145 735, 58, 58, 58, 58, 58, 58, 80, 84, 79,
1146 58, 58, 79, 58, 58, 61, 79, 58, 79, 58,
1147 58, 58, 58, 114, 40, 127, 61, 61, 578, 58,
1148 58, 576, 58, 58, 58, 701, 58, 114, 583, 584,
1149 121, 586, 583, 56, 57, 20, 129, 58, 58, 127,
1150 77, 136, 124, 10, 120, 58, 124, 58, 58, 58,
1151 58, 58, 58, 58, 8, 58, 9, 125, 58, 58,
1152 15, 616, 85, 86, 87, 88, 89, 90, 91, 92,
1153 93, 94, 95, 96, 97, 98, 99, 100, 101, 102,
1154 103, 104, 105, 106, 107, 108, 109, 110, 111, 112,
1155 113, 120, 125, 58, 58, 58, 124, 58, 20, 121,
1156 124, 61, 121, 121, 120, 130, 77, 122, 70, 61,
1157 127, 61, 58, 58, 58, 58, 128, 20, 58, 61,
1158 61, 58, 58, 114, 128, 685, 115, 121, 126, 126,
1159 690, 123, 125, 128, 124, 121, 124, 124, 121, 121,
1160 120, 61, 61, 121, 128, 1, 701, 3, 4, 5,
1161 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1162 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
1163 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
1164 36, 37, 38, 39, 62, 0, 0, 33, 718, 128,
1165 128, 121, 267, 128, 30, 128, 130, 128, 127, 127,
1166 121, 243, 58, 130, 130, 61, 62, 63, 64, 65,
1167 66, 67, 68, 69, 70, 71, 72, 73, 74, 75,
1168 76, 77, 130, 79, 80, 121, 121, 83, 122, 128,
1169 30, 30, 30, 371, 457, 462, 508, 355, 7, 503,
1170 140, 243, 505, 315, 591, 578, 673, 196, 674, 323,
1171 393, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1172 -1, -1, -1, -1, 120, -1, -1, 0, 1, 1,
1173 126, 3, 4, 5, 6, 7, 8, 9, 10, 11,
1174 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
1175 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
1176 32, 33, 34, 35, 36, 37, 38, 39, -1, -1,
1177 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1178 -1, -1, -1, 56, -1, -1, 59, -1, -1, 61,
1179 62, 63, 64, 65, 66, 67, 68, 69, 70, 71,
1180 72, 73, 74, 75, 76, 77, -1, 79, 80, -1,
1181 -1, 83, 85, 86, 87, 88, 89, 90, 91, 92,
1182 93, 94, 95, 96, 97, 98, 99, 100, 101, 102,
1183 103, 104, 105, 106, 107, 108, 109, 110, 111, 112,
1184 113, -1, -1, -1, -1, -1, -1, -1, 120, -1,
1185 -1, -1, -1, -1, 126, 3, 4, 5, 6, 7,
1186 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
1187 18, 19, 20, 21, 22, 23, 24, 25, 26, 27,
1188 28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
1189 38, 39, -1, -1, -1, -1, -1, -1, -1, -1,
1190 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1191 58, -1, -1, 61, 62, 63, 64, 65, 66, 67,
1192 68, 69, 70, 71, 72, 73, 74, 75, 76, 77,
1193 -1, 79, 80, -1, -1, 83, -1, -1, -1, -1,
1194 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1195 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1196 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1197 -1, -1, 120, -1, -1, -1, -1, -1, 126, 3,
1198 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
1199 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
1200 24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
1201 34, 35, 36, 37, 38, 39, -1, -1, -1, -1,
1202 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1203 -1, -1, -1, -1, -1, -1, -1, 61, 62, 63,
1204 64, 65, 66, 67, 68, 69, 70, 71, 72, 73,
1205 74, 75, 76, 77, -1, 79, 80, -1, -1, 83,
1206 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1207 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1208 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1209 -1, -1, -1, -1, -1, -1, 120, -1, -1, -1,
1210 -1, 1, 126, 3, 4, 5, 6, 7, 8, 9,
1211 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
1212 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
1213 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
1214 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1215 -1, -1, 52, 53, 54, 55, -1, -1, 58, -1,
1216 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1217 70, 71, 72, 73, 74, 75, 76, 77, -1, -1,
1218 -1, 1, 82, 3, 4, 5, 6, 7, 8, 9,
1219 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
1220 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
1221 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
1222 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1223 -1, -1, 52, 53, 54, 55, -1, -1, -1, -1,
1224 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1225 70, 71, 72, 73, 74, 75, 76, 77, -1, -1,
1226 -1, 1, 82, 3, 4, 5, 6, 7, 8, 9,
1227 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
1228 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
1229 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
1230 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1231 -1, -1, 52, 53, 54, 55, -1, -1, -1, -1,
1232 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1233 70, 71, 72, 73, 74, 75, 76, 77, -1, -1,
1234 -1, 1, 82, 3, 4, 5, 6, 7, 8, 9,
1235 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
1236 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
1237 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
1238 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1239 -1, -1, 52, 53, 54, 55, -1, -1, -1, -1,
1240 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1241 70, 71, 72, 73, 74, 75, 76, 77, -1, -1,
1242 -1, 1, 82, 3, 4, 5, 6, 7, 8, 9,
1243 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
1244 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
1245 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
1246 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1247 -1, -1, 52, 53, 54, 55, -1, -1, -1, -1,
1248 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1249 70, 71, 72, 73, 74, 75, 76, 77, -1, -1,
1250 -1, 1, 82, 3, 4, 5, 6, 7, 8, 9,
1251 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
1252 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
1253 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
1254 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1255 -1, -1, 52, 53, 54, 55, -1, -1, -1, -1,
1256 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1257 70, 71, 72, 73, 74, 75, 76, 77, -1, -1,
1258 -1, 1, 82, 3, 4, 5, 6, 7, 8, 9,
1259 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
1260 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
1261 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
1262 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1263 -1, -1, 52, 53, 54, 55, -1, -1, -1, -1,
1264 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1265 70, 71, 72, 73, 74, 75, 76, 77, -1, -1,
1266 -1, -1, 82, 3, 4, 5, 6, 7, 8, 9,
1267 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
1268 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
1269 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
1270 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1271 -1, -1, 52, 53, 54, 55, -1, -1, -1, -1,
1272 -1, 61, 62, -1, -1, -1, -1, -1, -1, -1,
1273 70, 71, 72, 73, 74, 75, 76, 77, -1, -1,
1274 -1, -1, 82, 3, 4, 5, 6, 7, 8, 9,
1275 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
1276 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
1277 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
1278 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1279 -1, -1, 52, 53, 54, 55, -1, -1, 58, -1,
1280 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1281 70, 71, 72, 73, 74, 75, 76, 77, -1, -1,
1282 -1, -1, 82, 3, 4, 5, 6, 7, 8, 9,
1283 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
1284 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
1285 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
1286 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1287 -1, -1, 52, 53, 54, 55, -1, -1, -1, -1,
1288 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1289 70, 71, 72, 73, 74, 75, 76, 77, -1, -1,
1290 -1, -1, 82
1291 };
1292 /* -*-C-*- Note some compilers choke on comments on `#line' lines. */
1293 #line 3 "/usr/local/share/bison.simple"
1294
1295 /* Skeleton output parser for bison,
1296 Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc.
1297
1298 This program is free software; you can redistribute it and/or modify
1299 it under the terms of the GNU General Public License as published by
1300 the Free Software Foundation; either version 2, or (at your option)
1301 any later version.
1302
1303 This program is distributed in the hope that it will be useful,
1304 but WITHOUT ANY WARRANTY; without even the implied warranty of
1305 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1306 GNU General Public License for more details.
1307
1308 You should have received a copy of the GNU General Public License
1309 along with this program; if not, write to the Free Software
1310 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
1311
1312 /* As a special exception, when this file is copied by Bison into a
1313 Bison output file, you may use that output file without restriction.
1314 This special exception was added by the Free Software Foundation
1315 in version 1.24 of Bison. */
1316
1317 #ifndef alloca
1318 #ifdef __GNUC__
1319 #define alloca __builtin_alloca
1320 #else /* not GNU C. */
1321 #if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi)
1322 #include <alloca.h>
1323 #else /* not sparc */
1324 #if defined (MSDOS) && !defined (__TURBOC__)
1325 #include <malloc.h>
1326 #else /* not MSDOS, or __TURBOC__ */
1327 #if defined(_AIX)
1328 #include <malloc.h>
1329 #pragma alloca
1330 #else /* not MSDOS, __TURBOC__, or _AIX */
1331 #ifdef __hpux
1332 #ifdef __cplusplus
1333 extern "C" {
1334 void *alloca (unsigned int);
1335 };
1336 #else /* not __cplusplus */
1337 void *alloca ();
1338 #endif /* not __cplusplus */
1339 #endif /* __hpux */
1340 #endif /* not _AIX */
1341 #endif /* not MSDOS, or __TURBOC__ */
1342 #endif /* not sparc. */
1343 #endif /* not GNU C. */
1344 #endif /* alloca not defined. */
1345
1346 /* This is the parser code that is written into each bison parser
1347 when the %semantic_parser declaration is not specified in the grammar.
1348 It was written by Richard Stallman by simplifying the hairy parser
1349 used when %semantic_parser is specified. */
1350
1351 /* Note: there must be only one dollar sign in this file.
1352 It is replaced by the list of actions, each action
1353 as one case of the switch. */
1354
1355 #define yyerrok (yyerrstatus = 0)
1356 #define yyclearin (yychar = YYEMPTY)
1357 #define YYEMPTY -2
1358 #define YYEOF 0
1359 #define YYACCEPT return(0)
1360 #define YYABORT return(1)
1361 #define YYERROR goto yyerrlab1
1362 /* Like YYERROR except do call yyerror.
1363 This remains here temporarily to ease the
1364 transition to the new meaning of YYERROR, for GCC.
1365 Once GCC version 2 has supplanted version 1, this can go. */
1366 #define YYFAIL goto yyerrlab
1367 #define YYRECOVERING() (!!yyerrstatus)
/* [<][>][^][v][top][bottom][index][help] */
1368 #define YYBACKUP(token, value) \
/* [<][>][^][v][top][bottom][index][help] */
1369 do \
1370 if (yychar == YYEMPTY && yylen == 1) \
1371 { yychar = (token), yylval = (value); \
1372 yychar1 = YYTRANSLATE (yychar); \
1373 YYPOPSTACK; \
1374 goto yybackup; \
1375 } \
1376 else \
1377 { yyerror ("syntax error: cannot back up"); YYERROR; } \
1378 while (0)
1379
1380 #define YYTERROR 1
1381 #define YYERRCODE 256
1382
1383 #ifndef YYPURE
1384 #define YYLEX yylex()
1385 #endif
1386
1387 #ifdef YYPURE
1388 #ifdef YYLSP_NEEDED
1389 #ifdef YYLEX_PARAM
1390 #define YYLEX yylex(&yylval, &yylloc, YYLEX_PARAM)
1391 #else
1392 #define YYLEX yylex(&yylval, &yylloc)
1393 #endif
1394 #else /* not YYLSP_NEEDED */
1395 #ifdef YYLEX_PARAM
1396 #define YYLEX yylex(&yylval, YYLEX_PARAM)
1397 #else
1398 #define YYLEX yylex(&yylval)
1399 #endif
1400 #endif /* not YYLSP_NEEDED */
1401 #endif
1402
1403 /* If nonreentrant, generate the variables here */
1404
1405 #ifndef YYPURE
1406
1407 int yychar; /* the lookahead symbol */
1408 YYSTYPE yylval; /* the semantic value of the */
1409 /* lookahead symbol */
1410
1411 #ifdef YYLSP_NEEDED
1412 YYLTYPE yylloc; /* location data for the lookahead */
1413 /* symbol */
1414 #endif
1415
1416 int yynerrs; /* number of parse errors so far */
1417 #endif /* not YYPURE */
1418
1419 #if YYDEBUG != 0
1420 int yydebug; /* nonzero means print parse trace */
1421 /* Since this is uninitialized, it does not stop multiple parsers
1422 from coexisting. */
1423 #endif
1424
1425 /* YYINITDEPTH indicates the initial size of the parser's stacks */
1426
1427 #ifndef YYINITDEPTH
1428 #define YYINITDEPTH 200
1429 #endif
1430
1431 /* YYMAXDEPTH is the maximum size the stacks can grow to
1432 (effective only if the built-in stack extension method is used). */
1433
1434 #if YYMAXDEPTH == 0
1435 #undef YYMAXDEPTH
1436 #endif
1437
1438 #ifndef YYMAXDEPTH
1439 #define YYMAXDEPTH 10000
1440 #endif
1441
1442 /* Prevent warning if -Wstrict-prototypes. */
1443 #ifdef __GNUC__
1444 int yyparse (void);
1445 #endif
1446
1447 #if __GNUC__ > 1 /* GNU C and GNU C++ define this. */
1448 #define __yy_memcpy(TO,FROM,COUNT) __builtin_memcpy(TO,FROM,COUNT)
/* [<][>][^][v][top][bottom][index][help] */
1449 #else /* not GNU C or C++ */
1450 #ifndef __cplusplus
1451
1452 /* This is the most reliable way to avoid incompatibilities
1453 in available built-in functions on various systems. */
1454 static void
1455 __yy_memcpy (to, from, count)
/* [<][>][^][v][top][bottom][index][help] */
1456 char *to;
1457 char *from;
1458 int count;
1459 {
1460 register char *f = from;
1461 register char *t = to;
1462 register int i = count;
1463
1464 while (i-- > 0)
1465 *t++ = *f++;
1466 }
1467
1468 #else /* __cplusplus */
1469
1470 /* This is the most reliable way to avoid incompatibilities
1471 in available built-in functions on various systems. */
1472 static void
1473 __yy_memcpy (char *to, char *from, int count)
/* [<][>][^][v][top][bottom][index][help] */
1474 {
1475 register char *f = from;
1476 register char *t = to;
1477 register int i = count;
1478
1479 while (i-- > 0)
1480 *t++ = *f++;
1481 }
1482
1483 #endif
1484 #endif
1485
1486 #line 196 "/usr/local/share/bison.simple"
1487
1488 /* The user can define YYPARSE_PARAM as the name of an argument to be passed
1489 into yyparse. The argument should have type void *.
1490 It should actually point to an object.
1491 Grammar actions can access the variable by casting it
1492 to the proper pointer type. */
1493
1494 #ifdef YYPARSE_PARAM
1495 #ifdef __cplusplus
1496 #define YYPARSE_PARAM_ARG void *YYPARSE_PARAM
1497 #define YYPARSE_PARAM_DECL
1498 #else /* not __cplusplus */
1499 #define YYPARSE_PARAM_ARG YYPARSE_PARAM
1500 #define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
1501 #endif /* not __cplusplus */
1502 #else /* not YYPARSE_PARAM */
1503 #define YYPARSE_PARAM_ARG
1504 #define YYPARSE_PARAM_DECL
1505 #endif /* not YYPARSE_PARAM */
1506
1507 int
1508 yyparse(YYPARSE_PARAM_ARG)
/* [<][>][^][v][top][bottom][index][help] */
1509 YYPARSE_PARAM_DECL
1510 {
1511 register int yystate;
1512 register int yyn;
1513 register short *yyssp;
1514 register YYSTYPE *yyvsp;
1515 int yyerrstatus; /* number of tokens to shift before error messages enabled */
1516 int yychar1 = 0; /* lookahead token as an internal (translated) token number */
1517
1518 short yyssa[YYINITDEPTH]; /* the state stack */
1519 YYSTYPE yyvsa[YYINITDEPTH]; /* the semantic value stack */
1520
1521 short *yyss = yyssa; /* refer to the stacks thru separate pointers */
1522 YYSTYPE *yyvs = yyvsa; /* to allow yyoverflow to reallocate them elsewhere */
1523
1524 #ifdef YYLSP_NEEDED
1525 YYLTYPE yylsa[YYINITDEPTH]; /* the location stack */
1526 YYLTYPE *yyls = yylsa;
1527 YYLTYPE *yylsp;
1528
1529 #define YYPOPSTACK (yyvsp--, yyssp--, yylsp--)
1530 #else
1531 #define YYPOPSTACK (yyvsp--, yyssp--)
1532 #endif
1533
1534 int yystacksize = YYINITDEPTH;
1535
1536 #ifdef YYPURE
1537 int yychar;
1538 YYSTYPE yylval;
1539 int yynerrs;
1540 #ifdef YYLSP_NEEDED
1541 YYLTYPE yylloc;
1542 #endif
1543 #endif
1544
1545 YYSTYPE yyval; /* the variable used to return */
1546 /* semantic values from the action */
1547 /* routines */
1548
1549 int yylen;
1550
1551 #if YYDEBUG != 0
1552 if (yydebug)
1553 fprintf(stderr, "Starting parse\n");
1554 #endif
1555
1556 yystate = 0;
1557 yyerrstatus = 0;
1558 yynerrs = 0;
1559 yychar = YYEMPTY; /* Cause a token to be read. */
1560
1561 /* Initialize stack pointers.
1562 Waste one element of value and location stack
1563 so that they stay on the same level as the state stack.
1564 The wasted elements are never initialized. */
1565
1566 yyssp = yyss - 1;
1567 yyvsp = yyvs;
1568 #ifdef YYLSP_NEEDED
1569 yylsp = yyls;
1570 #endif
1571
1572 /* Push a new state, which is found in yystate . */
1573 /* In all cases, when you get here, the value and location stacks
1574 have just been pushed. so pushing a state here evens the stacks. */
1575 yynewstate:
1576
1577 *++yyssp = yystate;
1578
1579 if (yyssp >= yyss + yystacksize - 1)
1580 {
1581 /* Give user a chance to reallocate the stack */
1582 /* Use copies of these so that the &'s don't force the real ones into memory. */
1583 YYSTYPE *yyvs1 = yyvs;
1584 short *yyss1 = yyss;
1585 #ifdef YYLSP_NEEDED
1586 YYLTYPE *yyls1 = yyls;
1587 #endif
1588
1589 /* Get the current used size of the three stacks, in elements. */
1590 int size = yyssp - yyss + 1;
1591
1592 #ifdef yyoverflow
1593 /* Each stack pointer address is followed by the size of
1594 the data in use in that stack, in bytes. */
1595 #ifdef YYLSP_NEEDED
1596 /* This used to be a conditional around just the two extra args,
1597 but that might be undefined if yyoverflow is a macro. */
1598 yyoverflow("parser stack overflow",
1599 &yyss1, size * sizeof (*yyssp),
1600 &yyvs1, size * sizeof (*yyvsp),
1601 &yyls1, size * sizeof (*yylsp),
1602 &yystacksize);
1603 #else
1604 yyoverflow("parser stack overflow",
1605 &yyss1, size * sizeof (*yyssp),
1606 &yyvs1, size * sizeof (*yyvsp),
1607 &yystacksize);
1608 #endif
1609
1610 yyss = yyss1; yyvs = yyvs1;
1611 #ifdef YYLSP_NEEDED
1612 yyls = yyls1;
1613 #endif
1614 #else /* no yyoverflow */
1615 /* Extend the stack our own way. */
1616 if (yystacksize >= YYMAXDEPTH)
1617 {
1618 yyerror("parser stack overflow");
1619 return 2;
1620 }
1621 yystacksize *= 2;
1622 if (yystacksize > YYMAXDEPTH)
1623 yystacksize = YYMAXDEPTH;
1624 yyss = (short *) alloca (yystacksize * sizeof (*yyssp));
1625 __yy_memcpy ((char *)yyss, (char *)yyss1, size * sizeof (*yyssp));
1626 yyvs = (YYSTYPE *) alloca (yystacksize * sizeof (*yyvsp));
1627 __yy_memcpy ((char *)yyvs, (char *)yyvs1, size * sizeof (*yyvsp));
1628 #ifdef YYLSP_NEEDED
1629 yyls = (YYLTYPE *) alloca (yystacksize * sizeof (*yylsp));
1630 __yy_memcpy ((char *)yyls, (char *)yyls1, size * sizeof (*yylsp));
1631 #endif
1632 #endif /* no yyoverflow */
1633
1634 yyssp = yyss + size - 1;
1635 yyvsp = yyvs + size - 1;
1636 #ifdef YYLSP_NEEDED
1637 yylsp = yyls + size - 1;
1638 #endif
1639
1640 #if YYDEBUG != 0
1641 if (yydebug)
1642 fprintf(stderr, "Stack size increased to %d\n", yystacksize);
1643 #endif
1644
1645 if (yyssp >= yyss + yystacksize - 1)
1646 YYABORT;
1647 }
1648
1649 #if YYDEBUG != 0
1650 if (yydebug)
1651 fprintf(stderr, "Entering state %d\n", yystate);
1652 #endif
1653
1654 goto yybackup;
1655 yybackup:
1656
1657 /* Do appropriate processing given the current state. */
1658 /* Read a lookahead token if we need one and don't already have one. */
1659 /* yyresume: */
1660
1661 /* First try to decide what to do without reference to lookahead token. */
1662
1663 yyn = yypact[yystate];
1664 if (yyn == YYFLAG)
1665 goto yydefault;
1666
1667 /* Not known => get a lookahead token if don't already have one. */
1668
1669 /* yychar is either YYEMPTY or YYEOF
1670 or a valid token in external form. */
1671
1672 if (yychar == YYEMPTY)
1673 {
1674 #if YYDEBUG != 0
1675 if (yydebug)
1676 fprintf(stderr, "Reading a token: ");
1677 #endif
1678 yychar = YYLEX;
1679 }
1680
1681 /* Convert token to internal form (in yychar1) for indexing tables with */
1682
1683 if (yychar <= 0) /* This means end of input. */
1684 {
1685 yychar1 = 0;
1686 yychar = YYEOF; /* Don't call YYLEX any more */
1687
1688 #if YYDEBUG != 0
1689 if (yydebug)
1690 fprintf(stderr, "Now at end of input.\n");
1691 #endif
1692 }
1693 else
1694 {
1695 yychar1 = YYTRANSLATE(yychar);
1696
1697 #if YYDEBUG != 0
1698 if (yydebug)
1699 {
1700 fprintf (stderr, "Next token is %d (%s", yychar, yytname[yychar1]);
1701 /* Give the individual parser a way to print the precise meaning
1702 of a token, for further debugging info. */
1703 #ifdef YYPRINT
1704 YYPRINT (stderr, yychar, yylval);
1705 #endif
1706 fprintf (stderr, ")\n");
1707 }
1708 #endif
1709 }
1710
1711 yyn += yychar1;
1712 if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1)
1713 goto yydefault;
1714
1715 yyn = yytable[yyn];
1716
1717 /* yyn is what to do for this token type in this state.
1718 Negative => reduce, -yyn is rule number.
1719 Positive => shift, yyn is new state.
1720 New state is final state => don't bother to shift,
1721 just return success.
1722 0, or most negative number => error. */
1723
1724 if (yyn < 0)
1725 {
1726 if (yyn == YYFLAG)
1727 goto yyerrlab;
1728 yyn = -yyn;
1729 goto yyreduce;
1730 }
1731 else if (yyn == 0)
1732 goto yyerrlab;
1733
1734 if (yyn == YYFINAL)
1735 YYACCEPT;
1736
1737 /* Shift the lookahead token. */
1738
1739 #if YYDEBUG != 0
1740 if (yydebug)
1741 fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]);
1742 #endif
1743
1744 /* Discard the token being shifted unless it is eof. */
1745 if (yychar != YYEOF)
1746 yychar = YYEMPTY;
1747
1748 *++yyvsp = yylval;
1749 #ifdef YYLSP_NEEDED
1750 *++yylsp = yylloc;
1751 #endif
1752
1753 /* count tokens shifted since error; after three, turn off error status. */
1754 if (yyerrstatus) yyerrstatus--;
1755
1756 yystate = yyn;
1757 goto yynewstate;
1758
1759 /* Do the default action for the current state. */
1760 yydefault:
1761
1762 yyn = yydefact[yystate];
1763 if (yyn == 0)
1764 goto yyerrlab;
1765
1766 /* Do a reduction. yyn is the number of a rule to reduce with. */
1767 yyreduce:
1768 yylen = yyr2[yyn];
1769 if (yylen > 0)
1770 yyval = yyvsp[1-yylen]; /* implement default value of the action */
1771
1772 #if YYDEBUG != 0
1773 if (yydebug)
1774 {
1775 int i;
1776
1777 fprintf (stderr, "Reducing via rule %d (line %d), ",
1778 yyn, yyrline[yyn]);
1779
1780 /* Print the symbols being reduced, and their result. */
1781 for (i = yyprhs[yyn]; yyrhs[i] > 0; i++)
1782 fprintf (stderr, "%s ", yytname[yyrhs[i]]);
1783 fprintf (stderr, " -> %s\n", yytname[yyr1[yyn]]);
1784 }
1785 #endif
1786
1787
1788 switch (yyn) {
1789
1790 case 1:
1791 #line 384 "rpsl.y"
1792 {
1793 YYACCEPT;
1794 ;
1795 break;}
1796 case 2:
1797 #line 387 "rpsl.y"
1798 {
1799 YYACCEPT;
1800 ;
1801 break;}
1802 case 3:
1803 #line 390 "rpsl.y"
1804 {
1805 handle_object_error("Error: syntax error\n");
1806 YYABORT;
1807 ;
1808 break;}
1809 case 4:
1810 #line 394 "rpsl.y"
1811 { // end of file
1812 YYACCEPT;
1813 ;
1814 break;}
1815 case 5:
1816 #line 397 "rpsl.y"
1817 { // end of file
1818 YYACCEPT;
1819 ;
1820 break;}
1821 case 6:
1822 #line 400 "rpsl.y"
1823 { // end of file
1824 handle_object_error("Error: syntax error\n");
1825 YYABORT;
1826 ;
1827 break;}
1828 case 7:
1829 #line 404 "rpsl.y"
1830 { // end of file
1831 YYABORT;
1832 ;
1833 break;}
1834 case 8:
1835 #line 409 "rpsl.y"
1836 {
1837 (*current_object) += yyvsp[0].attr;
1838 ;
1839 break;}
1840 case 9:
1841 #line 412 "rpsl.y"
1842 {
1843 (*current_object) += yyvsp[0].attr;
1844 ;
1845 break;}
1846 case 39:
1847 #line 446 "rpsl.y"
1848 { // the current line started w/ non-attribute
1849 yyval.attr = changeCurrentAttr(new Attr);
1850 handle_error("Error: syntax error\n");
1851 ;
1852 break;}
1853 case 40:
1854 #line 450 "rpsl.y"
1855 {
1856 yyval.attr = changeCurrentAttr(new Attr);
1857 handle_error("Error: syntax error\n");
1858 yyerrok;
1859 ;
1860 break;}
1861 case 41:
1862 #line 459 "rpsl.y"
1863 {
1864 free(yyvsp[-2].string);
1865 yyval.attr = yyvsp[-3].attr;
1866 ;
1867 break;}
1868 case 42:
1869 #line 463 "rpsl.y"
1870 {
1871 free(yyvsp[-1].string);
1872 yyval.attr = yyvsp[-2].attr;
1873 ;
1874 break;}
1875 case 43:
1876 #line 467 "rpsl.y"
1877 {
1878 handle_error("Error: \"changed: <email> <YYYYMMDD>\" expected\n");
1879 yyerrok;
1880 ;
1881 break;}
1882 case 44:
1883 #line 474 "rpsl.y"
1884 {
1885 free(yyvsp[-1].string);
1886 yyval.attr = yyvsp[-2].attr;
1887 ;
1888 break;}
1889 case 45:
1890 #line 478 "rpsl.y"
1891 {
1892 handle_error("Error: \"%s: <nic-handle>\" expected\n",yyvsp[-2].attr->type->name());
1893 yyerrok;
1894 ;
1895 break;}
1896 case 46:
1897 #line 483 "rpsl.y"
1898 {
1899 yyval.attr = yyvsp[-2].attr;
1900 ;
1901 break;}
1902 case 47:
1903 #line 486 "rpsl.y"
1904 {
1905 free(yyvsp[-1].string);
1906 yyval.attr = yyvsp[-3].attr;
1907 ;
1908 break;}
1909 case 48:
1910 #line 490 "rpsl.y"
1911 {
1912 free(yyvsp[-1].string);
1913 yyval.attr = yyvsp[-3].attr;
1914 ;
1915 break;}
1916 case 49:
1917 #line 494 "rpsl.y"
1918 {
1919 free(yyvsp[-1].string);
1920 yyval.attr = yyvsp[-2].attr;
1921 ;
1922 break;}
1923 case 50:
1924 #line 498 "rpsl.y"
1925 {
1926 handle_error("Error: \"auth: MAIL-FROM <regexp>\""
1927 ", \"auth: NONE\", \"auth: CRYPT-PW <cryptedpaswd>\""
1928 " or \"auth: PGPKEY-<pgpid>\" expected\n");
1929 yyerrok;
1930
1931 ;
1932 break;}
1933 case 51:
1934 #line 509 "rpsl.y"
1935 {
1936 yyval.attr = yyvsp[-3].attr;
1937 ;
1938 break;}
1939 case 52:
1940 #line 512 "rpsl.y"
1941 {
1942 yyval.attr = yyvsp[-3].attr;
1943 ;
1944 break;}
1945 case 53:
1946 #line 515 "rpsl.y"
1947 {
1948 yyval.attr = yyvsp[-3].attr;
1949 ;
1950 break;}
1951 case 54:
1952 #line 518 "rpsl.y"
1953 {
1954 yyval.attr = yyvsp[-3].attr;
1955 ;
1956 break;}
1957 case 55:
1958 #line 521 "rpsl.y"
1959 {
1960 yyval.attr = yyvsp[-3].attr;
1961 ;
1962 break;}
1963 case 56:
1964 #line 524 "rpsl.y"
1965 {
1966 handle_error("Error: \"status\" attribute contains invalid keywords\n");
1967 yyerrok;
1968 ;
1969 break;}
1970 case 57:
1971 #line 530 "rpsl.y"
1972 {
1973 yyval.attr = yyvsp[-3].attr;
1974 ;
1975 break;}
1976 case 58:
1977 #line 533 "rpsl.y"
1978 {
1979 yyval.attr = yyvsp[-7].attr;
1980 ;
1981 break;}
1982 case 59:
1983 #line 536 "rpsl.y"
1984 {
1985 yyval.attr = yyvsp[-6].attr;
1986 ;
1987 break;}
1988 case 60:
1989 #line 539 "rpsl.y"
1990 {
1991 yyval.attr = yyvsp[-10].attr;
1992 ;
1993 break;}
1994 case 61:
1995 #line 542 "rpsl.y"
1996 {
1997 handle_error("Error: intn'l phone number expected (with a preceding '+')\n");
1998 yyerrok;
1999 ;
2000 break;}
2001 case 62:
2002 #line 548 "rpsl.y"
2003 {
2004 //sprintf($$, "%i", $1);
2005 yyval.string = strdup("phone"); // well, sprintf($$, "%i", $1) didn't work
2006 ;
2007 break;}
2008 case 63:
2009 #line 552 "rpsl.y"
2010 {
2011 yyval.string = yyvsp[-1].string;
2012 ;
2013 break;}
2014 case 64:
2015 #line 555 "rpsl.y"
2016 {
2017 yyval.string = yyvsp[-2].string;
2018 ;
2019 break;}
2020 case 65:
2021 #line 558 "rpsl.y"
2022 {
2023 yyval.string = yyvsp[-2].string;
2024 ;
2025 break;}
2026 case 66:
2027 #line 563 "rpsl.y"
2028 {
2029 if(yyschema.searchSource(yyvsp[-1].string)){
2030 free(yyvsp[-1].string);
2031 yyval.attr = yyvsp[-2].attr;
2032 }else{
2033 free(yyvsp[-1].string);
2034 handle_error("Error: No such source\n");
2035 }
2036 ;
2037 break;}
2038 case 67:
2039 #line 572 "rpsl.y"
2040 {
2041 handle_error("Error: invalid source attribute\n");
2042 yyerrok;
2043 ;
2044 break;}
2045 case 68:
2046 #line 577 "rpsl.y"
2047 {
2048 yyval.attr = yyvsp[-3].attr;
2049 ;
2050 break;}
2051 case 69:
2052 #line 580 "rpsl.y"
2053 {
2054 yyval.attr = yyvsp[-4].attr;
2055 ;
2056 break;}
2057 case 70:
2058 #line 583 "rpsl.y"
2059 {
2060 yyval.attr = yyvsp[-3].attr;
2061 ;
2062 break;}
2063 case 71:
2064 #line 586 "rpsl.y"
2065 {
2066 yyval.attr = yyvsp[-4].attr;
2067 ;
2068 break;}
2069 case 72:
2070 #line 589 "rpsl.y"
2071 {
2072 yyval.attr = yyvsp[-3].attr;
2073 ;
2074 break;}
2075 case 73:
2076 #line 592 "rpsl.y"
2077 {
2078 yyval.attr = yyvsp[-4].attr;
2079 ;
2080 break;}
2081 case 74:
2082 #line 595 "rpsl.y"
2083 {
2084 yyval.attr = yyvsp[-3].attr;
2085 ;
2086 break;}
2087 case 75:
2088 #line 598 "rpsl.y"
2089 {
2090 yyval.attr = yyvsp[-4].attr;
2091 ;
2092 break;}
2093 case 76:
2094 #line 601 "rpsl.y"
2095 {
2096 handle_error("Error: invalid refer attribute\n");
2097 yyerrok;
2098 ;
2099 break;}
2100 case 77:
2101 #line 606 "rpsl.y"
2102 {
2103 if(yyschema.searchCountry(yyvsp[-1].string)){
2104 free(yyvsp[-1].string);
2105 yyval.attr = yyvsp[-2].attr;
2106 }else{
2107 free(yyvsp[-1].string);
2108 handle_error("Error: No such country\n");
2109 }
2110 ;
2111 break;}
2112 case 78:
2113 #line 615 "rpsl.y"
2114 {
2115 handle_error("Error: invalid country attribute\n");
2116 yyerrok;
2117 ;
2118 break;}
2119 case 79:
2120 #line 620 "rpsl.y"
2121 {
2122 yyval.attr = yyvsp[-3].attr;
2123 ;
2124 break;}
2125 case 80:
2126 #line 623 "rpsl.y"
2127 {
2128 handle_error("Error: invalid %s attribute\n",yyvsp[-2].attr->type->name());
2129 yyerrok;
2130 ;
2131 break;}
2132 case 81:
2133 #line 628 "rpsl.y"
2134 {
2135 yyval.string = strdup(yyvsp[0].string);
2136 ;
2137 break;}
2138 case 82:
2139 #line 631 "rpsl.y"
2140 {
2141 yyval.string = strdup(yyvsp[0].string);
2142 ;
2143 break;}
2144 case 83:
2145 #line 636 "rpsl.y"
2146 {
2147 char *start = strchr(yyvsp[-1].attr->object->contents + yyvsp[-1].attr->offset, ':') + 1;
2148 int len = yyvsp[-1].attr->object->contents + yyvsp[-1].attr->offset + yyvsp[-1].attr->len - start;
2149 ItemFREETEXT *ft = new ItemFREETEXT(start, len);
2150 ItemList *il = new ItemList;
2151 il->append(ft);
2152
2153 yyval.attr = changeCurrentAttr(new AttrGeneric(yyvsp[-1].attr->type, il));
2154 ;
2155 break;}
2156 case 84:
2157 #line 647 "rpsl.y"
2158 {
2159 if (!yyvsp[-2].attr->type->subsyntax()->validate(yyvsp[-1].list)) {
2160 handle_error("Error: argument to %s should be %s.\n",
2161 yyvsp[-2].attr->type->name(), yyvsp[-2].attr->type->subsyntax()->name());
2162 delete yyvsp[-1].list;
2163 yyval.attr = changeCurrentAttr(new AttrGeneric(yyvsp[-2].attr->type, NULL));
2164 } else
2165 yyval.attr = changeCurrentAttr(new AttrGeneric(yyvsp[-2].attr->type, yyvsp[-1].list));
2166 ;
2167 break;}
2168 case 85:
2169 #line 656 "rpsl.y"
2170 {
2171 yyval.attr = yyvsp[-2].attr;
2172 cout << "issuing error: argument to %s should be %s.(ATTR_GENERIC error TKN_EOA)" << endl;
2173 handle_error("Error: argument to %s should be %s.\n",
2174 yyvsp[-2].attr->type->name(), yyvsp[-2].attr->type->subsyntax()->name());
2175 yyerrok;
2176 ;
2177 break;}
2178 case 86:
2179 #line 665 "rpsl.y"
2180 {
2181 yyval.list = new ItemList;
2182 ;
2183 break;}
2184 case 88:
2185 #line 671 "rpsl.y"
2186 {
2187 yyval.list = new ItemList;
2188 yyval.list->append(yyvsp[0].item);
2189 ;
2190 break;}
2191 case 89:
2192 #line 675 "rpsl.y"
2193 {
2194 yyval.list = yyvsp[-2].list;
2195 yyval.list->append(yyvsp[0].item);
2196 ;
2197 break;}
2198 case 90:
2199 #line 681 "rpsl.y"
2200 {
2201 yyval.attr = changeCurrentAttr(new AttrGeneric(yyvsp[-2].attr->type, yyvsp[-1].list));
2202 ;
2203 break;}
2204 case 91:
2205 #line 684 "rpsl.y"
2206 {
2207 yyval.attr = yyvsp[-2].attr;
2208 handle_error("Error: argument to %s should be blob sequence.\n",
2209 yyvsp[-2].attr->type->name());
2210 yyerrok;
2211 ;
2212 break;}
2213 case 92:
2214 #line 692 "rpsl.y"
2215 {
2216 yyval.list = new ItemList;
2217 yyval.list->append(yyvsp[0].item);
2218 ;
2219 break;}
2220 case 93:
2221 #line 696 "rpsl.y"
2222 {
2223 yyval.list = yyvsp[-1].list;
2224 yyval.list->append(yyvsp[0].item);
2225 ;
2226 break;}
2227 case 94:
2228 #line 702 "rpsl.y"
2229 {
2230 yyval.item = yyvsp[0].item;
2231 ;
2232 break;}
2233 case 95:
2234 #line 705 "rpsl.y"
2235 {
2236 yyval.item = new ItemRange(yyvsp[-2].item, yyvsp[0].item);
2237 ;
2238 break;}
2239 case 96:
2240 #line 710 "rpsl.y"
2241 {
2242 yyval.item = new ItemASNO(yyvsp[0].i);
2243 ;
2244 break;}
2245 case 97:
2246 #line 713 "rpsl.y"
2247 {
2248 yyval.item = new ItemINT(yyvsp[0].i);
2249 ;
2250 break;}
2251 case 98:
2252 #line 716 "rpsl.y"
2253 {
2254 yyval.item = new ItemREAL(yyvsp[0].real);
2255 ;
2256 break;}
2257 case 99:
2258 #line 719 "rpsl.y"
2259 {
2260 yyval.item = new ItemSTRING(yyvsp[0].string);
2261 ;
2262 break;}
2263 case 100:
2264 #line 722 "rpsl.y"
2265 {
2266 yyval.item = new ItemTimeStamp(yyvsp[0].time);
2267 ;
2268 break;}
2269 case 101:
2270 #line 725 "rpsl.y"
2271 {
2272 yyval.item = new ItemIPV4(yyvsp[0].ip);
2273 ;
2274 break;}
2275 case 102:
2276 #line 728 "rpsl.y"
2277 {
2278 yyval.item = new ItemPRFXV4(yyvsp[0].prfx);
2279 ;
2280 break;}
2281 case 103:
2282 #line 731 "rpsl.y"
2283 {
2284 yyval.item = new ItemPRFXV6(yyvsp[0].string);
2285 ;
2286 break;}
2287 case 104:
2288 #line 734 "rpsl.y"
2289 {
2290 yyval.item = new ItemPRFXV4Range(yyvsp[0].prfxrng);
2291 ;
2292 break;}
2293 case 105:
2294 #line 737 "rpsl.y"
2295 {
2296 yyval.item = new ItemConnection(yyvsp[-2].ip, yyvsp[0].i);
2297 ;
2298 break;}
2299 case 106:
2300 #line 740 "rpsl.y"
2301 {
2302 yyval.item = new ItemConnection(yyvsp[-4].ip, yyvsp[-2].i, yyvsp[0].i);
2303 ;
2304 break;}
2305 case 107:
2306 #line 743 "rpsl.y"
2307 {
2308 yyval.item = new ItemConnection(yyvsp[-2].sid, yyvsp[0].i);
2309 ;
2310 break;}
2311 case 108:
2312 #line 746 "rpsl.y"
2313 {
2314 yyval.item = new ItemConnection(yyvsp[-4].sid, yyvsp[-2].i, yyvsp[0].i);
2315 ;
2316 break;}
2317 case 109:
2318 #line 749 "rpsl.y"
2319 {
2320 yyval.item = new ItemASNAME(yyvsp[0].sid);
2321 ;
2322 break;}
2323 case 110:
2324 #line 752 "rpsl.y"
2325 {
2326 yyval.item = new ItemRSNAME(yyvsp[0].sid);
2327 ;
2328 break;}
2329 case 111:
2330 #line 755 "rpsl.y"
2331 {
2332 yyval.item = new ItemRTRSNAME(yyvsp[0].sid);
2333 ;
2334 break;}
2335 case 112:
2336 #line 758 "rpsl.y"
2337 {
2338 yyval.item = new ItemPRNGNAME(yyvsp[0].sid);
2339 ;
2340 break;}
2341 case 113:
2342 #line 761 "rpsl.y"
2343 {
2344 yyval.item = new ItemFLTRNAME(yyvsp[0].sid);
2345 ;
2346 break;}
2347 case 114:
2348 #line 764 "rpsl.y"
2349 {
2350 yyval.item = new ItemBOOLEAN(yyvsp[0].i);
2351 ;
2352 break;}
2353 case 115:
2354 #line 767 "rpsl.y"
2355 {
2356 yyval.item = new ItemWORD(yyvsp[0].string);
2357 ;
2358 break;}
2359 case 116:
2360 #line 770 "rpsl.y"
2361 {
2362 yyval.item = new ItemWORD(yyvsp[0].string);
2363 ;
2364 break;}
2365 case 117:
2366 #line 773 "rpsl.y"
2367 {
2368 yyval.item = new ItemDNS(yyvsp[0].sid);
2369 ;
2370 break;}
2371 case 118:
2372 #line 776 "rpsl.y"
2373 {
2374 yyval.item = new ItemEMAIL(yyvsp[0].string);
2375 ;
2376 break;}
2377 case 119:
2378 #line 779 "rpsl.y"
2379 {
2380 yyval.item = new ItemKEYCRTNAME(yyvsp[0].string);
2381 ;
2382 break;}
2383 case 120:
2384 #line 782 "rpsl.y"
2385 {
2386 yyval.item = new ItemBLOB(yyvsp[0].string);
2387 ;
2388 break;}
2389 case 121:
2390 #line 785 "rpsl.y"
2391 {
2392 yyval.item = yyvsp[-1].list;
2393 ;
2394 break;}
2395 case 122:
2396 #line 788 "rpsl.y"
2397 {
2398 yyval.item = new ItemFilter(yyvsp[-1].filter);
2399 ;
2400 break;}
2401 case 123:
2402 #line 793 "rpsl.y"
2403 {
2404 yyval.string = yyvsp[0].string;
2405 ;
2406 break;}
2407 case 124:
2408 #line 796 "rpsl.y"
2409 {
2410 char buffer[64];
2411 sprintf(buffer, "AS%d", yyvsp[0].i);
2412 yyval.string = strdup(buffer);
2413 ;
2414 break;}
2415 case 125:
2416 #line 801 "rpsl.y"
2417 {
2418 yyval.string = strdup(yyvsp[0].sid);
2419 ;
2420 break;}
2421 case 126:
2422 #line 804 "rpsl.y"
2423 {
2424 yyval.string = strdup(yyvsp[0].sid);
2425 ;
2426 break;}
2427 case 127:
2428 #line 807 "rpsl.y"
2429 {
2430 yyval.string = strdup(yyvsp[0].sid);
2431 ;
2432 break;}
2433 case 128:
2434 #line 810 "rpsl.y"
2435 {
2436 yyval.string = strdup(yyvsp[0].sid);
2437 ;
2438 break;}
2439 case 129:
2440 #line 813 "rpsl.y"
2441 {
2442 yyval.string = strdup(yyvsp[0].sid);
2443 ;
2444 break;}
2445 case 130:
2446 #line 816 "rpsl.y"
2447 {
2448 yyval.string = strdup(yyvsp[0].string);
2449 ;
2450 break;}
2451 case 131:
2452 #line 819 "rpsl.y"
2453 {
2454 if (yyvsp[0].i)
2455 yyval.string = strdup("true");
2456 else
2457 yyval.string = strdup("false");
2458 ;
2459 break;}
2460 case 137:
2461 #line 832 "rpsl.y"
2462 {
2463 yyval.string = strdup("true");
2464 ;
2465 break;}
2466 case 138:
2467 #line 835 "rpsl.y"
2468 {
2469 yyval.string = strdup("false");
2470 ;
2471 break;}
2472 case 139:
2473 #line 838 "rpsl.y"
2474 {
2475 yyval.string = strdup("action");
2476 ;
2477 break;}
2478 case 140:
2479 #line 841 "rpsl.y"
2480 {
2481 yyval.string = strdup("accept");
2482 ;
2483 break;}
2484 case 141:
2485 #line 844 "rpsl.y"
2486 {
2487 yyval.string = strdup("announce");
2488 ;
2489 break;}
2490 case 142:
2491 #line 847 "rpsl.y"
2492 {
2493 yyval.string = strdup("from");
2494 ;
2495 break;}
2496 case 143:
2497 #line 850 "rpsl.y"
2498 {
2499 yyval.string = strdup("to");
2500 ;
2501 break;}
2502 case 144:
2503 #line 853 "rpsl.y"
2504 {
2505 yyval.string = strdup("at");
2506 ;
2507 break;}
2508 case 145:
2509 #line 856 "rpsl.y"
2510 {
2511 yyval.string = strdup("any");
2512 ;
2513 break;}
2514 case 146:
2515 #line 859 "rpsl.y"
2516 {
2517 yyval.string = strdup("refine");
2518 ;
2519 break;}
2520 case 147:
2521 #line 862 "rpsl.y"
2522 {
2523 yyval.string = strdup("except");
2524 ;
2525 break;}
2526 case 148:
2527 #line 865 "rpsl.y"
2528 {
2529 yyval.string = strdup("static");
2530 ;
2531 break;}
2532 case 149:
2533 #line 868 "rpsl.y"
2534 {
2535 yyval.string = strdup("networks");
2536 ;
2537 break;}
2538 case 150:
2539 #line 871 "rpsl.y"
2540 {
2541 yyval.string = strdup("masklen");
2542 ;
2543 break;}
2544 case 151:
2545 #line 874 "rpsl.y"
2546 {
2547 yyval.string = strdup("union");
2548 ;
2549 break;}
2550 case 152:
2551 #line 877 "rpsl.y"
2552 {
2553 yyval.string = strdup("range");
2554 ;
2555 break;}
2556 case 153:
2557 #line 880 "rpsl.y"
2558 {
2559 yyval.string = strdup("list");
2560 ;
2561 break;}
2562 case 154:
2563 #line 883 "rpsl.y"
2564 {
2565 yyval.string = strdup("of");
2566 ;
2567 break;}
2568 case 155:
2569 #line 886 "rpsl.y"
2570 {
2571 yyval.string = strdup("operator");
2572 ;
2573 break;}
2574 case 156:
2575 #line 889 "rpsl.y"
2576 {
2577 yyval.string = strdup("syntax");
2578 ;
2579 break;}
2580 case 157:
2581 #line 892 "rpsl.y"
2582 {
2583 yyval.string = strdup("special");
2584 ;
2585 break;}
2586 case 158:
2587 #line 895 "rpsl.y"
2588 {
2589 yyval.string = strdup("optional");
2590 ;
2591 break;}
2592 case 159:
2593 #line 898 "rpsl.y"
2594 {
2595 yyval.string = strdup("mandatory");
2596 ;
2597 break;}
2598 case 160:
2599 #line 901 "rpsl.y"
2600 {
2601 yyval.string = strdup("internal");
2602 ;
2603 break;}
2604 case 161:
2605 #line 904 "rpsl.y"
2606 {
2607 yyval.string = strdup("deleted");
2608 ;
2609 break;}
2610 case 162:
2611 #line 907 "rpsl.y"
2612 {
2613 yyval.string = strdup("singlevalued");
2614 ;
2615 break;}
2616 case 163:
2617 #line 910 "rpsl.y"
2618 {
2619 yyval.string = strdup("generated");
2620 ;
2621 break;}
2622 case 164:
2623 #line 913 "rpsl.y"
2624 {
2625 yyval.string = strdup("multivalued");
2626 ;
2627 break;}
2628 case 165:
2629 #line 916 "rpsl.y"
2630 {
2631 yyval.string = strdup("lookup");
2632 ;
2633 break;}
2634 case 166:
2635 #line 919 "rpsl.y"
2636 {
2637 yyval.string = strdup("key");
2638 ;
2639 break;}
2640 case 167:
2641 #line 922 "rpsl.y"
2642 {
2643 yyval.string = strdup("obsolete");
2644 ;
2645 break;}
2646 case 168:
2647 #line 925 "rpsl.y"
2648 {
2649 yyval.string = strdup("peeras");
2650 ;
2651 break;}
2652 case 169:
2653 #line 928 "rpsl.y"
2654 {
2655 yyval.string = strdup("protocol");
2656 ;
2657 break;}
2658 case 170:
2659 #line 931 "rpsl.y"
2660 {
2661 yyval.string = strdup("into");
2662 ;
2663 break;}
2664 case 171:
2665 #line 934 "rpsl.y"
2666 {
2667 yyval.string = strdup("atomic");
2668 ;
2669 break;}
2670 case 172:
2671 #line 937 "rpsl.y"
2672 {
2673 yyval.string = strdup("inbound");
2674 ;
2675 break;}
2676 case 173:
2677 #line 940 "rpsl.y"
2678 {
2679 yyval.string = strdup("outbound");
2680 ;
2681 break;}
2682 case 174:
2683 #line 945 "rpsl.y"
2684 {
2685 yyval.string = strdup("none");
2686 ;
2687 break;}
2688 case 175:
2689 #line 949 "rpsl.y"
2690 {
2691 yyval.string = strdup("mail-from");
2692 ;
2693 break;}
2694 case 176:
2695 #line 953 "rpsl.y"
2696 {
2697 yyval.string = strdup("crypt-pw");
2698 ;
2699 break;}
2700 case 177:
2701 #line 957 "rpsl.y"
2702 {
2703 yyval.string = strdup("assigned");
2704 ;
2705 break;}
2706 case 178:
2707 #line 961 "rpsl.y"
2708 {
2709 yyval.string = strdup("allocated");
2710 ;
2711 break;}
2712 case 179:
2713 #line 965 "rpsl.y"
2714 {
2715 yyval.string = strdup("pi");
2716 ;
2717 break;}
2718 case 180:
2719 #line 969 "rpsl.y"
2720 {
2721 yyval.string = strdup("pa");
2722 ;
2723 break;}
2724 case 181:
2725 #line 973 "rpsl.y"
2726 {
2727 yyval.string = strdup("unspecified");
2728 ;
2729 break;}
2730 case 182:
2731 #line 977 "rpsl.y"
2732 {
2733 yyval.string = strdup("ext");
2734 ;
2735 break;}
2736 case 183:
2737 #line 981 "rpsl.y"
2738 {
2739 yyval.string = strdup("simple");
2740 ;
2741 break;}
2742 case 184:
2743 #line 985 "rpsl.y"
2744 {
2745 yyval.string = strdup("ripe");
2746 ;
2747 break;}
2748 case 185:
2749 #line 989 "rpsl.y"
2750 {
2751 yyval.string = strdup("internic");
2752 ;
2753 break;}
2754 case 186:
2755 #line 993 "rpsl.y"
2756 {
2757 yyval.string = strdup("clientaddress");
2758 ;
2759 break;}
2760 case 187:
2761 #line 1002 "rpsl.y"
2762 {
2763 yyval.filter = new FilterASNAME(symbols.symID("AS-ANY"));
2764 ;
2765 break;}
2766 case 189:
2767 #line 1008 "rpsl.y"
2768 {
2769 yyval.filter = new FilterOR(yyvsp[-2].filter, yyvsp[0].filter);
2770 ;
2771 break;}
2772 case 191:
2773 #line 1014 "rpsl.y"
2774 {
2775 yyval.filter = new FilterAND(yyvsp[-2].filter, yyvsp[0].filter);
2776 ;
2777 break;}
2778 case 192:
2779 #line 1017 "rpsl.y"
2780 {
2781 yyval.filter = new FilterEXCEPT(yyvsp[-2].filter, yyvsp[0].filter);
2782 ;
2783 break;}
2784 case 194:
2785 #line 1023 "rpsl.y"
2786 {
2787 yyval.filter = yyvsp[-1].filter;
2788 ;
2789 break;}
2790 case 196:
2791 #line 1029 "rpsl.y"
2792 {
2793 yyval.filter = new FilterASNO(yyvsp[0].i);
2794 ;
2795 break;}
2796 case 197:
2797 #line 1032 "rpsl.y"
2798 {
2799 yyval.filter = new FilterASNAME(yyvsp[0].sid);
2800 ;
2801 break;}
2802 case 198:
2803 #line 1039 "rpsl.y"
2804 {
2805 yyval.filter = new FilterANY;
2806 ;
2807 break;}
2808 case 199:
2809 #line 1042 "rpsl.y"
2810 {
2811 yyval.filter = yyvsp[0].filter;
2812 ;
2813 break;}
2814 case 200:
2815 #line 1047 "rpsl.y"
2816 {
2817 yyval.filter = new FilterANY;
2818 ;
2819 break;}
2820 case 201:
2821 #line 1050 "rpsl.y"
2822 {
2823 yyval.filter = yyvsp[0].filter;
2824 ;
2825 break;}
2826 case 202:
2827 #line 1055 "rpsl.y"
2828 {
2829 yyval.filter = new FilterOR(yyvsp[-2].filter, yyvsp[0].filter);
2830 ;
2831 break;}
2832 case 204:
2833 #line 1061 "rpsl.y"
2834 {
2835 yyval.filter = new FilterAND(yyvsp[-2].filter, yyvsp[0].filter);
2836 ;
2837 break;}
2838 case 205:
2839 #line 1064 "rpsl.y"
2840 {
2841 yyval.filter = new FilterEXCEPT(yyvsp[-2].filter, yyvsp[0].filter);
2842 ;
2843 break;}
2844 case 207:
2845 #line 1070 "rpsl.y"
2846 {
2847 yyval.filter = yyvsp[-1].filter;
2848 ;
2849 break;}
2850 case 209:
2851 #line 1076 "rpsl.y"
2852 {
2853 yyval.filter = new FilterRouter(yyvsp[0].ip);
2854 ;
2855 break;}
2856 case 210:
2857 #line 1079 "rpsl.y"
2858 {
2859 yyval.filter = new FilterRouterName(yyvsp[0].sid);
2860 ;
2861 break;}
2862 case 211:
2863 #line 1082 "rpsl.y"
2864 {
2865 yyval.filter = new FilterRTRSNAME(yyvsp[0].sid);
2866 ;
2867 break;}
2868 case 212:
2869 #line 1089 "rpsl.y"
2870 {
2871 yyval.peering = new PolicyPeering(yyvsp[-2].filter, yyvsp[-1].filter, yyvsp[0].filter);
2872 ;
2873 break;}
2874 case 213:
2875 #line 1092 "rpsl.y"
2876 {
2877 yyval.peering = new PolicyPeering(yyvsp[0].sid);
2878 ;
2879 break;}
2880 case 214:
2881 #line 1099 "rpsl.y"
2882 {
2883 yyval.actionList = new PolicyActionList;
2884 ;
2885 break;}
2886 case 215:
2887 #line 1102 "rpsl.y"
2888 {
2889 yyval.actionList = yyvsp[0].actionList;
2890 ;
2891 break;}
2892 case 216:
2893 #line 1107 "rpsl.y"
2894 {
2895 yyval.actionList = new PolicyActionList;
2896 if (yyvsp[0].actionNode)
2897 yyval.actionList->append(yyvsp[0].actionNode);
2898 ;
2899 break;}
2900 case 217:
2901 #line 1112 "rpsl.y"
2902 {
2903 yyval.actionList = yyvsp[-1].actionList;
2904 if (yyvsp[0].actionNode)
2905 yyval.actionList->append(yyvsp[0].actionNode);
2906 ;
2907 break;}
2908 case 218:
2909 #line 1119 "rpsl.y"
2910 {
2911 const AttrMethod *mtd = searchMethod(yyvsp[-6].rp_attr, yyvsp[-4].string, yyvsp[-2].list);
2912 if (mtd)
2913 yyval.actionNode = new PolicyAction(yyvsp[-6].rp_attr, mtd, yyvsp[-2].list);
2914 else {
2915 delete yyvsp[-2].list;
2916 yyval.actionNode = NULL;
2917 }
2918 free(yyvsp[-4].string);
2919 ;
2920 break;}
2921 case 219:
2922 #line 1129 "rpsl.y"
2923 {
2924 ItemList *plist = new ItemList;
2925 plist->append(yyvsp[-1].item);
2926
2927 const AttrMethod *mtd = searchMethod(yyvsp[-3].rp_attr, yyvsp[-2].string, plist);
2928 if (mtd)
2929 yyval.actionNode = new PolicyAction(yyvsp[-3].rp_attr, mtd, plist);
2930 else {
2931 delete plist;
2932 yyval.actionNode = NULL;
2933 }
2934 // Added by wlee
2935 free(yyvsp[-2].string);
2936 ;
2937 break;}
2938 case 220:
2939 #line 1143 "rpsl.y"
2940 {
2941 const AttrMethod *mtd = searchMethod(yyvsp[-4].rp_attr, "()", yyvsp[-2].list);
2942 if (mtd)
2943 yyval.actionNode = new PolicyAction(yyvsp[-4].rp_attr, mtd, yyvsp[-2].list);
2944 else {
2945 delete yyvsp[-2].list;
2946 yyval.actionNode = NULL;
2947 }
2948 ;
2949 break;}
2950 case 221:
2951 #line 1152 "rpsl.y"
2952 {
2953 const AttrMethod *mtd = searchMethod(yyvsp[-4].rp_attr, "[]", yyvsp[-2].list);
2954 if (mtd)
2955 yyval.actionNode = new PolicyAction(yyvsp[-4].rp_attr, mtd, yyvsp[-2].list);
2956 else {
2957 delete yyvsp[-2].list;
2958 yyval.actionNode = NULL;
2959 }
2960 ;
2961 break;}
2962 case 222:
2963 #line 1161 "rpsl.y"
2964 {
2965 yyval.actionNode = NULL;
2966 ;
2967 break;}
2968 case 223:
2969 #line 1168 "rpsl.y"
2970 {
2971 yyval.filter = new FilterOR(yyvsp[-2].filter, yyvsp[0].filter);
2972 ;
2973 break;}
2974 case 224:
2975 #line 1171 "rpsl.y"
2976 {
2977 yyval.filter = new FilterOR(yyvsp[-1].filter, yyvsp[0].filter);
2978 ;
2979 break;}
2980 case 226:
2981 #line 1177 "rpsl.y"
2982 {
2983 yyval.filter = new FilterAND(yyvsp[-2].filter, yyvsp[0].filter);
2984 ;
2985 break;}
2986 case 228:
2987 #line 1183 "rpsl.y"
2988 {
2989 yyval.filter = new FilterNOT(yyvsp[0].filter);
2990 ;
2991 break;}
2992 case 229:
2993 #line 1186 "rpsl.y"
2994 {
2995 yyval.filter = yyvsp[-1].filter;
2996 ;
2997 break;}
2998 case 231:
2999 #line 1192 "rpsl.y"
3000 {
3001 yyval.filter = new FilterANY;
3002 ;
3003 break;}
3004 case 232:
3005 #line 1195 "rpsl.y"
3006 {
3007 yyval.filter = new FilterASPath(yyvsp[-1].re);
3008 ;
3009 break;}
3010 case 233:
3011 #line 1198 "rpsl.y"
3012 {
3013 if (yyvsp[0].filter)
3014 yyval.filter = yyvsp[0].filter;
3015 else
3016 yyval.filter = new FilterNOT(new FilterANY);
3017 ;
3018 break;}
3019 case 234:
3020 #line 1204 "rpsl.y"
3021 {
3022 yyval.filter = new FilterFLTRNAME(yyvsp[0].sid);
3023 ;
3024 break;}
3025 case 236:
3026 #line 1210 "rpsl.y"
3027 {
3028 yyvsp[0].moreSpecOp->f1 = yyvsp[-1].filter;
3029 yyval.filter = yyvsp[0].moreSpecOp;
3030 ;
3031 break;}
3032 case 238:
3033 #line 1217 "rpsl.y"
3034 {
3035 yyval.filter = new FilterASNO(yyvsp[0].i);
3036 ;
3037 break;}
3038 case 239:
3039 #line 1220 "rpsl.y"
3040 {
3041 yyval.filter = new FilterPeerAS;
3042 ;
3043 break;}
3044 case 240:
3045 #line 1223 "rpsl.y"
3046 {
3047 yyval.filter = new FilterASNAME(yyvsp[0].sid);
3048 ;
3049 break;}
3050 case 241:
3051 #line 1226 "rpsl.y"
3052 {
3053 yyval.filter = new FilterRSNAME(yyvsp[0].sid);
3054 ;
3055 break;}
3056 case 242:
3057 #line 1229 "rpsl.y"
3058 {
3059 yyval.filter = yyvsp[-1].filter;
3060 ;
3061 break;}
3062 case 243:
3063 #line 1234 "rpsl.y"
3064 {
3065 yyval.filter = new FilterPRFXList;
3066 ;
3067 break;}
3068 case 245:
3069 #line 1240 "rpsl.y"
3070 {
3071 ((FilterPRFXList *) (yyval.filter = new FilterPRFXList))->add_high(*yyvsp[0].prfxrng);
3072 delete yyvsp[0].prfxrng;
3073 ;
3074 break;}
3075 case 246:
3076 #line 1244 "rpsl.y"
3077 {
3078 yyval.filter = yyvsp[-2].filter;
3079 ((FilterPRFXList *) (yyval.filter))->add_high(*yyvsp[0].prfxrng);
3080 delete yyvsp[0].prfxrng;
3081 ;
3082 break;}
3083 case 247:
3084 #line 1251 "rpsl.y"
3085 {
3086 yyval.prfxrng = yyvsp[0].prfx;
3087 ;
3088 break;}
3089 case 248:
3090 #line 1254 "rpsl.y"
3091 {
3092 yyval.prfxrng = yyvsp[0].prfxrng;
3093 ;
3094 break;}
3095 case 249:
3096 #line 1259 "rpsl.y"
3097 {
3098 yyval.re = new regexp_or(yyvsp[-2].re, yyvsp[0].re);
3099 ;
3100 break;}
3101 case 251:
3102 #line 1265 "rpsl.y"
3103 {
3104 yyval.re = new regexp_cat(yyvsp[-1].re, yyvsp[0].re);
3105 ;
3106 break;}
3107 case 253:
3108 #line 1271 "rpsl.y"
3109 {
3110 yyval.re = new regexp_star(yyvsp[-1].re);
3111 ;
3112 break;}
3113 case 254:
3114 #line 1274 "rpsl.y"
3115 {
3116 yyval.re = new regexp_question(yyvsp[-1].re);
3117 ;
3118 break;}
3119 case 255:
3120 #line 1277 "rpsl.y"
3121 {
3122 yyval.re = new regexp_plus(yyvsp[-1].re);
3123 ;
3124 break;}
3125 case 257:
3126 #line 1283 "rpsl.y"
3127 {
3128 yyval.re = new regexp_bol;
3129 ;
3130 break;}
3131 case 258:
3132 #line 1286 "rpsl.y"
3133 {
3134 yyval.re = new regexp_eol;
3135 ;
3136 break;}
3137 case 259:
3138 #line 1289 "rpsl.y"
3139 {
3140 yyval.re = yyvsp[-1].re;
3141 ;
3142 break;}
3143 case 261:
3144 #line 1295 "rpsl.y"
3145 {
3146 yyval.re = new regexp_symbol(yyvsp[0].i);
3147 ;
3148 break;}
3149 case 262:
3150 #line 1298 "rpsl.y"
3151 {
3152 yyval.re = new regexp_symbol(symbols.symID("PEERAS"));
3153 ;
3154 break;}
3155 case 263:
3156 #line 1301 "rpsl.y"
3157 {
3158 yyval.re = new regexp_symbol(yyvsp[0].sid);
3159 ;
3160 break;}
3161 case 264:
3162 #line 1304 "rpsl.y"
3163 {
3164 yyval.re = new regexp_symbol(regexp_symbol::MIN_AS, regexp_symbol::MAX_AS);
3165 ;
3166 break;}
3167 case 265:
3168 #line 1307 "rpsl.y"
3169 {
3170 yyval.re = yyvsp[-1].re;
3171 ;
3172 break;}
3173 case 266:
3174 #line 1310 "rpsl.y"
3175 {
3176 yyval.re = yyvsp[-1].re;
3177 ((regexp_symbol *) yyval.re)->complement();
3178 ;
3179 break;}
3180 case 267:
3181 #line 1316 "rpsl.y"
3182 {
3183 yyval.re = new regexp_symbol;
3184 ;
3185 break;}
3186 case 268:
3187 #line 1319 "rpsl.y"
3188 {
3189 ((regexp_symbol *) (yyval.re = yyvsp[-1].re))->add(yyvsp[0].i);
3190 ;
3191 break;}
3192 case 269:
3193 #line 1322 "rpsl.y"
3194 {
3195 ((regexp_symbol *) (yyval.re = yyvsp[-1].re))->add(symbols.symID("PEERAS"));
3196 ;
3197 break;}
3198 case 270:
3199 #line 1325 "rpsl.y"
3200 {
3201 ((regexp_symbol *) (yyval.re = yyvsp[-1].re))->add(regexp_symbol::MIN_AS, regexp_symbol::MAX_AS);
3202 ;
3203 break;}
3204 case 271:
3205 #line 1328 "rpsl.y"
3206 {
3207 ((regexp_symbol *) (yyval.re = yyvsp[-3].re))->add(yyvsp[-2].i, yyvsp[0].i);
3208 ;
3209 break;}
3210 case 272:
3211 #line 1331 "rpsl.y"
3212 {
3213 ((regexp_symbol *) (yyval.re = yyvsp[-1].re))->add(yyvsp[0].sid);
3214 ;
3215 break;}
3216 case 273:
3217 #line 1336 "rpsl.y"
3218 {
3219 const AttrMethod *mtd = searchMethod(yyvsp[-5].rp_attr, yyvsp[-3].string, yyvsp[-1].list);
3220 if (mtd)
3221 yyval.filter = new FilterRPAttribute(yyvsp[-5].rp_attr, mtd, yyvsp[-1].list);
3222 else {
3223 delete yyvsp[-1].list;
3224 yyval.filter = NULL;
3225 }
3226 free(yyvsp[-3].string);
3227 ;
3228 break;}
3229 case 274:
3230 #line 1346 "rpsl.y"
3231 {
3232 ItemList *plist = new ItemList;
3233 plist->append(yyvsp[0].item);
3234
3235 const AttrMethod *mtd = searchMethod(yyvsp[-2].rp_attr, yyvsp[-1].string, plist);
3236 if (mtd)
3237 yyval.filter = new FilterRPAttribute(yyvsp[-2].rp_attr, mtd, plist);
3238 else {
3239 delete plist;
3240 yyval.filter = NULL;
3241 }
3242 // Added by wlee
3243 free(yyvsp[-1].string);
3244 ;
3245 break;}
3246 case 275:
3247 #line 1360 "rpsl.y"
3248 {
3249 const AttrMethod *mtd = searchMethod(yyvsp[-3].rp_attr, "()", yyvsp[-1].list);
3250 if (mtd)
3251 yyval.filter = new FilterRPAttribute(yyvsp[-3].rp_attr, mtd, yyvsp[-1].list);
3252 else {
3253 delete yyvsp[-1].list;
3254 yyval.filter = NULL;
3255 }
3256 ;
3257 break;}
3258 case 276:
3259 #line 1369 "rpsl.y"
3260 {
3261 const AttrMethod *mtd = searchMethod(yyvsp[-3].rp_attr, "[]", yyvsp[-1].list);
3262 if (mtd)
3263 yyval.filter = new FilterRPAttribute(yyvsp[-3].rp_attr, mtd, yyvsp[-1].list);
3264 else {
3265 delete yyvsp[-1].list;
3266 yyval.filter = NULL;
3267 }
3268 ;
3269 break;}
3270 case 277:
3271 #line 1382 "rpsl.y"
3272 {
3273 yyval.peeringActionList = new List<PolicyPeeringAction>;
3274 yyval.peeringActionList->append(new PolicyPeeringAction(yyvsp[-1].peering, yyvsp[0].actionList));
3275 ;
3276 break;}
3277 case 278:
3278 #line 1386 "rpsl.y"
3279 {
3280 yyval.peeringActionList = yyvsp[-3].peeringActionList;
3281 yyval.peeringActionList->append(new PolicyPeeringAction(yyvsp[-1].peering, yyvsp[0].actionList));
3282 ;
3283 break;}
3284 case 279:
3285 #line 1392 "rpsl.y"
3286 {
3287 yyval.peeringActionList = new List<PolicyPeeringAction>;
3288 yyval.peeringActionList->append(new PolicyPeeringAction(yyvsp[-1].peering, yyvsp[0].actionList));
3289 ;
3290 break;}
3291 case 280:
3292 #line 1396 "rpsl.y"
3293 {
3294 yyval.peeringActionList = yyvsp[-3].peeringActionList;
3295 yyval.peeringActionList->append(new PolicyPeeringAction(yyvsp[-1].peering, yyvsp[0].actionList));
3296 ;
3297 break;}
3298 case 281:
3299 #line 1404 "rpsl.y"
3300 {
3301 yyval.policyFactor = new PolicyFactor(yyvsp[-2].peeringActionList, yyvsp[0].filter);
3302 ;
3303 break;}
3304 case 282:
3305 #line 1409 "rpsl.y"
3306 {
3307 yyval.policyTerm = new PolicyTerm;
3308 yyval.policyTerm->append(yyvsp[-1].policyFactor);
3309 ;
3310 break;}
3311 case 283:
3312 #line 1413 "rpsl.y"
3313 {
3314 yyval.policyTerm = yyvsp[-2].policyTerm;
3315 yyval.policyTerm->append(yyvsp[-1].policyFactor);
3316 ;
3317 break;}
3318 case 284:
3319 #line 1419 "rpsl.y"
3320 {
3321 yyval.policyFactor = new PolicyFactor(yyvsp[-2].peeringActionList, yyvsp[0].filter);
3322 ;
3323 break;}
3324 case 285:
3325 #line 1424 "rpsl.y"
3326 {
3327 yyval.policyTerm = new PolicyTerm;
3328 yyval.policyTerm->append(yyvsp[-1].policyFactor);
3329 ;
3330 break;}
3331 case 286:
3332 #line 1428 "rpsl.y"
3333 {
3334 yyval.policyTerm = yyvsp[-2].policyTerm;
3335 yyval.policyTerm->append(yyvsp[-1].policyFactor);
3336 ;
3337 break;}
3338 case 287:
3339 #line 1436 "rpsl.y"
3340 {
3341 PolicyTerm *term = new PolicyTerm;
3342 term->append(yyvsp[-1].policyFactor);
3343 yyval.policyTerm = term;
3344 ;
3345 break;}
3346 case 288:
3347 #line 1441 "rpsl.y"
3348 {
3349 yyval.policyTerm = yyvsp[-1].policyTerm;
3350 ;
3351 break;}
3352 case 289:
3353 #line 1446 "rpsl.y"
3354 {
3355 PolicyTerm *term = new PolicyTerm;
3356 term->append(yyvsp[-1].policyFactor);
3357 yyval.policyTerm = term;
3358 ;
3359 break;}
3360 case 290:
3361 #line 1451 "rpsl.y"
3362 {
3363 yyval.policyTerm = yyvsp[-1].policyTerm;
3364 ;
3365 break;}
3366 case 291:
3367 #line 1458 "rpsl.y"
3368 {
3369 yyval.policyExpr = yyvsp[0].policyTerm;
3370 ;
3371 break;}
3372 case 292:
3373 #line 1461 "rpsl.y"
3374 {
3375 yyval.policyExpr = new PolicyRefine(yyvsp[-2].policyTerm, yyvsp[0].policyExpr);
3376 ;
3377 break;}
3378 case 293:
3379 #line 1464 "rpsl.y"
3380 {
3381 yyval.policyExpr = new PolicyExcept(yyvsp[-2].policyTerm, yyvsp[0].policyExpr);
3382 ;
3383 break;}
3384 case 294:
3385 #line 1469 "rpsl.y"
3386 {
3387 yyval.policyExpr = yyvsp[0].policyTerm;
3388 ;
3389 break;}
3390 case 295:
3391 #line 1472 "rpsl.y"
3392 {
3393 yyval.policyExpr = new PolicyRefine(yyvsp[-2].policyTerm, yyvsp[0].policyExpr);
3394 ;
3395 break;}
3396 case 296:
3397 #line 1475 "rpsl.y"
3398 {
3399 yyval.policyExpr = new PolicyExcept(yyvsp[-2].policyTerm, yyvsp[0].policyExpr);
3400 ;
3401 break;}
3402 case 297:
3403 #line 1482 "rpsl.y"
3404 {
3405 yyval.protocol = schema.searchProtocol("BGP4");
3406 ;
3407 break;}
3408 case 298:
3409 #line 1485 "rpsl.y"
3410 {
3411 yyval.protocol = schema.searchProtocol(yyvsp[0].string);
3412 if (!yyval.protocol) {
3413 handle_warning("Warning: unknown protocol %s, BGP4 assumed.\n", yyvsp[0].string);
3414 yyval.protocol = schema.searchProtocol("BGP4");
3415 }
3416 free(yyvsp[0].string);
3417 ;
3418 break;}
3419 case 299:
3420 #line 1495 "rpsl.y"
3421 {
3422 yyval.protocol = schema.searchProtocol("BGP4");
3423 ;
3424 break;}
3425 case 300:
3426 #line 1498 "rpsl.y"
3427 {
3428 yyval.protocol = schema.searchProtocol(yyvsp[0].string);
3429 if (!yyval.protocol) {
3430 handle_warning("Warning: unknown protocol %s, BGP4 assumed.\n", yyvsp[0].string);
3431 yyval.protocol = schema.searchProtocol("BGP4");
3432 }
3433 free(yyvsp[0].string);;
3434 ;
3435 break;}
3436 case 301:
3437 #line 1512 "rpsl.y"
3438 {
3439 yyval.attr = changeCurrentAttr(new AttrImport(yyvsp[-3].protocol, yyvsp[-2].protocol, yyvsp[-1].policyExpr));
3440 ;
3441 break;}
3442 case 302:
3443 #line 1515 "rpsl.y"
3444 {
3445 PolicyTerm *term = new PolicyTerm;
3446 term->append(yyvsp[-1].policyFactor);
3447
3448 yyval.attr = changeCurrentAttr(new AttrImport(yyvsp[-3].protocol, yyvsp[-2].protocol, term));
3449 ;
3450 break;}
3451 case 303:
3452 #line 1521 "rpsl.y"
3453 {
3454 yyval.attr = yyvsp[-2].attr;
3455 handle_error("Error: from <peering> expected.\n");
3456 yyerrok;
3457 ;
3458 break;}
3459 case 304:
3460 #line 1530 "rpsl.y"
3461 {
3462 yyval.attr = changeCurrentAttr(new AttrExport(yyvsp[-3].protocol, yyvsp[-2].protocol, yyvsp[-1].policyExpr));
3463 ;
3464 break;}
3465 case 305:
3466 #line 1533 "rpsl.y"
3467 {
3468 PolicyTerm *term = new PolicyTerm;
3469 term->append(yyvsp[-1].policyFactor);
3470
3471 yyval.attr = changeCurrentAttr(new AttrExport(yyvsp[-3].protocol, yyvsp[-2].protocol, term));
3472 ;
3473 break;}
3474 case 306:
3475 #line 1539 "rpsl.y"
3476 {
3477 yyval.attr = yyvsp[-2].attr;
3478 handle_error("Error: to <peering> expected.\n");
3479 yyerrok;
3480 ;
3481 break;}
3482 case 307:
3483 #line 1546 "rpsl.y"
3484 {
3485 yyval.filter = new FilterANY;
3486 ;
3487 break;}
3488 case 308:
3489 #line 1549 "rpsl.y"
3490 {
3491 yyval.filter = yyvsp[0].filter;
3492 ;
3493 break;}
3494 case 309:
3495 #line 1556 "rpsl.y"
3496 {
3497 yyval.attr = changeCurrentAttr(new AttrDefault(yyvsp[-3].peering, yyvsp[-2].actionList, yyvsp[-1].filter));
3498 ;
3499 break;}
3500 case 310:
3501 #line 1559 "rpsl.y"
3502 {
3503 if (yyvsp[-2].peering)
3504 delete yyvsp[-2].peering;
3505 handle_error("Error: badly formed filter/action or keyword NETWORKS/ACTION missing.\n");
3506 yyerrok;
3507 ;
3508 break;}
3509 case 311:
3510 #line 1565 "rpsl.y"
3511 {
3512 handle_error("Error: TO <peer> missing.\n");
3513 yyerrok;
3514 ;
3515 break;}
3516 case 312:
3517 #line 1571 "rpsl.y"
3518 {
3519 yyval.attr = changeCurrentAttr(new AttrFilter(yyvsp[-1].filter));
3520 ;
3521 break;}
3522 case 313:
3523 #line 1574 "rpsl.y"
3524 {
3525 yyval.attr = yyvsp[-2].attr;
3526 handle_error("Error: badly formed filter.\n");
3527 yyerrok;
3528 ;
3529 break;}
3530 case 314:
3531 #line 1581 "rpsl.y"
3532 {
3533 yyval.attr = changeCurrentAttr(new AttrPeering(yyvsp[-1].peering));
3534 ;
3535 break;}
3536 case 315:
3537 #line 1584 "rpsl.y"
3538 {
3539 yyval.attr = yyvsp[-2].attr;
3540 handle_error("Error: badly formed filter.\n");
3541 yyerrok;
3542 ;
3543 break;}
3544 case 316:
3545 #line 1593 "rpsl.y"
3546 {
3547 yyval.attr = changeCurrentAttr(new AttrIfAddr(yyvsp[-4].ip->get_ipaddr(), yyvsp[-2].i, yyvsp[-1].actionList));
3548 delete yyvsp[-4].ip;
3549 ;
3550 break;}
3551 case 317:
3552 #line 1597 "rpsl.y"
3553 {
3554 delete yyvsp[-4].ip;
3555 yyval.attr = yyvsp[-5].attr;
3556 handle_error("Error: in action specification.\n");
3557 yyerrok;
3558 ;
3559 break;}
3560 case 318:
3561 #line 1603 "rpsl.y"
3562 {
3563 delete yyvsp[-3].ip;
3564 yyval.attr = yyvsp[-4].attr;
3565 handle_error("Error: integer mask length expected.\n");
3566 yyerrok;
3567 ;
3568 break;}
3569 case 319:
3570 #line 1609 "rpsl.y"
3571 {
3572 delete yyvsp[-2].ip;
3573 yyval.attr = yyvsp[-3].attr;
3574 handle_error("Error: MASKLEN <length> expected.\n");
3575 yyerrok;
3576 ;
3577 break;}
3578 case 320:
3579 #line 1615 "rpsl.y"
3580 {
3581 yyval.attr = yyvsp[-2].attr;
3582 handle_error("Error: <ip_address> MASKLEN <length> [<action>] expected.\n");
3583 yyerrok;
3584 ;
3585 break;}
3586 case 321:
3587 #line 1624 "rpsl.y"
3588 {
3589 yyval.peer_option_list = new List<AttrPeerOption>;
3590 ;
3591 break;}
3592 case 322:
3593 #line 1627 "rpsl.y"
3594 {
3595 yyval.peer_option_list = yyvsp[0].peer_option_list;
3596 ;
3597 break;}
3598 case 323:
3599 #line 1632 "rpsl.y"
3600 {
3601 yyval.peer_option_list = new List<AttrPeerOption>;
3602 yyval.peer_option_list->append(yyvsp[0].peer_option);
3603 ;
3604 break;}
3605 case 324:
3606 #line 1636 "rpsl.y"
3607 {
3608 yyval.peer_option_list = yyvsp[-2].peer_option_list;
3609 yyval.peer_option_list->append(yyvsp[0].peer_option);
3610 ;
3611 break;}
3612 case 325:
3613 #line 1642 "rpsl.y"
3614 {
3615 yyval.peer_option = new AttrPeerOption(yyvsp[-3].string, yyvsp[-1].list);
3616 ;
3617 break;}
3618 case 327:
3619 #line 1648 "rpsl.y"
3620 {
3621 yyval.ip = new IPAddr;
3622 ;
3623 break;}
3624 case 328:
3625 #line 1651 "rpsl.y"
3626 {
3627 yyval.ip = new IPAddr;
3628 ;
3629 break;}
3630 case 329:
3631 #line 1654 "rpsl.y"
3632 {
3633 yyval.ip = new IPAddr;
3634 ;
3635 break;}
3636 case 330:
3637 #line 1659 "rpsl.y"
3638 {
3639 const AttrProtocol *protocol = schema.searchProtocol(yyvsp[-3].string);
3640 int position;
3641 const RPType *correctType;
3642 bool error = false;
3643
3644 if (!protocol) {
3645 handle_error("Error: unknown protocol %s.\n", yyvsp[-3].string);
3646 error = true;
3647 } else {
3648 ((AttrProtocol *) protocol)->startMandatoryCheck();
3649 for (AttrPeerOption *opt = yyvsp[-1].peer_option_list->head(); opt; opt = yyvsp[-1].peer_option_list->next(opt)) {
3650 const AttrProtocolOption *decl = protocol->searchOption(opt->option);
3651 if (!decl) {
3652 handle_error("Error: protocol %s does not have option %s.\n",
3653 yyvsp[-3].string, opt->option);
3654 error = true;
3655 } else {
3656 for (; decl; decl = protocol->searchNextOption(decl))
3657 if (decl->option->validateArgs(opt->args, position, correctType))
3658 break;
3659 if (! decl) {
3660 handleArgumentTypeError(yyvsp[-3].string, opt->option, position, correctType);
3661 error = true;
3662 }
3663 }
3664 }
3665 }
3666
3667 if (! error) {
3668 const AttrProtocolOption *missing =
3669 ((AttrProtocol *) protocol)->missingMandatoryOption();
3670 if (missing) {
3671 handle_error("Error: mandatory option %s of protocol %s is missing.\n",
3672 missing->option->name, yyvsp[-3].string);
3673 error = true;
3674 }
3675 }
3676
3677 if (!error)
3678 yyval.attr = changeCurrentAttr(new AttrPeer(protocol, yyvsp[-2].ip, yyvsp[-1].peer_option_list));
3679 else {
3680 free(yyvsp[-3].string);
3681 delete yyvsp[-2].ip;
3682 delete yyvsp[-1].peer_option_list;
3683 }
3684 ;
3685 break;}
3686 case 331:
3687 #line 1706 "rpsl.y"
3688 {
3689 yyval.attr = yyvsp[-4].attr;
3690 free(yyvsp[-3].string);
3691 delete yyvsp[-2].ip;
3692 handle_error("Error: in peer option.\n");
3693 yyerrok;
3694 ;
3695 break;}
3696 case 332:
3697 #line 1713 "rpsl.y"
3698 {
3699 yyval.attr = yyvsp[-3].attr;
3700 free(yyvsp[-2].string);
3701 handle_error("Error: missing peer ip_address.\n");
3702 yyerrok;
3703 ;
3704 break;}
3705 case 333:
3706 #line 1719 "rpsl.y"
3707 {
3708 yyval.attr = yyvsp[-2].attr;
3709 handle_error("Error: missing protocol name.\n");
3710 yyerrok;
3711 ;
3712 break;}
3713 case 334:
3714 #line 1728 "rpsl.y"
3715 {
3716 yyval.attr = yyvsp[-2].attr;
3717 delete yyvsp[-1].filter;
3718 ;
3719 break;}
3720 case 335:
3721 #line 1732 "rpsl.y"
3722 {
3723 yyval.attr = yyvsp[-2].attr;
3724 handle_error("Error: <as-expression> expected.\n");
3725 yyerrok;
3726 ;
3727 break;}
3728 case 336:
3729 #line 1739 "rpsl.y"
3730 {
3731 yyval.attr = yyvsp[-2].attr;
3732 ;
3733 break;}
3734 case 337:
3735 #line 1742 "rpsl.y"
3736 {
3737 delete yyvsp[-1].filter;
3738 ;
3739 break;}
3740 case 338:
3741 #line 1745 "rpsl.y"
3742 {
3743 yyval.attr = yyvsp[-3].attr;
3744 handle_error("Error: OUTBOUND <as-expression> expected.\n");
3745 yyerrok;
3746 ;
3747 break;}
3748 case 339:
3749 #line 1750 "rpsl.y"
3750 {
3751 yyval.attr = yyvsp[-3].attr;
3752 handle_error("Error: INBOUND can not be followed by anything.\n");
3753 yyerrok;
3754 ;
3755 break;}
3756 case 340:
3757 #line 1755 "rpsl.y"
3758 {
3759 yyval.attr = yyvsp[-2].attr;
3760 handle_error("Error: keyword INBOUND or OUTBOUND expected.\n");
3761 yyerrok;
3762 ;
3763 break;}
3764 case 341:
3765 #line 1764 "rpsl.y"
3766 {
3767 yyval.filter = new FilterANY;
3768 ;
3769 break;}
3770 case 342:
3771 #line 1767 "rpsl.y"
3772 {
3773 yyval.filter = yyvsp[0].filter;
3774 ;
3775 break;}
3776 case 343:
3777 #line 1772 "rpsl.y"
3778 {
3779 yyval.filter = new FilterOR(yyvsp[-2].filter, yyvsp[0].filter);
3780 ;
3781 break;}
3782 case 345:
3783 #line 1778 "rpsl.y"
3784 {
3785 yyval.filter = new FilterAND(yyvsp[-2].filter, yyvsp[0].filter);
3786 ;
3787 break;}
3788 case 347:
3789 #line 1784 "rpsl.y"
3790 {
3791 yyval.filter = yyvsp[-1].filter;
3792 ;
3793 break;}
3794 case 349:
3795 #line 1790 "rpsl.y"
3796 {
3797 yyval.filter = new FilterANY;
3798 ;
3799 break;}
3800 case 350:
3801 #line 1793 "rpsl.y"
3802 {
3803 yyval.filter = new FilterHAVE_COMPONENTS((FilterPRFXList *) yyvsp[-1].filter);
3804 ;
3805 break;}
3806 case 351:
3807 #line 1796 "rpsl.y"
3808 {
3809 yyval.filter = new FilterEXCLUDE((FilterPRFXList *) yyvsp[-1].filter);
3810 ;
3811 break;}
3812 case 352:
3813 #line 1801 "rpsl.y"
3814 {
3815 yyval.attr = yyvsp[-4].attr;
3816 delete yyvsp[-3].filter;
3817 delete yyvsp[-2].actionList;
3818 delete yyvsp[-1].filter;
3819 ;
3820 break;}
3821 case 353:
3822 #line 1807 "rpsl.y"
3823 {
3824 yyval.attr = yyvsp[-2].attr;
3825 handle_error("Error: [at <router-exp>] [action <action>] [upon <condition>] expected.\n");
3826 yyerrok;
3827 ;
3828 break;}
3829 case 356:
3830 #line 1820 "rpsl.y"
3831 {
3832 ;
3833 break;}
3834 case 357:
3835 #line 1822 "rpsl.y"
3836 {
3837 delete yyvsp[0].filter;
3838 ;
3839 break;}
3840 case 358:
3841 #line 1825 "rpsl.y"
3842 {
3843 free(yyvsp[-1].string);
3844 delete yyvsp[0].filter;
3845 ;
3846 break;}
3847 case 359:
3848 #line 1831 "rpsl.y"
3849 {
3850 yyval.attr = yyvsp[-3].attr;
3851 ;
3852 break;}
3853 case 360:
3854 #line 1834 "rpsl.y"
3855 {
3856 yyval.attr = yyvsp[-2].attr;
3857 handle_error("Error: [ATOMIC] [[<filter>] [PROTOCOL <protocol> <filter>] ...] expected.\n");
3858 yyerrok;
3859 ;
3860 break;}
3861 case 361:
3862 #line 1843 "rpsl.y"
3863 {
3864 yyval.list = new ItemList;
3865 ;
3866 break;}
3867 case 363:
3868 #line 1849 "rpsl.y"
3869 {
3870 yyval.list = new ItemList;
3871 yyval.list->append(yyvsp[0].item);
3872 ;
3873 break;}
3874 case 364:
3875 #line 1853 "rpsl.y"
3876 {
3877 yyval.list = yyvsp[-2].list;
3878 yyval.list->append(yyvsp[0].item);
3879 ;
3880 break;}
3881 case 365:
3882 #line 1859 "rpsl.y"
3883 {
3884 yyval.item = new ItemASNO(yyvsp[0].i);
3885 ;
3886 break;}
3887 case 366:
3888 #line 1862 "rpsl.y"
3889 {
3890 yyval.item = new ItemMSItem(new ItemASNO(yyvsp[-1].i), yyvsp[0].moreSpecOp->code, yyvsp[0].moreSpecOp->n, yyvsp[0].moreSpecOp->m);
3891 delete yyvsp[0].moreSpecOp;
3892 ;
3893 break;}
3894 case 367:
3895 #line 1866 "rpsl.y"
3896 {
3897 yyval.item = new ItemASNAME(yyvsp[0].sid);
3898 ;
3899 break;}
3900 case 368:
3901 #line 1869 "rpsl.y"
3902 {
3903 yyval.item = new ItemMSItem(new ItemASNAME(yyvsp[-1].sid), yyvsp[0].moreSpecOp->code, yyvsp[0].moreSpecOp->n, yyvsp[0].moreSpecOp->m);
3904 delete yyvsp[0].moreSpecOp;
3905 ;
3906 break;}
3907 case 369:
3908 #line 1873 "rpsl.y"
3909 {
3910 yyval.item = new ItemRSNAME(yyvsp[0].sid);
3911 ;
3912 break;}
3913 case 370:
3914 #line 1876 "rpsl.y"
3915 {
3916 yyval.item = new ItemMSItem(new ItemRSNAME(yyvsp[-1].sid), yyvsp[0].moreSpecOp->code, yyvsp[0].moreSpecOp->n, yyvsp[0].moreSpecOp->m);
3917 delete yyvsp[0].moreSpecOp;
3918 ;
3919 break;}
3920 case 371:
3921 #line 1880 "rpsl.y"
3922 {
3923 yyval.item = new ItemPRFXV4(yyvsp[0].prfx);
3924 ;
3925 break;}
3926 case 372:
3927 #line 1883 "rpsl.y"
3928 {
3929 yyval.item = new ItemPRFXV4Range(yyvsp[0].prfxrng);
3930 ;
3931 break;}
3932 case 373:
3933 #line 1888 "rpsl.y"
3934 {
3935 yyval.attr = changeCurrentAttr(new AttrGeneric(yyvsp[-2].attr->type, yyvsp[-1].list));
3936 ;
3937 break;}
3938 case 374:
3939 #line 1891 "rpsl.y"
3940 {
3941 yyval.attr = yyvsp[-2].attr;
3942 handle_error("Error: invalid member\n");
3943 yyerrok;
3944 ;
3945 break;}
3946 case 375:
3947 #line 1900 "rpsl.y"
3948 {
3949 yyval.attr = changeCurrentAttr(new AttrRPAttr(yyvsp[-2].string, yyvsp[-1].methodlist));
3950 ;
3951 break;}
3952 case 376:
3953 #line 1903 "rpsl.y"
3954 {
3955 yyval.attr = changeCurrentAttr(new AttrRPAttr(yyvsp[-2].rp_attr->name, yyvsp[-1].methodlist));
3956 ;
3957 break;}
3958 case 377:
3959 #line 1906 "rpsl.y"
3960 {
3961 yyval.attr = yyvsp[-2].attr;
3962 handle_error("Error: invalid rp-attribute specification\n");
3963 yyerrok;
3964 ;
3965 break;}
3966 case 378:
3967 #line 1913 "rpsl.y"
3968 {
3969 yyval.methodlist = new List<AttrMethod>;
3970 if (yyvsp[0].method)
3971 yyval.methodlist->append(yyvsp[0].method);
3972 ;
3973 break;}
3974 case 379:
3975 #line 1918 "rpsl.y"
3976 {
3977 yyval.methodlist = yyvsp[-1].methodlist;
3978 if (yyvsp[0].method)
3979 yyval.methodlist->append(yyvsp[0].method);
3980 ;
3981 break;}
3982 case 380:
3983 #line 1925 "rpsl.y"
3984 {
3985 yyval.method = new AttrMethod(yyvsp[-2].string, new List<RPTypeNode>, false);
3986 ;
3987 break;}
3988 case 381:
3989 #line 1928 "rpsl.y"
3990 {
3991 yyval.method = new AttrMethod(yyvsp[-3].string, yyvsp[-1].typelist, false);
3992 ;
3993 break;}
3994 case 382:
3995 #line 1931 "rpsl.y"
3996 {
3997 yyval.method = new AttrMethod(yyvsp[-5].string, yyvsp[-3].typelist, true);
3998 ;
3999 break;}
4000 case 383:
4001 #line 1934 "rpsl.y"
4002 {
4003 char buffer[16];
4004 strcpy(buffer, "operator");
4005 strcat(buffer, yyvsp[-3].string);
4006 yyval.method = new AttrMethod(strdup(buffer), yyvsp[-1].typelist, false, true);
4007 free(yyvsp[-3].string);
4008 ;
4009 break;}
4010 case 384:
4011 #line 1941 "rpsl.y"
4012 {
4013 char buffer[16];
4014 strcpy(buffer, "operator");
4015 strcat(buffer, yyvsp[-5].string);
4016 yyval.method = new AttrMethod(strdup(buffer), yyvsp[-3].typelist, true, true);
4017 free(yyvsp[-5].string);
4018 ;
4019 break;}
4020 case 385:
4021 #line 1948 "rpsl.y"
4022 {
4023 free(yyvsp[-2].string);
4024 yyval.method = NULL;
4025 handle_error("Error: invalid method specification for %s\n", yyvsp[-2].string);
4026 ;
4027 break;}
4028 case 386:
4029 #line 1953 "rpsl.y"
4030 {
4031 yyval.method = NULL;
4032 handle_error("Error: invalid operator specification for %s\n", yyvsp[-2].string);
4033 free(yyvsp[-2].string);
4034 ;
4035 break;}
4036 case 387:
4037 #line 1958 "rpsl.y"
4038 {
4039 yyval.method = NULL;
4040 handle_error("Error: invalid operator\n");
4041 ;
4042 break;}
4043 case 388:
4044 #line 1962 "rpsl.y"
4045 {
4046 yyval.method = NULL;
4047 handle_error("Error: method specification expected\n");
4048 ;
4049 break;}
4050 case 389:
4051 #line 1970 "rpsl.y"
4052 {
4053 yyval.attr = changeCurrentAttr(new AttrTypedef(yyvsp[-2].string, yyvsp[-1].typenode));
4054 ;
4055 break;}
4056 case 390:
4057 #line 1973 "rpsl.y"
4058 {
4059 yyval.attr = yyvsp[-2].attr;
4060 handle_error("Error: invalid typedef specification\n");
4061 yyerrok;
4062 ;
4063 break;}
4064 case 391:
4065 #line 1980 "rpsl.y"
4066 {
4067 yyval.typelist = new List<RPTypeNode>;
4068 if (yyvsp[0].typenode)
4069 yyval.typelist->append(new RPTypeNode(yyvsp[0].typenode));
4070 ;
4071 break;}
4072 case 392:
4073 #line 1985 "rpsl.y"
4074 {
4075 yyval.typelist = yyvsp[-2].typelist;
4076 if (yyvsp[0].typenode)
4077 yyval.typelist->append(new RPTypeNode(yyvsp[0].typenode));
4078 ;
4079 break;}
4080 case 393:
4081 #line 1992 "rpsl.y"
4082 {
4083 yyval.typenode = RPType::newRPType("union", yyvsp[0].typelist);
4084 if (!yyval.typenode) {
4085 handle_error("Error: empty union specification\n");
4086 delete yyvsp[0].typelist;
4087 }
4088 ;
4089 break;}
4090 case 394:
4091 #line 1999 "rpsl.y"
4092 {
4093 if (yyvsp[0].typenode)
4094 yyval.typenode = new RPTypeRange(yyvsp[0].typenode);
4095 else {
4096 yyval.typenode = NULL;
4097 }
4098 ;
4099 break;}
4100 case 395:
4101 #line 2006 "rpsl.y"
4102 {
4103 yyval.typenode = RPType::newRPType(yyvsp[0].string);
4104 if (!yyval.typenode) {
4105 handle_error("Error: invalid type %s\n", yyvsp[0].string);
4106 }
4107 free(yyvsp[0].string);
4108 ;
4109 break;}
4110 case 396:
4111 #line 2013 "rpsl.y"
4112 {
4113 yyval.typenode = RPType::newRPType(yyvsp[-5].string, yyvsp[-3].i, yyvsp[-1].i);
4114 if (!yyval.typenode) {
4115 handle_error("Error: invalid type %s[%d,%d]\n", yyvsp[-5].string, yyvsp[-3].i, yyvsp[-1].i);
4116 }
4117 free(yyvsp[-5].string);
4118 ;
4119 break;}
4120 case 397:
4121 #line 2020 "rpsl.y"
4122 {
4123 yyval.typenode = RPType::newRPType(yyvsp[-5].string, yyvsp[-3].real, yyvsp[-1].real);
4124 if (!yyval.typenode) {
4125 handle_error("Error: invalid type %s[%f,%f]\n", yyvsp[-5].string, yyvsp[-3].real, yyvsp[-1].real);
4126 }
4127 free(yyvsp[-5].string);
4128 ;
4129 break;}
4130 case 398:
4131 #line 2027 "rpsl.y"
4132 {
4133 yyval.typenode = RPType::newRPType(yyvsp[-3].string, yyvsp[-1].wordlist);
4134 if (!yyval.typenode) {
4135 handle_error("Error: invalid type %s, enum expected\n", yyvsp[-3].string);
4136 delete yyvsp[-1].wordlist;
4137 }
4138 free(yyvsp[-3].string);
4139 ;
4140 break;}
4141 case 399:
4142 #line 2035 "rpsl.y"
4143 {
4144 if (yyvsp[0].typenode)
4145 if (yyvsp[-5].i < yyvsp[-3].i)
4146 yyval.typenode = new RPTypeList(yyvsp[0].typenode, yyvsp[-5].i, yyvsp[-3].i);
4147 else
4148 yyval.typenode = new RPTypeList(yyvsp[0].typenode, yyvsp[-3].i, yyvsp[-5].i);
4149 else {
4150 yyval.typenode = NULL;
4151 delete yyvsp[0].typenode;
4152 }
4153 ;
4154 break;}
4155 case 400:
4156 #line 2046 "rpsl.y"
4157 {
4158 if (yyvsp[0].typenode)
4159 yyval.typenode = new RPTypeList(yyvsp[0].typenode);
4160 else {
4161 yyval.typenode = NULL;
4162 }
4163 ;
4164 break;}
4165 case 401:
4166 #line 2053 "rpsl.y"
4167 {
4168 yyval.typenode = NULL;
4169 delete yyvsp[0].typenode;
4170 handle_error("Error: invalid list size\n");
4171 ;
4172 break;}
4173 case 402:
4174 #line 2060 "rpsl.y"
4175 {
4176 yyval.wordlist = new List<WordNode>;
4177 yyval.wordlist->append(new WordNode(yyvsp[0].string));
4178 ;
4179 break;}
4180 case 403:
4181 #line 2064 "rpsl.y"
4182 {
4183 yyval.wordlist = yyvsp[-2].wordlist;
4184 yyval.wordlist->append(new WordNode(yyvsp[0].string));
4185 ;
4186 break;}
4187 case 404:
4188 #line 2072 "rpsl.y"
4189 {
4190 yyval.attr = changeCurrentAttr(new AttrProtocol(yyvsp[-2].string, yyvsp[-1].protocol_option_list));
4191 ;
4192 break;}
4193 case 405:
4194 #line 2075 "rpsl.y"
4195 {
4196 yyval.attr = yyvsp[-3].attr;
4197 handle_error("Error: invalid protocol option\n");
4198 yyerrok;
4199 ;
4200 break;}
4201 case 406:
4202 #line 2080 "rpsl.y"
4203 {
4204 yyval.attr = yyvsp[-2].attr;
4205 handle_error("Error: invalid protocol name\n");
4206 yyerrok;
4207 ;
4208 break;}
4209 case 407:
4210 #line 2087 "rpsl.y"
4211 {
4212 yyval.protocol_option_list = new List<AttrProtocolOption>;
4213 ;
4214 break;}
4215 case 408:
4216 #line 2090 "rpsl.y"
4217 {
4218 yyval.protocol_option_list = yyvsp[-1].protocol_option_list;
4219 yyval.protocol_option_list->append(yyvsp[0].protocol_option);
4220 ;
4221 break;}
4222 case 409:
4223 #line 2096 "rpsl.y"
4224 {
4225 yyval.protocol_option = new AttrProtocolOption(false, yyvsp[0].method);
4226 ;
4227 break;}
4228 case 410:
4229 #line 2099 "rpsl.y"
4230 {
4231 yyval.protocol_option = new AttrProtocolOption(true, yyvsp[0].method);
4232 ;
4233 break;}
4234 case 411:
4235 #line 2106 "rpsl.y"
4236 {
4237 yyval.rpslattr = new AttrAttr(ATTR_GENERIC, RPType::newRPType("free_text"));
4238 ;
4239 break;}
4240 case 412:
4241 #line 2109 "rpsl.y"
4242 {
4243 yyval.rpslattr = new AttrAttr(ATTR_GENERIC, RPType::newRPType("free_text"));
4244 *yyval.rpslattr |= *yyvsp[0].rpslattr;
4245 delete yyvsp[0].rpslattr;
4246 ;
4247 break;}
4248 case 413:
4249 #line 2116 "rpsl.y"
4250 {
4251 yyval.rpslattr = yyvsp[0].rpslattr;
4252 ;
4253 break;}
4254 case 414:
4255 #line 2119 "rpsl.y"
4256 {
4257 yyval.rpslattr = yyvsp[-2].rpslattr;
4258 *yyval.rpslattr |= *yyvsp[0].rpslattr;
4259 delete yyvsp[0].rpslattr;
4260 ;
4261 break;}
4262 case 415:
4263 #line 2124 "rpsl.y"
4264 {
4265 yyval.rpslattr = yyvsp[0].rpslattr;
4266 handle_error("Error: in attr option specification.\n");
4267 ;
4268 break;}
4269 case 416:
4270 #line 2130 "rpsl.y"
4271 {
4272 yyval.rpslattr = new AttrAttr(ATTR_GENERIC, yyvsp[-1].typenode);
4273 ;
4274 break;}
4275 case 417:
4276 #line 2133 "rpsl.y"
4277 {
4278 int syntax = schema.searchAttrSyntax(yyvsp[-1].string);
4279 if (syntax < 0) {
4280 handle_error("Error: no known syntax rule for %s.\n", yyvsp[-1].string);
4281 yyval.rpslattr = new AttrAttr;
4282 } else
4283 yyval.rpslattr = new AttrAttr(syntax, NULL);
4284 free(yyvsp[-1].string);
4285 ;
4286 break;}
4287 case 418:
4288 #line 2142 "rpsl.y"
4289 {
4290 yyval.rpslattr = new AttrAttr(AttrAttr::OPTIONAL);
4291 ;
4292 break;}
4293 case 419:
4294 #line 2145 "rpsl.y"
4295 {
4296 yyval.rpslattr = new AttrAttr;
4297 ;
4298 break;}
4299 case 420:
4300 #line 2148 "rpsl.y"
4301 {
4302 yyval.rpslattr = new AttrAttr(AttrAttr::DELETED)
4303 ;
4304 break;}
4305 case 421:
4306 #line 2151 "rpsl.y"
4307 {
4308 yyval.rpslattr = new AttrAttr;
4309 ;
4310 break;}
4311 case 422:
4312 #line 2154 "rpsl.y"
4313 {
4314 yyval.rpslattr = new AttrAttr(AttrAttr::MULTIVALUED);
4315 ;
4316 break;}
4317 case 423:
4318 #line 2157 "rpsl.y"
4319 {
4320 yyval.rpslattr = new AttrAttr(AttrAttr::LOOKUP);
4321 ;
4322 break;}
4323 case 424:
4324 #line 2160 "rpsl.y"
4325 {
4326 yyval.rpslattr = new AttrAttr(AttrAttr::KEY);
4327 ;
4328 break;}
4329 case 425:
4330 #line 2163 "rpsl.y"
4331 {
4332 yyval.rpslattr = new AttrAttr(AttrAttr::OBSOLETE);
4333 ;
4334 break;}
4335 case 426:
4336 #line 2166 "rpsl.y"
4337 {
4338 yyval.rpslattr = new AttrAttr(AttrAttr::INTERNAL);
4339 ;
4340 break;}
4341 case 427:
4342 #line 2169 "rpsl.y"
4343 {
4344 yyval.rpslattr = new AttrAttr(AttrAttr::GENERATED);
4345 ;
4346 break;}
4347 case 428:
4348 #line 2174 "rpsl.y"
4349 {
4350 yyvsp[-1].rpslattr->setName(yyvsp[-2].string);
4351 yyval.attr = changeCurrentAttr(yyvsp[-1].rpslattr);
4352 ;
4353 break;}
4354 case 429:
4355 #line 2178 "rpsl.y"
4356 {
4357 yyval.attr = yyvsp[-3].attr;
4358 free(yyvsp[-2].string);
4359 handle_error("Error: in attr option specification.\n");
4360 yyerrok;
4361 ;
4362 break;}
4363 case 430:
4364 #line 2184 "rpsl.y"
4365 {
4366 yyval.attr = yyvsp[-2].attr;
4367 handle_error("Error: attr name expected.\n");
4368 yyerrok;
4369 ;
4370 break;}
4371 case 431:
4372 #line 2193 "rpsl.y"
4373 {
4374 yyval.attr = changeCurrentAttr(new AttrMntRoutes(yyvsp[-1].listMntPrfxPair));
4375 ;
4376 break;}
4377 case 432:
4378 #line 2198 "rpsl.y"
4379 {
4380 yyval.listMntPrfxPair = new List<AttrMntRoutes::MntPrfxPair>;
4381 yyval.listMntPrfxPair->append(yyvsp[0].mntPrfxPair);
4382 ;
4383 break;}
4384 case 433:
4385 #line 2202 "rpsl.y"
4386 {
4387 yyval.listMntPrfxPair = yyvsp[-2].listMntPrfxPair;
4388 yyval.listMntPrfxPair->append(yyvsp[0].mntPrfxPair);
4389 ;
4390 break;}
4391 case 434:
4392 #line 2208 "rpsl.y"
4393 {
4394 yyval.mntPrfxPair = new AttrMntRoutes::MntPrfxPair(yyvsp[0].string, NULL);
4395 ;
4396 break;}
4397 case 435:
4398 #line 2211 "rpsl.y"
4399 {
4400 yyval.mntPrfxPair = new AttrMntRoutes::MntPrfxPair(yyvsp[-1].string, NULL);
4401 ;
4402 break;}
4403 case 436:
4404 #line 2214 "rpsl.y"
4405 {
4406 yyval.mntPrfxPair = new AttrMntRoutes::MntPrfxPair(yyvsp[-3].string, (FilterPRFXList *) yyvsp[-1].filter);
4407 ;
4408 break;}
4409 }
4410 /* the action file gets copied in in place of this dollarsign */
4411 #line 498 "/usr/local/share/bison.simple"
4412
4413 yyvsp -= yylen;
4414 yyssp -= yylen;
4415 #ifdef YYLSP_NEEDED
4416 yylsp -= yylen;
4417 #endif
4418
4419 #if YYDEBUG != 0
4420 if (yydebug)
4421 {
4422 short *ssp1 = yyss - 1;
4423 fprintf (stderr, "state stack now");
4424 while (ssp1 != yyssp)
4425 fprintf (stderr, " %d", *++ssp1);
4426 fprintf (stderr, "\n");
4427 }
4428 #endif
4429
4430 *++yyvsp = yyval;
4431
4432 #ifdef YYLSP_NEEDED
4433 yylsp++;
4434 if (yylen == 0)
4435 {
4436 yylsp->first_line = yylloc.first_line;
4437 yylsp->first_column = yylloc.first_column;
4438 yylsp->last_line = (yylsp-1)->last_line;
4439 yylsp->last_column = (yylsp-1)->last_column;
4440 yylsp->text = 0;
4441 }
4442 else
4443 {
4444 yylsp->last_line = (yylsp+yylen-1)->last_line;
4445 yylsp->last_column = (yylsp+yylen-1)->last_column;
4446 }
4447 #endif
4448
4449 /* Now "shift" the result of the reduction.
4450 Determine what state that goes to,
4451 based on the state we popped back to
4452 and the rule number reduced by. */
4453
4454 yyn = yyr1[yyn];
4455
4456 yystate = yypgoto[yyn - YYNTBASE] + *yyssp;
4457 if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
4458 yystate = yytable[yystate];
4459 else
4460 yystate = yydefgoto[yyn - YYNTBASE];
4461
4462 goto yynewstate;
4463
4464 yyerrlab: /* here on detecting error */
4465
4466 if (! yyerrstatus)
4467 /* If not already recovering from an error, report this error. */
4468 {
4469 ++yynerrs;
4470
4471 #ifdef YYERROR_VERBOSE
4472 yyn = yypact[yystate];
4473
4474 if (yyn > YYFLAG && yyn < YYLAST)
4475 {
4476 int size = 0;
4477 char *msg;
4478 int x, count;
4479
4480 count = 0;
4481 /* Start X at -yyn if nec to avoid negative indexes in yycheck. */
4482 for (x = (yyn < 0 ? -yyn : 0);
4483 x < (sizeof(yytname) / sizeof(char *)); x++)
4484 if (yycheck[x + yyn] == x)
4485 size += strlen(yytname[x]) + 15, count++;
4486 msg = (char *) malloc(size + 15);
4487 if (msg != 0)
4488 {
4489 strcpy(msg, "parse error");
4490
4491 if (count < 5)
4492 {
4493 count = 0;
4494 for (x = (yyn < 0 ? -yyn : 0);
4495 x < (sizeof(yytname) / sizeof(char *)); x++)
4496 if (yycheck[x + yyn] == x)
4497 {
4498 strcat(msg, count == 0 ? ", expecting `" : " or `");
4499 strcat(msg, yytname[x]);
4500 strcat(msg, "'");
4501 count++;
4502 }
4503 }
4504 yyerror(msg);
4505 free(msg);
4506 }
4507 else
4508 yyerror ("parse error; also virtual memory exceeded");
4509 }
4510 else
4511 #endif /* YYERROR_VERBOSE */
4512 yyerror("parse error");
4513 }
4514
4515 goto yyerrlab1;
4516 yyerrlab1: /* here on error raised explicitly by an action */
4517
4518 if (yyerrstatus == 3)
4519 {
4520 /* if just tried and failed to reuse lookahead token after an error, discard it. */
4521
4522 /* return failure if at end of input */
4523 if (yychar == YYEOF)
4524 YYABORT;
4525
4526 #if YYDEBUG != 0
4527 if (yydebug)
4528 fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]);
4529 #endif
4530
4531 yychar = YYEMPTY;
4532 }
4533
4534 /* Else will try to reuse lookahead token
4535 after shifting the error token. */
4536
4537 yyerrstatus = 3; /* Each real token shifted decrements this */
4538
4539 goto yyerrhandle;
4540
4541 yyerrdefault: /* current state does not do anything special for the error token. */
4542
4543 #if 0
4544 /* This is wrong; only states that explicitly want error tokens
4545 should shift them. */
4546 yyn = yydefact[yystate]; /* If its default is to accept any token, ok. Otherwise pop it.*/
4547 if (yyn) goto yydefault;
4548 #endif
4549
4550 yyerrpop: /* pop the current state because it cannot handle the error token */
4551
4552 if (yyssp == yyss) YYABORT;
4553 yyvsp--;
4554 yystate = *--yyssp;
4555 #ifdef YYLSP_NEEDED
4556 yylsp--;
4557 #endif
4558
4559 #if YYDEBUG != 0
4560 if (yydebug)
4561 {
4562 short *ssp1 = yyss - 1;
4563 fprintf (stderr, "Error: state stack now");
4564 while (ssp1 != yyssp)
4565 fprintf (stderr, " %d", *++ssp1);
4566 fprintf (stderr, "\n");
4567 }
4568 #endif
4569
4570 yyerrhandle:
4571
4572 yyn = yypact[yystate];
4573 if (yyn == YYFLAG)
4574 goto yyerrdefault;
4575
4576 yyn += YYTERROR;
4577 if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)
4578 goto yyerrdefault;
4579
4580 yyn = yytable[yyn];
4581 if (yyn < 0)
4582 {
4583 if (yyn == YYFLAG)
4584 goto yyerrpop;
4585 yyn = -yyn;
4586 goto yyreduce;
4587 }
4588 else if (yyn == 0)
4589 goto yyerrpop;
4590
4591 if (yyn == YYFINAL)
4592 YYACCEPT;
4593
4594 #if YYDEBUG != 0
4595 if (yydebug)
4596 fprintf(stderr, "Shifting error token, ");
4597 #endif
4598
4599 *++yyvsp = yylval;
4600 #ifdef YYLSP_NEEDED
4601 *++yylsp = yylloc;
4602 #endif
4603
4604 yystate = yyn;
4605 goto yynewstate;
4606 }
4607 #line 2219 "rpsl.y"
4608
4609
4610 void enable_yy_parser_debugging() {
/* [<][>][^][v][top][bottom][index][help] */
4611 #if YYDEBUG != 0
4612 yydebug = 1;
4613 #endif
4614 }
4615
4616 void handleArgumentTypeError(char *attr, char *method, int position,
/* [<][>][^][v][top][bottom][index][help] */
4617 const RPType *correctType,
4618 bool isOperator = false) {
4619 if (isOperator)
4620 if (position)
4621 handle_error("Error: argument %d to %s.operator%s should be %s.\n",
4622 position, attr, method, ((RPType *) correctType)->name());
4623 else
4624 handle_error("Error: wrong number of arguments to %s.operator%s.\n",
4625 attr, method);
4626 else
4627 if (position)
4628 handle_error("Error: argument %d to %s.%s should be %s.\n",
4629 position, attr, method, ((RPType *) correctType)->name());
4630 else
4631 handle_error("Error: wrong number of arguments to %s.%s.\n",
4632 attr, method);
4633 }
4634
4635 const AttrMethod *searchMethod(const AttrRPAttr *rp_attr, char *method, ItemList *args) {
/* [<][>][^][v][top][bottom][index][help] */
4636 const AttrMethod *mtd = rp_attr->searchMethod(method);
4637 int position;
4638 const RPType *correctType;
4639
4640 if (!mtd) {
4641 handle_error("Error: rp-attribute %s does not have %s defined.\n",
4642 rp_attr->name, method);
4643 return NULL;
4644 }
4645
4646 for (; mtd; mtd = rp_attr->searchNextMethod(mtd))
4647 if (mtd->validateArgs(args, position, correctType))
4648 return mtd;
4649
4650 handleArgumentTypeError(rp_attr->name, method, position, correctType);
4651
4652 return NULL;
4653 }