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

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