/* A Bison parser, made by GNU Bison 2.3. */ /* 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 2, 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, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* 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.3" /* Skeleton name. */#define YYSKELETON_NAME "yacc.c" /* Pure parsers. */#define YYPURE 0 /* Using locations. */#define YYLSP_NEEDED 0 /* Tokens. */#ifndef YYTOKENTYPE# define YYTOKENTYPE /* Put the tokens into the symbol table, so that GDB and other debuggers know about them. */ enum yytokentype { EXPR = 258, CTXT = 259, SCRIPT = 260, CASEXP = 261, OF = 262, DATA = 263, TYPE = 264, IF = 265, THEN = 266, ELSE = 267, WHERE = 268, LET = 269, IN = 270, INFIXN = 271, INFIXL = 272, INFIXR = 273, PRIMITIVE = 274, TNEWTYPE = 275, DEFAULT = 276, DERIVING = 277, DO = 278, TCLASS = 279, TINSTANCE = 280, MDO = 281, REPEAT = 282, ALL = 283, NUMLIT = 284, CHARLIT = 285, STRINGLIT = 286, VAROP = 287, VARID = 288, CONOP = 289, CONID = 290, QVAROP = 291, QVARID = 292, QCONOP = 293, QCONID = 294, RECSELID = 295, IPVARID = 296, COCO = 297, UPTO = 298, FROM = 299, ARROW = 300, IMPLIES = 301, TMODULE = 302, IMPORT = 303, HIDING = 304, QUALIFIED = 305, ASMOD = 306, NEEDPRIMS = 307, FOREIGN = 308 };#endif/* Tokens. */#define EXPR 258#define CTXT 259#define SCRIPT 260#define CASEXP 261#define OF 262#define DATA 263#define TYPE 264#define IF 265#define THEN 266#define ELSE 267#define WHERE 268#define LET 269#define IN 270#define INFIXN 271#define INFIXL 272#define INFIXR 273#define PRIMITIVE 274#define TNEWTYPE 275#define DEFAULT 276#define DERIVING 277#define DO 278#define TCLASS 279#define TINSTANCE 280#define MDO 281#define REPEAT 282#define ALL 283#define NUMLIT 284#define CHARLIT 285#define STRINGLIT 286#define VAROP 287#define VARID 288#define CONOP 289#define CONID 290#define QVAROP 291#define QVARID 292#define QCONOP 293#define QCONID 294#define RECSELID 295#define IPVARID 296#define COCO 297#define UPTO 298#define FROM 299#define ARROW 300#define IMPLIES 301#define TMODULE 302#define IMPORT 303#define HIDING 304#define QUALIFIED 305#define ASMOD 306#define NEEDPRIMS 307#define FOREIGN 308 /* Copy the first part of user declarations. */#line 17 "parser.y" #ifndef lint#define lint#endif#define defTycon(n,l,lhs,rhs,w) tyconDefn(intOf(l),lhs,rhs,w); sp-=n#define sigdecl(l,vs,t) ap(SIGDECL,triple(l,vs,t))#define fixdecl(l,ops,a,p) ap(FIXDECL,\ triple(l,ops,mkInt(mkSyntax(a,intOf(p)))))#define grded(gs) ap(GUARDED,gs)#define bang(t) ap(BANG,t)#define only(t) ap(ONLY,t)#define letrec(bs,e) (nonNull(bs) ? ap(LETREC,pair(bs,e)) : e)#define qualify(ps,t) (nonNull(ps) ? ap(QUAL,pair(ps,t)) : t)#define exportSelf() singleton(ap(MODULEENT,mkCon(module(currentModule).text)))#define yyerror(s) /* errors handled elsewhere */#define YYSTYPE Cell #ifdef YYBISON# if !defined(__GNUC__) || __GNUC__ <= 1static void __yy_memcpy Args((char*,char*, unsigned int));# endif#endif #ifdef _MANAGEDstatic void yymemcpy (char *yyto, const char *yyfrom, size_t yycount);#endif static Cell local gcShadow Args((Int,Cell));static Void local syntaxError Args((String));static String local unexpected Args((Void));static Cell local checkPrec Args((Cell));static Cell local buildTuple Args((List));static List local checkCtxt Args((List));static Cell local checkPred Args((Cell));static Pair local checkDo Args((List));static Cell local checkTyLhs Args((Cell));static Cell local checkConstr Args((Cell)); #if MUDOstatic Pair local checkMDo Args((List));#endif #if !TREXstatic Void local noTREX Args((String));#endif#if !IPARAMstatic Void local noIP Args((String));#endif#if !MUDOstatic Void local noMDo Args((String));#endif /* For the purposes of reasonably portable garbage collection, it is * necessary to simulate the YACC stack on the Hugs stack to keep * track of all intermediate constructs. The lexical analyser * pushes a token onto the stack for each token that is found, with * these elements being removed as reduce actions are performed, * taking account of look-ahead tokens as described by gcShadow() * below. * * Of the non-terminals used below, only start, topDecl & begin * do not leave any values on the Hugs stack. The same is true for the * terminals EXPR and SCRIPT. At the end of a successful parse, there * should only be one element left on the stack, containing the result * of the parse. */ #define gc0(e) gcShadow(0,e)#define gc1(e) gcShadow(1,e)#define gc2(e) gcShadow(2,e)#define gc3(e) gcShadow(3,e)#define gc4(e) gcShadow(4,e)#define gc5(e) gcShadow(5,e)#define gc6(e) gcShadow(6,e)#define gc7(e) gcShadow(7,e) /* 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 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLAREDtypedef int YYSTYPE;# define yystype YYSTYPE /* obsolescent; will be withdrawn */# define YYSTYPE_IS_DECLARED 1# define YYSTYPE_IS_TRIVIAL 1#endif /* Copy the second part of user declarations. */ /* Line 216 of yacc.c. */#line 290 "y.tab.c" #ifdef short# undef short#endif #ifdef YYTYPE_UINT8typedef YYTYPE_UINT8 yytype_uint8;#elsetypedef unsigned char yytype_uint8;#endif #ifdef YYTYPE_INT8typedef YYTYPE_INT8 yytype_int8;#elif (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER)typedef signed char yytype_int8;#elsetypedef short int yytype_int8;#endif #ifdef YYTYPE_UINT16typedef YYTYPE_UINT16 yytype_uint16;#elsetypedef unsigned short int yytype_uint16;#endif #ifdef YYTYPE_INT16typedef YYTYPE_INT16 yytype_int16;#elsetypedef 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 intYYID (int i)#elsestatic intYYID (i) int i;#endif{ return i;}#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; YYSTYPE yyvs; }; /* 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) \ do \ { \ YYSIZE_T yynewbytes; \ YYCOPY (&yyptr->Stack, Stack, yysize); \ Stack = &yyptr->Stack; \ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ yyptr += yynewbytes / sizeof (*yyptr); \ } \ while (YYID (0)) #endif Lines 1–500 of 6089. Load more
/* A Bison parser, made by GNU Bison 2.3. */ /* 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 2, 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, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* 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.3" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" /* Pure parsers. */ #define YYPURE 0 /* Using locations. */ #define YYLSP_NEEDED 0 /* Tokens. */ #ifndef YYTOKENTYPE # define YYTOKENTYPE /* Put the tokens into the symbol table, so that GDB and other debuggers know about them. */ enum yytokentype { EXPR = 258, CTXT = 259, SCRIPT = 260, CASEXP = 261, OF = 262, DATA = 263, TYPE = 264, IF = 265, THEN = 266, ELSE = 267, WHERE = 268, LET = 269, IN = 270, INFIXN = 271, INFIXL = 272, INFIXR = 273, PRIMITIVE = 274, TNEWTYPE = 275, DEFAULT = 276, DERIVING = 277, DO = 278, TCLASS = 279, TINSTANCE = 280, MDO = 281, REPEAT = 282, ALL = 283, NUMLIT = 284, CHARLIT = 285, STRINGLIT = 286, VAROP = 287, VARID = 288, CONOP = 289, CONID = 290, QVAROP = 291, QVARID = 292, QCONOP = 293, QCONID = 294, RECSELID = 295, IPVARID = 296, COCO = 297, UPTO = 298, FROM = 299, ARROW = 300, IMPLIES = 301, TMODULE = 302, IMPORT = 303, HIDING = 304, QUALIFIED = 305, ASMOD = 306, NEEDPRIMS = 307, FOREIGN = 308 }; #endif /* Tokens. */ #define EXPR 258 #define CTXT 259 #define SCRIPT 260 #define CASEXP 261 #define OF 262 #define DATA 263 #define TYPE 264 #define IF 265 #define THEN 266 #define ELSE 267 #define WHERE 268 #define LET 269 #define IN 270 #define INFIXN 271 #define INFIXL 272 #define INFIXR 273 #define PRIMITIVE 274 #define TNEWTYPE 275 #define DEFAULT 276 #define DERIVING 277 #define DO 278 #define TCLASS 279 #define TINSTANCE 280 #define MDO 281 #define REPEAT 282 #define ALL 283 #define NUMLIT 284 #define CHARLIT 285 #define STRINGLIT 286 #define VAROP 287 #define VARID 288 #define CONOP 289 #define CONID 290 #define QVAROP 291 #define QVARID 292 #define QCONOP 293 #define QCONID 294 #define RECSELID 295 #define IPVARID 296 #define COCO 297 #define UPTO 298 #define FROM 299 #define ARROW 300 #define IMPLIES 301 #define TMODULE 302 #define IMPORT 303 #define HIDING 304 #define QUALIFIED 305 #define ASMOD 306 #define NEEDPRIMS 307 #define FOREIGN 308 /* Copy the first part of user declarations. */ #line 17 "parser.y" #ifndef lint #define lint #endif #define defTycon(n,l,lhs,rhs,w) tyconDefn(intOf(l),lhs,rhs,w); sp-=n #define sigdecl(l,vs,t) ap(SIGDECL,triple(l,vs,t)) #define fixdecl(l,ops,a,p) ap(FIXDECL,\ triple(l,ops,mkInt(mkSyntax(a,intOf(p))))) #define grded(gs) ap(GUARDED,gs) #define bang(t) ap(BANG,t) #define only(t) ap(ONLY,t) #define letrec(bs,e) (nonNull(bs) ? ap(LETREC,pair(bs,e)) : e) #define qualify(ps,t) (nonNull(ps) ? ap(QUAL,pair(ps,t)) : t) #define exportSelf() singleton(ap(MODULEENT,mkCon(module(currentModule).text))) #define yyerror(s) /* errors handled elsewhere */ #define YYSTYPE Cell #ifdef YYBISON # if !defined(__GNUC__) || __GNUC__ <= 1 static void __yy_memcpy Args((char*,char*, unsigned int)); # endif #endif #ifdef _MANAGED static void yymemcpy (char *yyto, const char *yyfrom, size_t yycount); #endif static Cell local gcShadow Args((Int,Cell)); static Void local syntaxError Args((String)); static String local unexpected Args((Void)); static Cell local checkPrec Args((Cell)); static Cell local buildTuple Args((List)); static List local checkCtxt Args((List)); static Cell local checkPred Args((Cell)); static Pair local checkDo Args((List)); static Cell local checkTyLhs Args((Cell)); static Cell local checkConstr Args((Cell)); #if MUDO static Pair local checkMDo Args((List)); #endif #if !TREX static Void local noTREX Args((String)); #endif #if !IPARAM static Void local noIP Args((String)); #endif #if !MUDO static Void local noMDo Args((String)); #endif /* For the purposes of reasonably portable garbage collection, it is * necessary to simulate the YACC stack on the Hugs stack to keep * track of all intermediate constructs. The lexical analyser * pushes a token onto the stack for each token that is found, with * these elements being removed as reduce actions are performed, * taking account of look-ahead tokens as described by gcShadow() * below. * * Of the non-terminals used below, only start, topDecl & begin * do not leave any values on the Hugs stack. The same is true for the * terminals EXPR and SCRIPT. At the end of a successful parse, there * should only be one element left on the stack, containing the result * of the parse. */ #define gc0(e) gcShadow(0,e) #define gc1(e) gcShadow(1,e) #define gc2(e) gcShadow(2,e) #define gc3(e) gcShadow(3,e) #define gc4(e) gcShadow(4,e) #define gc5(e) gcShadow(5,e) #define gc6(e) gcShadow(6,e) #define gc7(e) gcShadow(7,e) /* 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 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED typedef int YYSTYPE; # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 # define YYSTYPE_IS_TRIVIAL 1 #endif /* Copy the second part of user declarations. */ /* Line 216 of yacc.c. */ #line 290 "y.tab.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 i) #else static int YYID (i) int i; #endif { return i; } #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; YYSTYPE yyvs; }; /* 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) \ do \ { \ YYSIZE_T yynewbytes; \ YYCOPY (&yyptr->Stack, Stack, yysize); \ Stack = &yyptr->Stack; \ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ yyptr += yynewbytes / sizeof (*yyptr); \ } \ while (YYID (0)) #endif