src/common/feature_parse.tab.cc

00001 /* A Bison parser, made by GNU Bison 2.3.  */
00002 
00003 /* Skeleton implementation for Bison's Yacc-like parsers in C
00004 
00005    Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
00006    Free Software Foundation, Inc.
00007 
00008    This program is free software; you can redistribute it and/or modify
00009    it under the terms of the GNU General Public License as published by
00010    the Free Software Foundation; either version 2, or (at your option)
00011    any later version.
00012 
00013    This program is distributed in the hope that it will be useful,
00014    but WITHOUT ANY WARRANTY; without even the implied warranty of
00015    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016    GNU General Public License for more details.
00017 
00018    You should have received a copy of the GNU General Public License
00019    along with this program; if not, write to the Free Software
00020    Foundation, Inc., 51 Franklin Street, Fifth Floor,
00021    Boston, MA 02110-1301, USA.  */
00022 
00023 /* As a special exception, you may create a larger work that contains
00024    part or all of the Bison parser skeleton and distribute that work
00025    under terms of your choice, so long as that work isn't itself a
00026    parser generator using the skeleton or a modified version thereof
00027    as a parser skeleton.  Alternatively, if you modify or redistribute
00028    the parser skeleton itself, you may (at your option) remove this
00029    special exception, which will cause the skeleton and the resulting
00030    Bison output files to be licensed under the GNU General Public
00031    License without this special exception.
00032 
00033    This special exception was added by the Free Software Foundation in
00034    version 2.2 of Bison.  */
00035 
00036 /* C LALR(1) parser skeleton written by Richard Stallman, by
00037    simplifying the original so-called "semantic" parser.  */
00038 
00039 /* All symbols defined below should begin with yy or YY, to avoid
00040    infringing on user name space.  This should be done even for local
00041    variables, as they might otherwise be expanded by user macros.
00042    There are some unavoidable exceptions within include files to
00043    define necessary library symbols; they are noted "INFRINGES ON
00044    USER NAME SPACE" below.  */
00045 
00046 /* Identify Bison output.  */
00047 #define YYBISON 1
00048 
00049 /* Bison version.  */
00050 #define YYBISON_VERSION "2.3"
00051 
00052 /* Skeleton name.  */
00053 #define YYSKELETON_NAME "yacc.c"
00054 
00055 /* Pure parsers.  */
00056 #define YYPURE 0
00057 
00058 /* Using locations.  */
00059 #define YYLSP_NEEDED 0
00060 
00061 
00062 
00063 /* Tokens.  */
00064 #ifndef YYTOKENTYPE
00065 # define YYTOKENTYPE
00066    /* Put the tokens into the symbol table, so that GDB and other debuggers
00067       know about them.  */
00068    enum yytokentype {
00069      FL_NUM = 258,
00070      FL_GET = 259,
00071      FL_SQRT = 260,
00072      FL_LOG = 261,
00073      FL_COS = 262,
00074      FL_SIN = 263
00075    };
00076 #endif
00077 /* Tokens.  */
00078 #define FL_NUM 258
00079 #define FL_GET 259
00080 #define FL_SQRT 260
00081 #define FL_LOG 261
00082 #define FL_COS 262
00083 #define FL_SIN 263
00084 
00085 
00086 
00087 
00088 /* Copy the first part of user declarations.  */
00089 #line 1 "feature_parse.y"
00090  
00091 
00092 #include <math.h> 
00093 #include <stdlib.h>
00094 #include <list>
00095 
00096 int yylex (void); 
00097 void yyerror (char const *); 
00098 
00099 #include "open_prospect.h"
00100 
00101 int mem_stack;
00102 std::list<feature_parse_op> op_stack;
00103 
00104 
00105 
00106 
00107 /* Enabling traces.  */
00108 #ifndef YYDEBUG
00109 # define YYDEBUG 0
00110 #endif
00111 
00112 /* Enabling verbose error messages.  */
00113 #ifdef YYERROR_VERBOSE
00114 # undef YYERROR_VERBOSE
00115 # define YYERROR_VERBOSE 1
00116 #else
00117 # define YYERROR_VERBOSE 0
00118 #endif
00119 
00120 /* Enabling the token table.  */
00121 #ifndef YYTOKEN_TABLE
00122 # define YYTOKEN_TABLE 0
00123 #endif
00124 
00125 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
00126 typedef union YYSTYPE
00127 #line 18 "feature_parse.y"
00128 {
00129   double dval;
00130   int ival;
00131 }
00132 /* Line 193 of yacc.c.  */
00133 #line 134 "feature_parse.tab.c"
00134         YYSTYPE;
00135 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
00136 # define YYSTYPE_IS_DECLARED 1
00137 # define YYSTYPE_IS_TRIVIAL 1
00138 #endif
00139 
00140 
00141 
00142 /* Copy the second part of user declarations.  */
00143 
00144 
00145 /* Line 216 of yacc.c.  */
00146 #line 147 "feature_parse.tab.c"
00147 
00148 #ifdef short
00149 # undef short
00150 #endif
00151 
00152 #ifdef YYTYPE_UINT8
00153 typedef YYTYPE_UINT8 yytype_uint8;
00154 #else
00155 typedef unsigned char yytype_uint8;
00156 #endif
00157 
00158 #ifdef YYTYPE_INT8
00159 typedef YYTYPE_INT8 yytype_int8;
00160 #elif (defined __STDC__ || defined __C99__FUNC__ \
00161      || defined __cplusplus || defined _MSC_VER)
00162 typedef signed char yytype_int8;
00163 #else
00164 typedef short int yytype_int8;
00165 #endif
00166 
00167 #ifdef YYTYPE_UINT16
00168 typedef YYTYPE_UINT16 yytype_uint16;
00169 #else
00170 typedef unsigned short int yytype_uint16;
00171 #endif
00172 
00173 #ifdef YYTYPE_INT16
00174 typedef YYTYPE_INT16 yytype_int16;
00175 #else
00176 typedef short int yytype_int16;
00177 #endif
00178 
00179 #ifndef YYSIZE_T
00180 # ifdef __SIZE_TYPE__
00181 #  define YYSIZE_T __SIZE_TYPE__
00182 # elif defined size_t
00183 #  define YYSIZE_T size_t
00184 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
00185      || defined __cplusplus || defined _MSC_VER)
00186 #  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
00187 #  define YYSIZE_T size_t
00188 # else
00189 #  define YYSIZE_T unsigned int
00190 # endif
00191 #endif
00192 
00193 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
00194 
00195 #ifndef YY_
00196 # if YYENABLE_NLS
00197 #  if ENABLE_NLS
00198 #   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
00199 #   define YY_(msgid) dgettext ("bison-runtime", msgid)
00200 #  endif
00201 # endif
00202 # ifndef YY_
00203 #  define YY_(msgid) msgid
00204 # endif
00205 #endif
00206 
00207 /* Suppress unused-variable warnings by "using" E.  */
00208 #if ! defined lint || defined __GNUC__
00209 # define YYUSE(e) ((void) (e))
00210 #else
00211 # define YYUSE(e) /* empty */
00212 #endif
00213 
00214 /* Identity function, used to suppress warnings about constant conditions.  */
00215 #ifndef lint
00216 # define YYID(n) (n)
00217 #else
00218 #if (defined __STDC__ || defined __C99__FUNC__ \
00219      || defined __cplusplus || defined _MSC_VER)
00220 static int
00221 YYID (int i)
00222 #else
00223 static int
00224 YYID (i)
00225     int i;
00226 #endif
00227 {
00228   return i;
00229 }
00230 #endif
00231 
00232 #if ! defined yyoverflow || YYERROR_VERBOSE
00233 
00234 /* The parser invokes alloca or malloc; define the necessary symbols.  */
00235 
00236 # ifdef YYSTACK_USE_ALLOCA
00237 #  if YYSTACK_USE_ALLOCA
00238 #   ifdef __GNUC__
00239 #    define YYSTACK_ALLOC __builtin_alloca
00240 #   elif defined __BUILTIN_VA_ARG_INCR
00241 #    include <alloca.h> /* INFRINGES ON USER NAME SPACE */
00242 #   elif defined _AIX
00243 #    define YYSTACK_ALLOC __alloca
00244 #   elif defined _MSC_VER
00245 #    include <malloc.h> /* INFRINGES ON USER NAME SPACE */
00246 #    define alloca _alloca
00247 #   else
00248 #    define YYSTACK_ALLOC alloca
00249 #    if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
00250      || defined __cplusplus || defined _MSC_VER)
00251 #     include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
00252 #     ifndef _STDLIB_H
00253 #      define _STDLIB_H 1
00254 #     endif
00255 #    endif
00256 #   endif
00257 #  endif
00258 # endif
00259 
00260 # ifdef YYSTACK_ALLOC
00261    /* Pacify GCC's `empty if-body' warning.  */
00262 #  define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
00263 #  ifndef YYSTACK_ALLOC_MAXIMUM
00264     /* The OS might guarantee only one guard page at the bottom of the stack,
00265        and a page size can be as small as 4096 bytes.  So we cannot safely
00266        invoke alloca (N) if N exceeds 4096.  Use a slightly smaller number
00267        to allow for a few compiler-allocated temporary stack slots.  */
00268 #   define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
00269 #  endif
00270 # else
00271 #  define YYSTACK_ALLOC YYMALLOC
00272 #  define YYSTACK_FREE YYFREE
00273 #  ifndef YYSTACK_ALLOC_MAXIMUM
00274 #   define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
00275 #  endif
00276 #  if (defined __cplusplus && ! defined _STDLIB_H \
00277        && ! ((defined YYMALLOC || defined malloc) \
00278              && (defined YYFREE || defined free)))
00279 #   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
00280 #   ifndef _STDLIB_H
00281 #    define _STDLIB_H 1
00282 #   endif
00283 #  endif
00284 #  ifndef YYMALLOC
00285 #   define YYMALLOC malloc
00286 #   if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
00287      || defined __cplusplus || defined _MSC_VER)
00288 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
00289 #   endif
00290 #  endif
00291 #  ifndef YYFREE
00292 #   define YYFREE free
00293 #   if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
00294      || defined __cplusplus || defined _MSC_VER)
00295 void free (void *); /* INFRINGES ON USER NAME SPACE */
00296 #   endif
00297 #  endif
00298 # endif
00299 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
00300 
00301 
00302 #if (! defined yyoverflow \
00303      && (! defined __cplusplus \
00304          || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
00305 
00306 /* A type that is properly aligned for any stack member.  */
00307 union yyalloc
00308 {
00309   yytype_int16 yyss;
00310   YYSTYPE yyvs;
00311   };
00312 
00313 /* The size of the maximum gap between one aligned stack and the next.  */
00314 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
00315 
00316 /* The size of an array large to enough to hold all stacks, each with
00317    N elements.  */
00318 # define YYSTACK_BYTES(N) \
00319      ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
00320       + YYSTACK_GAP_MAXIMUM)
00321 
00322 /* Copy COUNT objects from FROM to TO.  The source and destination do
00323    not overlap.  */
00324 # ifndef YYCOPY
00325 #  if defined __GNUC__ && 1 < __GNUC__
00326 #   define YYCOPY(To, From, Count) \
00327       __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
00328 #  else
00329 #   define YYCOPY(To, From, Count)              \
00330       do                                        \
00331         {                                       \
00332           YYSIZE_T yyi;                         \
00333           for (yyi = 0; yyi < (Count); yyi++)   \
00334             (To)[yyi] = (From)[yyi];            \
00335         }                                       \
00336       while (YYID (0))
00337 #  endif
00338 # endif
00339 
00340 /* Relocate STACK from its old location to the new one.  The
00341    local variables YYSIZE and YYSTACKSIZE give the old and new number of
00342    elements in the stack, and YYPTR gives the new location of the
00343    stack.  Advance YYPTR to a properly aligned location for the next
00344    stack.  */
00345 # define YYSTACK_RELOCATE(Stack)                                        \
00346     do                                                                  \
00347       {                                                                 \
00348         YYSIZE_T yynewbytes;                                            \
00349         YYCOPY (&yyptr->Stack, Stack, yysize);                          \
00350         Stack = &yyptr->Stack;                                          \
00351         yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
00352         yyptr += yynewbytes / sizeof (*yyptr);                          \
00353       }                                                                 \
00354     while (YYID (0))
00355 
00356 #endif
00357 
00358 /* YYFINAL -- State number of the termination state.  */
00359 #define YYFINAL  19
00360 /* YYLAST -- Last index in YYTABLE.  */
00361 #define YYLAST   79
00362 
00363 /* YYNTOKENS -- Number of terminals.  */
00364 #define YYNTOKENS  17
00365 /* YYNNTS -- Number of nonterminals.  */
00366 #define YYNNTS  3
00367 /* YYNRULES -- Number of rules.  */
00368 #define YYNRULES  16
00369 /* YYNRULES -- Number of states.  */
00370 #define YYNSTATES  40
00371 
00372 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */
00373 #define YYUNDEFTOK  2
00374 #define YYMAXUTOK   263
00375 
00376 #define YYTRANSLATE(YYX)                                                \
00377   ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
00378 
00379 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX.  */
00380 static const yytype_uint8 yytranslate[] =
00381 {
00382        0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00383        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00384        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00385        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00386       14,    15,    11,     9,     2,    10,     2,    12,     2,     2,
00387        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00388        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00389        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00390        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00391        2,     2,     2,     2,    13,     2,     2,     2,     2,     2,
00392        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00393        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00394        2,     2,     2,     2,    16,     2,     2,     2,     2,     2,
00395        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00396        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00397        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00398        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00399        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00400        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00401        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00402        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00403        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00404        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00405        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00406        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00407        2,     2,     2,     2,     2,     2,     1,     2,     3,     4,
00408        5,     6,     7,     8
00409 };
00410 
00411 #if YYDEBUG
00412 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
00413    YYRHS.  */
00414 static const yytype_uint8 yyprhs[] =
00415 {
00416        0,     0,     3,     5,     7,     9,    13,    17,    21,    25,
00417       29,    34,    39,    44,    49,    52,    56
00418 };
00419 
00420 /* YYRHS -- A `-1'-separated list of the rules' RHS.  */
00421 static const yytype_int8 yyrhs[] =
00422 {
00423       18,     0,    -1,    19,    -1,     3,    -1,     4,    -1,    19,
00424        9,    19,    -1,    19,    10,    19,    -1,    19,    11,    19,
00425       -1,    19,    12,    19,    -1,    19,    13,    19,    -1,     5,
00426       14,    19,    15,    -1,     6,    14,    19,    15,    -1,     8,
00427       14,    19,    15,    -1,     7,    14,    19,    15,    -1,    10,
00428       19,    -1,    16,    19,    16,    -1,    14,    19,    15,    -1
00429 };
00430 
00431 /* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
00432 static const yytype_uint8 yyrline[] =
00433 {
00434        0,    42,    42,    51,    57,    63,    69,    75,    81,    87,
00435       93,    99,   105,   111,   117,   123,   129
00436 };
00437 #endif
00438 
00439 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
00440 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
00441    First, the terminals, then, starting at YYNTOKENS, nonterminals.  */
00442 static const char *const yytname[] =
00443 {
00444   "$end", "error", "$undefined", "FL_NUM", "FL_GET", "FL_SQRT", "FL_LOG",
00445   "FL_COS", "FL_SIN", "'+'", "'-'", "'*'", "'/'", "'^'", "'('", "')'",
00446   "'|'", "$accept", "line", "exp", 0
00447 };
00448 #endif
00449 
00450 # ifdef YYPRINT
00451 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
00452    token YYLEX-NUM.  */
00453 static const yytype_uint16 yytoknum[] =
00454 {
00455        0,   256,   257,   258,   259,   260,   261,   262,   263,    43,
00456       45,    42,    47,    94,    40,    41,   124
00457 };
00458 # endif
00459 
00460 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
00461 static const yytype_uint8 yyr1[] =
00462 {
00463        0,    17,    18,    19,    19,    19,    19,    19,    19,    19,
00464       19,    19,    19,    19,    19,    19,    19
00465 };
00466 
00467 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN.  */
00468 static const yytype_uint8 yyr2[] =
00469 {
00470        0,     2,     1,     1,     1,     3,     3,     3,     3,     3,
00471        4,     4,     4,     4,     2,     3,     3
00472 };
00473 
00474 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
00475    STATE-NUM when YYTABLE doesn't specify something else to do.  Zero
00476    means the default is an error.  */
00477 static const yytype_uint8 yydefact[] =
00478 {
00479        0,     3,     4,     0,     0,     0,     0,     0,     0,     0,
00480        0,     2,     0,     0,     0,     0,    14,     0,     0,     1,
00481        0,     0,     0,     0,     0,     0,     0,     0,     0,    16,
00482       15,     5,     6,     7,     8,     9,    10,    11,    13,    12
00483 };
00484 
00485 /* YYDEFGOTO[NTERM-NUM].  */
00486 static const yytype_int8 yydefgoto[] =
00487 {
00488       -1,    10,    11
00489 };
00490 
00491 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
00492    STATE-NUM.  */
00493 #define YYPACT_NINF -12
00494 static const yytype_int8 yypact[] =
00495 {
00496       15,   -12,   -12,   -11,   -10,    10,    12,    15,    15,    15,
00497       27,    66,    15,    15,    15,    15,    -2,    31,    23,   -12,
00498       15,    15,    15,    15,    15,    38,    45,    52,    59,   -12,
00499      -12,    -2,    -2,    -1,    -1,    -1,   -12,   -12,   -12,   -12
00500 };
00501 
00502 /* YYPGOTO[NTERM-NUM].  */
00503 static const yytype_int8 yypgoto[] =
00504 {
00505      -12,   -12,    -7
00506 };
00507 
00508 /* YYTABLE[YYPACT[STATE-NUM]].  What to do in state STATE-NUM.  If
00509    positive, shift that token.  If negative, reduce the rule which
00510    number is the opposite.  If zero, do what YYDEFACT says.
00511    If YYTABLE_NINF, syntax error.  */
00512 #define YYTABLE_NINF -1
00513 static const yytype_uint8 yytable[] =
00514 {
00515       16,    17,    18,    12,    13,    25,    26,    27,    28,    22,
00516       23,    24,    24,    31,    32,    33,    34,    35,     1,     2,
00517        3,     4,     5,     6,    14,     7,    15,    19,     0,     8,
00518        0,     9,    20,    21,    22,    23,    24,     0,     0,    30,
00519       20,    21,    22,    23,    24,     0,    29,    20,    21,    22,
00520       23,    24,     0,    36,    20,    21,    22,    23,    24,     0,
00521       37,    20,    21,    22,    23,    24,     0,    38,    20,    21,
00522       22,    23,    24,     0,    39,    20,    21,    22,    23,    24
00523 };
00524 
00525 static const yytype_int8 yycheck[] =
00526 {
00527        7,     8,     9,    14,    14,    12,    13,    14,    15,    11,
00528       12,    13,    13,    20,    21,    22,    23,    24,     3,     4,
00529        5,     6,     7,     8,    14,    10,    14,     0,    -1,    14,
00530       -1,    16,     9,    10,    11,    12,    13,    -1,    -1,    16,
00531        9,    10,    11,    12,    13,    -1,    15,     9,    10,    11,
00532       12,    13,    -1,    15,     9,    10,    11,    12,    13,    -1,
00533       15,     9,    10,    11,    12,    13,    -1,    15,     9,    10,
00534       11,    12,    13,    -1,    15,     9,    10,    11,    12,    13
00535 };
00536 
00537 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
00538    symbol of state STATE-NUM.  */
00539 static const yytype_uint8 yystos[] =
00540 {
00541        0,     3,     4,     5,     6,     7,     8,    10,    14,    16,
00542       18,    19,    14,    14,    14,    14,    19,    19,    19,     0,
00543        9,    10,    11,    12,    13,    19,    19,    19,    19,    15,
00544       16,    19,    19,    19,    19,    19,    15,    15,    15,    15
00545 };
00546 
00547 #define yyerrok         (yyerrstatus = 0)
00548 #define yyclearin       (yychar = YYEMPTY)
00549 #define YYEMPTY         (-2)
00550 #define YYEOF           0
00551 
00552 #define YYACCEPT        goto yyacceptlab
00553 #define YYABORT         goto yyabortlab
00554 #define YYERROR         goto yyerrorlab
00555 
00556 
00557 /* Like YYERROR except do call yyerror.  This remains here temporarily
00558    to ease the transition to the new meaning of YYERROR, for GCC.
00559    Once GCC version 2 has supplanted version 1, this can go.  */
00560 
00561 #define YYFAIL          goto yyerrlab
00562 
00563 #define YYRECOVERING()  (!!yyerrstatus)
00564 
00565 #define YYBACKUP(Token, Value)                                  \
00566 do                                                              \
00567   if (yychar == YYEMPTY && yylen == 1)                          \
00568     {                                                           \
00569       yychar = (Token);                                         \
00570       yylval = (Value);                                         \
00571       yytoken = YYTRANSLATE (yychar);                           \
00572       YYPOPSTACK (1);                                           \
00573       goto yybackup;                                            \
00574     }                                                           \
00575   else                                                          \
00576     {                                                           \
00577       yyerror (YY_("syntax error: cannot back up")); \
00578       YYERROR;                                                  \
00579     }                                                           \
00580 while (YYID (0))
00581 
00582 
00583 #define YYTERROR        1
00584 #define YYERRCODE       256
00585 
00586 
00587 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
00588    If N is 0, then set CURRENT to the empty location which ends
00589    the previous symbol: RHS[0] (always defined).  */
00590 
00591 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
00592 #ifndef YYLLOC_DEFAULT
00593 # define YYLLOC_DEFAULT(Current, Rhs, N)                                \
00594     do                                                                  \
00595       if (YYID (N))                                                    \
00596         {                                                               \
00597           (Current).first_line   = YYRHSLOC (Rhs, 1).first_line;        \
00598           (Current).first_column = YYRHSLOC (Rhs, 1).first_column;      \
00599           (Current).last_line    = YYRHSLOC (Rhs, N).last_line;         \
00600           (Current).last_column  = YYRHSLOC (Rhs, N).last_column;       \
00601         }                                                               \
00602       else                                                              \
00603         {                                                               \
00604           (Current).first_line   = (Current).last_line   =              \
00605             YYRHSLOC (Rhs, 0).last_line;                                \
00606           (Current).first_column = (Current).last_column =              \
00607             YYRHSLOC (Rhs, 0).last_column;                              \
00608         }                                                               \
00609     while (YYID (0))
00610 #endif
00611 
00612 
00613 /* YY_LOCATION_PRINT -- Print the location on the stream.
00614    This macro was not mandated originally: define only if we know
00615    we won't break user code: when these are the locations we know.  */
00616 
00617 #ifndef YY_LOCATION_PRINT
00618 # if YYLTYPE_IS_TRIVIAL
00619 #  define YY_LOCATION_PRINT(File, Loc)                  \
00620      fprintf (File, "%d.%d-%d.%d",                      \
00621               (Loc).first_line, (Loc).first_column,     \
00622               (Loc).last_line,  (Loc).last_column)
00623 # else
00624 #  define YY_LOCATION_PRINT(File, Loc) ((void) 0)
00625 # endif
00626 #endif
00627 
00628 
00629 /* YYLEX -- calling `yylex' with the right arguments.  */
00630 
00631 #ifdef YYLEX_PARAM
00632 # define YYLEX yylex (YYLEX_PARAM)
00633 #else
00634 # define YYLEX yylex ()
00635 #endif
00636 
00637 /* Enable debugging if requested.  */
00638 #if YYDEBUG
00639 
00640 # ifndef YYFPRINTF
00641 #  include <stdio.h> /* INFRINGES ON USER NAME SPACE */
00642 #  define YYFPRINTF fprintf
00643 # endif
00644 
00645 # define YYDPRINTF(Args)                        \
00646 do {                                            \
00647   if (yydebug)                                  \
00648     YYFPRINTF Args;                             \
00649 } while (YYID (0))
00650 
00651 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)                    \
00652 do {                                                                      \
00653   if (yydebug)                                                            \
00654     {                                                                     \
00655       YYFPRINTF (stderr, "%s ", Title);                                   \
00656       yy_symbol_print (stderr,                                            \
00657                   Type, Value); \
00658       YYFPRINTF (stderr, "\n");                                           \
00659     }                                                                     \
00660 } while (YYID (0))
00661 
00662 
00663 /*--------------------------------.
00664 | Print this symbol on YYOUTPUT.  |
00665 `--------------------------------*/
00666 
00667 /*ARGSUSED*/
00668 #if (defined __STDC__ || defined __C99__FUNC__ \
00669      || defined __cplusplus || defined _MSC_VER)
00670 static void
00671 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
00672 #else
00673 static void
00674 yy_symbol_value_print (yyoutput, yytype, yyvaluep)
00675     FILE *yyoutput;
00676     int yytype;
00677     YYSTYPE const * const yyvaluep;
00678 #endif
00679 {
00680   if (!yyvaluep)
00681     return;
00682 # ifdef YYPRINT
00683   if (yytype < YYNTOKENS)
00684     YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
00685 # else
00686   YYUSE (yyoutput);
00687 # endif
00688   switch (yytype)
00689     {
00690       default:
00691         break;
00692     }
00693 }
00694 
00695 
00696 /*--------------------------------.
00697 | Print this symbol on YYOUTPUT.  |
00698 `--------------------------------*/
00699 
00700 #if (defined __STDC__ || defined __C99__FUNC__ \
00701      || defined __cplusplus || defined _MSC_VER)
00702 static void
00703 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
00704 #else
00705 static void
00706 yy_symbol_print (yyoutput, yytype, yyvaluep)
00707     FILE *yyoutput;
00708     int yytype;
00709     YYSTYPE const * const yyvaluep;
00710 #endif
00711 {
00712   if (yytype < YYNTOKENS)
00713     YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
00714   else
00715     YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
00716 
00717   yy_symbol_value_print (yyoutput, yytype, yyvaluep);
00718   YYFPRINTF (yyoutput, ")");
00719 }
00720 
00721 /*------------------------------------------------------------------.
00722 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
00723 | TOP (included).                                                   |
00724 `------------------------------------------------------------------*/
00725 
00726 #if (defined __STDC__ || defined __C99__FUNC__ \
00727      || defined __cplusplus || defined _MSC_VER)
00728 static void
00729 yy_stack_print (yytype_int16 *bottom, yytype_int16 *top)
00730 #else
00731 static void
00732 yy_stack_print (bottom, top)
00733     yytype_int16 *bottom;
00734     yytype_int16 *top;
00735 #endif
00736 {
00737   YYFPRINTF (stderr, "Stack now");
00738   for (; bottom <= top; ++bottom)
00739     YYFPRINTF (stderr, " %d", *bottom);
00740   YYFPRINTF (stderr, "\n");
00741 }
00742 
00743 # define YY_STACK_PRINT(Bottom, Top)                            \
00744 do {                                                            \
00745   if (yydebug)                                                  \
00746     yy_stack_print ((Bottom), (Top));                           \
00747 } while (YYID (0))
00748 
00749 
00750 /*------------------------------------------------.
00751 | Report that the YYRULE is going to be reduced.  |
00752 `------------------------------------------------*/
00753 
00754 #if (defined __STDC__ || defined __C99__FUNC__ \
00755      || defined __cplusplus || defined _MSC_VER)
00756 static void
00757 yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
00758 #else
00759 static void
00760 yy_reduce_print (yyvsp, yyrule)
00761     YYSTYPE *yyvsp;
00762     int yyrule;
00763 #endif
00764 {
00765   int yynrhs = yyr2[yyrule];
00766   int yyi;
00767   unsigned long int yylno = yyrline[yyrule];
00768   YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
00769              yyrule - 1, yylno);
00770   /* The symbols being reduced.  */
00771   for (yyi = 0; yyi < yynrhs; yyi++)
00772     {
00773       fprintf (stderr, "   $%d = ", yyi + 1);
00774       yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
00775                        &(yyvsp[(yyi + 1) - (yynrhs)])
00776                                        );
00777       fprintf (stderr, "\n");
00778     }
00779 }
00780 
00781 # define YY_REDUCE_PRINT(Rule)          \
00782 do {                                    \
00783   if (yydebug)                          \
00784     yy_reduce_print (yyvsp, Rule); \
00785 } while (YYID (0))
00786 
00787 /* Nonzero means print parse trace.  It is left uninitialized so that
00788    multiple parsers can coexist.  */
00789 int yydebug;
00790 #else /* !YYDEBUG */
00791 # define YYDPRINTF(Args)
00792 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
00793 # define YY_STACK_PRINT(Bottom, Top)
00794 # define YY_REDUCE_PRINT(Rule)
00795 #endif /* !YYDEBUG */
00796 
00797 
00798 /* YYINITDEPTH -- initial size of the parser's stacks.  */
00799 #ifndef YYINITDEPTH
00800 # define YYINITDEPTH 200
00801 #endif
00802 
00803 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
00804    if the built-in stack extension method is used).
00805 
00806    Do not make this value too large; the results are undefined if
00807    YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
00808    evaluated with infinite-precision integer arithmetic.  */
00809 
00810 #ifndef YYMAXDEPTH
00811 # define YYMAXDEPTH 10000
00812 #endif
00813 
00814 
00815 
00816 #if YYERROR_VERBOSE
00817 
00818 # ifndef yystrlen
00819 #  if defined __GLIBC__ && defined _STRING_H
00820 #   define yystrlen strlen
00821 #  else
00822 /* Return the length of YYSTR.  */
00823 #if (defined __STDC__ || defined __C99__FUNC__ \
00824      || defined __cplusplus || defined _MSC_VER)
00825 static YYSIZE_T
00826 yystrlen (const char *yystr)
00827 #else
00828 static YYSIZE_T
00829 yystrlen (yystr)
00830     const char *yystr;
00831 #endif
00832 {
00833   YYSIZE_T yylen;
00834   for (yylen = 0; yystr[yylen]; yylen++)
00835     continue;
00836   return yylen;
00837 }
00838 #  endif
00839 # endif
00840 
00841 # ifndef yystpcpy
00842 #  if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
00843 #   define yystpcpy stpcpy
00844 #  else
00845 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
00846    YYDEST.  */
00847 #if (defined __STDC__ || defined __C99__FUNC__ \
00848      || defined __cplusplus || defined _MSC_VER)
00849 static char *
00850 yystpcpy (char *yydest, const char *yysrc)
00851 #else
00852 static char *
00853 yystpcpy (yydest, yysrc)
00854     char *yydest;
00855     const char *yysrc;
00856 #endif
00857 {
00858   char *yyd = yydest;
00859   const char *yys = yysrc;
00860 
00861   while ((*yyd++ = *yys++) != '\0')
00862     continue;
00863 
00864   return yyd - 1;
00865 }
00866 #  endif
00867 # endif
00868 
00869 # ifndef yytnamerr
00870 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
00871    quotes and backslashes, so that it's suitable for yyerror.  The
00872    heuristic is that double-quoting is unnecessary unless the string
00873    contains an apostrophe, a comma, or backslash (other than
00874    backslash-backslash).  YYSTR is taken from yytname.  If YYRES is
00875    null, do not copy; instead, return the length of what the result
00876    would have been.  */
00877 static YYSIZE_T
00878 yytnamerr (char *yyres, const char *yystr)
00879 {
00880   if (*yystr == '"')
00881     {
00882       YYSIZE_T yyn = 0;
00883       char const *yyp = yystr;
00884 
00885       for (;;)
00886         switch (*++yyp)
00887           {
00888           case '\'':
00889           case ',':
00890             goto do_not_strip_quotes;
00891 
00892           case '\\':
00893             if (*++yyp != '\\')
00894               goto do_not_strip_quotes;
00895             /* Fall through.  */
00896           default:
00897             if (yyres)
00898               yyres[yyn] = *yyp;
00899             yyn++;
00900             break;
00901 
00902           case '"':
00903             if (yyres)
00904               yyres[yyn] = '\0';
00905             return yyn;
00906           }
00907     do_not_strip_quotes: ;
00908     }
00909 
00910   if (! yyres)
00911     return yystrlen (yystr);
00912 
00913   return yystpcpy (yyres, yystr) - yyres;
00914 }
00915 # endif
00916 
00917 /* Copy into YYRESULT an error message about the unexpected token
00918    YYCHAR while in state YYSTATE.  Return the number of bytes copied,
00919    including the terminating null byte.  If YYRESULT is null, do not
00920    copy anything; just return the number of bytes that would be
00921    copied.  As a special case, return 0 if an ordinary "syntax error"
00922    message will do.  Return YYSIZE_MAXIMUM if overflow occurs during
00923    size calculation.  */
00924 static YYSIZE_T
00925 yysyntax_error (char *yyresult, int yystate, int yychar)
00926 {
00927   int yyn = yypact[yystate];
00928 
00929   if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
00930     return 0;
00931   else
00932     {
00933       int yytype = YYTRANSLATE (yychar);
00934       YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
00935       YYSIZE_T yysize = yysize0;
00936       YYSIZE_T yysize1;
00937       int yysize_overflow = 0;
00938       enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
00939       char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
00940       int yyx;
00941 
00942 # if 0
00943       /* This is so xgettext sees the translatable formats that are
00944          constructed on the fly.  */
00945       YY_("syntax error, unexpected %s");
00946       YY_("syntax error, unexpected %s, expecting %s");
00947       YY_("syntax error, unexpected %s, expecting %s or %s");
00948       YY_("syntax error, unexpected %s, expecting %s or %s or %s");
00949       YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
00950 # endif
00951       char *yyfmt;
00952       char const *yyf;
00953       static char const yyunexpected[] = "syntax error, unexpected %s";
00954       static char const yyexpecting[] = ", expecting %s";
00955       static char const yyor[] = " or %s";
00956       char yyformat[sizeof yyunexpected
00957                     + sizeof yyexpecting - 1
00958                     + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
00959                        * (sizeof yyor - 1))];
00960       char const *yyprefix = yyexpecting;
00961 
00962       /* Start YYX at -YYN if negative to avoid negative indexes in
00963          YYCHECK.  */
00964       int yyxbegin = yyn < 0 ? -yyn : 0;
00965 
00966       /* Stay within bounds of both yycheck and yytname.  */
00967       int yychecklim = YYLAST - yyn + 1;
00968       int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
00969       int yycount = 1;
00970 
00971       yyarg[0] = yytname[yytype];
00972       yyfmt = yystpcpy (yyformat, yyunexpected);
00973 
00974       for (yyx = yyxbegin; yyx < yyxend; ++yyx)
00975         if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
00976           {
00977             if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
00978               {
00979                 yycount = 1;
00980                 yysize = yysize0;
00981                 yyformat[sizeof yyunexpected - 1] = '\0';
00982                 break;
00983               }
00984             yyarg[yycount++] = yytname[yyx];
00985             yysize1 = yysize + yytnamerr (0, yytname[yyx]);
00986             yysize_overflow |= (yysize1 < yysize);
00987             yysize = yysize1;
00988             yyfmt = yystpcpy (yyfmt, yyprefix);
00989             yyprefix = yyor;
00990           }
00991 
00992       yyf = YY_(yyformat);
00993       yysize1 = yysize + yystrlen (yyf);
00994       yysize_overflow |= (yysize1 < yysize);
00995       yysize = yysize1;
00996 
00997       if (yysize_overflow)
00998         return YYSIZE_MAXIMUM;
00999 
01000       if (yyresult)
01001         {
01002           /* Avoid sprintf, as that infringes on the user's name space.
01003              Don't have undefined behavior even if the translation
01004              produced a string with the wrong number of "%s"s.  */
01005           char *yyp = yyresult;
01006           int yyi = 0;
01007           while ((*yyp = *yyf) != '\0')
01008             {
01009               if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
01010                 {
01011                   yyp += yytnamerr (yyp, yyarg[yyi++]);
01012                   yyf += 2;
01013                 }
01014               else
01015                 {
01016                   yyp++;
01017                   yyf++;
01018                 }
01019             }
01020         }
01021       return yysize;
01022     }
01023 }
01024 #endif /* YYERROR_VERBOSE */
01025 
01026 
01027 /*-----------------------------------------------.
01028 | Release the memory associated to this symbol.  |
01029 `-----------------------------------------------*/
01030 
01031 /*ARGSUSED*/
01032 #if (defined __STDC__ || defined __C99__FUNC__ \
01033      || defined __cplusplus || defined _MSC_VER)
01034 static void
01035 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
01036 #else
01037 static void
01038 yydestruct (yymsg, yytype, yyvaluep)
01039     const char *yymsg;
01040     int yytype;
01041     YYSTYPE *yyvaluep;
01042 #endif
01043 {
01044   YYUSE (yyvaluep);
01045 
01046   if (!yymsg)
01047     yymsg = "Deleting";
01048   YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
01049 
01050   switch (yytype)
01051     {
01052 
01053       default:
01054         break;
01055     }
01056 }
01057 
01058 
01059 /* Prevent warnings from -Wmissing-prototypes.  */
01060 
01061 #ifdef YYPARSE_PARAM
01062 #if defined __STDC__ || defined __cplusplus
01063 int yyparse (void *YYPARSE_PARAM);
01064 #else
01065 int yyparse ();
01066 #endif
01067 #else /* ! YYPARSE_PARAM */
01068 #if defined __STDC__ || defined __cplusplus
01069 int yyparse (void);
01070 #else
01071 int yyparse ();
01072 #endif
01073 #endif /* ! YYPARSE_PARAM */
01074 
01075 
01076 
01077 /* The look-ahead symbol.  */
01078 int yychar;
01079 
01080 /* The semantic value of the look-ahead symbol.  */
01081 YYSTYPE yylval;
01082 
01083 /* Number of syntax errors so far.  */
01084 int yynerrs;
01085 
01086 
01087 
01088 /*----------.
01089 | yyparse.  |
01090 `----------*/
01091 
01092 #ifdef YYPARSE_PARAM
01093 #if (defined __STDC__ || defined __C99__FUNC__ \
01094      || defined __cplusplus || defined _MSC_VER)
01095 int
01096 yyparse (void *YYPARSE_PARAM)
01097 #else
01098 int
01099 yyparse (YYPARSE_PARAM)
01100     void *YYPARSE_PARAM;
01101 #endif
01102 #else /* ! YYPARSE_PARAM */
01103 #if (defined __STDC__ || defined __C99__FUNC__ \
01104      || defined __cplusplus || defined _MSC_VER)
01105 int
01106 yyparse (void)
01107 #else
01108 int
01109 yyparse ()
01110 
01111 #endif
01112 #endif
01113 {
01114   
01115   int yystate;
01116   int yyn;
01117   int yyresult;
01118   /* Number of tokens to shift before error messages enabled.  */
01119   int yyerrstatus;
01120   /* Look-ahead token as an internal (translated) token number.  */
01121   int yytoken = 0;
01122 #if YYERROR_VERBOSE
01123   /* Buffer for error messages, and its allocated size.  */
01124   char yymsgbuf[128];
01125   char *yymsg = yymsgbuf;
01126   YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
01127 #endif
01128 
01129   /* Three stacks and their tools:
01130      `yyss': related to states,
01131      `yyvs': related to semantic values,
01132      `yyls': related to locations.
01133 
01134      Refer to the stacks thru separate pointers, to allow yyoverflow
01135      to reallocate them elsewhere.  */
01136 
01137   /* The state stack.  */
01138   yytype_int16 yyssa[YYINITDEPTH];
01139   yytype_int16 *yyss = yyssa;
01140   yytype_int16 *yyssp;
01141 
01142   /* The semantic value stack.  */
01143   YYSTYPE yyvsa[YYINITDEPTH];
01144   YYSTYPE *yyvs = yyvsa;
01145   YYSTYPE *yyvsp;
01146 
01147 
01148 
01149 #define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N))
01150 
01151   YYSIZE_T yystacksize = YYINITDEPTH;
01152 
01153   /* The variables used to return semantic value and location from the
01154      action routines.  */
01155   YYSTYPE yyval;
01156 
01157 
01158   /* The number of symbols on the RHS of the reduced rule.
01159      Keep to zero when no symbol should be popped.  */
01160   int yylen = 0;
01161 
01162   YYDPRINTF ((stderr, "Starting parse\n"));
01163 
01164   yystate = 0;
01165   yyerrstatus = 0;
01166   yynerrs = 0;
01167   yychar = YYEMPTY;             /* Cause a token to be read.  */
01168 
01169   /* Initialize stack pointers.
01170      Waste one element of value and location stack
01171      so that they stay on the same level as the state stack.
01172      The wasted elements are never initialized.  */
01173 
01174   yyssp = yyss;
01175   yyvsp = yyvs;
01176 
01177   goto yysetstate;
01178 
01179 /*------------------------------------------------------------.
01180 | yynewstate -- Push a new state, which is found in yystate.  |
01181 `------------------------------------------------------------*/
01182  yynewstate:
01183   /* In all cases, when you get here, the value and location stacks
01184      have just been pushed.  So pushing a state here evens the stacks.  */
01185   yyssp++;
01186 
01187  yysetstate:
01188   *yyssp = yystate;
01189 
01190   if (yyss + yystacksize - 1 <= yyssp)
01191     {
01192       /* Get the current used size of the three stacks, in elements.  */
01193       YYSIZE_T yysize = yyssp - yyss + 1;
01194 
01195 #ifdef yyoverflow
01196       {
01197         /* Give user a chance to reallocate the stack.  Use copies of
01198            these so that the &'s don't force the real ones into
01199            memory.  */
01200         YYSTYPE *yyvs1 = yyvs;
01201         yytype_int16 *yyss1 = yyss;
01202 
01203 
01204         /* Each stack pointer address is followed by the size of the
01205            data in use in that stack, in bytes.  This used to be a
01206            conditional around just the two extra args, but that might
01207            be undefined if yyoverflow is a macro.  */
01208         yyoverflow (YY_("memory exhausted"),
01209                     &yyss1, yysize * sizeof (*yyssp),
01210                     &yyvs1, yysize * sizeof (*yyvsp),
01211 
01212                     &yystacksize);
01213 
01214         yyss = yyss1;
01215         yyvs = yyvs1;
01216       }
01217 #else /* no yyoverflow */
01218 # ifndef YYSTACK_RELOCATE
01219       goto yyexhaustedlab;
01220 # else
01221       /* Extend the stack our own way.  */
01222       if (YYMAXDEPTH <= yystacksize)
01223         goto yyexhaustedlab;
01224       yystacksize *= 2;
01225       if (YYMAXDEPTH < yystacksize)
01226         yystacksize = YYMAXDEPTH;
01227 
01228       {
01229         yytype_int16 *yyss1 = yyss;
01230         union yyalloc *yyptr =
01231           (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
01232         if (! yyptr)
01233           goto yyexhaustedlab;
01234         YYSTACK_RELOCATE (yyss);
01235         YYSTACK_RELOCATE (yyvs);
01236 
01237 #  undef YYSTACK_RELOCATE
01238         if (yyss1 != yyssa)
01239           YYSTACK_FREE (yyss1);
01240       }
01241 # endif
01242 #endif /* no yyoverflow */
01243 
01244       yyssp = yyss + yysize - 1;
01245       yyvsp = yyvs + yysize - 1;
01246 
01247 
01248       YYDPRINTF ((stderr, "Stack size increased to %lu\n",
01249                   (unsigned long int) yystacksize));
01250 
01251       if (yyss + yystacksize - 1 <= yyssp)
01252         YYABORT;
01253     }
01254 
01255   YYDPRINTF ((stderr, "Entering state %d\n", yystate));
01256 
01257   goto yybackup;
01258 
01259 /*-----------.
01260 | yybackup.  |
01261 `-----------*/
01262 yybackup:
01263 
01264   /* Do appropriate processing given the current state.  Read a
01265      look-ahead token if we need one and don't already have one.  */
01266 
01267   /* First try to decide what to do without reference to look-ahead token.  */
01268   yyn = yypact[yystate];
01269   if (yyn == YYPACT_NINF)
01270     goto yydefault;
01271 
01272   /* Not known => get a look-ahead token if don't already have one.  */
01273 
01274   /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol.  */
01275   if (yychar == YYEMPTY)
01276     {
01277       YYDPRINTF ((stderr, "Reading a token: "));
01278       yychar = YYLEX;
01279     }
01280 
01281   if (yychar <= YYEOF)
01282     {
01283       yychar = yytoken = YYEOF;
01284       YYDPRINTF ((stderr, "Now at end of input.\n"));
01285     }
01286   else
01287     {
01288       yytoken = YYTRANSLATE (yychar);
01289       YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
01290     }
01291 
01292   /* If the proper action on seeing token YYTOKEN is to reduce or to
01293      detect an error, take that action.  */
01294   yyn += yytoken;
01295   if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
01296     goto yydefault;
01297   yyn = yytable[yyn];
01298   if (yyn <= 0)
01299     {
01300       if (yyn == 0 || yyn == YYTABLE_NINF)
01301         goto yyerrlab;
01302       yyn = -yyn;
01303       goto yyreduce;
01304     }
01305 
01306   if (yyn == YYFINAL)
01307     YYACCEPT;
01308 
01309   /* Count tokens shifted since error; after three, turn off error
01310      status.  */
01311   if (yyerrstatus)
01312     yyerrstatus--;
01313 
01314   /* Shift the look-ahead token.  */
01315   YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
01316 
01317   /* Discard the shifted token unless it is eof.  */
01318   if (yychar != YYEOF)
01319     yychar = YYEMPTY;
01320 
01321   yystate = yyn;
01322   *++yyvsp = yylval;
01323 
01324   goto yynewstate;
01325 
01326 
01327 /*-----------------------------------------------------------.
01328 | yydefault -- do the default action for the current state.  |
01329 `-----------------------------------------------------------*/
01330 yydefault:
01331   yyn = yydefact[yystate];
01332   if (yyn == 0)
01333     goto yyerrlab;
01334   goto yyreduce;
01335 
01336 
01337 /*-----------------------------.
01338 | yyreduce -- Do a reduction.  |
01339 `-----------------------------*/
01340 yyreduce:
01341   /* yyn is the number of a rule to reduce with.  */
01342   yylen = yyr2[yyn];
01343 
01344   /* If YYLEN is nonzero, implement the default value of the action:
01345      `$$ = $1'.
01346 
01347      Otherwise, the following line sets YYVAL to garbage.
01348      This behavior is undocumented and Bison
01349      users should not rely upon it.  Assigning to YYVAL
01350      unconditionally makes the parser a bit smaller, and it avoids a
01351      GCC warning that YYVAL may be used uninitialized.  */
01352   yyval = yyvsp[1-yylen];
01353 
01354 
01355   YY_REDUCE_PRINT (yyn);
01356   switch (yyn)
01357     {
01358         case 2:
01359 #line 42 "feature_parse.y"
01360     { 
01361                                feature_parse_op tmp;  
01362                                tmp.op_code = FPOP_RES; tmp.op_arg.reg[0] = (yyvsp[(1) - (1)].ival); 
01363                                op_stack.push_back( tmp );
01364                         ;}
01365     break;
01366 
01367   case 3:
01368 #line 51 "feature_parse.y"
01369     { 
01370                                 feature_parse_op tmp;  
01371                                 tmp.op_code = FPOP_SET; tmp.op_arg.val = (yyvsp[(1) - (1)].dval); tmp.mem_store = mem_stack;
01372                                 op_stack.push_back( tmp );
01373                                 (yyval.ival) = mem_stack++;
01374                         ;}
01375     break;
01376 
01377   case 4:
01378 #line 57 "feature_parse.y"
01379     { 
01380                                 feature_parse_op tmp;  
01381                                 tmp.op_code = FPOP_GET; tmp.op_arg.reg[0] = (yyvsp[(1) - (1)].ival); tmp.mem_store = mem_stack;
01382                                 op_stack.push_back( tmp );
01383                                 (yyval.ival) = mem_stack++;
01384                         ;}
01385     break;
01386 
01387   case 5:
01388 #line 63 "feature_parse.y"
01389     { 
01390                                 feature_parse_op tmp;  
01391                                 tmp.op_code = FPOP_ADD; tmp.op_arg.reg[0] = (yyvsp[(1) - (3)].ival); tmp.op_arg.reg[1] = (yyvsp[(3) - (3)].ival); tmp.mem_store = mem_stack;
01392                                 op_stack.push_back( tmp );
01393                                 (yyval.ival) = mem_stack++;
01394                                                                         ;}
01395     break;
01396 
01397   case 6:
01398 #line 69 "feature_parse.y"
01399     { 
01400                                 feature_parse_op tmp;  
01401                                 tmp.op_code = FPOP_SUB; tmp.op_arg.reg[0] = (yyvsp[(1) - (3)].ival); tmp.op_arg.reg[1] = (yyvsp[(3) - (3)].ival); tmp.mem_store = mem_stack;
01402                                 op_stack.push_back( tmp );
01403                                 (yyval.ival) = mem_stack++;
01404                                 ;}
01405     break;
01406 
01407   case 7:
01408 #line 75 "feature_parse.y"
01409     { 
01410                                 feature_parse_op tmp;  
01411                                 tmp.op_code = FPOP_MUL; tmp.op_arg.reg[0] = (yyvsp[(1) - (3)].ival); tmp.op_arg.reg[1] = (yyvsp[(3) - (3)].ival); tmp.mem_store = mem_stack;
01412                                 op_stack.push_back( tmp );
01413                                 (yyval.ival) = mem_stack++;
01414                                                                         ;}
01415     break;
01416 
01417   case 8:
01418 #line 81 "feature_parse.y"
01419     { 
01420                                 feature_parse_op tmp;  
01421                                 tmp.op_code = FPOP_DIV; tmp.op_arg.reg[0] = (yyvsp[(1) - (3)].ival); tmp.op_arg.reg[1] = (yyvsp[(3) - (3)].ival); tmp.mem_store = mem_stack;
01422                                 op_stack.push_back( tmp );
01423                                 (yyval.ival) = mem_stack++;
01424                                                                         ;}
01425     break;
01426 
01427   case 9:
01428 #line 87 "feature_parse.y"
01429     { 
01430                                 feature_parse_op tmp;  
01431                                 tmp.op_code = FPOP_POW; tmp.op_arg.reg[0] = (yyvsp[(1) - (3)].ival); tmp.op_arg.reg[1] = (yyvsp[(3) - (3)].ival); tmp.mem_store = mem_stack;
01432                                 op_stack.push_back( tmp );
01433                                 (yyval.ival) = mem_stack++;
01434                                                                         ;}
01435     break;
01436 
01437   case 10:
01438 #line 93 "feature_parse.y"
01439     { 
01440                                 feature_parse_op tmp;  
01441                                 tmp.op_code = FPOP_SRT; tmp.op_arg.reg[0] = (yyvsp[(3) - (4)].ival); tmp.mem_store = mem_stack;
01442                                 op_stack.push_back( tmp );
01443                                 (yyval.ival) = mem_stack++;
01444                                 ;}
01445     break;
01446 
01447   case 11:
01448 #line 99 "feature_parse.y"
01449     { 
01450                                 feature_parse_op tmp;  
01451                                 tmp.op_code = FPOP_LOG; tmp.op_arg.reg[0] = (yyvsp[(3) - (4)].ival); tmp.mem_store = mem_stack;
01452                                 op_stack.push_back( tmp );
01453                                 (yyval.ival) = mem_stack++;
01454                                 ;}
01455     break;
01456 
01457   case 12:
01458 #line 105 "feature_parse.y"
01459     { 
01460                                 feature_parse_op tmp;  
01461                                 tmp.op_code = FPOP_SIN; tmp.op_arg.reg[0] = (yyvsp[(3) - (4)].ival); tmp.mem_store = mem_stack;
01462                                 op_stack.push_back( tmp );
01463                                 (yyval.ival) = mem_stack++;
01464                                 ;}
01465     break;
01466 
01467   case 13:
01468 #line 111 "feature_parse.y"
01469     { 
01470                                 feature_parse_op tmp;  
01471                                 tmp.op_code = FPOP_COS; tmp.op_arg.reg[0] = (yyvsp[(3) - (4)].ival); tmp.mem_store = mem_stack;
01472                                 op_stack.push_back( tmp );
01473                                 (yyval.ival) = mem_stack++;
01474                                 ;}
01475     break;
01476 
01477   case 14:
01478 #line 117 "feature_parse.y"
01479     { 
01480                                 feature_parse_op tmp;  
01481                                 tmp.op_code = FPOP_NEG; tmp.op_arg.reg[0] = (yyvsp[(2) - (2)].ival); tmp.mem_store = mem_stack;
01482                                 op_stack.push_back( tmp );
01483                                 (yyval.ival) = mem_stack++;
01484                                                                         ;}
01485     break;
01486 
01487   case 15:
01488 #line 123 "feature_parse.y"
01489     { 
01490                                 feature_parse_op tmp;  
01491                                 tmp.op_code = FPOP_ABS; tmp.op_arg.reg[0] = (yyvsp[(2) - (3)].ival); tmp.mem_store = mem_stack;
01492                                 op_stack.push_back( tmp );
01493                                 (yyval.ival) = mem_stack++;
01494                                 ;}
01495     break;
01496 
01497   case 16:
01498 #line 129 "feature_parse.y"
01499     { (yyval.ival) = (yyvsp[(2) - (3)].ival); ;}
01500     break;
01501 
01502 
01503 /* Line 1267 of yacc.c.  */
01504 #line 1505 "feature_parse.tab.c"
01505       default: break;
01506     }
01507   YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
01508 
01509   YYPOPSTACK (yylen);
01510   yylen = 0;
01511   YY_STACK_PRINT (yyss, yyssp);
01512 
01513   *++yyvsp = yyval;
01514 
01515 
01516   /* Now `shift' the result of the reduction.  Determine what state
01517      that goes to, based on the state we popped back to and the rule
01518      number reduced by.  */
01519 
01520   yyn = yyr1[yyn];
01521 
01522   yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
01523   if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
01524     yystate = yytable[yystate];
01525   else
01526     yystate = yydefgoto[yyn - YYNTOKENS];
01527 
01528   goto yynewstate;
01529 
01530 
01531 /*------------------------------------.
01532 | yyerrlab -- here on detecting error |
01533 `------------------------------------*/
01534 yyerrlab:
01535   /* If not already recovering from an error, report this error.  */
01536   if (!yyerrstatus)
01537     {
01538       ++yynerrs;
01539 #if ! YYERROR_VERBOSE
01540       yyerror (YY_("syntax error"));
01541 #else
01542       {
01543         YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
01544         if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
01545           {
01546             YYSIZE_T yyalloc = 2 * yysize;
01547             if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
01548               yyalloc = YYSTACK_ALLOC_MAXIMUM;
01549             if (yymsg != yymsgbuf)
01550               YYSTACK_FREE (yymsg);
01551             yymsg = (char *) YYSTACK_ALLOC (yyalloc);
01552             if (yymsg)
01553               yymsg_alloc = yyalloc;
01554             else
01555               {
01556                 yymsg = yymsgbuf;
01557                 yymsg_alloc = sizeof yymsgbuf;
01558               }
01559           }
01560 
01561         if (0 < yysize && yysize <= yymsg_alloc)
01562           {
01563             (void) yysyntax_error (yymsg, yystate, yychar);
01564             yyerror (yymsg);
01565           }
01566         else
01567           {
01568             yyerror (YY_("syntax error"));
01569             if (yysize != 0)
01570               goto yyexhaustedlab;
01571           }
01572       }
01573 #endif
01574     }
01575 
01576 
01577 
01578   if (yyerrstatus == 3)
01579     {
01580       /* If just tried and failed to reuse look-ahead token after an
01581          error, discard it.  */
01582 
01583       if (yychar <= YYEOF)
01584         {
01585           /* Return failure if at end of input.  */
01586           if (yychar == YYEOF)
01587             YYABORT;
01588         }
01589       else
01590         {
01591           yydestruct ("Error: discarding",
01592                       yytoken, &yylval);
01593           yychar = YYEMPTY;
01594         }
01595     }
01596 
01597   /* Else will try to reuse look-ahead token after shifting the error
01598      token.  */
01599   goto yyerrlab1;
01600 
01601 
01602 /*---------------------------------------------------.
01603 | yyerrorlab -- error raised explicitly by YYERROR.  |
01604 `---------------------------------------------------*/
01605 yyerrorlab:
01606 
01607   /* Pacify compilers like GCC when the user code never invokes
01608      YYERROR and the label yyerrorlab therefore never appears in user
01609      code.  */
01610   if (/*CONSTCOND*/ 0)
01611      goto yyerrorlab;
01612 
01613   /* Do not reclaim the symbols of the rule which action triggered
01614      this YYERROR.  */
01615   YYPOPSTACK (yylen);
01616   yylen = 0;
01617   YY_STACK_PRINT (yyss, yyssp);
01618   yystate = *yyssp;
01619   goto yyerrlab1;
01620 
01621 
01622 /*-------------------------------------------------------------.
01623 | yyerrlab1 -- common code for both syntax error and YYERROR.  |
01624 `-------------------------------------------------------------*/
01625 yyerrlab1:
01626   yyerrstatus = 3;      /* Each real token shifted decrements this.  */
01627 
01628   for (;;)
01629     {
01630       yyn = yypact[yystate];
01631       if (yyn != YYPACT_NINF)
01632         {
01633           yyn += YYTERROR;
01634           if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
01635             {
01636               yyn = yytable[yyn];
01637               if (0 < yyn)
01638                 break;
01639             }
01640         }
01641 
01642       /* Pop the current state because it cannot handle the error token.  */
01643       if (yyssp == yyss)
01644         YYABORT;
01645 
01646 
01647       yydestruct ("Error: popping",
01648                   yystos[yystate], yyvsp);
01649       YYPOPSTACK (1);
01650       yystate = *yyssp;
01651       YY_STACK_PRINT (yyss, yyssp);
01652     }
01653 
01654   if (yyn == YYFINAL)
01655     YYACCEPT;
01656 
01657   *++yyvsp = yylval;
01658 
01659 
01660   /* Shift the error token.  */
01661   YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
01662 
01663   yystate = yyn;
01664   goto yynewstate;
01665 
01666 
01667 /*-------------------------------------.
01668 | yyacceptlab -- YYACCEPT comes here.  |
01669 `-------------------------------------*/
01670 yyacceptlab:
01671   yyresult = 0;
01672   goto yyreturn;
01673 
01674 /*-----------------------------------.
01675 | yyabortlab -- YYABORT comes here.  |
01676 `-----------------------------------*/
01677 yyabortlab:
01678   yyresult = 1;
01679   goto yyreturn;
01680 
01681 #ifndef yyoverflow
01682 /*-------------------------------------------------.
01683 | yyexhaustedlab -- memory exhaustion comes here.  |
01684 `-------------------------------------------------*/
01685 yyexhaustedlab:
01686   yyerror (YY_("memory exhausted"));
01687   yyresult = 2;
01688   /* Fall through.  */
01689 #endif
01690 
01691 yyreturn:
01692   if (yychar != YYEOF && yychar != YYEMPTY)
01693      yydestruct ("Cleanup: discarding lookahead",
01694                  yytoken, &yylval);
01695   /* Do not reclaim the symbols of the rule which action triggered
01696      this YYABORT or YYACCEPT.  */
01697   YYPOPSTACK (yylen);
01698   YY_STACK_PRINT (yyss, yyssp);
01699   while (yyssp != yyss)
01700     {
01701       yydestruct ("Cleanup: popping",
01702                   yystos[*yyssp], yyvsp);
01703       YYPOPSTACK (1);
01704     }
01705 #ifndef yyoverflow
01706   if (yyss != yyssa)
01707     YYSTACK_FREE (yyss);
01708 #endif
01709 #if YYERROR_VERBOSE
01710   if (yymsg != yymsgbuf)
01711     YYSTACK_FREE (yymsg);
01712 #endif
01713   /* Make sure YYID is used.  */
01714   return YYID (yyresult);
01715 }
01716 
01717 
01718 #line 133 "feature_parse.y"
01719  
01720 
01721 
01722 void yyerror (const char *error)
01723 {
01724 //  printf("%s\n", error);
01725 }
01726 

Generated on Wed Apr 11 16:50:49 2007 for open_prospect by  doxygen 1.4.6