diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-06 03:01:46 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-06 03:01:46 +0000 |
commit | f8fe689a81f906d1b91bb3220acde2a4ecb14c5b (patch) | |
tree | 26484e9d7e2c67806c2d1760196ff01aaa858e8c /src/VBox/ExtPacks/VBoxDTrace/generated | |
parent | Initial commit. (diff) | |
download | virtualbox-f8fe689a81f906d1b91bb3220acde2a4ecb14c5b.tar.xz virtualbox-f8fe689a81f906d1b91bb3220acde2a4ecb14c5b.zip |
Adding upstream version 6.0.4-dfsg.upstream/6.0.4-dfsgupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/VBox/ExtPacks/VBoxDTrace/generated')
-rw-r--r-- | src/VBox/ExtPacks/VBoxDTrace/generated/dt_grammar.c | 3729 | ||||
-rw-r--r-- | src/VBox/ExtPacks/VBoxDTrace/generated/dt_grammar.h | 290 | ||||
-rw-r--r-- | src/VBox/ExtPacks/VBoxDTrace/generated/dt_lex.c | 3514 |
3 files changed, 7533 insertions, 0 deletions
diff --git a/src/VBox/ExtPacks/VBoxDTrace/generated/dt_grammar.c b/src/VBox/ExtPacks/VBoxDTrace/generated/dt_grammar.c new file mode 100644 index 00000000..7ba1a4bb --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/generated/dt_grammar.c @@ -0,0 +1,3729 @@ + +/* A Bison parser, made by GNU Bison 2.4.1. */ + +/* Skeleton implementation for Bison's Yacc-like parsers in C + + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 + Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. */ + +/* As a special exception, you may create a larger work that contains + part or all of the Bison parser skeleton and distribute that work + under terms of your choice, so long as that work isn't itself a + parser generator using the skeleton or a modified version thereof + as a parser skeleton. Alternatively, if you modify or redistribute + the parser skeleton itself, you may (at your option) remove this + special exception, which will cause the skeleton and the resulting + Bison output files to be licensed under the GNU General Public + License without this special exception. + + This special exception was added by the Free Software Foundation in + version 2.2 of Bison. */ + +/* C LALR(1) parser skeleton written by Richard Stallman, by + simplifying the original so-called "semantic" parser. */ + +/* All symbols defined below should begin with yy or YY, to avoid + infringing on user name space. This should be done even for local + variables, as they might otherwise be expanded by user macros. + There are some unavoidable exceptions within include files to + define necessary library symbols; they are noted "INFRINGES ON + USER NAME SPACE" below. */ + +/* Identify Bison output. */ +#define YYBISON 1 + +/* Bison version. */ +#define YYBISON_VERSION "2.4.1" + +/* Skeleton name. */ +#define YYSKELETON_NAME "yacc.c" + +/* Pure parsers. */ +#define YYPURE 0 + +/* Push parsers. */ +#define YYPUSH 0 + +/* Pull parsers. */ +#define YYPULL 1 + +/* Using locations. */ +#define YYLSP_NEEDED 0 + + + +/* Copy the first part of user declarations. */ + +/* Line 189 of yacc.c */ +#line 1 "dt_grammar.y" + +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + * + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#ifndef VBOX +#pragma ident "%Z%%M% %I% %E% SMI" +#else +# ifdef _MSC_VER +# pragma warning(disable:4255 4702) +# endif +#endif + +#include <dt_impl.h> + +#define OP1(op, c) dt_node_op1(op, c) +#define OP2(op, l, r) dt_node_op2(op, l, r) +#define OP3(x, y, z) dt_node_op3(x, y, z) +#define LINK(l, r) dt_node_link(l, r) +#define DUP(s) strdup(s) + +#ifdef VBOX +# define YYMALLOC RTMemAlloc +# define YYFREE RTMemFree +#endif + + + + +/* Line 189 of yacc.c */ +#line 124 "dt_grammar.c" + +/* Enabling traces. */ +#ifndef YYDEBUG +# define YYDEBUG 0 +#endif + +/* Enabling verbose error messages. */ +#ifdef YYERROR_VERBOSE +# undef YYERROR_VERBOSE +# define YYERROR_VERBOSE 1 +#else +# define YYERROR_VERBOSE 0 +#endif + +/* Enabling the token table. */ +#ifndef YYTOKEN_TABLE +# define YYTOKEN_TABLE 0 +#endif + + +/* Tokens. */ +#ifndef YYTOKENTYPE +# define YYTOKENTYPE + /* Put the tokens into the symbol table, so that GDB and other debuggers + know about them. */ + enum yytokentype { + DT_TOK_EOF = 0, + DT_TOK_COMMA = 258, + DT_TOK_ELLIPSIS = 259, + DT_TOK_ASGN = 260, + DT_TOK_ADD_EQ = 261, + DT_TOK_SUB_EQ = 262, + DT_TOK_MUL_EQ = 263, + DT_TOK_DIV_EQ = 264, + DT_TOK_MOD_EQ = 265, + DT_TOK_AND_EQ = 266, + DT_TOK_XOR_EQ = 267, + DT_TOK_OR_EQ = 268, + DT_TOK_LSH_EQ = 269, + DT_TOK_RSH_EQ = 270, + DT_TOK_QUESTION = 271, + DT_TOK_COLON = 272, + DT_TOK_LOR = 273, + DT_TOK_LXOR = 274, + DT_TOK_LAND = 275, + DT_TOK_BOR = 276, + DT_TOK_XOR = 277, + DT_TOK_BAND = 278, + DT_TOK_EQU = 279, + DT_TOK_NEQ = 280, + DT_TOK_LT = 281, + DT_TOK_LE = 282, + DT_TOK_GT = 283, + DT_TOK_GE = 284, + DT_TOK_LSH = 285, + DT_TOK_RSH = 286, + DT_TOK_ADD = 287, + DT_TOK_SUB = 288, + DT_TOK_MUL = 289, + DT_TOK_DIV = 290, + DT_TOK_MOD = 291, + DT_TOK_LNEG = 292, + DT_TOK_BNEG = 293, + DT_TOK_ADDADD = 294, + DT_TOK_SUBSUB = 295, + DT_TOK_PREINC = 296, + DT_TOK_POSTINC = 297, + DT_TOK_PREDEC = 298, + DT_TOK_POSTDEC = 299, + DT_TOK_IPOS = 300, + DT_TOK_INEG = 301, + DT_TOK_DEREF = 302, + DT_TOK_ADDROF = 303, + DT_TOK_OFFSETOF = 304, + DT_TOK_SIZEOF = 305, + DT_TOK_STRINGOF = 306, + DT_TOK_XLATE = 307, + DT_TOK_LPAR = 308, + DT_TOK_RPAR = 309, + DT_TOK_LBRAC = 310, + DT_TOK_RBRAC = 311, + DT_TOK_PTR = 312, + DT_TOK_DOT = 313, + DT_TOK_STRING = 314, + DT_TOK_IDENT = 315, + DT_TOK_PSPEC = 316, + DT_TOK_AGG = 317, + DT_TOK_TNAME = 318, + DT_TOK_INT = 319, + DT_KEY_AUTO = 320, + DT_KEY_BREAK = 321, + DT_KEY_CASE = 322, + DT_KEY_CHAR = 323, + DT_KEY_CONST = 324, + DT_KEY_CONTINUE = 325, + DT_KEY_COUNTER = 326, + DT_KEY_DEFAULT = 327, + DT_KEY_DO = 328, + DT_KEY_DOUBLE = 329, + DT_KEY_ELSE = 330, + DT_KEY_ENUM = 331, + DT_KEY_EXTERN = 332, + DT_KEY_FLOAT = 333, + DT_KEY_FOR = 334, + DT_KEY_GOTO = 335, + DT_KEY_IF = 336, + DT_KEY_IMPORT = 337, + DT_KEY_INLINE = 338, + DT_KEY_INT = 339, + DT_KEY_LONG = 340, + DT_KEY_PROBE = 341, + DT_KEY_PROVIDER = 342, + DT_KEY_REGISTER = 343, + DT_KEY_RESTRICT = 344, + DT_KEY_RETURN = 345, + DT_KEY_SELF = 346, + DT_KEY_SHORT = 347, + DT_KEY_SIGNED = 348, + DT_KEY_STATIC = 349, + DT_KEY_STRING = 350, + DT_KEY_STRUCT = 351, + DT_KEY_SWITCH = 352, + DT_KEY_THIS = 353, + DT_KEY_TYPEDEF = 354, + DT_KEY_UNION = 355, + DT_KEY_UNSIGNED = 356, + DT_KEY_VOID = 357, + DT_KEY_VOLATILE = 358, + DT_KEY_WHILE = 359, + DT_KEY_XLATOR = 360, + DT_TOK_EPRED = 361, + DT_CTX_DEXPR = 362, + DT_CTX_DPROG = 363, + DT_CTX_DTYPE = 364 + }; +#endif +/* Tokens. */ +#define DT_TOK_EOF 0 +#define DT_TOK_COMMA 258 +#define DT_TOK_ELLIPSIS 259 +#define DT_TOK_ASGN 260 +#define DT_TOK_ADD_EQ 261 +#define DT_TOK_SUB_EQ 262 +#define DT_TOK_MUL_EQ 263 +#define DT_TOK_DIV_EQ 264 +#define DT_TOK_MOD_EQ 265 +#define DT_TOK_AND_EQ 266 +#define DT_TOK_XOR_EQ 267 +#define DT_TOK_OR_EQ 268 +#define DT_TOK_LSH_EQ 269 +#define DT_TOK_RSH_EQ 270 +#define DT_TOK_QUESTION 271 +#define DT_TOK_COLON 272 +#define DT_TOK_LOR 273 +#define DT_TOK_LXOR 274 +#define DT_TOK_LAND 275 +#define DT_TOK_BOR 276 +#define DT_TOK_XOR 277 +#define DT_TOK_BAND 278 +#define DT_TOK_EQU 279 +#define DT_TOK_NEQ 280 +#define DT_TOK_LT 281 +#define DT_TOK_LE 282 +#define DT_TOK_GT 283 +#define DT_TOK_GE 284 +#define DT_TOK_LSH 285 +#define DT_TOK_RSH 286 +#define DT_TOK_ADD 287 +#define DT_TOK_SUB 288 +#define DT_TOK_MUL 289 +#define DT_TOK_DIV 290 +#define DT_TOK_MOD 291 +#define DT_TOK_LNEG 292 +#define DT_TOK_BNEG 293 +#define DT_TOK_ADDADD 294 +#define DT_TOK_SUBSUB 295 +#define DT_TOK_PREINC 296 +#define DT_TOK_POSTINC 297 +#define DT_TOK_PREDEC 298 +#define DT_TOK_POSTDEC 299 +#define DT_TOK_IPOS 300 +#define DT_TOK_INEG 301 +#define DT_TOK_DEREF 302 +#define DT_TOK_ADDROF 303 +#define DT_TOK_OFFSETOF 304 +#define DT_TOK_SIZEOF 305 +#define DT_TOK_STRINGOF 306 +#define DT_TOK_XLATE 307 +#define DT_TOK_LPAR 308 +#define DT_TOK_RPAR 309 +#define DT_TOK_LBRAC 310 +#define DT_TOK_RBRAC 311 +#define DT_TOK_PTR 312 +#define DT_TOK_DOT 313 +#define DT_TOK_STRING 314 +#define DT_TOK_IDENT 315 +#define DT_TOK_PSPEC 316 +#define DT_TOK_AGG 317 +#define DT_TOK_TNAME 318 +#define DT_TOK_INT 319 +#define DT_KEY_AUTO 320 +#define DT_KEY_BREAK 321 +#define DT_KEY_CASE 322 +#define DT_KEY_CHAR 323 +#define DT_KEY_CONST 324 +#define DT_KEY_CONTINUE 325 +#define DT_KEY_COUNTER 326 +#define DT_KEY_DEFAULT 327 +#define DT_KEY_DO 328 +#define DT_KEY_DOUBLE 329 +#define DT_KEY_ELSE 330 +#define DT_KEY_ENUM 331 +#define DT_KEY_EXTERN 332 +#define DT_KEY_FLOAT 333 +#define DT_KEY_FOR 334 +#define DT_KEY_GOTO 335 +#define DT_KEY_IF 336 +#define DT_KEY_IMPORT 337 +#define DT_KEY_INLINE 338 +#define DT_KEY_INT 339 +#define DT_KEY_LONG 340 +#define DT_KEY_PROBE 341 +#define DT_KEY_PROVIDER 342 +#define DT_KEY_REGISTER 343 +#define DT_KEY_RESTRICT 344 +#define DT_KEY_RETURN 345 +#define DT_KEY_SELF 346 +#define DT_KEY_SHORT 347 +#define DT_KEY_SIGNED 348 +#define DT_KEY_STATIC 349 +#define DT_KEY_STRING 350 +#define DT_KEY_STRUCT 351 +#define DT_KEY_SWITCH 352 +#define DT_KEY_THIS 353 +#define DT_KEY_TYPEDEF 354 +#define DT_KEY_UNION 355 +#define DT_KEY_UNSIGNED 356 +#define DT_KEY_VOID 357 +#define DT_KEY_VOLATILE 358 +#define DT_KEY_WHILE 359 +#define DT_KEY_XLATOR 360 +#define DT_TOK_EPRED 361 +#define DT_CTX_DEXPR 362 +#define DT_CTX_DPROG 363 +#define DT_CTX_DTYPE 364 + + + + +#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED +typedef union YYSTYPE +{ + +/* Line 214 of yacc.c */ +#line 51 "dt_grammar.y" + + dt_node_t *l_node; + dt_decl_t *l_decl; + char *l_str; + uintmax_t l_int; + int l_tok; + + + +/* Line 214 of yacc.c */ +#line 390 "dt_grammar.c" +} YYSTYPE; +# define YYSTYPE_IS_TRIVIAL 1 +# define yystype YYSTYPE /* obsolescent; will be withdrawn */ +# define YYSTYPE_IS_DECLARED 1 +#endif + + +/* Copy the second part of user declarations. */ + + +/* Line 264 of yacc.c */ +#line 402 "dt_grammar.c" + +#ifdef short +# undef short +#endif + +#ifdef YYTYPE_UINT8 +typedef YYTYPE_UINT8 yytype_uint8; +#else +typedef unsigned char yytype_uint8; +#endif + +#ifdef YYTYPE_INT8 +typedef YYTYPE_INT8 yytype_int8; +#elif (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +typedef signed char yytype_int8; +#else +typedef short int yytype_int8; +#endif + +#ifdef YYTYPE_UINT16 +typedef YYTYPE_UINT16 yytype_uint16; +#else +typedef unsigned short int yytype_uint16; +#endif + +#ifdef YYTYPE_INT16 +typedef YYTYPE_INT16 yytype_int16; +#else +typedef short int yytype_int16; +#endif + +#ifndef YYSIZE_T +# ifdef __SIZE_TYPE__ +# define YYSIZE_T __SIZE_TYPE__ +# elif defined size_t +# define YYSIZE_T size_t +# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +# include <stddef.h> /* INFRINGES ON USER NAME SPACE */ +# define YYSIZE_T size_t +# else +# define YYSIZE_T unsigned int +# endif +#endif + +#define YYSIZE_MAXIMUM ((YYSIZE_T) -1) + +#ifndef YY_ +# if YYENABLE_NLS +# if ENABLE_NLS +# include <libintl.h> /* INFRINGES ON USER NAME SPACE */ +# define YY_(msgid) dgettext ("bison-runtime", msgid) +# endif +# endif +# ifndef YY_ +# define YY_(msgid) msgid +# endif +#endif + +/* Suppress unused-variable warnings by "using" E. */ +#if ! defined lint || defined __GNUC__ +# define YYUSE(e) ((void) (e)) +#else +# define YYUSE(e) /* empty */ +#endif + +/* Identity function, used to suppress warnings about constant conditions. */ +#ifndef lint +# define YYID(n) (n) +#else +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static int +YYID (int yyi) +#else +static int +YYID (yyi) + int yyi; +#endif +{ + return yyi; +} +#endif + +#if ! defined yyoverflow || YYERROR_VERBOSE + +/* The parser invokes alloca or malloc; define the necessary symbols. */ + +# ifdef YYSTACK_USE_ALLOCA +# if YYSTACK_USE_ALLOCA +# ifdef __GNUC__ +# define YYSTACK_ALLOC __builtin_alloca +# elif defined __BUILTIN_VA_ARG_INCR +# include <alloca.h> /* INFRINGES ON USER NAME SPACE */ +# elif defined _AIX +# define YYSTACK_ALLOC __alloca +# elif defined _MSC_VER +# include <malloc.h> /* INFRINGES ON USER NAME SPACE */ +# define alloca _alloca +# else +# define YYSTACK_ALLOC alloca +# if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ +# ifndef _STDLIB_H +# define _STDLIB_H 1 +# endif +# endif +# endif +# endif +# endif + +# ifdef YYSTACK_ALLOC + /* Pacify GCC's `empty if-body' warning. */ +# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) +# ifndef YYSTACK_ALLOC_MAXIMUM + /* The OS might guarantee only one guard page at the bottom of the stack, + and a page size can be as small as 4096 bytes. So we cannot safely + invoke alloca (N) if N exceeds 4096. Use a slightly smaller number + to allow for a few compiler-allocated temporary stack slots. */ +# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ +# endif +# else +# define YYSTACK_ALLOC YYMALLOC +# define YYSTACK_FREE YYFREE +# ifndef YYSTACK_ALLOC_MAXIMUM +# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM +# endif +# if (defined __cplusplus && ! defined _STDLIB_H \ + && ! ((defined YYMALLOC || defined malloc) \ + && (defined YYFREE || defined free))) +# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ +# ifndef _STDLIB_H +# define _STDLIB_H 1 +# endif +# endif +# ifndef YYMALLOC +# define YYMALLOC malloc +# if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ +# endif +# endif +# ifndef YYFREE +# define YYFREE free +# if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +void free (void *); /* INFRINGES ON USER NAME SPACE */ +# endif +# endif +# endif +#endif /* ! defined yyoverflow || YYERROR_VERBOSE */ + + +#if (! defined yyoverflow \ + && (! defined __cplusplus \ + || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) + +/* A type that is properly aligned for any stack member. */ +union yyalloc +{ + yytype_int16 yyss_alloc; + YYSTYPE yyvs_alloc; +}; + +/* The size of the maximum gap between one aligned stack and the next. */ +# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) + +/* The size of an array large to enough to hold all stacks, each with + N elements. */ +# define YYSTACK_BYTES(N) \ + ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ + + YYSTACK_GAP_MAXIMUM) + +/* Copy COUNT objects from FROM to TO. The source and destination do + not overlap. */ +# ifndef YYCOPY +# if defined __GNUC__ && 1 < __GNUC__ +# define YYCOPY(To, From, Count) \ + __builtin_memcpy (To, From, (Count) * sizeof (*(From))) +# else +# define YYCOPY(To, From, Count) \ + do \ + { \ + YYSIZE_T yyi; \ + for (yyi = 0; yyi < (Count); yyi++) \ + (To)[yyi] = (From)[yyi]; \ + } \ + while (YYID (0)) +# endif +# endif + +/* Relocate STACK from its old location to the new one. The + local variables YYSIZE and YYSTACKSIZE give the old and new number of + elements in the stack, and YYPTR gives the new location of the + stack. Advance YYPTR to a properly aligned location for the next + stack. */ +# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ + do \ + { \ + YYSIZE_T yynewbytes; \ + YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ + Stack = &yyptr->Stack_alloc; \ + yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ + yyptr += yynewbytes / sizeof (*yyptr); \ + } \ + while (YYID (0)) + +#endif + +/* YYFINAL -- State number of the termination state. */ +#define YYFINAL 99 +/* YYLAST -- Last index in YYTABLE. */ +#define YYLAST 837 + +/* YYNTOKENS -- Number of terminals. */ +#define YYNTOKENS 113 +/* YYNNTS -- Number of nonterminals. */ +#define YYNNTS 81 +/* YYNRULES -- Number of rules. */ +#define YYNRULES 239 +/* YYNRULES -- Number of states. */ +#define YYNSTATES 363 + +/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ +#define YYUNDEFTOK 2 +#define YYMAXUTOK 364 + +#define YYTRANSLATE(YYX) \ + ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) + +/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ +static const yytype_uint8 yytranslate[] = +{ + 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 110, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 111, 2, 112, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, + 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, + 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, + 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, + 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, + 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, + 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, + 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, + 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, + 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, + 105, 106, 107, 108, 109 +}; + +#if YYDEBUG +/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in + YYRHS. */ +static const yytype_uint16 yyprhs[] = +{ + 0, 0, 3, 6, 9, 12, 14, 17, 19, 22, + 24, 27, 29, 32, 34, 36, 38, 40, 42, 43, + 51, 62, 72, 74, 77, 82, 89, 95, 97, 100, + 107, 112, 114, 119, 124, 132, 134, 136, 140, 142, + 144, 146, 150, 151, 153, 155, 159, 161, 163, 165, + 167, 169, 171, 175, 177, 182, 186, 191, 195, 199, + 203, 207, 210, 213, 220, 227, 235, 237, 240, 243, + 246, 249, 254, 257, 259, 261, 263, 265, 267, 269, + 271, 276, 278, 282, 286, 290, 292, 296, 300, 302, + 306, 310, 312, 316, 320, 324, 328, 330, 334, 338, + 340, 344, 346, 350, 352, 356, 358, 362, 364, 368, + 370, 374, 376, 378, 384, 386, 390, 392, 394, 396, + 398, 400, 402, 404, 406, 408, 410, 412, 414, 418, + 421, 425, 427, 430, 432, 435, 437, 440, 442, 445, + 447, 450, 452, 455, 457, 459, 461, 463, 465, 467, + 469, 471, 473, 475, 477, 479, 481, 483, 485, 487, + 489, 491, 493, 495, 497, 499, 501, 503, 507, 510, + 513, 516, 520, 524, 526, 528, 530, 533, 535, 539, + 541, 545, 547, 550, 552, 555, 557, 561, 563, 566, + 570, 574, 577, 580, 583, 587, 591, 593, 597, 599, + 603, 605, 608, 610, 614, 617, 620, 622, 624, 627, + 630, 634, 636, 639, 641, 643, 647, 649, 653, 655, + 658, 661, 663, 666, 668, 670, 673, 677, 680, 682, + 685, 687, 688, 693, 694, 696, 698, 699, 704, 705 +}; + +/* YYRHS -- A `-1'-separated list of the rules' RHS. */ +static const yytype_int16 yyrhs[] = +{ + 114, 0, -1, 115, 0, -1, 116, 0, -1, 117, + 0, -1, 107, -1, 107, 155, -1, 108, -1, 108, + 118, -1, 109, -1, 109, 185, -1, 119, -1, 118, + 119, -1, 120, -1, 122, -1, 125, -1, 128, -1, + 156, -1, -1, 83, 157, 177, 121, 5, 153, 110, + -1, 105, 185, 26, 185, 60, 28, 111, 123, 112, + 110, -1, 105, 185, 26, 185, 60, 28, 111, 112, + 110, -1, 124, -1, 123, 124, -1, 60, 5, 153, + 110, -1, 87, 60, 111, 126, 112, 110, -1, 87, + 60, 111, 112, 110, -1, 127, -1, 126, 127, -1, + 86, 60, 191, 17, 191, 110, -1, 86, 60, 191, + 110, -1, 129, -1, 129, 111, 132, 112, -1, 129, + 35, 155, 106, -1, 129, 35, 155, 106, 111, 132, + 112, -1, 130, -1, 131, -1, 130, 3, 131, -1, + 61, -1, 64, -1, 133, -1, 132, 110, 133, -1, + -1, 155, -1, 153, -1, 134, 3, 153, -1, 60, + -1, 62, -1, 64, -1, 59, -1, 91, -1, 98, + -1, 53, 155, 54, -1, 135, -1, 136, 55, 134, + 56, -1, 136, 53, 54, -1, 136, 53, 134, 54, + -1, 136, 58, 60, -1, 136, 58, 63, -1, 136, + 57, 60, -1, 136, 57, 63, -1, 136, 39, -1, + 136, 40, -1, 49, 53, 185, 3, 60, 54, -1, + 49, 53, 185, 3, 63, 54, -1, 52, 26, 185, + 28, 53, 155, 54, -1, 136, -1, 39, 137, -1, + 40, 137, -1, 138, 139, -1, 50, 137, -1, 50, + 53, 185, 54, -1, 51, 137, -1, 23, -1, 34, + -1, 32, -1, 33, -1, 38, -1, 37, -1, 137, + -1, 53, 185, 54, 139, -1, 139, -1, 140, 34, + 139, -1, 140, 35, 139, -1, 140, 36, 139, -1, + 140, -1, 141, 32, 140, -1, 141, 33, 140, -1, + 141, -1, 142, 30, 141, -1, 142, 31, 141, -1, + 142, -1, 143, 26, 142, -1, 143, 28, 142, -1, + 143, 27, 142, -1, 143, 29, 142, -1, 143, -1, + 144, 24, 143, -1, 144, 25, 143, -1, 144, -1, + 145, 23, 144, -1, 145, -1, 146, 22, 145, -1, + 146, -1, 147, 21, 146, -1, 147, -1, 148, 20, + 147, -1, 148, -1, 149, 19, 148, -1, 149, -1, + 150, 18, 149, -1, 152, -1, 150, -1, 150, 16, + 155, 17, 152, -1, 152, -1, 137, 154, 153, -1, + 5, -1, 8, -1, 9, -1, 10, -1, 6, -1, + 7, -1, 14, -1, 15, -1, 11, -1, 12, -1, + 13, -1, 153, -1, 155, 3, 153, -1, 157, 110, + -1, 157, 167, 110, -1, 160, -1, 160, 157, -1, + 161, -1, 161, 157, -1, 162, -1, 162, 157, -1, + 159, -1, 159, 157, -1, 161, -1, 161, 157, -1, + 162, -1, 162, 157, -1, 65, -1, 88, -1, 94, + -1, 77, -1, 99, -1, 159, -1, 91, -1, 98, + -1, 102, -1, 68, -1, 92, -1, 84, -1, 85, + -1, 78, -1, 74, -1, 93, -1, 101, -1, 95, + -1, 63, -1, 163, -1, 173, -1, 69, -1, 89, + -1, 103, -1, 164, 166, 112, -1, 165, 60, -1, + 165, 63, -1, 165, 111, -1, 165, 60, 111, -1, + 165, 63, 111, -1, 96, -1, 100, -1, 169, -1, + 166, 169, -1, 168, -1, 167, 3, 168, -1, 177, + -1, 170, 171, 110, -1, 161, -1, 161, 170, -1, + 162, -1, 162, 170, -1, 172, -1, 171, 3, 172, + -1, 177, -1, 17, 151, -1, 177, 17, 151, -1, + 174, 175, 112, -1, 76, 60, -1, 76, 63, -1, + 76, 111, -1, 76, 60, 111, -1, 76, 63, 111, + -1, 176, -1, 175, 3, 176, -1, 60, -1, 60, + 5, 155, -1, 178, -1, 180, 178, -1, 60, -1, + 179, 177, 54, -1, 178, 188, -1, 178, 191, -1, + 53, -1, 34, -1, 34, 181, -1, 34, 180, -1, + 34, 181, 180, -1, 162, -1, 181, 162, -1, 183, + -1, 4, -1, 183, 3, 4, -1, 184, -1, 183, + 3, 184, -1, 158, -1, 158, 177, -1, 158, 186, + -1, 170, -1, 170, 186, -1, 180, -1, 187, -1, + 180, 187, -1, 179, 186, 54, -1, 187, 188, -1, + 188, -1, 187, 191, -1, 191, -1, -1, 55, 189, + 190, 56, -1, -1, 151, -1, 182, -1, -1, 53, + 192, 193, 54, -1, -1, 182, -1 +}; + +/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ +static const yytype_uint16 yyrline[] = +{ + 0, 221, 221, 222, 223, 226, 227, 230, 231, 234, + 235, 239, 240, 244, 245, 246, 247, 248, 253, 252, + 268, 272, 279, 280, 284, 290, 293, 299, 300, 304, + 307, 314, 330, 333, 337, 344, 348, 349, 355, 356, + 359, 360, 363, 364, 368, 369, 375, 376, 377, 378, + 379, 380, 381, 385, 386, 390, 393, 397, 400, 403, + 406, 409, 412, 415, 419, 423, 430, 431, 432, 433, + 434, 435, 438, 443, 444, 445, 446, 447, 448, 452, + 453, 459, 460, 463, 466, 472, 473, 476, 482, 483, + 486, 492, 493, 496, 499, 502, 508, 509, 512, 518, + 519, 525, 526, 532, 533, 539, 540, 546, 547, 553, + 554, 559, 563, 564, 569, 570, 576, 577, 578, 579, + 580, 581, 582, 583, 584, 585, 586, 589, 590, 595, + 600, 608, 609, 610, 611, 612, 613, 617, 618, 619, + 620, 621, 622, 626, 627, 628, 629, 630, 634, 635, + 636, 639, 640, 641, 642, 643, 644, 645, 646, 647, + 648, 651, 652, 653, 656, 657, 658, 662, 665, 666, + 670, 671, 672, 676, 677, 681, 682, 686, 687, 693, + 700, 706, 707, 708, 709, 713, 714, 718, 719, 720, + 726, 727, 728, 732, 733, 734, 738, 739, 742, 743, + 748, 749, 753, 754, 755, 756, 759, 762, 763, 764, + 765, 769, 770, 774, 775, 776, 781, 782, 788, 791, + 794, 799, 802, 808, 809, 810, 814, 815, 816, 817, + 818, 821, 821, 829, 830, 831, 834, 834, 842, 843 +}; +#endif + +#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE +/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. + First, the terminals, then, starting at YYNTOKENS, nonterminals. */ +static const char *const yytname[] = +{ + "DT_TOK_EOF", "error", "$undefined", "DT_TOK_COMMA", "DT_TOK_ELLIPSIS", + "DT_TOK_ASGN", "DT_TOK_ADD_EQ", "DT_TOK_SUB_EQ", "DT_TOK_MUL_EQ", + "DT_TOK_DIV_EQ", "DT_TOK_MOD_EQ", "DT_TOK_AND_EQ", "DT_TOK_XOR_EQ", + "DT_TOK_OR_EQ", "DT_TOK_LSH_EQ", "DT_TOK_RSH_EQ", "DT_TOK_QUESTION", + "DT_TOK_COLON", "DT_TOK_LOR", "DT_TOK_LXOR", "DT_TOK_LAND", "DT_TOK_BOR", + "DT_TOK_XOR", "DT_TOK_BAND", "DT_TOK_EQU", "DT_TOK_NEQ", "DT_TOK_LT", + "DT_TOK_LE", "DT_TOK_GT", "DT_TOK_GE", "DT_TOK_LSH", "DT_TOK_RSH", + "DT_TOK_ADD", "DT_TOK_SUB", "DT_TOK_MUL", "DT_TOK_DIV", "DT_TOK_MOD", + "DT_TOK_LNEG", "DT_TOK_BNEG", "DT_TOK_ADDADD", "DT_TOK_SUBSUB", + "DT_TOK_PREINC", "DT_TOK_POSTINC", "DT_TOK_PREDEC", "DT_TOK_POSTDEC", + "DT_TOK_IPOS", "DT_TOK_INEG", "DT_TOK_DEREF", "DT_TOK_ADDROF", + "DT_TOK_OFFSETOF", "DT_TOK_SIZEOF", "DT_TOK_STRINGOF", "DT_TOK_XLATE", + "DT_TOK_LPAR", "DT_TOK_RPAR", "DT_TOK_LBRAC", "DT_TOK_RBRAC", + "DT_TOK_PTR", "DT_TOK_DOT", "DT_TOK_STRING", "DT_TOK_IDENT", + "DT_TOK_PSPEC", "DT_TOK_AGG", "DT_TOK_TNAME", "DT_TOK_INT", + "DT_KEY_AUTO", "DT_KEY_BREAK", "DT_KEY_CASE", "DT_KEY_CHAR", + "DT_KEY_CONST", "DT_KEY_CONTINUE", "DT_KEY_COUNTER", "DT_KEY_DEFAULT", + "DT_KEY_DO", "DT_KEY_DOUBLE", "DT_KEY_ELSE", "DT_KEY_ENUM", + "DT_KEY_EXTERN", "DT_KEY_FLOAT", "DT_KEY_FOR", "DT_KEY_GOTO", + "DT_KEY_IF", "DT_KEY_IMPORT", "DT_KEY_INLINE", "DT_KEY_INT", + "DT_KEY_LONG", "DT_KEY_PROBE", "DT_KEY_PROVIDER", "DT_KEY_REGISTER", + "DT_KEY_RESTRICT", "DT_KEY_RETURN", "DT_KEY_SELF", "DT_KEY_SHORT", + "DT_KEY_SIGNED", "DT_KEY_STATIC", "DT_KEY_STRING", "DT_KEY_STRUCT", + "DT_KEY_SWITCH", "DT_KEY_THIS", "DT_KEY_TYPEDEF", "DT_KEY_UNION", + "DT_KEY_UNSIGNED", "DT_KEY_VOID", "DT_KEY_VOLATILE", "DT_KEY_WHILE", + "DT_KEY_XLATOR", "DT_TOK_EPRED", "DT_CTX_DEXPR", "DT_CTX_DPROG", + "DT_CTX_DTYPE", "';'", "'{'", "'}'", "$accept", "dtrace_program", + "d_expression", "d_program", "d_type", "translation_unit", + "external_declaration", "inline_definition", "$@1", + "translator_definition", "translator_member_list", "translator_member", + "provider_definition", "provider_probe_list", "provider_probe", + "probe_definition", "probe_specifiers", "probe_specifier_list", + "probe_specifier", "statement_list", "statement", + "argument_expression_list", "primary_expression", "postfix_expression", + "unary_expression", "unary_operator", "cast_expression", + "multiplicative_expression", "additive_expression", "shift_expression", + "relational_expression", "equality_expression", "and_expression", + "exclusive_or_expression", "inclusive_or_expression", + "logical_and_expression", "logical_xor_expression", + "logical_or_expression", "constant_expression", "conditional_expression", + "assignment_expression", "assignment_operator", "expression", + "declaration", "declaration_specifiers", + "parameter_declaration_specifiers", "storage_class_specifier", + "d_storage_class_specifier", "type_specifier", "type_qualifier", + "struct_or_union_specifier", "struct_or_union_definition", + "struct_or_union", "struct_declaration_list", "init_declarator_list", + "init_declarator", "struct_declaration", "specifier_qualifier_list", + "struct_declarator_list", "struct_declarator", "enum_specifier", + "enum_definition", "enumerator_list", "enumerator", "declarator", + "direct_declarator", "lparen", "pointer", "type_qualifier_list", + "parameter_type_list", "parameter_list", "parameter_declaration", + "type_name", "abstract_declarator", "direct_abstract_declarator", + "array", "$@2", "array_parameters", "function", "$@3", + "function_parameters", 0 +}; +#endif + +# ifdef YYPRINT +/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to + token YYLEX-NUM. */ +static const yytype_uint16 yytoknum[] = +{ + 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, + 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, + 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, + 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, + 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, + 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, + 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, + 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, + 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, + 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, + 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, + 59, 123, 125 +}; +# endif + +/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ +static const yytype_uint8 yyr1[] = +{ + 0, 113, 114, 114, 114, 115, 115, 116, 116, 117, + 117, 118, 118, 119, 119, 119, 119, 119, 121, 120, + 122, 122, 123, 123, 124, 125, 125, 126, 126, 127, + 127, 128, 128, 128, 128, 129, 130, 130, 131, 131, + 132, 132, 133, 133, 134, 134, 135, 135, 135, 135, + 135, 135, 135, 136, 136, 136, 136, 136, 136, 136, + 136, 136, 136, 136, 136, 136, 137, 137, 137, 137, + 137, 137, 137, 138, 138, 138, 138, 138, 138, 139, + 139, 140, 140, 140, 140, 141, 141, 141, 142, 142, + 142, 143, 143, 143, 143, 143, 144, 144, 144, 145, + 145, 146, 146, 147, 147, 148, 148, 149, 149, 150, + 150, 151, 152, 152, 153, 153, 154, 154, 154, 154, + 154, 154, 154, 154, 154, 154, 154, 155, 155, 156, + 156, 157, 157, 157, 157, 157, 157, 158, 158, 158, + 158, 158, 158, 159, 159, 159, 159, 159, 160, 160, + 160, 161, 161, 161, 161, 161, 161, 161, 161, 161, + 161, 161, 161, 161, 162, 162, 162, 163, 163, 163, + 164, 164, 164, 165, 165, 166, 166, 167, 167, 168, + 169, 170, 170, 170, 170, 171, 171, 172, 172, 172, + 173, 173, 173, 174, 174, 174, 175, 175, 176, 176, + 177, 177, 178, 178, 178, 178, 179, 180, 180, 180, + 180, 181, 181, 182, 182, 182, 183, 183, 184, 184, + 184, 185, 185, 186, 186, 186, 187, 187, 187, 187, + 187, 189, 188, 190, 190, 190, 192, 191, 193, 193 +}; + +/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ +static const yytype_uint8 yyr2[] = +{ + 0, 2, 2, 2, 2, 1, 2, 1, 2, 1, + 2, 1, 2, 1, 1, 1, 1, 1, 0, 7, + 10, 9, 1, 2, 4, 6, 5, 1, 2, 6, + 4, 1, 4, 4, 7, 1, 1, 3, 1, 1, + 1, 3, 0, 1, 1, 3, 1, 1, 1, 1, + 1, 1, 3, 1, 4, 3, 4, 3, 3, 3, + 3, 2, 2, 6, 6, 7, 1, 2, 2, 2, + 2, 4, 2, 1, 1, 1, 1, 1, 1, 1, + 4, 1, 3, 3, 3, 1, 3, 3, 1, 3, + 3, 1, 3, 3, 3, 3, 1, 3, 3, 1, + 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, + 3, 1, 1, 5, 1, 3, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 3, 2, + 3, 1, 2, 1, 2, 1, 2, 1, 2, 1, + 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 3, 2, 2, + 2, 3, 3, 1, 1, 1, 2, 1, 3, 1, + 3, 1, 2, 1, 2, 1, 3, 1, 2, 3, + 3, 2, 2, 2, 3, 3, 1, 3, 1, 3, + 1, 2, 1, 3, 2, 2, 1, 1, 2, 2, + 3, 1, 2, 1, 1, 3, 1, 3, 1, 2, + 2, 1, 2, 1, 1, 2, 3, 2, 1, 2, + 1, 0, 4, 0, 1, 1, 0, 4, 0, 1 +}; + +/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state + STATE-NUM when YYTABLE doesn't specify something else to do. Zero + means the default is an error. */ +static const yytype_uint8 yydefact[] = +{ + 0, 5, 7, 9, 0, 0, 0, 0, 73, 75, + 76, 74, 78, 77, 0, 0, 0, 0, 0, 0, + 0, 49, 46, 47, 48, 50, 51, 53, 66, 79, + 0, 81, 85, 88, 91, 96, 99, 101, 103, 105, + 107, 109, 112, 114, 127, 6, 38, 161, 39, 143, + 152, 164, 157, 0, 146, 156, 0, 154, 155, 0, + 144, 165, 149, 153, 158, 145, 160, 173, 150, 147, + 174, 159, 151, 166, 0, 8, 11, 13, 14, 15, + 16, 31, 35, 36, 17, 0, 148, 131, 133, 135, + 162, 0, 0, 163, 0, 181, 183, 221, 10, 1, + 2, 3, 4, 0, 67, 68, 0, 0, 70, 72, + 0, 0, 0, 61, 62, 0, 0, 0, 0, 116, + 120, 121, 117, 118, 119, 124, 125, 126, 122, 123, + 0, 79, 69, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 191, 192, 193, 0, 0, 0, + 12, 0, 42, 0, 207, 206, 202, 129, 0, 177, + 179, 200, 0, 0, 132, 134, 136, 0, 175, 0, + 168, 169, 170, 198, 0, 196, 182, 184, 236, 231, + 0, 223, 222, 224, 228, 230, 0, 0, 0, 52, + 0, 55, 0, 44, 0, 59, 60, 57, 58, 115, + 82, 83, 84, 86, 87, 89, 90, 92, 94, 93, + 95, 97, 98, 100, 102, 104, 106, 108, 0, 110, + 128, 194, 195, 18, 0, 0, 0, 0, 40, 43, + 37, 211, 209, 208, 0, 130, 236, 204, 205, 0, + 201, 167, 176, 0, 0, 185, 187, 171, 172, 0, + 0, 190, 238, 233, 0, 225, 227, 229, 0, 71, + 0, 80, 0, 56, 54, 0, 0, 0, 0, 0, + 27, 0, 33, 42, 32, 212, 210, 178, 203, 188, + 111, 0, 180, 0, 199, 197, 214, 218, 137, 139, + 141, 239, 213, 216, 0, 234, 235, 0, 226, 0, + 0, 0, 45, 113, 0, 0, 26, 0, 28, 0, + 42, 41, 186, 189, 219, 0, 223, 220, 138, 140, + 142, 0, 237, 232, 63, 64, 0, 0, 0, 25, + 0, 0, 215, 217, 65, 19, 0, 30, 0, 34, + 0, 0, 0, 0, 22, 29, 0, 21, 0, 23, + 0, 20, 24 +}; + +/* YYDEFGOTO[NTERM-NUM]. */ +static const yytype_int16 yydefgoto[] = +{ + -1, 4, 5, 6, 7, 75, 76, 77, 276, 78, + 353, 354, 79, 279, 280, 80, 81, 82, 83, 237, + 238, 202, 27, 28, 131, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 42, 289, 43, + 44, 130, 111, 84, 85, 297, 86, 87, 95, 96, + 90, 91, 92, 177, 168, 169, 178, 97, 254, 255, + 93, 94, 184, 185, 170, 171, 172, 173, 243, 301, + 302, 303, 98, 264, 193, 194, 263, 307, 195, 262, + 304 +}; + +/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing + STATE-NUM. */ +#define YYPACT_NINF -224 +static const yytype_int16 yypact[] = +{ + 148, 553, 641, 723, 26, 49, 57, 76, -224, -224, + -224, -224, -224, -224, 596, 596, 88, 629, 596, 72, + 446, -224, -224, -224, -224, -224, -224, -224, 179, 822, + 553, -224, 152, 37, 118, 109, 56, 132, 137, 154, + 149, 162, 175, -224, -224, 205, -224, -224, -224, -224, + -224, -224, -224, 11, -224, -224, 682, -224, -224, 155, + -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, + -224, -224, -224, -224, 723, 641, -224, -224, -224, -224, + -224, 10, 217, -224, -224, 7, -224, 682, 682, 682, + -224, 723, 22, -224, 167, 723, 723, 139, -224, -224, + -224, -224, -224, 553, -224, -224, 723, 446, -224, -224, + 723, 58, 177, -224, -224, 520, 553, -5, 80, -224, + -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, + 553, -224, -224, 553, 553, 553, 553, 553, 553, 553, + 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, + 553, 553, 553, 553, 127, 131, -224, 110, 133, 209, + -224, 553, 553, 81, 4, -224, -224, -224, 17, -224, + -224, 145, 110, 50, -224, -224, -224, 121, -224, 94, + 159, 161, -224, 243, 18, -224, -224, -224, 119, -224, + 139, 156, -224, 145, -224, -224, 247, 213, 231, -224, + 553, -224, 62, -224, 48, -224, -224, -224, -224, -224, + -224, -224, -224, 152, 152, 37, 37, 118, 118, 118, + 118, 109, 109, 56, 132, 137, 154, 149, 45, 162, + -224, -224, -224, -224, -49, 723, 19, 116, -224, 205, + -224, -224, -224, 4, 110, -224, -224, -224, -224, 219, + 145, -224, -224, 553, 21, -224, 257, -224, -224, 553, + 167, -224, 331, 289, 221, 145, -224, -224, 117, -224, + 223, -224, 553, -224, -224, 553, 272, 218, 169, -44, + -224, 220, 170, 553, -224, -224, -224, -224, -224, -224, + -224, 94, -224, 553, -224, -224, -224, 123, 682, 682, + 682, -224, 280, -224, 230, -224, -224, 229, -224, 232, + 233, 553, -224, -224, 553, 236, -224, 180, -224, 263, + 553, -224, -224, -224, -224, 123, 79, -224, -224, -224, + -224, 372, -224, -224, -224, -224, 69, 182, 16, -224, + 183, 129, -224, -224, -224, -224, 236, -224, -35, -224, + 185, 291, 187, -13, -224, -224, 553, -224, 194, -224, + 195, -224, -224 +}; + +/* YYPGOTO[NTERM-NUM]. */ +static const yytype_int16 yypgoto[] = +{ + -224, -224, -224, -224, -224, -224, 234, -224, -224, -224, + -224, -47, -224, -224, 28, -224, -224, -224, 151, -12, + 32, 201, -224, -224, -1, -224, -15, 66, 122, 111, + 124, 165, 171, 172, 181, 174, 184, -224, -210, -209, + -107, -224, 5, -224, -53, -224, -223, -224, 3, 0, + -224, -224, -224, -224, -224, 89, 160, -64, -224, 41, + -224, -224, -224, 83, -129, -155, -96, -85, -224, 82, + -224, 13, -10, -93, -180, -141, -224, -224, -164, -224, + -224 +}; + +/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If + positive, shift that token. If negative, reduce the rule which + number is the opposite. If zero, do what YYDEFACT says. + If YYTABLE_NINF, syntax error. */ +#define YYTABLE_NINF -207 +static const yytype_int16 yytable[] = +{ + 29, 190, 89, 157, 192, 88, 45, 248, 203, 203, + 112, 265, 191, 104, 105, 132, 108, 109, 250, 29, + 244, 260, 153, 209, 291, 351, 99, 179, 233, 267, + 247, 186, 187, 346, 174, 175, 176, 277, 164, 298, + 298, 164, 277, 249, 290, 161, 230, 351, 153, 100, + 256, 272, 266, 305, 290, 205, 89, 101, 206, 88, + 165, 153, 275, 278, 159, 272, 313, 166, 317, 136, + 137, 154, 153, 51, 155, 89, 102, 352, 88, 242, + 144, 145, 180, 323, 290, 181, 248, 89, 89, 89, + 88, 88, 88, 61, 190, 190, 196, 197, 110, 358, + 198, 267, 29, 165, 274, 191, 29, 73, 298, 247, + 166, 253, 199, 179, 29, 29, 273, 167, 210, 211, + 212, 162, 156, 344, 266, 282, 347, 245, 164, 29, + 261, 292, 188, 182, 189, 140, 141, 142, 143, 166, + 207, 106, 46, 208, 164, 48, 265, 165, 138, 139, + 29, 338, 29, -206, 166, 146, 228, 164, 286, 147, + 29, 29, 256, 165, 241, 312, 236, 239, 324, 149, + 166, 250, -206, 164, -206, 148, 188, 309, 189, -206, + 310, 150, 350, 166, 47, 271, 133, 134, 135, 50, + 51, 151, 188, 152, 189, 52, 249, 53, 246, 55, + 189, 325, 213, 214, 327, 57, 58, 337, 153, 188, + 61, 189, 326, 63, 64, 158, 66, 67, 113, 114, + 163, 70, 71, 72, 73, 281, 283, 183, 284, 325, + 325, 200, 115, 251, 116, 235, 117, 118, 231, 283, + 326, 349, 232, 285, 234, 328, 329, 330, 259, 360, + 268, 217, 218, 219, 220, 1, 2, 3, 29, 270, + 215, 216, 300, 300, 294, 299, 299, 269, 221, 222, + 257, 29, 258, 288, 293, 308, 311, 314, 315, 316, + 319, 320, 29, 331, 332, 333, 334, 335, 239, 246, + 339, 340, 345, 296, 348, 355, 356, 357, 89, 89, + 89, 88, 88, 88, 361, 362, 359, 318, 341, 160, + 29, 223, 8, 29, 240, 321, 336, 204, 224, 29, + 225, 9, 10, 11, 227, 239, 12, 13, 14, 15, + 226, 300, 322, 287, 299, 296, 229, 252, 16, 17, + 18, 19, 20, 295, 343, 306, 0, 0, 21, 22, + 0, 23, 47, 24, 49, 29, 0, 50, 51, 0, + 0, 0, 0, 52, 0, 53, 54, 55, 0, 0, + 0, 0, 0, 57, 58, 0, 342, 60, 61, 0, + 25, 63, 64, 65, 66, 67, 0, 26, 69, 70, + 71, 72, 73, 0, 47, 0, 49, 0, 0, 50, + 51, 0, 0, 0, 0, 52, 0, 53, 54, 55, + 0, 0, 0, 0, 0, 57, 58, 0, 0, 60, + 61, 0, 0, 63, 64, 65, 66, 67, 0, 0, + 69, 70, 71, 72, 73, 47, 0, 49, 0, 0, + 50, 51, 0, 0, 0, 0, 52, 0, 53, 54, + 55, 0, 0, 0, 0, 0, 57, 58, 0, 0, + 60, 61, 0, 0, 63, 64, 65, 66, 67, 8, + 0, 69, 70, 71, 72, 73, 0, 0, 9, 10, + 11, 0, 0, 12, 13, 14, 15, 0, 0, 0, + 0, 0, 0, 0, 0, 16, 17, 18, 19, 20, + 0, 0, 0, 0, 0, 21, 22, 0, 23, 47, + 24, 0, 0, 0, 50, 51, 0, 0, 0, 0, + 52, 0, 53, 0, 55, 0, 0, 0, 0, 0, + 57, 58, 0, 0, 0, 61, 0, 25, 63, 64, + 0, 66, 67, 8, 26, 0, 70, 71, 72, 73, + 0, 0, 9, 10, 11, 0, 0, 12, 13, 14, + 15, 0, 0, 0, 0, 0, 0, 0, 0, 16, + 17, 18, 19, 20, 201, 0, 8, 0, 0, 21, + 22, 0, 23, 0, 24, 9, 10, 11, 0, 0, + 12, 13, 14, 15, 0, 0, 0, 0, 0, 0, + 0, 0, 16, 17, 18, 19, 20, 0, 0, 0, + 0, 25, 21, 22, 0, 23, 0, 24, 26, 8, + 0, 0, 0, 0, 0, 0, 0, 0, 9, 10, + 11, 0, 0, 12, 13, 14, 15, 0, 0, 0, + 0, 0, 0, 0, 25, 16, 17, 18, 19, 103, + 0, 26, 8, 0, 0, 21, 22, 0, 23, 0, + 24, 9, 10, 11, 0, 0, 12, 13, 14, 15, + 0, 0, 0, 0, 0, 0, 0, 0, 16, 17, + 18, 19, 107, 0, 0, 0, 0, 25, 21, 22, + 0, 23, 0, 24, 26, 0, 0, 0, 0, 0, + 0, 0, 46, 0, 47, 48, 49, 0, 0, 50, + 51, 0, 0, 0, 0, 52, 0, 53, 54, 55, + 25, 0, 0, 0, 56, 57, 58, 26, 59, 60, + 61, 0, 62, 63, 64, 65, 66, 67, 0, 68, + 69, 70, 71, 72, 73, 47, 74, 49, 0, 0, + 50, 51, 0, 0, 0, 0, 52, 0, 53, 54, + 55, 0, 0, 0, 0, 0, 57, 58, 0, 0, + 60, 61, 0, 62, 63, 64, 65, 66, 67, 0, + 68, 69, 70, 71, 72, 73, 47, 0, 0, 0, + 0, 50, 51, 0, 0, 0, 0, 52, 0, 53, + 0, 55, 0, 0, 0, 0, 0, 57, 58, 0, + 0, 0, 61, 0, 0, 63, 64, 0, 66, 67, + 0, 0, 0, 70, 71, 72, 73, 119, 120, 121, + 122, 123, 124, 125, 126, 127, 128, 129 +}; + +static const yytype_int16 yycheck[] = +{ + 1, 97, 2, 56, 97, 2, 1, 171, 115, 116, + 20, 191, 97, 14, 15, 30, 17, 18, 173, 20, + 3, 3, 3, 130, 3, 60, 0, 91, 157, 193, + 171, 95, 96, 17, 87, 88, 89, 86, 34, 262, + 263, 34, 86, 172, 253, 35, 153, 60, 3, 0, + 179, 3, 193, 263, 263, 60, 56, 0, 63, 56, + 53, 3, 17, 112, 74, 3, 275, 60, 112, 32, + 33, 60, 3, 69, 63, 75, 0, 112, 75, 164, + 24, 25, 60, 293, 293, 63, 250, 87, 88, 89, + 87, 88, 89, 89, 190, 191, 106, 107, 26, 112, + 110, 265, 103, 53, 56, 190, 107, 103, 331, 250, + 60, 17, 54, 177, 115, 116, 54, 110, 133, 134, + 135, 111, 111, 54, 265, 106, 110, 110, 34, 130, + 112, 110, 53, 111, 55, 26, 27, 28, 29, 60, + 60, 53, 61, 63, 34, 64, 326, 53, 30, 31, + 151, 315, 153, 34, 60, 23, 151, 34, 243, 22, + 161, 162, 291, 53, 164, 272, 161, 162, 297, 20, + 60, 326, 53, 34, 55, 21, 53, 60, 55, 60, + 63, 19, 346, 60, 63, 200, 34, 35, 36, 68, + 69, 16, 53, 18, 55, 74, 325, 76, 53, 78, + 55, 297, 136, 137, 297, 84, 85, 314, 3, 53, + 89, 55, 297, 92, 93, 60, 95, 96, 39, 40, + 3, 100, 101, 102, 103, 235, 110, 60, 112, 325, + 326, 54, 53, 112, 55, 26, 57, 58, 111, 110, + 325, 112, 111, 243, 111, 298, 299, 300, 5, 356, + 3, 140, 141, 142, 143, 107, 108, 109, 259, 28, + 138, 139, 262, 263, 259, 262, 263, 54, 144, 145, + 111, 272, 111, 54, 17, 54, 53, 5, 60, 110, + 60, 111, 283, 3, 54, 56, 54, 54, 283, 53, + 110, 28, 110, 4, 111, 110, 5, 110, 298, 299, + 300, 298, 299, 300, 110, 110, 353, 279, 320, 75, + 311, 146, 23, 314, 163, 283, 311, 116, 147, 320, + 148, 32, 33, 34, 150, 320, 37, 38, 39, 40, + 149, 331, 291, 244, 331, 4, 152, 177, 49, 50, + 51, 52, 53, 260, 331, 263, -1, -1, 59, 60, + -1, 62, 63, 64, 65, 356, -1, 68, 69, -1, + -1, -1, -1, 74, -1, 76, 77, 78, -1, -1, + -1, -1, -1, 84, 85, -1, 4, 88, 89, -1, + 91, 92, 93, 94, 95, 96, -1, 98, 99, 100, + 101, 102, 103, -1, 63, -1, 65, -1, -1, 68, + 69, -1, -1, -1, -1, 74, -1, 76, 77, 78, + -1, -1, -1, -1, -1, 84, 85, -1, -1, 88, + 89, -1, -1, 92, 93, 94, 95, 96, -1, -1, + 99, 100, 101, 102, 103, 63, -1, 65, -1, -1, + 68, 69, -1, -1, -1, -1, 74, -1, 76, 77, + 78, -1, -1, -1, -1, -1, 84, 85, -1, -1, + 88, 89, -1, -1, 92, 93, 94, 95, 96, 23, + -1, 99, 100, 101, 102, 103, -1, -1, 32, 33, + 34, -1, -1, 37, 38, 39, 40, -1, -1, -1, + -1, -1, -1, -1, -1, 49, 50, 51, 52, 53, + -1, -1, -1, -1, -1, 59, 60, -1, 62, 63, + 64, -1, -1, -1, 68, 69, -1, -1, -1, -1, + 74, -1, 76, -1, 78, -1, -1, -1, -1, -1, + 84, 85, -1, -1, -1, 89, -1, 91, 92, 93, + -1, 95, 96, 23, 98, -1, 100, 101, 102, 103, + -1, -1, 32, 33, 34, -1, -1, 37, 38, 39, + 40, -1, -1, -1, -1, -1, -1, -1, -1, 49, + 50, 51, 52, 53, 54, -1, 23, -1, -1, 59, + 60, -1, 62, -1, 64, 32, 33, 34, -1, -1, + 37, 38, 39, 40, -1, -1, -1, -1, -1, -1, + -1, -1, 49, 50, 51, 52, 53, -1, -1, -1, + -1, 91, 59, 60, -1, 62, -1, 64, 98, 23, + -1, -1, -1, -1, -1, -1, -1, -1, 32, 33, + 34, -1, -1, 37, 38, 39, 40, -1, -1, -1, + -1, -1, -1, -1, 91, 49, 50, 51, 52, 53, + -1, 98, 23, -1, -1, 59, 60, -1, 62, -1, + 64, 32, 33, 34, -1, -1, 37, 38, 39, 40, + -1, -1, -1, -1, -1, -1, -1, -1, 49, 50, + 51, 52, 53, -1, -1, -1, -1, 91, 59, 60, + -1, 62, -1, 64, 98, -1, -1, -1, -1, -1, + -1, -1, 61, -1, 63, 64, 65, -1, -1, 68, + 69, -1, -1, -1, -1, 74, -1, 76, 77, 78, + 91, -1, -1, -1, 83, 84, 85, 98, 87, 88, + 89, -1, 91, 92, 93, 94, 95, 96, -1, 98, + 99, 100, 101, 102, 103, 63, 105, 65, -1, -1, + 68, 69, -1, -1, -1, -1, 74, -1, 76, 77, + 78, -1, -1, -1, -1, -1, 84, 85, -1, -1, + 88, 89, -1, 91, 92, 93, 94, 95, 96, -1, + 98, 99, 100, 101, 102, 103, 63, -1, -1, -1, + -1, 68, 69, -1, -1, -1, -1, 74, -1, 76, + -1, 78, -1, -1, -1, -1, -1, 84, 85, -1, + -1, -1, 89, -1, -1, 92, 93, -1, 95, 96, + -1, -1, -1, 100, 101, 102, 103, 5, 6, 7, + 8, 9, 10, 11, 12, 13, 14, 15 +}; + +/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing + symbol of state STATE-NUM. */ +static const yytype_uint8 yystos[] = +{ + 0, 107, 108, 109, 114, 115, 116, 117, 23, 32, + 33, 34, 37, 38, 39, 40, 49, 50, 51, 52, + 53, 59, 60, 62, 64, 91, 98, 135, 136, 137, + 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, + 148, 149, 150, 152, 153, 155, 61, 63, 64, 65, + 68, 69, 74, 76, 77, 78, 83, 84, 85, 87, + 88, 89, 91, 92, 93, 94, 95, 96, 98, 99, + 100, 101, 102, 103, 105, 118, 119, 120, 122, 125, + 128, 129, 130, 131, 156, 157, 159, 160, 161, 162, + 163, 164, 165, 173, 174, 161, 162, 170, 185, 0, + 0, 0, 0, 53, 137, 137, 53, 53, 137, 137, + 26, 155, 185, 39, 40, 53, 55, 57, 58, 5, + 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + 154, 137, 139, 34, 35, 36, 32, 33, 30, 31, + 26, 27, 28, 29, 24, 25, 23, 22, 21, 20, + 19, 16, 18, 3, 60, 63, 111, 157, 60, 185, + 119, 35, 111, 3, 34, 53, 60, 110, 167, 168, + 177, 178, 179, 180, 157, 157, 157, 166, 169, 170, + 60, 63, 111, 60, 175, 176, 170, 170, 53, 55, + 179, 180, 186, 187, 188, 191, 185, 185, 185, 54, + 54, 54, 134, 153, 134, 60, 63, 60, 63, 153, + 139, 139, 139, 140, 140, 141, 141, 142, 142, 142, + 142, 143, 143, 144, 145, 146, 147, 148, 155, 149, + 153, 111, 111, 177, 111, 26, 155, 132, 133, 155, + 131, 162, 180, 181, 3, 110, 53, 188, 191, 177, + 178, 112, 169, 17, 171, 172, 177, 111, 111, 5, + 3, 112, 192, 189, 186, 187, 188, 191, 3, 54, + 28, 139, 3, 54, 56, 17, 121, 86, 112, 126, + 127, 185, 106, 110, 112, 162, 180, 168, 54, 151, + 152, 3, 110, 17, 155, 176, 4, 158, 159, 161, + 162, 182, 183, 184, 193, 151, 182, 190, 54, 60, + 63, 53, 153, 152, 5, 60, 110, 112, 127, 60, + 111, 133, 172, 151, 177, 179, 180, 186, 157, 157, + 157, 3, 54, 56, 54, 54, 155, 153, 191, 110, + 28, 132, 4, 184, 54, 110, 17, 110, 111, 112, + 191, 60, 112, 123, 124, 110, 5, 110, 112, 124, + 153, 110, 110 +}; + +#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 + + +/* Like YYERROR except do call yyerror. This remains here temporarily + to ease the transition to the new meaning of YYERROR, for GCC. + Once GCC version 2 has supplanted version 1, this can go. */ + +#define YYFAIL goto yyerrlab + +#define YYRECOVERING() (!!yyerrstatus) + +#define YYBACKUP(Token, Value) \ +do \ + if (yychar == YYEMPTY && yylen == 1) \ + { \ + yychar = (Token); \ + yylval = (Value); \ + yytoken = YYTRANSLATE (yychar); \ + YYPOPSTACK (1); \ + goto yybackup; \ + } \ + else \ + { \ + yyerror (YY_("syntax error: cannot back up")); \ + YYERROR; \ + } \ +while (YYID (0)) + + +#define YYTERROR 1 +#define YYERRCODE 256 + + +/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. + If N is 0, then set CURRENT to the empty location which ends + the previous symbol: RHS[0] (always defined). */ + +#define YYRHSLOC(Rhs, K) ((Rhs)[K]) +#ifndef YYLLOC_DEFAULT +# define YYLLOC_DEFAULT(Current, Rhs, N) \ + do \ + if (YYID (N)) \ + { \ + (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ + (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ + (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ + (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ + } \ + else \ + { \ + (Current).first_line = (Current).last_line = \ + YYRHSLOC (Rhs, 0).last_line; \ + (Current).first_column = (Current).last_column = \ + YYRHSLOC (Rhs, 0).last_column; \ + } \ + while (YYID (0)) +#endif + + +/* YY_LOCATION_PRINT -- Print the location on the stream. + This macro was not mandated originally: define only if we know + we won't break user code: when these are the locations we know. */ + +#ifndef YY_LOCATION_PRINT +# if YYLTYPE_IS_TRIVIAL +# define YY_LOCATION_PRINT(File, Loc) \ + fprintf (File, "%d.%d-%d.%d", \ + (Loc).first_line, (Loc).first_column, \ + (Loc).last_line, (Loc).last_column) +# else +# define YY_LOCATION_PRINT(File, Loc) ((void) 0) +# endif +#endif + + +/* YYLEX -- calling `yylex' with the right arguments. */ + +#ifdef YYLEX_PARAM +# define YYLEX yylex (YYLEX_PARAM) +#else +# define YYLEX yylex () +#endif + +/* Enable debugging if requested. */ +#if YYDEBUG + +# ifndef YYFPRINTF +# include <stdio.h> /* INFRINGES ON USER NAME SPACE */ +# define YYFPRINTF fprintf +# endif + +# define YYDPRINTF(Args) \ +do { \ + if (yydebug) \ + YYFPRINTF Args; \ +} while (YYID (0)) + +# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ +do { \ + if (yydebug) \ + { \ + YYFPRINTF (stderr, "%s ", Title); \ + yy_symbol_print (stderr, \ + Type, Value); \ + YYFPRINTF (stderr, "\n"); \ + } \ +} while (YYID (0)) + + +/*--------------------------------. +| Print this symbol on YYOUTPUT. | +`--------------------------------*/ + +/*ARGSUSED*/ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static void +yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) +#else +static void +yy_symbol_value_print (yyoutput, yytype, yyvaluep) + FILE *yyoutput; + int yytype; + YYSTYPE const * const yyvaluep; +#endif +{ + if (!yyvaluep) + return; +# ifdef YYPRINT + if (yytype < YYNTOKENS) + YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); +# else + YYUSE (yyoutput); +# endif + switch (yytype) + { + default: + break; + } +} + + +/*--------------------------------. +| Print this symbol on YYOUTPUT. | +`--------------------------------*/ + +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static void +yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) +#else +static void +yy_symbol_print (yyoutput, yytype, yyvaluep) + FILE *yyoutput; + int yytype; + YYSTYPE const * const yyvaluep; +#endif +{ + if (yytype < YYNTOKENS) + YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); + else + YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); + + yy_symbol_value_print (yyoutput, yytype, yyvaluep); + YYFPRINTF (yyoutput, ")"); +} + +/*------------------------------------------------------------------. +| yy_stack_print -- Print the state stack from its BOTTOM up to its | +| TOP (included). | +`------------------------------------------------------------------*/ + +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static void +yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) +#else +static void +yy_stack_print (yybottom, yytop) + yytype_int16 *yybottom; + yytype_int16 *yytop; +#endif +{ + YYFPRINTF (stderr, "Stack now"); + for (; yybottom <= yytop; yybottom++) + { + int yybot = *yybottom; + YYFPRINTF (stderr, " %d", yybot); + } + YYFPRINTF (stderr, "\n"); +} + +# define YY_STACK_PRINT(Bottom, Top) \ +do { \ + if (yydebug) \ + yy_stack_print ((Bottom), (Top)); \ +} while (YYID (0)) + + +/*------------------------------------------------. +| Report that the YYRULE is going to be reduced. | +`------------------------------------------------*/ + +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static void +yy_reduce_print (YYSTYPE *yyvsp, int yyrule) +#else +static void +yy_reduce_print (yyvsp, yyrule) + YYSTYPE *yyvsp; + int yyrule; +#endif +{ + int yynrhs = yyr2[yyrule]; + int yyi; + unsigned long int yylno = yyrline[yyrule]; + YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", + yyrule - 1, yylno); + /* The symbols being reduced. */ + for (yyi = 0; yyi < yynrhs; yyi++) + { + YYFPRINTF (stderr, " $%d = ", yyi + 1); + yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], + &(yyvsp[(yyi + 1) - (yynrhs)]) + ); + YYFPRINTF (stderr, "\n"); + } +} + +# define YY_REDUCE_PRINT(Rule) \ +do { \ + if (yydebug) \ + yy_reduce_print (yyvsp, Rule); \ +} while (YYID (0)) + +/* Nonzero means print parse trace. It is left uninitialized so that + multiple parsers can coexist. */ +int yydebug; +#else /* !YYDEBUG */ +# define YYDPRINTF(Args) +# define YY_SYMBOL_PRINT(Title, Type, Value, Location) +# define YY_STACK_PRINT(Bottom, Top) +# define YY_REDUCE_PRINT(Rule) +#endif /* !YYDEBUG */ + + +/* YYINITDEPTH -- initial size of the parser's stacks. */ +#ifndef YYINITDEPTH +# define YYINITDEPTH 200 +#endif + +/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only + if the built-in stack extension method is used). + + Do not make this value too large; the results are undefined if + YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) + evaluated with infinite-precision integer arithmetic. */ + +#ifndef YYMAXDEPTH +# define YYMAXDEPTH 10000 +#endif + + + +#if YYERROR_VERBOSE + +# ifndef yystrlen +# if defined __GLIBC__ && defined _STRING_H +# define yystrlen strlen +# else +/* Return the length of YYSTR. */ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static YYSIZE_T +yystrlen (const char *yystr) +#else +static YYSIZE_T +yystrlen (yystr) + const char *yystr; +#endif +{ + YYSIZE_T yylen; + for (yylen = 0; yystr[yylen]; yylen++) + continue; + return yylen; +} +# endif +# endif + +# ifndef yystpcpy +# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE +# define yystpcpy stpcpy +# else +/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in + YYDEST. */ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static char * +yystpcpy (char *yydest, const char *yysrc) +#else +static char * +yystpcpy (yydest, yysrc) + char *yydest; + const char *yysrc; +#endif +{ + char *yyd = yydest; + const char *yys = yysrc; + + while ((*yyd++ = *yys++) != '\0') + continue; + + return yyd - 1; +} +# endif +# endif + +# ifndef yytnamerr +/* Copy to YYRES the contents of YYSTR after stripping away unnecessary + quotes and backslashes, so that it's suitable for yyerror. The + heuristic is that double-quoting is unnecessary unless the string + contains an apostrophe, a comma, or backslash (other than + backslash-backslash). YYSTR is taken from yytname. If YYRES is + null, do not copy; instead, return the length of what the result + would have been. */ +static YYSIZE_T +yytnamerr (char *yyres, const char *yystr) +{ + if (*yystr == '"') + { + YYSIZE_T yyn = 0; + char const *yyp = yystr; + + for (;;) + switch (*++yyp) + { + case '\'': + case ',': + goto do_not_strip_quotes; + + case '\\': + if (*++yyp != '\\') + goto do_not_strip_quotes; + /* Fall through. */ + default: + if (yyres) + yyres[yyn] = *yyp; + yyn++; + break; + + case '"': + if (yyres) + yyres[yyn] = '\0'; + return yyn; + } + do_not_strip_quotes: ; + } + + if (! yyres) + return yystrlen (yystr); + + return yystpcpy (yyres, yystr) - yyres; +} +# endif + +/* Copy into YYRESULT an error message about the unexpected token + YYCHAR while in state YYSTATE. Return the number of bytes copied, + including the terminating null byte. If YYRESULT is null, do not + copy anything; just return the number of bytes that would be + copied. As a special case, return 0 if an ordinary "syntax error" + message will do. Return YYSIZE_MAXIMUM if overflow occurs during + size calculation. */ +static YYSIZE_T +yysyntax_error (char *yyresult, int yystate, int yychar) +{ + int yyn = yypact[yystate]; + + if (! (YYPACT_NINF < yyn && yyn <= YYLAST)) + return 0; + else + { + int yytype = YYTRANSLATE (yychar); + YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]); + YYSIZE_T yysize = yysize0; + YYSIZE_T yysize1; + int yysize_overflow = 0; + enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; + char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; + int yyx; + +# if 0 + /* This is so xgettext sees the translatable formats that are + constructed on the fly. */ + YY_("syntax error, unexpected %s"); + YY_("syntax error, unexpected %s, expecting %s"); + YY_("syntax error, unexpected %s, expecting %s or %s"); + YY_("syntax error, unexpected %s, expecting %s or %s or %s"); + YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"); +# endif + char *yyfmt; + char const *yyf; + static char const yyunexpected[] = "syntax error, unexpected %s"; + static char const yyexpecting[] = ", expecting %s"; + static char const yyor[] = " or %s"; + char yyformat[sizeof yyunexpected + + sizeof yyexpecting - 1 + + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2) + * (sizeof yyor - 1))]; + char const *yyprefix = yyexpecting; + + /* Start YYX at -YYN if negative to avoid negative indexes in + YYCHECK. */ + int yyxbegin = yyn < 0 ? -yyn : 0; + + /* Stay within bounds of both yycheck and yytname. */ + int yychecklim = YYLAST - yyn + 1; + int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; + int yycount = 1; + + yyarg[0] = yytname[yytype]; + yyfmt = yystpcpy (yyformat, yyunexpected); + + for (yyx = yyxbegin; yyx < yyxend; ++yyx) + if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) + { + if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) + { + yycount = 1; + yysize = yysize0; + yyformat[sizeof yyunexpected - 1] = '\0'; + break; + } + yyarg[yycount++] = yytname[yyx]; + yysize1 = yysize + yytnamerr (0, yytname[yyx]); + yysize_overflow |= (yysize1 < yysize); + yysize = yysize1; + yyfmt = yystpcpy (yyfmt, yyprefix); + yyprefix = yyor; + } + + yyf = YY_(yyformat); + yysize1 = yysize + yystrlen (yyf); + yysize_overflow |= (yysize1 < yysize); + yysize = yysize1; + + if (yysize_overflow) + return YYSIZE_MAXIMUM; + + if (yyresult) + { + /* Avoid sprintf, as that infringes on the user's name space. + Don't have undefined behavior even if the translation + produced a string with the wrong number of "%s"s. */ + char *yyp = yyresult; + int yyi = 0; + while ((*yyp = *yyf) != '\0') + { + if (*yyp == '%' && yyf[1] == 's' && yyi < yycount) + { + yyp += yytnamerr (yyp, yyarg[yyi++]); + yyf += 2; + } + else + { + yyp++; + yyf++; + } + } + } + return yysize; + } +} +#endif /* YYERROR_VERBOSE */ + + +/*-----------------------------------------------. +| Release the memory associated to this symbol. | +`-----------------------------------------------*/ + +/*ARGSUSED*/ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static void +yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) +#else +static void +yydestruct (yymsg, yytype, yyvaluep) + const char *yymsg; + int yytype; + YYSTYPE *yyvaluep; +#endif +{ + YYUSE (yyvaluep); + + if (!yymsg) + yymsg = "Deleting"; + YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); + + switch (yytype) + { + + default: + break; + } +} + +/* Prevent warnings from -Wmissing-prototypes. */ +#ifdef YYPARSE_PARAM +#if defined __STDC__ || defined __cplusplus +int yyparse (void *YYPARSE_PARAM); +#else +int yyparse (); +#endif +#else /* ! YYPARSE_PARAM */ +#if defined __STDC__ || defined __cplusplus +int yyparse (void); +#else +int yyparse (); +#endif +#endif /* ! YYPARSE_PARAM */ + + +/* The lookahead symbol. */ +int yychar; + +/* The semantic value of the lookahead symbol. */ +YYSTYPE yylval; + +/* Number of syntax errors so far. */ +int yynerrs; + + + +/*-------------------------. +| yyparse or yypush_parse. | +`-------------------------*/ + +#ifdef YYPARSE_PARAM +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +int +yyparse (void *YYPARSE_PARAM) +#else +int +yyparse (YYPARSE_PARAM) + void *YYPARSE_PARAM; +#endif +#else /* ! YYPARSE_PARAM */ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +int +yyparse (void) +#else +int +yyparse () + +#endif +#endif +{ + + + int yystate; + /* Number of tokens to shift before error messages enabled. */ + int yyerrstatus; + + /* The stacks and their tools: + `yyss': related to states. + `yyvs': related to semantic values. + + Refer to the stacks thru separate pointers, to allow yyoverflow + to reallocate them elsewhere. */ + + /* The state stack. */ + yytype_int16 yyssa[YYINITDEPTH]; + yytype_int16 *yyss; + yytype_int16 *yyssp; + + /* The semantic value stack. */ + YYSTYPE yyvsa[YYINITDEPTH]; + YYSTYPE *yyvs; + YYSTYPE *yyvsp; + + YYSIZE_T yystacksize; + + int yyn; + int yyresult; + /* Lookahead token as an internal (translated) token number. */ + int yytoken; + /* The variables used to return semantic value and location from the + action routines. */ + YYSTYPE yyval; + +#if YYERROR_VERBOSE + /* Buffer for error messages, and its allocated size. */ + char yymsgbuf[128]; + char *yymsg = yymsgbuf; + YYSIZE_T yymsg_alloc = sizeof yymsgbuf; +#endif + +#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) + + /* The number of symbols on the RHS of the reduced rule. + Keep to zero when no symbol should be popped. */ + int yylen = 0; + + yytoken = 0; + yyss = yyssa; + yyvs = yyvsa; + yystacksize = YYINITDEPTH; + + YYDPRINTF ((stderr, "Starting parse\n")); + + yystate = 0; + yyerrstatus = 0; + yynerrs = 0; + yychar = YYEMPTY; /* Cause a token to be read. */ + + /* Initialize stack pointers. + Waste one element of value and location stack + so that they stay on the same level as the state stack. + The wasted elements are never initialized. */ + yyssp = yyss; + yyvsp = yyvs; + + goto yysetstate; + +/*------------------------------------------------------------. +| yynewstate -- Push a new state, which is found in yystate. | +`------------------------------------------------------------*/ + yynewstate: + /* In all cases, when you get here, the value and location stacks + have just been pushed. So pushing a state here evens the stacks. */ + yyssp++; + + yysetstate: + *yyssp = yystate; + + if (yyss + yystacksize - 1 <= yyssp) + { + /* Get the current used size of the three stacks, in elements. */ + YYSIZE_T yysize = yyssp - yyss + 1; + +#ifdef yyoverflow + { + /* Give user a chance to reallocate the stack. Use copies of + these so that the &'s don't force the real ones into + memory. */ + YYSTYPE *yyvs1 = yyvs; + yytype_int16 *yyss1 = yyss; + + /* Each stack pointer address is followed by the size of the + data in use in that stack, in bytes. This used to be a + conditional around just the two extra args, but that might + be undefined if yyoverflow is a macro. */ + yyoverflow (YY_("memory exhausted"), + &yyss1, yysize * sizeof (*yyssp), + &yyvs1, yysize * sizeof (*yyvsp), + &yystacksize); + + yyss = yyss1; + yyvs = yyvs1; + } +#else /* no yyoverflow */ +# ifndef YYSTACK_RELOCATE + goto yyexhaustedlab; +# else + /* Extend the stack our own way. */ + if (YYMAXDEPTH <= yystacksize) + goto yyexhaustedlab; + yystacksize *= 2; + if (YYMAXDEPTH < yystacksize) + yystacksize = YYMAXDEPTH; + + { + yytype_int16 *yyss1 = yyss; + union yyalloc *yyptr = + (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); + if (! yyptr) + goto yyexhaustedlab; + YYSTACK_RELOCATE (yyss_alloc, yyss); + YYSTACK_RELOCATE (yyvs_alloc, yyvs); +# undef YYSTACK_RELOCATE + if (yyss1 != yyssa) + YYSTACK_FREE (yyss1); + } +# endif +#endif /* no yyoverflow */ + + yyssp = yyss + yysize - 1; + yyvsp = yyvs + yysize - 1; + + YYDPRINTF ((stderr, "Stack size increased to %lu\n", + (unsigned long int) yystacksize)); + + if (yyss + yystacksize - 1 <= yyssp) + YYABORT; + } + + YYDPRINTF ((stderr, "Entering state %d\n", yystate)); + + if (yystate == YYFINAL) + YYACCEPT; + + goto yybackup; + +/*-----------. +| yybackup. | +`-----------*/ +yybackup: + + /* Do appropriate processing given the current state. Read a + lookahead token if we need one and don't already have one. */ + + /* First try to decide what to do without reference to lookahead token. */ + yyn = yypact[yystate]; + if (yyn == YYPACT_NINF) + goto yydefault; + + /* Not known => get a lookahead token if don't already have one. */ + + /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ + if (yychar == YYEMPTY) + { + YYDPRINTF ((stderr, "Reading a token: ")); + yychar = YYLEX; + } + + if (yychar <= YYEOF) + { + yychar = yytoken = YYEOF; + YYDPRINTF ((stderr, "Now at end of input.\n")); + } + else + { + yytoken = YYTRANSLATE (yychar); + YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); + } + + /* If the proper action on seeing token YYTOKEN is to reduce or to + detect an error, take that action. */ + yyn += yytoken; + if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) + goto yydefault; + yyn = yytable[yyn]; + if (yyn <= 0) + { + if (yyn == 0 || yyn == YYTABLE_NINF) + goto yyerrlab; + yyn = -yyn; + goto yyreduce; + } + + /* Count tokens shifted since error; after three, turn off error + status. */ + if (yyerrstatus) + yyerrstatus--; + + /* Shift the lookahead token. */ + YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); + + /* Discard the shifted token. */ + yychar = YYEMPTY; + + yystate = yyn; + *++yyvsp = yylval; + + goto yynewstate; + + +/*-----------------------------------------------------------. +| yydefault -- do the default action for the current state. | +`-----------------------------------------------------------*/ +yydefault: + yyn = yydefact[yystate]; + if (yyn == 0) + goto yyerrlab; + goto yyreduce; + + +/*-----------------------------. +| yyreduce -- Do a reduction. | +`-----------------------------*/ +yyreduce: + /* yyn is the number of a rule to reduce with. */ + yylen = yyr2[yyn]; + + /* If YYLEN is nonzero, implement the default value of the action: + `$$ = $1'. + + Otherwise, the following line sets YYVAL to garbage. + This behavior is undocumented and Bison + users should not rely upon it. Assigning to YYVAL + unconditionally makes the parser a bit smaller, and it avoids a + GCC warning that YYVAL may be used uninitialized. */ + yyval = yyvsp[1-yylen]; + + + YY_REDUCE_PRINT (yyn); + switch (yyn) + { + case 2: + +/* Line 1455 of yacc.c */ +#line 221 "dt_grammar.y" + { return (dt_node_root((yyvsp[(1) - (2)].l_node))); } + break; + + case 3: + +/* Line 1455 of yacc.c */ +#line 222 "dt_grammar.y" + { return (dt_node_root((yyvsp[(1) - (2)].l_node))); } + break; + + case 4: + +/* Line 1455 of yacc.c */ +#line 223 "dt_grammar.y" + { return (dt_node_root((yyvsp[(1) - (2)].l_node))); } + break; + + case 5: + +/* Line 1455 of yacc.c */ +#line 226 "dt_grammar.y" + { (yyval.l_node) = NULL; } + break; + + case 6: + +/* Line 1455 of yacc.c */ +#line 227 "dt_grammar.y" + { (yyval.l_node) = (yyvsp[(2) - (2)].l_node); } + break; + + case 7: + +/* Line 1455 of yacc.c */ +#line 230 "dt_grammar.y" + { (yyval.l_node) = dt_node_program(NULL); } + break; + + case 8: + +/* Line 1455 of yacc.c */ +#line 231 "dt_grammar.y" + { (yyval.l_node) = dt_node_program((yyvsp[(2) - (2)].l_node)); } + break; + + case 9: + +/* Line 1455 of yacc.c */ +#line 234 "dt_grammar.y" + { (yyval.l_node) = NULL; } + break; + + case 10: + +/* Line 1455 of yacc.c */ +#line 235 "dt_grammar.y" + { (yyval.l_node) = (dt_node_t *)(yyvsp[(2) - (2)].l_decl); } + break; + + case 12: + +/* Line 1455 of yacc.c */ +#line 240 "dt_grammar.y" + { (yyval.l_node) = LINK((yyvsp[(1) - (2)].l_node), (yyvsp[(2) - (2)].l_node)); } + break; + + case 18: + +/* Line 1455 of yacc.c */ +#line 253 "dt_grammar.y" + { dt_scope_push(NULL, CTF_ERR); } + break; + + case 19: + +/* Line 1455 of yacc.c */ +#line 254 "dt_grammar.y" + { + /* + * We push a new declaration scope before shifting the + * assignment_expression in order to preserve ds_class + * and ds_ident for use in dt_node_inline(). Once the + * entire inline_definition rule is matched, pop the + * scope and construct the inline using the saved decl. + */ + dt_scope_pop(); + (yyval.l_node) = dt_node_inline((yyvsp[(6) - (7)].l_node)); + } + break; + + case 20: + +/* Line 1455 of yacc.c */ +#line 269 "dt_grammar.y" + { + (yyval.l_node) = dt_node_xlator((yyvsp[(2) - (10)].l_decl), (yyvsp[(4) - (10)].l_decl), (yyvsp[(5) - (10)].l_str), (yyvsp[(8) - (10)].l_node)); + } + break; + + case 21: + +/* Line 1455 of yacc.c */ +#line 273 "dt_grammar.y" + { + (yyval.l_node) = dt_node_xlator((yyvsp[(2) - (9)].l_decl), (yyvsp[(4) - (9)].l_decl), (yyvsp[(5) - (9)].l_str), NULL); + } + break; + + case 23: + +/* Line 1455 of yacc.c */ +#line 280 "dt_grammar.y" + { (yyval.l_node) = LINK((yyvsp[(1) - (2)].l_node),(yyvsp[(2) - (2)].l_node)); } + break; + + case 24: + +/* Line 1455 of yacc.c */ +#line 284 "dt_grammar.y" + { + (yyval.l_node) = dt_node_member(NULL, (yyvsp[(1) - (4)].l_str), (yyvsp[(3) - (4)].l_node)); + } + break; + + case 25: + +/* Line 1455 of yacc.c */ +#line 290 "dt_grammar.y" + { + (yyval.l_node) = dt_node_provider((yyvsp[(2) - (6)].l_str), (yyvsp[(4) - (6)].l_node)); + } + break; + + case 26: + +/* Line 1455 of yacc.c */ +#line 293 "dt_grammar.y" + { + (yyval.l_node) = dt_node_provider((yyvsp[(2) - (5)].l_str), NULL); + } + break; + + case 28: + +/* Line 1455 of yacc.c */ +#line 300 "dt_grammar.y" + { (yyval.l_node) = LINK((yyvsp[(1) - (2)].l_node), (yyvsp[(2) - (2)].l_node)); } + break; + + case 29: + +/* Line 1455 of yacc.c */ +#line 304 "dt_grammar.y" + { + (yyval.l_node) = dt_node_probe((yyvsp[(2) - (6)].l_str), 2, (yyvsp[(3) - (6)].l_node), (yyvsp[(5) - (6)].l_node)); + } + break; + + case 30: + +/* Line 1455 of yacc.c */ +#line 307 "dt_grammar.y" + { + (yyval.l_node) = dt_node_probe((yyvsp[(2) - (4)].l_str), 1, (yyvsp[(3) - (4)].l_node), NULL); + } + break; + + case 31: + +/* Line 1455 of yacc.c */ +#line 314 "dt_grammar.y" + { + /* + * If the input stream is a file, do not permit a probe + * specification without / <pred> / or { <act> } after + * it. This can only occur if the next token is EOF or + * an ambiguous predicate was slurped up as a comment. + * We cannot perform this check if input() is a string + * because dtrace(1M) [-fmnP] also use the compiler and + * things like dtrace -n BEGIN have to be accepted. + */ + if (yypcb->pcb_fileptr != NULL) { + dnerror((yyvsp[(1) - (1)].l_node), D_SYNTAX, "expected predicate and/" + "or actions following probe description\n"); + } + (yyval.l_node) = dt_node_clause((yyvsp[(1) - (1)].l_node), NULL, NULL); + } + break; + + case 32: + +/* Line 1455 of yacc.c */ +#line 330 "dt_grammar.y" + { + (yyval.l_node) = dt_node_clause((yyvsp[(1) - (4)].l_node), NULL, (yyvsp[(3) - (4)].l_node)); + } + break; + + case 33: + +/* Line 1455 of yacc.c */ +#line 333 "dt_grammar.y" + { + dnerror((yyvsp[(3) - (4)].l_node), D_SYNTAX, "expected actions { } following " + "probe description and predicate\n"); + } + break; + + case 34: + +/* Line 1455 of yacc.c */ +#line 338 "dt_grammar.y" + { + (yyval.l_node) = dt_node_clause((yyvsp[(1) - (7)].l_node), (yyvsp[(3) - (7)].l_node), (yyvsp[(6) - (7)].l_node)); + } + break; + + case 35: + +/* Line 1455 of yacc.c */ +#line 344 "dt_grammar.y" + { yybegin(YYS_EXPR); (yyval.l_node) = (yyvsp[(1) - (1)].l_node); } + break; + + case 37: + +/* Line 1455 of yacc.c */ +#line 349 "dt_grammar.y" + { + (yyval.l_node) = LINK((yyvsp[(1) - (3)].l_node), (yyvsp[(3) - (3)].l_node)); + } + break; + + case 38: + +/* Line 1455 of yacc.c */ +#line 355 "dt_grammar.y" + { (yyval.l_node) = dt_node_pdesc_by_name((yyvsp[(1) - (1)].l_str)); } + break; + + case 39: + +/* Line 1455 of yacc.c */ +#line 356 "dt_grammar.y" + { (yyval.l_node) = dt_node_pdesc_by_id((yyvsp[(1) - (1)].l_int)); } + break; + + case 40: + +/* Line 1455 of yacc.c */ +#line 359 "dt_grammar.y" + { (yyval.l_node) = (yyvsp[(1) - (1)].l_node); } + break; + + case 41: + +/* Line 1455 of yacc.c */ +#line 360 "dt_grammar.y" + { (yyval.l_node) = LINK((yyvsp[(1) - (3)].l_node), (yyvsp[(3) - (3)].l_node)); } + break; + + case 42: + +/* Line 1455 of yacc.c */ +#line 363 "dt_grammar.y" + { (yyval.l_node) = NULL; } + break; + + case 43: + +/* Line 1455 of yacc.c */ +#line 364 "dt_grammar.y" + { (yyval.l_node) = dt_node_statement((yyvsp[(1) - (1)].l_node)); } + break; + + case 45: + +/* Line 1455 of yacc.c */ +#line 369 "dt_grammar.y" + { + (yyval.l_node) = LINK((yyvsp[(1) - (3)].l_node), (yyvsp[(3) - (3)].l_node)); + } + break; + + case 46: + +/* Line 1455 of yacc.c */ +#line 375 "dt_grammar.y" + { (yyval.l_node) = dt_node_ident((yyvsp[(1) - (1)].l_str)); } + break; + + case 47: + +/* Line 1455 of yacc.c */ +#line 376 "dt_grammar.y" + { (yyval.l_node) = dt_node_ident((yyvsp[(1) - (1)].l_str)); } + break; + + case 48: + +/* Line 1455 of yacc.c */ +#line 377 "dt_grammar.y" + { (yyval.l_node) = dt_node_int((yyvsp[(1) - (1)].l_int)); } + break; + + case 49: + +/* Line 1455 of yacc.c */ +#line 378 "dt_grammar.y" + { (yyval.l_node) = dt_node_string((yyvsp[(1) - (1)].l_str)); } + break; + + case 50: + +/* Line 1455 of yacc.c */ +#line 379 "dt_grammar.y" + { (yyval.l_node) = dt_node_ident(DUP("self")); } + break; + + case 51: + +/* Line 1455 of yacc.c */ +#line 380 "dt_grammar.y" + { (yyval.l_node) = dt_node_ident(DUP("this")); } + break; + + case 52: + +/* Line 1455 of yacc.c */ +#line 381 "dt_grammar.y" + { (yyval.l_node) = (yyvsp[(2) - (3)].l_node); } + break; + + case 54: + +/* Line 1455 of yacc.c */ +#line 387 "dt_grammar.y" + { + (yyval.l_node) = OP2(DT_TOK_LBRAC, (yyvsp[(1) - (4)].l_node), (yyvsp[(3) - (4)].l_node)); + } + break; + + case 55: + +/* Line 1455 of yacc.c */ +#line 390 "dt_grammar.y" + { + (yyval.l_node) = dt_node_func((yyvsp[(1) - (3)].l_node), NULL); + } + break; + + case 56: + +/* Line 1455 of yacc.c */ +#line 394 "dt_grammar.y" + { + (yyval.l_node) = dt_node_func((yyvsp[(1) - (4)].l_node), (yyvsp[(3) - (4)].l_node)); + } + break; + + case 57: + +/* Line 1455 of yacc.c */ +#line 397 "dt_grammar.y" + { + (yyval.l_node) = OP2(DT_TOK_DOT, (yyvsp[(1) - (3)].l_node), dt_node_ident((yyvsp[(3) - (3)].l_str))); + } + break; + + case 58: + +/* Line 1455 of yacc.c */ +#line 400 "dt_grammar.y" + { + (yyval.l_node) = OP2(DT_TOK_DOT, (yyvsp[(1) - (3)].l_node), dt_node_ident((yyvsp[(3) - (3)].l_str))); + } + break; + + case 59: + +/* Line 1455 of yacc.c */ +#line 403 "dt_grammar.y" + { + (yyval.l_node) = OP2(DT_TOK_PTR, (yyvsp[(1) - (3)].l_node), dt_node_ident((yyvsp[(3) - (3)].l_str))); + } + break; + + case 60: + +/* Line 1455 of yacc.c */ +#line 406 "dt_grammar.y" + { + (yyval.l_node) = OP2(DT_TOK_PTR, (yyvsp[(1) - (3)].l_node), dt_node_ident((yyvsp[(3) - (3)].l_str))); + } + break; + + case 61: + +/* Line 1455 of yacc.c */ +#line 409 "dt_grammar.y" + { + (yyval.l_node) = OP1(DT_TOK_POSTINC, (yyvsp[(1) - (2)].l_node)); + } + break; + + case 62: + +/* Line 1455 of yacc.c */ +#line 412 "dt_grammar.y" + { + (yyval.l_node) = OP1(DT_TOK_POSTDEC, (yyvsp[(1) - (2)].l_node)); + } + break; + + case 63: + +/* Line 1455 of yacc.c */ +#line 416 "dt_grammar.y" + { + (yyval.l_node) = dt_node_offsetof((yyvsp[(3) - (6)].l_decl), (yyvsp[(5) - (6)].l_str)); + } + break; + + case 64: + +/* Line 1455 of yacc.c */ +#line 420 "dt_grammar.y" + { + (yyval.l_node) = dt_node_offsetof((yyvsp[(3) - (6)].l_decl), (yyvsp[(5) - (6)].l_str)); + } + break; + + case 65: + +/* Line 1455 of yacc.c */ +#line 424 "dt_grammar.y" + { + (yyval.l_node) = OP2(DT_TOK_XLATE, dt_node_type((yyvsp[(3) - (7)].l_decl)), (yyvsp[(6) - (7)].l_node)); + } + break; + + case 67: + +/* Line 1455 of yacc.c */ +#line 431 "dt_grammar.y" + { (yyval.l_node) = OP1(DT_TOK_PREINC, (yyvsp[(2) - (2)].l_node)); } + break; + + case 68: + +/* Line 1455 of yacc.c */ +#line 432 "dt_grammar.y" + { (yyval.l_node) = OP1(DT_TOK_PREDEC, (yyvsp[(2) - (2)].l_node)); } + break; + + case 69: + +/* Line 1455 of yacc.c */ +#line 433 "dt_grammar.y" + { (yyval.l_node) = OP1((yyvsp[(1) - (2)].l_tok), (yyvsp[(2) - (2)].l_node)); } + break; + + case 70: + +/* Line 1455 of yacc.c */ +#line 434 "dt_grammar.y" + { (yyval.l_node) = OP1(DT_TOK_SIZEOF, (yyvsp[(2) - (2)].l_node)); } + break; + + case 71: + +/* Line 1455 of yacc.c */ +#line 435 "dt_grammar.y" + { + (yyval.l_node) = OP1(DT_TOK_SIZEOF, dt_node_type((yyvsp[(3) - (4)].l_decl))); + } + break; + + case 72: + +/* Line 1455 of yacc.c */ +#line 438 "dt_grammar.y" + { + (yyval.l_node) = OP1(DT_TOK_STRINGOF, (yyvsp[(2) - (2)].l_node)); + } + break; + + case 73: + +/* Line 1455 of yacc.c */ +#line 443 "dt_grammar.y" + { (yyval.l_tok) = DT_TOK_ADDROF; } + break; + + case 74: + +/* Line 1455 of yacc.c */ +#line 444 "dt_grammar.y" + { (yyval.l_tok) = DT_TOK_DEREF; } + break; + + case 75: + +/* Line 1455 of yacc.c */ +#line 445 "dt_grammar.y" + { (yyval.l_tok) = DT_TOK_IPOS; } + break; + + case 76: + +/* Line 1455 of yacc.c */ +#line 446 "dt_grammar.y" + { (yyval.l_tok) = DT_TOK_INEG; } + break; + + case 77: + +/* Line 1455 of yacc.c */ +#line 447 "dt_grammar.y" + { (yyval.l_tok) = DT_TOK_BNEG; } + break; + + case 78: + +/* Line 1455 of yacc.c */ +#line 448 "dt_grammar.y" + { (yyval.l_tok) = DT_TOK_LNEG; } + break; + + case 80: + +/* Line 1455 of yacc.c */ +#line 453 "dt_grammar.y" + { + (yyval.l_node) = OP2(DT_TOK_LPAR, dt_node_type((yyvsp[(2) - (4)].l_decl)), (yyvsp[(4) - (4)].l_node)); + } + break; + + case 82: + +/* Line 1455 of yacc.c */ +#line 460 "dt_grammar.y" + { + (yyval.l_node) = OP2(DT_TOK_MUL, (yyvsp[(1) - (3)].l_node), (yyvsp[(3) - (3)].l_node)); + } + break; + + case 83: + +/* Line 1455 of yacc.c */ +#line 463 "dt_grammar.y" + { + (yyval.l_node) = OP2(DT_TOK_DIV, (yyvsp[(1) - (3)].l_node), (yyvsp[(3) - (3)].l_node)); + } + break; + + case 84: + +/* Line 1455 of yacc.c */ +#line 466 "dt_grammar.y" + { + (yyval.l_node) = OP2(DT_TOK_MOD, (yyvsp[(1) - (3)].l_node), (yyvsp[(3) - (3)].l_node)); + } + break; + + case 86: + +/* Line 1455 of yacc.c */ +#line 473 "dt_grammar.y" + { + (yyval.l_node) = OP2(DT_TOK_ADD, (yyvsp[(1) - (3)].l_node), (yyvsp[(3) - (3)].l_node)); + } + break; + + case 87: + +/* Line 1455 of yacc.c */ +#line 476 "dt_grammar.y" + { + (yyval.l_node) = OP2(DT_TOK_SUB, (yyvsp[(1) - (3)].l_node), (yyvsp[(3) - (3)].l_node)); + } + break; + + case 89: + +/* Line 1455 of yacc.c */ +#line 483 "dt_grammar.y" + { + (yyval.l_node) = OP2(DT_TOK_LSH, (yyvsp[(1) - (3)].l_node), (yyvsp[(3) - (3)].l_node)); + } + break; + + case 90: + +/* Line 1455 of yacc.c */ +#line 486 "dt_grammar.y" + { + (yyval.l_node) = OP2(DT_TOK_RSH, (yyvsp[(1) - (3)].l_node), (yyvsp[(3) - (3)].l_node)); + } + break; + + case 92: + +/* Line 1455 of yacc.c */ +#line 493 "dt_grammar.y" + { + (yyval.l_node) = OP2(DT_TOK_LT, (yyvsp[(1) - (3)].l_node), (yyvsp[(3) - (3)].l_node)); + } + break; + + case 93: + +/* Line 1455 of yacc.c */ +#line 496 "dt_grammar.y" + { + (yyval.l_node) = OP2(DT_TOK_GT, (yyvsp[(1) - (3)].l_node), (yyvsp[(3) - (3)].l_node)); + } + break; + + case 94: + +/* Line 1455 of yacc.c */ +#line 499 "dt_grammar.y" + { + (yyval.l_node) = OP2(DT_TOK_LE, (yyvsp[(1) - (3)].l_node), (yyvsp[(3) - (3)].l_node)); + } + break; + + case 95: + +/* Line 1455 of yacc.c */ +#line 502 "dt_grammar.y" + { + (yyval.l_node) = OP2(DT_TOK_GE, (yyvsp[(1) - (3)].l_node), (yyvsp[(3) - (3)].l_node)); + } + break; + + case 97: + +/* Line 1455 of yacc.c */ +#line 509 "dt_grammar.y" + { + (yyval.l_node) = OP2(DT_TOK_EQU, (yyvsp[(1) - (3)].l_node), (yyvsp[(3) - (3)].l_node)); + } + break; + + case 98: + +/* Line 1455 of yacc.c */ +#line 512 "dt_grammar.y" + { + (yyval.l_node) = OP2(DT_TOK_NEQ, (yyvsp[(1) - (3)].l_node), (yyvsp[(3) - (3)].l_node)); + } + break; + + case 100: + +/* Line 1455 of yacc.c */ +#line 519 "dt_grammar.y" + { + (yyval.l_node) = OP2(DT_TOK_BAND, (yyvsp[(1) - (3)].l_node), (yyvsp[(3) - (3)].l_node)); + } + break; + + case 102: + +/* Line 1455 of yacc.c */ +#line 526 "dt_grammar.y" + { + (yyval.l_node) = OP2(DT_TOK_XOR, (yyvsp[(1) - (3)].l_node), (yyvsp[(3) - (3)].l_node)); + } + break; + + case 104: + +/* Line 1455 of yacc.c */ +#line 533 "dt_grammar.y" + { + (yyval.l_node) = OP2(DT_TOK_BOR, (yyvsp[(1) - (3)].l_node), (yyvsp[(3) - (3)].l_node)); + } + break; + + case 106: + +/* Line 1455 of yacc.c */ +#line 540 "dt_grammar.y" + { + (yyval.l_node) = OP2(DT_TOK_LAND, (yyvsp[(1) - (3)].l_node), (yyvsp[(3) - (3)].l_node)); + } + break; + + case 108: + +/* Line 1455 of yacc.c */ +#line 547 "dt_grammar.y" + { + (yyval.l_node) = OP2(DT_TOK_LXOR, (yyvsp[(1) - (3)].l_node), (yyvsp[(3) - (3)].l_node)); + } + break; + + case 110: + +/* Line 1455 of yacc.c */ +#line 554 "dt_grammar.y" + { + (yyval.l_node) = OP2(DT_TOK_LOR, (yyvsp[(1) - (3)].l_node), (yyvsp[(3) - (3)].l_node)); + } + break; + + case 113: + +/* Line 1455 of yacc.c */ +#line 565 "dt_grammar.y" + { (yyval.l_node) = OP3((yyvsp[(1) - (5)].l_node), (yyvsp[(3) - (5)].l_node), (yyvsp[(5) - (5)].l_node)); } + break; + + case 115: + +/* Line 1455 of yacc.c */ +#line 570 "dt_grammar.y" + { + (yyval.l_node) = OP2((yyvsp[(2) - (3)].l_tok), (yyvsp[(1) - (3)].l_node), (yyvsp[(3) - (3)].l_node)); + } + break; + + case 116: + +/* Line 1455 of yacc.c */ +#line 576 "dt_grammar.y" + { (yyval.l_tok) = DT_TOK_ASGN; } + break; + + case 117: + +/* Line 1455 of yacc.c */ +#line 577 "dt_grammar.y" + { (yyval.l_tok) = DT_TOK_MUL_EQ; } + break; + + case 118: + +/* Line 1455 of yacc.c */ +#line 578 "dt_grammar.y" + { (yyval.l_tok) = DT_TOK_DIV_EQ; } + break; + + case 119: + +/* Line 1455 of yacc.c */ +#line 579 "dt_grammar.y" + { (yyval.l_tok) = DT_TOK_MOD_EQ; } + break; + + case 120: + +/* Line 1455 of yacc.c */ +#line 580 "dt_grammar.y" + { (yyval.l_tok) = DT_TOK_ADD_EQ; } + break; + + case 121: + +/* Line 1455 of yacc.c */ +#line 581 "dt_grammar.y" + { (yyval.l_tok) = DT_TOK_SUB_EQ; } + break; + + case 122: + +/* Line 1455 of yacc.c */ +#line 582 "dt_grammar.y" + { (yyval.l_tok) = DT_TOK_LSH_EQ; } + break; + + case 123: + +/* Line 1455 of yacc.c */ +#line 583 "dt_grammar.y" + { (yyval.l_tok) = DT_TOK_RSH_EQ; } + break; + + case 124: + +/* Line 1455 of yacc.c */ +#line 584 "dt_grammar.y" + { (yyval.l_tok) = DT_TOK_AND_EQ; } + break; + + case 125: + +/* Line 1455 of yacc.c */ +#line 585 "dt_grammar.y" + { (yyval.l_tok) = DT_TOK_XOR_EQ; } + break; + + case 126: + +/* Line 1455 of yacc.c */ +#line 586 "dt_grammar.y" + { (yyval.l_tok) = DT_TOK_OR_EQ; } + break; + + case 128: + +/* Line 1455 of yacc.c */ +#line 590 "dt_grammar.y" + { + (yyval.l_node) = OP2(DT_TOK_COMMA, (yyvsp[(1) - (3)].l_node), (yyvsp[(3) - (3)].l_node)); + } + break; + + case 129: + +/* Line 1455 of yacc.c */ +#line 595 "dt_grammar.y" + { + (yyval.l_node) = dt_node_decl(); + dt_decl_free(dt_decl_pop()); + yybegin(YYS_CLAUSE); + } + break; + + case 130: + +/* Line 1455 of yacc.c */ +#line 600 "dt_grammar.y" + { + (yyval.l_node) = (yyvsp[(2) - (3)].l_node); + dt_decl_free(dt_decl_pop()); + yybegin(YYS_CLAUSE); + } + break; + + case 143: + +/* Line 1455 of yacc.c */ +#line 626 "dt_grammar.y" + { dt_decl_class(DT_DC_AUTO); } + break; + + case 144: + +/* Line 1455 of yacc.c */ +#line 627 "dt_grammar.y" + { dt_decl_class(DT_DC_REGISTER); } + break; + + case 145: + +/* Line 1455 of yacc.c */ +#line 628 "dt_grammar.y" + { dt_decl_class(DT_DC_STATIC); } + break; + + case 146: + +/* Line 1455 of yacc.c */ +#line 629 "dt_grammar.y" + { dt_decl_class(DT_DC_EXTERN); } + break; + + case 147: + +/* Line 1455 of yacc.c */ +#line 630 "dt_grammar.y" + { dt_decl_class(DT_DC_TYPEDEF); } + break; + + case 149: + +/* Line 1455 of yacc.c */ +#line 635 "dt_grammar.y" + { dt_decl_class(DT_DC_SELF); } + break; + + case 150: + +/* Line 1455 of yacc.c */ +#line 636 "dt_grammar.y" + { dt_decl_class(DT_DC_THIS); } + break; + + case 151: + +/* Line 1455 of yacc.c */ +#line 639 "dt_grammar.y" + { (yyval.l_decl) = dt_decl_spec(CTF_K_INTEGER, DUP("void")); } + break; + + case 152: + +/* Line 1455 of yacc.c */ +#line 640 "dt_grammar.y" + { (yyval.l_decl) = dt_decl_spec(CTF_K_INTEGER, DUP("char")); } + break; + + case 153: + +/* Line 1455 of yacc.c */ +#line 641 "dt_grammar.y" + { (yyval.l_decl) = dt_decl_attr(DT_DA_SHORT); } + break; + + case 154: + +/* Line 1455 of yacc.c */ +#line 642 "dt_grammar.y" + { (yyval.l_decl) = dt_decl_spec(CTF_K_INTEGER, DUP("int")); } + break; + + case 155: + +/* Line 1455 of yacc.c */ +#line 643 "dt_grammar.y" + { (yyval.l_decl) = dt_decl_attr(DT_DA_LONG); } + break; + + case 156: + +/* Line 1455 of yacc.c */ +#line 644 "dt_grammar.y" + { (yyval.l_decl) = dt_decl_spec(CTF_K_FLOAT, DUP("float")); } + break; + + case 157: + +/* Line 1455 of yacc.c */ +#line 645 "dt_grammar.y" + { (yyval.l_decl) = dt_decl_spec(CTF_K_FLOAT, DUP("double")); } + break; + + case 158: + +/* Line 1455 of yacc.c */ +#line 646 "dt_grammar.y" + { (yyval.l_decl) = dt_decl_attr(DT_DA_SIGNED); } + break; + + case 159: + +/* Line 1455 of yacc.c */ +#line 647 "dt_grammar.y" + { (yyval.l_decl) = dt_decl_attr(DT_DA_UNSIGNED); } + break; + + case 160: + +/* Line 1455 of yacc.c */ +#line 648 "dt_grammar.y" + { + (yyval.l_decl) = dt_decl_spec(CTF_K_TYPEDEF, DUP("string")); + } + break; + + case 161: + +/* Line 1455 of yacc.c */ +#line 651 "dt_grammar.y" + { (yyval.l_decl) = dt_decl_spec(CTF_K_TYPEDEF, (yyvsp[(1) - (1)].l_str)); } + break; + + case 164: + +/* Line 1455 of yacc.c */ +#line 656 "dt_grammar.y" + { (yyval.l_decl) = dt_decl_attr(DT_DA_CONST); } + break; + + case 165: + +/* Line 1455 of yacc.c */ +#line 657 "dt_grammar.y" + { (yyval.l_decl) = dt_decl_attr(DT_DA_RESTRICT); } + break; + + case 166: + +/* Line 1455 of yacc.c */ +#line 658 "dt_grammar.y" + { (yyval.l_decl) = dt_decl_attr(DT_DA_VOLATILE); } + break; + + case 167: + +/* Line 1455 of yacc.c */ +#line 662 "dt_grammar.y" + { + (yyval.l_decl) = dt_scope_pop(); + } + break; + + case 168: + +/* Line 1455 of yacc.c */ +#line 665 "dt_grammar.y" + { (yyval.l_decl) = dt_decl_spec((yyvsp[(1) - (2)].l_tok), (yyvsp[(2) - (2)].l_str)); } + break; + + case 169: + +/* Line 1455 of yacc.c */ +#line 666 "dt_grammar.y" + { (yyval.l_decl) = dt_decl_spec((yyvsp[(1) - (2)].l_tok), (yyvsp[(2) - (2)].l_str)); } + break; + + case 170: + +/* Line 1455 of yacc.c */ +#line 670 "dt_grammar.y" + { dt_decl_sou((yyvsp[(1) - (2)].l_tok), NULL); } + break; + + case 171: + +/* Line 1455 of yacc.c */ +#line 671 "dt_grammar.y" + { dt_decl_sou((yyvsp[(1) - (3)].l_tok), (yyvsp[(2) - (3)].l_str)); } + break; + + case 172: + +/* Line 1455 of yacc.c */ +#line 672 "dt_grammar.y" + { dt_decl_sou((yyvsp[(1) - (3)].l_tok), (yyvsp[(2) - (3)].l_str)); } + break; + + case 173: + +/* Line 1455 of yacc.c */ +#line 676 "dt_grammar.y" + { (yyval.l_tok) = CTF_K_STRUCT; } + break; + + case 174: + +/* Line 1455 of yacc.c */ +#line 677 "dt_grammar.y" + { (yyval.l_tok) = CTF_K_UNION; } + break; + + case 178: + +/* Line 1455 of yacc.c */ +#line 687 "dt_grammar.y" + { + (yyval.l_node) = LINK((yyvsp[(1) - (3)].l_node), (yyvsp[(3) - (3)].l_node)); + } + break; + + case 179: + +/* Line 1455 of yacc.c */ +#line 693 "dt_grammar.y" + { + (yyval.l_node) = dt_node_decl(); + dt_decl_reset(); + } + break; + + case 180: + +/* Line 1455 of yacc.c */ +#line 700 "dt_grammar.y" + { + dt_decl_free(dt_decl_pop()); + } + break; + + case 182: + +/* Line 1455 of yacc.c */ +#line 707 "dt_grammar.y" + { (yyval.l_decl) = (yyvsp[(2) - (2)].l_decl); } + break; + + case 184: + +/* Line 1455 of yacc.c */ +#line 709 "dt_grammar.y" + { (yyval.l_decl) = (yyvsp[(2) - (2)].l_decl); } + break; + + case 187: + +/* Line 1455 of yacc.c */ +#line 718 "dt_grammar.y" + { dt_decl_member(NULL); } + break; + + case 188: + +/* Line 1455 of yacc.c */ +#line 719 "dt_grammar.y" + { dt_decl_member((yyvsp[(2) - (2)].l_node)); } + break; + + case 189: + +/* Line 1455 of yacc.c */ +#line 720 "dt_grammar.y" + { + dt_decl_member((yyvsp[(3) - (3)].l_node)); + } + break; + + case 190: + +/* Line 1455 of yacc.c */ +#line 726 "dt_grammar.y" + { (yyval.l_decl) = dt_scope_pop(); } + break; + + case 191: + +/* Line 1455 of yacc.c */ +#line 727 "dt_grammar.y" + { (yyval.l_decl) = dt_decl_spec(CTF_K_ENUM, (yyvsp[(2) - (2)].l_str)); } + break; + + case 192: + +/* Line 1455 of yacc.c */ +#line 728 "dt_grammar.y" + { (yyval.l_decl) = dt_decl_spec(CTF_K_ENUM, (yyvsp[(2) - (2)].l_str)); } + break; + + case 193: + +/* Line 1455 of yacc.c */ +#line 732 "dt_grammar.y" + { dt_decl_enum(NULL); } + break; + + case 194: + +/* Line 1455 of yacc.c */ +#line 733 "dt_grammar.y" + { dt_decl_enum((yyvsp[(2) - (3)].l_str)); } + break; + + case 195: + +/* Line 1455 of yacc.c */ +#line 734 "dt_grammar.y" + { dt_decl_enum((yyvsp[(2) - (3)].l_str)); } + break; + + case 198: + +/* Line 1455 of yacc.c */ +#line 742 "dt_grammar.y" + { dt_decl_enumerator((yyvsp[(1) - (1)].l_str), NULL); } + break; + + case 199: + +/* Line 1455 of yacc.c */ +#line 743 "dt_grammar.y" + { + dt_decl_enumerator((yyvsp[(1) - (3)].l_str), (yyvsp[(3) - (3)].l_node)); + } + break; + + case 202: + +/* Line 1455 of yacc.c */ +#line 753 "dt_grammar.y" + { (yyval.l_decl) = dt_decl_ident((yyvsp[(1) - (1)].l_str)); } + break; + + case 203: + +/* Line 1455 of yacc.c */ +#line 754 "dt_grammar.y" + { (yyval.l_decl) = (yyvsp[(2) - (3)].l_decl); } + break; + + case 204: + +/* Line 1455 of yacc.c */ +#line 755 "dt_grammar.y" + { dt_decl_array((yyvsp[(2) - (2)].l_node)); } + break; + + case 205: + +/* Line 1455 of yacc.c */ +#line 756 "dt_grammar.y" + { dt_decl_func((yyvsp[(1) - (2)].l_decl), (yyvsp[(2) - (2)].l_node)); } + break; + + case 206: + +/* Line 1455 of yacc.c */ +#line 759 "dt_grammar.y" + { dt_decl_top()->dd_attr |= DT_DA_PAREN; } + break; + + case 207: + +/* Line 1455 of yacc.c */ +#line 762 "dt_grammar.y" + { (yyval.l_decl) = dt_decl_ptr(); } + break; + + case 208: + +/* Line 1455 of yacc.c */ +#line 763 "dt_grammar.y" + { (yyval.l_decl) = dt_decl_ptr(); } + break; + + case 209: + +/* Line 1455 of yacc.c */ +#line 764 "dt_grammar.y" + { (yyval.l_decl) = dt_decl_ptr(); } + break; + + case 210: + +/* Line 1455 of yacc.c */ +#line 765 "dt_grammar.y" + { (yyval.l_decl) = dt_decl_ptr(); } + break; + + case 212: + +/* Line 1455 of yacc.c */ +#line 770 "dt_grammar.y" + { (yyval.l_decl) = (yyvsp[(2) - (2)].l_decl); } + break; + + case 214: + +/* Line 1455 of yacc.c */ +#line 775 "dt_grammar.y" + { (yyval.l_node) = dt_node_vatype(); } + break; + + case 215: + +/* Line 1455 of yacc.c */ +#line 776 "dt_grammar.y" + { + (yyval.l_node) = LINK((yyvsp[(1) - (3)].l_node), dt_node_vatype()); + } + break; + + case 217: + +/* Line 1455 of yacc.c */ +#line 782 "dt_grammar.y" + { + (yyval.l_node) = LINK((yyvsp[(1) - (3)].l_node), (yyvsp[(3) - (3)].l_node)); + } + break; + + case 218: + +/* Line 1455 of yacc.c */ +#line 788 "dt_grammar.y" + { + (yyval.l_node) = dt_node_type(NULL); + } + break; + + case 219: + +/* Line 1455 of yacc.c */ +#line 791 "dt_grammar.y" + { + (yyval.l_node) = dt_node_type(NULL); + } + break; + + case 220: + +/* Line 1455 of yacc.c */ +#line 794 "dt_grammar.y" + { + (yyval.l_node) = dt_node_type(NULL); + } + break; + + case 221: + +/* Line 1455 of yacc.c */ +#line 799 "dt_grammar.y" + { + (yyval.l_decl) = dt_decl_pop(); + } + break; + + case 222: + +/* Line 1455 of yacc.c */ +#line 802 "dt_grammar.y" + { + (yyval.l_decl) = dt_decl_pop(); + } + break; + + case 226: + +/* Line 1455 of yacc.c */ +#line 814 "dt_grammar.y" + { (yyval.l_decl) = (yyvsp[(2) - (3)].l_decl); } + break; + + case 227: + +/* Line 1455 of yacc.c */ +#line 815 "dt_grammar.y" + { dt_decl_array((yyvsp[(2) - (2)].l_node)); } + break; + + case 228: + +/* Line 1455 of yacc.c */ +#line 816 "dt_grammar.y" + { dt_decl_array((yyvsp[(1) - (1)].l_node)); (yyval.l_decl) = NULL; } + break; + + case 229: + +/* Line 1455 of yacc.c */ +#line 817 "dt_grammar.y" + { dt_decl_func((yyvsp[(1) - (2)].l_decl), (yyvsp[(2) - (2)].l_node)); } + break; + + case 230: + +/* Line 1455 of yacc.c */ +#line 818 "dt_grammar.y" + { dt_decl_func(NULL, (yyvsp[(1) - (1)].l_node)); } + break; + + case 231: + +/* Line 1455 of yacc.c */ +#line 821 "dt_grammar.y" + { dt_scope_push(NULL, CTF_ERR); } + break; + + case 232: + +/* Line 1455 of yacc.c */ +#line 822 "dt_grammar.y" + { + dt_scope_pop(); + (yyval.l_node) = (yyvsp[(3) - (4)].l_node); + } + break; + + case 233: + +/* Line 1455 of yacc.c */ +#line 829 "dt_grammar.y" + { (yyval.l_node) = NULL; } + break; + + case 234: + +/* Line 1455 of yacc.c */ +#line 830 "dt_grammar.y" + { (yyval.l_node) = (yyvsp[(1) - (1)].l_node); } + break; + + case 235: + +/* Line 1455 of yacc.c */ +#line 831 "dt_grammar.y" + { (yyval.l_node) = (yyvsp[(1) - (1)].l_node); } + break; + + case 236: + +/* Line 1455 of yacc.c */ +#line 834 "dt_grammar.y" + { dt_scope_push(NULL, CTF_ERR); } + break; + + case 237: + +/* Line 1455 of yacc.c */ +#line 835 "dt_grammar.y" + { + dt_scope_pop(); + (yyval.l_node) = (yyvsp[(3) - (4)].l_node); + } + break; + + case 238: + +/* Line 1455 of yacc.c */ +#line 842 "dt_grammar.y" + { (yyval.l_node) = NULL; } + break; + + case 239: + +/* Line 1455 of yacc.c */ +#line 843 "dt_grammar.y" + { (yyval.l_node) = (yyvsp[(1) - (1)].l_node); } + break; + + + +/* Line 1455 of yacc.c */ +#line 3516 "dt_grammar.c" + default: break; + } + YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); + + YYPOPSTACK (yylen); + yylen = 0; + YY_STACK_PRINT (yyss, yyssp); + + *++yyvsp = yyval; + + /* Now `shift' the result of the reduction. Determine what state + that goes to, based on the state we popped back to and the rule + number reduced by. */ + + yyn = yyr1[yyn]; + + yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; + if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) + yystate = yytable[yystate]; + else + yystate = yydefgoto[yyn - YYNTOKENS]; + + goto yynewstate; + + +/*------------------------------------. +| yyerrlab -- here on detecting error | +`------------------------------------*/ +yyerrlab: + /* If not already recovering from an error, report this error. */ + if (!yyerrstatus) + { + ++yynerrs; +#if ! YYERROR_VERBOSE + yyerror (YY_("syntax error")); +#else + { + YYSIZE_T yysize = yysyntax_error (0, yystate, yychar); + if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM) + { + YYSIZE_T yyalloc = 2 * yysize; + if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM)) + yyalloc = YYSTACK_ALLOC_MAXIMUM; + if (yymsg != yymsgbuf) + YYSTACK_FREE (yymsg); + yymsg = (char *) YYSTACK_ALLOC (yyalloc); + if (yymsg) + yymsg_alloc = yyalloc; + else + { + yymsg = yymsgbuf; + yymsg_alloc = sizeof yymsgbuf; + } + } + + if (0 < yysize && yysize <= yymsg_alloc) + { + (void) yysyntax_error (yymsg, yystate, yychar); + yyerror (yymsg); + } + else + { + yyerror (YY_("syntax error")); + if (yysize != 0) + goto yyexhaustedlab; + } + } +#endif + } + + + + if (yyerrstatus == 3) + { + /* If just tried and failed to reuse lookahead token after an + error, discard it. */ + + if (yychar <= YYEOF) + { + /* Return failure if at end of input. */ + if (yychar == YYEOF) + YYABORT; + } + else + { + yydestruct ("Error: discarding", + yytoken, &yylval); + yychar = YYEMPTY; + } + } + + /* Else will try to reuse lookahead token after shifting the error + token. */ + goto yyerrlab1; + + +/*---------------------------------------------------. +| yyerrorlab -- error raised explicitly by YYERROR. | +`---------------------------------------------------*/ +yyerrorlab: + + /* Pacify compilers like GCC when the user code never invokes + YYERROR and the label yyerrorlab therefore never appears in user + code. */ + if (/*CONSTCOND*/ 0) + goto yyerrorlab; + + /* Do not reclaim the symbols of the rule which action triggered + this YYERROR. */ + YYPOPSTACK (yylen); + yylen = 0; + YY_STACK_PRINT (yyss, yyssp); + yystate = *yyssp; + goto yyerrlab1; + + +/*-------------------------------------------------------------. +| yyerrlab1 -- common code for both syntax error and YYERROR. | +`-------------------------------------------------------------*/ +yyerrlab1: + yyerrstatus = 3; /* Each real token shifted decrements this. */ + + for (;;) + { + yyn = yypact[yystate]; + if (yyn != YYPACT_NINF) + { + yyn += YYTERROR; + if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) + { + yyn = yytable[yyn]; + if (0 < yyn) + break; + } + } + + /* Pop the current state because it cannot handle the error token. */ + if (yyssp == yyss) + YYABORT; + + + yydestruct ("Error: popping", + yystos[yystate], yyvsp); + YYPOPSTACK (1); + yystate = *yyssp; + YY_STACK_PRINT (yyss, yyssp); + } + + *++yyvsp = yylval; + + + /* Shift the error token. */ + YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); + + yystate = yyn; + goto yynewstate; + + +/*-------------------------------------. +| yyacceptlab -- YYACCEPT comes here. | +`-------------------------------------*/ +yyacceptlab: + yyresult = 0; + goto yyreturn; + +/*-----------------------------------. +| yyabortlab -- YYABORT comes here. | +`-----------------------------------*/ +yyabortlab: + yyresult = 1; + goto yyreturn; + +#if !defined(yyoverflow) || YYERROR_VERBOSE +/*-------------------------------------------------. +| yyexhaustedlab -- memory exhaustion comes here. | +`-------------------------------------------------*/ +yyexhaustedlab: + yyerror (YY_("memory exhausted")); + yyresult = 2; + /* Fall through. */ +#endif + +yyreturn: + if (yychar != YYEMPTY) + yydestruct ("Cleanup: discarding lookahead", + yytoken, &yylval); + /* Do not reclaim the symbols of the rule which action triggered + this YYABORT or YYACCEPT. */ + YYPOPSTACK (yylen); + YY_STACK_PRINT (yyss, yyssp); + while (yyssp != yyss) + { + yydestruct ("Cleanup: popping", + yystos[*yyssp], yyvsp); + YYPOPSTACK (1); + } +#ifndef yyoverflow + if (yyss != yyssa) + YYSTACK_FREE (yyss); +#endif +#if YYERROR_VERBOSE + if (yymsg != yymsgbuf) + YYSTACK_FREE (yymsg); +#endif + /* Make sure YYID is used. */ + return YYID (yyresult); +} + + + +/* Line 1675 of yacc.c */ +#line 846 "dt_grammar.y" + + diff --git a/src/VBox/ExtPacks/VBoxDTrace/generated/dt_grammar.h b/src/VBox/ExtPacks/VBoxDTrace/generated/dt_grammar.h new file mode 100644 index 00000000..cf624531 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/generated/dt_grammar.h @@ -0,0 +1,290 @@ + +/* A Bison parser, made by GNU Bison 2.4.1. */ + +/* Skeleton interface for Bison's Yacc-like parsers in C + + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 + Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. */ + +/* As a special exception, you may create a larger work that contains + part or all of the Bison parser skeleton and distribute that work + under terms of your choice, so long as that work isn't itself a + parser generator using the skeleton or a modified version thereof + as a parser skeleton. Alternatively, if you modify or redistribute + the parser skeleton itself, you may (at your option) remove this + special exception, which will cause the skeleton and the resulting + Bison output files to be licensed under the GNU General Public + License without this special exception. + + This special exception was added by the Free Software Foundation in + version 2.2 of Bison. */ + + +/* Tokens. */ +#ifndef YYTOKENTYPE +# define YYTOKENTYPE + /* Put the tokens into the symbol table, so that GDB and other debuggers + know about them. */ + enum yytokentype { + DT_TOK_EOF = 0, + DT_TOK_COMMA = 258, + DT_TOK_ELLIPSIS = 259, + DT_TOK_ASGN = 260, + DT_TOK_ADD_EQ = 261, + DT_TOK_SUB_EQ = 262, + DT_TOK_MUL_EQ = 263, + DT_TOK_DIV_EQ = 264, + DT_TOK_MOD_EQ = 265, + DT_TOK_AND_EQ = 266, + DT_TOK_XOR_EQ = 267, + DT_TOK_OR_EQ = 268, + DT_TOK_LSH_EQ = 269, + DT_TOK_RSH_EQ = 270, + DT_TOK_QUESTION = 271, + DT_TOK_COLON = 272, + DT_TOK_LOR = 273, + DT_TOK_LXOR = 274, + DT_TOK_LAND = 275, + DT_TOK_BOR = 276, + DT_TOK_XOR = 277, + DT_TOK_BAND = 278, + DT_TOK_EQU = 279, + DT_TOK_NEQ = 280, + DT_TOK_LT = 281, + DT_TOK_LE = 282, + DT_TOK_GT = 283, + DT_TOK_GE = 284, + DT_TOK_LSH = 285, + DT_TOK_RSH = 286, + DT_TOK_ADD = 287, + DT_TOK_SUB = 288, + DT_TOK_MUL = 289, + DT_TOK_DIV = 290, + DT_TOK_MOD = 291, + DT_TOK_LNEG = 292, + DT_TOK_BNEG = 293, + DT_TOK_ADDADD = 294, + DT_TOK_SUBSUB = 295, + DT_TOK_PREINC = 296, + DT_TOK_POSTINC = 297, + DT_TOK_PREDEC = 298, + DT_TOK_POSTDEC = 299, + DT_TOK_IPOS = 300, + DT_TOK_INEG = 301, + DT_TOK_DEREF = 302, + DT_TOK_ADDROF = 303, + DT_TOK_OFFSETOF = 304, + DT_TOK_SIZEOF = 305, + DT_TOK_STRINGOF = 306, + DT_TOK_XLATE = 307, + DT_TOK_LPAR = 308, + DT_TOK_RPAR = 309, + DT_TOK_LBRAC = 310, + DT_TOK_RBRAC = 311, + DT_TOK_PTR = 312, + DT_TOK_DOT = 313, + DT_TOK_STRING = 314, + DT_TOK_IDENT = 315, + DT_TOK_PSPEC = 316, + DT_TOK_AGG = 317, + DT_TOK_TNAME = 318, + DT_TOK_INT = 319, + DT_KEY_AUTO = 320, + DT_KEY_BREAK = 321, + DT_KEY_CASE = 322, + DT_KEY_CHAR = 323, + DT_KEY_CONST = 324, + DT_KEY_CONTINUE = 325, + DT_KEY_COUNTER = 326, + DT_KEY_DEFAULT = 327, + DT_KEY_DO = 328, + DT_KEY_DOUBLE = 329, + DT_KEY_ELSE = 330, + DT_KEY_ENUM = 331, + DT_KEY_EXTERN = 332, + DT_KEY_FLOAT = 333, + DT_KEY_FOR = 334, + DT_KEY_GOTO = 335, + DT_KEY_IF = 336, + DT_KEY_IMPORT = 337, + DT_KEY_INLINE = 338, + DT_KEY_INT = 339, + DT_KEY_LONG = 340, + DT_KEY_PROBE = 341, + DT_KEY_PROVIDER = 342, + DT_KEY_REGISTER = 343, + DT_KEY_RESTRICT = 344, + DT_KEY_RETURN = 345, + DT_KEY_SELF = 346, + DT_KEY_SHORT = 347, + DT_KEY_SIGNED = 348, + DT_KEY_STATIC = 349, + DT_KEY_STRING = 350, + DT_KEY_STRUCT = 351, + DT_KEY_SWITCH = 352, + DT_KEY_THIS = 353, + DT_KEY_TYPEDEF = 354, + DT_KEY_UNION = 355, + DT_KEY_UNSIGNED = 356, + DT_KEY_VOID = 357, + DT_KEY_VOLATILE = 358, + DT_KEY_WHILE = 359, + DT_KEY_XLATOR = 360, + DT_TOK_EPRED = 361, + DT_CTX_DEXPR = 362, + DT_CTX_DPROG = 363, + DT_CTX_DTYPE = 364 + }; +#endif +/* Tokens. */ +#define DT_TOK_EOF 0 +#define DT_TOK_COMMA 258 +#define DT_TOK_ELLIPSIS 259 +#define DT_TOK_ASGN 260 +#define DT_TOK_ADD_EQ 261 +#define DT_TOK_SUB_EQ 262 +#define DT_TOK_MUL_EQ 263 +#define DT_TOK_DIV_EQ 264 +#define DT_TOK_MOD_EQ 265 +#define DT_TOK_AND_EQ 266 +#define DT_TOK_XOR_EQ 267 +#define DT_TOK_OR_EQ 268 +#define DT_TOK_LSH_EQ 269 +#define DT_TOK_RSH_EQ 270 +#define DT_TOK_QUESTION 271 +#define DT_TOK_COLON 272 +#define DT_TOK_LOR 273 +#define DT_TOK_LXOR 274 +#define DT_TOK_LAND 275 +#define DT_TOK_BOR 276 +#define DT_TOK_XOR 277 +#define DT_TOK_BAND 278 +#define DT_TOK_EQU 279 +#define DT_TOK_NEQ 280 +#define DT_TOK_LT 281 +#define DT_TOK_LE 282 +#define DT_TOK_GT 283 +#define DT_TOK_GE 284 +#define DT_TOK_LSH 285 +#define DT_TOK_RSH 286 +#define DT_TOK_ADD 287 +#define DT_TOK_SUB 288 +#define DT_TOK_MUL 289 +#define DT_TOK_DIV 290 +#define DT_TOK_MOD 291 +#define DT_TOK_LNEG 292 +#define DT_TOK_BNEG 293 +#define DT_TOK_ADDADD 294 +#define DT_TOK_SUBSUB 295 +#define DT_TOK_PREINC 296 +#define DT_TOK_POSTINC 297 +#define DT_TOK_PREDEC 298 +#define DT_TOK_POSTDEC 299 +#define DT_TOK_IPOS 300 +#define DT_TOK_INEG 301 +#define DT_TOK_DEREF 302 +#define DT_TOK_ADDROF 303 +#define DT_TOK_OFFSETOF 304 +#define DT_TOK_SIZEOF 305 +#define DT_TOK_STRINGOF 306 +#define DT_TOK_XLATE 307 +#define DT_TOK_LPAR 308 +#define DT_TOK_RPAR 309 +#define DT_TOK_LBRAC 310 +#define DT_TOK_RBRAC 311 +#define DT_TOK_PTR 312 +#define DT_TOK_DOT 313 +#define DT_TOK_STRING 314 +#define DT_TOK_IDENT 315 +#define DT_TOK_PSPEC 316 +#define DT_TOK_AGG 317 +#define DT_TOK_TNAME 318 +#define DT_TOK_INT 319 +#define DT_KEY_AUTO 320 +#define DT_KEY_BREAK 321 +#define DT_KEY_CASE 322 +#define DT_KEY_CHAR 323 +#define DT_KEY_CONST 324 +#define DT_KEY_CONTINUE 325 +#define DT_KEY_COUNTER 326 +#define DT_KEY_DEFAULT 327 +#define DT_KEY_DO 328 +#define DT_KEY_DOUBLE 329 +#define DT_KEY_ELSE 330 +#define DT_KEY_ENUM 331 +#define DT_KEY_EXTERN 332 +#define DT_KEY_FLOAT 333 +#define DT_KEY_FOR 334 +#define DT_KEY_GOTO 335 +#define DT_KEY_IF 336 +#define DT_KEY_IMPORT 337 +#define DT_KEY_INLINE 338 +#define DT_KEY_INT 339 +#define DT_KEY_LONG 340 +#define DT_KEY_PROBE 341 +#define DT_KEY_PROVIDER 342 +#define DT_KEY_REGISTER 343 +#define DT_KEY_RESTRICT 344 +#define DT_KEY_RETURN 345 +#define DT_KEY_SELF 346 +#define DT_KEY_SHORT 347 +#define DT_KEY_SIGNED 348 +#define DT_KEY_STATIC 349 +#define DT_KEY_STRING 350 +#define DT_KEY_STRUCT 351 +#define DT_KEY_SWITCH 352 +#define DT_KEY_THIS 353 +#define DT_KEY_TYPEDEF 354 +#define DT_KEY_UNION 355 +#define DT_KEY_UNSIGNED 356 +#define DT_KEY_VOID 357 +#define DT_KEY_VOLATILE 358 +#define DT_KEY_WHILE 359 +#define DT_KEY_XLATOR 360 +#define DT_TOK_EPRED 361 +#define DT_CTX_DEXPR 362 +#define DT_CTX_DPROG 363 +#define DT_CTX_DTYPE 364 + + + + +#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED +typedef union YYSTYPE +{ + +/* Line 1676 of yacc.c */ +#line 51 "dt_grammar.y" + + dt_node_t *l_node; + dt_decl_t *l_decl; + char *l_str; + uintmax_t l_int; + int l_tok; + + + +/* Line 1676 of yacc.c */ +#line 282 "dt_grammar.h" +} YYSTYPE; +# define YYSTYPE_IS_TRIVIAL 1 +# define yystype YYSTYPE /* obsolescent; will be withdrawn */ +# define YYSTYPE_IS_DECLARED 1 +#endif + +extern YYSTYPE yylval; + + diff --git a/src/VBox/ExtPacks/VBoxDTrace/generated/dt_lex.c b/src/VBox/ExtPacks/VBoxDTrace/generated/dt_lex.c new file mode 100644 index 00000000..c1503bd8 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/generated/dt_lex.c @@ -0,0 +1,3514 @@ +#line 2 "dt_lex.c" +/* A lexical scanner generated by flex */ + +/* Scanner skeleton version: + * $Header: /home/daffy/u0/vern/flex/RCS/flex.skl,v 2.91 96/09/10 16:58:48 vern Exp $ + */ + +#define FLEX_SCANNER +#define YY_FLEX_MAJOR_VERSION 2 +#define YY_FLEX_MINOR_VERSION 5 + +#include <stdio.h> + + +/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */ +#ifdef c_plusplus +#ifndef __cplusplus +#define __cplusplus +#endif +#endif + + +#ifdef __cplusplus + +#include <stdlib.h> +#include <unistd.h> + +/* Use prototypes in function declarations. */ +#define YY_USE_PROTOS + +/* The "const" storage-class-modifier is valid. */ +#define YY_USE_CONST + +#else /* ! __cplusplus */ + +#if __STDC__ + +#define YY_USE_PROTOS +#define YY_USE_CONST + +#endif /* __STDC__ */ +#endif /* ! __cplusplus */ + +#ifdef __TURBOC__ + #pragma warn -rch + #pragma warn -use +#include <io.h> +#include <stdlib.h> +#define YY_USE_CONST +#define YY_USE_PROTOS +#endif + +#ifdef YY_USE_CONST +#define yyconst const +#else +#define yyconst +#endif + + +#ifdef YY_USE_PROTOS +#define YY_PROTO(proto) proto +#else +#define YY_PROTO(proto) () +#endif + +/* Returned upon end-of-file. */ +#define YY_NULL 0 + +/* Promotes a possibly negative, possibly signed char to an unsigned + * integer for use as an array index. If the signed char is negative, + * we want to instead treat it as an 8-bit unsigned char, hence the + * double cast. + */ +#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) + +/* Enter a start condition. This macro really ought to take a parameter, + * but we do it the disgusting crufty way forced on us by the ()-less + * definition of BEGIN. + */ +#define BEGIN yy_start = 1 + 2 * + +/* Translate the current start state into a value that can be later handed + * to BEGIN to return to the state. The YYSTATE alias is for lex + * compatibility. + */ +#define YY_START ((yy_start - 1) / 2) +#define YYSTATE YY_START + +/* Action number for EOF rule of a given start state. */ +#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) + +/* Special action meaning "start processing a new file". */ +#define YY_NEW_FILE yyrestart( yyin ) + +#define YY_END_OF_BUFFER_CHAR 0 + +/* Size of default input buffer. */ +#define YY_BUF_SIZE 16384 + +typedef struct yy_buffer_state *YY_BUFFER_STATE; + +extern int yyleng; +extern FILE *yyin, *yyout; + +#define EOB_ACT_CONTINUE_SCAN 0 +#define EOB_ACT_END_OF_FILE 1 +#define EOB_ACT_LAST_MATCH 2 + +/* The funky do-while in the following #define is used to turn the definition + * int a single C statement (which needs a semi-colon terminator). This + * avoids problems with code like: + * + * if ( condition_holds ) + * yyless( 5 ); + * else + * do_something_else(); + * + * Prior to using the do-while the compiler would get upset at the + * "else" because it interpreted the "if" statement as being all + * done when it reached the ';' after the yyless() call. + */ + +/* Return all but the first 'n' matched characters back to the input stream. */ + +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up yytext. */ \ + *yy_cp = yy_hold_char; \ + YY_RESTORE_YY_MORE_OFFSET \ + yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \ + YY_DO_BEFORE_ACTION; /* set up yytext again */ \ + } \ + while ( 0 ) + +#define unput(c) yyunput( c, yytext_ptr ) + +/* The following is because we cannot portably get our hands on size_t + * (without autoconf's help, which isn't available because we want + * flex-generated scanners to compile on their own). + */ +typedef unsigned int yy_size_t; + + +struct yy_buffer_state + { + FILE *yy_input_file; + + char *yy_ch_buf; /* input buffer */ + char *yy_buf_pos; /* current position in input buffer */ + + /* Size of input buffer in bytes, not including room for EOB + * characters. + */ + yy_size_t yy_buf_size; + + /* Number of characters read into yy_ch_buf, not including EOB + * characters. + */ + int yy_n_chars; + + /* Whether we "own" the buffer - i.e., we know we created it, + * and can realloc() it to grow it, and should free() it to + * delete it. + */ + int yy_is_our_buffer; + + /* Whether this is an "interactive" input source; if so, and + * if we're using stdio for input, then we want to use getc() + * instead of fread(), to make sure we stop fetching input after + * each newline. + */ + int yy_is_interactive; + + /* Whether we're considered to be at the beginning of a line. + * If so, '^' rules will be active on the next match, otherwise + * not. + */ + int yy_at_bol; + + /* Whether to try to fill the input buffer when we reach the + * end of it. + */ + int yy_fill_buffer; + + int yy_buffer_status; +#define YY_BUFFER_NEW 0 +#define YY_BUFFER_NORMAL 1 + /* When an EOF's been seen but there's still some text to process + * then we mark the buffer as YY_EOF_PENDING, to indicate that we + * shouldn't try reading from the input source any more. We might + * still have a bunch of tokens to match, though, because of + * possible backing-up. + * + * When we actually see the EOF, we change the status to "new" + * (via yyrestart()), so that the user can continue scanning by + * just pointing yyin at a new input file. + */ +#define YY_BUFFER_EOF_PENDING 2 + }; + +static YY_BUFFER_STATE yy_current_buffer = 0; + +/* We provide macros for accessing buffer states in case in the + * future we want to put the buffer states in a more general + * "scanner state". + */ +#define YY_CURRENT_BUFFER yy_current_buffer + + +/* yy_hold_char holds the character lost when yytext is formed. */ +static char yy_hold_char; + +static int yy_n_chars; /* number of characters read into yy_ch_buf */ + + +int yyleng; + +/* Points to current character in buffer. */ +static char *yy_c_buf_p = (char *) 0; +static int yy_init = 1; /* whether we need to initialize */ +static int yy_start = 0; /* start state number */ + +/* Flag which is used to allow yywrap()'s to do buffer switches + * instead of setting up a fresh yyin. A bit of a hack ... + */ +static int yy_did_buffer_switch_on_eof; + +void yyrestart YY_PROTO(( FILE *input_file )); + +void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer )); +void yy_load_buffer_state YY_PROTO(( void )); +YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size )); +void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b )); +void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file )); +void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b )); +#define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer ) + +YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size )); +YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str )); +YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len )); + +static void *yy_flex_alloc YY_PROTO(( yy_size_t )); +static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t )); +static void yy_flex_free YY_PROTO(( void * )); + +#define yy_new_buffer yy_create_buffer + +#define yy_set_interactive(is_interactive) \ + { \ + if ( ! yy_current_buffer ) \ + yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ + yy_current_buffer->yy_is_interactive = is_interactive; \ + } + +#define yy_set_bol(at_bol) \ + { \ + if ( ! yy_current_buffer ) \ + yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ + yy_current_buffer->yy_at_bol = at_bol; \ + } + +#define YY_AT_BOL() (yy_current_buffer->yy_at_bol) + + +#define YY_USES_REJECT +typedef unsigned char YY_CHAR; +FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0; +typedef int yy_state_type; +#define YY_FLEX_LEX_COMPAT +extern int yylineno; +int yylineno = 1; +extern char yytext[]; + + +static yy_state_type yy_get_previous_state YY_PROTO(( void )); +static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state )); +static int yy_get_next_buffer YY_PROTO(( void )); +static void yy_fatal_error YY_PROTO(( yyconst char msg[] )); + +/* Done after the current pattern has been matched and before the + * corresponding action - sets up yytext. + */ +#define YY_DO_BEFORE_ACTION \ + yytext_ptr = yy_bp; \ + yyleng = (int) (yy_cp - yy_bp); \ + yy_hold_char = *yy_cp; \ + *yy_cp = '\0'; \ + if ( yyleng + yy_more_offset >= YYLMAX ) \ + YY_FATAL_ERROR( "token too large, exceeds YYLMAX" ); \ + yy_flex_strncpy( &yytext[yy_more_offset], yytext_ptr, yyleng + 1 ); \ + yyleng += yy_more_offset; \ + yy_prev_more_offset = yy_more_offset; \ + yy_more_offset = 0; \ + yy_c_buf_p = yy_cp; + +#define YY_NUM_RULES 162 +#define YY_END_OF_BUFFER 163 +static yyconst short int yy_acclist[740] = + { 0, + 163, 162, 149, 162, 147, 149, 162, 147, 162, 126, + 149, 162, 149, 162,16469, 149, 162, 124, 149, 162, + 109, 149, 162, 149, 162,16472, 100, 149, 162, 101, + 149, 162, 123, 149, 162, 121, 149, 162, 145, 149, + 162, 122, 149, 162, 129, 149, 162, 99, 149, 162, + 81, 84, 149, 162, 81, 84, 149, 162, 128, 149, + 162, 146, 149, 162, 115, 149, 162, 131, 149, 162, + 117, 149, 162, 127, 149, 162, 80, 149, 162, 78, + 149, 162, 102, 149, 162, 149, 162, 103, 149, 162, + 108, 149, 162, 78, 149, 162, 78, 149, 162, 78, + + 149, 162, 78, 149, 162, 78, 149, 162, 78, 149, + 162, 78, 149, 162, 78, 149, 162, 78, 149, 162, + 78, 149, 162, 78, 149, 162, 78, 149, 162, 78, + 149, 162, 78, 149, 162, 78, 149, 162, 78, 149, + 162, 78, 149, 162, 78, 149, 162, 104, 149, 162, + 107, 149, 162, 106, 149, 162, 125, 149, 162, 147, + 149, 162, 94, 149, 162, 152, 162, 152, 162, 152, + 162, 157, 162, 156, 157, 162, 156, 162, 153, 157, + 162, 155, 157, 162, 154, 157, 162, 82, 157, 162, + 82, 157, 162, 153, 157, 162, 153, 157, 162, 153, + + 157, 162, 153, 157, 162, 153, 157, 162, 153, 157, + 162, 153, 157, 162, 153, 157, 162, 153, 157, 162, + 153, 157, 162, 153, 157, 162, 153, 157, 162, 153, + 157, 162, 105, 157, 162, 156, 157, 162, 95, 157, + 162, 160, 161, 162, 159, 161, 162, 158, 162, 161, + 162,16469, 83, 160, 161, 162, 83, 160, 161, 162, + 97, 162, 98, 162, 97, 162, 96, 97, 162, 114, + 16469, 8277, 86, 75, 77, 136, 110, 137,16472, 8280, + 89, 134, 142, 132, 143, 133, 130, 84, 90, 135, + 84, 81, 84, 84, 81, 84, 81, 119, 116, 113, + + 118, 120, 79, 78, 148, 138, 111, 78, 78, 78, + 78, 78, 78, 9, 78, 78, 78, 78, 78, 78, + 78, 17, 78, 78, 78, 78, 78, 78, 78, 78, + 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, + 78, 139, 112, 94, 92, 151, 150, 153, 91, 82, + 82, 82, 153, 153, 153, 153, 153, 153, 153, 153, + 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, + 153, 153, 153, 95, 93, 160, 159,16469, 87, 83, + 160, 83, 160, 83, 160, 160, 96, 74, 76, 77, + 144, 84, 84, 81, 81, 81, 140, 141, 79, 78, + + 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, + 78, 15, 78, 78, 78, 78, 20, 78, 78, 78, + 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, + 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, + 92, 82, 82, 153, 153, 153, 153, 153, 153, 153, + 153, 153, 153, 56, 153, 153, 153, 153, 153, 153, + 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, + 153, 93, 83, 160, 83, 160, 76, 1, 78, 78, + 3, 78, 4, 78, 78, 78, 78, 78, 78, 11, + 78, 12, 78, 78, 78, 16, 78, 78, 78, 21, + + 78, 78, 78, 78, 78, 78, 78, 28, 78, 78, + 78, 78, 78, 78, 78, 78, 37, 78, 78, 78, + 78, 78, 42, 78, 78, 78, 78, 46, 153, 47, + 153, 153, 153, 153, 51, 153, 153, 153, 153, 153, + 57, 153, 153, 153, 153, 61, 153, 153, 153, 153, + 153, 153, 67, 153, 153, 153, 153, 153, 72, 153, + 153, 2, 78, 5, 78, 78, 78, 78, 78, 78, + 14, 78, 78, 78, 78, 23, 78, 78, 78, 78, + 78, 29, 78, 78, 78, 78, 78, 78, 78, 78, + 78, 40, 78, 78, 78, 44, 78, 45, 78, 48, + + 153, 153, 153, 153, 53, 153, 153, 153, 153, 153, + 153, 62, 153, 153, 153, 153, 153, 153, 153, 70, + 153, 153, 153, 78, 78, 78, 10, 78, 13, 78, + 18, 78, 19, 78, 78, 78, 78, 78, 27, 78, + 30, 78, 31, 78, 32, 78, 33, 78, 35, 78, + 36, 78, 78, 78, 78, 78, 153, 50, 153, 52, + 153, 54, 153, 55, 153, 153, 153, 153, 63, 153, + 64, 153, 65, 153, 66, 153, 153, 153, 153, 153, + 78, 7, 78, 8, 78, 78, 78, 78, 78, 78, + 78, 39, 78, 78, 78, 49, 153, 153, 153, 153, + + 153, 69, 153, 153, 153, 6, 78, 22, 78, 24, + 78, 25, 78, 26, 78, 34, 78, 78, 41, 78, + 43, 78, 58, 153, 59, 153, 60, 153, 153, 71, + 153, 73, 153, 78, 153, 38, 78, 68, 153 + } ; + +static yyconst short int yy_accept[511] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 2, 3, 5, 8, 10, 13, 16, + 18, 21, 24, 27, 30, 33, 36, 39, 42, 45, + 48, 51, 55, 59, 62, 65, 68, 71, 74, 77, + 80, 83, 86, 88, 91, 94, 97, 100, 103, 106, + 109, 112, 115, 118, 121, 124, 127, 130, 133, 136, + 139, 142, 145, 148, 151, 154, 157, 160, 163, 166, + 168, 170, 172, 174, 177, 179, 182, 185, 188, 191, + 194, 197, 200, 203, 206, 209, 212, 215, 218, 221, + 224, 227, 230, 233, 236, 239, 242, 245, 248, 250, + + 253, 257, 261, 263, 265, 267, 270, 271, 272, 273, + 274, 274, 274, 275, 276, 277, 278, 279, 280, 281, + 282, 282, 283, 284, 285, 286, 287, 288, 288, 289, + 290, 291, 292, 294, 294, 295, 297, 298, 298, 299, + 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, + 310, 311, 312, 313, 314, 316, 317, 318, 319, 320, + 321, 322, 324, 325, 326, 327, 328, 329, 330, 331, + 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, + 342, 343, 344, 344, 345, 346, 347, 348, 349, 350, + 351, 352, 353, 353, 354, 355, 356, 357, 358, 359, + + 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, + 370, 371, 372, 373, 374, 374, 375, 376, 377, 378, + 379, 380, 380, 382, 384, 386, 387, 387, 388, 389, + 390, 391, 392, 393, 393, 394, 395, 396, 397, 398, + 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, + 409, 410, 411, 412, 414, 415, 416, 417, 419, 420, + 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, + 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, + 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, + 451, 452, 453, 454, 456, 457, 458, 459, 460, 461, + + 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, + 472, 473, 475, 477, 478, 480, 481, 483, 485, 486, + 487, 488, 489, 490, 492, 494, 495, 496, 498, 499, + 500, 502, 503, 504, 505, 506, 507, 508, 510, 511, + 512, 513, 514, 515, 516, 517, 519, 520, 521, 522, + 523, 525, 526, 527, 528, 530, 532, 533, 534, 535, + 537, 538, 539, 540, 541, 543, 544, 545, 546, 548, + 549, 550, 551, 552, 553, 555, 556, 557, 558, 559, + 561, 562, 564, 566, 567, 568, 569, 570, 571, 573, + 574, 575, 576, 578, 579, 580, 581, 582, 584, 585, + + 586, 587, 588, 589, 590, 591, 592, 594, 595, 596, + 598, 600, 602, 603, 604, 605, 607, 608, 609, 610, + 611, 612, 614, 615, 616, 617, 618, 619, 620, 622, + 623, 624, 625, 626, 627, 629, 631, 633, 635, 636, + 637, 638, 639, 641, 643, 645, 647, 649, 651, 653, + 654, 655, 656, 657, 658, 660, 662, 664, 666, 667, + 668, 669, 671, 673, 675, 677, 678, 679, 680, 681, + 682, 684, 686, 687, 688, 689, 690, 691, 692, 694, + 695, 696, 698, 699, 700, 701, 702, 704, 705, 706, + 708, 710, 712, 714, 716, 718, 719, 721, 723, 725, + + 727, 729, 730, 732, 734, 735, 736, 738, 740, 740 + } ; + +static yyconst int yy_ec[256] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, + 2, 2, 4, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 2, 5, 6, 7, 8, 9, 10, 11, 12, + 13, 14, 15, 16, 17, 18, 19, 20, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 22, 23, 24, + 25, 26, 27, 28, 29, 29, 29, 29, 30, 31, + 32, 32, 32, 32, 32, 33, 32, 32, 32, 32, + 32, 32, 32, 32, 34, 32, 32, 35, 32, 32, + 36, 37, 38, 39, 32, 40, 41, 42, 43, 44, + + 45, 46, 47, 48, 49, 32, 50, 51, 52, 53, + 54, 55, 32, 56, 57, 58, 59, 60, 61, 62, + 63, 64, 65, 66, 67, 68, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1 + } ; + +static yyconst int yy_meta[69] = + { 0, + 1, 2, 3, 1, 4, 2, 1, 5, 1, 1, + 1, 1, 1, 4, 1, 1, 4, 4, 1, 6, + 6, 4, 1, 1, 1, 1, 4, 1, 7, 7, + 7, 8, 8, 8, 8, 4, 4, 4, 1, 9, + 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 1, 1, 1, 1 + } ; + +static yyconst short int yy_base[530] = + { 0, + 0, 0, 0, 67, 56, 57, 76, 143, 145, 150, + 811, 152, 813, 815, 815, 815, 815, 787, 143, 152, + 786, 151, 164, 815, 815, 785, 143, 815, 152, 161, + 149, 184, 122, 815, 815, 48, 784, 160, 815, 0, + 0, 815, 805, 815, 158, 748, 750, 146, 144, 137, + 141, 751, 157, 750, 757, 746, 756, 163, 175, 747, + 745, 750, 746, 815, 166, 815, 815, 218, 791, 815, + 776, 780, 815, 815, 815, 0, 815, 779, 206, 216, + 733, 159, 737, 180, 739, 192, 735, 732, 742, 203, + 199, 733, 731, 815, 251, 779, 0, 781, 815, 253, + + 243, 249, 815, 815, 264, 815, 815, 278, 815, 815, + 779, 252, 259, 0, 815, 815, 815, 282, 815, 815, + 778, 815, 815, 815, 815, 815, 815, 762, 266, 815, + 815, 283, 239, 303, 815, 183, 255, 0, 754, 815, + 815, 815, 753, 0, 0, 815, 815, 815, 719, 731, + 718, 733, 169, 727, 713, 714, 711, 711, 714, 711, + 708, 0, 710, 240, 711, 717, 708, 274, 710, 706, + 245, 254, 710, 709, 716, 701, 273, 113, 706, 713, + 815, 815, 331, 748, 0, 815, 815, 0, 815, 306, + 256, 292, 0, 694, 710, 201, 691, 690, 690, 693, + + 691, 284, 692, 690, 149, 692, 688, 694, 295, 691, + 698, 683, 288, 295, 345, 732, 0, 0, 734, 347, + 815, 732, 328, 308, 321, 368, 353, 815, 343, 0, + 0, 815, 350, 346, 371, 815, 323, 335, 815, 815, + 0, 680, 692, 687, 675, 318, 677, 688, 686, 682, + 674, 680, 683, 0, 669, 668, 672, 0, 673, 662, + 340, 669, 659, 657, 669, 658, 660, 667, 653, 344, + 652, 652, 655, 662, 652, 656, 660, 662, 651, 643, + 0, 815, 372, 646, 643, 641, 644, 654, 643, 649, + 652, 638, 642, 0, 643, 629, 639, 629, 640, 629, + + 631, 625, 359, 625, 628, 635, 625, 629, 633, 635, + 0, 0, 412, 0, 0, 625, 0, 0, 616, 624, + 614, 612, 619, 0, 0, 613, 610, 0, 611, 613, + 0, 620, 619, 614, 605, 605, 604, 0, 601, 613, + 603, 607, 602, 611, 610, 0, 595, 607, 597, 602, + 0, 590, 602, 601, 0, 0, 587, 586, 592, 0, + 586, 583, 584, 586, 0, 589, 580, 580, 0, 577, + 589, 584, 579, 588, 0, 573, 585, 575, 580, 0, + 568, 0, 0, 572, 579, 572, 577, 568, 0, 562, + 574, 560, 0, 573, 558, 566, 561, 0, 569, 566, + + 568, 563, 551, 560, 556, 561, 0, 552, 555, 0, + 0, 0, 558, 557, 548, 0, 542, 554, 554, 529, + 527, 0, 501, 501, 423, 411, 417, 422, 0, 413, + 416, 405, 406, 403, 0, 0, 0, 0, 406, 414, + 407, 408, 0, 0, 0, 0, 396, 0, 0, 408, + 402, 402, 393, 384, 0, 0, 0, 0, 394, 393, + 394, 0, 0, 0, 0, 395, 389, 389, 379, 384, + 0, 0, 382, 371, 370, 367, 378, 363, 0, 376, + 374, 0, 360, 359, 349, 332, 0, 341, 333, 0, + 0, 0, 0, 0, 0, 323, 0, 0, 0, 0, + + 0, 319, 0, 0, 302, 137, 0, 0, 815, 471, + 480, 489, 498, 507, 512, 521, 524, 527, 533, 542, + 551, 555, 559, 563, 565, 573, 577, 584, 588 + } ; + +static yyconst short int yy_def[530] = + { 0, + 510, 510, 509, 3, 511, 511, 509, 7, 512, 512, + 513, 513, 509, 509, 509, 509, 509, 509, 514, 515, + 509, 509, 516, 509, 509, 509, 509, 509, 509, 509, + 509, 509, 32, 509, 509, 509, 509, 509, 509, 517, + 518, 509, 509, 509, 509, 518, 518, 518, 518, 518, + 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, + 518, 518, 518, 509, 509, 509, 509, 509, 509, 509, + 509, 509, 509, 509, 509, 519, 509, 509, 509, 509, + 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, + 519, 519, 519, 509, 509, 509, 520, 509, 509, 521, + + 520, 520, 509, 509, 509, 509, 509, 514, 509, 509, + 514, 522, 509, 523, 509, 509, 509, 516, 509, 509, + 516, 509, 509, 509, 509, 509, 509, 509, 509, 509, + 509, 509, 32, 509, 509, 509, 509, 524, 509, 509, + 509, 509, 509, 525, 518, 509, 509, 509, 518, 518, + 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, + 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, + 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, + 509, 509, 509, 509, 526, 509, 509, 519, 509, 509, + 509, 509, 527, 519, 519, 519, 519, 519, 519, 519, + + 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, + 519, 519, 519, 519, 509, 509, 528, 520, 509, 521, + 509, 521, 520, 520, 520, 520, 509, 509, 509, 529, + 523, 509, 509, 509, 509, 509, 509, 524, 509, 509, + 525, 518, 518, 518, 518, 518, 518, 518, 518, 518, + 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, + 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, + 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, + 526, 509, 527, 519, 519, 519, 519, 519, 519, 519, + 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, + + 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, + 528, 520, 520, 529, 518, 518, 518, 518, 518, 518, + 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, + 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, + 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, + 518, 518, 518, 518, 519, 519, 519, 519, 519, 519, + 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, + 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, + 519, 518, 518, 518, 518, 518, 518, 518, 518, 518, + 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, + + 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, + 518, 519, 519, 519, 519, 519, 519, 519, 519, 519, + 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, + 519, 518, 518, 518, 518, 518, 518, 518, 518, 518, + 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, + 518, 518, 518, 519, 519, 519, 519, 519, 519, 519, + 519, 519, 519, 519, 519, 519, 519, 519, 519, 518, + 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, + 518, 519, 519, 519, 519, 519, 519, 519, 519, 518, + 518, 518, 518, 518, 518, 518, 518, 518, 519, 519, + + 519, 519, 519, 519, 518, 519, 518, 519, 0, 509, + 509, 509, 509, 509, 509, 509, 509, 509, 509, 509, + 509, 509, 509, 509, 509, 509, 509, 509, 509 + } ; + +static yyconst short int yy_nxt[884] = + { 0, + 15, 16, 17, 16, 18, 19, 15, 20, 21, 22, + 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, + 33, 34, 35, 36, 37, 38, 39, 40, 41, 41, + 41, 41, 41, 41, 41, 42, 43, 44, 45, 41, + 46, 47, 48, 49, 50, 51, 52, 41, 53, 41, + 54, 41, 41, 55, 56, 57, 58, 59, 60, 61, + 62, 63, 41, 41, 64, 65, 66, 67, 68, 71, + 71, 139, 140, 69, 72, 72, 73, 74, 75, 74, + 76, 73, 73, 76, 73, 73, 73, 73, 73, 76, + 73, 77, 76, 76, 78, 79, 80, 76, 73, 73, + + 73, 73, 76, 73, 76, 76, 76, 76, 76, 76, + 76, 76, 76, 76, 73, 73, 81, 76, 82, 83, + 84, 85, 76, 76, 86, 76, 87, 76, 76, 76, + 88, 89, 90, 91, 92, 93, 76, 76, 76, 76, + 94, 73, 73, 73, 95, 109, 98, 99, 110, 96, + 100, 98, 99, 105, 104, 100, 509, 123, 106, 112, + 116, 277, 130, 278, 101, 102, 119, 124, 125, 101, + 102, 113, 113, 131, 120, 117, 126, 127, 128, 111, + 129, 129, 147, 509, 142, 143, 151, 156, 154, 157, + 181, 159, 508, 152, 160, 297, 148, 155, 158, 153, + + 121, 132, 162, 133, 133, 298, 195, 169, 163, 164, + 170, 171, 196, 134, 135, 236, 136, 137, 138, 183, + 172, 246, 174, 173, 184, 190, 190, 247, 134, 135, + 175, 182, 198, 236, 136, 190, 190, 176, 191, 192, + 193, 199, 137, 201, 202, 138, 210, 206, 191, 192, + 207, 208, 215, 286, 211, 109, 191, 216, 221, 287, + 209, 212, 223, 223, 192, 227, 191, 193, 223, 223, + 228, 229, 229, 509, 192, 224, 225, 226, 113, 113, + 109, 224, 225, 110, 119, 129, 129, 237, 282, 222, + 257, 267, 120, 224, 269, 134, 135, 258, 135, 224, + + 509, 225, 233, 233, 226, 237, 282, 225, 268, 270, + 134, 135, 134, 135, 111, 135, 135, 234, 121, 234, + 262, 275, 235, 235, 191, 190, 190, 134, 135, 276, + 263, 264, 183, 135, 293, 302, 307, 184, 191, 192, + 312, 294, 191, 309, 308, 310, 215, 223, 223, 109, + 303, 216, 221, 224, 227, 236, 191, 507, 312, 228, + 224, 225, 229, 229, 192, 235, 235, 237, 137, 233, + 233, 224, 506, 236, 319, 320, 505, 504, 224, 134, + 135, 333, 135, 222, 503, 237, 225, 313, 313, 502, + 235, 235, 343, 137, 134, 135, 313, 313, 313, 334, + + 135, 135, 344, 135, 191, 192, 501, 373, 313, 313, + 313, 313, 313, 313, 500, 499, 135, 374, 498, 497, + 496, 135, 191, 495, 494, 493, 492, 491, 490, 489, + 192, 313, 313, 488, 487, 486, 485, 484, 483, 482, + 313, 313, 313, 481, 224, 225, 480, 479, 478, 477, + 476, 475, 313, 313, 313, 313, 313, 313, 474, 473, + 472, 471, 224, 470, 469, 468, 467, 466, 465, 464, + 225, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 70, 70, 70, 70, 70, 70, 70, 70, 70, 97, + 97, 97, 97, 97, 97, 97, 97, 97, 103, 103, + + 103, 103, 103, 103, 103, 103, 103, 108, 108, 108, + 108, 108, 108, 108, 108, 108, 114, 114, 114, 114, + 114, 118, 118, 118, 118, 118, 118, 118, 118, 118, + 144, 144, 145, 145, 145, 145, 188, 188, 188, 188, + 188, 188, 218, 463, 462, 218, 218, 218, 218, 218, + 218, 220, 220, 220, 220, 220, 220, 220, 220, 220, + 230, 230, 230, 230, 231, 231, 231, 231, 238, 238, + 241, 241, 241, 281, 281, 461, 281, 281, 281, 281, + 281, 281, 283, 283, 311, 311, 460, 311, 311, 311, + 311, 311, 311, 314, 314, 314, 314, 459, 458, 457, + + 456, 455, 454, 453, 452, 451, 450, 449, 448, 447, + 446, 445, 444, 443, 442, 441, 440, 439, 438, 437, + 436, 435, 434, 433, 432, 431, 430, 429, 428, 427, + 426, 425, 424, 423, 422, 421, 420, 419, 418, 417, + 416, 415, 414, 413, 412, 411, 410, 409, 408, 407, + 406, 405, 404, 403, 402, 401, 400, 399, 398, 397, + 396, 395, 394, 393, 392, 391, 390, 389, 388, 387, + 386, 385, 384, 383, 382, 381, 380, 379, 378, 377, + 376, 375, 372, 371, 370, 369, 368, 367, 366, 365, + 364, 363, 362, 361, 360, 359, 358, 357, 356, 355, + + 354, 353, 352, 351, 350, 349, 348, 347, 346, 345, + 342, 341, 340, 339, 338, 337, 336, 335, 332, 331, + 330, 329, 328, 327, 326, 325, 324, 323, 322, 321, + 318, 317, 316, 315, 509, 219, 217, 306, 305, 304, + 301, 300, 299, 296, 295, 292, 291, 290, 289, 288, + 285, 284, 185, 280, 279, 274, 273, 272, 271, 266, + 265, 261, 260, 259, 256, 255, 254, 253, 252, 251, + 250, 249, 248, 245, 244, 243, 242, 240, 239, 232, + 509, 509, 219, 217, 214, 213, 205, 204, 203, 200, + 197, 194, 189, 187, 186, 185, 180, 179, 178, 177, + + 168, 167, 166, 165, 161, 150, 149, 146, 141, 122, + 115, 107, 509, 104, 13, 509, 509, 509, 509, 509, + 509, 509, 509, 509, 509, 509, 509, 509, 509, 509, + 509, 509, 509, 509, 509, 509, 509, 509, 509, 509, + 509, 509, 509, 509, 509, 509, 509, 509, 509, 509, + 509, 509, 509, 509, 509, 509, 509, 509, 509, 509, + 509, 509, 509, 509, 509, 509, 509, 509, 509, 509, + 509, 509, 509, 509, 509, 509, 509, 509, 509, 509, + 509, 509, 509 + } ; + +static yyconst short int yy_chk[884] = + { 0, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 4, 5, + 6, 36, 36, 4, 5, 6, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 8, 19, 9, 9, 19, 8, + 9, 10, 10, 12, 12, 10, 33, 27, 12, 20, + 22, 178, 31, 178, 9, 9, 23, 27, 29, 10, + 10, 20, 20, 31, 23, 22, 29, 29, 30, 19, + 30, 30, 45, 33, 38, 38, 48, 50, 49, 50, + 65, 51, 506, 48, 51, 205, 45, 49, 50, 48, + + 23, 32, 53, 32, 32, 205, 82, 58, 53, 53, + 58, 58, 82, 32, 32, 136, 32, 32, 32, 68, + 58, 153, 59, 58, 68, 79, 79, 153, 32, 32, + 59, 65, 84, 136, 32, 80, 80, 59, 79, 79, + 79, 84, 32, 86, 86, 32, 91, 90, 80, 80, + 90, 90, 95, 196, 91, 100, 79, 95, 100, 196, + 90, 91, 101, 101, 79, 105, 80, 79, 102, 102, + 105, 112, 112, 133, 80, 101, 101, 101, 113, 113, + 108, 102, 102, 108, 118, 129, 129, 137, 191, 100, + 164, 171, 118, 101, 172, 129, 129, 164, 129, 102, + + 133, 101, 132, 132, 101, 137, 191, 102, 171, 172, + 129, 129, 132, 132, 108, 132, 129, 134, 118, 134, + 168, 177, 134, 134, 192, 190, 190, 132, 132, 177, + 168, 168, 183, 132, 202, 209, 213, 183, 190, 190, + 224, 202, 192, 214, 213, 214, 215, 223, 223, 220, + 209, 215, 220, 225, 227, 237, 190, 505, 224, 227, + 223, 223, 229, 229, 190, 234, 234, 238, 238, 233, + 233, 225, 502, 237, 246, 246, 496, 489, 223, 233, + 233, 261, 233, 220, 488, 238, 223, 226, 226, 486, + 235, 235, 270, 238, 233, 233, 226, 226, 226, 261, + + 233, 235, 270, 235, 283, 283, 485, 303, 226, 226, + 226, 226, 226, 226, 484, 483, 235, 303, 481, 480, + 478, 235, 283, 477, 476, 475, 474, 473, 470, 469, + 283, 313, 313, 468, 467, 466, 461, 460, 459, 454, + 313, 313, 313, 453, 313, 313, 452, 451, 450, 447, + 442, 441, 313, 313, 313, 313, 313, 313, 440, 439, + 434, 433, 313, 432, 431, 430, 428, 427, 426, 425, + 313, 510, 510, 510, 510, 510, 510, 510, 510, 510, + 511, 511, 511, 511, 511, 511, 511, 511, 511, 512, + 512, 512, 512, 512, 512, 512, 512, 512, 513, 513, + + 513, 513, 513, 513, 513, 513, 513, 514, 514, 514, + 514, 514, 514, 514, 514, 514, 515, 515, 515, 515, + 515, 516, 516, 516, 516, 516, 516, 516, 516, 516, + 517, 517, 518, 518, 518, 518, 519, 519, 519, 519, + 519, 519, 520, 424, 423, 520, 520, 520, 520, 520, + 520, 521, 521, 521, 521, 521, 521, 521, 521, 521, + 522, 522, 522, 522, 523, 523, 523, 523, 524, 524, + 525, 525, 525, 526, 526, 421, 526, 526, 526, 526, + 526, 526, 527, 527, 528, 528, 420, 528, 528, 528, + 528, 528, 528, 529, 529, 529, 529, 419, 418, 417, + + 415, 414, 413, 409, 408, 406, 405, 404, 403, 402, + 401, 400, 399, 397, 396, 395, 394, 392, 391, 390, + 388, 387, 386, 385, 384, 381, 379, 378, 377, 376, + 374, 373, 372, 371, 370, 368, 367, 366, 364, 363, + 362, 361, 359, 358, 357, 354, 353, 352, 350, 349, + 348, 347, 345, 344, 343, 342, 341, 340, 339, 337, + 336, 335, 334, 333, 332, 330, 329, 327, 326, 323, + 322, 321, 320, 319, 316, 310, 309, 308, 307, 306, + 305, 304, 302, 301, 300, 299, 298, 297, 296, 295, + 293, 292, 291, 290, 289, 288, 287, 286, 285, 284, + + 280, 279, 278, 277, 276, 275, 274, 273, 272, 271, + 269, 268, 267, 266, 265, 264, 263, 262, 260, 259, + 257, 256, 255, 253, 252, 251, 250, 249, 248, 247, + 245, 244, 243, 242, 222, 219, 216, 212, 211, 210, + 208, 207, 206, 204, 203, 201, 200, 199, 198, 197, + 195, 194, 184, 180, 179, 176, 175, 174, 173, 170, + 169, 167, 166, 165, 163, 161, 160, 159, 158, 157, + 156, 155, 154, 152, 151, 150, 149, 143, 139, 128, + 121, 111, 98, 96, 93, 92, 89, 88, 87, 85, + 83, 81, 78, 72, 71, 69, 63, 62, 61, 60, + + 57, 56, 55, 54, 52, 47, 46, 43, 37, 26, + 21, 18, 13, 11, 509, 509, 509, 509, 509, 509, + 509, 509, 509, 509, 509, 509, 509, 509, 509, 509, + 509, 509, 509, 509, 509, 509, 509, 509, 509, 509, + 509, 509, 509, 509, 509, 509, 509, 509, 509, 509, + 509, 509, 509, 509, 509, 509, 509, 509, 509, 509, + 509, 509, 509, 509, 509, 509, 509, 509, 509, 509, + 509, 509, 509, 509, 509, 509, 509, 509, 509, 509, + 509, 509, 509 + } ; + +static yy_state_type yy_state_buf[YY_BUF_SIZE + 2], *yy_state_ptr; +static char *yy_full_match; +static int yy_lp; +static int yy_looking_for_trail_begin = 0; +static int yy_full_lp; +static int *yy_full_state; +#define YY_TRAILING_MASK 0x2000 +#define YY_TRAILING_HEAD_MASK 0x4000 +#define REJECT \ +{ \ +*yy_cp = yy_hold_char; /* undo effects of setting up yytext */ \ +yy_cp = yy_full_match; /* restore poss. backed-over text */ \ +yy_lp = yy_full_lp; /* restore orig. accepting pos. */ \ +yy_state_ptr = yy_full_state; /* restore orig. state */ \ +yy_current_state = *yy_state_ptr; /* restore curr. state */ \ +++yy_lp; \ +goto find_rule; \ +} +static int yy_more_offset = 0; +static int yy_prev_more_offset = 0; +#define yymore() (yy_more_offset = yy_flex_strlen( yytext )) +#define YY_NEED_STRLEN +#define YY_MORE_ADJ 0 +#define YY_RESTORE_YY_MORE_OFFSET \ + { \ + yy_more_offset = yy_prev_more_offset; \ + yyleng -= yy_more_offset; \ + } +#ifndef YYLMAX +#define YYLMAX 8192 +#endif + +char yytext[YYLMAX]; +char *yytext_ptr; +#line 1 "dt_lex.l" +#define INITIAL 0 +#line 2 "dt_lex.l" +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. + */ + +#ifndef VBOX +#include <string.h> +#include <stdlib.h> +#include <stdio.h> +#include <assert.h> +#include <ctype.h> +#include <errno.h> +#else /* VBOX */ +# ifdef RT_OS_WINDOWS /* No unistd.h on windows, avoid redef warnings of the [U]INTxx_MAX defines caused by no inttypes.h/stdint.h. */ +# define YY_NO_UNISTD_H +# undef INT8_MAX +# undef INT16_MAX +# undef INT32_MAX +# undef INT64_MAX +# undef UINT8_MAX +# undef UINT16_MAX +# undef UINT32_MAX +# undef UINT64_MAX +# endif +# ifdef _MSC_VER +# pragma warning(disable:4668 4131 4255) +# endif +# ifdef __GNUC__ +# if ((__GNUC__ << 16) + __GNUC_MINOR__) >= 0x4002 +# pragma GCC diagnostic ignored "-Wunused-function" +# endif +# endif +# include <iprt/ctype.h> +# include <iprt/err.h> +# define isdigit(a_ch) RT_C_IS_DIGIT(a_ch) +#endif /* VBOX */ + +#include <dt_impl.h> +#include <dt_grammar.h> +#include <dt_parser.h> +#include <dt_string.h> + +#ifndef USING_FLEX +/* + * We need to undefine lex's input and unput macros so that references to these + * call the functions provided at the end of this source file. + */ +#undef input +#undef unput +#else /* USING_FLEX */ +# define YY_INPUT(buf, result, max_size) \ + do { \ + if (yypcb->pcb_fileptr != NULL) { \ + result = (int)fread(buf, 1, max_size, yypcb->pcb_fileptr); \ + if (!result && ferror(yypcb->pcb_fileptr)) \ + longjmp(yypcb->pcb_jmpbuf, EDT_FIO); \ + /*YY_FATAL_ERROR("input in flex scanner failed");*/ \ + } else { \ + size_t off = yypcb->pcb_strptr - yypcb->pcb_string; \ + if (off < yypcb->pcb_strlen) { \ + off = yypcb->pcb_strlen - off; \ + result = max_size; \ + if ((size_t)result > off) \ + result = (int)off; \ + memcpy(buf, yypcb->pcb_strptr, result); \ + yypcb->pcb_strptr += result; \ + /*fprintf(stderr, "yy_input -> %d '%.*s'\n", result, result, buf);*/ \ + } else { \ + buf[0] = '\0'; \ + result = 0; \ + /*fprintf(stderr, "yy_input -> %d\n", result);*/ \ + } \ + } \ + } while (0) +#endif /* USING_FLEX */ + +static int id_or_type(const char *); +#ifndef USING_FLEX +static int input(void); +static void unput(int); +#endif + +/* + * We first define a set of labeled states for use in the D lexer and then a + * set of regular expressions to simplify things below. The lexer states are: + * + * S0 - D program clause and expression lexing + * S1 - D comments (i.e. skip everything until end of comment) + * S2 - D program outer scope (probe specifiers and declarations) + * S3 - D control line parsing (i.e. after ^# is seen but before \n) + * S4 - D control line scan (locate control directives only and invoke S3) + */ +#define S0 1 +#define S1 2 +#define S2 3 +#define S3 4 +#define S4 5 + +#line 968 "dt_lex.c" + +/* Macros after this point can all be overridden by user definitions in + * section 1. + */ + +#ifndef YY_SKIP_YYWRAP +#ifdef __cplusplus +extern "C" int yywrap YY_PROTO(( void )); +#else +extern int yywrap YY_PROTO(( void )); +#endif +#endif + +#ifndef YY_NO_UNPUT +static void yyunput YY_PROTO(( int c, char *buf_ptr )); +#endif + +#ifndef yytext_ptr +static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int )); +#endif + +#ifdef YY_NEED_STRLEN +static int yy_flex_strlen YY_PROTO(( yyconst char * )); +#endif + +#ifndef YY_NO_INPUT +#ifdef __cplusplus +static int yyinput YY_PROTO(( void )); +#else +static int input YY_PROTO(( void )); +#endif +#endif + +#if YY_STACK_USED +static int yy_start_stack_ptr = 0; +static int yy_start_stack_depth = 0; +static int *yy_start_stack = 0; +#ifndef YY_NO_PUSH_STATE +static void yy_push_state YY_PROTO(( int new_state )); +#endif +#ifndef YY_NO_POP_STATE +static void yy_pop_state YY_PROTO(( void )); +#endif +#ifndef YY_NO_TOP_STATE +static int yy_top_state YY_PROTO(( void )); +#endif + +#else +#define YY_NO_PUSH_STATE 1 +#define YY_NO_POP_STATE 1 +#define YY_NO_TOP_STATE 1 +#endif + +#ifdef YY_MALLOC_DECL +YY_MALLOC_DECL +#else +#if __STDC__ +#ifndef __cplusplus +#include <stdlib.h> +#endif +#else +/* Just try to get by without declaring the routines. This will fail + * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int) + * or sizeof(void*) != sizeof(int). + */ +#endif +#endif + +/* Amount of stuff to slurp up with each read. */ +#ifndef YY_READ_BUF_SIZE +#define YY_READ_BUF_SIZE 8192 +#endif + +/* Copy whatever the last rule matched to the standard output. */ + +#ifndef ECHO +/* This used to be an fputs(), but since the string might contain NUL's, + * we now use fwrite(). + */ +#define ECHO (void) fwrite( yytext, yyleng, 1, yyout ) +#endif + +/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, + * is returned in "result". + */ +#ifndef YY_INPUT +#define YY_INPUT(buf,result,max_size) \ + if ( yy_current_buffer->yy_is_interactive ) \ + { \ + int c = '*', n; \ + for ( n = 0; n < max_size && \ + (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ + buf[n] = (char) c; \ + if ( c == '\n' ) \ + buf[n++] = (char) c; \ + if ( c == EOF && ferror( yyin ) ) \ + YY_FATAL_ERROR( "input in flex scanner failed" ); \ + result = n; \ + } \ + else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \ + && ferror( yyin ) ) \ + YY_FATAL_ERROR( "input in flex scanner failed" ); +#endif + +/* No semi-colon after return; correct usage is to write "yyterminate();" - + * we don't want an extra ';' after the "return" because that will cause + * some compilers to complain about unreachable statements. + */ +#ifndef yyterminate +#define yyterminate() return YY_NULL +#endif + +/* Number of entries by which start-condition stack grows. */ +#ifndef YY_START_STACK_INCR +#define YY_START_STACK_INCR 25 +#endif + +/* Report a fatal error. */ +#ifndef YY_FATAL_ERROR +#define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) +#endif + +/* Default declaration of generated scanner - a define so the user can + * easily add parameters. + */ +#ifndef YY_DECL +#define YY_DECL int yylex YY_PROTO(( void )) +#endif + +/* Code executed at the beginning of each rule, after yytext and yyleng + * have been set up. + */ +#ifndef YY_USER_ACTION +#define YY_USER_ACTION +#endif + +/* Code executed at the end of each rule. */ +#ifndef YY_BREAK +#define YY_BREAK break; +#endif + +#define YY_RULE_SETUP \ + if ( yyleng > 0 ) \ + yy_current_buffer->yy_at_bol = \ + (yytext[yyleng - 1] == '\n'); \ + YY_USER_ACTION + +YY_DECL + { + register yy_state_type yy_current_state; + register char *yy_cp, *yy_bp; + register int yy_act; + +#line 132 "dt_lex.l" + + + + +/* + * We insert a special prologue into yylex() itself: if the pcb contains a + * context token, we return that prior to running the normal lexer. This + * allows libdtrace to force yacc into one of our three parsing contexts: D + * expression (DT_CTX_DEXPR), D program (DT_CTX_DPROG) or D type (DT_CTX_DTYPE). + * Once the token is returned, we clear it so this only happens once. + */ +if (yypcb->pcb_token != 0) { + int tok = yypcb->pcb_token; + yypcb->pcb_token = 0; + return (tok); +} + + + +#line 1142 "dt_lex.c" + + if ( yy_init ) + { + yy_init = 0; + +#ifdef YY_USER_INIT + YY_USER_INIT; +#endif + + if ( ! yy_start ) + yy_start = 1; /* first start state */ + + if ( ! yyin ) + yyin = stdin; + + if ( ! yyout ) + yyout = stdout; + + if ( ! yy_current_buffer ) + yy_current_buffer = + yy_create_buffer( yyin, YY_BUF_SIZE ); + + yy_load_buffer_state(); + } + + while ( 1 ) /* loops until end-of-file is reached */ + { + yy_cp = yy_c_buf_p; + + /* Support of yytext. */ + *yy_cp = yy_hold_char; + + /* yy_bp points to the position in yy_ch_buf of the start of + * the current run. + */ + yy_bp = yy_cp; + + yy_current_state = yy_start; + yy_current_state += YY_AT_BOL(); + yy_state_ptr = yy_state_buf; + *yy_state_ptr++ = yy_current_state; +yy_match: + do + { + register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 510 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + *yy_state_ptr++ = yy_current_state; + ++yy_cp; + } + while ( yy_current_state != 509 ); + +yy_find_action: + yy_current_state = *--yy_state_ptr; + yy_lp = yy_accept[yy_current_state]; +find_rule: /* we branch to this label when backing up */ + for ( ; ; ) /* until we find what rule we matched */ + { + if ( yy_lp && yy_lp < yy_accept[yy_current_state + 1] ) + { + yy_act = yy_acclist[yy_lp]; + if ( yy_act & YY_TRAILING_HEAD_MASK || + yy_looking_for_trail_begin ) + { + if ( yy_act == yy_looking_for_trail_begin ) + { + yy_looking_for_trail_begin = 0; + yy_act &= ~YY_TRAILING_HEAD_MASK; + break; + } + } + else if ( yy_act & YY_TRAILING_MASK ) + { + yy_looking_for_trail_begin = yy_act & ~YY_TRAILING_MASK; + yy_looking_for_trail_begin |= YY_TRAILING_HEAD_MASK; + yy_full_match = yy_cp; + yy_full_state = yy_state_ptr; + yy_full_lp = yy_lp; + } + else + { + yy_full_match = yy_cp; + yy_full_state = yy_state_ptr; + yy_full_lp = yy_lp; + break; + } + ++yy_lp; + goto find_rule; + } + --yy_cp; + yy_current_state = *--yy_state_ptr; + yy_lp = yy_accept[yy_current_state]; + } + + YY_DO_BEFORE_ACTION; + + if ( yy_act != YY_END_OF_BUFFER ) + { + int yyl; + for ( yyl = 0; yyl < yyleng; ++yyl ) + if ( yytext[yyl] == '\n' ) + ++yylineno; + } + +do_action: /* This label is used only to access EOF actions. */ + + + switch ( yy_act ) + { /* beginning of action switch */ +case 1: +YY_RULE_SETUP +#line 151 "dt_lex.l" +return (DT_KEY_AUTO); + YY_BREAK +case 2: +YY_RULE_SETUP +#line 152 "dt_lex.l" +return (DT_KEY_BREAK); + YY_BREAK +case 3: +YY_RULE_SETUP +#line 153 "dt_lex.l" +return (DT_KEY_CASE); + YY_BREAK +case 4: +YY_RULE_SETUP +#line 154 "dt_lex.l" +return (DT_KEY_CHAR); + YY_BREAK +case 5: +YY_RULE_SETUP +#line 155 "dt_lex.l" +return (DT_KEY_CONST); + YY_BREAK +case 6: +YY_RULE_SETUP +#line 156 "dt_lex.l" +return (DT_KEY_CONTINUE); + YY_BREAK +case 7: +YY_RULE_SETUP +#line 157 "dt_lex.l" +return (DT_KEY_COUNTER); + YY_BREAK +case 8: +YY_RULE_SETUP +#line 158 "dt_lex.l" +return (DT_KEY_DEFAULT); + YY_BREAK +case 9: +YY_RULE_SETUP +#line 159 "dt_lex.l" +return (DT_KEY_DO); + YY_BREAK +case 10: +YY_RULE_SETUP +#line 160 "dt_lex.l" +return (DT_KEY_DOUBLE); + YY_BREAK +case 11: +YY_RULE_SETUP +#line 161 "dt_lex.l" +return (DT_KEY_ELSE); + YY_BREAK +case 12: +YY_RULE_SETUP +#line 162 "dt_lex.l" +return (DT_KEY_ENUM); + YY_BREAK +case 13: +YY_RULE_SETUP +#line 163 "dt_lex.l" +return (DT_KEY_EXTERN); + YY_BREAK +case 14: +YY_RULE_SETUP +#line 164 "dt_lex.l" +return (DT_KEY_FLOAT); + YY_BREAK +case 15: +YY_RULE_SETUP +#line 165 "dt_lex.l" +return (DT_KEY_FOR); + YY_BREAK +case 16: +YY_RULE_SETUP +#line 166 "dt_lex.l" +return (DT_KEY_GOTO); + YY_BREAK +case 17: +YY_RULE_SETUP +#line 167 "dt_lex.l" +return (DT_KEY_IF); + YY_BREAK +case 18: +YY_RULE_SETUP +#line 168 "dt_lex.l" +return (DT_KEY_IMPORT); + YY_BREAK +case 19: +YY_RULE_SETUP +#line 169 "dt_lex.l" +return (DT_KEY_INLINE); + YY_BREAK +case 20: +YY_RULE_SETUP +#line 170 "dt_lex.l" +return (DT_KEY_INT); + YY_BREAK +case 21: +YY_RULE_SETUP +#line 171 "dt_lex.l" +return (DT_KEY_LONG); + YY_BREAK +case 22: +YY_RULE_SETUP +#line 172 "dt_lex.l" +return (DT_TOK_OFFSETOF); + YY_BREAK +case 23: +YY_RULE_SETUP +#line 173 "dt_lex.l" +return (DT_KEY_PROBE); + YY_BREAK +case 24: +YY_RULE_SETUP +#line 174 "dt_lex.l" +return (DT_KEY_PROVIDER); + YY_BREAK +case 25: +YY_RULE_SETUP +#line 175 "dt_lex.l" +return (DT_KEY_REGISTER); + YY_BREAK +case 26: +YY_RULE_SETUP +#line 176 "dt_lex.l" +return (DT_KEY_RESTRICT); + YY_BREAK +case 27: +YY_RULE_SETUP +#line 177 "dt_lex.l" +return (DT_KEY_RETURN); + YY_BREAK +case 28: +YY_RULE_SETUP +#line 178 "dt_lex.l" +return (DT_KEY_SELF); + YY_BREAK +case 29: +YY_RULE_SETUP +#line 179 "dt_lex.l" +return (DT_KEY_SHORT); + YY_BREAK +case 30: +YY_RULE_SETUP +#line 180 "dt_lex.l" +return (DT_KEY_SIGNED); + YY_BREAK +case 31: +YY_RULE_SETUP +#line 181 "dt_lex.l" +return (DT_TOK_SIZEOF); + YY_BREAK +case 32: +YY_RULE_SETUP +#line 182 "dt_lex.l" +return (DT_KEY_STATIC); + YY_BREAK +case 33: +YY_RULE_SETUP +#line 183 "dt_lex.l" +return (DT_KEY_STRING); + YY_BREAK +case 34: +YY_RULE_SETUP +#line 184 "dt_lex.l" +return (DT_TOK_STRINGOF); + YY_BREAK +case 35: +YY_RULE_SETUP +#line 185 "dt_lex.l" +return (DT_KEY_STRUCT); + YY_BREAK +case 36: +YY_RULE_SETUP +#line 186 "dt_lex.l" +return (DT_KEY_SWITCH); + YY_BREAK +case 37: +YY_RULE_SETUP +#line 187 "dt_lex.l" +return (DT_KEY_THIS); + YY_BREAK +case 38: +YY_RULE_SETUP +#line 188 "dt_lex.l" +return (DT_KEY_XLATOR); + YY_BREAK +case 39: +YY_RULE_SETUP +#line 189 "dt_lex.l" +return (DT_KEY_TYPEDEF); + YY_BREAK +case 40: +YY_RULE_SETUP +#line 190 "dt_lex.l" +return (DT_KEY_UNION); + YY_BREAK +case 41: +YY_RULE_SETUP +#line 191 "dt_lex.l" +return (DT_KEY_UNSIGNED); + YY_BREAK +case 42: +YY_RULE_SETUP +#line 192 "dt_lex.l" +return (DT_KEY_VOID); + YY_BREAK +case 43: +YY_RULE_SETUP +#line 193 "dt_lex.l" +return (DT_KEY_VOLATILE); + YY_BREAK +case 44: +YY_RULE_SETUP +#line 194 "dt_lex.l" +return (DT_KEY_WHILE); + YY_BREAK +case 45: +YY_RULE_SETUP +#line 195 "dt_lex.l" +return (DT_TOK_XLATE); + YY_BREAK +case 46: +YY_RULE_SETUP +#line 197 "dt_lex.l" +{ yybegin(YYS_EXPR); return (DT_KEY_AUTO); } + YY_BREAK +case 47: +YY_RULE_SETUP +#line 198 "dt_lex.l" +{ yybegin(YYS_EXPR); return (DT_KEY_CHAR); } + YY_BREAK +case 48: +YY_RULE_SETUP +#line 199 "dt_lex.l" +{ yybegin(YYS_EXPR); return (DT_KEY_CONST); } + YY_BREAK +case 49: +YY_RULE_SETUP +#line 200 "dt_lex.l" +{ yybegin(YYS_DEFINE); return (DT_KEY_COUNTER); } + YY_BREAK +case 50: +YY_RULE_SETUP +#line 201 "dt_lex.l" +{ yybegin(YYS_EXPR); return (DT_KEY_DOUBLE); } + YY_BREAK +case 51: +YY_RULE_SETUP +#line 202 "dt_lex.l" +{ yybegin(YYS_EXPR); return (DT_KEY_ENUM); } + YY_BREAK +case 52: +YY_RULE_SETUP +#line 203 "dt_lex.l" +{ yybegin(YYS_EXPR); return (DT_KEY_EXTERN); } + YY_BREAK +case 53: +YY_RULE_SETUP +#line 204 "dt_lex.l" +{ yybegin(YYS_EXPR); return (DT_KEY_FLOAT); } + YY_BREAK +case 54: +YY_RULE_SETUP +#line 205 "dt_lex.l" +{ yybegin(YYS_EXPR); return (DT_KEY_IMPORT); } + YY_BREAK +case 55: +YY_RULE_SETUP +#line 206 "dt_lex.l" +{ yybegin(YYS_DEFINE); return (DT_KEY_INLINE); } + YY_BREAK +case 56: +YY_RULE_SETUP +#line 207 "dt_lex.l" +{ yybegin(YYS_EXPR); return (DT_KEY_INT); } + YY_BREAK +case 57: +YY_RULE_SETUP +#line 208 "dt_lex.l" +{ yybegin(YYS_EXPR); return (DT_KEY_LONG); } + YY_BREAK +case 58: +YY_RULE_SETUP +#line 209 "dt_lex.l" +{ yybegin(YYS_DEFINE); return (DT_KEY_PROVIDER); } + YY_BREAK +case 59: +YY_RULE_SETUP +#line 210 "dt_lex.l" +{ yybegin(YYS_EXPR); return (DT_KEY_REGISTER); } + YY_BREAK +case 60: +YY_RULE_SETUP +#line 211 "dt_lex.l" +{ yybegin(YYS_EXPR); return (DT_KEY_RESTRICT); } + YY_BREAK +case 61: +YY_RULE_SETUP +#line 212 "dt_lex.l" +{ yybegin(YYS_EXPR); return (DT_KEY_SELF); } + YY_BREAK +case 62: +YY_RULE_SETUP +#line 213 "dt_lex.l" +{ yybegin(YYS_EXPR); return (DT_KEY_SHORT); } + YY_BREAK +case 63: +YY_RULE_SETUP +#line 214 "dt_lex.l" +{ yybegin(YYS_EXPR); return (DT_KEY_SIGNED); } + YY_BREAK +case 64: +YY_RULE_SETUP +#line 215 "dt_lex.l" +{ yybegin(YYS_EXPR); return (DT_KEY_STATIC); } + YY_BREAK +case 65: +YY_RULE_SETUP +#line 216 "dt_lex.l" +{ yybegin(YYS_EXPR); return (DT_KEY_STRING); } + YY_BREAK +case 66: +YY_RULE_SETUP +#line 217 "dt_lex.l" +{ yybegin(YYS_EXPR); return (DT_KEY_STRUCT); } + YY_BREAK +case 67: +YY_RULE_SETUP +#line 218 "dt_lex.l" +{ yybegin(YYS_EXPR); return (DT_KEY_THIS); } + YY_BREAK +case 68: +YY_RULE_SETUP +#line 219 "dt_lex.l" +{ yybegin(YYS_DEFINE); return (DT_KEY_XLATOR); } + YY_BREAK +case 69: +YY_RULE_SETUP +#line 220 "dt_lex.l" +{ yybegin(YYS_EXPR); return (DT_KEY_TYPEDEF); } + YY_BREAK +case 70: +YY_RULE_SETUP +#line 221 "dt_lex.l" +{ yybegin(YYS_EXPR); return (DT_KEY_UNION); } + YY_BREAK +case 71: +YY_RULE_SETUP +#line 222 "dt_lex.l" +{ yybegin(YYS_EXPR); return (DT_KEY_UNSIGNED); } + YY_BREAK +case 72: +YY_RULE_SETUP +#line 223 "dt_lex.l" +{ yybegin(YYS_EXPR); return (DT_KEY_VOID); } + YY_BREAK +case 73: +YY_RULE_SETUP +#line 224 "dt_lex.l" +{ yybegin(YYS_EXPR); return (DT_KEY_VOLATILE); } + YY_BREAK +case 74: +YY_RULE_SETUP +#line 226 "dt_lex.l" +{ + int i = atoi(yytext + 2); + char *v = ""; + + /* + * A macro argument reference substitutes the text of + * an argument in place of the current token. When we + * see $$<d> we fetch the saved string from pcb_sargv + * (or use the default argument if the option has been + * set and the argument hasn't been specified) and + * return a token corresponding to this string. + */ + if (i < 0 || (i >= yypcb->pcb_sargc && + !(yypcb->pcb_cflags & DTRACE_C_DEFARG))) { + xyerror(D_MACRO_UNDEF, "macro argument %s is " + "not defined\n", yytext); + } + + if (i < yypcb->pcb_sargc) { + v = yypcb->pcb_sargv[i]; /* get val from pcb */ + yypcb->pcb_sflagv[i] |= DT_IDFLG_REF; + } + + if ((yylval.l_str = strdup(v)) == NULL) + longjmp(yypcb->pcb_jmpbuf, EDT_NOMEM); + + (void) stresc2chr(yylval.l_str); + return (DT_TOK_STRING); + } + YY_BREAK +case 75: +YY_RULE_SETUP +#line 256 "dt_lex.l" +{ + int i = atoi(yytext + 1); + char *p, *v = "0"; + + /* + * A macro argument reference substitutes the text of + * one identifier or integer pattern for another. When + * we see $<d> we fetch the saved string from pcb_sargv + * (or use the default argument if the option has been + * set and the argument hasn't been specified) and + * return a token corresponding to this string. + */ + if (i < 0 || (i >= yypcb->pcb_sargc && + !(yypcb->pcb_cflags & DTRACE_C_DEFARG))) { + xyerror(D_MACRO_UNDEF, "macro argument %s is " + "not defined\n", yytext); + } + + if (i < yypcb->pcb_sargc) { + v = yypcb->pcb_sargv[i]; /* get val from pcb */ + yypcb->pcb_sflagv[i] |= DT_IDFLG_REF; + } + + /* + * If the macro text is not a valid integer or ident, + * then we treat it as a string. The string may be + * optionally enclosed in quotes, which we strip. + */ + if (strbadidnum(v)) { + size_t len = strlen(v); + + if (len != 1 && *v == '"' && v[len - 1] == '"') + yylval.l_str = strndup(v + 1, len - 2); + else + yylval.l_str = strndup(v, len); + + if (yylval.l_str == NULL) + longjmp(yypcb->pcb_jmpbuf, EDT_NOMEM); + + (void) stresc2chr(yylval.l_str); + return (DT_TOK_STRING); + } + + /* + * If the macro text is not a string an begins with a + * digit or a +/- sign, process it as an integer token. + */ + if (isdigit(v[0]) || v[0] == '-' || v[0] == '+') { +#ifdef VBOX + int rc; +#endif + if (isdigit(v[0])) + yyintprefix = 0; + else + yyintprefix = *v++; + +#ifndef VBOX + errno = 0; + yylval.l_int = strtoull(v, &p, 0); +#else + rc = RTStrToUInt64Ex(v, &p, 0, &yylval.l_int); +#endif + (void) strncpy(yyintsuffix, p, + sizeof (yyintsuffix)); + yyintdecimal = *v != '0'; + +#ifndef VBOX + if (errno == ERANGE) +#else + if (rc == VWRN_NUMBER_TOO_BIG || rc == VWRN_NEGATIVE_UNSIGNED) +#endif + xyerror(D_MACRO_OFLOW, "macro argument" + " %s constant %s results in integer" + " overflow\n", yytext, v); + + return (DT_TOK_INT); + } + + return (id_or_type(v)); + } + YY_BREAK +case 76: +YY_RULE_SETUP +#line 337 "dt_lex.l" +{ + dt_ident_t *idp = dt_idhash_lookup( + yypcb->pcb_hdl->dt_macros, yytext + 2); + + char s[16]; /* enough for UINT_MAX + \0 */ + + if (idp == NULL) { + xyerror(D_MACRO_UNDEF, "macro variable %s " + "is not defined\n", yytext); + } + + /* + * For the moment, all current macro variables are of + * type id_t (refer to dtrace_update() for details). + */ + (void) snprintf(s, sizeof (s), "%u", idp->di_id); + if ((yylval.l_str = strdup(s)) == NULL) + longjmp(yypcb->pcb_jmpbuf, EDT_NOMEM); + + return (DT_TOK_STRING); + } + YY_BREAK +case 77: +YY_RULE_SETUP +#line 359 "dt_lex.l" +{ + dt_ident_t *idp = dt_idhash_lookup( + yypcb->pcb_hdl->dt_macros, yytext + 1); + + if (idp == NULL) { + xyerror(D_MACRO_UNDEF, "macro variable %s " + "is not defined\n", yytext); + } + + /* + * For the moment, all current macro variables are of + * type id_t (refer to dtrace_update() for details). + */ + yylval.l_int = (intmax_t)(int)idp->di_id; + yyintprefix = 0; + yyintsuffix[0] = '\0'; + yyintdecimal = 1; + + return (DT_TOK_INT); + } + YY_BREAK +case 78: +YY_RULE_SETUP +#line 380 "dt_lex.l" +{ + return (id_or_type(yytext)); + } + YY_BREAK +case 79: +YY_RULE_SETUP +#line 384 "dt_lex.l" +{ + if ((yylval.l_str = strdup(yytext)) == NULL) + longjmp(yypcb->pcb_jmpbuf, EDT_NOMEM); + return (DT_TOK_AGG); + } + YY_BREAK +case 80: +YY_RULE_SETUP +#line 390 "dt_lex.l" +{ + if ((yylval.l_str = strdup("@_")) == NULL) + longjmp(yypcb->pcb_jmpbuf, EDT_NOMEM); + return (DT_TOK_AGG); + } + YY_BREAK +case 81: +#line 397 "dt_lex.l" +case 82: +#line 398 "dt_lex.l" +case 83: +YY_RULE_SETUP +#line 398 "dt_lex.l" +{ + char *p; + +#ifndef VBOX + errno = 0; + yylval.l_int = strtoull(yytext, &p, 0); +#else + int rc = RTStrToUInt64Ex(yytext, &p, 0, &yylval.l_int); +#endif + yyintprefix = 0; + (void) strncpy(yyintsuffix, p, sizeof (yyintsuffix)); + yyintdecimal = yytext[0] != '0'; + +#ifndef VBOX + if (errno == ERANGE) +#else + if (rc == VWRN_NUMBER_TOO_BIG || rc == VWRN_NEGATIVE_UNSIGNED) +#endif + xyerror(D_INT_OFLOW, "constant %s results in " + "integer overflow\n", yytext); + + if (*p != '\0' && strchr("uUlL", *p) == NULL) { + xyerror(D_INT_DIGIT, "constant %s contains " + "invalid digit %c\n", yytext, *p); + } + + if ((YYSTATE) != S3) + return (DT_TOK_INT); + + yypragma = dt_node_link(yypragma, + dt_node_int(yylval.l_int)); + } + YY_BREAK +case 84: +YY_RULE_SETUP +#line 431 "dt_lex.l" +yyerror("floating-point constants are not permitted\n"); + YY_BREAK +/* VBOX changed: +<S0>\"{RGX_STR}$ | +<S3>\"{RGX_STR}$ xyerror(D_STR_NL, "newline encountered in string literal"); + input: */ +case 85: +YY_RULE_SETUP +#line 437 "dt_lex.l" +xyerror(D_STR_NL, "newline encountered in string literal"); + YY_BREAK +case 86: +#line 440 "dt_lex.l" +case 87: +YY_RULE_SETUP +#line 440 "dt_lex.l" +{ + /* + * Quoted string -- convert C escape sequences and + * return the string as a token. + */ + yylval.l_str = strndup(yytext + 1, yyleng - 2); + + if (yylval.l_str == NULL) + longjmp(yypcb->pcb_jmpbuf, EDT_NOMEM); + + (void) stresc2chr(yylval.l_str); + if ((YYSTATE) != S3) + return (DT_TOK_STRING); + + yypragma = dt_node_link(yypragma, + dt_node_string(yylval.l_str)); + } + YY_BREAK +case 88: +YY_RULE_SETUP +#line 458 "dt_lex.l" +xyerror(D_CHR_NL, "newline encountered in character constant"); + YY_BREAK +case 89: +YY_RULE_SETUP +#line 460 "dt_lex.l" +{ + char *s, *p, *q; + size_t nbytes; + + /* + * Character constant -- convert C escape sequences and + * return the character as an integer immediate value. + */ + if (yyleng == 2) + xyerror(D_CHR_NULL, "empty character constant"); + + s = yytext + 1; + yytext[yyleng - 1] = '\0'; + nbytes = stresc2chr(s); + yylval.l_int = 0; + yyintprefix = 0; + yyintsuffix[0] = '\0'; + yyintdecimal = 1; + + if (nbytes > sizeof (yylval.l_int)) { + xyerror(D_CHR_OFLOW, "character constant is " + "too long"); + } +#ifdef _LITTLE_ENDIAN + p = ((char *)&yylval.l_int) + nbytes - 1; + for (q = s; nbytes != 0; nbytes--) + *p-- = *q++; +#else + bcopy(s, ((char *)&yylval.l_int) + + sizeof (yylval.l_int) - nbytes, nbytes); +#endif + return (DT_TOK_INT); + } + YY_BREAK +case 90: +#line 495 "dt_lex.l" +case 91: +YY_RULE_SETUP +#line 495 "dt_lex.l" +{ + yypcb->pcb_cstate = (YYSTATE); + BEGIN(S1); + } + YY_BREAK +case 92: +#line 501 "dt_lex.l" +case 93: +YY_RULE_SETUP +#line 501 "dt_lex.l" +; /* discard any #! lines */ + YY_BREAK +case 94: +#line 504 "dt_lex.l" +case 95: +#line 505 "dt_lex.l" +case 96: +YY_RULE_SETUP +#line 505 "dt_lex.l" +{ + assert(yypragma == NULL); + yypcb->pcb_cstate = (YYSTATE); + BEGIN(S3); + } + YY_BREAK +case 97: +YY_RULE_SETUP +#line 511 "dt_lex.l" +; /* discard */ + YY_BREAK +case 98: +YY_RULE_SETUP +#line 512 "dt_lex.l" +; /* discard */ + YY_BREAK +case 99: +YY_RULE_SETUP +#line 514 "dt_lex.l" +{ + int c, tok; + + /* + * The use of "/" as the predicate delimiter and as the + * integer division symbol requires special lookahead + * to avoid a shift/reduce conflict in the D grammar. + * We look ahead to the next non-whitespace character. + * If we encounter EOF, ";", "{", or "/", then this "/" + * closes the predicate and we return DT_TOK_EPRED. + * If we encounter anything else, it's DT_TOK_DIV. + */ + while ((c = input()) != 0) { + if (strchr("\f\n\r\t\v ", c) == NULL) + break; + } + + if (c == 0 || c == ';' || c == '{' || c == '/') { + if (yypcb->pcb_parens != 0) { + yyerror("closing ) expected in " + "predicate before /\n"); + } + if (yypcb->pcb_brackets != 0) { + yyerror("closing ] expected in " + "predicate before /\n"); + } + tok = DT_TOK_EPRED; + } else + tok = DT_TOK_DIV; + + if (c != EOF) unput(c); + return (tok); + } + YY_BREAK +case 100: +YY_RULE_SETUP +#line 548 "dt_lex.l" +{ + yypcb->pcb_parens++; + return (DT_TOK_LPAR); + } + YY_BREAK +case 101: +YY_RULE_SETUP +#line 553 "dt_lex.l" +{ + if (--yypcb->pcb_parens < 0) + yyerror("extra ) in input stream\n"); + return (DT_TOK_RPAR); + } + YY_BREAK +case 102: +YY_RULE_SETUP +#line 559 "dt_lex.l" +{ + yypcb->pcb_brackets++; + return (DT_TOK_LBRAC); + } + YY_BREAK +case 103: +YY_RULE_SETUP +#line 564 "dt_lex.l" +{ + if (--yypcb->pcb_brackets < 0) + yyerror("extra ] in input stream\n"); + return (DT_TOK_RBRAC); + } + YY_BREAK +case 104: +#line 571 "dt_lex.l" +case 105: +YY_RULE_SETUP +#line 571 "dt_lex.l" +{ + yypcb->pcb_braces++; + return ('{'); + } + YY_BREAK +case 106: +YY_RULE_SETUP +#line 576 "dt_lex.l" +{ + if (--yypcb->pcb_braces < 0) + yyerror("extra } in input stream\n"); + return ('}'); + } + YY_BREAK +case 107: +YY_RULE_SETUP +#line 582 "dt_lex.l" +return (DT_TOK_BOR); + YY_BREAK +case 108: +YY_RULE_SETUP +#line 583 "dt_lex.l" +return (DT_TOK_XOR); + YY_BREAK +case 109: +YY_RULE_SETUP +#line 584 "dt_lex.l" +return (DT_TOK_BAND); + YY_BREAK +case 110: +YY_RULE_SETUP +#line 585 "dt_lex.l" +return (DT_TOK_LAND); + YY_BREAK +case 111: +YY_RULE_SETUP +#line 586 "dt_lex.l" +return (DT_TOK_LXOR); + YY_BREAK +case 112: +YY_RULE_SETUP +#line 587 "dt_lex.l" +return (DT_TOK_LOR); + YY_BREAK +case 113: +YY_RULE_SETUP +#line 588 "dt_lex.l" +return (DT_TOK_EQU); + YY_BREAK +case 114: +YY_RULE_SETUP +#line 589 "dt_lex.l" +return (DT_TOK_NEQ); + YY_BREAK +case 115: +YY_RULE_SETUP +#line 590 "dt_lex.l" +return (DT_TOK_LT); + YY_BREAK +case 116: +YY_RULE_SETUP +#line 591 "dt_lex.l" +return (DT_TOK_LE); + YY_BREAK +case 117: +YY_RULE_SETUP +#line 592 "dt_lex.l" +return (DT_TOK_GT); + YY_BREAK +case 118: +YY_RULE_SETUP +#line 593 "dt_lex.l" +return (DT_TOK_GE); + YY_BREAK +case 119: +YY_RULE_SETUP +#line 594 "dt_lex.l" +return (DT_TOK_LSH); + YY_BREAK +case 120: +YY_RULE_SETUP +#line 595 "dt_lex.l" +return (DT_TOK_RSH); + YY_BREAK +case 121: +YY_RULE_SETUP +#line 596 "dt_lex.l" +return (DT_TOK_ADD); + YY_BREAK +case 122: +YY_RULE_SETUP +#line 597 "dt_lex.l" +return (DT_TOK_SUB); + YY_BREAK +case 123: +YY_RULE_SETUP +#line 598 "dt_lex.l" +return (DT_TOK_MUL); + YY_BREAK +case 124: +YY_RULE_SETUP +#line 599 "dt_lex.l" +return (DT_TOK_MOD); + YY_BREAK +case 125: +YY_RULE_SETUP +#line 600 "dt_lex.l" +return (DT_TOK_BNEG); + YY_BREAK +case 126: +YY_RULE_SETUP +#line 601 "dt_lex.l" +return (DT_TOK_LNEG); + YY_BREAK +case 127: +YY_RULE_SETUP +#line 602 "dt_lex.l" +return (DT_TOK_QUESTION); + YY_BREAK +case 128: +YY_RULE_SETUP +#line 603 "dt_lex.l" +return (DT_TOK_COLON); + YY_BREAK +case 129: +YY_RULE_SETUP +#line 604 "dt_lex.l" +return (DT_TOK_DOT); + YY_BREAK +case 130: +YY_RULE_SETUP +#line 605 "dt_lex.l" +return (DT_TOK_PTR); + YY_BREAK +case 131: +YY_RULE_SETUP +#line 606 "dt_lex.l" +return (DT_TOK_ASGN); + YY_BREAK +case 132: +YY_RULE_SETUP +#line 607 "dt_lex.l" +return (DT_TOK_ADD_EQ); + YY_BREAK +case 133: +YY_RULE_SETUP +#line 608 "dt_lex.l" +return (DT_TOK_SUB_EQ); + YY_BREAK +case 134: +YY_RULE_SETUP +#line 609 "dt_lex.l" +return (DT_TOK_MUL_EQ); + YY_BREAK +case 135: +YY_RULE_SETUP +#line 610 "dt_lex.l" +return (DT_TOK_DIV_EQ); + YY_BREAK +case 136: +YY_RULE_SETUP +#line 611 "dt_lex.l" +return (DT_TOK_MOD_EQ); + YY_BREAK +case 137: +YY_RULE_SETUP +#line 612 "dt_lex.l" +return (DT_TOK_AND_EQ); + YY_BREAK +case 138: +YY_RULE_SETUP +#line 613 "dt_lex.l" +return (DT_TOK_XOR_EQ); + YY_BREAK +case 139: +YY_RULE_SETUP +#line 614 "dt_lex.l" +return (DT_TOK_OR_EQ); + YY_BREAK +case 140: +YY_RULE_SETUP +#line 615 "dt_lex.l" +return (DT_TOK_LSH_EQ); + YY_BREAK +case 141: +YY_RULE_SETUP +#line 616 "dt_lex.l" +return (DT_TOK_RSH_EQ); + YY_BREAK +case 142: +YY_RULE_SETUP +#line 617 "dt_lex.l" +return (DT_TOK_ADDADD); + YY_BREAK +case 143: +YY_RULE_SETUP +#line 618 "dt_lex.l" +return (DT_TOK_SUBSUB); + YY_BREAK +case 144: +YY_RULE_SETUP +#line 619 "dt_lex.l" +return (DT_TOK_ELLIPSIS); + YY_BREAK +case 145: +YY_RULE_SETUP +#line 620 "dt_lex.l" +return (DT_TOK_COMMA); + YY_BREAK +case 146: +YY_RULE_SETUP +#line 621 "dt_lex.l" +return (';'); + YY_BREAK +case 147: +YY_RULE_SETUP +#line 622 "dt_lex.l" +; /* discard */ + YY_BREAK +case 148: +YY_RULE_SETUP +#line 623 "dt_lex.l" +; /* discard */ + YY_BREAK +case 149: +YY_RULE_SETUP +#line 624 "dt_lex.l" +yyerror("syntax error near \"%c\"\n", yytext[0]); + YY_BREAK +case 150: +YY_RULE_SETUP +#line 626 "dt_lex.l" +yyerror("/* encountered inside a comment\n"); + YY_BREAK +case 151: +YY_RULE_SETUP +#line 627 "dt_lex.l" +BEGIN(yypcb->pcb_cstate); + YY_BREAK +/* VBOX - START */ +case YY_STATE_EOF(S1): +#line 629 "dt_lex.l" +yyerror("end-of-file encountered before matching */\n"); + YY_BREAK +/* VBOX - END */ +case 152: +YY_RULE_SETUP +#line 631 "dt_lex.l" +; /* discard */ + YY_BREAK +case 153: +YY_RULE_SETUP +#line 633 "dt_lex.l" +{ + /* + * S2 has an ambiguity because RGX_PSPEC includes '*' + * as a glob character and '*' also can be DT_TOK_STAR. + * Since lex always matches the longest token, this + * rule can be matched by an input string like "int*", + * which could begin a global variable declaration such + * as "int*x;" or could begin a RGX_PSPEC with globbing + * such as "int* { trace(timestamp); }". If C_PSPEC is + * not set, we must resolve the ambiguity in favor of + * the type and perform lexer pushback if the fragment + * before '*' or entire fragment matches a type name. + * If C_PSPEC is set, we always return a PSPEC token. + * If C_PSPEC is off, the user can avoid ambiguity by + * including a ':' delimiter in the specifier, which + * they should be doing anyway to specify the provider. + */ + if (!(yypcb->pcb_cflags & DTRACE_C_PSPEC) && + strchr(yytext, ':') == NULL) { + + char *p = strchr(yytext, '*'); + char *q = yytext + yyleng - 1; + + if (p != NULL && p > yytext) + *p = '\0'; /* prune yytext */ + + if (dt_type_lookup(yytext, NULL) == 0) { + yylval.l_str = strdup(yytext); + + if (yylval.l_str == NULL) { + longjmp(yypcb->pcb_jmpbuf, + EDT_NOMEM); + } + + if (p != NULL && p > yytext) { + for (*p = '*'; q >= p; q--) + unput(*q); + } + + yybegin(YYS_EXPR); + return (DT_TOK_TNAME); + } + + if (p != NULL && p > yytext) + *p = '*'; /* restore yytext */ + } + + if ((yylval.l_str = strdup(yytext)) == NULL) + longjmp(yypcb->pcb_jmpbuf, EDT_NOMEM); + + return (DT_TOK_PSPEC); + } + YY_BREAK +case 154: +YY_RULE_SETUP +#line 686 "dt_lex.l" +return (DT_TOK_DIV); + YY_BREAK +case 155: +YY_RULE_SETUP +#line 687 "dt_lex.l" +return (DT_TOK_COMMA); + YY_BREAK +case 156: +YY_RULE_SETUP +#line 689 "dt_lex.l" +; /* discard */ + YY_BREAK +case 157: +YY_RULE_SETUP +#line 690 "dt_lex.l" +yyerror("syntax error near \"%c\"\n", yytext[0]); + YY_BREAK +case 158: +YY_RULE_SETUP +#line 692 "dt_lex.l" +{ + dt_pragma(yypragma); + yypragma = NULL; + BEGIN(yypcb->pcb_cstate); + } + YY_BREAK +case 159: +YY_RULE_SETUP +#line 698 "dt_lex.l" +; /* discard */ + YY_BREAK +case 160: +YY_RULE_SETUP +#line 700 "dt_lex.l" +{ + dt_node_t *dnp; + + if ((yylval.l_str = strdup(yytext)) == NULL) + longjmp(yypcb->pcb_jmpbuf, EDT_NOMEM); + + /* + * We want to call dt_node_ident() here, but we can't + * because it will expand inlined identifiers, which we + * don't want to do from #pragma context in order to + * support pragmas that apply to the ident itself. We + * call dt_node_string() and then reset dn_op instead. + */ + dnp = dt_node_string(yylval.l_str); + dnp->dn_kind = DT_NODE_IDENT; + dnp->dn_op = DT_TOK_IDENT; + yypragma = dt_node_link(yypragma, dnp); + } + YY_BREAK +/* VBOX - BEGIN */ +case YY_STATE_EOF(S3): +#line 720 "dt_lex.l" +yyerror("end-of-file encountered before end of control line\n"); + YY_BREAK +/* VBOX - END */ +case 161: +YY_RULE_SETUP +#line 722 "dt_lex.l" +yyerror("syntax error near \"%c\"\n", yytext[0]); + YY_BREAK +case 162: +YY_RULE_SETUP +#line 724 "dt_lex.l" +ECHO; + YY_BREAK +#line 2426 "dt_lex.c" + case YY_STATE_EOF(INITIAL): + case YY_STATE_EOF(S0): + case YY_STATE_EOF(S2): + case YY_STATE_EOF(S4): + yyterminate(); + + case YY_END_OF_BUFFER: + { + /* Amount of text matched not including the EOB char. */ + int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1; + + /* Undo the effects of YY_DO_BEFORE_ACTION. */ + *yy_cp = yy_hold_char; + YY_RESTORE_YY_MORE_OFFSET + + if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW ) + { + /* We're scanning a new file or input source. It's + * possible that this happened because the user + * just pointed yyin at a new source and called + * yylex(). If so, then we have to assure + * consistency between yy_current_buffer and our + * globals. Here is the right place to do so, because + * this is the first action (other than possibly a + * back-up) that will match for the new input source. + */ + yy_n_chars = yy_current_buffer->yy_n_chars; + yy_current_buffer->yy_input_file = yyin; + yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL; + } + + /* Note that here we test for yy_c_buf_p "<=" to the position + * of the first EOB in the buffer, since yy_c_buf_p will + * already have been incremented past the NUL character + * (since all states make transitions on EOB to the + * end-of-buffer state). Contrast this with the test + * in input(). + */ + if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] ) + { /* This was really a NUL. */ + yy_state_type yy_next_state; + + yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state(); + + /* Okay, we're now positioned to make the NUL + * transition. We couldn't have + * yy_get_previous_state() go ahead and do it + * for us because it doesn't know how to deal + * with the possibility of jamming (and we don't + * want to build jamming into it because then it + * will run more slowly). + */ + + yy_next_state = yy_try_NUL_trans( yy_current_state ); + + yy_bp = yytext_ptr + YY_MORE_ADJ; + + if ( yy_next_state ) + { + /* Consume the NUL. */ + yy_cp = ++yy_c_buf_p; + yy_current_state = yy_next_state; + goto yy_match; + } + + else + { + yy_cp = yy_c_buf_p; + goto yy_find_action; + } + } + + else switch ( yy_get_next_buffer() ) + { + case EOB_ACT_END_OF_FILE: + { + yy_did_buffer_switch_on_eof = 0; + + if ( yywrap() ) + { + /* Note: because we've taken care in + * yy_get_next_buffer() to have set up + * yytext, we can now set up + * yy_c_buf_p so that if some total + * hoser (like flex itself) wants to + * call the scanner after we return the + * YY_NULL, it'll still work - another + * YY_NULL will get returned. + */ + yy_c_buf_p = yytext_ptr + YY_MORE_ADJ; + + yy_act = YY_STATE_EOF(YY_START); + goto do_action; + } + + else + { + if ( ! yy_did_buffer_switch_on_eof ) + YY_NEW_FILE; + } + break; + } + + case EOB_ACT_CONTINUE_SCAN: + yy_c_buf_p = + yytext_ptr + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state(); + + yy_cp = yy_c_buf_p; + yy_bp = yytext_ptr + YY_MORE_ADJ; + goto yy_match; + + case EOB_ACT_LAST_MATCH: + yy_c_buf_p = + &yy_current_buffer->yy_ch_buf[yy_n_chars]; + + yy_current_state = yy_get_previous_state(); + + yy_cp = yy_c_buf_p; + yy_bp = yytext_ptr + YY_MORE_ADJ; + goto yy_find_action; + } + break; + } + + default: + YY_FATAL_ERROR( + "fatal flex scanner internal error--no action found" ); + } /* end of action switch */ + } /* end of scanning one token */ + } /* end of yylex */ + + +/* yy_get_next_buffer - try to read in a new buffer + * + * Returns a code representing an action: + * EOB_ACT_LAST_MATCH - + * EOB_ACT_CONTINUE_SCAN - continue scanning from current position + * EOB_ACT_END_OF_FILE - end of file + */ + +static int yy_get_next_buffer() + { + register char *dest = yy_current_buffer->yy_ch_buf; + register char *source = yytext_ptr; + register int number_to_move, i; + int ret_val; + + if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] ) + YY_FATAL_ERROR( + "fatal flex scanner internal error--end of buffer missed" ); + + if ( yy_current_buffer->yy_fill_buffer == 0 ) + { /* Don't try to fill the buffer, so this is an EOF. */ + if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 ) + { + /* We matched a single character, the EOB, so + * treat this as a final EOF. + */ + return EOB_ACT_END_OF_FILE; + } + + else + { + /* We matched some text prior to the EOB, first + * process it. + */ + return EOB_ACT_LAST_MATCH; + } + } + + /* Try to read more data. */ + + /* First move last chars to start of buffer. */ + number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1; + + for ( i = 0; i < number_to_move; ++i ) + *(dest++) = *(source++); + + if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING ) + /* don't do the read, it's not guaranteed to return an EOF, + * just force an EOF + */ + yy_current_buffer->yy_n_chars = yy_n_chars = 0; + + else + { + int num_to_read = + yy_current_buffer->yy_buf_size - number_to_move - 1; + + while ( num_to_read <= 0 ) + { /* Not enough room in the buffer - grow it. */ +#ifdef YY_USES_REJECT + YY_FATAL_ERROR( +"input buffer overflow, can't enlarge buffer because scanner uses REJECT" ); +#else + + /* just a shorter name for the current buffer */ + YY_BUFFER_STATE b = yy_current_buffer; + + int yy_c_buf_p_offset = + (int) (yy_c_buf_p - b->yy_ch_buf); + + if ( b->yy_is_our_buffer ) + { + int new_size = b->yy_buf_size * 2; + + if ( new_size <= 0 ) + b->yy_buf_size += b->yy_buf_size / 8; + else + b->yy_buf_size *= 2; + + b->yy_ch_buf = (char *) + /* Include room in for 2 EOB chars. */ + yy_flex_realloc( (void *) b->yy_ch_buf, + b->yy_buf_size + 2 ); + } + else + /* Can't grow it, we don't own it. */ + b->yy_ch_buf = 0; + + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( + "fatal error - scanner input buffer overflow" ); + + yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; + + num_to_read = yy_current_buffer->yy_buf_size - + number_to_move - 1; +#endif + } + + if ( num_to_read > YY_READ_BUF_SIZE ) + num_to_read = YY_READ_BUF_SIZE; + + /* Read in more data. */ + YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]), + yy_n_chars, num_to_read ); + + yy_current_buffer->yy_n_chars = yy_n_chars; + } + + if ( yy_n_chars == 0 ) + { + if ( number_to_move == YY_MORE_ADJ ) + { + ret_val = EOB_ACT_END_OF_FILE; + yyrestart( yyin ); + } + + else + { + ret_val = EOB_ACT_LAST_MATCH; + yy_current_buffer->yy_buffer_status = + YY_BUFFER_EOF_PENDING; + } + } + + else + ret_val = EOB_ACT_CONTINUE_SCAN; + + yy_n_chars += number_to_move; + yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR; + yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; + + yytext_ptr = &yy_current_buffer->yy_ch_buf[0]; + + return ret_val; + } + + +/* yy_get_previous_state - get the state just before the EOB char was reached */ + +static yy_state_type yy_get_previous_state() + { + register yy_state_type yy_current_state; + register char *yy_cp; + + yy_current_state = yy_start; + yy_current_state += YY_AT_BOL(); + yy_state_ptr = yy_state_buf; + *yy_state_ptr++ = yy_current_state; + + for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp ) + { + register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 510 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + *yy_state_ptr++ = yy_current_state; + } + + return yy_current_state; + } + + +/* yy_try_NUL_trans - try to make a transition on the NUL character + * + * synopsis + * next_state = yy_try_NUL_trans( current_state ); + */ + +#ifdef YY_USE_PROTOS +static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state ) +#else +static yy_state_type yy_try_NUL_trans( yy_current_state ) +yy_state_type yy_current_state; +#endif + { + register int yy_is_jam; + + register YY_CHAR yy_c = 1; + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 510 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + yy_is_jam = (yy_current_state == 509); + if ( ! yy_is_jam ) + *yy_state_ptr++ = yy_current_state; + + return yy_is_jam ? 0 : yy_current_state; + } + + +#ifndef YY_NO_UNPUT +#ifdef YY_USE_PROTOS +static void yyunput( int c, register char *yy_bp ) +#else +static void yyunput( c, yy_bp ) +int c; +register char *yy_bp; +#endif + { + register char *yy_cp = yy_c_buf_p; + + /* undo effects of setting up yytext */ + *yy_cp = yy_hold_char; + + if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) + { /* need to shift things up to make room */ + /* +2 for EOB chars. */ + register int number_to_move = yy_n_chars + 2; + register char *dest = &yy_current_buffer->yy_ch_buf[ + yy_current_buffer->yy_buf_size + 2]; + register char *source = + &yy_current_buffer->yy_ch_buf[number_to_move]; + + while ( source > yy_current_buffer->yy_ch_buf ) + *--dest = *--source; + + yy_cp += (int) (dest - source); + yy_bp += (int) (dest - source); + yy_current_buffer->yy_n_chars = + yy_n_chars = yy_current_buffer->yy_buf_size; + + if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) + YY_FATAL_ERROR( "flex scanner push-back overflow" ); + } + + *--yy_cp = (char) c; + + if ( c == '\n' ) + --yylineno; + + yytext_ptr = yy_bp; + yy_hold_char = *yy_cp; + yy_c_buf_p = yy_cp; + } +#endif /* ifndef YY_NO_UNPUT */ + + +#ifdef __cplusplus +static int yyinput() +#else +static int input() +#endif + { + int c; + + *yy_c_buf_p = yy_hold_char; + + if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) + { + /* yy_c_buf_p now points to the character we want to return. + * If this occurs *before* the EOB characters, then it's a + * valid NUL; if not, then we've hit the end of the buffer. + */ + if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] ) + /* This was really a NUL. */ + *yy_c_buf_p = '\0'; + + else + { /* need more input */ + int offset = yy_c_buf_p - yytext_ptr; + ++yy_c_buf_p; + + switch ( yy_get_next_buffer() ) + { + case EOB_ACT_LAST_MATCH: + /* This happens because yy_g_n_b() + * sees that we've accumulated a + * token and flags that we need to + * try matching the token before + * proceeding. But for input(), + * there's no matching to consider. + * So convert the EOB_ACT_LAST_MATCH + * to EOB_ACT_END_OF_FILE. + */ + + /* Reset buffer status. */ + yyrestart( yyin ); + + /* fall through */ + + case EOB_ACT_END_OF_FILE: + { + if ( yywrap() ) + return EOF; + + if ( ! yy_did_buffer_switch_on_eof ) + YY_NEW_FILE; +#ifdef __cplusplus + return yyinput(); +#else + return input(); +#endif + } + + case EOB_ACT_CONTINUE_SCAN: + yy_c_buf_p = yytext_ptr + offset; + break; + } + } + } + + c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */ + *yy_c_buf_p = '\0'; /* preserve yytext */ + yy_hold_char = *++yy_c_buf_p; + + yy_current_buffer->yy_at_bol = (c == '\n'); + if ( yy_current_buffer->yy_at_bol ) + ++yylineno; + + return c; + } + + +#ifdef YY_USE_PROTOS +void yyrestart( FILE *input_file ) +#else +void yyrestart( input_file ) +FILE *input_file; +#endif + { + if ( ! yy_current_buffer ) + yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); + + yy_init_buffer( yy_current_buffer, input_file ); + yy_load_buffer_state(); + } + + +#ifdef YY_USE_PROTOS +void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer ) +#else +void yy_switch_to_buffer( new_buffer ) +YY_BUFFER_STATE new_buffer; +#endif + { + if ( yy_current_buffer == new_buffer ) + return; + + if ( yy_current_buffer ) + { + /* Flush out information for old buffer. */ + *yy_c_buf_p = yy_hold_char; + yy_current_buffer->yy_buf_pos = yy_c_buf_p; + yy_current_buffer->yy_n_chars = yy_n_chars; + } + + yy_current_buffer = new_buffer; + yy_load_buffer_state(); + + /* We don't actually know whether we did this switch during + * EOF (yywrap()) processing, but the only time this flag + * is looked at is after yywrap() is called, so it's safe + * to go ahead and always set it. + */ + yy_did_buffer_switch_on_eof = 1; + } + + +#ifdef YY_USE_PROTOS +void yy_load_buffer_state( void ) +#else +void yy_load_buffer_state() +#endif + { + yy_n_chars = yy_current_buffer->yy_n_chars; + yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos; + yyin = yy_current_buffer->yy_input_file; + yy_hold_char = *yy_c_buf_p; + } + + +#ifdef YY_USE_PROTOS +YY_BUFFER_STATE yy_create_buffer( FILE *file, int size ) +#else +YY_BUFFER_STATE yy_create_buffer( file, size ) +FILE *file; +int size; +#endif + { + YY_BUFFER_STATE b; + + b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); + + b->yy_buf_size = size; + + /* yy_ch_buf has to be 2 characters longer than the size given because + * we need to put in 2 end-of-buffer characters. + */ + b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 ); + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); + + b->yy_is_our_buffer = 1; + + yy_init_buffer( b, file ); + + return b; + } + + +#ifdef YY_USE_PROTOS +void yy_delete_buffer( YY_BUFFER_STATE b ) +#else +void yy_delete_buffer( b ) +YY_BUFFER_STATE b; +#endif + { + if ( ! b ) + return; + + if ( b == yy_current_buffer ) + yy_current_buffer = (YY_BUFFER_STATE) 0; + + if ( b->yy_is_our_buffer ) + yy_flex_free( (void *) b->yy_ch_buf ); + + yy_flex_free( (void *) b ); + } + + +#ifndef YY_ALWAYS_INTERACTIVE +#ifndef YY_NEVER_INTERACTIVE +extern int isatty YY_PROTO(( int )); +#endif +#endif + +#ifdef YY_USE_PROTOS +void yy_init_buffer( YY_BUFFER_STATE b, FILE *file ) +#else +void yy_init_buffer( b, file ) +YY_BUFFER_STATE b; +FILE *file; +#endif + + + { + yy_flush_buffer( b ); + + b->yy_input_file = file; + b->yy_fill_buffer = 1; + +#if YY_ALWAYS_INTERACTIVE + b->yy_is_interactive = 1; +#else +#if YY_NEVER_INTERACTIVE + b->yy_is_interactive = 0; +#else + b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; +#endif +#endif + } + + +#ifdef YY_USE_PROTOS +void yy_flush_buffer( YY_BUFFER_STATE b ) +#else +void yy_flush_buffer( b ) +YY_BUFFER_STATE b; +#endif + + { + if ( ! b ) + return; + + b->yy_n_chars = 0; + + /* We always need two end-of-buffer characters. The first causes + * a transition to the end-of-buffer state. The second causes + * a jam in that state. + */ + b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; + b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; + + b->yy_buf_pos = &b->yy_ch_buf[0]; + + b->yy_at_bol = 1; + b->yy_buffer_status = YY_BUFFER_NEW; + + if ( b == yy_current_buffer ) + yy_load_buffer_state(); + } + + +#ifndef YY_NO_SCAN_BUFFER +#ifdef YY_USE_PROTOS +YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size ) +#else +YY_BUFFER_STATE yy_scan_buffer( base, size ) +char *base; +yy_size_t size; +#endif + { + YY_BUFFER_STATE b; + + if ( size < 2 || + base[size-2] != YY_END_OF_BUFFER_CHAR || + base[size-1] != YY_END_OF_BUFFER_CHAR ) + /* They forgot to leave room for the EOB's. */ + return 0; + + b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); + + b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ + b->yy_buf_pos = b->yy_ch_buf = base; + b->yy_is_our_buffer = 0; + b->yy_input_file = 0; + b->yy_n_chars = b->yy_buf_size; + b->yy_is_interactive = 0; + b->yy_at_bol = 1; + b->yy_fill_buffer = 0; + b->yy_buffer_status = YY_BUFFER_NEW; + + yy_switch_to_buffer( b ); + + return b; + } +#endif + + +#ifndef YY_NO_SCAN_STRING +#ifdef YY_USE_PROTOS +YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str ) +#else +YY_BUFFER_STATE yy_scan_string( yy_str ) +yyconst char *yy_str; +#endif + { + int len; + for ( len = 0; yy_str[len]; ++len ) + ; + + return yy_scan_bytes( yy_str, len ); + } +#endif + + +#ifndef YY_NO_SCAN_BYTES +#ifdef YY_USE_PROTOS +YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len ) +#else +YY_BUFFER_STATE yy_scan_bytes( bytes, len ) +yyconst char *bytes; +int len; +#endif + { + YY_BUFFER_STATE b; + char *buf; + yy_size_t n; + int i; + + /* Get memory for full buffer, including space for trailing EOB's. */ + n = len + 2; + buf = (char *) yy_flex_alloc( n ); + if ( ! buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); + + for ( i = 0; i < len; ++i ) + buf[i] = bytes[i]; + + buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR; + + b = yy_scan_buffer( buf, n ); + if ( ! b ) + YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); + + /* It's okay to grow etc. this buffer, and we should throw it + * away when we're done. + */ + b->yy_is_our_buffer = 1; + + return b; + } +#endif + + +#ifndef YY_NO_PUSH_STATE +#ifdef YY_USE_PROTOS +static void yy_push_state( int new_state ) +#else +static void yy_push_state( new_state ) +int new_state; +#endif + { + if ( yy_start_stack_ptr >= yy_start_stack_depth ) + { + yy_size_t new_size; + + yy_start_stack_depth += YY_START_STACK_INCR; + new_size = yy_start_stack_depth * sizeof( int ); + + if ( ! yy_start_stack ) + yy_start_stack = (int *) yy_flex_alloc( new_size ); + + else + yy_start_stack = (int *) yy_flex_realloc( + (void *) yy_start_stack, new_size ); + + if ( ! yy_start_stack ) + YY_FATAL_ERROR( + "out of memory expanding start-condition stack" ); + } + + yy_start_stack[yy_start_stack_ptr++] = YY_START; + + BEGIN(new_state); + } +#endif + + +#ifndef YY_NO_POP_STATE +static void yy_pop_state() + { + if ( --yy_start_stack_ptr < 0 ) + YY_FATAL_ERROR( "start-condition stack underflow" ); + + BEGIN(yy_start_stack[yy_start_stack_ptr]); + } +#endif + + +#ifndef YY_NO_TOP_STATE +static int yy_top_state() + { + return yy_start_stack[yy_start_stack_ptr - 1]; + } +#endif + +#ifndef YY_EXIT_FAILURE +#define YY_EXIT_FAILURE 2 +#endif + +#ifdef YY_USE_PROTOS +static void yy_fatal_error( yyconst char msg[] ) +#else +static void yy_fatal_error( msg ) +char msg[]; +#endif + { + (void) fprintf( stderr, "%s\n", msg ); + exit( YY_EXIT_FAILURE ); + } + + + +/* Redefine yyless() so it works in section 3 code. */ + +#undef yyless +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up yytext. */ \ + yytext[yyleng] = yy_hold_char; \ + yy_c_buf_p = yytext + n; \ + yy_hold_char = *yy_c_buf_p; \ + *yy_c_buf_p = '\0'; \ + yyleng = n; \ + } \ + while ( 0 ) + + +/* Internal utility routines. */ + +#ifndef yytext_ptr +#ifdef YY_USE_PROTOS +static void yy_flex_strncpy( char *s1, yyconst char *s2, int n ) +#else +static void yy_flex_strncpy( s1, s2, n ) +char *s1; +yyconst char *s2; +int n; +#endif + { + register int i; + for ( i = 0; i < n; ++i ) + s1[i] = s2[i]; + } +#endif + +#ifdef YY_NEED_STRLEN +#ifdef YY_USE_PROTOS +static int yy_flex_strlen( yyconst char *s ) +#else +static int yy_flex_strlen( s ) +yyconst char *s; +#endif + { + register int n; + for ( n = 0; s[n]; ++n ) + ; + + return n; + } +#endif + + +#ifdef YY_USE_PROTOS +static void *yy_flex_alloc( yy_size_t size ) +#else +static void *yy_flex_alloc( size ) +yy_size_t size; +#endif + { + return (void *) malloc( size ); + } + +#ifdef YY_USE_PROTOS +static void *yy_flex_realloc( void *ptr, yy_size_t size ) +#else +static void *yy_flex_realloc( ptr, size ) +void *ptr; +yy_size_t size; +#endif + { + /* The cast to (char *) in the following accommodates both + * implementations that use char* generic pointers, and those + * that use void* generic pointers. It works with the latter + * because both ANSI C and C++ allow castless assignment from + * any pointer type to void*, and deal with argument conversions + * as though doing an assignment. + */ + return (void *) realloc( (char *) ptr, size ); + } + +#ifdef YY_USE_PROTOS +static void yy_flex_free( void *ptr ) +#else +static void yy_flex_free( ptr ) +void *ptr; +#endif + { + free( ptr ); + } + +#if YY_MAIN +int main() + { + yylex(); + return 0; + } +#endif +#line 724 "dt_lex.l" + + +/* + * yybegin provides a wrapper for use from C code around the lex BEGIN() macro. + * We use two main states for lexing because probe descriptions use a syntax + * that is incompatible with the normal D tokens (e.g. names can contain "-"). + * yybegin also handles the job of switching between two lists of dt_nodes + * as we allocate persistent definitions, like inlines, and transient nodes + * that will be freed once we are done parsing the current program file. + */ +void +yybegin(yystate_t state) +{ +#if YYDEBUG /* VBOX: ifdef YYDEBUG => if YYDEBUG */ + yydebug = _dtrace_debug; +#endif + if (yypcb->pcb_yystate == state) + return; /* nothing to do if we're in the state already */ + + if (yypcb->pcb_yystate == YYS_DEFINE) { + yypcb->pcb_list = yypcb->pcb_hold; + yypcb->pcb_hold = NULL; + } + + switch (state) { + case YYS_CLAUSE: + BEGIN(S2); + break; + case YYS_DEFINE: + assert(yypcb->pcb_hold == NULL); + yypcb->pcb_hold = yypcb->pcb_list; + yypcb->pcb_list = NULL; + /*FALLTHRU*/ + case YYS_EXPR: + BEGIN(S0); + break; + case YYS_DONE: + break; + case YYS_CONTROL: + BEGIN(S4); + break; + default: + xyerror(D_UNKNOWN, "internal error -- bad yystate %d\n", state); + } + + yypcb->pcb_yystate = state; +} + +void +yyinit(dt_pcb_t *pcb) +{ + yypcb = pcb; + yylineno = 1; + yypragma = NULL; +#ifndef USING_FLEX + yysptr = yysbuf; +#else + yy_switch_to_buffer(yy_create_buffer(yyin, YY_BUF_SIZE)); +#endif +} + +/* + * Given a lexeme 's' (typically yytext), set yylval and return an appropriate + * token to the parser indicating either an identifier or a typedef name. + * User-defined global variables always take precedence over types, but we do + * use some heuristics because D programs can look at an ever-changing set of + * kernel types and also can implicitly instantiate variables by assignment, + * unlike in C. The code here is ordered carefully as lookups are not cheap. + */ +static int +id_or_type(const char *s) +{ + dtrace_hdl_t *dtp = yypcb->pcb_hdl; + dt_decl_t *ddp = yypcb->pcb_dstack.ds_decl; + int c0, c1, ttok = DT_TOK_TNAME; + dt_ident_t *idp; + + if ((s = yylval.l_str = strdup(s)) == NULL) + longjmp(yypcb->pcb_jmpbuf, EDT_NOMEM); + + /* + * If the lexeme is a global variable or likely identifier or *not* a + * type_name, then it is an identifier token. + */ + if (dt_idstack_lookup(&yypcb->pcb_globals, s) != NULL || + dt_idhash_lookup(yypcb->pcb_idents, s) != NULL || + dt_type_lookup(s, NULL) != 0) + return (DT_TOK_IDENT); + + /* + * If we're in the midst of parsing a declaration and a type_specifier + * has already been shifted, then return DT_TOK_IDENT instead of TNAME. + * This semantic is necessary to permit valid ISO C code such as: + * + * typedef int foo; + * struct s { foo foo; }; + * + * without causing shift/reduce conflicts in the direct_declarator part + * of the grammar. The result is that we must check for conflicting + * redeclarations of the same identifier as part of dt_node_decl(). + */ + if (ddp != NULL && ddp->dd_name != NULL) + return (DT_TOK_IDENT); + + /* + * If the lexeme is a type name and we are not in a program clause, + * then always interpret it as a type and return DT_TOK_TNAME. + */ + if ((YYSTATE) != S0) + return (DT_TOK_TNAME); + + /* + * If the lexeme matches a type name but is in a program clause, then + * it could be a type or it could be an undefined variable. Peek at + * the next token to decide. If we see ++, --, [, or =, we know there + * might be an assignment that is trying to create a global variable, + * so we optimistically return DT_TOK_IDENT. There is no harm in being + * wrong: a type_name followed by ++, --, [, or = is a syntax error. + */ + while ((c0 = input()) != 0) { + if (strchr("\f\n\r\t\v ", c0) == NULL) + break; + } + + switch (c0) { + case '+': + case '-': + if ((c1 = input()) == c0) + ttok = DT_TOK_IDENT; + if (c1 != EOF) unput(c1); + break; + + case '=': + if ((c1 = input()) != c0) + ttok = DT_TOK_IDENT; + if (c1 != EOF) unput(c1); + break; + case '[': + ttok = DT_TOK_IDENT; + break; + } + + if (ttok == DT_TOK_IDENT) { + idp = dt_idhash_insert(yypcb->pcb_idents, s, DT_IDENT_SCALAR, 0, + 0, _dtrace_defattr, 0, &dt_idops_thaw, NULL, dtp->dt_gen); + + if (idp == NULL) + longjmp(yypcb->pcb_jmpbuf, EDT_NOMEM); + } + + if (c0 != EOF) unput(c0); + return (ttok); +} + +#ifndef USING_FLEX + +static int +input(void) +{ + int c; + + if (yysptr > yysbuf) + c = *--yysptr; + else if (yypcb->pcb_fileptr != NULL) + c = fgetc(yypcb->pcb_fileptr); + else if (yypcb->pcb_strptr < yypcb->pcb_string + yypcb->pcb_strlen) + c = *(unsigned char *)(yypcb->pcb_strptr++); + else + c = EOF; + + if (c == '\n') + yylineno++; + + if (c != EOF) + return (c); + + if ((YYSTATE) == S1) + yyerror("end-of-file encountered before matching */\n"); + + if ((YYSTATE) == S3) + yyerror("end-of-file encountered before end of control line\n"); + + if (yypcb->pcb_fileptr != NULL && ferror(yypcb->pcb_fileptr)) + longjmp(yypcb->pcb_jmpbuf, EDT_FIO); + + return (0); /* EOF */ +} + +static void +unput(int c) +{ + if (c == '\n') + yylineno--; + + *yysptr++ = c; + yytchar = c; +} + +#endif /* USING_FLEX */ |