Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members

parse.cc

Go to the documentation of this file.
00001 /* A Bison parser, made by GNU Bison 1.875c.  */
00002 
00003 /* Skeleton parser for Yacc-like parsing with Bison,
00004    Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
00005 
00006    This program is free software; you can redistribute it and/or modify
00007    it under the terms of the GNU General Public License as published by
00008    the Free Software Foundation; either version 2, or (at your option)
00009    any later version.
00010 
00011    This program is distributed in the hope that it will be useful,
00012    but WITHOUT ANY WARRANTY; without even the implied warranty of
00013    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014    GNU General Public License for more details.
00015 
00016    You should have received a copy of the GNU General Public License
00017    along with this program; if not, write to the Free Software
00018    Foundation, Inc., 59 Temple Place - Suite 330,
00019    Boston, MA 02111-1307, USA.  */
00020 
00021 /* As a special exception, when this file is copied by Bison into a
00022    Bison output file, you may use that output file without restriction.
00023    This special exception was added by the Free Software Foundation
00024    in version 1.24 of Bison.  */
00025 
00026 /* Written by Richard Stallman by simplifying the original so called
00027    ``semantic'' parser.  */
00028 
00029 /* All symbols defined below should begin with yy or YY, to avoid
00030    infringing on user name space.  This should be done even for local
00031    variables, as they might otherwise be expanded by user macros.
00032    There are some unavoidable exceptions within include files to
00033    define necessary library symbols; they are noted "INFRINGES ON
00034    USER NAME SPACE" below.  */
00035 
00036 /* Identify Bison output.  */
00037 #define YYBISON 1
00038 
00039 /* Skeleton name.  */
00040 #define YYSKELETON_NAME "yacc.c"
00041 
00042 /* Pure parsers.  */
00043 #define YYPURE 0
00044 
00045 /* Using locations.  */
00046 #define YYLSP_NEEDED 1
00047 
00048 
00049 
00050 /* Tokens.  */
00051 #ifndef YYTOKENTYPE
00052 # define YYTOKENTYPE
00053    /* Put the tokens into the symbol table, so that GDB and other debuggers
00054       know about them.  */
00055    enum yytokentype {
00056      TOK_ADD = 258,
00057      TOK_ADD_TO = 259,
00058      TOK_ADDR = 260,
00059      TOK_ALARM = 261,
00060      TOK_ANY = 262,
00061      TOK_ATENDIF = 263,
00062      TOK_ATELSE = 264,
00063      TOK_ATIF = 265,
00064      TOK_ATIFDEF = 266,
00065      TOK_ATIFNDEF = 267,
00066      TOK_BOOL = 268,
00067      TOK_BREAK = 269,
00068      TOK_CASE = 270,
00069      TOK_CONST = 271,
00070      TOK_CONSTANT = 272,
00071      TOK_COUNT = 273,
00072      TOK_COUNTER = 274,
00073      TOK_DEFAULT = 275,
00074      TOK_DELETE = 276,
00075      TOK_DOUBLE = 277,
00076      TOK_ELSE = 278,
00077      TOK_ENUM = 279,
00078      TOK_EVENT = 280,
00079      TOK_EXPORT = 281,
00080      TOK_FILE = 282,
00081      TOK_FOR = 283,
00082      TOK_FUNCTION = 284,
00083      TOK_GLOBAL = 285,
00084      TOK_GLOBAL_ATTR = 286,
00085      TOK_ID = 287,
00086      TOK_IF = 288,
00087      TOK_INT = 289,
00088      TOK_INTERVAL = 290,
00089      TOK_LIST = 291,
00090      TOK_LOCAL = 292,
00091      TOK_MODULE = 293,
00092      TOK_MATCH = 294,
00093      TOK_NET = 295,
00094      TOK_NEXT = 296,
00095      TOK_OF = 297,
00096      TOK_PATTERN = 298,
00097      TOK_PATTERN_TEXT = 299,
00098      TOK_PORT = 300,
00099      TOK_PRINT = 301,
00100      TOK_RECORD = 302,
00101      TOK_REDEF = 303,
00102      TOK_REMOVE_FROM = 304,
00103      TOK_RETURN = 305,
00104      TOK_SCHEDULE = 306,
00105      TOK_SET = 307,
00106      TOK_STRING = 308,
00107      TOK_SUBNET = 309,
00108      TOK_SWITCH = 310,
00109      TOK_TABLE = 311,
00110      TOK_THIS = 312,
00111      TOK_TIME = 313,
00112      TOK_TIMER = 314,
00113      TOK_TYPE = 315,
00114      TOK_UNION = 316,
00115      TOK_VECTOR = 317,
00116      TOK_ATTR_ADD_FUNC = 318,
00117      TOK_ATTR_ATTR = 319,
00118      TOK_ATTR_ENCRYPT = 320,
00119      TOK_ATTR_DEFAULT = 321,
00120      TOK_ATTR_OPTIONAL = 322,
00121      TOK_ATTR_REDEF = 323,
00122      TOK_ATTR_ROTATE_INTERVAL = 324,
00123      TOK_ATTR_ROTATE_SIZE = 325,
00124      TOK_ATTR_DEL_FUNC = 326,
00125      TOK_ATTR_EXPIRE_FUNC = 327,
00126      TOK_ATTR_EXPIRE_CREATE = 328,
00127      TOK_ATTR_EXPIRE_READ = 329,
00128      TOK_ATTR_EXPIRE_WRITE = 330,
00129      TOK_ATTR_PERSISTENT = 331,
00130      TOK_ATTR_MATCH = 332,
00131      TOK_ATTR_SYNCHRONIZED = 333,
00132      TOK_DEBUG = 334,
00133      TOK_USING = 335,
00134      TOK_OR = 336,
00135      TOK_AND = 337,
00136      TOK_NE = 338,
00137      TOK_EQ = 339,
00138      TOK_GE = 340,
00139      TOK_LE = 341,
00140      TOK_NOT_IN = 342,
00141      TOK_IN = 343,
00142      TOK_DECR = 344,
00143      TOK_INCR = 345,
00144      TOK_HAS_ATTR = 346,
00145      TOK_HAS_FIELD = 347
00146    };
00147 #endif
00148 #define TOK_ADD 258
00149 #define TOK_ADD_TO 259
00150 #define TOK_ADDR 260
00151 #define TOK_ALARM 261
00152 #define TOK_ANY 262
00153 #define TOK_ATENDIF 263
00154 #define TOK_ATELSE 264
00155 #define TOK_ATIF 265
00156 #define TOK_ATIFDEF 266
00157 #define TOK_ATIFNDEF 267
00158 #define TOK_BOOL 268
00159 #define TOK_BREAK 269
00160 #define TOK_CASE 270
00161 #define TOK_CONST 271
00162 #define TOK_CONSTANT 272
00163 #define TOK_COUNT 273
00164 #define TOK_COUNTER 274
00165 #define TOK_DEFAULT 275
00166 #define TOK_DELETE 276
00167 #define TOK_DOUBLE 277
00168 #define TOK_ELSE 278
00169 #define TOK_ENUM 279
00170 #define TOK_EVENT 280
00171 #define TOK_EXPORT 281
00172 #define TOK_FILE 282
00173 #define TOK_FOR 283
00174 #define TOK_FUNCTION 284
00175 #define TOK_GLOBAL 285
00176 #define TOK_GLOBAL_ATTR 286
00177 #define TOK_ID 287
00178 #define TOK_IF 288
00179 #define TOK_INT 289
00180 #define TOK_INTERVAL 290
00181 #define TOK_LIST 291
00182 #define TOK_LOCAL 292
00183 #define TOK_MODULE 293
00184 #define TOK_MATCH 294
00185 #define TOK_NET 295
00186 #define TOK_NEXT 296
00187 #define TOK_OF 297
00188 #define TOK_PATTERN 298
00189 #define TOK_PATTERN_TEXT 299
00190 #define TOK_PORT 300
00191 #define TOK_PRINT 301
00192 #define TOK_RECORD 302
00193 #define TOK_REDEF 303
00194 #define TOK_REMOVE_FROM 304
00195 #define TOK_RETURN 305
00196 #define TOK_SCHEDULE 306
00197 #define TOK_SET 307
00198 #define TOK_STRING 308
00199 #define TOK_SUBNET 309
00200 #define TOK_SWITCH 310
00201 #define TOK_TABLE 311
00202 #define TOK_THIS 312
00203 #define TOK_TIME 313
00204 #define TOK_TIMER 314
00205 #define TOK_TYPE 315
00206 #define TOK_UNION 316
00207 #define TOK_VECTOR 317
00208 #define TOK_ATTR_ADD_FUNC 318
00209 #define TOK_ATTR_ATTR 319
00210 #define TOK_ATTR_ENCRYPT 320
00211 #define TOK_ATTR_DEFAULT 321
00212 #define TOK_ATTR_OPTIONAL 322
00213 #define TOK_ATTR_REDEF 323
00214 #define TOK_ATTR_ROTATE_INTERVAL 324
00215 #define TOK_ATTR_ROTATE_SIZE 325
00216 #define TOK_ATTR_DEL_FUNC 326
00217 #define TOK_ATTR_EXPIRE_FUNC 327
00218 #define TOK_ATTR_EXPIRE_CREATE 328
00219 #define TOK_ATTR_EXPIRE_READ 329
00220 #define TOK_ATTR_EXPIRE_WRITE 330
00221 #define TOK_ATTR_PERSISTENT 331
00222 #define TOK_ATTR_MATCH 332
00223 #define TOK_ATTR_SYNCHRONIZED 333
00224 #define TOK_DEBUG 334
00225 #define TOK_USING 335
00226 #define TOK_OR 336
00227 #define TOK_AND 337
00228 #define TOK_NE 338
00229 #define TOK_EQ 339
00230 #define TOK_GE 340
00231 #define TOK_LE 341
00232 #define TOK_NOT_IN 342
00233 #define TOK_IN 343
00234 #define TOK_DECR 344
00235 #define TOK_INCR 345
00236 #define TOK_HAS_ATTR 346
00237 #define TOK_HAS_FIELD 347
00238 
00239 
00240 
00241 
00242 /* Copy the first part of user declarations.  */
00243 #line 1 "parse.y"
00244 
00245 // $Id: parse.in,v 1.7 2005/09/01 07:09:37 vern Exp $
00246 // Copyright (c) 2001, 2002
00247 //      The Regents of the University of California.  All rights reserved.
00248 //
00249 // Redistribution and use in source and binary forms, with or without
00250 // modification, are permitted provided that: (1) source code distributions
00251 // retain the above copyright notice and this paragraph in its entirety, (2)
00252 // distributions including binary code include the above copyright notice and
00253 // this paragraph in its entirety in the documentation or other materials
00254 // provided with the distribution, and (3) all advertising materials mentioning
00255 // features or use of this software display the following acknowledgement:
00256 // ``This product includes software developed by the University of California,
00257 // Lawrence Berkeley Laboratory and its contributors.'' Neither the name of
00258 // the University nor the names of its contributors may be used to endorse
00259 // or promote products derived from this software without specific prior
00260 // written permission.
00261 // THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
00262 // WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
00263 // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
00264 #line 80 "parse.y"
00265 
00266 #include <stdlib.h>
00267 #include <string.h>
00268 #include <assert.h>
00269 
00270 #include "input.h"
00271 #include "Expr.h"
00272 #include "Stmt.h"
00273 #include "Var.h"
00274 #include "DNS.h"
00275 #include "RE.h"
00276 #include "Scope.h"
00277 
00278 YYLTYPE GetCurrentLocation();
00279 extern int yyerror(const char[]);
00280 extern int brolex();
00281 
00282 #define YYLLOC_DEFAULT(Current, Rhs, N) \
00283         (Current) = (Rhs)[(N)];
00284 
00285 /*
00286  * Part of the module facility: while parsing, keep track of which
00287  * module to put things in.
00288  */
00289 string current_module = GLOBAL_MODULE_NAME;
00290 bool is_export = false; // true if in an export {} block
00291 
00292 /*
00293  * When parsing an expression for the debugger, where to put the result
00294  * (obviously not reentrant).
00295  */
00296 extern Expr* g_curr_debug_expr;
00297 
00298 #define YYLTYPE yyltype
00299 
00300 Expr* bro_this = 0;
00301 int in_init = 0;
00302 bool in_debug = false;
00303 bool resolving_global_ID = false;
00304 
00305 ID* func_id = 0;
00306 
00307 
00308 /* Enabling traces.  */
00309 #ifndef YYDEBUG
00310 # define YYDEBUG 1
00311 #endif
00312 
00313 /* Enabling verbose error messages.  */
00314 #ifdef YYERROR_VERBOSE
00315 # undef YYERROR_VERBOSE
00316 # define YYERROR_VERBOSE 1
00317 #else
00318 # define YYERROR_VERBOSE 0
00319 #endif
00320 
00321 #if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
00322 #line 123 "parse.y"
00323 typedef union YYSTYPE {
00324         char* str;
00325         ID* id;
00326         id_list* id_l;
00327         init_class ic;
00328         Val* val;
00329         RE_Matcher* re;
00330         Expr* expr;
00331         CallExpr* call_expr;
00332         EventExpr* event_expr;
00333         Stmt* stmt;
00334         ListExpr* list;
00335         BroType* type;
00336         RecordType* record;
00337         FuncType* func_type;
00338         TypeList* type_l;
00339         TypeDecl* type_decl;
00340         type_decl_list* type_decl_l;
00341         Case* c_case;
00342         case_list* case_l;
00343         Attr* attr;
00344         attr_list* attr_l;
00345         attr_tag attrtag;
00346 } YYSTYPE;
00347 /* Line 191 of yacc.c.  */
00348 #line 349 "y.tab.c"
00349 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
00350 # define YYSTYPE_IS_DECLARED 1
00351 # define YYSTYPE_IS_TRIVIAL 1
00352 #endif
00353 
00354 #if ! defined (YYLTYPE) && ! defined (YYLTYPE_IS_DECLARED)
00355 typedef struct YYLTYPE
00356 {
00357   int first_line;
00358   int first_column;
00359   int last_line;
00360   int last_column;
00361 } YYLTYPE;
00362 # define yyltype YYLTYPE /* obsolescent; will be withdrawn */
00363 # define YYLTYPE_IS_DECLARED 1
00364 # define YYLTYPE_IS_TRIVIAL 1
00365 #endif
00366 
00367 
00368 /* Copy the second part of user declarations.  */
00369 
00370 
00371 /* Line 214 of yacc.c.  */
00372 #line 373 "y.tab.c"
00373 
00374 #if ! defined (yyoverflow) || YYERROR_VERBOSE
00375 
00376 /* The parser invokes alloca or malloc; define the necessary symbols.  */
00377 
00378 # ifdef YYSTACK_USE_ALLOCA
00379 #  if YYSTACK_USE_ALLOCA
00380 #   define YYSTACK_ALLOC alloca
00381 #  endif
00382 # else
00383 #  if defined (alloca) || defined (_ALLOCA_H)
00384 #   define YYSTACK_ALLOC alloca
00385 #  else
00386 #   ifdef __GNUC__
00387 #    define YYSTACK_ALLOC __builtin_alloca
00388 #   endif
00389 #  endif
00390 # endif
00391 
00392 # ifdef YYSTACK_ALLOC
00393    /* Pacify GCC's `empty if-body' warning. */
00394 #  define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
00395 # else
00396 #  if defined (__STDC__) || defined (__cplusplus)
00397 #   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
00398 #   define YYSIZE_T size_t
00399 #  endif
00400 #  define YYSTACK_ALLOC malloc
00401 #  define YYSTACK_FREE free
00402 # endif
00403 #endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */
00404 
00405 
00406 #if (! defined (yyoverflow) \
00407      && (! defined (__cplusplus) \
00408          || (defined (YYLTYPE_IS_TRIVIAL) && YYLTYPE_IS_TRIVIAL \
00409              && defined (YYSTYPE_IS_TRIVIAL) && YYSTYPE_IS_TRIVIAL)))
00410 
00411 /* A type that is properly aligned for any stack member.  */
00412 union yyalloc
00413 {
00414   short yyss;
00415   YYSTYPE yyvs;
00416     YYLTYPE yyls;
00417 };
00418 
00419 /* The size of the maximum gap between one aligned stack and the next.  */
00420 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
00421 
00422 /* The size of an array large to enough to hold all stacks, each with
00423    N elements.  */
00424 # define YYSTACK_BYTES(N) \
00425      ((N) * (sizeof (short) + sizeof (YYSTYPE) + sizeof (YYLTYPE))      \
00426       + 2 * YYSTACK_GAP_MAXIMUM)
00427 
00428 /* Copy COUNT objects from FROM to TO.  The source and destination do
00429    not overlap.  */
00430 # ifndef YYCOPY
00431 #  if defined (__GNUC__) && 1 < __GNUC__
00432 #   define YYCOPY(To, From, Count) \
00433       __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
00434 #  else
00435 #   define YYCOPY(To, From, Count)              \
00436       do                                        \
00437         {                                       \
00438           register YYSIZE_T yyi;                \
00439           for (yyi = 0; yyi < (Count); yyi++)   \
00440             (To)[yyi] = (From)[yyi];            \
00441         }                                       \
00442       while (0)
00443 #  endif
00444 # endif
00445 
00446 /* Relocate STACK from its old location to the new one.  The
00447    local variables YYSIZE and YYSTACKSIZE give the old and new number of
00448    elements in the stack, and YYPTR gives the new location of the
00449    stack.  Advance YYPTR to a properly aligned location for the next
00450    stack.  */
00451 # define YYSTACK_RELOCATE(Stack)                                        \
00452     do                                                                  \
00453       {                                                                 \
00454         YYSIZE_T yynewbytes;                                            \
00455         YYCOPY (&yyptr->Stack, Stack, yysize);                          \
00456         Stack = &yyptr->Stack;                                          \
00457         yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
00458         yyptr += yynewbytes / sizeof (*yyptr);                          \
00459       }                                                                 \
00460     while (0)
00461 
00462 #endif
00463 
00464 #if defined (__STDC__) || defined (__cplusplus)
00465    typedef signed char yysigned_char;
00466 #else
00467    typedef short yysigned_char;
00468 #endif
00469 
00470 /* YYFINAL -- State number of the termination state. */
00471 #define YYFINAL  5
00472 /* YYLAST -- Last index in YYTABLE.  */
00473 #define YYLAST   1213
00474 
00475 /* YYNTOKENS -- Number of terminals. */
00476 #define YYNTOKENS  114
00477 /* YYNNTS -- Number of nonterminals. */
00478 #define YYNNTS  56
00479 /* YYNRULES -- Number of rules. */
00480 #define YYNRULES  200
00481 /* YYNRULES -- Number of states. */
00482 #define YYNSTATES  435
00483 
00484 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */
00485 #define YYUNDEFTOK  2
00486 #define YYMAXUTOK   347
00487 
00488 #define YYTRANSLATE(YYX)                                                \
00489   ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
00490 
00491 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX.  */
00492 static const unsigned char yytranslate[] =
00493 {
00494        0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00495        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00496        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00497        2,     2,     2,   103,     2,     2,   104,   100,     2,     2,
00498      107,   108,    98,    96,    80,    97,     2,    99,     2,     2,
00499        2,     2,     2,     2,     2,     2,     2,     2,    84,   113,
00500       88,    82,    89,    83,     2,     2,     2,     2,     2,     2,
00501        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00502        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00503        2,   105,     2,   106,     2,     2,     2,     2,     2,     2,
00504        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00505        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00506        2,     2,     2,   111,    81,   112,     2,     2,     2,     2,
00507        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00508        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00509        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00510        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00511        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00512        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00513        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00514        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00515        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00516        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00517        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00518        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00519        2,     2,     2,     2,     2,     2,     1,     2,     3,     4,
00520        5,     6,     7,     8,     9,    10,    11,    12,    13,    14,
00521       15,    16,    17,    18,    19,    20,    21,    22,    23,    24,
00522       25,    26,    27,    28,    29,    30,    31,    32,    33,    34,
00523       35,    36,    37,    38,    39,    40,    41,    42,    43,    44,
00524       45,    46,    47,    48,    49,    50,    51,    52,    53,    54,
00525       55,    56,    57,    58,    59,    60,    61,    62,    63,    64,
00526       65,    66,    67,    68,    69,    70,    71,    72,    73,    74,
00527       75,    76,    77,    78,    79,    85,    86,    87,    90,    91,
00528       92,    93,    94,    95,   101,   102,   109,   110
00529 };
00530 
00531 #if YYDEBUG
00532 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
00533    YYRHS.  */
00534 static const unsigned short yyprhs[] =
00535 {
00536        0,     0,     3,     6,     7,    11,    14,    15,    19,    22,
00537       25,    28,    31,    34,    38,    42,    46,    50,    54,    58,
00538       62,    66,    70,    74,    78,    82,    86,    92,    96,   101,
00539      105,   110,   111,   118,   122,   126,   130,   135,   140,   144,
00540      148,   150,   156,   158,   160,   162,   164,   168,   170,   172,
00541      173,   175,   176,   180,   182,   183,   184,   190,   192,   196,
00542      198,   200,   202,   204,   206,   208,   210,   212,   214,   216,
00543      218,   220,   222,   224,   226,   233,   238,   243,   248,   253,
00544      259,   261,   265,   269,   272,   277,   281,   283,   285,   289,
00545      291,   294,   295,   301,   303,   306,   307,   311,   315,   317,
00546      322,   326,   327,   333,   341,   349,   357,   367,   375,   376,
00547      377,   386,   393,   396,   398,   403,   408,   413,   415,   417,
00548      423,   424,   428,   432,   437,   441,   445,   447,   453,   457,
00549      462,   464,   467,   468,   469,   471,   473,   475,   476,   477,
00550      481,   482,   486,   491,   493,   495,   496,   499,   501,   505,
00551      507,   509,   513,   517,   521,   525,   529,   533,   537,   541,
00552      543,   545,   547,   551,   553,   557,   561,   565,   569,   575,
00553      583,   589,   592,   595,   598,   601,   605,   609,   613,   621,
00554      629,   632,   634,   636,   639,   640,   645,   648,   649,   654,
00555      658,   665,   674,   678,   680,   682,   683,   686,   687,   690,
00556      692
00557 };
00558 
00559 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
00560 static const short yyrhs[] =
00561 {
00562      115,     0,    -1,   117,   157,    -1,    -1,    79,   116,   118,
00563       -1,   117,   135,    -1,    -1,   107,   118,   108,    -1,   102,
00564      118,    -1,   101,   118,    -1,   103,   118,    -1,    97,   118,
00565       -1,    96,   118,    -1,   118,    96,   118,    -1,   118,    97,
00566      118,    -1,   118,    98,   118,    -1,   118,    99,   118,    -1,
00567      118,   100,   118,    -1,   118,    87,   118,    -1,   118,    86,
00568      118,    -1,   118,    91,   118,    -1,   118,    90,   118,    -1,
00569      118,    88,   118,    -1,   118,    93,   118,    -1,   118,    89,
00570      118,    -1,   118,    92,   118,    -1,   118,    83,   118,    84,
00571      118,    -1,   118,    82,   118,    -1,   118,   105,   120,   106,
00572       -1,   118,   104,    32,    -1,   104,    32,    82,   118,    -1,
00573       -1,   104,    32,   145,    82,   119,   142,    -1,   118,    95,
00574      118,    -1,   118,    94,   118,    -1,   105,   120,   106,    -1,
00575       39,   118,    85,   118,    -1,   118,   107,   121,   108,    -1,
00576      118,   110,    32,    -1,   118,   109,    32,    -1,   143,    -1,
00577       51,   118,   111,   158,   112,    -1,    32,    -1,    17,    -1,
00578      123,    -1,    57,    -1,   120,    80,   118,    -1,   118,    -1,
00579      120,    -1,    -1,    80,    -1,    -1,   123,    81,   124,    -1,
00580      124,    -1,    -1,    -1,    99,   125,    44,   126,    99,    -1,
00581       32,    -1,   127,    80,    32,    -1,    13,    -1,    34,    -1,
00582       18,    -1,    19,    -1,    22,    -1,    58,    -1,    35,    -1,
00583       53,    -1,    43,    -1,    59,    -1,    45,    -1,     5,    -1,
00584       40,    -1,    54,    -1,     7,    -1,    56,   105,   129,   106,
00585       42,   128,    -1,    52,   105,   129,   106,    -1,    52,   111,
00586      120,   112,    -1,    47,   111,   130,   112,    -1,    61,   111,
00587      129,   112,    -1,    24,   111,   127,   122,   112,    -1,    36,
00588       -1,    36,    42,   128,    -1,    62,    42,   128,    -1,    29,
00589      145,    -1,    25,   107,   132,   108,    -1,    27,    42,   128,
00590       -1,    27,    -1,   169,    -1,   129,    80,   128,    -1,   128,
00591       -1,   130,   131,    -1,    -1,    32,    84,   128,   153,   113,
00592       -1,   133,    -1,   133,   113,    -1,    -1,   133,   113,   134,
00593       -1,   133,    80,   134,    -1,   134,    -1,    32,    84,   128,
00594      153,    -1,    38,    32,   113,    -1,    -1,    26,   111,   136,
00595      117,   112,    -1,    30,   164,   147,   148,   149,   153,   113,
00596       -1,    16,   164,   147,   148,   149,   153,   113,    -1,    48,
00597      164,   147,   148,   149,   153,   113,    -1,    48,    24,   164,
00598        4,   111,   127,   122,   112,   113,    -1,    60,   164,    84,
00599      146,   153,   140,   113,    -1,    -1,    -1,    31,    84,   137,
00600      111,   130,   112,   113,   138,    -1,    25,   166,    84,   146,
00601      153,   113,    -1,   141,   142,    -1,   139,    -1,    10,   107,
00602      118,   108,    -1,    11,   107,    32,   108,    -1,    12,   107,
00603       32,   108,    -1,     8,    -1,     9,    -1,    64,    82,   111,
00604      130,   112,    -1,    -1,    29,   164,   145,    -1,    25,   166,
00605      145,    -1,    48,    25,   166,   145,    -1,   111,   157,   112,
00606       -1,    29,   144,   142,    -1,   145,    -1,   107,   132,   108,
00607       84,   128,    -1,   107,   132,   108,    -1,   129,   111,   130,
00608      112,    -1,   129,    -1,    84,   128,    -1,    -1,    -1,    82,
00609       -1,     4,    -1,    49,    -1,    -1,    -1,   150,   152,   151,
00610       -1,    -1,   111,   121,   112,    -1,   111,   120,    80,   112,
00611       -1,   118,    -1,   154,    -1,    -1,   154,   155,    -1,   155,
00612       -1,    66,    82,   118,    -1,    67,    -1,    68,    -1,    69,
00613       82,   118,    -1,    70,    82,   118,    -1,    63,    82,   118,
00614       -1,    71,    82,   118,    -1,    72,    82,   118,    -1,    73,
00615       82,   118,    -1,    74,    82,   118,    -1,    75,    82,   118,
00616       -1,    76,    -1,    78,    -1,    65,    -1,    65,    82,   118,
00617       -1,    77,    -1,   111,   157,   112,    -1,     6,   120,   113,
00618       -1,    46,   120,   113,    -1,    25,   158,   113,    -1,    33,
00619      107,   118,   108,   156,    -1,    33,   107,   118,   108,   156,
00620       23,   156,    -1,    55,   118,   111,   159,   112,    -1,   161,
00621      156,    -1,    41,   113,    -1,    14,   113,    -1,    50,   113,
00622       -1,    50,   118,   113,    -1,     3,   118,   113,    -1,    21,
00623      118,   113,    -1,    37,   163,   147,   148,   149,   153,   113,
00624       -1,    16,   163,   147,   148,   149,   153,   113,    -1,   118,
00625      113,    -1,   113,    -1,   139,    -1,   157,   156,    -1,    -1,
00626       32,   107,   121,   108,    -1,   159,   160,    -1,    -1,    15,
00627      120,    84,   157,    -1,    20,    84,   157,    -1,    28,   107,
00628       32,    95,   118,   108,    -1,    28,   107,   105,   162,   106,
00629       95,   118,   108,    -1,   162,    80,   163,    -1,   163,    -1,
00630       32,    -1,    -1,   165,   168,    -1,    -1,   167,   168,    -1,
00631       32,    -1,    32,    -1
00632 };
00633 
00634 /* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
00635 static const unsigned short yyrline[] =
00636 {
00637        0,   151,   151,   169,   169,   177,   178,   182,   188,   194,
00638      200,   206,   212,   218,   224,   230,   236,   242,   248,   254,
00639      260,   266,   272,   278,   284,   290,   296,   302,   308,   314,
00640      320,   327,   326,   341,   347,   353,   371,   377,   383,   389,
00641      395,   397,   403,   449,   455,   462,   470,   476,   484,   486,
00642      490,   491,   495,   501,   509,   509,   509,   514,   524,   535,
00643      540,   545,   550,   555,   560,   565,   570,   575,   580,   585,
00644      590,   595,   600,   605,   610,   616,   622,   628,   634,   641,
00645      647,   655,   663,   669,   675,   681,   687,   693,   708,   710,
00646      718,   721,   725,   733,   735,   738,   742,   744,   746,   751,
00647      759,   762,   762,   765,   768,   771,   774,   790,   797,   798,
00648      797,   803,   806,   809,   813,   815,   817,   819,   821,   826,
00649      829,   833,   839,   845,   854,   864,   869,   878,   880,   885,
00650      887,   892,   895,   899,   900,   901,   902,   906,   906,   906,
00651      909,   913,   915,   917,   921,   923,   927,   929,   937,   939,
00652      941,   943,   945,   947,   949,   951,   953,   955,   957,   959,
00653      961,   963,   965,   967,   972,   978,   984,   990,   996,  1002,
00654     1008,  1014,  1017,  1023,  1029,  1035,  1041,  1047,  1053,  1059,
00655     1065,  1071,  1077,  1082,  1088,  1092,  1100,  1103,  1107,  1110,
00656     1115,  1141,  1146,  1148,  1156,  1177,  1177,  1182,  1182,  1187,
00657     1214
00658 };
00659 #endif
00660 
00661 #if YYDEBUG || YYERROR_VERBOSE
00662 /* YYTNME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
00663    First, the terminals, then, starting at YYNTOKENS, nonterminals. */
00664 static const char *const yytname[] =
00665 {
00666   "$end", "error", "$undefined", "TOK_ADD", "TOK_ADD_TO", "TOK_ADDR",
00667   "TOK_ALARM", "TOK_ANY", "TOK_ATENDIF", "TOK_ATELSE", "TOK_ATIF",
00668   "TOK_ATIFDEF", "TOK_ATIFNDEF", "TOK_BOOL", "TOK_BREAK", "TOK_CASE",
00669   "TOK_CONST", "TOK_CONSTANT", "TOK_COUNT", "TOK_COUNTER", "TOK_DEFAULT",
00670   "TOK_DELETE", "TOK_DOUBLE", "TOK_ELSE", "TOK_ENUM", "TOK_EVENT",
00671   "TOK_EXPORT", "TOK_FILE", "TOK_FOR", "TOK_FUNCTION", "TOK_GLOBAL",
00672   "TOK_GLOBAL_ATTR", "TOK_ID", "TOK_IF", "TOK_INT", "TOK_INTERVAL",
00673   "TOK_LIST", "TOK_LOCAL", "TOK_MODULE", "TOK_MATCH", "TOK_NET",
00674   "TOK_NEXT", "TOK_OF", "TOK_PATTERN", "TOK_PATTERN_TEXT", "TOK_PORT",
00675   "TOK_PRINT", "TOK_RECORD", "TOK_REDEF", "TOK_REMOVE_FROM", "TOK_RETURN",
00676   "TOK_SCHEDULE", "TOK_SET", "TOK_STRING", "TOK_SUBNET", "TOK_SWITCH",
00677   "TOK_TABLE", "TOK_THIS", "TOK_TIME", "TOK_TIMER", "TOK_TYPE",
00678   "TOK_UNION", "TOK_VECTOR", "TOK_ATTR_ADD_FUNC", "TOK_ATTR_ATTR",
00679   "TOK_ATTR_ENCRYPT", "TOK_ATTR_DEFAULT", "TOK_ATTR_OPTIONAL",
00680   "TOK_ATTR_REDEF", "TOK_ATTR_ROTATE_INTERVAL", "TOK_ATTR_ROTATE_SIZE",
00681   "TOK_ATTR_DEL_FUNC", "TOK_ATTR_EXPIRE_FUNC", "TOK_ATTR_EXPIRE_CREATE",
00682   "TOK_ATTR_EXPIRE_READ", "TOK_ATTR_EXPIRE_WRITE", "TOK_ATTR_PERSISTENT",
00683   "TOK_ATTR_MATCH", "TOK_ATTR_SYNCHRONIZED", "TOK_DEBUG", "','", "'|'",
00684   "'='", "'?'", "':'", "TOK_USING", "TOK_OR", "TOK_AND", "'<'", "'>'",
00685   "TOK_NE", "TOK_EQ", "TOK_GE", "TOK_LE", "TOK_NOT_IN", "TOK_IN", "'+'",
00686   "'-'", "'*'", "'/'", "'%'", "TOK_DECR", "TOK_INCR", "'!'", "'$'", "'['",
00687   "']'", "'('", "')'", "TOK_HAS_ATTR", "TOK_HAS_FIELD", "'{'", "'}'",
00688   "';'", "$accept", "bro", "@1", "decl_list", "expr", "@2", "expr_list",
00689   "opt_expr_list", "opt_comma", "pattern", "single_pattern", "@3", "@4",
00690   "enum_id_list", "type", "type_list", "type_decl_list", "type_decl",
00691   "formal_args", "formal_args_decl_list", "formal_args_decl", "decl", "@5",
00692   "@6", "@7", "conditional", "opt_attr_attr", "func_hdr", "func_body",
00693   "anonymous_function", "begin_func", "func_params", "refined_type",
00694   "opt_type", "init_class", "opt_init", "@8", "@9", "init", "opt_attr",
00695   "attr_list", "attr", "stmt", "stmt_list", "event", "case_list", "case",
00696   "for_head", "local_id_list", "local_id", "global_id", "@10", "event_id",
00697   "@11", "global_or_event_id", "resolve_id", 0
00698 };
00699 #endif
00700 
00701 # ifdef YYPRINT
00702 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
00703    token YYLEX-NUM.  */
00704 static const unsigned short yytoknum[] =
00705 {
00706        0,   256,   257,   258,   259,   260,   261,   262,   263,   264,
00707      265,   266,   267,   268,   269,   270,   271,   272,   273,   274,
00708      275,   276,   277,   278,   279,   280,   281,   282,   283,   284,
00709      285,   286,   287,   288,   289,   290,   291,   292,   293,   294,
00710      295,   296,   297,   298,   299,   300,   301,   302,   303,   304,
00711      305,   306,   307,   308,   309,   310,   311,   312,   313,   314,
00712      315,   316,   317,   318,   319,   320,   321,   322,   323,   324,
00713      325,   326,   327,   328,   329,   330,   331,   332,   333,   334,
00714       44,   124,    61,    63,    58,   335,   336,   337,    60,    62,
00715      338,   339,   340,   341,   342,   343,    43,    45,    42,    47,
00716       37,   344,   345,    33,    36,    91,    93,    40,    41,   346,
00717      347,   123,   125,    59
00718 };
00719 # endif
00720 
00721 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
00722 static const unsigned char yyr1[] =
00723 {
00724        0,   114,   115,   116,   115,   117,   117,   118,   118,   118,
00725      118,   118,   118,   118,   118,   118,   118,   118,   118,   118,
00726      118,   118,   118,   118,   118,   118,   118,   118,   118,   118,
00727      118,   119,   118,   118,   118,   118,   118,   118,   118,   118,
00728      118,   118,   118,   118,   118,   118,   120,   120,   121,   121,
00729      122,   122,   123,   123,   125,   126,   124,   127,   127,   128,
00730      128,   128,   128,   128,   128,   128,   128,   128,   128,   128,
00731      128,   128,   128,   128,   128,   128,   128,   128,   128,   128,
00732      128,   128,   128,   128,   128,   128,   128,   128,   129,   129,
00733      130,   130,   131,   132,   132,   132,   133,   133,   133,   134,
00734      135,   136,   135,   135,   135,   135,   135,   135,   137,   138,
00735      135,   135,   135,   135,   139,   139,   139,   139,   139,   140,
00736      140,   141,   141,   141,   142,   143,   144,   145,   145,   146,
00737      146,   147,   147,   148,   148,   148,   148,   150,   151,   149,
00738      149,   152,   152,   152,   153,   153,   154,   154,   155,   155,
00739      155,   155,   155,   155,   155,   155,   155,   155,   155,   155,
00740      155,   155,   155,   155,   156,   156,   156,   156,   156,   156,
00741      156,   156,   156,   156,   156,   156,   156,   156,   156,   156,
00742      156,   156,   156,   157,   157,   158,   159,   159,   160,   160,
00743      161,   161,   162,   162,   163,   165,   164,   167,   166,   168,
00744      169
00745 };
00746 
00747 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN.  */
00748 static const unsigned char yyr2[] =
00749 {
00750        0,     2,     2,     0,     3,     2,     0,     3,     2,     2,
00751        2,     2,     2,     3,     3,     3,     3,     3,     3,     3,
00752        3,     3,     3,     3,     3,     3,     5,     3,     4,     3,
00753        4,     0,     6,     3,     3,     3,     4,     4,     3,     3,
00754        1,     5,     1,     1,     1,     1,     3,     1,     1,     0,
00755        1,     0,     3,     1,     0,     0,     5,     1,     3,     1,
00756        1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
00757        1,     1,     1,     1,     6,     4,     4,     4,     4,     5,
00758        1,     3,     3,     2,     4,     3,     1,     1,     3,     1,
00759        2,     0,     5,     1,     2,     0,     3,     3,     1,     4,
00760        3,     0,     5,     7,     7,     7,     9,     7,     0,     0,
00761        8,     6,     2,     1,     4,     4,     4,     1,     1,     5,
00762        0,     3,     3,     4,     3,     3,     1,     5,     3,     4,
00763        1,     2,     0,     0,     1,     1,     1,     0,     0,     3,
00764        0,     3,     4,     1,     1,     0,     2,     1,     3,     1,
00765        1,     3,     3,     3,     3,     3,     3,     3,     3,     1,
00766        1,     1,     3,     1,     3,     3,     3,     3,     5,     7,
00767        5,     2,     2,     2,     2,     3,     3,     3,     7,     7,
00768        2,     1,     1,     2,     0,     4,     2,     0,     4,     3,
00769        6,     8,     3,     1,     1,     0,     2,     0,     2,     1,
00770        1
00771 };
00772 
00773 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
00774    STATE-NUM when YYTABLE doesn't specify something else to do.  Zero
00775    means the default is an error.  */
00776 static const unsigned char yydefact[] =
00777 {
00778        6,     3,     0,   184,     0,     1,   117,   118,     0,     0,
00779        0,   195,   197,     0,   195,   195,     0,     0,   195,   195,
00780        5,   113,     0,     2,    43,     0,    42,     0,     0,    45,
00781        0,     0,    54,     0,     0,     0,     0,     0,     0,     4,
00782       44,    53,    40,     0,     0,     0,   132,     0,     0,     0,
00783      101,     0,   132,   108,     0,   195,   197,   132,     0,   184,
00784      112,     0,     0,     0,     0,     0,     0,     0,     0,     0,
00785        0,     0,     0,     0,   184,   181,     0,   182,   183,     0,
00786       95,     0,   126,     0,     0,    12,    11,     0,     9,     8,
00787       10,     0,    47,     0,     0,     0,     0,     0,     0,     0,
00788        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
00789        0,     0,     0,     0,    49,     0,     0,     0,     0,     0,
00790        0,     0,   133,   199,   196,     0,   122,   198,     6,   121,
00791      133,     0,   100,     0,     0,   133,     0,     0,     0,     0,
00792      173,   194,   132,     0,     0,     0,     0,     0,   132,   172,
00793        0,   174,     0,     0,     0,   180,   171,     0,     0,    93,
00794       98,   125,     0,     0,    55,     0,     0,     0,    35,     7,
00795       27,     0,    19,    18,    22,    24,    21,    20,    25,    23,
00796       34,    33,    13,    14,    15,    16,    17,    29,     0,    48,
00797        0,    39,    38,    52,   114,   115,   116,    70,    73,    59,
00798       61,    62,    63,     0,     0,    86,     0,   200,    60,    65,
00799       80,    71,    67,    69,     0,     0,    66,    72,     0,    64,
00800       68,     0,     0,   131,    87,   135,   136,   134,   137,    89,
00801      130,   145,     0,   137,    91,     0,   123,   137,   145,   124,
00802      176,   165,   133,   177,    49,   167,     0,     0,     0,   133,
00803      166,   175,   187,   164,     0,   128,     0,    94,    36,     0,
00804        0,    30,    31,    46,     0,    28,    37,     0,    95,     0,
00805       83,     0,    91,     0,     0,     0,     0,     0,   145,     0,
00806        0,    91,     0,   161,     0,   149,   150,     0,     0,     0,
00807        0,     0,     0,     0,   159,   163,   160,     0,   144,   147,
00808      102,   145,     0,     0,   145,   120,   137,     0,     0,     0,
00809      193,     0,   137,     0,   145,     0,    97,    96,    41,    56,
00810        0,    26,    57,    51,     0,    85,    81,     0,     0,     0,
00811        0,     0,    82,     0,    49,   143,   138,    88,     0,     0,
00812        0,     0,     0,     0,     0,     0,     0,     0,     0,   111,
00813      146,     0,     0,     0,    90,    51,     0,     0,     0,   145,
00814      185,     0,     0,     0,   168,   145,     0,     0,   170,   186,
00815       99,   127,    32,    50,     0,    84,    77,    75,    76,     0,
00816       78,   104,    48,     0,   139,   129,   153,   162,   148,   151,
00817      152,   154,   155,   156,   157,   158,   103,     0,   109,     0,
00818      105,     0,   107,     0,   190,   192,     0,     0,     0,     0,
00819      184,    58,    79,     0,     0,   141,   145,   110,     0,    91,
00820      179,     0,   169,   178,   184,   189,    74,   142,     0,   106,
00821        0,   191,   188,    92,   119
00822 };
00823 
00824 /* YYDEFGOTO[NTERM-NUM]. */
00825 static const short yydefgoto[] =
00826 {
00827       -1,     2,     4,     3,    92,   320,   189,   190,   374,    40,
00828       41,    87,   260,   323,   229,   230,   302,   354,   158,   159,
00829      160,    20,   128,   131,   417,    77,   358,    22,    60,    42,
00830       81,    82,   231,   122,   228,   278,   279,   384,   336,   297,
00831      298,   299,    78,    23,   145,   313,   369,    79,   309,   142,
00832       46,    47,    48,    49,   124,   224
00833 };
00834 
00835 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
00836    STATE-NUM.  */
00837 #define YYPACT_NINF -261
00838 static const short yypact[] =
00839 {
00840      -64,  -261,    58,   683,   527,  -261,  -261,  -261,   -27,    17,
00841       27,  -261,  -261,   -24,  -261,  -261,    64,   121,   113,  -261,
00842     -261,  -261,    44,   478,  -261,    50,  -261,   527,   527,  -261,
00843      527,   527,  -261,   527,   527,   527,   128,   527,   527,  1008,
00844      103,  -261,  -261,   527,   155,   163,   117,   165,   -43,   165,
00845     -261,    50,   117,  -261,    93,  -261,  -261,   117,   129,  -261,
00846     -261,   527,   527,    99,   184,   527,   185,   111,   115,   184,
00847      107,   527,   491,   527,  -261,  -261,   343,  -261,  -261,   478,
00848      192,    44,  -261,   805,   745,    42,    42,   181,    42,    42,
00849       42,     6,  1008,   -44,   834,   527,   527,   527,   527,   527,
00850      527,   527,   527,   527,   527,   527,   527,   527,   527,   527,
00851      527,   527,   194,   527,   527,   195,   197,   131,   863,   123,
00852      127,   628,     7,  -261,  -261,   628,  -261,  -261,  -261,  -261,
00853        7,   130,  -261,   234,    50,     7,   628,   182,   658,   -60,
00854     -261,  -261,   117,   687,   135,   132,    10,   527,   117,  -261,
00855      -37,  -261,   716,   775,   367,  -261,  -261,   159,   138,   -35,
00856     -261,  -261,   527,   185,  -261,   527,   166,   527,  -261,  -261,
00857     1008,   892,  1057,  1080,  1103,  1103,  1103,  1103,  1103,  1103,
00858      619,   619,   224,   224,    42,    42,    42,  -261,   -25,   167,
00859      141,  -261,  -261,  -261,  -261,  -261,  -261,  -261,  -261,  -261,
00860     -261,  -261,  -261,   144,   149,   215,    50,  -261,  -261,  -261,
00861      217,  -261,  -261,  -261,   150,    78,  -261,  -261,   157,  -261,
00862     -261,   152,   222,  -261,  -261,  -261,  -261,  -261,   243,  -261,
00863      -29,   101,   242,   243,  -261,   154,  -261,   243,   101,  -261,
00864     -261,  -261,     7,  -261,   527,  -261,   171,   184,   921,     7,
00865     -261,  -261,  -261,  -261,   628,   186,   192,   192,  1033,   162,
00866      170,  1008,  -261,  1008,   527,  -261,  -261,   244,   192,   628,
00867     -261,   628,  -261,   628,   527,   628,   628,   628,   101,   514,
00868      628,  -261,   206,   209,   210,  -261,  -261,   214,   219,   221,
00869      223,   245,   263,   264,  -261,  -261,  -261,   164,   101,  -261,
00870     -261,   101,   -22,   244,   101,   235,   243,   218,   527,   -21,
00871     -261,   478,   243,    -2,   101,   628,  -261,  -261,  -261,  -261,
00872       44,  1033,  -261,   267,   240,  -261,  -261,    14,   -20,   -63,
00873        3,   -42,  -261,   212,   527,  1008,  -261,  -261,    18,   527,
00874      527,   527,   527,   527,   527,   527,   527,   527,   527,  -261,
00875     -261,   236,   266,   238,  -261,   267,   246,   271,   247,   101,
00876     -261,   950,   184,   260,   334,   101,   527,   274,  -261,  -261,
00877     -261,  -261,  -261,   329,   250,  -261,  -261,  -261,  -261,   321,
00878     -261,  -261,   284,   253,  -261,  -261,  1008,  1008,  1008,  1008,
00879     1008,  1008,  1008,  1008,  1008,  1008,  -261,   628,  -261,   255,
00880     -261,   257,  -261,   256,  -261,  -261,   527,   478,   258,    -7,
00881     -261,  -261,  -261,   628,    15,  -261,   101,  -261,   259,  -261,
00882     -261,   979,  -261,  -261,  -261,   478,  -261,  -261,   261,  -261,
00883       20,  -261,   478,  -261,  -261
00884 };
00885 
00886 /* YYPGOTO[NTERM-NUM].  */
00887 static const short yypgoto[] =
00888 {
00889     -261,  -261,  -261,   252,    -4,  -261,   -34,  -211,    30,  -261,
00890      265,  -261,  -261,    83,  -115,   -71,  -260,  -261,   119,  -261,
00891      -48,  -261,  -261,  -261,  -261,     4,  -261,  -261,   -76,  -261,
00892     -261,   -26,   254,   -17,  -121,  -170,  -261,  -261,  -261,  -230,
00893     -261,    91,   -77,   -58,   228,  -261,  -261,  -261,  -261,   -65,
00894      126,  -261,   337,  -261,   345,  -261
00895 };
00896 
00897 /* YYTABLE[YYPACT[STATE-NUM]].  What to do in state STATE-NUM.  If
00898    positive, shift that token.  If negative, reduce the rule which
00899    number is the opposite.  If zero, do what YYDEFACT says.
00900    If YYTABLE_NINF, syntax error.  */
00901 #define YYTABLE_NINF -141
00902 static const short yytable[] =
00903 {
00904       39,   137,   156,    93,   148,   161,   223,    21,   305,   233,
00905      352,   225,   327,   366,   237,     1,   154,   167,   367,    76,
00906      167,   338,   126,    83,    84,   129,    85,    86,   139,    88,
00907       89,    90,    24,   307,    94,   130,   167,   150,   280,   118,
00908      135,   125,   246,   167,    25,   256,   352,    26,   333,   378,
00909      352,   280,   352,   241,    27,   167,   226,   138,     5,   362,
00910      280,   143,   168,   301,    80,   166,    28,   304,   152,   153,
00911      380,   351,    29,   167,   356,    76,   250,   424,   257,   188,
00912       43,   265,   281,   280,   370,   363,   377,    50,   165,   227,
00913      353,   170,   171,   172,   173,   174,   175,   176,   177,   178,
00914      179,   180,   181,   182,   183,   184,   185,   186,   236,   379,
00915      368,    30,    31,    80,    32,   247,    33,    34,    35,    36,
00916       37,   306,    38,   383,    44,   242,   376,   427,   312,   403,
00917      385,   249,   434,    76,    45,   408,   359,    55,    56,   314,
00918       51,    52,   365,   248,    57,    58,   112,   113,    53,   114,
00919       76,   115,   116,    54,   325,    59,   326,    80,   258,   430,
00920       91,   261,   332,   263,   282,   337,   283,   284,   285,   286,
00921      287,   288,   289,   290,   291,   292,   293,   294,   295,   296,
00922      270,   133,   310,   273,   117,    61,   428,   119,    62,   274,
00923        6,     7,     8,     9,    10,   120,    63,   123,    64,    24,
00924      371,   121,   328,    65,   330,   331,   132,    66,   316,   317,
00925       67,    25,   140,   136,    26,    68,   141,   144,   146,    69,
00926      149,    27,   147,    70,   157,   164,   187,   191,    71,   192,
00927       32,   195,    72,    28,   364,   196,    21,    73,   235,    29,
00928      329,   234,   244,   254,   372,   245,   255,   167,   262,   266,
00929        6,     7,     8,     9,    10,   267,   268,   269,    11,   271,
00930      321,   272,   275,   276,   277,   303,   308,    12,    13,   319,
00931      315,    14,    15,    16,   318,   335,   322,   349,    30,    31,
00932       17,    32,   416,    33,    34,    35,    36,    37,   339,    38,
00933       18,   340,   341,    74,   239,    75,   342,   405,   426,   357,
00934      382,   343,    19,   344,   361,   345,  -140,    76,  -140,  -140,
00935     -140,  -140,  -140,  -140,  -140,  -140,  -140,  -140,  -140,  -140,
00936     -140,  -140,   109,   110,   111,   381,   360,   346,   112,   113,
00937      422,   114,   409,   115,   116,   386,   387,   388,   389,   390,
00938      391,   392,   393,   394,   395,   347,   348,   373,   375,   396,
00939      397,   398,   425,   401,   300,   406,  -140,   407,   410,   400,
00940      402,   411,   412,   413,   414,   415,   432,   418,   419,   420,
00941       61,   423,   429,    62,   433,     6,     7,     8,     9,    10,
00942      232,    63,   193,    64,    24,   399,   355,   324,    65,   350,
00943      238,   259,    66,   134,   127,    67,    25,     0,     0,    26,
00944       68,     0,   421,    76,    69,     0,    27,     0,    70,     0,
00945      263,     0,     0,    71,     0,     0,     0,    72,    28,     0,
00946        0,    76,    73,     0,    29,    95,    96,     0,    76,    97,
00947       98,    99,   100,   101,   102,   103,   104,   105,   106,   107,
00948      108,   109,   110,   111,     0,     0,     0,   112,   113,     0,
00949      114,     0,   115,   116,     0,     0,   155,     0,     0,     0,
00950        0,     0,     0,    30,    31,     0,    32,     0,    33,    34,
00951       35,    36,    37,     0,    38,     0,     0,     0,    74,   253,
00952       75,    61,     0,     0,    62,     0,     6,     7,     8,     9,
00953       10,     0,    63,     0,    64,    24,     0,     0,     0,    65,
00954        0,     0,     0,    66,     0,     0,    67,    25,    24,     0,
00955       26,    68,     0,     0,     0,    69,     0,    27,     0,    70,
00956       25,     0,     0,    26,    71,     0,     0,     0,    72,    28,
00957       27,    24,     0,    73,     0,    29,     0,     0,     0,     0,
00958        0,     0,    28,    25,    24,     0,    26,     0,    29,     0,
00959        0,     0,     0,    27,     0,     0,    25,     0,     0,    26,
00960        0,     0,     0,     0,     0,    28,    27,     0,     0,     0,
00961        0,    29,     0,     0,    30,    31,     0,    32,    28,    33,
00962       34,    35,    36,    37,    29,    38,     0,    30,    31,    74,
00963       32,    75,    33,    34,    35,    36,    37,     0,    38,     0,
00964        0,     0,     0,     0,   151,     0,     0,     0,     0,     0,
00965       30,    31,     0,    32,     0,    33,    34,    35,    36,    37,
00966        0,    38,     0,    30,    31,   334,    32,     0,    33,    34,
00967       35,    36,    37,   197,    38,   198,     0,     0,     0,     0,
00968        0,   199,     0,     0,     0,     0,   200,   201,     0,     0,
00969      202,     0,   203,   204,     0,   205,     0,   206,     0,     0,
00970      207,     0,   208,   209,   210,     0,     0,     0,   211,     0,
00971        0,   212,     0,   213,     0,   214,     0,     0,     0,     0,
00972      215,   216,   217,     0,   218,     0,   219,   220,     0,   221,
00973      222,     6,     7,     8,     9,    10,     0,     0,     0,    11,
00974        0,     0,     0,     0,     0,     0,     0,     0,    12,    13,
00975        0,     0,    14,    15,    16,   107,   108,   109,   110,   111,
00976        0,    17,     0,   112,   113,     0,   114,     0,   115,   116,
00977        0,    18,     0,     0,     0,     0,     0,     0,     0,     0,
00978       95,    96,     0,    19,    97,    98,    99,   100,   101,   102,
00979      103,   104,   105,   106,   107,   108,   109,   110,   111,     0,
00980        0,     0,   112,   113,     0,   114,     0,   115,   116,    95,
00981       96,   240,     0,    97,    98,    99,   100,   101,   102,   103,
00982      104,   105,   106,   107,   108,   109,   110,   111,     0,     0,
00983        0,   112,   113,     0,   114,     0,   115,   116,    95,    96,
00984      243,     0,    97,    98,    99,   100,   101,   102,   103,   104,
00985      105,   106,   107,   108,   109,   110,   111,     0,     0,     0,
00986      112,   113,     0,   114,     0,   115,   116,    95,    96,   251,
00987        0,    97,    98,    99,   100,   101,   102,   103,   104,   105,
00988      106,   107,   108,   109,   110,   111,     0,     0,     0,   112,
00989      113,     0,   114,     0,   115,   116,   163,    95,    96,     0,
00990        0,    97,    98,    99,   100,   101,   102,   103,   104,   105,
00991      106,   107,   108,   109,   110,   111,     0,     0,     0,   112,
00992      113,     0,   114,     0,   115,   116,   252,    95,    96,     0,
00993      162,    97,    98,    99,   100,   101,   102,   103,   104,   105,
00994      106,   107,   108,   109,   110,   111,     0,     0,     0,   112,
00995      113,     0,   114,     0,   115,   116,    95,    96,     0,     0,
00996       97,    98,    99,   100,   101,   102,   103,   104,   105,   106,
00997      107,   108,   109,   110,   111,     0,     0,     0,   112,   113,
00998        0,   114,   169,   115,   116,    95,    96,     0,     0,    97,
00999       98,    99,   100,   101,   102,   103,   104,   105,   106,   107,
01000      108,   109,   110,   111,     0,     0,     0,   112,   113,     0,
01001      114,   194,   115,   116,    95,    96,   264,     0,    97,    98,
01002       99,   100,   101,   102,   103,   104,   105,   106,   107,   108,
01003      109,   110,   111,     0,     0,     0,   112,   113,     0,   114,
01004        0,   115,   116,    95,    96,     0,     0,    97,    98,    99,
01005      100,   101,   102,   103,   104,   105,   106,   107,   108,   109,
01006      110,   111,     0,     0,     0,   112,   113,     0,   114,   311,
01007      115,   116,    95,    96,     0,     0,    97,    98,    99,   100,
01008      101,   102,   103,   104,   105,   106,   107,   108,   109,   110,
01009      111,     0,     0,     0,   112,   113,     0,   114,   404,   115,
01010      116,    95,    96,     0,     0,    97,    98,    99,   100,   101,
01011      102,   103,   104,   105,   106,   107,   108,   109,   110,   111,
01012        0,     0,     0,   112,   113,     0,   114,   431,   115,   116,
01013       95,    96,     0,     0,    97,    98,    99,   100,   101,   102,
01014      103,   104,   105,   106,   107,   108,   109,   110,   111,     0,
01015        0,     0,   112,   113,     0,   114,    96,   115,   116,    97,
01016       98,    99,   100,   101,   102,   103,   104,   105,   106,   107,
01017      108,   109,   110,   111,     0,     0,     0,   112,   113,     0,
01018      114,     0,   115,   116,    98,    99,   100,   101,   102,   103,
01019      104,   105,   106,   107,   108,   109,   110,   111,     0,     0,
01020        0,   112,   113,     0,   114,     0,   115,   116,    99,   100,
01021      101,   102,   103,   104,   105,   106,   107,   108,   109,   110,
01022      111,     0,     0,     0,   112,   113,     0,   114,     0,   115,
01023      116,  -141,  -141,  -141,  -141,  -141,  -141,   105,   106,   107,
01024      108,   109,   110,   111,     0,     0,     0,   112,   113,     0,
01025      114,     0,   115,   116
01026 };
01027 
01028 static const short yycheck[] =
01029 {
01030        4,    59,    79,    37,    69,    81,   121,     3,   238,   130,
01031       32,     4,   272,    15,   135,    79,    74,    80,    20,    23,
01032       80,   281,    48,    27,    28,    51,    30,    31,    62,    33,
01033       34,    35,    17,   244,    38,    52,    80,    71,    80,    43,
01034       57,    84,    32,    80,    29,    80,    32,    32,   278,   112,
01035       32,    80,    32,   113,    39,    80,    49,    61,     0,    80,
01036       80,    65,   106,   233,   107,    91,    51,   237,    72,    73,
01037      112,   301,    57,    80,   304,    79,   113,    84,   113,   113,
01038      107,   106,   111,    80,   314,   106,   106,   111,    82,    82,
01039      112,    95,    96,    97,    98,    99,   100,   101,   102,   103,
01040      104,   105,   106,   107,   108,   109,   110,   111,   134,   106,
01041      112,    96,    97,   107,    99,   105,   101,   102,   103,   104,
01042      105,   242,   107,   334,   107,   142,   112,   112,   249,   359,
01043      112,   148,   112,   137,   107,   365,   306,    24,    25,   254,
01044       14,    15,   312,   147,    18,    19,   104,   105,    84,   107,
01045      154,   109,   110,    32,   269,   111,   271,   107,   162,   419,
01046       32,   165,   277,   167,    63,   280,    65,    66,    67,    68,
01047       69,    70,    71,    72,    73,    74,    75,    76,    77,    78,
01048      206,    55,   247,   105,    81,     3,   416,    32,     6,   111,
01049        8,     9,    10,    11,    12,    32,    14,    32,    16,    17,
01050      315,    84,   273,    21,   275,   276,   113,    25,   256,   257,
01051       28,    29,   113,    84,    32,    33,    32,    32,   107,    37,
01052      113,    39,   107,    41,    32,    44,    32,    32,    46,    32,
01053       99,   108,    50,    51,   311,   108,   232,    55,     4,    57,
01054      274,   111,   107,    84,   320,   113,   108,    80,    82,   108,
01055        8,     9,    10,    11,    12,   111,   107,    42,    16,    42,
01056      264,   111,   105,   111,    42,   111,    95,    25,    26,    99,
01057       84,    29,    30,    31,   112,   279,    32,   113,    96,    97,
01058       38,    99,   397,   101,   102,   103,   104,   105,    82,   107,
01059       48,    82,    82,   111,   112,   113,    82,   362,   413,    64,
01060      334,    82,    60,    82,   308,    82,    63,   311,    65,    66,
01061       67,    68,    69,    70,    71,    72,    73,    74,    75,    76,
01062       77,    78,    98,    99,   100,   113,   108,    82,   104,   105,
01063      407,   107,   366,   109,   110,   339,   340,   341,   342,   343,
01064      344,   345,   346,   347,   348,    82,    82,    80,   108,   113,
01065       84,   113,   410,    82,   112,    95,   113,    23,    84,   113,
01066      113,    32,   112,    42,    80,   112,   424,   112,   111,   113,
01067        3,   113,   113,     6,   113,     8,     9,    10,    11,    12,
01068      128,    14,   117,    16,    17,   355,   303,   268,    21,   298,
01069      136,   163,    25,    56,    49,    28,    29,    -1,    -1,    32,
01070       33,    -1,   406,   407,    37,    -1,    39,    -1,    41,    -1,
01071      414,    -1,    -1,    46,    -1,    -1,    -1,    50,    51,    -1,
01072       -1,   425,    55,    -1,    57,    82,    83,    -1,   432,    86,
01073       87,    88,    89,    90,    91,    92,    93,    94,    95,    96,
01074       97,    98,    99,   100,    -1,    -1,    -1,   104,   105,    -1,
01075      107,    -1,   109,   110,    -1,    -1,   113,    -1,    -1,    -1,
01076       -1,    -1,    -1,    96,    97,    -1,    99,    -1,   101,   102,
01077      103,   104,   105,    -1,   107,    -1,    -1,    -1,   111,   112,
01078      113,     3,    -1,    -1,     6,    -1,     8,     9,    10,    11,
01079       12,    -1,    14,    -1,    16,    17,    -1,    -1,    -1,    21,
01080       -1,    -1,    -1,    25,    -1,    -1,    28,    29,    17,    -1,
01081       32,    33,    -1,    -1,    -1,    37,    -1,    39,    -1,    41,
01082       29,    -1,    -1,    32,    46,    -1,    -1,    -1,    50,    51,
01083       39,    17,    -1,    55,    -1,    57,    -1,    -1,    -1,    -1,
01084       -1,    -1,    51,    29,    17,    -1,    32,    -1,    57,    -1,
01085       -1,    -1,    -1,    39,    -1,    -1,    29,    -1,    -1,    32,
01086       -1,    -1,    -1,    -1,    -1,    51,    39,    -1,    -1,    -1,
01087       -1,    57,    -1,    -1,    96,    97,    -1,    99,    51,   101,
01088      102,   103,   104,   105,    57,   107,    -1,    96,    97,   111,
01089       99,   113,   101,   102,   103,   104,   105,    -1,   107,    -1,
01090       -1,    -1,    -1,    -1,   113,    -1,    -1,    -1,    -1,    -1,
01091       96,    97,    -1,    99,    -1,   101,   102,   103,   104,   105,
01092       -1,   107,    -1,    96,    97,   111,    99,    -1,   101,   102,
01093      103,   104,   105,     5,   107,     7,    -1,    -1,    -1,    -1,
01094       -1,    13,    -1,    -1,    -1,    -1,    18,    19,    -1,    -1,
01095       22,    -1,    24,    25,    -1,    27,    -1,    29,    -1,    -1,
01096       32,    -1,    34,    35,    36,    -1,    -1,    -1,    40,    -1,
01097       -1,    43,    -1,    45,    -1,    47,    -1,    -1,    -1,    -1,
01098       52,    53,    54,    -1,    56,    -1,    58,    59,    -1,    61,
01099       62,     8,     9,    10,    11,    12,    -1,    -1,    -1,    16,
01100       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    25,    26,
01101       -1,    -1,    29,    30,    31,    96,    97,    98,    99,   100,
01102       -1,    38,    -1,   104,   105,    -1,   107,    -1,   109,   110,
01103       -1,    48,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
01104       82,    83,    -1,    60,    86,    87,    88,    89,    90,    91,
01105       92,    93,    94,    95,    96,    97,    98,    99,   100,    -1,
01106       -1,    -1,   104,   105,    -1,   107,    -1,   109,   110,    82,
01107       83,   113,    -1,    86,    87,    88,    89,    90,    91,    92,
01108       93,    94,    95,    96,    97,    98,    99,   100,    -1,    -1,
01109       -1,   104,   105,    -1,   107,    -1,   109,   110,    82,    83,
01110      113,    -1,    86,    87,    88,    89,    90,    91,    92,    93,
01111       94,    95,    96,    97,    98,    99,   100,    -1,    -1,    -1,
01112      104,   105,    -1,   107,    -1,   109,   110,    82,    83,   113,
01113       -1,    86,    87,    88,    89,    90,    91,    92,    93,    94,
01114       95,    96,    97,    98,    99,   100,    -1,    -1,    -1,   104,
01115      105,    -1,   107,    -1,   109,   110,   111,    82,    83,    -1,
01116       -1,    86,    87,    88,    89,    90,    91,    92,    93,    94,
01117       95,    96,    97,    98,    99,   100,    -1,    -1,    -1,   104,
01118      105,    -1,   107,    -1,   109,   110,   111,    82,    83,    -1,
01119       85,    86,    87,    88,    89,    90,    91,    92,    93,    94,
01120       95,    96,    97,    98,    99,   100,    -1,    -1,    -1,   104,
01121      105,    -1,   107,    -1,   109,   110,    82,    83,    -1,    -1,
01122       86,    87,    88,    89,    90,    91,    92,    93,    94,    95,
01123       96,    97,    98,    99,   100,    -1,    -1,    -1,   104,   105,
01124       -1,   107,   108,   109,   110,    82,    83,    -1,    -1,    86,
01125       87,    88,    89,    90,    91,    92,    93,    94,    95,    96,
01126       97,    98,    99,   100,    -1,    -1,    -1,   104,   105,    -1,
01127      107,   108,   109,   110,    82,    83,    84,    -1,    86,    87,
01128       88,    89,    90,    91,    92,    93,    94,    95,    96,    97,
01129       98,    99,   100,    -1,    -1,    -1,   104,   105,    -1,   107,
01130       -1,   109,   110,    82,    83,    -1,    -1,    86,    87,    88,
01131       89,    90,    91,    92,    93,    94,    95,    96,    97,    98,
01132       99,   100,    -1,    -1,    -1,   104,   105,    -1,   107,   108,
01133      109,   110,    82,    83,    -1,    -1,    86,    87,    88,    89,
01134       90,    91,    92,    93,    94,    95,    96,    97,    98,    99,
01135      100,    -1,    -1,    -1,   104,   105,    -1,   107,   108,   109,
01136      110,    82,    83,    -1,    -1,    86,    87,    88,    89,    90,
01137       91,    92,    93,    94,    95,    96,    97,    98,    99,   100,
01138       -1,    -1,    -1,   104,   105,    -1,   107,   108,   109,   110,
01139       82,    83,    -1,    -1,    86,    87,    88,    89,    90,    91,
01140       92,    93,    94,    95,    96,    97,    98,    99,   100,    -1,
01141       -1,    -1,   104,   105,    -1,   107,    83,   109,   110,    86,
01142       87,    88,    89,    90,    91,    92,    93,    94,    95,    96,
01143       97,    98,    99,   100,    -1,    -1,    -1,   104,   105,    -1,
01144      107,    -1,   109,   110,    87,    88,    89,    90,    91,    92,
01145       93,    94,    95,    96,    97,    98,    99,   100,    -1,    -1,
01146       -1,   104,   105,    -1,   107,    -1,   109,   110,    88,    89,
01147       90,    91,    92,    93,    94,    95,    96,    97,    98,    99,
01148      100,    -1,    -1,    -1,   104,   105,    -1,   107,    -1,   109,
01149      110,    88,    89,    90,    91,    92,    93,    94,    95,    96,
01150       97,    98,    99,   100,    -1,    -1,    -1,   104,   105,    -1,
01151      107,    -1,   109,   110
01152 };
01153 
01154 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
01155    symbol of state STATE-NUM.  */
01156 static const unsigned char yystos[] =
01157 {
01158        0,    79,   115,   117,   116,     0,     8,     9,    10,    11,
01159       12,    16,    25,    26,    29,    30,    31,    38,    48,    60,
01160      135,   139,   141,   157,    17,    29,    32,    39,    51,    57,
01161       96,    97,    99,   101,   102,   103,   104,   105,   107,   118,
01162      123,   124,   143,   107,   107,   107,   164,   165,   166,   167,
01163      111,   164,   164,    84,    32,    24,    25,   164,   164,   111,
01164      142,     3,     6,    14,    16,    21,    25,    28,    33,    37,
01165       41,    46,    50,    55,   111,   113,   118,   139,   156,   161,
01166      107,   144,   145,   118,   118,   118,   118,   125,   118,   118,
01167      118,    32,   118,   120,   118,    82,    83,    86,    87,    88,
01168       89,    90,    91,    92,    93,    94,    95,    96,    97,    98,
01169       99,   100,   104,   105,   107,   109,   110,    81,   118,    32,
01170       32,    84,   147,    32,   168,    84,   145,   168,   136,   145,
01171      147,   137,   113,   164,   166,   147,    84,   157,   118,   120,
01172      113,    32,   163,   118,    32,   158,   107,   107,   163,   113,
01173      120,   113,   118,   118,   157,   113,   156,    32,   132,   133,
01174      134,   142,    85,   111,    44,    82,   145,    80,   106,   108,
01175      118,   118,   118,   118,   118,   118,   118,   118,   118,   118,
01176      118,   118,   118,   118,   118,   118,   118,    32,   120,   120,
01177      121,    32,    32,   124,   108,   108,   108,     5,     7,    13,
01178       18,    19,    22,    24,    25,    27,    29,    32,    34,    35,
01179       36,    40,    43,    45,    47,    52,    53,    54,    56,    58,
01180       59,    61,    62,   128,   169,     4,    49,    82,   148,   128,
01181      129,   146,   117,   148,   111,     4,   145,   148,   146,   112,
01182      113,   113,   147,   113,   107,   113,    32,   105,   118,   147,
01183      113,   113,   111,   112,    84,   108,    80,   113,   118,   158,
01184      126,   118,    82,   118,    84,   106,   108,   111,   107,    42,
01185      145,    42,   111,   105,   111,   105,   111,    42,   149,   150,
01186       80,   111,    63,    65,    66,    67,    68,    69,    70,    71,
01187       72,    73,    74,    75,    76,    77,    78,   153,   154,   155,
01188      112,   149,   130,   111,   149,   153,   148,   121,    95,   162,
01189      163,   108,   148,   159,   128,    84,   134,   134,   112,    99,
01190      119,   118,    32,   127,   132,   128,   128,   130,   129,   120,
01191      129,   129,   128,   153,   111,   118,   152,   128,   130,    82,
01192       82,    82,    82,    82,    82,    82,    82,    82,    82,   113,
01193      155,   153,    32,   112,   131,   127,   153,    64,   140,   149,
01194      108,   118,    80,   106,   156,   149,    15,    20,   112,   160,
01195      153,   128,   142,    80,   122,   108,   112,   106,   112,   106,
01196      112,   113,   120,   121,   151,   112,   118,   118,   118,   118,
01197      118,   118,   118,   118,   118,   118,   113,    84,   113,   122,
01198      113,    82,   113,   153,   108,   163,    95,    23,   153,   120,
01199       84,    32,   112,    42,    80,   112,   128,   138,   112,   111,
01200      113,   118,   156,   113,    84,   157,   128,   112,   153,   113,
01201      130,   108,   157,   113,   112
01202 };
01203 
01204 #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
01205 # define YYSIZE_T __SIZE_TYPE__
01206 #endif
01207 #if ! defined (YYSIZE_T) && defined (size_t)
01208 # define YYSIZE_T size_t
01209 #endif
01210 #if ! defined (YYSIZE_T)
01211 # if defined (__STDC__) || defined (__cplusplus)
01212 #  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
01213 #  define YYSIZE_T size_t
01214 # endif
01215 #endif
01216 #if ! defined (YYSIZE_T)
01217 # define YYSIZE_T unsigned int
01218 #endif
01219 
01220 #define yyerrok         (yyerrstatus = 0)
01221 #define yyclearin       (yychar = YYEMPTY)
01222 #define YYEMPTY         (-2)
01223 #define YYEOF           0
01224 
01225 #define YYACCEPT        goto yyacceptlab
01226 #define YYABORT         goto yyabortlab
01227 #define YYERROR         goto yyerrorlab
01228 
01229 
01230 /* Like YYERROR except do call yyerror.  This remains here temporarily
01231    to ease the transition to the new meaning of YYERROR, for GCC.
01232    Once GCC version 2 has supplanted version 1, this can go.  */
01233 
01234 #define YYFAIL          goto yyerrlab
01235 
01236 #define YYRECOVERING()  (!!yyerrstatus)
01237 
01238 #define YYBACKUP(Token, Value)                                  \
01239 do                                                              \
01240   if (yychar == YYEMPTY && yylen == 1)                          \
01241     {                                                           \
01242       yychar = (Token);                                         \
01243       yylval = (Value);                                         \
01244       yytoken = YYTRANSLATE (yychar);                           \
01245       YYPOPSTACK;                                               \
01246       goto yybackup;                                            \
01247     }                                                           \
01248   else                                                          \
01249     {                                                           \
01250       yyerror ("syntax error: cannot back up");\
01251       YYERROR;                                                  \
01252     }                                                           \
01253 while (0)
01254 
01255 #define YYTERROR        1
01256 #define YYERRCODE       256
01257 
01258 /* YYLLOC_DEFAULT -- Compute the default location (before the actions
01259    are run).  */
01260 
01261 #ifndef YYLLOC_DEFAULT
01262 # define YYLLOC_DEFAULT(Current, Rhs, N)                \
01263    ((Current).first_line   = (Rhs)[1].first_line,       \
01264     (Current).first_column = (Rhs)[1].first_column,     \
01265     (Current).last_line    = (Rhs)[N].last_line,        \
01266     (Current).last_column  = (Rhs)[N].last_column)
01267 #endif
01268 
01269 /* YYLEX -- calling `brolex' with the right arguments.  */
01270 
01271 #ifdef YYLEX_PARAM
01272 # define YYLEX brolex (YYLEX_PARAM)
01273 #else
01274 # define YYLEX brolex ()
01275 #endif
01276 
01277 /* Enable debugging if requested.  */
01278 #if YYDEBUG
01279 
01280 # ifndef YYFPRINTF
01281 #  include <stdio.h> /* INFRINGES ON USER NAME SPACE */
01282 #  define YYFPRINTF fprintf
01283 # endif
01284 
01285 # define YYDPRINTF(Args)                        \
01286 do {                                            \
01287   if (yydebug)                                  \
01288     YYFPRINTF Args;                             \
01289 } while (0)
01290 
01291 # define YYDSYMPRINT(Args)                      \
01292 do {                                            \
01293   if (yydebug)                                  \
01294     yysymprint Args;                            \
01295 } while (0)
01296 
01297 # define YYDSYMPRINTF(Title, Token, Value, Location)            \
01298 do {                                                            \
01299   if (yydebug)                                                  \
01300     {                                                           \
01301       YYFPRINTF (stderr, "%s ", Title);                         \
01302       yysymprint (stderr,                                       \
01303                   Token, Value, Location);      \
01304       YYFPRINTF (stderr, "\n");                                 \
01305     }                                                           \
01306 } while (0)
01307 
01308 /*------------------------------------------------------------------.
01309 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
01310 | TOP (included).                                                   |
01311 `------------------------------------------------------------------*/
01312 
01313 #if defined (__STDC__) || defined (__cplusplus)
01314 static void
01315 yy_stack_print (short *bottom, short *top)
01316 #else
01317 static void
01318 yy_stack_print (bottom, top)
01319     short *bottom;
01320     short *top;
01321 #endif
01322 {
01323   YYFPRINTF (stderr, "Stack now");
01324   for (/* Nothing. */; bottom <= top; ++bottom)
01325     YYFPRINTF (stderr, " %d", *bottom);
01326   YYFPRINTF (stderr, "\n");
01327 }
01328 
01329 # define YY_STACK_PRINT(Bottom, Top)                            \
01330 do {                                                            \
01331   if (yydebug)                                                  \
01332     yy_stack_print ((Bottom), (Top));                           \
01333 } while (0)
01334 
01335 
01336 /*------------------------------------------------.
01337 | Report that the YYRULE is going to be reduced.  |
01338 `------------------------------------------------*/
01339 
01340 #if defined (__STDC__) || defined (__cplusplus)
01341 static void
01342 yy_reduce_print (int yyrule)
01343 #else
01344 static void
01345 yy_reduce_print (yyrule)
01346     int yyrule;
01347 #endif
01348 {
01349   int yyi;
01350   unsigned int yylno = yyrline[yyrule];
01351   YYFPRINTF (stderr, "Reducing stack by rule %d (line %u), ",
01352              yyrule - 1, yylno);
01353   /* Print the symbols being reduced, and their result.  */
01354   for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++)
01355     YYFPRINTF (stderr, "%s ", yytname [yyrhs[yyi]]);
01356   YYFPRINTF (stderr, "-> %s\n", yytname [yyr1[yyrule]]);
01357 }
01358 
01359 # define YY_REDUCE_PRINT(Rule)          \
01360 do {                                    \
01361   if (yydebug)                          \
01362     yy_reduce_print (Rule);             \
01363 } while (0)
01364 
01365 /* Nonzero means print parse trace.  It is left uninitialized so that
01366    multiple parsers can coexist.  */
01367 int yydebug;
01368 #else /* !YYDEBUG */
01369 # define YYDPRINTF(Args)
01370 # define YYDSYMPRINT(Args)
01371 # define YYDSYMPRINTF(Title, Token, Value, Location)
01372 # define YY_STACK_PRINT(Bottom, Top)
01373 # define YY_REDUCE_PRINT(Rule)
01374 #endif /* !YYDEBUG */
01375 
01376 
01377 /* YYINITDEPTH -- initial size of the parser's stacks.  */
01378 #ifndef YYINITDEPTH
01379 # define YYINITDEPTH 200
01380 #endif
01381 
01382 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
01383    if the built-in stack extension method is used).
01384 
01385    Do not make this value too large; the results are undefined if
01386    SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH)
01387    evaluated with infinite-precision integer arithmetic.  */
01388 
01389 #if defined (YYMAXDEPTH) && YYMAXDEPTH == 0
01390 # undef YYMAXDEPTH
01391 #endif
01392 
01393 #ifndef YYMAXDEPTH
01394 # define YYMAXDEPTH 10000
01395 #endif
01396 
01397 
01398 
01399 #if YYERROR_VERBOSE
01400 
01401 # ifndef yystrlen
01402 #  if defined (__GLIBC__) && defined (_STRING_H)
01403 #   define yystrlen strlen
01404 #  else
01405 /* Return the length of YYSTR.  */
01406 static YYSIZE_T
01407 #   if defined (__STDC__) || defined (__cplusplus)
01408 yystrlen (const char *yystr)
01409 #   else
01410 yystrlen (yystr)
01411      const char *yystr;
01412 #   endif
01413 {
01414   register const char *yys = yystr;
01415 
01416   while (*yys++ != '\0')
01417     continue;
01418 
01419   return yys - yystr - 1;
01420 }
01421 #  endif
01422 # endif
01423 
01424 # ifndef yystpcpy
01425 #  if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
01426 #   define yystpcpy stpcpy
01427 #  else
01428 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
01429    YYDEST.  */
01430 static char *
01431 #   if defined (__STDC__) || defined (__cplusplus)
01432 yystpcpy (char *yydest, const char *yysrc)
01433 #   else
01434 yystpcpy (yydest, yysrc)
01435      char *yydest;
01436      const char *yysrc;
01437 #   endif
01438 {
01439   register char *yyd = yydest;
01440   register const char *yys = yysrc;
01441 
01442   while ((*yyd++ = *yys++) != '\0')
01443     continue;
01444 
01445   return yyd - 1;
01446 }
01447 #  endif
01448 # endif
01449 
01450 #endif /* !YYERROR_VERBOSE */
01451 
01452 
01453 
01454 #if YYDEBUG
01455 /*--------------------------------.
01456 | Print this symbol on YYOUTPUT.  |
01457 `--------------------------------*/
01458 
01459 #if defined (__STDC__) || defined (__cplusplus)
01460 static void
01461 yysymprint (FILE *yyoutput, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp)
01462 #else
01463 static void
01464 yysymprint (yyoutput, yytype, yyvaluep, yylocationp)
01465     FILE *yyoutput;
01466     int yytype;
01467     YYSTYPE *yyvaluep;
01468     YYLTYPE *yylocationp;
01469 #endif
01470 {
01471   /* Pacify ``unused variable'' warnings.  */
01472   (void) yyvaluep;
01473   (void) yylocationp;
01474 
01475   if (yytype < YYNTOKENS)
01476     {
01477       YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
01478 # ifdef YYPRINT
01479       YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
01480 # endif
01481     }
01482   else
01483     YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
01484 
01485   switch (yytype)
01486     {
01487       default:
01488         break;
01489     }
01490   YYFPRINTF (yyoutput, ")");
01491 }
01492 
01493 #endif /* ! YYDEBUG */
01494 /*-----------------------------------------------.
01495 | Release the memory associated to this symbol.  |
01496 `-----------------------------------------------*/
01497 
01498 #if defined (__STDC__) || defined (__cplusplus)
01499 static void
01500 yydestruct (int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp)
01501 #else
01502 static void
01503 yydestruct (yytype, yyvaluep, yylocationp)
01504     int yytype;
01505     YYSTYPE *yyvaluep;
01506     YYLTYPE *yylocationp;
01507 #endif
01508 {
01509   /* Pacify ``unused variable'' warnings.  */
01510   (void) yyvaluep;
01511   (void) yylocationp;
01512 
01513   switch (yytype)
01514     {
01515 
01516       default:
01517         break;
01518     }
01519 }
01520 
01521 
01522 /* Prevent warnings from -Wmissing-prototypes.  */
01523 
01524 #ifdef YYPARSE_PARAM
01525 # if defined (__STDC__) || defined (__cplusplus)
01526 int yyparse (void *YYPARSE_PARAM);
01527 # else
01528 int yyparse ();
01529 # endif
01530 #else /* ! YYPARSE_PARAM */
01531 #if defined (__STDC__) || defined (__cplusplus)
01532 int yyparse (void);
01533 #else
01534 int yyparse ();
01535 #endif
01536 #endif /* ! YYPARSE_PARAM */
01537 
01538 
01539 
01540 /* The lookahead symbol.  */
01541 int yychar;
01542 
01543 /* The semantic value of the lookahead symbol.  */
01544 YYSTYPE yylval;
01545 
01546 /* Number of syntax errors so far.  */
01547 int yynerrs;
01548 /* Location data for the lookahead symbol.  */
01549 YYLTYPE yylloc;
01550 
01551 
01552 
01553 /*----------.
01554 | yyparse.  |
01555 `----------*/
01556 
01557 #ifdef YYPARSE_PARAM
01558 # if defined (__STDC__) || defined (__cplusplus)
01559 int yyparse (void *YYPARSE_PARAM)
01560 # else
01561 int yyparse (YYPARSE_PARAM)
01562   void *YYPARSE_PARAM;
01563 # endif
01564 #else /* ! YYPARSE_PARAM */
01565 #if defined (__STDC__) || defined (__cplusplus)
01566 int
01567 yyparse (void)
01568 #else
01569 int
01570 yyparse ()
01571 
01572 #endif
01573 #endif
01574 {
01575   
01576   register int yystate;
01577   register int yyn;
01578   int yyresult;
01579   /* Number of tokens to shift before error messages enabled.  */
01580   int yyerrstatus;
01581   /* Lookahead token as an internal (translated) token number.  */
01582   int yytoken = 0;
01583 
01584   /* Three stacks and their tools:
01585      `yyss': related to states,
01586      `yyvs': related to semantic values,
01587      `yyls': related to locations.
01588 
01589      Refer to the stacks thru separate pointers, to allow yyoverflow
01590      to reallocate them elsewhere.  */
01591 
01592   /* The state stack.  */
01593   short yyssa[YYINITDEPTH];
01594   short *yyss = yyssa;
01595   register short *yyssp;
01596 
01597   /* The semantic value stack.  */
01598   YYSTYPE yyvsa[YYINITDEPTH];
01599   YYSTYPE *yyvs = yyvsa;
01600   register YYSTYPE *yyvsp;
01601 
01602   /* The location stack.  */
01603   YYLTYPE yylsa[YYINITDEPTH];
01604   YYLTYPE *yyls = yylsa;
01605   YYLTYPE *yylsp;
01606   YYLTYPE *yylerrsp;
01607 
01608 #define YYPOPSTACK   (yyvsp--, yyssp--, yylsp--)
01609 
01610   YYSIZE_T yystacksize = YYINITDEPTH;
01611 
01612   /* The variables used to return semantic value and location from the
01613      action routines.  */
01614   YYSTYPE yyval;
01615   YYLTYPE yyloc;
01616 
01617   /* When reducing, the number of symbols on the RHS of the reduced
01618      rule.  */
01619   int yylen;
01620 
01621   YYDPRINTF ((stderr, "Starting parse\n"));
01622 
01623   yystate = 0;
01624   yyerrstatus = 0;
01625   yynerrs = 0;
01626   yychar = YYEMPTY;             /* Cause a token to be read.  */
01627 
01628   /* Initialize stack pointers.
01629      Waste one element of value and location stack
01630      so that they stay on the same level as the state stack.
01631      The wasted elements are never initialized.  */
01632 
01633   yyssp = yyss;
01634   yyvsp = yyvs;
01635   yylsp = yyls;
01636   goto yysetstate;
01637 
01638 /*------------------------------------------------------------.
01639 | yynewstate -- Push a new state, which is found in yystate.  |
01640 `------------------------------------------------------------*/
01641  yynewstate:
01642   /* In all cases, when you get here, the value and location stacks
01643      have just been pushed. so pushing a state here evens the stacks.
01644      */
01645   yyssp++;
01646 
01647  yysetstate:
01648   *yyssp = yystate;
01649 
01650   if (yyss + yystacksize - 1 <= yyssp)
01651     {
01652       /* Get the current used size of the three stacks, in elements.  */
01653       YYSIZE_T yysize = yyssp - yyss + 1;
01654 
01655 #ifdef yyoverflow
01656       {
01657         /* Give user a chance to reallocate the stack. Use copies of
01658            these so that the &'s don't force the real ones into
01659            memory.  */
01660         YYSTYPE *yyvs1 = yyvs;
01661         short *yyss1 = yyss;
01662         YYLTYPE *yyls1 = yyls;
01663 
01664         /* Each stack pointer address is followed by the size of the
01665            data in use in that stack, in bytes.  This used to be a
01666            conditional around just the two extra args, but that might
01667            be undefined if yyoverflow is a macro.  */
01668         yyoverflow ("parser stack overflow",
01669                     &yyss1, yysize * sizeof (*yyssp),
01670                     &yyvs1, yysize * sizeof (*yyvsp),
01671                     &yyls1, yysize * sizeof (*yylsp),
01672                     &yystacksize);
01673         yyls = yyls1;
01674         yyss = yyss1;
01675         yyvs = yyvs1;
01676       }
01677 #else /* no yyoverflow */
01678 # ifndef YYSTACK_RELOCATE
01679       goto yyoverflowlab;
01680 # else
01681       /* Extend the stack our own way.  */
01682       if (YYMAXDEPTH <= yystacksize)
01683         goto yyoverflowlab;
01684       yystacksize *= 2;
01685       if (YYMAXDEPTH < yystacksize)
01686         yystacksize = YYMAXDEPTH;
01687 
01688       {
01689         short *yyss1 = yyss;
01690         union yyalloc *yyptr =
01691           (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
01692         if (! yyptr)
01693           goto yyoverflowlab;
01694         YYSTACK_RELOCATE (yyss);
01695         YYSTACK_RELOCATE (yyvs);
01696         YYSTACK_RELOCATE (yyls);
01697 #  undef YYSTACK_RELOCATE
01698         if (yyss1 != yyssa)
01699           YYSTACK_FREE (yyss1);
01700       }
01701 # endif
01702 #endif /* no yyoverflow */
01703 
01704       yyssp = yyss + yysize - 1;
01705       yyvsp = yyvs + yysize - 1;
01706       yylsp = yyls + yysize - 1;
01707 
01708       YYDPRINTF ((stderr, "Stack size increased to %lu\n",
01709                   (unsigned long int) yystacksize));
01710 
01711       if (yyss + yystacksize - 1 <= yyssp)
01712         YYABORT;
01713     }
01714 
01715   YYDPRINTF ((stderr, "Entering state %d\n", yystate));
01716 
01717   goto yybackup;
01718 
01719 /*-----------.
01720 | yybackup.  |
01721 `-----------*/
01722 yybackup:
01723 
01724 /* Do appropriate processing given the current state.  */
01725 /* Read a lookahead token if we need one and don't already have one.  */
01726 /* yyresume: */
01727 
01728   /* First try to decide what to do without reference to lookahead token.  */
01729 
01730   yyn = yypact[yystate];
01731   if (yyn == YYPACT_NINF)
01732     goto yydefault;
01733 
01734   /* Not known => get a lookahead token if don't already have one.  */
01735 
01736   /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol.  */
01737   if (yychar == YYEMPTY)
01738     {
01739       YYDPRINTF ((stderr, "Reading a token: "));
01740       yychar = YYLEX;
01741     }
01742 
01743   if (yychar <= YYEOF)
01744     {
01745       yychar = yytoken = YYEOF;
01746       YYDPRINTF ((stderr, "Now at end of input.\n"));
01747     }
01748   else
01749     {
01750       yytoken = YYTRANSLATE (yychar);
01751       YYDSYMPRINTF ("Next token is", yytoken, &yylval, &yylloc);
01752     }
01753 
01754   /* If the proper action on seeing token YYTOKEN is to reduce or to
01755      detect an error, take that action.  */
01756   yyn += yytoken;
01757   if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
01758     goto yydefault;
01759   yyn = yytable[yyn];
01760   if (yyn <= 0)
01761     {
01762       if (yyn == 0 || yyn == YYTABLE_NINF)
01763         goto yyerrlab;
01764       yyn = -yyn;
01765       goto yyreduce;
01766     }
01767 
01768   if (yyn == YYFINAL)
01769     YYACCEPT;
01770 
01771   /* Shift the lookahead token.  */
01772   YYDPRINTF ((stderr, "Shifting token %s, ", yytname[yytoken]));
01773 
01774   /* Discard the token being shifted unless it is eof.  */
01775   if (yychar != YYEOF)
01776     yychar = YYEMPTY;
01777 
01778   *++yyvsp = yylval;
01779   *++yylsp = yylloc;
01780 
01781   /* Count tokens shifted since error; after three, turn off error
01782      status.  */
01783   if (yyerrstatus)
01784     yyerrstatus--;
01785 
01786   yystate = yyn;
01787   goto yynewstate;
01788 
01789 
01790 /*-----------------------------------------------------------.
01791 | yydefault -- do the default action for the current state.  |
01792 `-----------------------------------------------------------*/
01793 yydefault:
01794   yyn = yydefact[yystate];
01795   if (yyn == 0)
01796     goto yyerrlab;
01797   goto yyreduce;
01798 
01799 
01800 /*-----------------------------.
01801 | yyreduce -- Do a reduction.  |
01802 `-----------------------------*/
01803 yyreduce:
01804   /* yyn is the number of a rule to reduce with.  */
01805   yylen = yyr2[yyn];
01806 
01807   /* If YYLEN is nonzero, implement the default value of the action:
01808      `$$ = $1'.
01809 
01810      Otherwise, the following line sets YYVAL to garbage.
01811      This behavior is undocumented and Bison
01812      users should not rely upon it.  Assigning to YYVAL
01813      unconditionally makes the parser a bit smaller, and it avoids a
01814      GCC warning that YYVAL may be used uninitialized.  */
01815   yyval = yyvsp[1-yylen];
01816 
01817   /* Default location. */
01818   YYLLOC_DEFAULT (yyloc, yylsp - yylen, yylen);
01819   YY_REDUCE_PRINT (yyn);
01820   switch (yyn)
01821     {
01822         case 2:
01823 #line 152 "parse.y"
01824     {
01825                         if ( optimize )
01826                                 yyvsp[0].stmt = yyvsp[0].stmt->Simplify();
01827 
01828                         if ( stmts )
01829                                 stmts->AsStmtList()->Stmts().append(yyvsp[0].stmt);
01830                         else
01831                                 stmts = yyvsp[0].stmt;
01832 
01833                         // Any objects creates from hereon out should not
01834                         // have file positions associated with them.
01835                         set_location(no_location);
01836                         }
01837     break;
01838 
01839   case 3:
01840 #line 169 "parse.y"
01841     { in_debug = true; }
01842     break;
01843 
01844   case 4:
01845 #line 170 "parse.y"
01846     {
01847                         g_curr_debug_expr = yyvsp[0].expr;
01848                         in_debug = false;
01849                         }
01850     break;
01851 
01852   case 7:
01853 #line 183 "parse.y"
01854     {
01855                         set_location(yylsp[-2], yylsp[0]);
01856                         yyval.expr = yyvsp[-1].expr; yyval.expr->MarkParen();
01857                         }
01858     break;
01859 
01860   case 8:
01861 #line 189 "parse.y"
01862     {
01863                         set_location(yylsp[-1], yylsp[0]);
01864                         yyval.expr = new IncrExpr(EXPR_INCR, yyvsp[0].expr);
01865                         }
01866     break;
01867 
01868   case 9:
01869 #line 195 "parse.y"
01870     {
01871                         set_location(yylsp[-1], yylsp[0]);
01872                         yyval.expr = new IncrExpr(EXPR_DECR, yyvsp[0].expr);
01873                         }
01874     break;
01875 
01876   case 10:
01877 #line 201 "parse.y"
01878     {
01879                         set_location(yylsp[-1], yylsp[0]);
01880                         yyval.expr = new NotExpr(yyvsp[0].expr);
01881                         }
01882     break;
01883 
01884   case 11:
01885 #line 207 "parse.y"
01886     {
01887                         set_location(yylsp[-1], yylsp[0]);
01888                         yyval.expr = new NegExpr(yyvsp[0].expr);
01889                         }
01890     break;
01891 
01892   case 12:
01893 #line 213 "parse.y"
01894     {
01895                         set_location(yylsp[-1], yylsp[0]);
01896                         yyval.expr = new PosExpr(yyvsp[0].expr);
01897                         }
01898     break;
01899 
01900   case 13:
01901 #line 219 "parse.y"
01902     {
01903                         set_location(yylsp[-2], yylsp[0]);
01904                         yyval.expr = new AddExpr(yyvsp[-2].expr, yyvsp[0].expr);
01905                         }
01906     break;
01907 
01908   case 14:
01909 #line 225 "parse.y"
01910     {
01911                         set_location(yylsp[-2], yylsp[0]);
01912                         yyval.expr = new SubExpr(yyvsp[-2].expr, yyvsp[0].expr);
01913                         }
01914     break;
01915 
01916   case 15:
01917 #line 231 "parse.y"
01918     {
01919                         set_location(yylsp[-2], yylsp[0]);
01920                         yyval.expr = new TimesExpr(yyvsp[-2].expr, yyvsp[0].expr);
01921                         }
01922     break;
01923 
01924   case 16:
01925 #line 237 "parse.y"
01926     {
01927                         set_location(yylsp[-2], yylsp[0]);
01928                         yyval.expr = new DivideExpr(yyvsp[-2].expr, yyvsp[0].expr);
01929                         }
01930     break;
01931 
01932   case 17:
01933 #line 243 "parse.y"
01934     {
01935                         set_location(yylsp[-2], yylsp[0]);
01936                         yyval.expr = new ModExpr(yyvsp[-2].expr, yyvsp[0].expr);
01937                         }
01938     break;
01939 
01940   case 18:
01941 #line 249 "parse.y"
01942     {
01943                         set_location(yylsp[-2], yylsp[0]);
01944                         yyval.expr = new BoolExpr(EXPR_AND, yyvsp[-2].expr, yyvsp[0].expr);
01945                         }
01946     break;
01947 
01948   case 19:
01949 #line 255 "parse.y"
01950     {
01951                         set_location(yylsp[-2], yylsp[0]);
01952                         yyval.expr = new BoolExpr(EXPR_OR, yyvsp[-2].expr, yyvsp[0].expr);
01953                         }
01954     break;
01955 
01956   case 20:
01957 #line 261 "parse.y"
01958     {
01959                         set_location(yylsp[-2], yylsp[0]);
01960                         yyval.expr = new EqExpr(EXPR_EQ, yyvsp[-2].expr, yyvsp[0].expr);
01961                         }
01962     break;
01963 
01964   case 21:
01965 #line 267 "parse.y"
01966     {
01967                         set_location(yylsp[-2], yylsp[0]);
01968                         yyval.expr = new EqExpr(EXPR_NE, yyvsp[-2].expr, yyvsp[0].expr);
01969                         }
01970     break;
01971 
01972   case 22:
01973 #line 273 "parse.y"
01974     {
01975                         set_location(yylsp[-2], yylsp[0]);
01976                         yyval.expr = new RelExpr(EXPR_LT, yyvsp[-2].expr, yyvsp[0].expr);
01977                         }
01978     break;
01979 
01980   case 23:
01981 #line 279 "parse.y"
01982     {
01983                         set_location(yylsp[-2], yylsp[0]);
01984                         yyval.expr = new RelExpr(EXPR_LE, yyvsp[-2].expr, yyvsp[0].expr);
01985                         }
01986     break;
01987 
01988   case 24:
01989 #line 285 "parse.y"
01990     {
01991                         set_location(yylsp[-2], yylsp[0]);
01992                         yyval.expr = new RelExpr(EXPR_GT, yyvsp[-2].expr, yyvsp[0].expr);
01993                         }
01994     break;
01995 
01996   case 25:
01997 #line 291 "parse.y"
01998     {
01999                         set_location(yylsp[-2], yylsp[0]);
02000                         yyval.expr = new RelExpr(EXPR_GE, yyvsp[-2].expr, yyvsp[0].expr);
02001                         }
02002     break;
02003 
02004   case 26:
02005 #line 297 "parse.y"
02006     {
02007                         set_location(yylsp[-4], yylsp[0]);
02008                         yyval.expr = new CondExpr(yyvsp[-4].expr, yyvsp[-2].expr, yyvsp[0].expr);
02009                         }
02010     break;
02011 
02012   case 27:
02013 #line 303 "parse.y"
02014     {
02015                         set_location(yylsp[-2], yylsp[0]);
02016                         yyval.expr = get_assign_expr(yyvsp[-2].expr, yyvsp[0].expr, in_init);
02017                         }
02018     break;
02019 
02020   case 28:
02021 #line 309 "parse.y"
02022     {
02023                         set_location(yylsp[-3], yylsp[0]);
02024                         yyval.expr = new IndexExpr(yyvsp[-3].expr, yyvsp[-1].list);
02025                         }
02026     break;
02027 
02028   case 29:
02029 #line 315 "parse.y"
02030     {
02031                         set_location(yylsp[-2], yylsp[0]);
02032                         yyval.expr = new FieldExpr(yyvsp[-2].expr, yyvsp[0].str);
02033                         }
02034     break;
02035 
02036   case 30:
02037 #line 321 "parse.y"
02038     {
02039                         set_location(yylsp[-3], yylsp[0]);
02040                         yyval.expr = new FieldAssignExpr(yyvsp[-2].str, yyvsp[0].expr);
02041                         }
02042     break;
02043 
02044   case 31:
02045 #line 327 "parse.y"
02046     {
02047                         func_id = current_scope()->GenerateTemporary("anonymous-function");
02048                         func_id->SetInferReturnType(true);
02049                         begin_func(func_id,
02050                                    current_module.c_str(),
02051                                    FUNC_FLAVOR_FUNCTION,
02052                                    0,
02053                                    yyvsp[-1].func_type);
02054                         }
02055     break;
02056 
02057   case 32:
02058 #line 337 "parse.y"
02059     {
02060                         yyval.expr = new FieldAssignExpr(yyvsp[-4].str, new ConstExpr(func_id->ID_Val()));
02061                         }
02062     break;
02063 
02064   case 33:
02065 #line 342 "parse.y"
02066     {
02067                         set_location(yylsp[-2], yylsp[0]);
02068                         yyval.expr = new InExpr(yyvsp[-2].expr, yyvsp[0].expr);
02069                         }
02070     break;
02071 
02072   case 34:
02073 #line 348 "parse.y"
02074     {
02075                         set_location(yylsp[-2], yylsp[0]);
02076                         yyval.expr = new NotExpr(new InExpr(yyvsp[-2].expr, yyvsp[0].expr));
02077                         }
02078     break;
02079 
02080   case 35:
02081 #line 354 "parse.y"
02082     {
02083                         // A little crufty: we peek at the type of
02084                         // the first expression in the list.  If it's
02085                         // a record or a field assignment, then this
02086                         // is a record constructor.  If not, then this
02087                         // is a list used for an initializer.
02088 
02089                         set_location(yylsp[-2], yylsp[0]);
02090 
02091                         Expr* e0 = yyvsp[-1].list->Exprs()[0];
02092                         if ( e0->Tag() == EXPR_FIELD_ASSIGN ||
02093                              e0->Type()->Tag() == TYPE_RECORD )
02094                                 yyval.expr = new RecordConstructorExpr(yyvsp[-1].list);
02095                         else
02096                                 yyval.expr = yyvsp[-1].list;
02097                         }
02098     break;
02099 
02100   case 36:
02101 #line 372 "parse.y"
02102     {
02103                         set_location(yylsp[-3], yylsp[0]);
02104                         yyval.expr = new RecordMatchExpr(yyvsp[-2].expr, yyvsp[0].expr);
02105                         }
02106     break;
02107 
02108   case 37:
02109 #line 378 "parse.y"
02110     {
02111                         set_location(yylsp[-3], yylsp[0]);
02112                         yyval.expr = new CallExpr(yyvsp[-3].expr, yyvsp[-1].list);
02113                         }
02114     break;
02115 
02116   case 38:
02117 #line 384 "parse.y"
02118     {
02119                         set_location(yylsp[-2], yylsp[0]);
02120                         yyval.expr = new HasFieldExpr(yyvsp[-2].expr, yyvsp[0].str, false);
02121                         }
02122     break;
02123 
02124   case 39:
02125 #line 390 "parse.y"
02126     {
02127                         set_location(yylsp[-2], yylsp[0]);
02128                         yyval.expr = new HasFieldExpr(yyvsp[-2].expr, yyvsp[0].str, true);
02129                         }
02130     break;
02131 
02132   case 41:
02133 #line 398 "parse.y"
02134     {
02135                         set_location(yylsp[-4], yylsp[0]);
02136                         yyval.expr = new ScheduleExpr(yyvsp[-3].expr, yyvsp[-1].event_expr);
02137                         }
02138     break;
02139 
02140   case 42:
02141 #line 404 "parse.y"
02142     {
02143                         set_location(yylsp[0]);
02144 
02145                         ID* id = lookup_ID(yyvsp[0].str, current_module.c_str());
02146                         if ( ! id )
02147                                 {
02148                                 if ( ! in_debug )
02149                                         {
02150 /*      // CHECK THAT THIS IS NOT GLOBAL.
02151                                         id = install_ID($1, current_module.c_str(),
02152                                                         false, is_export);
02153 */
02154 
02155                                         yyerror(fmt("unknown identifier %s", yyvsp[0].str));
02156                                         YYERROR;
02157                                         }
02158                                 else
02159                                         {
02160                                         yyerror(fmt("unknown identifier %s", yyvsp[0].str));
02161                                         YYERROR;
02162                                         }
02163                                 }
02164                         else
02165                                 {
02166                                 if ( ! id->Type() )
02167                                         {
02168                                         id->Error("undeclared variable");
02169                                         id->SetType(error_type());
02170                                         yyval.expr = new NameExpr(id);
02171                                         }
02172 
02173                                 else if ( id->IsEnumConst() )
02174                                         {
02175                                         EnumType* t = id->Type()->AsEnumType();
02176                                         int intval = t->Lookup(id->ModuleName(),
02177                                                                id->Name());
02178                                         if ( intval < 0 )
02179                                                 internal_error("enum value not found for %s", id->Name());
02180                                         yyval.expr = new ConstExpr(new EnumVal(intval, t));
02181                                         }
02182                                 else
02183                                         yyval.expr = new NameExpr(id);
02184                                 }
02185                         }
02186     break;
02187 
02188   case 43:
02189 #line 450 "parse.y"
02190     {
02191                         set_location(yylsp[0]);
02192                         yyval.expr = new ConstExpr(yyvsp[0].val);
02193                         }
02194     break;
02195 
02196   case 44:
02197 #line 456 "parse.y"
02198     {
02199                         set_location(yylsp[0]);
02200                         yyvsp[0].re->Compile();
02201                         yyval.expr = new ConstExpr(new PatternVal(yyvsp[0].re));
02202                         }
02203     break;
02204 
02205   case 45:
02206 #line 463 "parse.y"
02207     {
02208                         set_location(yylsp[0]);
02209                         yyval.expr = bro_this->Ref();
02210                         }
02211     break;
02212 
02213   case 46:
02214 #line 471 "parse.y"
02215     {
02216                         set_location(yylsp[-2], yylsp[0]);
02217                         yyvsp[-2].list->Append(yyvsp[0].expr);
02218                         }
02219     break;
02220 
02221   case 47:
02222 #line 477 "parse.y"
02223     {
02224                         set_location(yylsp[0]);
02225                         yyval.list = new ListExpr(yyvsp[0].expr);
02226                         }
02227     break;
02228 
02229   case 49:
02230 #line 486 "parse.y"
02231     { yyval.list = new ListExpr(); }
02232     break;
02233 
02234   case 52:
02235 #line 496 "parse.y"
02236     {
02237                         yyvsp[-2].re->AddPat(yyvsp[0].str);
02238                         delete [] yyvsp[0].str;
02239                         }
02240     break;
02241 
02242   case 53:
02243 #line 502 "parse.y"
02244     {
02245                         yyval.re = new RE_Matcher(yyvsp[0].str);
02246                         delete [] yyvsp[0].str;
02247                         }
02248     break;
02249 
02250   case 54:
02251 #line 509 "parse.y"
02252     { begin_RE(); }
02253     break;
02254 
02255   case 55:
02256 #line 509 "parse.y"
02257     { end_RE(); }
02258     break;
02259 
02260   case 56:
02261 #line 510 "parse.y"
02262     { yyval.str = yyvsp[-2].str; }
02263     break;
02264 
02265   case 57:
02266 #line 515 "parse.y"
02267     {
02268                         set_location(yylsp[0]);
02269 
02270                         EnumType* et = new EnumType(is_export);
02271                         if ( et->AddName(current_module, yyvsp[0].str) < 0 )
02272                                 error("identifier in enumerated type definition already exists");
02273                         yyval.type = et;
02274                         }
02275     break;
02276 
02277   case 58:
02278 #line 525 "parse.y"
02279     {
02280                         set_location(yylsp[-2], yylsp[0]);
02281 
02282                         if ( yyvsp[-2].type->AsEnumType()->AddName(current_module, yyvsp[0].str) < 1 )
02283                                 error("identifier in enumerated type definition already exists");
02284                         yyval.type = yyvsp[-2].type;
02285                         }
02286     break;
02287 
02288   case 59:
02289 #line 535 "parse.y"
02290     {
02291                                 set_location(yylsp[0]);
02292                                 yyval.type = base_type(TYPE_BOOL);
02293                                 }
02294     break;
02295 
02296   case 60:
02297 #line 540 "parse.y"
02298     {
02299                                 set_location(yylsp[0]);
02300                                 yyval.type = base_type(TYPE_INT);
02301                                 }
02302     break;
02303 
02304   case 61:
02305 #line 545 "parse.y"
02306     {
02307                                 set_location(yylsp[0]);
02308                                 yyval.type = base_type(TYPE_COUNT);
02309                                 }
02310     break;
02311 
02312   case 62:
02313 #line 550 "parse.y"
02314     {
02315                                 set_location(yylsp[0]);
02316                                 yyval.type = base_type(TYPE_COUNTER);
02317                                 }
02318     break;
02319 
02320   case 63:
02321 #line 555 "parse.y"
02322     {
02323                                 set_location(yylsp[0]);
02324                                 yyval.type = base_type(TYPE_DOUBLE);
02325                                 }
02326     break;
02327 
02328   case 64:
02329 #line 560 "parse.y"
02330     {
02331                                 set_location(yylsp[0]);
02332                                 yyval.type = base_type(TYPE_TIME);
02333                                 }
02334     break;
02335 
02336   case 65:
02337 #line 565 "parse.y"
02338     {
02339                                 set_location(yylsp[0]);
02340                                 yyval.type = base_type(TYPE_INTERVAL);
02341                                 }
02342     break;
02343 
02344   case 66:
02345 #line 570 "parse.y"
02346     {
02347                                 set_location(yylsp[0]);
02348                                 yyval.type = base_type(TYPE_STRING);
02349                                 }
02350     break;
02351 
02352   case 67:
02353 #line 575 "parse.y"
02354     {
02355                                 set_location(yylsp[0]);
02356                                 yyval.type = base_type(TYPE_PATTERN);
02357                                 }
02358     break;
02359 
02360   case 68:
02361 #line 580 "parse.y"
02362     {
02363                                 set_location(yylsp[0]);
02364                                 yyval.type = base_type(TYPE_TIMER);
02365                                 }
02366     break;
02367 
02368   case 69:
02369 #line 585 "parse.y"
02370     {
02371                                 set_location(yylsp[0]);
02372                                 yyval.type = base_type(TYPE_PORT);
02373                                 }
02374     break;
02375 
02376   case 70:
02377 #line 590 "parse.y"
02378     {
02379                                 set_location(yylsp[0]);
02380                                 yyval.type = base_type(TYPE_ADDR);
02381                                 }
02382     break;
02383 
02384   case 71:
02385 #line 595 "parse.y"
02386     {
02387                                 set_location(yylsp[0]);
02388                                 yyval.type = base_type(TYPE_NET);
02389                                 }
02390     break;
02391 
02392   case 72:
02393 #line 600 "parse.y"
02394     {
02395                                 set_location(yylsp[0]);
02396                                 yyval.type = base_type(TYPE_SUBNET);
02397                                 }
02398     break;
02399 
02400   case 73:
02401 #line 605 "parse.y"
02402     {
02403                                 set_location(yylsp[0]);
02404                                 yyval.type = base_type(TYPE_ANY);
02405                                 }
02406     break;
02407 
02408   case 74:
02409 #line 611 "parse.y"
02410     {
02411                                 set_location(yylsp[-5], yylsp[0]);
02412                                 yyval.type = new TableType(yyvsp[-3].type_l, yyvsp[0].type);
02413                                 }
02414     break;
02415 
02416   case 75:
02417 #line 617 "parse.y"
02418     {
02419                                 set_location(yylsp[-3], yylsp[0]);
02420                                 yyval.type = new SetType(yyvsp[-1].type_l, 0);
02421                                 }
02422     break;
02423 
02424   case 76:
02425 #line 623 "parse.y"
02426     {
02427                                 set_location(yylsp[-3], yylsp[0]);
02428                                 yyval.type = new SetType((TypeList*) 0, yyvsp[-1].list);
02429                                 }
02430     break;
02431 
02432   case 77:
02433 #line 629 "parse.y"
02434     {
02435                                 set_location(yylsp[-3], yylsp[0]);
02436                                 yyval.type = new RecordType(yyvsp[-1].type_decl_l);
02437                                 }
02438     break;
02439 
02440   case 78:
02441 #line 635 "parse.y"
02442     {
02443                                 set_location(yylsp[-3], yylsp[0]);
02444                                 error("union type not implemented");
02445                                 yyval.type = 0;
02446                                 }
02447     break;
02448 
02449   case 79:
02450 #line 642 "parse.y"
02451     {
02452                                 set_location(yylsp[-4], yylsp[-1]);
02453                                 yyval.type = yyvsp[-2].type;
02454                                 }
02455     break;
02456 
02457   case 80:
02458 #line 648 "parse.y"
02459     {
02460                                 set_location(yylsp[0]);
02461                                 // $$ = new TypeList();
02462                                 error("list type not implemented");
02463                                 yyval.type = 0;
02464                                 }
02465     break;
02466 
02467   case 81:
02468 #line 656 "parse.y"
02469     {
02470                                 set_location(yylsp[-2]);
02471                                 // $$ = new TypeList($3);
02472                                 error("list type not implemented");
02473                                 yyval.type = 0;
02474                                 }
02475     break;
02476 
02477   case 82:
02478 #line 664 "parse.y"
02479     {
02480                                 set_location(yylsp[-2], yylsp[0]);
02481                                 yyval.type = new VectorType(yyvsp[0].type);
02482                                 }
02483     break;
02484 
02485   case 83:
02486 #line 670 "parse.y"
02487     {
02488                                 set_location(yylsp[-1], yylsp[0]);
02489                                 yyval.type = yyvsp[0].func_type;
02490                                 }
02491     break;
02492 
02493   case 84:
02494 #line 676 "parse.y"
02495     {
02496                                 set_location(yylsp[-3], yylsp[-1]);
02497                                 yyval.type = new FuncType(yyvsp[-1].record, 0, 1);
02498                                 }
02499     break;
02500 
02501   case 85:
02502 #line 682 "parse.y"
02503     {
02504                                 set_location(yylsp[-2], yylsp[0]);
02505                                 yyval.type = new FileType(yyvsp[0].type);
02506                                 }
02507     break;
02508 
02509   case 86:
02510 #line 688 "parse.y"
02511     {
02512                                 set_location(yylsp[0]);
02513                                 yyval.type = new FileType(base_type(TYPE_STRING));
02514                                 }
02515     break;
02516 
02517   case 87:
02518 #line 694 "parse.y"
02519     {
02520                         if ( ! yyvsp[0].id || ! (yyval.type = yyvsp[0].id->AsType()) )
02521                                 {
02522                                 NullStmt here;
02523                                 if ( yyvsp[0].id )
02524                                         yyvsp[0].id->Error("not a BRO type", &here);
02525                                 yyval.type = error_type();
02526                                 }
02527                         else
02528                                 Ref(yyval.type);
02529                         }
02530     break;
02531 
02532   case 88:
02533 #line 709 "parse.y"
02534     { yyvsp[-2].type_l->AppendEvenIfNotPure(yyvsp[0].type); }
02535     break;
02536 
02537   case 89:
02538 #line 711 "parse.y"
02539     {
02540                         yyval.type_l = new TypeList(yyvsp[0].type);
02541                         yyval.type_l->Append(yyvsp[0].type);
02542                         }
02543     break;
02544 
02545   case 90:
02546 #line 719 "parse.y"
02547     { yyvsp[-1].type_decl_l->append(yyvsp[0].type_decl); }
02548     break;
02549 
02550   case 91:
02551 #line 721 "parse.y"
02552     { yyval.type_decl_l = new type_decl_list(); }
02553     break;
02554 
02555   case 92:
02556 #line 726 "parse.y"
02557     {
02558                         set_location(yylsp[-4], yylsp[0]);
02559                         yyval.type_decl = new TypeDecl(yyvsp[-2].type, yyvsp[-4].str, yyvsp[-1].attr_l);
02560                         }
02561     break;
02562 
02563   case 93:
02564 #line 734 "parse.y"
02565     { yyval.record = new RecordType(yyvsp[0].type_decl_l); }
02566     break;
02567 
02568   case 94:
02569 #line 736 "parse.y"
02570     { yyval.record = new RecordType(yyvsp[-1].type_decl_l); }
02571     break;
02572 
02573   case 95:
02574 #line 738 "parse.y"
02575     { yyval.record = new RecordType(new type_decl_list()); }
02576     break;
02577 
02578   case 96:
02579 #line 743 "parse.y"
02580     { yyvsp[-2].type_decl_l->append(yyvsp[0].type_decl); }
02581     break;
02582 
02583   case 97:
02584 #line 745 "parse.y"
02585     { yyvsp[-2].type_decl_l->append(yyvsp[0].type_decl); }
02586     break;
02587 
02588   case 98:
02589 #line 747 "parse.y"
02590     { yyval.type_decl_l = new type_decl_list(); yyval.type_decl_l->append(yyvsp[0].type_decl); }
02591     break;
02592 
02593   case 99:
02594 #line 752 "parse.y"
02595     {
02596                         set_location(yylsp[-3], yylsp[0]);
02597                         yyval.type_decl = new TypeDecl(yyvsp[-1].type, yyvsp[-3].str, yyvsp[0].attr_l);
02598                         }
02599     break;
02600 
02601   case 100:
02602 #line 760 "parse.y"
02603     { current_module = yyvsp[-1].str; }
02604     break;
02605 
02606   case 101:
02607 #line 762 "parse.y"
02608     { is_export = true; }
02609     break;
02610 
02611   case 102:
02612 #line 763 "parse.y"
02613     { is_export = false; }
02614     break;
02615 
02616   case 103:
02617 #line 766 "parse.y"
02618     { add_global(yyvsp[-5].id, yyvsp[-4].type, yyvsp[-3].ic, yyvsp[-2].expr, yyvsp[-1].attr_l, VAR_REGULAR); }
02619     break;
02620 
02621   case 104:
02622 #line 769 "parse.y"
02623     { add_global(yyvsp[-5].id, yyvsp[-4].type, yyvsp[-3].ic, yyvsp[-2].expr, yyvsp[-1].attr_l, VAR_CONST); }
02624     break;
02625 
02626   case 105:
02627 #line 772 "parse.y"
02628     { add_global(yyvsp[-5].id, yyvsp[-4].type, yyvsp[-3].ic, yyvsp[-2].expr, yyvsp[-1].attr_l, VAR_REDEF); }
02629     break;
02630 
02631   case 106:
02632 #line 776 "parse.y"
02633     {
02634                         if ( ! yyvsp[-6].id->Type() )
02635                                 yyvsp[-6].id->Error("unknown identifier");
02636                         else
02637                                 {
02638                                 EnumType* add_to = yyvsp[-6].id->Type()->AsEnumType();
02639                                 if ( ! add_to )
02640                                         yyvsp[-6].id->Error("not an enum");
02641                                 else
02642                                         add_to->AddNamesFrom(current_module,
02643                                                              yyvsp[-3].type->AsEnumType());
02644                                 }
02645                         }
02646     break;
02647 
02648   case 107:
02649 #line 791 "parse.y"
02650     {
02651                         add_type(yyvsp[-5].id, yyvsp[-3].type, yyvsp[-2].attr_l, 0);
02652                         if ( yyvsp[-1].type_decl_l )
02653                                 yyvsp[-5].id->AsType()->SetAttributesType(yyvsp[-1].type_decl_l);
02654                         }
02655     break;
02656 
02657   case 108:
02658 #line 797 "parse.y"
02659     { in_global_attr_decl = true; }
02660     break;
02661 
02662   case 109:
02663 #line 798 "parse.y"
02664     { in_global_attr_decl = false; }
02665     break;
02666 
02667   case 110:
02668 #line 799 "parse.y"
02669     {
02670                         global_attributes_type = new RecordType(yyvsp[-3].type_decl_l);
02671                         }
02672     break;
02673 
02674   case 111:
02675 #line 804 "parse.y"
02676     { add_type(yyvsp[-4].id, yyvsp[-2].type, yyvsp[-1].attr_l, 1); }
02677     break;
02678 
02679   case 112:
02680 #line 807 "parse.y"
02681     { }
02682     break;
02683 
02684   case 114:
02685 #line 814 "parse.y"
02686     { do_atif(yyvsp[-1].expr); }
02687     break;
02688 
02689   case 115:
02690 #line 816 "parse.y"
02691     { do_atifdef(yyvsp[-1].str); }
02692     break;
02693 
02694   case 116:
02695 #line 818 "parse.y"
02696     { do_atifndef(yyvsp[-1].str); }
02697     break;
02698 
02699   case 117:
02700 #line 820 "parse.y"
02701     { do_atendif(); }
02702     break;
02703 
02704   case 118:
02705 #line 822 "parse.y"
02706     { do_atelse(); }
02707     break;
02708 
02709   case 119:
02710 #line 827 "parse.y"
02711     { yyval.type_decl_l = yyvsp[-1].type_decl_l; }
02712     break;
02713 
02714   case 120:
02715 #line 829 "parse.y"
02716     { yyval.type_decl_l = 0; }
02717     break;
02718 
02719   case 121:
02720 #line 834 "parse.y"
02721     {
02722                         begin_func(yyvsp[-1].id, current_module.c_str(),
02723                                    FUNC_FLAVOR_FUNCTION, 0, yyvsp[0].func_type);
02724                         yyval.func_type = yyvsp[0].func_type;
02725                         }
02726     break;
02727 
02728   case 122:
02729 #line 840 "parse.y"
02730     {
02731                         begin_func(yyvsp[-1].id, current_module.c_str(),
02732                                    FUNC_FLAVOR_EVENT, 0, yyvsp[0].func_type);
02733                         yyval.func_type = yyvsp[0].func_type;
02734                         }
02735     break;
02736 
02737   case 123:
02738 #line 846 "parse.y"
02739     {
02740                         begin_func(yyvsp[-1].id, current_module.c_str(),
02741                                    FUNC_FLAVOR_EVENT, 1, yyvsp[0].func_type);
02742                         yyval.func_type = yyvsp[0].func_type;
02743                         }
02744     break;
02745 
02746   case 124:
02747 #line 855 "parse.y"
02748     {
02749                         if ( optimize )
02750                                 yyvsp[-1].stmt = yyvsp[-1].stmt->Simplify();
02751 
02752                         end_func(yyvsp[-1].stmt);
02753                         }
02754     break;
02755 
02756   case 125:
02757 #line 865 "parse.y"
02758     { yyval.expr = new ConstExpr(yyvsp[-1].id->ID_Val()); }
02759     break;
02760 
02761   case 126:
02762 #line 870 "parse.y"
02763     {
02764                         yyval.id = current_scope()->GenerateTemporary("anonymous-function");
02765                         begin_func(yyval.id, current_module.c_str(),
02766                                    FUNC_FLAVOR_FUNCTION, 0, yyvsp[0].func_type);
02767                         }
02768     break;
02769 
02770   case 127:
02771 #line 879 "parse.y"
02772     { yyval.func_type = new FuncType(yyvsp[-3].record, yyvsp[0].type, 0); }
02773     break;
02774 
02775   case 128:
02776 #line 881 "parse.y"
02777     { yyval.func_type = new FuncType(yyvsp[-1].record, base_type(TYPE_VOID), 0); }
02778     break;
02779 
02780   case 129:
02781 #line 886 "parse.y"
02782     { yyval.type = refine_type(yyvsp[-3].type_l, yyvsp[-1].type_decl_l); }
02783     break;
02784 
02785   case 130:
02786 #line 888 "parse.y"
02787     { yyval.type = refine_type(yyvsp[0].type_l, 0); }
02788     break;
02789 
02790   case 131:
02791 #line 893 "parse.y"
02792     { yyval.type = yyvsp[0].type; }
02793     break;
02794 
02795   case 132:
02796 #line 895 "parse.y"
02797     { yyval.type = 0; }
02798     break;
02799 
02800   case 133:
02801 #line 899 "parse.y"
02802     { yyval.ic = INIT_NONE; }
02803     break;
02804 
02805   case 134:
02806 #line 900 "parse.y"
02807     { yyval.ic = INIT_FULL; }
02808     break;
02809 
02810   case 135:
02811 #line 901 "parse.y"
02812     { yyval.ic = INIT_EXTRA; }
02813     break;
02814 
02815   case 136:
02816 #line 902 "parse.y"
02817     { yyval.ic = INIT_REMOVE; }
02818     break;
02819 
02820   case 137:
02821 #line 906 "parse.y"
02822     { ++in_init; }
02823     break;
02824 
02825   case 138:
02826 #line 906 "parse.y"
02827     { --in_init; }
02828     break;
02829 
02830   case 139:
02831 #line 907 "parse.y"
02832     { yyval.expr = yyvsp[-1].expr; }
02833     break;
02834 
02835   case 140:
02836 #line 909 "parse.y"
02837     { yyval.expr = 0; }
02838     break;
02839 
02840   case 141:
02841 #line 914 "parse.y"
02842     { yyval.expr = yyvsp[-1].list; }
02843     break;
02844 
02845   case 142:
02846 #line 916 "parse.y"
02847     { yyval.expr = yyvsp[-2].list; }
02848     break;
02849 
02850   case 145:
02851 #line 923 "parse.y"
02852     { yyval.attr_l = 0; }
02853     break;
02854 
02855   case 146:
02856 #line 928 "parse.y"
02857     { yyvsp[-1].attr_l->append(yyvsp[0].attr); }
02858     break;
02859 
02860   case 147:
02861 #line 930 "parse.y"
02862     {
02863                         yyval.attr_l = new attr_list;
02864                         yyval.attr_l->append(yyvsp[0].attr);
02865                         }
02866     break;
02867 
02868   case 148:
02869 #line 938 "parse.y"
02870     { yyval.attr = new Attr(ATTR_DEFAULT, yyvsp[0].expr); }
02871     break;
02872 
02873   case 149:
02874 #line 940 "parse.y"
02875     { yyval.attr = new Attr(ATTR_OPTIONAL); }
02876     break;
02877 
02878   case 150:
02879 #line 942 "parse.y"
02880     { yyval.attr = new Attr(ATTR_REDEF); }
02881     break;
02882 
02883   case 151:
02884 #line 944 "parse.y"
02885     { yyval.attr = new Attr(ATTR_ROTATE_INTERVAL, yyvsp[0].expr); }
02886     break;
02887 
02888   case 152:
02889 #line 946 "parse.y"
02890     { yyval.attr = new Attr(ATTR_ROTATE_SIZE, yyvsp[0].expr); }
02891     break;
02892 
02893   case 153:
02894 #line 948 "parse.y"
02895     { yyval.attr = new Attr(ATTR_ADD_FUNC, yyvsp[0].expr); }
02896     break;
02897 
02898   case 154:
02899 #line 950 "parse.y"
02900     { yyval.attr = new Attr(ATTR_DEL_FUNC, yyvsp[0].expr); }
02901     break;
02902 
02903   case 155:
02904 #line 952 "parse.y"
02905     { yyval.attr = new Attr(ATTR_EXPIRE_FUNC, yyvsp[0].expr); }
02906     break;
02907 
02908   case 156:
02909 #line 954 "parse.y"
02910     { yyval.attr = new Attr(ATTR_EXPIRE_CREATE, yyvsp[0].expr); }
02911     break;
02912 
02913   case 157:
02914 #line 956 "parse.y"
02915     { yyval.attr = new Attr(ATTR_EXPIRE_READ, yyvsp[0].expr); }
02916     break;
02917 
02918   case 158:
02919 #line 958 "parse.y"
02920     { yyval.attr = new Attr(ATTR_EXPIRE_WRITE, yyvsp[0].expr); }
02921     break;
02922 
02923   case 159:
02924 #line 960 "parse.y"
02925     { yyval.attr = new Attr(ATTR_PERSISTENT); }
02926     break;
02927 
02928   case 160:
02929 #line 962 "parse.y"
02930     { yyval.attr = new Attr(ATTR_SYNCHRONIZED); }
02931     break;
02932 
02933   case 161:
02934 #line 964 "parse.y"
02935     { yyval.attr = new Attr(ATTR_ENCRYPT); }
02936     break;
02937 
02938   case 162:
02939 #line 966 "parse.y"
02940     { yyval.attr = new Attr(ATTR_ENCRYPT, yyvsp[0].expr); }
02941     break;
02942 
02943   case 163:
02944 #line 968 "parse.y"
02945     { yyval.attr = new Attr(ATTR_MATCH); }
02946     break;
02947 
02948   case 164:
02949 #line 973 "parse.y"
02950     {
02951                         set_location(yylsp[-2], yylsp[0]);
02952                         yyval.stmt = yyvsp[-1].stmt;
02953                         }
02954     break;
02955 
02956   case 165:
02957 #line 979 "parse.y"
02958     {
02959                         set_location(yylsp[-2], yylsp[0]);
02960                         yyval.stmt = new AlarmStmt(yyvsp[-1].list);
02961                         }
02962     break;
02963 
02964   case 166:
02965 #line 985 "parse.y"
02966     {
02967                         set_location(yylsp[-2], yylsp[0]);
02968                         yyval.stmt = new PrintStmt(yyvsp[-1].list);
02969                         }
02970     break;
02971 
02972   case 167:
02973 #line 991 "parse.y"
02974     {
02975                         set_location(yylsp[-2], yylsp[0]);
02976                         yyval.stmt = new EventStmt(yyvsp[-1].event_expr);
02977                         }
02978     break;
02979 
02980   case 168:
02981 #line 997 "parse.y"
02982     {
02983                         set_location(yylsp[-4], yylsp[-1]);
02984                         yyval.stmt = new IfStmt(yyvsp[-2].expr, yyvsp[0].stmt, new NullStmt());
02985                         }
02986     break;
02987 
02988   case 169:
02989 #line 1003 "parse.y"
02990     {
02991                         set_location(yylsp[-6], yylsp[-3]);
02992                         yyval.stmt = new IfStmt(yyvsp[-4].expr, yyvsp[-2].stmt, yyvsp[0].stmt);
02993                         }
02994     break;
02995 
02996   case 170:
02997 #line 1009 "parse.y"
02998     {
02999                         set_location(yylsp[-4], yylsp[-3]);
03000                         yyval.stmt = new SwitchStmt(yyvsp[-3].expr, yyvsp[-1].case_l);
03001                         }
03002     break;
03003 
03004   case 171:
03005 #line 1015 "parse.y"
03006     { yyvsp[-1].stmt->AsForStmt()->AddBody(yyvsp[0].stmt); }
03007     break;
03008 
03009   case 172:
03010 #line 1018 "parse.y"
03011     {
03012                         set_location(yylsp[-1], yylsp[0]);
03013                         yyval.stmt = new NextStmt;
03014                         }
03015     break;
03016 
03017   case 173:
03018 #line 1024 "parse.y"
03019     {
03020                         set_location(yylsp[-1], yylsp[0]);
03021                         yyval.stmt = new BreakStmt;
03022                         }
03023     break;
03024 
03025   case 174:
03026 #line 1030 "parse.y"
03027     {
03028                         set_location(yylsp[-1], yylsp[0]);
03029                         yyval.stmt = new ReturnStmt(0);
03030                         }
03031     break;
03032 
03033   case 175:
03034 #line 1036 "parse.y"
03035     {
03036                         set_location(yylsp[-2], yylsp[-1]);
03037                         yyval.stmt = new ReturnStmt(yyvsp[-1].expr);
03038                         }
03039     break;
03040 
03041   case 176:
03042 #line 1042 "parse.y"
03043     {
03044                         set_location(yylsp[-2], yylsp[0]);
03045                         yyval.stmt = new AddStmt(yyvsp[-1].expr);
03046                         }
03047     break;
03048 
03049   case 177:
03050 #line 1048 "parse.y"
03051     {
03052                         set_location(yylsp[-2], yylsp[0]);
03053                         yyval.stmt = new DelStmt(yyvsp[-1].expr);
03054                         }
03055     break;
03056 
03057   case 178:
03058 #line 1054 "parse.y"
03059     {
03060                         set_location(yylsp[-6], yylsp[0]);
03061                         yyval.stmt = add_local(yyvsp[-5].id, yyvsp[-4].type, yyvsp[-3].ic, yyvsp[-2].expr, yyvsp[-1].attr_l, VAR_REGULAR);
03062                         }
03063     break;
03064 
03065   case 179:
03066 #line 1060 "parse.y"
03067     {
03068                         set_location(yylsp[-6], yylsp[-1]);
03069                         yyval.stmt = add_local(yyvsp[-5].id, yyvsp[-4].type, yyvsp[-3].ic, yyvsp[-2].expr, yyvsp[-1].attr_l, VAR_CONST);
03070                         }
03071     break;
03072 
03073   case 180:
03074 #line 1066 "parse.y"
03075     {
03076                         set_location(yylsp[-1], yylsp[0]);
03077                         yyval.stmt = new ExprStmt(yyvsp[-1].expr);
03078                         }
03079     break;
03080 
03081   case 181:
03082 #line 1072 "parse.y"
03083     {
03084                         set_location(yylsp[0], yylsp[0]);
03085                         yyval.stmt = new NullStmt;
03086                         }
03087     break;
03088 
03089   case 182:
03090 #line 1078 "parse.y"
03091     { yyval.stmt = new NullStmt; }
03092     break;
03093 
03094   case 183:
03095 #line 1083 "parse.y"
03096     {
03097                         set_location(yylsp[-1], yylsp[0]);
03098                         yyvsp[-1].stmt->AsStmtList()->Stmts().append(yyvsp[0].stmt);
03099                         }
03100     break;
03101 
03102   case 184:
03103 #line 1088 "parse.y"
03104     { yyval.stmt = new StmtList(); }
03105     break;
03106 
03107   case 185:
03108 #line 1093 "parse.y"
03109     {
03110                         set_location(yylsp[-3], yylsp[0]);
03111                         yyval.event_expr = new EventExpr(yyvsp[-3].str, yyvsp[-1].list);
03112                         }
03113     break;
03114 
03115   case 186:
03116 #line 1101 "parse.y"
03117     { yyvsp[-1].case_l->append(yyvsp[0].c_case); }
03118     break;
03119 
03120   case 187:
03121 #line 1103 "parse.y"
03122     { yyval.case_l = new case_list; }
03123     break;
03124 
03125   case 188:
03126 #line 1108 "parse.y"
03127     { yyval.c_case = new Case(yyvsp[-2].list, yyvsp[0].stmt); }
03128     break;
03129 
03130   case 189:
03131 #line 1111 "parse.y"
03132     { yyval.c_case = new Case(0, yyvsp[0].stmt); }
03133     break;
03134 
03135   case 190:
03136 #line 1116 "parse.y"
03137     {
03138                         set_location(yylsp[-5], yylsp[0]);
03139 
03140                         // This rule needs to be separate from the loop
03141                         // body so that we execute these actions - defining
03142                         // the local variable - prior to parsing the body,
03143                         // which might refer to the variable.
03144                         ID* loop_var = lookup_ID(yyvsp[-3].str, current_module.c_str());
03145 
03146                         if ( loop_var )
03147                                 {
03148                                 if ( loop_var->IsGlobal() )
03149                                         loop_var->Error("global used in for loop");
03150                                 }
03151 
03152                         else
03153                                 loop_var = install_ID(yyvsp[-3].str, current_module.c_str(),
03154                                                       false, false);
03155 
03156                         id_list* loop_vars = new id_list;
03157                         loop_vars->append(loop_var);
03158 
03159                         yyval.stmt = new ForStmt(loop_vars, yyvsp[-1].expr);
03160                         }
03161     break;
03162 
03163   case 191:
03164 #line 1142 "parse.y"
03165     { yyval.stmt = new ForStmt(yyvsp[-4].id_l, yyvsp[-1].expr); }
03166     break;
03167 
03168   case 192:
03169 #line 1147 "parse.y"
03170     { yyvsp[-2].id_l->append(yyvsp[0].id); }
03171     break;
03172 
03173   case 193:
03174 #line 1149 "parse.y"
03175     {
03176                         yyval.id_l = new id_list;
03177                         yyval.id_l->append(yyvsp[0].id);
03178                         }
03179     break;
03180 
03181   case 194:
03182 #line 1157 "parse.y"
03183     {
03184                         set_location(yylsp[0]);
03185 
03186                         yyval.id = lookup_ID(yyvsp[0].str, current_module.c_str());
03187                         if ( yyval.id )
03188                                 {
03189                                 if ( yyval.id->IsGlobal() )
03190                                         yyval.id->Error("already a global identifier");
03191                                 delete [] yyvsp[0].str;
03192                                 }
03193 
03194                         else
03195                                 {
03196                                 yyval.id = install_ID(yyvsp[0].str, current_module.c_str(),
03197                                                 false, is_export);
03198                                 }
03199                         }
03200     break;
03201 
03202   case 195:
03203 #line 1177 "parse.y"
03204     { resolving_global_ID = 1; }
03205     break;
03206 
03207   case 196:
03208 #line 1178 "parse.y"
03209     { yyval.id = yyvsp[0].id; }
03210     break;
03211 
03212   case 197:
03213 #line 1182 "parse.y"
03214     { resolving_global_ID = 0; }
03215     break;
03216 
03217   case 198:
03218 #line 1183 "parse.y"
03219     { yyval.id = yyvsp[0].id; }
03220     break;
03221 
03222   case 199:
03223 #line 1188 "parse.y"
03224     {
03225                         set_location(yylsp[0]);
03226 
03227                         yyval.id = lookup_ID(yyvsp[0].str, current_module.c_str(), false);
03228                         if ( yyval.id )
03229                                 {
03230                                 if ( ! yyval.id->IsGlobal() )
03231                                         yyval.id->Error("already a local identifier");
03232 
03233                                 delete [] yyvsp[0].str;
03234                                 }
03235 
03236                         else
03237                                 {
03238                                 const char* module_name =
03239                                         resolving_global_ID ?
03240                                                 current_module.c_str() : 0;
03241                                         
03242                                 yyval.id = install_ID(yyvsp[0].str, module_name,
03243                                                 true, is_export);
03244                                 }
03245                         }
03246     break;
03247 
03248   case 200:
03249 #line 1215 "parse.y"
03250     {
03251                         set_location(yylsp[0]);
03252                         yyval.id = lookup_ID(yyvsp[0].str, current_module.c_str());
03253                         if ( ! yyval.id )
03254                                 error("identifier not defined:", yyvsp[0].str);
03255                         delete [] yyvsp[0].str;
03256                         }
03257     break;
03258 
03259 
03260     }
03261 
03262 /* Line 993 of yacc.c.  */
03263 #line 3264 "y.tab.c"
03264 
03265   yyvsp -= yylen;
03266   yyssp -= yylen;
03267   yylsp -= yylen;
03268 
03269   YY_STACK_PRINT (yyss, yyssp);
03270 
03271   *++yyvsp = yyval;
03272   *++yylsp = yyloc;
03273 
03274   /* Now `shift' the result of the reduction.  Determine what state
03275      that goes to, based on the state we popped back to and the rule
03276      number reduced by.  */
03277 
03278   yyn = yyr1[yyn];
03279 
03280   yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
03281   if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
03282     yystate = yytable[yystate];
03283   else
03284     yystate = yydefgoto[yyn - YYNTOKENS];
03285 
03286   goto yynewstate;
03287 
03288 
03289 /*------------------------------------.
03290 | yyerrlab -- here on detecting error |
03291 `------------------------------------*/
03292 yyerrlab:
03293   /* If not already recovering from an error, report this error.  */
03294   if (!yyerrstatus)
03295     {
03296       ++yynerrs;
03297 #if YYERROR_VERBOSE
03298       yyn = yypact[yystate];
03299 
03300       if (YYPACT_NINF < yyn && yyn < YYLAST)
03301         {
03302           YYSIZE_T yysize = 0;
03303           int yytype = YYTRANSLATE (yychar);
03304           const char* yyprefix;
03305           char *yymsg;
03306           int yyx;
03307 
03308           /* Start YYX at -YYN if negative to avoid negative indexes in
03309              YYCHECK.  */
03310           int yyxbegin = yyn < 0 ? -yyn : 0;
03311 
03312           /* Stay within bounds of both yycheck and yytname.  */
03313           int yychecklim = YYLAST - yyn;
03314           int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
03315           int yycount = 0;
03316 
03317           yyprefix = ", expecting ";
03318           for (yyx = yyxbegin; yyx < yyxend; ++yyx)
03319             if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
03320               {
03321                 yysize += yystrlen (yyprefix) + yystrlen (yytname [yyx]);
03322                 yycount += 1;
03323                 if (yycount == 5)
03324                   {
03325                     yysize = 0;
03326                     break;
03327                   }
03328               }
03329           yysize += (sizeof ("syntax error, unexpected ")
03330                      + yystrlen (yytname[yytype]));
03331           yymsg = (char *) YYSTACK_ALLOC (yysize);
03332           if (yymsg != 0)
03333             {
03334               char *yyp = yystpcpy (yymsg, "syntax error, unexpected ");
03335               yyp = yystpcpy (yyp, yytname[yytype]);
03336 
03337               if (yycount < 5)
03338                 {
03339                   yyprefix = ", expecting ";
03340                   for (yyx = yyxbegin; yyx < yyxend; ++yyx)
03341                     if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
03342                       {
03343                         yyp = yystpcpy (yyp, yyprefix);
03344                         yyp = yystpcpy (yyp, yytname[yyx]);
03345                         yyprefix = " or ";
03346                       }
03347                 }
03348               yyerror (yymsg);
03349               YYSTACK_FREE (yymsg);
03350             }
03351           else
03352             yyerror ("syntax error; also virtual memory exhausted");
03353         }
03354       else
03355 #endif /* YYERROR_VERBOSE */
03356         yyerror ("syntax error");
03357     }
03358 
03359   yylerrsp = yylsp;
03360 
03361   if (yyerrstatus == 3)
03362     {
03363       /* If just tried and failed to reuse lookahead token after an
03364          error, discard it.  */
03365 
03366       if (yychar <= YYEOF)
03367         {
03368           /* If at end of input, pop the error token,
03369              then the rest of the stack, then return failure.  */
03370           if (yychar == YYEOF)
03371              for (;;)
03372                {
03373                  YYPOPSTACK;
03374                  if (yyssp == yyss)
03375                    YYABORT;
03376                  YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp);
03377                  yydestruct (yystos[*yyssp], yyvsp, yylsp);
03378                }
03379         }
03380       else
03381         {
03382           YYDSYMPRINTF ("Error: discarding", yytoken, &yylval, &yylloc);
03383           yydestruct (yytoken, &yylval, &yylloc);
03384           yychar = YYEMPTY;
03385           *++yylerrsp = yylloc;
03386         }
03387     }
03388 
03389   /* Else will try to reuse lookahead token after shifting the error
03390      token.  */
03391   goto yyerrlab1;
03392 
03393 
03394 /*---------------------------------------------------.
03395 | yyerrorlab -- error raised explicitly by YYERROR.  |
03396 `---------------------------------------------------*/
03397 yyerrorlab:
03398 
03399 #ifdef __GNUC__
03400   /* Pacify GCC when the user code never invokes YYERROR and the label
03401      yyerrorlab therefore never appears in user code.  */
03402   if (0)
03403      goto yyerrorlab;
03404 #endif
03405 
03406   yyvsp -= yylen;
03407   yyssp -= yylen;
03408   yystate = *yyssp;
03409   yylerrsp = yylsp;
03410   *++yylerrsp = yyloc;
03411   yylsp -= yylen;
03412   goto yyerrlab1;
03413 
03414 
03415 /*-------------------------------------------------------------.
03416 | yyerrlab1 -- common code for both syntax error and YYERROR.  |
03417 `-------------------------------------------------------------*/
03418 yyerrlab1:
03419   yyerrstatus = 3;      /* Each real token shifted decrements this.  */
03420 
03421   for (;;)
03422     {
03423       yyn = yypact[yystate];
03424       if (yyn != YYPACT_NINF)
03425         {
03426           yyn += YYTERROR;
03427           if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
03428             {
03429               yyn = yytable[yyn];
03430               if (0 < yyn)
03431                 break;
03432             }
03433         }
03434 
03435       /* Pop the current state because it cannot handle the error token.  */
03436       if (yyssp == yyss)
03437         YYABORT;
03438 
03439       YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp);
03440       yydestruct (yystos[yystate], yyvsp, yylsp);
03441       YYPOPSTACK;
03442       yystate = *yyssp;
03443       YY_STACK_PRINT (yyss, yyssp);
03444     }
03445 
03446   if (yyn == YYFINAL)
03447     YYACCEPT;
03448 
03449   YYDPRINTF ((stderr, "Shifting error token, "));
03450 
03451   *++yyvsp = yylval;
03452   YYLLOC_DEFAULT (yyloc, yylsp, yylerrsp - yylsp);
03453   *++yylsp = yyloc;
03454 
03455   yystate = yyn;
03456   goto yynewstate;
03457 
03458 
03459 /*-------------------------------------.
03460 | yyacceptlab -- YYACCEPT comes here.  |
03461 `-------------------------------------*/
03462 yyacceptlab:
03463   yyresult = 0;
03464   goto yyreturn;
03465 
03466 /*-----------------------------------.
03467 | yyabortlab -- YYABORT comes here.  |
03468 `-----------------------------------*/
03469 yyabortlab:
03470   yyresult = 1;
03471   goto yyreturn;
03472 
03473 #ifndef yyoverflow
03474 /*----------------------------------------------.
03475 | yyoverflowlab -- parser overflow comes here.  |
03476 `----------------------------------------------*/
03477 yyoverflowlab:
03478   yyerror ("parser stack overflow");
03479   yyresult = 2;
03480   /* Fall through.  */
03481 #endif
03482 
03483 yyreturn:
03484 #ifndef yyoverflow
03485   if (yyss != yyssa)
03486     YYSTACK_FREE (yyss);
03487 #endif
03488   return yyresult;
03489 }
03490 
03491 
03492 #line 1224 "parse.y"
03493 
03494 
03495 int yyerror(const char msg[])
03496         {
03497         char* msgbuf = new char[strlen(msg) + strlen(last_tok) + 64];
03498 
03499         if ( last_tok[0] == '\n' )
03500                 sprintf(msgbuf, "%s, on previous line", msg);
03501         else if ( last_tok[0] == '\0' )
03502                 sprintf(msgbuf, "%s, at end of file", msg);
03503         else
03504                 sprintf(msgbuf, "%s, at or near \"%s\"", msg, last_tok);
03505 
03506         error(msgbuf);
03507 
03508         return 0;
03509         }
03510 

Generated on Wed Sep 14 02:56:19 2005 for bro_docs by doxygen 1.3.5