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

parse.cc File Reference

#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include "input.h"
#include "Expr.h"
#include "Stmt.h"
#include "Var.h"
#include "DNS.h"
#include "RE.h"
#include "Scope.h"
#include <stdio.h>

Include dependency graph for parse.cc:

Include dependency graph

Go to the source code of this file.

Classes

union  yyalloc
union  YYSTYPE

Defines

#define YYBISON   1
#define YYSKELETON_NAME   "yacc.c"
#define YYPURE   0
#define YYLSP_NEEDED   1
#define TOK_ADD   258
#define TOK_ADD_TO   259
#define TOK_ADDR   260
#define TOK_ALARM   261
#define TOK_ANY   262
#define TOK_ATENDIF   263
#define TOK_ATELSE   264
#define TOK_ATIF   265
#define TOK_ATIFDEF   266
#define TOK_ATIFNDEF   267
#define TOK_BOOL   268
#define TOK_BREAK   269
#define TOK_CASE   270
#define TOK_CONST   271
#define TOK_CONSTANT   272
#define TOK_COUNT   273
#define TOK_COUNTER   274
#define TOK_DEFAULT   275
#define TOK_DELETE   276
#define TOK_DOUBLE   277
#define TOK_ELSE   278
#define TOK_ENUM   279
#define TOK_EVENT   280
#define TOK_EXPORT   281
#define TOK_FILE   282
#define TOK_FOR   283
#define TOK_FUNCTION   284
#define TOK_GLOBAL   285
#define TOK_GLOBAL_ATTR   286
#define TOK_ID   287
#define TOK_IF   288
#define TOK_INT   289
#define TOK_INTERVAL   290
#define TOK_LIST   291
#define TOK_LOCAL   292
#define TOK_MODULE   293
#define TOK_MATCH   294
#define TOK_NET   295
#define TOK_NEXT   296
#define TOK_OF   297
#define TOK_PATTERN   298
#define TOK_PATTERN_TEXT   299
#define TOK_PORT   300
#define TOK_PRINT   301
#define TOK_RECORD   302
#define TOK_REDEF   303
#define TOK_REMOVE_FROM   304
#define TOK_RETURN   305
#define TOK_SCHEDULE   306
#define TOK_SET   307
#define TOK_STRING   308
#define TOK_SUBNET   309
#define TOK_SWITCH   310
#define TOK_TABLE   311
#define TOK_THIS   312
#define TOK_TIME   313
#define TOK_TIMER   314
#define TOK_TYPE   315
#define TOK_UNION   316
#define TOK_VECTOR   317
#define TOK_ATTR_ADD_FUNC   318
#define TOK_ATTR_ATTR   319
#define TOK_ATTR_ENCRYPT   320
#define TOK_ATTR_DEFAULT   321
#define TOK_ATTR_OPTIONAL   322
#define TOK_ATTR_REDEF   323
#define TOK_ATTR_ROTATE_INTERVAL   324
#define TOK_ATTR_ROTATE_SIZE   325
#define TOK_ATTR_DEL_FUNC   326
#define TOK_ATTR_EXPIRE_FUNC   327
#define TOK_ATTR_EXPIRE_CREATE   328
#define TOK_ATTR_EXPIRE_READ   329
#define TOK_ATTR_EXPIRE_WRITE   330
#define TOK_ATTR_PERSISTENT   331
#define TOK_ATTR_MATCH   332
#define TOK_ATTR_SYNCHRONIZED   333
#define TOK_DEBUG   334
#define TOK_USING   335
#define TOK_OR   336
#define TOK_AND   337
#define TOK_NE   338
#define TOK_EQ   339
#define TOK_GE   340
#define TOK_LE   341
#define TOK_NOT_IN   342
#define TOK_IN   343
#define TOK_DECR   344
#define TOK_INCR   345
#define TOK_HAS_ATTR   346
#define TOK_HAS_FIELD   347
#define YYLLOC_DEFAULT(Current, Rhs, N)   (Current) = (Rhs)[(N)];
#define YYLTYPE   yyltype
#define YYDEBUG   1
#define YYERROR_VERBOSE   0
#define yystype   YYSTYPE
#define YYSTYPE_IS_DECLARED   1
#define YYSTYPE_IS_TRIVIAL   1
#define YYSTACK_ALLOC   malloc
#define YYSTACK_FREE   free
#define YYSTACK_GAP_MAXIMUM   (sizeof (union yyalloc) - 1)
#define YYSTACK_BYTES(N)
#define YYCOPY(To, From, Count)
#define YYSTACK_RELOCATE(Stack)
#define YYFINAL   5
#define YYLAST   1213
#define YYNTOKENS   114
#define YYNNTS   56
#define YYNRULES   200
#define YYNSTATES   435
#define YYUNDEFTOK   2
#define YYMAXUTOK   347
#define YYTRANSLATE(YYX)   ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
#define YYPACT_NINF   -261
#define YYTABLE_NINF   -141
#define YYSIZE_T   unsigned int
#define yyerrok   (yyerrstatus = 0)
#define yyclearin   (yychar = YYEMPTY)
#define YYEMPTY   (-2)
#define YYEOF   0
#define YYACCEPT   goto yyacceptlab
#define YYABORT   goto yyabortlab
#define YYERROR   goto yyerrorlab
#define YYFAIL   goto yyerrlab
#define YYRECOVERING()   (!!yyerrstatus)
#define YYBACKUP(Token, Value)
#define YYTERROR   1
#define YYERRCODE   256
#define YYLEX   brolex ()
#define YYFPRINTF   fprintf
#define YYDPRINTF(Args)
#define YYDSYMPRINT(Args)
#define YYDSYMPRINTF(Title, Token, Value, Location)
#define YY_STACK_PRINT(Bottom, Top)
#define YY_REDUCE_PRINT(Rule)
#define YYINITDEPTH   200
#define YYMAXDEPTH   10000
#define YYPOPSTACK   (yyvsp--, yyssp--, yylsp--)

Typedefs

typedef YYSTYPE YYSTYPE
typedef short yysigned_char

Enumerations

enum  yytokentype {
  TOK_ADD = 258, TOK_ADD_TO = 259, TOK_ADDR = 260, TOK_ALARM = 261,
  TOK_ANY = 262, TOK_ATENDIF = 263, TOK_ATELSE = 264, TOK_ATIF = 265,
  TOK_ATIFDEF = 266, TOK_ATIFNDEF = 267, TOK_BOOL = 268, TOK_BREAK = 269,
  TOK_CASE = 270, TOK_CONST = 271, TOK_CONSTANT = 272, TOK_COUNT = 273,
  TOK_COUNTER = 274, TOK_DEFAULT = 275, TOK_DELETE = 276, TOK_DOUBLE = 277,
  TOK_ELSE = 278, TOK_ENUM = 279, TOK_EVENT = 280, TOK_EXPORT = 281,
  TOK_FILE = 282, TOK_FOR = 283, TOK_FUNCTION = 284, TOK_GLOBAL = 285,
  TOK_GLOBAL_ATTR = 286, TOK_ID = 287, TOK_IF = 288, TOK_INT = 289,
  TOK_INTERVAL = 290, TOK_LIST = 291, TOK_LOCAL = 292, TOK_MODULE = 293,
  TOK_MATCH = 294, TOK_NET = 295, TOK_NEXT = 296, TOK_OF = 297,
  TOK_PATTERN = 298, TOK_PATTERN_TEXT = 299, TOK_PORT = 300, TOK_PRINT = 301,
  TOK_RECORD = 302, TOK_REDEF = 303, TOK_REMOVE_FROM = 304, TOK_RETURN = 305,
  TOK_SCHEDULE = 306, TOK_SET = 307, TOK_STRING = 308, TOK_SUBNET = 309,
  TOK_SWITCH = 310, TOK_TABLE = 311, TOK_THIS = 312, TOK_TIME = 313,
  TOK_TIMER = 314, TOK_TYPE = 315, TOK_UNION = 316, TOK_VECTOR = 317,
  TOK_ATTR_ADD_FUNC = 318, TOK_ATTR_ATTR = 319, TOK_ATTR_ENCRYPT = 320, TOK_ATTR_DEFAULT = 321,
  TOK_ATTR_OPTIONAL = 322, TOK_ATTR_REDEF = 323, TOK_ATTR_ROTATE_INTERVAL = 324, TOK_ATTR_ROTATE_SIZE = 325,
  TOK_ATTR_DEL_FUNC = 326, TOK_ATTR_EXPIRE_FUNC = 327, TOK_ATTR_EXPIRE_CREATE = 328, TOK_ATTR_EXPIRE_READ = 329,
  TOK_ATTR_EXPIRE_WRITE = 330, TOK_ATTR_PERSISTENT = 331, TOK_ATTR_MATCH = 332, TOK_ATTR_SYNCHRONIZED = 333,
  TOK_DEBUG = 334, TOK_USING = 335, TOK_OR = 336, TOK_AND = 337,
  TOK_NE = 338, TOK_EQ = 339, TOK_GE = 340, TOK_LE = 341,
  TOK_NOT_IN = 342, TOK_IN = 343, TOK_DECR = 344, TOK_INCR = 345,
  TOK_HAS_ATTR = 346, TOK_HAS_FIELD = 347
}

Functions

YYLTYPE GetCurrentLocation ()
int yyerror (const char[])
int brolex ()
void yy_stack_print (bottom, top) short *bottom
void yysymprint (yyoutput, yytype, yyvaluep, yylocationp) FILE *yyoutput
int yyparse ()

Variables

string current_module = GLOBAL_MODULE_NAME
bool is_export = false
Exprg_curr_debug_expr
Exprbro_this = 0
int in_init = 0
bool in_debug = false
bool resolving_global_ID = false
IDfunc_id = 0
const unsigned char yytranslate []
const unsigned short yyprhs []
const short yyrhs []
const unsigned short yyrline []
const char *const  yytname []
const unsigned char yyr1 []
const unsigned char yyr2 []
const unsigned char yydefact []
const short yydefgoto []
const short yypact []
const short yypgoto []
const short yytable []
const short yycheck []
const unsigned char yystos []
short * top
int yytype
YYSTYPEyyvaluep
YYLTYPEyylocationp
int yychar
YYSTYPE yylval
int yynerrs
YYLTYPE yylloc


Define Documentation

#define TOK_ADD   258
 

Definition at line 148 of file parse.cc.

#define TOK_ADD_TO   259
 

Definition at line 149 of file parse.cc.

#define TOK_ADDR   260
 

Definition at line 150 of file parse.cc.

#define TOK_ALARM   261
 

Definition at line 151 of file parse.cc.

#define TOK_AND   337
 

Definition at line 227 of file parse.cc.

#define TOK_ANY   262
 

Definition at line 152 of file parse.cc.

#define TOK_ATELSE   264
 

Definition at line 154 of file parse.cc.

#define TOK_ATENDIF   263
 

Definition at line 153 of file parse.cc.

#define TOK_ATIF   265
 

Definition at line 155 of file parse.cc.

#define TOK_ATIFDEF   266
 

Definition at line 156 of file parse.cc.

#define TOK_ATIFNDEF   267
 

Definition at line 157 of file parse.cc.

#define TOK_ATTR_ADD_FUNC   318
 

Definition at line 208 of file parse.cc.

#define TOK_ATTR_ATTR   319
 

Definition at line 209 of file parse.cc.

#define TOK_ATTR_DEFAULT   321
 

Definition at line 211 of file parse.cc.

#define TOK_ATTR_DEL_FUNC   326
 

Definition at line 216 of file parse.cc.

#define TOK_ATTR_ENCRYPT   320
 

Definition at line 210 of file parse.cc.

#define TOK_ATTR_EXPIRE_CREATE   328
 

Definition at line 218 of file parse.cc.

#define TOK_ATTR_EXPIRE_FUNC   327
 

Definition at line 217 of file parse.cc.

#define TOK_ATTR_EXPIRE_READ   329
 

Definition at line 219 of file parse.cc.

#define TOK_ATTR_EXPIRE_WRITE   330
 

Definition at line 220 of file parse.cc.

#define TOK_ATTR_MATCH   332
 

Definition at line 222 of file parse.cc.

#define TOK_ATTR_OPTIONAL   322
 

Definition at line 212 of file parse.cc.

#define TOK_ATTR_PERSISTENT   331
 

Definition at line 221 of file parse.cc.

#define TOK_ATTR_REDEF   323
 

Definition at line 213 of file parse.cc.

#define TOK_ATTR_ROTATE_INTERVAL   324
 

Definition at line 214 of file parse.cc.

#define TOK_ATTR_ROTATE_SIZE   325
 

Definition at line 215 of file parse.cc.

#define TOK_ATTR_SYNCHRONIZED   333
 

Definition at line 223 of file parse.cc.

#define TOK_BOOL   268
 

Definition at line 158 of file parse.cc.

#define TOK_BREAK   269
 

Definition at line 159 of file parse.cc.

#define TOK_CASE   270
 

Definition at line 160 of file parse.cc.

#define TOK_CONST   271
 

Definition at line 161 of file parse.cc.

#define TOK_CONSTANT   272
 

Definition at line 162 of file parse.cc.

#define TOK_COUNT   273
 

Definition at line 163 of file parse.cc.

#define TOK_COUNTER   274
 

Definition at line 164 of file parse.cc.

#define TOK_DEBUG   334
 

Definition at line 224 of file parse.cc.

#define TOK_DECR   344
 

Definition at line 234 of file parse.cc.

#define TOK_DEFAULT   275
 

Definition at line 165 of file parse.cc.

#define TOK_DELETE   276
 

Definition at line 166 of file parse.cc.

#define TOK_DOUBLE   277
 

Definition at line 167 of file parse.cc.

#define TOK_ELSE   278
 

Definition at line 168 of file parse.cc.

#define TOK_ENUM   279
 

Definition at line 169 of file parse.cc.

#define TOK_EQ   339
 

Definition at line 229 of file parse.cc.

#define TOK_EVENT   280
 

Definition at line 170 of file parse.cc.

#define TOK_EXPORT   281
 

Definition at line 171 of file parse.cc.

#define TOK_FILE   282
 

Definition at line 172 of file parse.cc.

#define TOK_FOR   283
 

Definition at line 173 of file parse.cc.

#define TOK_FUNCTION   284
 

Definition at line 174 of file parse.cc.

#define TOK_GE   340
 

Definition at line 230 of file parse.cc.

#define TOK_GLOBAL   285
 

Definition at line 175 of file parse.cc.

#define TOK_GLOBAL_ATTR   286
 

Definition at line 176 of file parse.cc.

#define TOK_HAS_ATTR   346
 

Definition at line 236 of file parse.cc.

#define TOK_HAS_FIELD   347
 

Definition at line 237 of file parse.cc.

#define TOK_ID   287
 

Definition at line 177 of file parse.cc.

#define TOK_IF   288
 

Definition at line 178 of file parse.cc.

#define TOK_IN   343
 

Definition at line 233 of file parse.cc.

#define TOK_INCR   345
 

Definition at line 235 of file parse.cc.

#define TOK_INT   289
 

Definition at line 179 of file parse.cc.

#define TOK_INTERVAL   290
 

Definition at line 180 of file parse.cc.

#define TOK_LE   341
 

Definition at line 231 of file parse.cc.

#define TOK_LIST   291
 

Definition at line 181 of file parse.cc.

#define TOK_LOCAL   292
 

Definition at line 182 of file parse.cc.

#define TOK_MATCH   294
 

Definition at line 184 of file parse.cc.

#define TOK_MODULE   293
 

Definition at line 183 of file parse.cc.

#define TOK_NE   338
 

Definition at line 228 of file parse.cc.

#define TOK_NET   295
 

Definition at line 185 of file parse.cc.

#define TOK_NEXT   296
 

Definition at line 186 of file parse.cc.

#define TOK_NOT_IN   342
 

Definition at line 232 of file parse.cc.

#define TOK_OF   297
 

Definition at line 187 of file parse.cc.

#define TOK_OR   336
 

Definition at line 226 of file parse.cc.

#define TOK_PATTERN   298
 

Definition at line 188 of file parse.cc.

#define TOK_PATTERN_TEXT   299
 

Definition at line 189 of file parse.cc.

#define TOK_PORT   300
 

Definition at line 190 of file parse.cc.

#define TOK_PRINT   301
 

Definition at line 191 of file parse.cc.

#define TOK_RECORD   302
 

Definition at line 192 of file parse.cc.

#define TOK_REDEF   303
 

Definition at line 193 of file parse.cc.

#define TOK_REMOVE_FROM   304
 

Definition at line 194 of file parse.cc.

#define TOK_RETURN   305
 

Definition at line 195 of file parse.cc.

#define TOK_SCHEDULE   306
 

Definition at line 196 of file parse.cc.

#define TOK_SET   307
 

Definition at line 197 of file parse.cc.

#define TOK_STRING   308
 

Definition at line 198 of file parse.cc.

#define TOK_SUBNET   309
 

Definition at line 199 of file parse.cc.

#define TOK_SWITCH   310
 

Definition at line 200 of file parse.cc.

#define TOK_TABLE   311
 

Definition at line 201 of file parse.cc.

#define TOK_THIS   312
 

Definition at line 202 of file parse.cc.

#define TOK_TIME   313
 

Definition at line 203 of file parse.cc.

#define TOK_TIMER   314
 

Definition at line 204 of file parse.cc.

#define TOK_TYPE   315
 

Definition at line 205 of file parse.cc.

#define TOK_UNION   316
 

Definition at line 206 of file parse.cc.

#define TOK_USING   335
 

Definition at line 225 of file parse.cc.

#define TOK_VECTOR   317
 

Definition at line 207 of file parse.cc.

#define YY_REDUCE_PRINT Rule   ) 
 

Value:

do {                                    \
  if (yydebug)                          \
    yy_reduce_print (Rule);             \
} while (0)

#define YY_STACK_PRINT Bottom,
Top   ) 
 

Value:

do {                                                            \
  if (yydebug)                                                  \
    yy_stack_print ((Bottom), (Top));                           \
} while (0)

#define YYABORT   goto yyabortlab
 

Definition at line 1226 of file parse.cc.

#define YYACCEPT   goto yyacceptlab
 

Definition at line 1225 of file parse.cc.

#define YYBACKUP Token,
Value   ) 
 

Value:

do                                                              \
  if (yychar == YYEMPTY && yylen == 1)                          \
    {                                                           \
      yychar = (Token);                                         \
      yylval = (Value);                                         \
      yytoken = YYTRANSLATE (yychar);                           \
      YYPOPSTACK;                                               \
      goto yybackup;                                            \
    }                                                           \
  else                                                          \
    {                                                           \
      yyerror ("syntax error: cannot back up");\
      YYERROR;                                                  \
    }                                                           \
while (0)

Definition at line 1238 of file parse.cc.

#define YYBISON   1
 

Definition at line 37 of file parse.cc.

#define yyclearin   (yychar = YYEMPTY)
 

Definition at line 1221 of file parse.cc.

#define YYCOPY To,
From,
Count   ) 
 

Value:

do                                      \
        {                                       \
          register YYSIZE_T yyi;                \
          for (yyi = 0; yyi < (Count); yyi++)   \
            (To)[yyi] = (From)[yyi];            \
        }                                       \
      while (0)

Definition at line 435 of file parse.cc.

#define YYDEBUG   1
 

Definition at line 310 of file parse.cc.

#define YYDPRINTF Args   ) 
 

Value:

do {                                            \
  if (yydebug)                                  \
    YYFPRINTF Args;                             \
} while (0)

Definition at line 1285 of file parse.cc.

#define YYDSYMPRINT Args   ) 
 

Value:

do {                                            \
  if (yydebug)                                  \
    yysymprint Args;                            \
} while (0)

Definition at line 1291 of file parse.cc.

#define YYDSYMPRINTF Title,
Token,
Value,
Location   ) 
 

Value:

do {                                                            \
  if (yydebug)                                                  \
    {                                                           \
      YYFPRINTF (stderr, "%s ", Title);                         \
      yysymprint (stderr,                                       \
                  Token, Value, Location);      \
      YYFPRINTF (stderr, "\n");                                 \
    }                                                           \
} while (0)

Definition at line 1297 of file parse.cc.

#define YYEMPTY   (-2)
 

Definition at line 1222 of file parse.cc.

#define YYEOF   0
 

Definition at line 1223 of file parse.cc.

#define YYERRCODE   256
 

Definition at line 1256 of file parse.cc.

#define yyerrok   (yyerrstatus = 0)
 

Definition at line 1220 of file parse.cc.

#define YYERROR   goto yyerrorlab
 

Definition at line 1227 of file parse.cc.

#define YYERROR_VERBOSE   0
 

Definition at line 318 of file parse.cc.

#define YYFAIL   goto yyerrlab
 

Definition at line 1234 of file parse.cc.

#define YYFINAL   5
 

Definition at line 471 of file parse.cc.

#define YYFPRINTF   fprintf
 

Definition at line 1282 of file parse.cc.

#define YYINITDEPTH   200
 

Definition at line 1379 of file parse.cc.

#define YYLAST   1213
 

Definition at line 473 of file parse.cc.

#define YYLEX   brolex ()
 

Definition at line 1274 of file parse.cc.

#define YYLLOC_DEFAULT Current,
Rhs,
 )     (Current) = (Rhs)[(N)];
 

Definition at line 282 of file parse.cc.

#define YYLSP_NEEDED   1
 

Definition at line 46 of file parse.cc.

#define YYLTYPE   yyltype
 

Definition at line 298 of file parse.cc.

#define YYMAXDEPTH   10000
 

Definition at line 1394 of file parse.cc.

#define YYMAXUTOK   347
 

Definition at line 486 of file parse.cc.

#define YYNNTS   56
 

Definition at line 478 of file parse.cc.

#define YYNRULES   200
 

Definition at line 480 of file parse.cc.

#define YYNSTATES   435
 

Definition at line 482 of file parse.cc.

#define YYNTOKENS   114
 

Definition at line 476 of file parse.cc.

#define YYPACT_NINF   -261
 

Definition at line 837 of file parse.cc.

#define YYPOPSTACK   (yyvsp--, yyssp--, yylsp--)
 

#define YYPURE   0
 

Definition at line 43 of file parse.cc.

 
#define YYRECOVERING  )     (!!yyerrstatus)
 

Definition at line 1236 of file parse.cc.

#define YYSIZE_T   unsigned int
 

Definition at line 1217 of file parse.cc.

#define YYSKELETON_NAME   "yacc.c"
 

Definition at line 40 of file parse.cc.

#define YYSTACK_ALLOC   malloc
 

Definition at line 400 of file parse.cc.

#define YYSTACK_BYTES  ) 
 

Value:

((N) * (sizeof (short) + sizeof (YYSTYPE) + sizeof (YYLTYPE))   \
      + 2 * YYSTACK_GAP_MAXIMUM)

Definition at line 424 of file parse.cc.

#define YYSTACK_FREE   free
 

Definition at line 401 of file parse.cc.

#define YYSTACK_GAP_MAXIMUM   (sizeof (union yyalloc) - 1)
 

Definition at line 420 of file parse.cc.

#define YYSTACK_RELOCATE Stack   ) 
 

Value:

do                                                                      \
      {                                                                 \
        YYSIZE_T yynewbytes;                                            \
        YYCOPY (&yyptr->Stack, Stack, yysize);                          \
        Stack = &yyptr->Stack;                                          \
        yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
        yyptr += yynewbytes / sizeof (*yyptr);                          \
      }                                                                 \
    while (0)

Definition at line 451 of file parse.cc.

#define yystype   YYSTYPE
 

Definition at line 349 of file parse.cc.

#define YYSTYPE_IS_DECLARED   1
 

Definition at line 350 of file parse.cc.

#define YYSTYPE_IS_TRIVIAL   1
 

Definition at line 351 of file parse.cc.

#define YYTABLE_NINF   -141
 

Definition at line 901 of file parse.cc.

#define YYTERROR   1
 

Definition at line 1255 of file parse.cc.

#define YYTRANSLATE YYX   )     ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
 

Definition at line 488 of file parse.cc.

#define YYUNDEFTOK   2
 

Definition at line 485 of file parse.cc.


Typedef Documentation

typedef short yysigned_char
 

Definition at line 467 of file parse.cc.

typedef union YYSTYPE YYSTYPE
 


Enumeration Type Documentation

enum yytokentype
 

Enumeration values:
TOK_ADD 
TOK_ADD_TO 
TOK_ADDR 
TOK_ALARM 
TOK_ANY 
TOK_ATENDIF 
TOK_ATELSE 
TOK_ATIF 
TOK_ATIFDEF 
TOK_ATIFNDEF 
TOK_BOOL 
TOK_BREAK 
TOK_CASE 
TOK_CONST 
TOK_CONSTANT 
TOK_COUNT 
TOK_COUNTER 
TOK_DEFAULT 
TOK_DELETE 
TOK_DOUBLE 
TOK_ELSE 
TOK_ENUM 
TOK_EVENT 
TOK_EXPORT 
TOK_FILE 
TOK_FOR 
TOK_FUNCTION 
TOK_GLOBAL 
TOK_GLOBAL_ATTR 
TOK_ID 
TOK_IF 
TOK_INT 
TOK_INTERVAL 
TOK_LIST 
TOK_LOCAL 
TOK_MODULE 
TOK_MATCH 
TOK_NET 
TOK_NEXT 
TOK_OF 
TOK_PATTERN 
TOK_PATTERN_TEXT 
TOK_PORT 
TOK_PRINT 
TOK_RECORD 
TOK_REDEF 
TOK_REMOVE_FROM 
TOK_RETURN 
TOK_SCHEDULE 
TOK_SET 
TOK_STRING 
TOK_SUBNET 
TOK_SWITCH 
TOK_TABLE 
TOK_THIS 
TOK_TIME 
TOK_TIMER 
TOK_TYPE 
TOK_UNION 
TOK_VECTOR 
TOK_ATTR_ADD_FUNC 
TOK_ATTR_ATTR 
TOK_ATTR_ENCRYPT 
TOK_ATTR_DEFAULT 
TOK_ATTR_OPTIONAL 
TOK_ATTR_REDEF 
TOK_ATTR_ROTATE_INTERVAL 
TOK_ATTR_ROTATE_SIZE 
TOK_ATTR_DEL_FUNC 
TOK_ATTR_EXPIRE_FUNC 
TOK_ATTR_EXPIRE_CREATE 
TOK_ATTR_EXPIRE_READ 
TOK_ATTR_EXPIRE_WRITE 
TOK_ATTR_PERSISTENT 
TOK_ATTR_MATCH 
TOK_ATTR_SYNCHRONIZED 
TOK_DEBUG 
TOK_USING 
TOK_OR 
TOK_AND 
TOK_NE 
TOK_EQ 
TOK_GE 
TOK_LE 
TOK_NOT_IN 
TOK_IN 
TOK_DECR 
TOK_INCR 
TOK_HAS_ATTR 
TOK_HAS_FIELD 

Definition at line 55 of file parse.cc.

00055                     {
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    };


Function Documentation

int brolex  ) 
 

YYLTYPE GetCurrentLocation  ) 
 

void yy_stack_print bottom  ,
top 
[static]
 

int yyerror const  char[]  ) 
 

int yyparse  ) 
 

Definition at line 1570 of file parse.cc.

References add_global(), add_local(), add_type(), EnumType::AddName(), EnumType::AddNamesFrom(), TypeList::Append(), arg_list_name, args, BroType::AsEnumType(), Stmt::AsStmtList(), YYSTYPE::attr, ATTR_ADD_FUNC, ATTR_DEFAULT, ATTR_DEL_FUNC, ATTR_ENCRYPT, ATTR_EXPIRE_CREATE, ATTR_EXPIRE_FUNC, ATTR_EXPIRE_READ, ATTR_EXPIRE_WRITE, YYSTYPE::attr_l, ATTR_MATCH, ATTR_OPTIONAL, ATTR_PERSISTENT, ATTR_REDEF, ATTR_ROTATE_INTERVAL, ATTR_ROTATE_SIZE, ATTR_SYNCHRONIZED, base_type(), begin_func(), begin_RE(), bro_prefix, bro_this, YYSTYPE::c_case, c_prefix, YYSTYPE::case_l, concat(), current_module, current_scope(), decl_name, definition_type, do_atelse(), do_atendif(), do_atif(), do_atifdef(), do_atifndef(), end_func(), end_RE(), ID::Error(), BroObj::Error(), error(), error_type(), EVENT_DEF, YYSTYPE::event_expr, YYSTYPE::expr, EXPR_AND, EXPR_DECR, EXPR_EQ, EXPR_FIELD_ASSIGN, EXPR_GE, EXPR_GT, EXPR_INCR, EXPR_LE, EXPR_LT, EXPR_NE, EXPR_OR, fmt(), fp_bro_init, fp_func_def, fp_func_h, fp_func_init, fp_netvar_def, fp_netvar_h, fp_netvar_init, FUNC_DEF, FUNC_FLAVOR_EVENT, FUNC_FLAVOR_FUNCTION, func_id, YYSTYPE::func_type, g_curr_debug_expr, Scope::GenerateTemporary(), get_assign_expr(), global_attributes_type, YYSTYPE::ic, YYSTYPE::id, id, YYSTYPE::id_l, ID::ID_Val(), in_c_code, in_debug, in_global_attr_decl, in_init, INIT_EXTRA, INIT_FULL, INIT_NONE, INIT_REMOVE, input_filename, install_ID(), internal_error(), is_export, ID::IsGlobal(), YYSTYPE::list, EnumType::Lookup(), lookup_ID(), Expr::MarkParen(), no_location, optimize, print_line_directive, BuiltinFuncArg::PrintBro(), YYSTYPE::re, RE_Matcher, YYSTYPE::record, Ref(), Expr::Ref(), refine_type(), resolving_global_ID, REWRITER_DEF, set_definition_type(), set_location(), ID::SetInferReturnType(), YYSTYPE::stmt, StmtList::Stmts(), stmts, YYSTYPE::str, BroType::Tag(), Expr::Tag(), trace_rewriter_name, YYSTYPE::type, Expr::Type(), TYPE_ADDR, TYPE_ANY, TYPE_BOOL, TYPE_COUNT, TYPE_COUNTER, YYSTYPE::type_decl, YYSTYPE::type_decl_l, TYPE_DOUBLE, TYPE_INT, TYPE_INTERVAL, YYSTYPE::type_l, TYPE_NET, TYPE_PATTERN, TYPE_PORT, TYPE_RECORD, TYPE_STRING, TYPE_SUBNET, TYPE_TIME, TYPE_TIMER, TYPE_VOID, val, var_arg, VAR_CONST, VAR_REDEF, VAR_REGULAR, YY_REDUCE_PRINT, YY_STACK_PRINT, YYABORT, YYACCEPT, yychar, yycheck, yydefact, yydefgoto, yydestruct(), YYDPRINTF, YYDSYMPRINTF, YYEMPTY, YYEOF, YYERROR, yyerror, YYFINAL, YYINITDEPTH, YYLAST, YYLEX, yylloc, YYLLOC_DEFAULT, yylval, YYMAXDEPTH, yynerrs, YYNTOKENS, yypact, YYPACT_NINF, yypgoto, YYPOPSTACK, yyr1, yyr2, YYSIZE_T, YYSTACK_ALLOC, YYSTACK_BYTES, YYSTACK_FREE, YYSTACK_RELOCATE, yystos, yytable, YYTABLE_NINF, YYTERROR, yytname, YYTRANSLATE, and yytype.

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 }

void yysymprint yyoutput  ,
yytype  ,
yyvaluep  ,
yylocationp 
[static]
 


Variable Documentation

Expr* bro_this = 0
 

Definition at line 300 of file parse.cc.

Referenced by yyparse().

string current_module = GLOBAL_MODULE_NAME
 

Definition at line 289 of file parse.cc.

ID* func_id = 0
 

Definition at line 305 of file parse.cc.

Referenced by yyparse().

Expr* g_curr_debug_expr
 

Definition at line 296 of file parse.cc.

Referenced by dbg_eval_expr(), and yyparse().

bool in_debug = false
 

Definition at line 302 of file parse.cc.

Referenced by lookup_ID(), and yyparse().

int in_init = 0
 

Definition at line 301 of file parse.cc.

Referenced by yyparse().

bool is_export = false
 

Definition at line 290 of file parse.cc.

Referenced by install_ID(), and yyparse().

bool resolving_global_ID = false
 

Definition at line 303 of file parse.cc.

Referenced by yyparse().

short* top
 

Definition at line 1320 of file parse.cc.

int yychar
 

Definition at line 1541 of file parse.cc.

const short yycheck[] [static]
 

Definition at line 1028 of file parse.cc.

Referenced by yyparse().

const unsigned char yydefact[] [static]
 

Definition at line 776 of file parse.cc.

Referenced by yyparse().

const short yydefgoto[] [static]
 

Initial value:

{
      -1,     2,     4,     3,    92,   320,   189,   190,   374,    40,
      41,    87,   260,   323,   229,   230,   302,   354,   158,   159,
     160,    20,   128,   131,   417,    77,   358,    22,    60,    42,
      81,    82,   231,   122,   228,   278,   279,   384,   336,   297,
     298,   299,    78,    23,   145,   313,   369,    79,   309,   142,
      46,    47,    48,    49,   124,   224
}

Definition at line 825 of file parse.cc.

Referenced by yyparse().

YYLTYPE yylloc
 

Definition at line 1549 of file parse.cc.

YYLTYPE * yylocationp
 

Definition at line 1506 of file parse.cc.

YYSTYPE yylval
 

Definition at line 1544 of file parse.cc.

int yynerrs
 

Definition at line 1547 of file parse.cc.

const short yypact[] [static]
 

Definition at line 838 of file parse.cc.

Referenced by yyparse().

const short yypgoto[] [static]
 

Initial value:

{
    -261,  -261,  -261,   252,    -4,  -261,   -34,  -211,    30,  -261,
     265,  -261,  -261,    83,  -115,   -71,  -260,  -261,   119,  -261,
     -48,  -261,  -261,  -261,  -261,     4,  -261,  -261,   -76,  -261,
    -261,   -26,   254,   -17,  -121,  -170,  -261,  -261,  -261,  -230,
    -261,    91,   -77,   -58,   228,  -261,  -261,  -261,  -261,   -65,
     126,  -261,   337,  -261,   345,  -261
}

Definition at line 887 of file parse.cc.

Referenced by yyparse().

const unsigned short yyprhs[] [static]
 

Initial value:

{
       0,     0,     3,     6,     7,    11,    14,    15,    19,    22,
      25,    28,    31,    34,    38,    42,    46,    50,    54,    58,
      62,    66,    70,    74,    78,    82,    86,    92,    96,   101,
     105,   110,   111,   118,   122,   126,   130,   135,   140,   144,
     148,   150,   156,   158,   160,   162,   164,   168,   170,   172,
     173,   175,   176,   180,   182,   183,   184,   190,   192,   196,
     198,   200,   202,   204,   206,   208,   210,   212,   214,   216,
     218,   220,   222,   224,   226,   233,   238,   243,   248,   253,
     259,   261,   265,   269,   272,   277,   281,   283,   285,   289,
     291,   294,   295,   301,   303,   306,   307,   311,   315,   317,
     322,   326,   327,   333,   341,   349,   357,   367,   375,   376,
     377,   386,   393,   396,   398,   403,   408,   413,   415,   417,
     423,   424,   428,   432,   437,   441,   445,   447,   453,   457,
     462,   464,   467,   468,   469,   471,   473,   475,   476,   477,
     481,   482,   486,   491,   493,   495,   496,   499,   501,   505,
     507,   509,   513,   517,   521,   525,   529,   533,   537,   541,
     543,   545,   547,   551,   553,   557,   561,   565,   569,   575,
     583,   589,   592,   595,   598,   601,   605,   609,   613,   621,
     629,   632,   634,   636,   639,   640,   645,   648,   649,   654,
     658,   665,   674,   678,   680,   682,   683,   686,   687,   690,
     692
}

Definition at line 534 of file parse.cc.

const unsigned char yyr1[] [static]
 

Initial value:

{
       0,   114,   115,   116,   115,   117,   117,   118,   118,   118,
     118,   118,   118,   118,   118,   118,   118,   118,   118,   118,
     118,   118,   118,   118,   118,   118,   118,   118,   118,   118,
     118,   119,   118,   118,   118,   118,   118,   118,   118,   118,
     118,   118,   118,   118,   118,   118,   120,   120,   121,   121,
     122,   122,   123,   123,   125,   126,   124,   127,   127,   128,
     128,   128,   128,   128,   128,   128,   128,   128,   128,   128,
     128,   128,   128,   128,   128,   128,   128,   128,   128,   128,
     128,   128,   128,   128,   128,   128,   128,   128,   129,   129,
     130,   130,   131,   132,   132,   132,   133,   133,   133,   134,
     135,   136,   135,   135,   135,   135,   135,   135,   137,   138,
     135,   135,   135,   135,   139,   139,   139,   139,   139,   140,
     140,   141,   141,   141,   142,   143,   144,   145,   145,   146,
     146,   147,   147,   148,   148,   148,   148,   150,   151,   149,
     149,   152,   152,   152,   153,   153,   154,   154,   155,   155,
     155,   155,   155,   155,   155,   155,   155,   155,   155,   155,
     155,   155,   155,   155,   156,   156,   156,   156,   156,   156,
     156,   156,   156,   156,   156,   156,   156,   156,   156,   156,
     156,   156,   156,   157,   157,   158,   159,   159,   160,   160,
     161,   161,   162,   162,   163,   165,   164,   167,   166,   168,
     169
}

Definition at line 722 of file parse.cc.

Referenced by yyparse().

const unsigned char yyr2[] [static]
 

Initial value:

{
       0,     2,     2,     0,     3,     2,     0,     3,     2,     2,
       2,     2,     2,     3,     3,     3,     3,     3,     3,     3,
       3,     3,     3,     3,     3,     3,     5,     3,     4,     3,
       4,     0,     6,     3,     3,     3,     4,     4,     3,     3,
       1,     5,     1,     1,     1,     1,     3,     1,     1,     0,
       1,     0,     3,     1,     0,     0,     5,     1,     3,     1,
       1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
       1,     1,     1,     1,     6,     4,     4,     4,     4,     5,
       1,     3,     3,     2,     4,     3,     1,     1,     3,     1,
       2,     0,     5,     1,     2,     0,     3,     3,     1,     4,
       3,     0,     5,     7,     7,     7,     9,     7,     0,     0,
       8,     6,     2,     1,     4,     4,     4,     1,     1,     5,
       0,     3,     3,     4,     3,     3,     1,     5,     3,     4,
       1,     2,     0,     0,     1,     1,     1,     0,     0,     3,
       0,     3,     4,     1,     1,     0,     2,     1,     3,     1,
       1,     3,     3,     3,     3,     3,     3,     3,     3,     1,
       1,     1,     3,     1,     3,     3,     3,     3,     5,     7,
       5,     2,     2,     2,     2,     3,     3,     3,     7,     7,
       2,     1,     1,     2,     0,     4,     2,     0,     4,     3,
       6,     8,     3,     1,     1,     0,     2,     0,     2,     1,
       1
}

Definition at line 748 of file parse.cc.

Referenced by yyparse().

const short yyrhs[] [static]
 

Definition at line 560 of file parse.cc.

const unsigned short yyrline[] [static]
 

Initial value:

{
       0,   151,   151,   169,   169,   177,   178,   182,   188,   194,
     200,   206,   212,   218,   224,   230,   236,   242,   248,   254,
     260,   266,   272,   278,   284,   290,   296,   302,   308,   314,
     320,   327,   326,   341,   347,   353,   371,   377,   383,   389,
     395,   397,   403,   449,   455,   462,   470,   476,   484,   486,
     490,   491,   495,   501,   509,   509,   509,   514,   524,   535,
     540,   545,   550,   555,   560,   565,   570,   575,   580,   585,
     590,   595,   600,   605,   610,   616,   622,   628,   634,   641,
     647,   655,   663,   669,   675,   681,   687,   693,   708,   710,
     718,   721,   725,   733,   735,   738,   742,   744,   746,   751,
     759,   762,   762,   765,   768,   771,   774,   790,   797,   798,
     797,   803,   806,   809,   813,   815,   817,   819,   821,   826,
     829,   833,   839,   845,   854,   864,   869,   878,   880,   885,
     887,   892,   895,   899,   900,   901,   902,   906,   906,   906,
     909,   913,   915,   917,   921,   923,   927,   929,   937,   939,
     941,   943,   945,   947,   949,   951,   953,   955,   957,   959,
     961,   963,   965,   967,   972,   978,   984,   990,   996,  1002,
    1008,  1014,  1017,  1023,  1029,  1035,  1041,  1047,  1053,  1059,
    1065,  1071,  1077,  1082,  1088,  1092,  1100,  1103,  1107,  1110,
    1115,  1141,  1146,  1148,  1156,  1177,  1177,  1182,  1182,  1187,
    1214
}

Definition at line 635 of file parse.cc.

const unsigned char yystos[] [static]
 

Definition at line 1156 of file parse.cc.

Referenced by yyparse().

const short yytable[] [static]
 

Definition at line 902 of file parse.cc.

Referenced by yyparse().

const char* const yytname[] [static]
 

Definition at line 664 of file parse.cc.

Referenced by yyparse().

const unsigned char yytranslate[] [static]
 

Definition at line 492 of file parse.cc.

int yytype
 

Definition at line 1466 of file parse.cc.

YYSTYPE* yyvaluep
 

Definition at line 1505 of file parse.cc.


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