modules/up/src/rpsl/rpsl/rpsl.y.cc

/* [<][>]
[^][v][top][bottom][index][help] */

FUNCTIONS

This source file includes following functions.
  1. YYTRANSLATE
  2. YYRECOVERING
  3. YYBACKUP
  4. __yy_memcpy
  5. __yy_memcpy
  6. __yy_memcpy
  7. yyparse
  8. enable_yy_parser_debugging
  9. handleArgumentTypeError
  10. searchMethod

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

/* [<][>][^][v][top][bottom][index][help] */