/* A Bison parser, made by GNU Bison 1.875. */ /* Skeleton parser for Yacc-like parsing with Bison, Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* As a special exception, when this file is copied by Bison into a Bison output file, you may use that output file without restriction. This special exception was added by the Free Software Foundation in version 1.24 of Bison. */ /* 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 /* 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 { _BANG_t = 258, _BANG_EQUALS_t = 259, _AMPER_t = 260, _AMPERAMPER_t = 261, _LPAREN_t = 262, _RPAREN_t = 263, _PLUS_EQUALS_t = 264, _COLON_t = 265, _SEMIC_t = 266, _LANGLE_t = 267, _LANGLE_EQUALS_t = 268, _EQUALS_t = 269, _RANGLE_t = 270, _RANGLE_EQUALS_t = 271, _QUESTION_EQUALS_t = 272, _LBRACKET_t = 273, _RBRACKET_t = 274, ACTIONS_t = 275, BIND_t = 276, BREAK_t = 277, CASE_t = 278, CONTINUE_t = 279, DEFAULT_t = 280, ELSE_t = 281, EXISTING_t = 282, FOR_t = 283, IF_t = 284, IGNORE_t = 285, IN_t = 286, INCLUDE_t = 287, LOCAL_t = 288, MAXLINE_t = 289, ON_t = 290, PIECEMEAL_t = 291, QUIETLY_t = 292, RETURN_t = 293, RULE_t = 294, SWITCH_t = 295, TOGETHER_t = 296, UPDATED_t = 297, WHILE_t = 298, _LBRACE_t = 299, _BAR_t = 300, _BARBAR_t = 301, _RBRACE_t = 302, ARG = 303, STRING = 304 }; #endif #define _BANG_t 258 #define _BANG_EQUALS_t 259 #define _AMPER_t 260 #define _AMPERAMPER_t 261 #define _LPAREN_t 262 #define _RPAREN_t 263 #define _PLUS_EQUALS_t 264 #define _COLON_t 265 #define _SEMIC_t 266 #define _LANGLE_t 267 #define _LANGLE_EQUALS_t 268 #define _EQUALS_t 269 #define _RANGLE_t 270 #define _RANGLE_EQUALS_t 271 #define _QUESTION_EQUALS_t 272 #define _LBRACKET_t 273 #define _RBRACKET_t 274 #define ACTIONS_t 275 #define BIND_t 276 #define BREAK_t 277 #define CASE_t 278 #define CONTINUE_t 279 #define DEFAULT_t 280 #define ELSE_t 281 #define EXISTING_t 282 #define FOR_t 283 #define IF_t 284 #define IGNORE_t 285 #define IN_t 286 #define INCLUDE_t 287 #define LOCAL_t 288 #define MAXLINE_t 289 #define ON_t 290 #define PIECEMEAL_t 291 #define QUIETLY_t 292 #define RETURN_t 293 #define RULE_t 294 #define SWITCH_t 295 #define TOGETHER_t 296 #define UPDATED_t 297 #define WHILE_t 298 #define _LBRACE_t 299 #define _BAR_t 300 #define _BARBAR_t 301 #define _RBRACE_t 302 #define ARG 303 #define STRING 304 /* Copy the first part of user declarations. */ #line 84 "jamgram.y" #include "jam.h" #include "lists.h" #include "variable.h" #include "parse.h" #include "scan.h" #include "compile.h" #include "newstr.h" #include "rules.h" # define YYMAXDEPTH 10000 /* for OSF and other less endowed yaccs */ # define F0 (LIST *(*)(PARSE *, LOL *, int *))0 # define P0 (PARSE *)0 # define S0 (char *)0 # define pappend( l,r ) parse_make( compile_append,l,r,P0,S0,S0,0 ) # define pbreak( l,f ) parse_make( compile_break,l,P0,P0,S0,S0,f ) # define peval( c,l,r ) parse_make( compile_eval,l,r,P0,S0,S0,c ) # define pfor( s,l,r ) parse_make( compile_foreach,l,r,P0,s,S0,0 ) # define pif( l,r,t ) parse_make( compile_if,l,r,t,S0,S0,0 ) # define pincl( l ) parse_make( compile_include,l,P0,P0,S0,S0,0 ) # define plist( s ) parse_make( compile_list,P0,P0,P0,s,S0,0 ) # define plocal( l,r,t ) parse_make( compile_local,l,r,t,S0,S0,0 ) # define pnull() parse_make( compile_null,P0,P0,P0,S0,S0,0 ) # define pon( l,r ) parse_make( compile_on,l,r,P0,S0,S0,0 ) # define prule( a,p ) parse_make( compile_rule,a,p,P0,S0,S0,0 ) # define prules( l,r ) parse_make( compile_rules,l,r,P0,S0,S0,0 ) # define pset( l,r,a ) parse_make( compile_set,l,r,P0,S0,S0,a ) # define pset1( l,r,t,a ) parse_make( compile_settings,l,r,t,S0,S0,a ) # define psetc( s,l,r ) parse_make( compile_setcomp,l,r,P0,s,S0,0 ) # define psete( s,l,s1,f ) parse_make( compile_setexec,l,P0,P0,s,s1,f ) # define pswitch( l,r ) parse_make( compile_switch,l,r,P0,S0,S0,0 ) # define pwhile( l,r ) parse_make( compile_while,l,r,P0,S0,S0,0 ) # define pnode( l,r ) parse_make( F0,l,r,P0,S0,S0,0 ) # define psnode( s,l ) parse_make( F0,l,P0,P0,s,S0,0 ) /* 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 #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 214 of yacc.c. */ #line 225 "jamgram.c" #if ! defined (yyoverflow) || YYERROR_VERBOSE /* The parser invokes alloca or malloc; define the necessary symbols. */ # if YYSTACK_USE_ALLOCA # define YYSTACK_ALLOC alloca # else # ifndef YYSTACK_USE_ALLOCA # if defined (alloca) || defined (_ALLOCA_H) # define YYSTACK_ALLOC alloca # else # ifdef __GNUC__ # define YYSTACK_ALLOC __builtin_alloca # endif # endif # endif # endif # ifdef YYSTACK_ALLOC /* Pacify GCC's `empty if-body' warning. */ # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) # else # if defined (__STDC__) || defined (__cplusplus) # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ # define YYSIZE_T size_t # endif # define YYSTACK_ALLOC malloc # define YYSTACK_FREE free # endif #endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */ #if (! defined (yyoverflow) \ && (! defined (__cplusplus) \ || (YYSTYPE_IS_TRIVIAL))) /* A type that is properly aligned for any stack member. */ union yyalloc { short 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 (short) + sizeof (YYSTYPE)) \ + YYSTACK_GAP_MAXIMUM) /* Copy COUNT objects from FROM to TO. The source and destination do not overlap. */ # ifndef YYCOPY # if 1 < __GNUC__ # define YYCOPY(To, From, Count) \ __builtin_memcpy (To, From, (Count) * sizeof (*(From))) # else # define YYCOPY(To, From, Count) \ do \ { \ register YYSIZE_T yyi; \ for (yyi = 0; yyi < (Count); yyi++) \ (To)[yyi] = (From)[yyi]; \ } \ while (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 (0) #endif #if defined (__STDC__) || defined (__cplusplus) typedef signed char yysigned_char; #else typedef short yysigned_char; #endif /* YYFINAL -- State number of the termination state. */ #define YYFINAL 39 /* YYLAST -- Last index in YYTABLE. */ #define YYLAST 255 /* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 50 /* YYNNTS -- Number of nonterminals. */ #define YYNNTS 21 /* YYNRULES -- Number of rules. */ #define YYNRULES 73 /* YYNRULES -- Number of states. */ #define YYNSTATES 154 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ #define YYUNDEFTOK 2 #define YYMAXUTOK 304 #define YYTRANSLATE(YYX) \ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ static const unsigned char 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, 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, 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 }; #if YYDEBUG /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in YYRHS. */ static const unsigned char yyprhs[] = { 0, 0, 3, 4, 6, 7, 9, 11, 14, 19, 26, 30, 34, 38, 43, 50, 54, 58, 62, 70, 76, 82, 90, 96, 103, 107, 108, 109, 119, 121, 123, 125, 128, 130, 134, 138, 142, 146, 150, 154, 158, 162, 166, 170, 174, 177, 181, 182, 185, 190, 191, 195, 197, 199, 203, 205, 206, 209, 211, 212, 217, 220, 225, 230, 231, 234, 236, 238, 240, 242, 244, 246, 249, 250 }; /* YYRHS -- A `-1'-separated list of the rules' RHS. */ static const yysigned_char yyrhs[] = { 51, 0, -1, -1, 53, -1, -1, 53, -1, 54, -1, 54, 53, -1, 33, 63, 11, 52, -1, 33, 63, 14, 63, 11, 52, -1, 44, 52, 47, -1, 32, 63, 11, -1, 65, 62, 11, -1, 65, 57, 63, 11, -1, 65, 35, 63, 57, 63, 11, -1, 22, 63, 11, -1, 24, 63, 11, -1, 38, 63, 11, -1, 28, 48, 31, 63, 44, 52, 47, -1, 40, 63, 44, 59, 47, -1, 29, 58, 44, 52, 47, -1, 29, 58, 44, 52, 47, 26, 54, -1, 43, 58, 44, 52, 47, -1, 39, 48, 61, 44, 52, 47, -1, 35, 65, 54, -1, -1, -1, 20, 68, 48, 70, 44, 55, 49, 56, 47, -1, 14, -1, 9, -1, 17, -1, 25, 14, -1, 65, -1, 58, 14, 58, -1, 58, 4, 58, -1, 58, 12, 58, -1, 58, 13, 58, -1, 58, 15, 58, -1, 58, 16, 58, -1, 58, 5, 58, -1, 58, 6, 58, -1, 58, 45, 58, -1, 58, 46, 58, -1, 65, 31, 63, -1, 3, 58, -1, 7, 58, 8, -1, -1, 60, 59, -1, 23, 48, 10, 52, -1, -1, 48, 10, 61, -1, 48, -1, 63, -1, 63, 10, 62, -1, 64, -1, -1, 64, 65, -1, 48, -1, -1, 18, 66, 67, 19, -1, 65, 62, -1, 35, 65, 65, 62, -1, 35, 65, 38, 63, -1, -1, 68, 69, -1, 42, -1, 41, -1, 30, -1, 37, -1, 36, -1, 27, -1, 34, 48, -1, -1, 21, 63, -1 }; /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ static const unsigned short yyrline[] = { 0, 127, 127, 129, 141, 142, 146, 148, 150, 152, 156, 158, 160, 162, 164, 166, 168, 170, 172, 174, 176, 178, 180, 182, 184, 187, 189, 186, 198, 200, 202, 204, 212, 214, 216, 218, 220, 222, 224, 226, 228, 230, 232, 234, 236, 238, 249, 250, 254, 264, 265, 267, 276, 278, 288, 293, 294, 298, 300, 300, 309, 311, 313, 323, 324, 328, 330, 332, 334, 336, 338, 340, 350, 351 }; #endif #if YYDEBUG || YYERROR_VERBOSE /* YYTNME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. First, the terminals, then, starting at YYNTOKENS, nonterminals. */ static const char *const yytname[] = { "$end", "error", "$undefined", "_BANG_t", "_BANG_EQUALS_t", "_AMPER_t", "_AMPERAMPER_t", "_LPAREN_t", "_RPAREN_t", "_PLUS_EQUALS_t", "_COLON_t", "_SEMIC_t", "_LANGLE_t", "_LANGLE_EQUALS_t", "_EQUALS_t", "_RANGLE_t", "_RANGLE_EQUALS_t", "_QUESTION_EQUALS_t", "_LBRACKET_t", "_RBRACKET_t", "ACTIONS_t", "BIND_t", "BREAK_t", "CASE_t", "CONTINUE_t", "DEFAULT_t", "ELSE_t", "EXISTING_t", "FOR_t", "IF_t", "IGNORE_t", "IN_t", "INCLUDE_t", "LOCAL_t", "MAXLINE_t", "ON_t", "PIECEMEAL_t", "QUIETLY_t", "RETURN_t", "RULE_t", "SWITCH_t", "TOGETHER_t", "UPDATED_t", "WHILE_t", "_LBRACE_t", "_BAR_t", "_BARBAR_t", "_RBRACE_t", "ARG", "STRING", "$accept", "run", "block", "rules", "rule", "@1", "@2", "assign", "expr", "cases", "case", "params", "lol", "list", "listp", "arg", "@3", "func", "eflags", "eflag", "bindlist", 0 }; #endif # ifdef YYPRINT /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to token YYLEX-NUM. */ static const unsigned short 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 }; # endif /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ static const unsigned char yyr1[] = { 0, 50, 51, 51, 52, 52, 53, 53, 53, 53, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 55, 56, 54, 57, 57, 57, 57, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 59, 59, 60, 61, 61, 61, 62, 62, 63, 64, 64, 65, 66, 65, 67, 67, 67, 68, 68, 69, 69, 69, 69, 69, 69, 69, 70, 70 }; /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ static const unsigned char yyr2[] = { 0, 2, 0, 1, 0, 1, 1, 2, 4, 6, 3, 3, 3, 4, 6, 3, 3, 3, 7, 5, 5, 7, 5, 6, 3, 0, 0, 9, 1, 1, 1, 2, 1, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 3, 0, 2, 4, 0, 3, 1, 1, 3, 1, 0, 2, 1, 0, 4, 2, 4, 4, 0, 2, 1, 1, 1, 1, 1, 1, 2, 0, 2 }; /* 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 unsigned char yydefact[] = { 2, 58, 63, 55, 55, 0, 0, 55, 55, 0, 55, 0, 55, 0, 4, 57, 0, 3, 6, 55, 0, 0, 0, 54, 0, 0, 0, 0, 0, 32, 0, 0, 0, 0, 49, 0, 0, 0, 5, 1, 7, 29, 28, 30, 0, 55, 55, 0, 52, 0, 55, 0, 70, 67, 0, 69, 68, 66, 65, 72, 64, 15, 56, 16, 55, 44, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 55, 11, 4, 55, 24, 17, 51, 0, 46, 4, 10, 31, 0, 0, 12, 55, 0, 60, 59, 71, 55, 0, 0, 45, 34, 39, 40, 35, 36, 33, 37, 38, 0, 41, 42, 43, 8, 0, 49, 4, 0, 0, 46, 0, 55, 13, 53, 55, 55, 73, 25, 4, 20, 4, 50, 0, 0, 19, 47, 22, 0, 62, 61, 0, 0, 0, 9, 23, 4, 14, 26, 18, 21, 48, 0, 27 }; /* YYDEFGOTO[NTERM-NUM]. */ static const short yydefgoto[] = { -1, 16, 37, 38, 18, 141, 152, 46, 28, 119, 120, 85, 47, 48, 23, 29, 20, 51, 21, 60, 99 }; /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ #define YYPACT_NINF -59 static const short yypact[] = { 154, -59, -59, -59, -59, -32, 8, -59, -59, -6, -59, -7, -59, 8, 154, -59, 46, -59, 154, 49, -14, 200, 37, -6, 40, 21, 8, 8, 120, 22, 43, 19, 185, 58, 9, 26, 135, 25, -59, -59, -59, -59, -59, -59, 63, -59, -59, 67, 71, -6, -59, 66, -59, -59, 38, -59, -59, -59, -59, 61, -59, -59, -59, -59, -59, -59, 155, 8, 8, 8, 8, 8, 8, 8, 8, 154, 8, 8, -59, -59, 154, -59, -59, -59, 79, 47, 69, 154, -59, -59, 10, 82, -59, -59, 7, -59, -59, -59, -59, 51, 53, -59, 52, 24, 24, -59, -59, 52, -59, -59, 62, 239, 239, -59, -59, 87, 9, 154, 42, 65, 69, 68, -59, -59, -59, -59, -59, -59, -59, 154, 73, 154, -59, 72, 90, -59, -59, -59, 102, -59, -59, 78, 74, 185, -59, -59, 154, -59, -59, -59, -59, -59, 75, -59 }; /* YYPGOTO[NTERM-NUM]. */ static const yysigned_char yypgoto[] = { -59, -59, -58, 13, -29, -59, -59, 28, 34, -4, -59, 12, -43, -2, -59, 0, -59, -59, -59, -59, -59 }; /* 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 -1 static const unsigned char yytable[] = { 19, 22, 24, 82, 1, 30, 31, 95, 33, 32, 35, 26, 1, 17, 19, 27, 25, 110, 19, 41, 50, 49, 114, 62, 42, 1, 1, 43, 67, 121, 80, 40, 19, 81, 15, 44, 70, 71, 72, 73, 74, 34, 15, 90, 91, 125, 39, 36, 61, 94, 124, 63, 64, 78, 79, 15, 15, 84, 41, 133, 65, 66, 100, 42, 70, 71, 43, 73, 74, 83, 86, 142, 88, 144, 44, 19, 113, 89, 92, 115, 19, 93, 98, 140, 45, 96, 97, 19, 151, 116, 134, 117, 118, 123, 126, 128, 127, 129, 131, 143, 146, 102, 103, 104, 105, 106, 107, 108, 109, 130, 111, 112, 135, 147, 150, 137, 136, 19, 122, 145, 138, 149, 153, 139, 67, 68, 69, 148, 132, 19, 0, 19, 70, 71, 72, 73, 74, 0, 0, 67, 68, 69, 0, 19, 0, 0, 19, 70, 71, 72, 73, 74, 0, 0, 0, 0, 0, 0, 0, 67, 68, 69, 0, 101, 75, 76, 77, 70, 71, 72, 73, 74, 1, 0, 2, 0, 3, 0, 4, 87, 76, 77, 5, 6, 0, 0, 7, 8, 0, 9, 0, 0, 10, 11, 12, 0, 0, 13, 14, 0, 76, 77, 15, 1, 0, 2, 0, 3, 0, 4, 0, 0, 0, 5, 6, 0, 0, 7, 0, 0, 9, 0, 0, 10, 11, 12, 0, 52, 13, 14, 53, 0, 0, 15, 54, 0, 55, 56, 0, 0, 0, 57, 58, 67, 68, 69, 0, 0, 59, 0, 0, 70, 71, 72, 73, 74 }; static const short yycheck[] = { 0, 3, 4, 32, 18, 7, 8, 50, 10, 9, 12, 3, 18, 0, 14, 7, 48, 75, 18, 9, 20, 35, 80, 23, 14, 18, 18, 17, 4, 87, 11, 18, 32, 14, 48, 25, 12, 13, 14, 15, 16, 48, 48, 45, 46, 38, 0, 13, 11, 49, 93, 11, 31, 31, 11, 48, 48, 48, 9, 117, 26, 27, 64, 14, 12, 13, 17, 15, 16, 11, 44, 129, 47, 131, 25, 75, 78, 14, 11, 81, 80, 10, 21, 126, 35, 19, 48, 87, 146, 10, 48, 44, 23, 11, 94, 44, 98, 44, 11, 26, 10, 67, 68, 69, 70, 71, 72, 73, 74, 47, 76, 77, 47, 11, 143, 47, 120, 117, 90, 47, 122, 47, 47, 125, 4, 5, 6, 49, 116, 129, -1, 131, 12, 13, 14, 15, 16, -1, -1, 4, 5, 6, -1, 143, -1, -1, 146, 12, 13, 14, 15, 16, -1, -1, -1, -1, -1, -1, -1, 4, 5, 6, -1, 8, 44, 45, 46, 12, 13, 14, 15, 16, 18, -1, 20, -1, 22, -1, 24, 44, 45, 46, 28, 29, -1, -1, 32, 33, -1, 35, -1, -1, 38, 39, 40, -1, -1, 43, 44, -1, 45, 46, 48, 18, -1, 20, -1, 22, -1, 24, -1, -1, -1, 28, 29, -1, -1, 32, -1, -1, 35, -1, -1, 38, 39, 40, -1, 27, 43, 44, 30, -1, -1, 48, 34, -1, 36, 37, -1, -1, -1, 41, 42, 4, 5, 6, -1, -1, 48, -1, -1, 12, 13, 14, 15, 16 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing symbol of state STATE-NUM. */ static const unsigned char yystos[] = { 0, 18, 20, 22, 24, 28, 29, 32, 33, 35, 38, 39, 40, 43, 44, 48, 51, 53, 54, 65, 66, 68, 63, 64, 63, 48, 3, 7, 58, 65, 63, 63, 65, 63, 48, 63, 58, 52, 53, 0, 53, 9, 14, 17, 25, 35, 57, 62, 63, 35, 65, 67, 27, 30, 34, 36, 37, 41, 42, 48, 69, 11, 65, 11, 31, 58, 58, 4, 5, 6, 12, 13, 14, 15, 16, 44, 45, 46, 31, 11, 11, 14, 54, 11, 48, 61, 44, 44, 47, 14, 63, 63, 11, 10, 65, 62, 19, 48, 21, 70, 63, 8, 58, 58, 58, 58, 58, 58, 58, 58, 52, 58, 58, 63, 52, 63, 10, 44, 23, 59, 60, 52, 57, 11, 62, 38, 65, 63, 44, 44, 47, 11, 61, 52, 48, 47, 59, 47, 63, 63, 62, 55, 52, 26, 52, 47, 10, 11, 49, 47, 54, 52, 56, 47 }; #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__) # define YYSIZE_T __SIZE_TYPE__ #endif #if ! defined (YYSIZE_T) && defined (size_t) # define YYSIZE_T size_t #endif #if ! defined (YYSIZE_T) # if defined (__STDC__) || defined (__cplusplus) # include <stddef.h> /* INFRINGES ON USER NAME SPACE */ # define YYSIZE_T size_t # endif #endif #if ! defined (YYSIZE_T) # define YYSIZE_T unsigned int #endif #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 yyerrlab1 /* 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; \ goto yybackup; \ } \ else \ { \ yyerror ("syntax error: cannot back up");\ YYERROR; \ } \ while (0) #define YYTERROR 1 #define YYERRCODE 256 /* YYLLOC_DEFAULT -- Compute the default location (before the actions are run). */ #ifndef YYLLOC_DEFAULT # define YYLLOC_DEFAULT(Current, Rhs, N) \ Current.first_line = Rhs[1].first_line; \ Current.first_column = Rhs[1].first_column; \ Current.last_line = Rhs[N].last_line; \ Current.last_column = Rhs[N].last_column; #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 (0) # define YYDSYMPRINT(Args) \ do { \ if (yydebug) \ yysymprint Args; \ } while (0) # define YYDSYMPRINTF(Title, Token, Value, Location) \ do { \ if (yydebug) \ { \ YYFPRINTF (stderr, "%s ", Title); \ yysymprint (stderr, \ Token, Value); \ YYFPRINTF (stderr, "\n"); \ } \ } while (0) /*------------------------------------------------------------------. | yy_stack_print -- Print the state stack from its BOTTOM up to its | | TOP (cinluded). | `------------------------------------------------------------------*/ #if defined (__STDC__) || defined (__cplusplus) static void yy_stack_print (short *bottom, short *top) #else static void yy_stack_print (bottom, top) short *bottom; short *top; #endif { YYFPRINTF (stderr, "Stack now"); for (/* Nothing. */; bottom <= top; ++bottom) YYFPRINTF (stderr, " %d", *bottom); YYFPRINTF (stderr, "\n"); } # define YY_STACK_PRINT(Bottom, Top) \ do { \ if (yydebug) \ yy_stack_print ((Bottom), (Top)); \ } while (0) /*------------------------------------------------. | Report that the YYRULE is going to be reduced. | `------------------------------------------------*/ #if defined (__STDC__) || defined (__cplusplus) static void yy_reduce_print (int yyrule) #else static void yy_reduce_print (yyrule) int yyrule; #endif { int yyi; unsigned int yylineno = yyrline[yyrule]; YYFPRINTF (stderr, "Reducing stack by rule %d (line %u), ", yyrule - 1, yylineno); /* Print the symbols being reduced, and their result. */ for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++) YYFPRINTF (stderr, "%s ", yytname [yyrhs[yyi]]); YYFPRINTF (stderr, "-> %s\n", yytname [yyr1[yyrule]]); } # define YY_REDUCE_PRINT(Rule) \ do { \ if (yydebug) \ yy_reduce_print (Rule); \ } while (0) /* Nonzero means print parse trace. It is left uninitialized so that multiple parsers can coexist. */ int yydebug; #else /* !YYDEBUG */ # define YYDPRINTF(Args) # define YYDSYMPRINT(Args) # define YYDSYMPRINTF(Title, Token, 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 SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH) evaluated with infinite-precision integer arithmetic. */ #if YYMAXDEPTH == 0 # undef YYMAXDEPTH #endif #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. */ static YYSIZE_T # if defined (__STDC__) || defined (__cplusplus) yystrlen (const char *yystr) # else yystrlen (yystr) const char *yystr; # endif { register const char *yys = yystr; while (*yys++ != '\0') continue; return yys - yystr - 1; } # 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. */ static char * # if defined (__STDC__) || defined (__cplusplus) yystpcpy (char *yydest, const char *yysrc) # else yystpcpy (yydest, yysrc) char *yydest; const char *yysrc; # endif { register char *yyd = yydest; register const char *yys = yysrc; while ((*yyd++ = *yys++) != '\0') continue; return yyd - 1; } # endif # endif #endif /* !YYERROR_VERBOSE */ #if YYDEBUG /*--------------------------------. | Print this symbol on YYOUTPUT. | `--------------------------------*/ #if defined (__STDC__) || defined (__cplusplus) static void yysymprint (FILE *yyoutput, int yytype, YYSTYPE *yyvaluep) #else static void yysymprint (yyoutput, yytype, yyvaluep) FILE *yyoutput; int yytype; YYSTYPE *yyvaluep; #endif { /* Pacify ``unused variable'' warnings. */ (void) yyvaluep; if (yytype < YYNTOKENS) { YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); # ifdef YYPRINT YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); # endif } else YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); switch (yytype) { default: break; } YYFPRINTF (yyoutput, ")"); } #endif /* ! YYDEBUG */ /*-----------------------------------------------. | Release the memory associated to this symbol. | `-----------------------------------------------*/ #if defined (__STDC__) || defined (__cplusplus) static void yydestruct (int yytype, YYSTYPE *yyvaluep) #else static void yydestruct (yytype, yyvaluep) int yytype; YYSTYPE *yyvaluep; #endif { /* Pacify ``unused variable'' warnings. */ (void) yyvaluep; 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. | `----------*/ #ifdef YYPARSE_PARAM # if defined (__STDC__) || defined (__cplusplus) int yyparse (void *YYPARSE_PARAM) # else int yyparse (YYPARSE_PARAM) void *YYPARSE_PARAM; # endif #else /* ! YYPARSE_PARAM */ #if defined (__STDC__) || defined (__cplusplus) int yyparse (void) #else int yyparse () #endif #endif { register int yystate; register int yyn; int yyresult; /* Number of tokens to shift before error messages enabled. */ int yyerrstatus; /* Lookahead token as an internal (translated) token number. */ int yytoken = 0; /* Three stacks and their tools: `yyss': related to states, `yyvs': related to semantic values, `yyls': related to locations. Refer to the stacks thru separate pointers, to allow yyoverflow to reallocate them elsewhere. */ /* The state stack. */ short yyssa[YYINITDEPTH]; short *yyss = yyssa; register short *yyssp; /* The semantic value stack. */ YYSTYPE yyvsa[YYINITDEPTH]; YYSTYPE *yyvs = yyvsa; register YYSTYPE *yyvsp; #define YYPOPSTACK (yyvsp--, yyssp--) YYSIZE_T yystacksize = YYINITDEPTH; /* The variables used to return semantic value and location from the action routines. */ YYSTYPE yyval; /* When reducing, the number of symbols on the RHS of the reduced rule. */ int yylen; 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; short *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 ("parser stack overflow", &yyss1, yysize * sizeof (*yyssp), &yyvs1, yysize * sizeof (*yyvsp), &yystacksize); yyss = yyss1; yyvs = yyvs1; } #else /* no yyoverflow */ # ifndef YYSTACK_RELOCATE goto yyoverflowlab; # else /* Extend the stack our own way. */ if (YYMAXDEPTH <= yystacksize) goto yyoverflowlab; yystacksize *= 2; if (YYMAXDEPTH < yystacksize) yystacksize = YYMAXDEPTH; { short *yyss1 = yyss; union yyalloc *yyptr = (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); if (! yyptr) goto yyoverflowlab; YYSTACK_RELOCATE (yyss); YYSTACK_RELOCATE (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)); 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. */ /* yyresume: */ /* 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); YYDSYMPRINTF ("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; } if (yyn == YYFINAL) YYACCEPT; /* Shift the lookahead token. */ YYDPRINTF ((stderr, "Shifting token %s, ", yytname[yytoken])); /* Discard the token being shifted unless it is eof. */ if (yychar != YYEOF) yychar = YYEMPTY; *++yyvsp = yylval; /* Count tokens shifted since error; after three, turn off error status. */ if (yyerrstatus) yyerrstatus--; yystate = yyn; 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 3: #line 130 "jamgram.y" { parse_save( yyvsp[0].parse ); ;} break; case 4: #line 141 "jamgram.y" { yyval.parse = pnull(); ;} break; case 5: #line 143 "jamgram.y" { yyval.parse = yyvsp[0].parse; ;} break; case 6: #line 147 "jamgram.y" { yyval.parse = yyvsp[0].parse; ;} break; case 7: #line 149 "jamgram.y" { yyval.parse = prules( yyvsp[-1].parse, yyvsp[0].parse ); ;} break; case 8: #line 151 "jamgram.y" { yyval.parse = plocal( yyvsp[-2].parse, pnull(), yyvsp[0].parse ); ;} break; case 9: #line 153 "jamgram.y" { yyval.parse = plocal( yyvsp[-4].parse, yyvsp[-2].parse, yyvsp[0].parse ); ;} break; case 10: #line 157 "jamgram.y" { yyval.parse = yyvsp[-1].parse; ;} break; case 11: #line 159 "jamgram.y" { yyval.parse = pincl( yyvsp[-1].parse ); ;} break; case 12: #line 161 "jamgram.y" { yyval.parse = prule( yyvsp[-2].parse, yyvsp[-1].parse ); ;} break; case 13: #line 163 "jamgram.y" { yyval.parse = pset( yyvsp[-3].parse, yyvsp[-1].parse, yyvsp[-2].number ); ;} break; case 14: #line 165 "jamgram.y" { yyval.parse = pset1( yyvsp[-5].parse, yyvsp[-3].parse, yyvsp[-1].parse, yyvsp[-2].number ); ;} break; case 15: #line 167 "jamgram.y" { yyval.parse = pbreak( yyvsp[-1].parse, JMP_BREAK ); ;} break; case 16: #line 169 "jamgram.y" { yyval.parse = pbreak( yyvsp[-1].parse, JMP_CONTINUE ); ;} break; case 17: #line 171 "jamgram.y" { yyval.parse = pbreak( yyvsp[-1].parse, JMP_RETURN ); ;} break; case 18: #line 173 "jamgram.y" { yyval.parse = pfor( yyvsp[-5].string, yyvsp[-3].parse, yyvsp[-1].parse ); ;} break; case 19: #line 175 "jamgram.y" { yyval.parse = pswitch( yyvsp[-3].parse, yyvsp[-1].parse ); ;} break; case 20: #line 177 "jamgram.y" { yyval.parse = pif( yyvsp[-3].parse, yyvsp[-1].parse, pnull() ); ;} break; case 21: #line 179 "jamgram.y" { yyval.parse = pif( yyvsp[-5].parse, yyvsp[-3].parse, yyvsp[0].parse ); ;} break; case 22: #line 181 "jamgram.y" { yyval.parse = pwhile( yyvsp[-3].parse, yyvsp[-1].parse ); ;} break; case 23: #line 183 "jamgram.y" { yyval.parse = psetc( yyvsp[-4].string, yyvsp[-3].parse, yyvsp[-1].parse ); ;} break; case 24: #line 185 "jamgram.y" { yyval.parse = pon( yyvsp[-1].parse, yyvsp[0].parse ); ;} break; case 25: #line 187 "jamgram.y" { yymode( SCAN_STRING ); ;} break; case 26: #line 189 "jamgram.y" { yymode( SCAN_NORMAL ); ;} break; case 27: #line 191 "jamgram.y" { yyval.parse = psete( yyvsp[-6].string,yyvsp[-5].parse,yyvsp[-2].string,yyvsp[-7].number ); ;} break; case 28: #line 199 "jamgram.y" { yyval.number = VAR_SET; ;} break; case 29: #line 201 "jamgram.y" { yyval.number = VAR_APPEND; ;} break; case 30: #line 203 "jamgram.y" { yyval.number = VAR_DEFAULT; ;} break; case 31: #line 205 "jamgram.y" { yyval.number = VAR_DEFAULT; ;} break; case 32: #line 213 "jamgram.y" { yyval.parse = peval( EXPR_EXISTS, yyvsp[0].parse, pnull() ); ;} break; case 33: #line 215 "jamgram.y" { yyval.parse = peval( EXPR_EQUALS, yyvsp[-2].parse, yyvsp[0].parse ); ;} break; case 34: #line 217 "jamgram.y" { yyval.parse = peval( EXPR_NOTEQ, yyvsp[-2].parse, yyvsp[0].parse ); ;} break; case 35: #line 219 "jamgram.y" { yyval.parse = peval( EXPR_LESS, yyvsp[-2].parse, yyvsp[0].parse ); ;} break; case 36: #line 221 "jamgram.y" { yyval.parse = peval( EXPR_LESSEQ, yyvsp[-2].parse, yyvsp[0].parse ); ;} break; case 37: #line 223 "jamgram.y" { yyval.parse = peval( EXPR_MORE, yyvsp[-2].parse, yyvsp[0].parse ); ;} break; case 38: #line 225 "jamgram.y" { yyval.parse = peval( EXPR_MOREEQ, yyvsp[-2].parse, yyvsp[0].parse ); ;} break; case 39: #line 227 "jamgram.y" { yyval.parse = peval( EXPR_AND, yyvsp[-2].parse, yyvsp[0].parse ); ;} break; case 40: #line 229 "jamgram.y" { yyval.parse = peval( EXPR_AND, yyvsp[-2].parse, yyvsp[0].parse ); ;} break; case 41: #line 231 "jamgram.y" { yyval.parse = peval( EXPR_OR, yyvsp[-2].parse, yyvsp[0].parse ); ;} break; case 42: #line 233 "jamgram.y" { yyval.parse = peval( EXPR_OR, yyvsp[-2].parse, yyvsp[0].parse ); ;} break; case 43: #line 235 "jamgram.y" { yyval.parse = peval( EXPR_IN, yyvsp[-2].parse, yyvsp[0].parse ); ;} break; case 44: #line 237 "jamgram.y" { yyval.parse = peval( EXPR_NOT, yyvsp[0].parse, pnull() ); ;} break; case 45: #line 239 "jamgram.y" { yyval.parse = yyvsp[-1].parse; ;} break; case 46: #line 249 "jamgram.y" { yyval.parse = P0; ;} break; case 47: #line 251 "jamgram.y" { yyval.parse = pnode( yyvsp[-1].parse, yyvsp[0].parse ); ;} break; case 48: #line 255 "jamgram.y" { yyval.parse = psnode( yyvsp[-2].string, yyvsp[0].parse ); ;} break; case 49: #line 264 "jamgram.y" { yyval.parse = P0; ;} break; case 50: #line 266 "jamgram.y" { yyval.parse = psnode( yyvsp[-2].string, yyvsp[0].parse ); ;} break; case 51: #line 268 "jamgram.y" { yyval.parse = psnode( yyvsp[0].string, P0 ); ;} break; case 52: #line 277 "jamgram.y" { yyval.parse = pnode( P0, yyvsp[0].parse ); ;} break; case 53: #line 279 "jamgram.y" { yyval.parse = pnode( yyvsp[0].parse, yyvsp[-2].parse ); ;} break; case 54: #line 289 "jamgram.y" { yyval.parse = yyvsp[0].parse; yymode( SCAN_NORMAL ); ;} break; case 55: #line 293 "jamgram.y" { yyval.parse = pnull(); yymode( SCAN_PUNCT ); ;} break; case 56: #line 295 "jamgram.y" { yyval.parse = pappend( yyvsp[-1].parse, yyvsp[0].parse ); ;} break; case 57: #line 299 "jamgram.y" { yyval.parse = plist( yyvsp[0].string ); ;} break; case 58: #line 300 "jamgram.y" { yymode( SCAN_NORMAL ); ;} break; case 59: #line 301 "jamgram.y" { yyval.parse = yyvsp[-1].parse; ;} break; case 60: #line 310 "jamgram.y" { yyval.parse = prule( yyvsp[-1].parse, yyvsp[0].parse ); ;} break; case 61: #line 312 "jamgram.y" { yyval.parse = pon( yyvsp[-2].parse, prule( yyvsp[-1].parse, yyvsp[0].parse ) ); ;} break; case 62: #line 314 "jamgram.y" { yyval.parse = pon( yyvsp[-2].parse, yyvsp[0].parse ); ;} break; case 63: #line 323 "jamgram.y" { yyval.number = 0; ;} break; case 64: #line 325 "jamgram.y" { yyval.number = yyvsp[-1].number | yyvsp[0].number; ;} break; case 65: #line 329 "jamgram.y" { yyval.number = RULE_UPDATED; ;} break; case 66: #line 331 "jamgram.y" { yyval.number = RULE_TOGETHER; ;} break; case 67: #line 333 "jamgram.y" { yyval.number = RULE_IGNORE; ;} break; case 68: #line 335 "jamgram.y" { yyval.number = RULE_QUIETLY; ;} break; case 69: #line 337 "jamgram.y" { yyval.number = RULE_PIECEMEAL; ;} break; case 70: #line 339 "jamgram.y" { yyval.number = RULE_EXISTING; ;} break; case 71: #line 341 "jamgram.y" { yyval.number = atoi( yyvsp[0].string ) * RULE_MAXLINE; ;} break; case 72: #line 350 "jamgram.y" { yyval.parse = pnull(); ;} break; case 73: #line 352 "jamgram.y" { yyval.parse = yyvsp[0].parse; ;} break; } /* Line 991 of yacc.c. */ #line 1611 "jamgram.c" yyvsp -= yylen; yyssp -= yylen; 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 yyn = yypact[yystate]; if (YYPACT_NINF < yyn && yyn < YYLAST) { YYSIZE_T yysize = 0; int yytype = YYTRANSLATE (yychar); char *yymsg; int yyx, yycount; yycount = 0; /* Start YYX at -YYN if negative to avoid negative indexes in YYCHECK. */ for (yyx = yyn < 0 ? -yyn : 0; yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++) if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) yysize += yystrlen (yytname[yyx]) + 15, yycount++; yysize += yystrlen ("syntax error, unexpected ") + 1; yysize += yystrlen (yytname[yytype]); yymsg = (char *) YYSTACK_ALLOC (yysize); if (yymsg != 0) { char *yyp = yystpcpy (yymsg, "syntax error, unexpected "); yyp = yystpcpy (yyp, yytname[yytype]); if (yycount < 5) { yycount = 0; for (yyx = yyn < 0 ? -yyn : 0; yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++) if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) { const char *yyq = ! yycount ? ", expecting " : " or "; yyp = yystpcpy (yyp, yyq); yyp = yystpcpy (yyp, yytname[yyx]); yycount++; } } yyerror (yymsg); YYSTACK_FREE (yymsg); } else yyerror ("syntax error; also virtual memory exhausted"); } else #endif /* YYERROR_VERBOSE */ yyerror ("syntax error"); } if (yyerrstatus == 3) { /* If just tried and failed to reuse lookahead token after an error, discard it. */ /* Return failure if at end of input. */ if (yychar == YYEOF) { /* Pop the error token. */ YYPOPSTACK; /* Pop the rest of the stack. */ while (yyss < yyssp) { YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp); yydestruct (yystos[*yyssp], yyvsp); YYPOPSTACK; } YYABORT; } YYDSYMPRINTF ("Error: discarding", yytoken, &yylval, &yylloc); yydestruct (yytoken, &yylval); yychar = YYEMPTY; } /* Else will try to reuse lookahead token after shifting the error token. */ goto yyerrlab2; /*----------------------------------------------------. | yyerrlab1 -- error raised explicitly by an action. | `----------------------------------------------------*/ yyerrlab1: /* Suppress GCC warning that yyerrlab1 is unused when no action invokes YYERROR. */ #if defined (__GNUC_MINOR__) && 2093 <= (__GNUC__ * 1000 + __GNUC_MINOR__) __attribute__ ((__unused__)) #endif goto yyerrlab2; /*---------------------------------------------------------------. | yyerrlab2 -- pop states until the error token can be shifted. | `---------------------------------------------------------------*/ yyerrlab2: 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; YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp); yydestruct (yystos[yystate], yyvsp); yyvsp--; yystate = *--yyssp; YY_STACK_PRINT (yyss, yyssp); } if (yyn == YYFINAL) YYACCEPT; YYDPRINTF ((stderr, "Shifting error token, ")); *++yyvsp = yylval; yystate = yyn; goto yynewstate; /*-------------------------------------. | yyacceptlab -- YYACCEPT comes here. | `-------------------------------------*/ yyacceptlab: yyresult = 0; goto yyreturn; /*-----------------------------------. | yyabortlab -- YYABORT comes here. | `-----------------------------------*/ yyabortlab: yyresult = 1; goto yyreturn; #ifndef yyoverflow /*----------------------------------------------. | yyoverflowlab -- parser overflow comes here. | `----------------------------------------------*/ yyoverflowlab: yyerror ("parser stack overflow"); yyresult = 2; /* Fall through. */ #endif yyreturn: #ifndef yyoverflow if (yyss != yyssa) YYSTACK_FREE (yyss); #endif return yyresult; }
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#9 | 3294 | Miklos Fazekas | Upgraded to jam2.5rc3 | ||
#8 | 2579 | Miklos Fazekas | GSJam to 2.5rc1 integration | ||
#7 | 2578 | Miklos Fazekas | Integrate new lexical scanner code to GSJam | ||
#6 | 2577 | Miklos Fazekas | "Integrate to jam2.5rc1" | ||
#5 | 2519 | Miklos Fazekas | Sync to 2.5rc1 | ||
#4 | 1591 | Miklos Fazekas | Integrated to jam 2.4 mainline | ||
#3 | 1569 | Miklos Fazekas | Integrate with lates mainline | ||
#2 | 1395 | Miklos Fazekas | Merge with main jam | ||
#1 | 1212 | Miklos Fazekas | Created a Jam branch | ||
//guest/perforce_software/jam/src/jamgram.c | |||||
#3 | 486 | Perforce staff |
Jam 2.3. See RELNOTES for a list of changes from 2.2.x. Just about every source file was touched when jam got ANSI-fied. |
||
#2 | 3 | Perforce maintenance | Jam/MR 2.2.1 (fix for NT handle leak) | ||
#1 | 2 | laura | Add Jam/MR 2.2 source |