Ruby 1.9.2p136(2010-12-25revision30365)

- Main Page
- Modules
- Data Structures
- Files

- File List
- Globals

# ext/syck/gram.c

Go to the documentation of this file.

    00001 /* A Bison parser, made by GNU Bison 1.875d.  */
    00002
    00003 /* Skeleton parser for Yacc-like parsing with Bison,
    00004    Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
    00005
    00006    This program is free software; you can redistribute it and/or modify
    00007    it under the terms of the GNU General Public License as published by
    00008    the Free Software Foundation; either version 2, or (at your option)
    00009    any later version.
    00010
    00011    This program is distributed in the hope that it will be useful,
    00012    but WITHOUT ANY WARRANTY; without even the implied warranty of
    00013    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    00014    GNU General Public License for more details.
    00015
    00016    You should have received a copy of the GNU General Public License
    00017    along with this program; if not, write to the Free Software
    00018    Foundation, Inc., 59 Temple Place - Suite 330,
    00019    Boston, MA 02111-1307, USA.  */
    00020
    00021 /* As a special exception, when this file is copied by Bison into a
    00022    Bison output file, you may use that output file without restriction.
    00023    This special exception was added by the Free Software Foundation
    00024    in version 1.24 of Bison.  */
    00025
    00026 /* Written by Richard Stallman by simplifying the original so called
    00027    ``semantic'' parser.  */
    00028
    00029 /* All symbols defined below should begin with yy or YY, to avoid
    00030    infringing on user name space.  This should be done even for local
    00031    variables, as they might otherwise be expanded by user macros.
    00032    There are some unavoidable exceptions within include files to
    00033    define necessary library symbols; they are noted "INFRINGES ON
    00034    USER NAME SPACE" below.  */
    00035
    00036 /* Identify Bison output.  */
    00037 #define YYBISON 1
    00038
    00039 /* Skeleton name.  */
    00040 #define YYSKELETON_NAME "yacc.c"
    00041
    00042 /* Pure parsers.  */
    00043 #define YYPURE 1
    00044
    00045 /* Using locations.  */
    00046 #define YYLSP_NEEDED 0
    00047
    00048 /* If NAME_PREFIX is specified substitute the variables and functions
    00049    names.  */
    00050 #define yyparse syckparse
    00051 #define yylex   sycklex
    00052 #define yyerror syckerror
    00053 #define yylval  sycklval
    00054 #define yychar  syckchar
    00055 #define yydebug syckdebug
    00056 #define yynerrs sycknerrs
    00057
    00058
    00059 /* Tokens.  */
    00060 #ifndef YYTOKENTYPE
    00061 # define YYTOKENTYPE
    00062    /* Put the tokens into the symbol table, so that GDB and other debuggers
    00063       know about them.  */
    00064    enum yytokentype {
    00065      YAML_ANCHOR = 258,
    00066      YAML_ALIAS = 259,
    00067      YAML_TRANSFER = 260,
    00068      YAML_TAGURI = 261,
    00069      YAML_ITRANSFER = 262,
    00070      YAML_WORD = 263,
    00071      YAML_PLAIN = 264,
    00072      YAML_BLOCK = 265,
    00073      YAML_DOCSEP = 266,
    00074      YAML_IOPEN = 267,
    00075      YAML_INDENT = 268,
    00076      YAML_IEND = 269
    00077    };
    00078 #endif
    00079 #define YAML_ANCHOR 258
    00080 #define YAML_ALIAS 259
    00081 #define YAML_TRANSFER 260
    00082 #define YAML_TAGURI 261
    00083 #define YAML_ITRANSFER 262
    00084 #define YAML_WORD 263
    00085 #define YAML_PLAIN 264
    00086 #define YAML_BLOCK 265
    00087 #define YAML_DOCSEP 266
    00088 #define YAML_IOPEN 267
    00089 #define YAML_INDENT 268
    00090 #define YAML_IEND 269
    00091
    00092
    00093
    00094
    00095 /* Copy the first part of user declarations.  */
    00096 #line 14 "gram.y"
    00097
    00098
    00099 #include "syck.h"
    00100
    00101 void apply_seq_in_map( SyckParser *parser, SyckNode *n );
    00102
    00103 #define YYPARSE_PARAM   parser
    00104 #define YYLEX_PARAM     parser
    00105
    00106 #define NULL_NODE(parser, node) \
    00107         SyckNode *node = syck_new_str( "", scalar_plain ); \
    00108         if ( ((SyckParser *)parser)->taguri_expansion == 1 ) \
    00109         { \
    00110             node->type_id = syck_taguri( YAML_DOMAIN, "null", 4 ); \
    00111         } \
    00112         else \
    00113         { \
    00114             node->type_id = syck_strndup( "null", 4 ); \
    00115         }
    00116
    00117
    00118 /* Enabling traces.  */
    00119 #ifndef YYDEBUG
    00120 # define YYDEBUG 1
    00121 #endif
    00122
    00123 /* Enabling verbose error messages.  */
    00124 #ifdef YYERROR_VERBOSE
    00125 # undef YYERROR_VERBOSE
    00126 # define YYERROR_VERBOSE 1
    00127 #else
    00128 # define YYERROR_VERBOSE 0
    00129 #endif
    00130
    00131 #if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
    00132 #line 35 "gram.y"
    00133 typedef union YYSTYPE {
    00134     SYMID nodeId;
    00135     SyckNode *nodeData;
    00136     char *name;
    00137 } YYSTYPE;
    00138 /* Line 191 of yacc.c.  */
    00139 #line 140 "gram.c"
    00140 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
    00141 # define YYSTYPE_IS_DECLARED 1
    00142 # define YYSTYPE_IS_TRIVIAL 1
    00143 #endif
    00144
    00145
    00146
    00147 /* Copy the second part of user declarations.  */
    00148
    00149
    00150 /* Line 214 of yacc.c.  */
    00151 #line 152 "gram.c"
    00152
    00153 #if ! defined (yyoverflow) || YYERROR_VERBOSE
    00154
    00155 # ifndef YYFREE
    00156 #  define YYFREE free
    00157 # endif
    00158 # ifndef YYMALLOC
    00159 #  define YYMALLOC malloc
    00160 # endif
    00161
    00162 /* The parser invokes alloca or malloc; define the necessary symbols.  */
    00163
    00164 # ifdef YYSTACK_USE_ALLOCA
    00165 #  if YYSTACK_USE_ALLOCA
    00166 #   define YYSTACK_ALLOC alloca
    00167 #  endif
    00168 # else
    00169 #  if defined (alloca) || defined (_ALLOCA_H)
    00170 #   define YYSTACK_ALLOC alloca
    00171 #  else
    00172 #   ifdef __GNUC__
    00173 #    define YYSTACK_ALLOC __builtin_alloca
    00174 #   endif
    00175 #  endif
    00176 # endif
    00177
    00178 # ifdef YYSTACK_ALLOC
    00179    /* Pacify GCC's `empty if-body' warning. */
    00180 #  define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
    00181 # else
    00182 #  if defined (__STDC__) || defined (__cplusplus)
    00183 #   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
    00184 #   define YYSIZE_T size_t
    00185 #  endif
    00186 #  define YYSTACK_ALLOC YYMALLOC
    00187 #  define YYSTACK_FREE YYFREE
    00188 # endif
    00189 #endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */
    00190
    00191
    00192 #if (! defined (yyoverflow) \
    00193      && (! defined (__cplusplus) \
    00194          || (defined (YYSTYPE_IS_TRIVIAL) && YYSTYPE_IS_TRIVIAL)))
    00195
    00196 /* A type that is properly aligned for any stack member.  */
    00197 union yyalloc
    00198 {
    00199   short int yyss;
    00200   YYSTYPE yyvs;
    00201   };
    00202
    00203 /* The size of the maximum gap between one aligned stack and the next.  */
    00204 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
    00205
    00206 /* The size of an array large to enough to hold all stacks, each with
    00207    N elements.  */
    00208 # define YYSTACK_BYTES(N) \
    00209      ((N) * (sizeof (short int) + sizeof (YYSTYPE))                     \
    00210       + YYSTACK_GAP_MAXIMUM)
    00211
    00212 /* Copy COUNT objects from FROM to TO.  The source and destination do
    00213    not overlap.  */
    00214 # ifndef YYCOPY
    00215 #  if defined (__GNUC__) && 1 < __GNUC__
    00216 #   define YYCOPY(To, From, Count) \
    00217       __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
    00218 #  else
    00219 #   define YYCOPY(To, From, Count)              \
    00220       do                                        \
    00221         {                                       \
    00222           register YYSIZE_T yyi;                \
    00223           for (yyi = 0; yyi < (Count); yyi++)   \
    00224             (To)[yyi] = (From)[yyi];            \
    00225         }                                       \
    00226       while (0)
    00227 #  endif
    00228 # endif
    00229
    00230 /* Relocate STACK from its old location to the new one.  The
    00231    local variables YYSIZE and YYSTACKSIZE give the old and new number of
    00232    elements in the stack, and YYPTR gives the new location of the
    00233    stack.  Advance YYPTR to a properly aligned location for the next
    00234    stack.  */
    00235 # define YYSTACK_RELOCATE(Stack)                                        \
    00236     do                                                                  \
    00237       {                                                                 \
    00238         YYSIZE_T yynewbytes;                                            \
    00239         YYCOPY (&yyptr->Stack, Stack, yysize);                          \
    00240         Stack = &yyptr->Stack;                                          \
    00241         yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
    00242         yyptr += yynewbytes / sizeof (*yyptr);                          \
    00243       }                                                                 \
    00244     while (0)
    00245
    00246 #endif
    00247
    00248 #if defined (__STDC__) || defined (__cplusplus)
    00249    typedef signed char yysigned_char;
    00250 #else
    00251    typedef short int yysigned_char;
    00252 #endif
    00253
    00254 /* YYFINAL -- State number of the termination state. */
    00255 #define YYFINAL  52
    00256 /* YYLAST -- Last index in YYTABLE.  */
    00257 #define YYLAST   396
    00258
    00259 /* YYNTOKENS -- Number of terminals. */
    00260 #define YYNTOKENS  23
    00261 /* YYNNTS -- Number of nonterminals. */
    00262 #define YYNNTS  29
    00263 /* YYNRULES -- Number of rules. */
    00264 #define YYNRULES  79
    00265 /* YYNRULES -- Number of states. */
    00266 #define YYNSTATES  128
    00267
    00268 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */
    00269 #define YYUNDEFTOK  2
    00270 #define YYMAXUTOK   269
    00271
    00272 #define YYTRANSLATE(YYX)                                                \
    00273   ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
    00274
    00275 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX.  */
    00276 static const unsigned char yytranslate[] =
    00277 {
    00278        0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    00279        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    00280        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    00281        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    00282        2,     2,     2,     2,    21,    15,     2,     2,     2,     2,
    00283        2,     2,     2,     2,     2,     2,     2,     2,    16,     2,
    00284        2,     2,     2,    22,     2,     2,     2,     2,     2,     2,
    00285        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    00286        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    00287        2,    17,     2,    18,     2,     2,     2,     2,     2,     2,
    00288        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    00289        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    00290        2,     2,     2,    19,     2,    20,     2,     2,     2,     2,
    00291        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    00292        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    00293        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    00294        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    00295        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    00296        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    00297        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    00298        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    00299        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    00300        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    00301        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    00302        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    00303        2,     2,     2,     2,     2,     2,     1,     2,     3,     4,
    00304        5,     6,     7,     8,     9,    10,    11,    12,    13,    14
    00305 };
    00306
    00307 #if YYDEBUG
    00308 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
    00309    YYRHS.  */
    00310 static const unsigned char yyprhs[] =
    00311 {
    00312        0,     0,     3,     5,     8,     9,    11,    13,    15,    18,
    00313       21,    24,    28,    30,    32,    36,    37,    40,    43,    46,
    00314       49,    51,    54,    56,    58,    60,    63,    66,    69,    72,
    00315       75,    77,    79,    81,    85,    87,    89,    91,    93,    95,
    00316       99,   103,   106,   110,   113,   117,   120,   124,   127,   129,
    00317      133,   136,   140,   143,   145,   149,   151,   153,   157,   161,
    00318      165,   168,   172,   175,   179,   182,   184,   188,   190,   194,
    00319      196,   200,   204,   207,   211,   215,   218,   220,   224,   226
    00320 };
    00321
    00322 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
    00323 static const yysigned_char yyrhs[] =
    00324 {
    00325       24,     0,    -1,    25,    -1,    11,    27,    -1,    -1,    33,
    00326       -1,    26,    -1,    34,    -1,     5,    26,    -1,     6,    26,
    00327       -1,     3,    26,    -1,    29,    26,    32,    -1,    25,    -1,
    00328       28,    -1,    29,    28,    30,    -1,    -1,     7,    28,    -1,
    00329        5,    28,    -1,     6,    28,    -1,     3,    28,    -1,    12,
    00330       -1,    29,    13,    -1,    14,    -1,    13,    -1,    14,    -1,
    00331       31,    32,    -1,     5,    33,    -1,     6,    33,    -1,     7,
    00332       33,    -1,     3,    33,    -1,     4,    -1,     8,    -1,     9,
    00333       -1,    29,    33,    32,    -1,    10,    -1,    35,    -1,    39,
    00334       -1,    42,    -1,    49,    -1,    29,    37,    30,    -1,    29,
    00335       38,    30,    -1,    15,    27,    -1,     5,    31,    38,    -1,
    00336        5,    37,    -1,     6,    31,    38,    -1,     6,    37,    -1,
    00337        3,    31,    38,    -1,     3,    37,    -1,    36,    -1,    38,
    00338       31,    36,    -1,    38,    31,    -1,    17,    40,    18,    -1,
    00339       17,    18,    -1,    41,    -1,    40,    21,    41,    -1,    25,
    00340       -1,    48,    -1,    29,    43,    30,    -1,    29,    47,    30,
    00341       -1,     5,    31,    47,    -1,     5,    43,    -1,     6,    31,
    00342       47,    -1,     6,    43,    -1,     3,    31,    47,    -1,     3,
    00343       43,    -1,    33,    -1,    22,    25,    31,    -1,    27,    -1,
    00344       44,    16,    45,    -1,    46,    -1,    47,    31,    36,    -1,
    00345       47,    31,    46,    -1,    47,    31,    -1,    25,    16,    27,
    00346       -1,    19,    50,    20,    -1,    19,    20,    -1,    51,    -1,
    00347       50,    21,    51,    -1,    25,    -1,    48,    -1
    00348 };
    00349
    00350 /* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
    00351 static const unsigned short int yyrline[] =
    00352 {
    00353        0,    56,    56,    60,    65,    70,    71,    74,    75,    80,
    00354       85,    94,   100,   101,   104,   109,   113,   121,   126,   131,
    00355      145,   146,   149,   152,   155,   156,   164,   169,   174,   182,
    00356      186,   194,   207,   208,   218,   219,   220,   221,   222,   228,
    00357      232,   238,   244,   249,   254,   259,   264,   268,   274,   278,
    00358      283,   292,   296,   302,   306,   313,   314,   320,   325,   332,
    00359      337,   342,   347,   352,   356,   362,   363,   369,   379,   396,
    00360      397,   409,   417,   426,   434,   438,   444,   445,   454,   461
    00361 };
    00362 #endif
    00363
    00364 #if YYDEBUG || YYERROR_VERBOSE
    00365 /* YYTNME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
    00366    First, the terminals, then, starting at YYNTOKENS, nonterminals. */
    00367 static const char *const yytname[] =
    00368 {
    00369   "$end", "error", "$undefined", "YAML_ANCHOR", "YAML_ALIAS",
    00370   "YAML_TRANSFER", "YAML_TAGURI", "YAML_ITRANSFER", "YAML_WORD",
    00371   "YAML_PLAIN", "YAML_BLOCK", "YAML_DOCSEP", "YAML_IOPEN", "YAML_INDENT",
    00372   "YAML_IEND", "'-'", "':'", "'['", "']'", "'{'", "'}'", "','", "'?'",
    00373   "$accept", "doc", "atom", "ind_rep", "atom_or_empty", "empty",
    00374   "indent_open", "indent_end", "indent_sep", "indent_flex_end", "word_rep",
    00375   "struct_rep", "implicit_seq", "basic_seq", "top_imp_seq",
    00376   "in_implicit_seq", "inline_seq", "in_inline_seq", "inline_seq_atom",
    00377   "implicit_map", "top_imp_map", "complex_key", "complex_value",
    00378   "complex_mapping", "in_implicit_map", "basic_mapping", "inline_map",
    00379   "in_inline_map", "inline_map_atom", 0
    00380 };
    00381 #endif
    00382
    00383 # ifdef YYPRINT
    00384 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
    00385    token YYLEX-NUM.  */
    00386 static const unsigned short int yytoknum[] =
    00387 {
    00388        0,   256,   257,   258,   259,   260,   261,   262,   263,   264,
    00389      265,   266,   267,   268,   269,    45,    58,    91,    93,   123,
    00390      125,    44,    63
    00391 };
    00392 # endif
    00393
    00394 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
    00395 static const unsigned char yyr1[] =
    00396 {
    00397        0,    23,    24,    24,    24,    25,    25,    26,    26,    26,
    00398       26,    26,    27,    27,    28,    28,    28,    28,    28,    28,
    00399       29,    29,    30,    31,    32,    32,    33,    33,    33,    33,
    00400       33,    33,    33,    33,    34,    34,    34,    34,    34,    35,
    00401       35,    36,    37,    37,    37,    37,    37,    37,    38,    38,
    00402       38,    39,    39,    40,    40,    41,    41,    42,    42,    43,
    00403       43,    43,    43,    43,    43,    44,    44,    45,    46,    47,
    00404       47,    47,    47,    48,    49,    49,    50,    50,    51,    51
    00405 };
    00406
    00407 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN.  */
    00408 static const unsigned char yyr2[] =
    00409 {
    00410        0,     2,     1,     2,     0,     1,     1,     1,     2,     2,
    00411        2,     3,     1,     1,     3,     0,     2,     2,     2,     2,
    00412        1,     2,     1,     1,     1,     2,     2,     2,     2,     2,
    00413        1,     1,     1,     3,     1,     1,     1,     1,     1,     3,
    00414        3,     2,     3,     2,     3,     2,     3,     2,     1,     3,
    00415        2,     3,     2,     1,     3,     1,     1,     3,     3,     3,
    00416        2,     3,     2,     3,     2,     1,     3,     1,     3,     1,
    00417        3,     3,     2,     3,     3,     2,     1,     3,     1,     1
    00418 };
    00419
    00420 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
    00421    STATE-NUM when YYTABLE doesn't specify something else to do.  Zero
    00422    means the default is an error.  */
    00423 static const unsigned char yydefact[] =
    00424 {
    00425        4,     0,    30,     0,     0,     0,    31,    32,    34,    15,
    00426       20,     0,     0,     0,     2,     6,     0,     5,     7,    35,
    00427       36,    37,    38,    10,    29,     8,    26,     9,    27,     0,
    00428        0,     0,     0,    28,    15,    15,    15,    15,    12,     3,
    00429       13,    15,    52,    55,     0,    53,    56,    75,    78,    79,
    00430        0,    76,     1,     0,     0,     0,    21,    15,     0,     0,
    00431       65,    48,     0,     0,     0,     0,    69,     0,     0,    19,
    00432       17,    18,    15,    15,    15,    16,    15,    15,    15,    15,
    00433        0,    15,    51,     0,    74,     0,    23,     0,    47,    64,
    00434        0,    43,    60,     0,    45,    62,    41,     0,    24,     0,
    00435       11,    33,    22,    39,    40,    50,    57,    15,    58,    72,
    00436       14,    73,    54,    77,    65,    46,    63,    42,    59,    44,
    00437       61,    66,    25,    49,    67,    68,    70,    71
    00438 };
    00439
    00440 /* YYDEFGOTO[NTERM-NUM]. */
    00441 static const yysigned_char yydefgoto[] =
    00442 {
    00443       -1,    13,    38,    15,    39,    40,    16,   103,    99,   101,
    00444       17,    18,    19,    61,    62,    63,    20,    44,    45,    21,
    00445       64,    65,   125,    66,    67,    46,    22,    50,    51
    00446 };
    00447
    00448 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
    00449    STATE-NUM.  */
    00450 #define YYPACT_NINF -97
    00451 static const short int yypact[] =
    00452 {
    00453      250,   318,   -97,   318,   318,   374,   -97,   -97,   -97,   335,
    00454      -97,   267,   232,     7,   -97,   -97,   192,   -97,   -97,   -97,
    00455      -97,   -97,   -97,   -97,   -97,   -97,   -97,   -97,   -97,   374,
    00456      374,   374,   352,   -97,   335,   335,   335,   384,   -97,   -97,
    00457      -97,   212,   -97,    10,     0,   -97,   -97,   -97,    10,   -97,
    00458       -4,   -97,   -97,   284,   284,   284,   -97,   335,   318,    30,
    00459       30,   -97,    -2,    36,    -2,    16,   -97,    36,    30,   -97,
    00460      -97,   -97,   384,   384,   384,   -97,   363,   301,   301,   301,
    00461       -2,   335,   -97,   318,   -97,   318,   -97,   158,   -97,   -97,
    00462      158,   -97,   -97,   158,   -97,   -97,   -97,    24,   -97,    30,
    00463      -97,   -97,   -97,   -97,   -97,    26,   -97,   335,   -97,   158,
    00464      -97,   -97,   -97,   -97,   -97,    24,    24,    24,    24,    24,
    00465       24,   -97,   -97,   -97,   -97,   -97,   -97,   -97
    00466 };
    00467
    00468 /* YYPGOTO[NTERM-NUM].  */
    00469 static const yysigned_char yypgoto[] =
    00470 {
    00471      -97,   -97,     8,    81,   -56,   109,    33,   -53,    74,   -54,
    00472       -1,   -97,   -97,   -96,   -31,   -32,   -97,   -97,   -44,   -97,
    00473       77,   -97,   -97,   -52,     9,    -6,   -97,   -97,   -29
    00474 };
    00475
    00476 /* YYTABLE[YYPACT[STATE-NUM]].  What to do in state STATE-NUM.  If
    00477    positive, shift that token.  If negative, reduce the rule which
    00478    number is the opposite.  If zero, do what YYDEFACT says.
    00479    If YYTABLE_NINF, syntax error.  */
    00480 #define YYTABLE_NINF -1
    00481 static const unsigned char yytable[] =
    00482 {
    00483       24,    96,    26,    28,    33,   100,    49,    52,    14,   123,
    00484      104,   106,   102,   126,   108,    60,    84,    85,    82,    43,
    00485       48,    83,    88,    91,    94,   111,    81,   110,    24,    26,
    00486       28,    68,   107,    24,    26,    28,    33,    86,    32,   112,
    00487       60,    57,    41,    86,    98,   122,    88,    91,    94,    86,
    00488      102,   124,    24,    26,    28,   115,   113,   127,   117,     0,
    00489        0,   119,    32,    32,    32,    32,    97,    41,    41,    41,
    00490       76,    24,    26,    28,    41,    68,    24,    26,    28,    49,
    00491        0,     0,    23,     0,    25,    27,   114,     0,     0,   114,
    00492       41,    43,   114,    48,     0,     0,   116,    59,     0,   118,
    00493        0,     0,   120,     0,     0,    76,    76,    76,   114,    76,
    00494       41,    41,    41,     0,    41,    23,    25,    27,     0,     0,
    00495       32,     0,    59,    32,     0,     0,    32,    87,    90,    93,
    00496       89,    92,    95,     0,    23,    25,    27,   105,     0,     0,
    00497       41,   109,    32,    69,    70,    71,    75,     0,     0,     0,
    00498       80,    87,    90,    93,    89,    92,    95,     0,    23,    25,
    00499       27,    29,     2,    30,    31,     5,     6,     7,     0,     0,
    00500       10,   121,     0,    57,     0,     0,     0,     0,     0,     0,
    00501       58,    69,    70,    71,     0,    80,    69,    70,    71,   105,
    00502      109,   105,   109,   105,   109,    53,     2,    54,    55,     5,
    00503        6,     7,     8,     0,    10,    56,     0,    57,     0,    11,
    00504        0,    12,     0,     0,    58,    77,     2,    78,    79,    37,
    00505        6,     7,     8,     0,    10,    56,     0,    57,     0,    11,
    00506        0,    12,     0,     0,    58,     1,     2,     3,     4,     5,
    00507        6,     7,     8,     0,    10,     0,     0,     0,     0,    11,
    00508        0,    12,    47,     1,     2,     3,     4,     5,     6,     7,
    00509        8,     9,    10,     0,     0,     0,     0,    11,     0,    12,
    00510        1,     2,     3,     4,     5,     6,     7,     8,     0,    10,
    00511        0,     0,     0,     0,    11,    42,    12,    53,     2,    54,
    00512       55,     5,     6,     7,     8,     0,    10,    86,     0,     0,
    00513        0,    11,     0,    12,    77,     2,    78,    79,    37,     6,
    00514        7,     8,     0,    10,    86,     0,     0,     0,    11,     0,
    00515       12,     1,     2,     3,     4,     5,     6,     7,     8,     0,
    00516       10,     0,     0,     0,     0,    11,     0,    12,    34,     2,
    00517       35,    36,    37,     6,     7,     8,     0,    10,     0,     0,
    00518        0,     0,    11,     0,    12,    29,     2,    30,    31,     5,
    00519        6,     7,     0,     0,    10,    56,    72,     2,    73,    74,
    00520       37,     6,     7,     0,     0,    10,    56,    29,     2,    30,
    00521       31,     5,     6,     7,     0,     0,    10,    72,     2,    73,
    00522       74,    37,     6,     7,     0,     0,    10
    00523 };
    00524
    00525 static const yysigned_char yycheck[] =
    00526 {
    00527        1,    57,     3,     4,     5,    59,    12,     0,     0,   105,
    00528       63,    64,    14,   109,    67,    16,    20,    21,    18,    11,
    00529       12,    21,    53,    54,    55,    81,    16,    80,    29,    30,
    00530       31,    32,    16,    34,    35,    36,    37,    13,     5,    83,
    00531       41,    15,     9,    13,    14,    99,    77,    78,    79,    13,
    00532       14,   107,    53,    54,    55,    87,    85,   109,    90,    -1,
    00533       -1,    93,    29,    30,    31,    32,    58,    34,    35,    36,
    00534       37,    72,    73,    74,    41,    76,    77,    78,    79,    85,
    00535       -1,    -1,     1,    -1,     3,     4,    87,    -1,    -1,    90,
    00536       57,    83,    93,    85,    -1,    -1,    87,    16,    -1,    90,
    00537       -1,    -1,    93,    -1,    -1,    72,    73,    74,   109,    76,
    00538       77,    78,    79,    -1,    81,    34,    35,    36,    -1,    -1,
    00539       87,    -1,    41,    90,    -1,    -1,    93,    53,    54,    55,
    00540       53,    54,    55,    -1,    53,    54,    55,    63,    -1,    -1,
    00541      107,    67,   109,    34,    35,    36,    37,    -1,    -1,    -1,
    00542       41,    77,    78,    79,    77,    78,    79,    -1,    77,    78,
    00543       79,     3,     4,     5,     6,     7,     8,     9,    -1,    -1,
    00544       12,    97,    -1,    15,    -1,    -1,    -1,    -1,    -1,    -1,
    00545       22,    72,    73,    74,    -1,    76,    77,    78,    79,   115,
    00546      116,   117,   118,   119,   120,     3,     4,     5,     6,     7,
    00547        8,     9,    10,    -1,    12,    13,    -1,    15,    -1,    17,
    00548       -1,    19,    -1,    -1,    22,     3,     4,     5,     6,     7,
    00549        8,     9,    10,    -1,    12,    13,    -1,    15,    -1,    17,
    00550       -1,    19,    -1,    -1,    22,     3,     4,     5,     6,     7,
    00551        8,     9,    10,    -1,    12,    -1,    -1,    -1,    -1,    17,
    00552       -1,    19,    20,     3,     4,     5,     6,     7,     8,     9,
    00553       10,    11,    12,    -1,    -1,    -1,    -1,    17,    -1,    19,
    00554        3,     4,     5,     6,     7,     8,     9,    10,    -1,    12,
    00555       -1,    -1,    -1,    -1,    17,    18,    19,     3,     4,     5,
    00556        6,     7,     8,     9,    10,    -1,    12,    13,    -1,    -1,
    00557       -1,    17,    -1,    19,     3,     4,     5,     6,     7,     8,
    00558        9,    10,    -1,    12,    13,    -1,    -1,    -1,    17,    -1,
    00559       19,     3,     4,     5,     6,     7,     8,     9,    10,    -1,
    00560       12,    -1,    -1,    -1,    -1,    17,    -1,    19,     3,     4,
    00561        5,     6,     7,     8,     9,    10,    -1,    12,    -1,    -1,
    00562       -1,    -1,    17,    -1,    19,     3,     4,     5,     6,     7,
    00563        8,     9,    -1,    -1,    12,    13,     3,     4,     5,     6,
    00564        7,     8,     9,    -1,    -1,    12,    13,     3,     4,     5,
    00565        6,     7,     8,     9,    -1,    -1,    12,     3,     4,     5,
    00566        6,     7,     8,     9,    -1,    -1,    12
    00567 };
    00568
    00569 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
    00570    symbol of state STATE-NUM.  */
    00571 static const unsigned char yystos[] =
    00572 {
    00573        0,     3,     4,     5,     6,     7,     8,     9,    10,    11,
    00574       12,    17,    19,    24,    25,    26,    29,    33,    34,    35,
    00575       39,    42,    49,    26,    33,    26,    33,    26,    33,     3,
    00576        5,     6,    29,    33,     3,     5,     6,     7,    25,    27,
    00577       28,    29,    18,    25,    40,    41,    48,    20,    25,    48,
    00578       50,    51,     0,     3,     5,     6,    13,    15,    22,    26,
    00579       33,    36,    37,    38,    43,    44,    46,    47,    33,    28,
    00580       28,    28,     3,     5,     6,    28,    29,     3,     5,     6,
    00581       28,    16,    18,    21,    20,    21,    13,    31,    37,    43,
    00582       31,    37,    43,    31,    37,    43,    27,    25,    14,    31,
    00583       32,    32,    14,    30,    30,    31,    30,    16,    30,    31,
    00584       30,    27,    41,    51,    33,    38,    47,    38,    47,    38,
    00585       47,    31,    32,    36,    27,    45,    36,    46
    00586 };
    00587
    00588 #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
    00589 # define YYSIZE_T __SIZE_TYPE__
    00590 #endif
    00591 #if ! defined (YYSIZE_T) && defined (size_t)
    00592 # define YYSIZE_T size_t
    00593 #endif
    00594 #if ! defined (YYSIZE_T)
    00595 # if defined (__STDC__) || defined (__cplusplus)
    00596 #  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
    00597 #  define YYSIZE_T size_t
    00598 # endif
    00599 #endif
    00600 #if ! defined (YYSIZE_T)
    00601 # define YYSIZE_T unsigned int
    00602 #endif
    00603
    00604 #define yyerrok         (yyerrstatus = 0)
    00605 #define yyclearin       (yychar = YYEMPTY)
    00606 #define YYEMPTY         (-2)
    00607 #define YYEOF           0
    00608
    00609 #define YYACCEPT        goto yyacceptlab
    00610 #define YYABORT         goto yyabortlab
    00611 #define YYERROR         goto yyerrorlab
    00612
    00613
    00614 /* Like YYERROR except do call yyerror.  This remains here temporarily
    00615    to ease the transition to the new meaning of YYERROR, for GCC.
    00616    Once GCC version 2 has supplanted version 1, this can go.  */
    00617
    00618 #define YYFAIL          goto yyerrlab
    00619
    00620 #define YYRECOVERING()  (!!yyerrstatus)
    00621
    00622 #define YYBACKUP(Token, Value)                                  \
    00623 do                                                              \
    00624   if (yychar == YYEMPTY && yylen == 1)                          \
    00625     {                                                           \
    00626       yychar = (Token);                                         \
    00627       yylval = (Value);                                         \
    00628       yytoken = YYTRANSLATE (yychar);                           \
    00629       YYPOPSTACK;                                               \
    00630       goto yybackup;                                            \
    00631     }                                                           \
    00632   else                                                          \
    00633     {                                                           \
    00634       yyerror ("syntax error: cannot back up");\
    00635       YYERROR;                                                  \
    00636     }                                                           \
    00637 while (0)
    00638
    00639 #define YYTERROR        1
    00640 #define YYERRCODE       256
    00641
    00642 /* YYLLOC_DEFAULT -- Compute the default location (before the actions
    00643    are run).  */
    00644
    00645 #ifndef YYLLOC_DEFAULT
    00646 # define YYLLOC_DEFAULT(Current, Rhs, N)                \
    00647    ((Current).first_line   = (Rhs)[1].first_line,       \
    00648     (Current).first_column = (Rhs)[1].first_column,     \
    00649     (Current).last_line    = (Rhs)[N].last_line,        \
    00650     (Current).last_column  = (Rhs)[N].last_column)
    00651 #endif
    00652
    00653 /* YYLEX -- calling `yylex' with the right arguments.  */
    00654
    00655 #ifdef YYLEX_PARAM
    00656 # define YYLEX yylex (&yylval, YYLEX_PARAM)
    00657 #else
    00658 # define YYLEX yylex (&yylval)
    00659 #endif
    00660
    00661 /* Enable debugging if requested.  */
    00662 #if YYDEBUG
    00663
    00664 # ifndef YYFPRINTF
    00665 #  include <stdio.h> /* INFRINGES ON USER NAME SPACE */
    00666 #  define YYFPRINTF fprintf
    00667 # endif
    00668
    00669 # define YYDPRINTF(Args)                        \
    00670 do {                                            \
    00671   if (yydebug)                                  \
    00672     YYFPRINTF Args;                             \
    00673 } while (0)
    00674
    00675 # define YYDSYMPRINT(Args)                      \
    00676 do {                                            \
    00677   if (yydebug)                                  \
    00678     yysymprint Args;                            \
    00679 } while (0)
    00680
    00681 # define YYDSYMPRINTF(Title, Token, Value, Location)            \
    00682 do {                                                            \
    00683   if (yydebug)                                                  \
    00684     {                                                           \
    00685       YYFPRINTF (stderr, "%s ", Title);                         \
    00686       yysymprint (stderr,                                       \
    00687                   Token, Value);        \
    00688       YYFPRINTF (stderr, "\n");                                 \
    00689     }                                                           \
    00690 } while (0)
    00691
    00692 /*------------------------------------------------------------------.
    00693 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
    00694 | TOP (included).                                                   |
    00695 `------------------------------------------------------------------*/
    00696
    00697 #if defined (__STDC__) || defined (__cplusplus)
    00698 static void
    00699 yy_stack_print (short int *bottom, short int *top)
    00700 #else
    00701 static void
    00702 yy_stack_print (bottom, top)
    00703     short int *bottom;
    00704     short int *top;
    00705 #endif
    00706 {
    00707   YYFPRINTF (stderr, "Stack now");
    00708   for (/* Nothing. */; bottom <= top; ++bottom)
    00709     YYFPRINTF (stderr, " %d", *bottom);
    00710   YYFPRINTF (stderr, "\n");
    00711 }
    00712
    00713 # define YY_STACK_PRINT(Bottom, Top)                            \
    00714 do {                                                            \
    00715   if (yydebug)                                                  \
    00716     yy_stack_print ((Bottom), (Top));                           \
    00717 } while (0)
    00718
    00719
    00720 /*------------------------------------------------.
    00721 | Report that the YYRULE is going to be reduced.  |
    00722 `------------------------------------------------*/
    00723
    00724 #if defined (__STDC__) || defined (__cplusplus)
    00725 static void
    00726 yy_reduce_print (int yyrule)
    00727 #else
    00728 static void
    00729 yy_reduce_print (yyrule)
    00730     int yyrule;
    00731 #endif
    00732 {
    00733   int yyi;
    00734   unsigned int yylno = yyrline[yyrule];
    00735   YYFPRINTF (stderr, "Reducing stack by rule %d (line %u), ",
    00736              yyrule - 1, yylno);
    00737   /* Print the symbols being reduced, and their result.  */
    00738   for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++)
    00739     YYFPRINTF (stderr, "%s ", yytname [yyrhs[yyi]]);
    00740   YYFPRINTF (stderr, "-> %s\n", yytname [yyr1[yyrule]]);
    00741 }
    00742
    00743 # define YY_REDUCE_PRINT(Rule)          \
    00744 do {                                    \
    00745   if (yydebug)                          \
    00746     yy_reduce_print (Rule);             \
    00747 } while (0)
    00748
    00749 /* Nonzero means print parse trace.  It is left uninitialized so that
    00750    multiple parsers can coexist.  */
    00751 int yydebug;
    00752 #else /* !YYDEBUG */
    00753 # define YYDPRINTF(Args)
    00754 # define YYDSYMPRINT(Args)
    00755 # define YYDSYMPRINTF(Title, Token, Value, Location)
    00756 # define YY_STACK_PRINT(Bottom, Top)
    00757 # define YY_REDUCE_PRINT(Rule)
    00758 #endif /* !YYDEBUG */
    00759
    00760
    00761 /* YYINITDEPTH -- initial size of the parser's stacks.  */
    00762 #ifndef YYINITDEPTH
    00763 # define YYINITDEPTH 200
    00764 #endif
    00765
    00766 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
    00767    if the built-in stack extension method is used).
    00768
    00769    Do not make this value too large; the results are undefined if
    00770    SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH)
    00771    evaluated with infinite-precision integer arithmetic.  */
    00772
    00773 #if defined (YYMAXDEPTH) && YYMAXDEPTH == 0
    00774 # undef YYMAXDEPTH
    00775 #endif
    00776
    00777 #ifndef YYMAXDEPTH
    00778 # define YYMAXDEPTH 10000
    00779 #endif
    00780
    00781
    00782
    00783 #if YYERROR_VERBOSE
    00784
    00785 # ifndef yystrlen
    00786 #  if defined (__GLIBC__) && defined (_STRING_H)
    00787 #   define yystrlen strlen
    00788 #  else
    00789 /* Return the length of YYSTR.  */
    00790 static YYSIZE_T
    00791 #   if defined (__STDC__) || defined (__cplusplus)
    00792 yystrlen (const char *yystr)
    00793 #   else
    00794 yystrlen (yystr)
    00795      const char *yystr;
    00796 #   endif
    00797 {
    00798   register const char *yys = yystr;
    00799
    00800   while (*yys++ != '\0')
    00801     continue;
    00802
    00803   return yys - yystr - 1;
    00804 }
    00805 #  endif
    00806 # endif
    00807
    00808 # ifndef yystpcpy
    00809 #  if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
    00810 #   define yystpcpy stpcpy
    00811 #  else
    00812 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
    00813    YYDEST.  */
    00814 static char *
    00815 #   if defined (__STDC__) || defined (__cplusplus)
    00816 yystpcpy (char *yydest, const char *yysrc)
    00817 #   else
    00818 yystpcpy (yydest, yysrc)
    00819      char *yydest;
    00820      const char *yysrc;
    00821 #   endif
    00822 {
    00823   register char *yyd = yydest;
    00824   register const char *yys = yysrc;
    00825
    00826   while ((*yyd++ = *yys++) != '\0')
    00827     continue;
    00828
    00829   return yyd - 1;
    00830 }
    00831 #  endif
    00832 # endif
    00833
    00834 #endif /* !YYERROR_VERBOSE */
    00835
    00836
    00837
    00838 #if YYDEBUG
    00839 /*--------------------------------.
    00840 | Print this symbol on YYOUTPUT.  |
    00841 `--------------------------------*/
    00842
    00843 #if defined (__STDC__) || defined (__cplusplus)
    00844 static void
    00845 yysymprint (FILE *yyoutput, int yytype, YYSTYPE *yyvaluep)
    00846 #else
    00847 static void
    00848 yysymprint (yyoutput, yytype, yyvaluep)
    00849     FILE *yyoutput;
    00850     int yytype;
    00851     YYSTYPE *yyvaluep;
    00852 #endif
    00853 {
    00854   /* Pacify ``unused variable'' warnings.  */
    00855   (void) yyvaluep;
    00856
    00857   if (yytype < YYNTOKENS)
    00858     {
    00859       YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
    00860 # ifdef YYPRINT
    00861       YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
    00862 # endif
    00863     }
    00864   else
    00865     YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
    00866
    00867   switch (yytype)
    00868     {
    00869       default:
    00870         break;
    00871     }
    00872   YYFPRINTF (yyoutput, ")");
    00873 }
    00874
    00875 #endif /* ! YYDEBUG */
    00876 /*-----------------------------------------------.
    00877 | Release the memory associated to this symbol.  |
    00878 `-----------------------------------------------*/
    00879
    00880 #if defined (__STDC__) || defined (__cplusplus)
    00881 static void
    00882 yydestruct (int yytype, YYSTYPE *yyvaluep)
    00883 #else
    00884 static void
    00885 yydestruct (yytype, yyvaluep)
    00886     int yytype;
    00887     YYSTYPE *yyvaluep;
    00888 #endif
    00889 {
    00890   /* Pacify ``unused variable'' warnings.  */
    00891   (void) yyvaluep;
    00892
    00893   switch (yytype)
    00894     {
    00895
    00896       default:
    00897         break;
    00898     }
    00899 }
    00900
    00901
    00902 /* Prevent warnings from -Wmissing-prototypes.  */
    00903
    00904 #ifdef YYPARSE_PARAM
    00905 # if defined (__STDC__) || defined (__cplusplus)
    00906 int yyparse (void *YYPARSE_PARAM);
    00907 # else
    00908 int yyparse ();
    00909 # endif
    00910 #else /* ! YYPARSE_PARAM */
    00911 #if defined (__STDC__) || defined (__cplusplus)
    00912 int yyparse (void);
    00913 #else
    00914 int yyparse ();
    00915 #endif
    00916 #endif /* ! YYPARSE_PARAM */
    00917
    00918
    00919
    00920
    00921
    00922
    00923 /*----------.
    00924 | yyparse.  |
    00925 `----------*/
    00926
    00927 #ifdef YYPARSE_PARAM
    00928 # if defined (__STDC__) || defined (__cplusplus)
    00929 int yyparse (void *YYPARSE_PARAM)
    00930 # else
    00931 int yyparse (YYPARSE_PARAM)
    00932   void *YYPARSE_PARAM;
    00933 # endif
    00934 #else /* ! YYPARSE_PARAM */
    00935 #if defined (__STDC__) || defined (__cplusplus)
    00936 int
    00937 yyparse (void)
    00938 #else
    00939 int
    00940 yyparse ()
    00941
    00942 #endif
    00943 #endif
    00944 {
    00945   /* The lookahead symbol.  */
    00946 int yychar;
    00947
    00948 /* The semantic value of the lookahead symbol.  */
    00949 YYSTYPE yylval;
    00950
    00951 /* Number of syntax errors so far.  */
    00952 int yynerrs;
    00953
    00954   register int yystate;
    00955   register int yyn;
    00956   int yyresult;
    00957   /* Number of tokens to shift before error messages enabled.  */
    00958   int yyerrstatus;
    00959   /* Lookahead token as an internal (translated) token number.  */
    00960   int yytoken = 0;
    00961
    00962   /* Three stacks and their tools:
    00963      `yyss': related to states,
    00964      `yyvs': related to semantic values,
    00965      `yyls': related to locations.
    00966
    00967      Refer to the stacks thru separate pointers, to allow yyoverflow
    00968      to reallocate them elsewhere.  */
    00969
    00970   /* The state stack.  */
    00971   short int yyssa[YYINITDEPTH];
    00972   short int *yyss = yyssa;
    00973   register short int *yyssp;
    00974
    00975   /* The semantic value stack.  */
    00976   YYSTYPE yyvsa[YYINITDEPTH];
    00977   YYSTYPE *yyvs = yyvsa;
    00978   register YYSTYPE *yyvsp;
    00979
    00980
    00981
    00982 #define YYPOPSTACK   (yyvsp--, yyssp--)
    00983
    00984   YYSIZE_T yystacksize = YYINITDEPTH;
    00985
    00986   /* The variables used to return semantic value and location from the
    00987      action routines.  */
    00988   YYSTYPE yyval;
    00989
    00990
    00991   /* When reducing, the number of symbols on the RHS of the reduced
    00992      rule.  */
    00993   int yylen;
    00994
    00995   YYDPRINTF ((stderr, "Starting parse\n"));
    00996
    00997   yystate = 0;
    00998   yyerrstatus = 0;
    00999   yynerrs = 0;
    01000   yychar = YYEMPTY;             /* Cause a token to be read.  */
    01001
    01002   /* Initialize stack pointers.
    01003      Waste one element of value and location stack
    01004      so that they stay on the same level as the state stack.
    01005      The wasted elements are never initialized.  */
    01006
    01007   yyssp = yyss;
    01008   yyvsp = yyvs;
    01009
    01010
    01011   goto yysetstate;
    01012
    01013 /*------------------------------------------------------------.
    01014 | yynewstate -- Push a new state, which is found in yystate.  |
    01015 `------------------------------------------------------------*/
    01016  yynewstate:
    01017   /* In all cases, when you get here, the value and location stacks
    01018      have just been pushed. so pushing a state here evens the stacks.
    01019      */
    01020   yyssp++;
    01021
    01022  yysetstate:
    01023   *yyssp = yystate;
    01024
    01025   if (yyss + yystacksize - 1 <= yyssp)
    01026     {
    01027       /* Get the current used size of the three stacks, in elements.  */
    01028       YYSIZE_T yysize = yyssp - yyss + 1;
    01029
    01030 #ifdef yyoverflow
    01031       {
    01032         /* Give user a chance to reallocate the stack. Use copies of
    01033            these so that the &'s don't force the real ones into
    01034            memory.  */
    01035         YYSTYPE *yyvs1 = yyvs;
    01036         short int *yyss1 = yyss;
    01037
    01038
    01039         /* Each stack pointer address is followed by the size of the
    01040            data in use in that stack, in bytes.  This used to be a
    01041            conditional around just the two extra args, but that might
    01042            be undefined if yyoverflow is a macro.  */
    01043         yyoverflow ("parser stack overflow",
    01044                     &yyss1, yysize * sizeof (*yyssp),
    01045                     &yyvs1, yysize * sizeof (*yyvsp),
    01046
    01047                     &yystacksize);
    01048
    01049         yyss = yyss1;
    01050         yyvs = yyvs1;
    01051       }
    01052 #else /* no yyoverflow */
    01053 # ifndef YYSTACK_RELOCATE
    01054       goto yyoverflowlab;
    01055 # else
    01056       /* Extend the stack our own way.  */
    01057       if (YYMAXDEPTH <= yystacksize)
    01058         goto yyoverflowlab;
    01059       yystacksize *= 2;
    01060       if (YYMAXDEPTH < yystacksize)
    01061         yystacksize = YYMAXDEPTH;
    01062
    01063       {
    01064         short int *yyss1 = yyss;
    01065         union yyalloc *yyptr =
    01066           (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
    01067         if (! yyptr)
    01068           goto yyoverflowlab;
    01069         YYSTACK_RELOCATE (yyss);
    01070         YYSTACK_RELOCATE (yyvs);
    01071
    01072 #  undef YYSTACK_RELOCATE
    01073         if (yyss1 != yyssa)
    01074           YYSTACK_FREE (yyss1);
    01075       }
    01076 # endif
    01077 #endif /* no yyoverflow */
    01078
    01079       yyssp = yyss + yysize - 1;
    01080       yyvsp = yyvs + yysize - 1;
    01081
    01082
    01083       YYDPRINTF ((stderr, "Stack size increased to %lu\n",
    01084                   (unsigned long int) yystacksize));
    01085
    01086       if (yyss + yystacksize - 1 <= yyssp)
    01087         YYABORT;
    01088     }
    01089
    01090   YYDPRINTF ((stderr, "Entering state %d\n", yystate));
    01091
    01092   goto yybackup;
    01093
    01094 /*-----------.
    01095 | yybackup.  |
    01096 `-----------*/
    01097 yybackup:
    01098
    01099 /* Do appropriate processing given the current state.  */
    01100 /* Read a lookahead token if we need one and don't already have one.  */
    01101 /* yyresume: */
    01102
    01103   /* First try to decide what to do without reference to lookahead token.  */
    01104
    01105   yyn = yypact[yystate];
    01106   if (yyn == YYPACT_NINF)
    01107     goto yydefault;
    01108
    01109   /* Not known => get a lookahead token if don't already have one.  */
    01110
    01111   /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol.  */
    01112   if (yychar == YYEMPTY)
    01113     {
    01114       YYDPRINTF ((stderr, "Reading a token: "));
    01115       yychar = YYLEX;
    01116     }
    01117
    01118   if (yychar <= YYEOF)
    01119     {
    01120       yychar = yytoken = YYEOF;
    01121       YYDPRINTF ((stderr, "Now at end of input.\n"));
    01122     }
    01123   else
    01124     {
    01125       yytoken = YYTRANSLATE (yychar);
    01126       YYDSYMPRINTF ("Next token is", yytoken, &yylval, &yylloc);
    01127     }
    01128
    01129   /* If the proper action on seeing token YYTOKEN is to reduce or to
    01130      detect an error, take that action.  */
    01131   yyn += yytoken;
    01132   if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
    01133     goto yydefault;
    01134   yyn = yytable[yyn];
    01135   if (yyn <= 0)
    01136     {
    01137       if (yyn == 0 || yyn == YYTABLE_NINF)
    01138         goto yyerrlab;
    01139       yyn = -yyn;
    01140       goto yyreduce;
    01141     }
    01142
    01143   if (yyn == YYFINAL)
    01144     YYACCEPT;
    01145
    01146   /* Shift the lookahead token.  */
    01147   YYDPRINTF ((stderr, "Shifting token %s, ", yytname[yytoken]));
    01148
    01149   /* Discard the token being shifted unless it is eof.  */
    01150   if (yychar != YYEOF)
    01151     yychar = YYEMPTY;
    01152
    01153   *++yyvsp = yylval;
    01154
    01155
    01156   /* Count tokens shifted since error; after three, turn off error
    01157      status.  */
    01158   if (yyerrstatus)
    01159     yyerrstatus--;
    01160
    01161   yystate = yyn;
    01162   goto yynewstate;
    01163
    01164
    01165 /*-----------------------------------------------------------.
    01166 | yydefault -- do the default action for the current state.  |
    01167 `-----------------------------------------------------------*/
    01168 yydefault:
    01169   yyn = yydefact[yystate];
    01170   if (yyn == 0)
    01171     goto yyerrlab;
    01172   goto yyreduce;
    01173
    01174
    01175 /*-----------------------------.
    01176 | yyreduce -- Do a reduction.  |
    01177 `-----------------------------*/
    01178 yyreduce:
    01179   /* yyn is the number of a rule to reduce with.  */
    01180   yylen = yyr2[yyn];
    01181
    01182   /* If YYLEN is nonzero, implement the default value of the action:
    01183      `$$ = $1'.
    01184
    01185      Otherwise, the following line sets YYVAL to garbage.
    01186      This behavior is undocumented and Bison
    01187      users should not rely upon it.  Assigning to YYVAL
    01188      unconditionally makes the parser a bit smaller, and it avoids a
    01189      GCC warning that YYVAL may be used uninitialized.  */
    01190   yyval = yyvsp[1-yylen];
    01191
    01192
    01193   YY_REDUCE_PRINT (yyn);
    01194   switch (yyn)
    01195     {
    01196         case 2:
    01197 #line 57 "gram.y"
    01198     {
    01199            ((SyckParser *)parser)->root = syck_hdlr_add_node( (SyckParser *)parser, yyvsp[0].nodeData );
    01200         }
    01201     break;
    01202
    01203   case 3:
    01204 #line 61 "gram.y"
    01205     {
    01206            ((SyckParser *)parser)->root = syck_hdlr_add_node( (SyckParser *)parser, yyvsp[0].nodeData );
    01207         }
    01208     break;
    01209
    01210   case 4:
    01211 #line 65 "gram.y"
    01212     {
    01213            ((SyckParser *)parser)->eof = 1;
    01214         }
    01215     break;
    01216
    01217   case 8:
    01218 #line 76 "gram.y"
    01219     {
    01220             syck_add_transfer( yyvsp[-1].name, yyvsp[0].nodeData, ((SyckParser *)parser)->taguri_expansion );
    01221             yyval.nodeData = yyvsp[0].nodeData;
    01222         }
    01223     break;
    01224
    01225   case 9:
    01226 #line 81 "gram.y"
    01227     {
    01228             syck_add_transfer( yyvsp[-1].name, yyvsp[0].nodeData, 0 );
    01229             yyval.nodeData = yyvsp[0].nodeData;
    01230         }
    01231     break;
    01232
    01233   case 10:
    01234 #line 86 "gram.y"
    01235     {
    01236            /*
    01237             * _Anchors_: The language binding must keep a separate symbol table
    01238             * for anchors.  The actual ID in the symbol table is returned to the
    01239             * higher nodes, though.
    01240             */
    01241            yyval.nodeData = syck_hdlr_add_anchor( (SyckParser *)parser, yyvsp[-1].name, yyvsp[0].nodeData );
    01242         }
    01243     break;
    01244
    01245   case 11:
    01246 #line 95 "gram.y"
    01247     {
    01248            yyval.nodeData = yyvsp[-1].nodeData;
    01249         }
    01250     break;
    01251
    01252   case 14:
    01253 #line 105 "gram.y"
    01254     {
    01255                     yyval.nodeData = yyvsp[-1].nodeData;
    01256                 }
    01257     break;
    01258
    01259   case 15:
    01260 #line 109 "gram.y"
    01261     {
    01262                     NULL_NODE( parser, n );
    01263                     yyval.nodeData = n;
    01264                 }
    01265     break;
    01266
    01267   case 16:
    01268 #line 114 "gram.y"
    01269     {
    01270                    if ( ((SyckParser *)parser)->implicit_typing == 1 )
    01271                    {
    01272                       try_tag_implicit( yyvsp[0].nodeData, ((SyckParser *)parser)->taguri_expansion );
    01273                    }
    01274                    yyval.nodeData = yyvsp[0].nodeData;
    01275                 }
    01276     break;
    01277
    01278   case 17:
    01279 #line 122 "gram.y"
    01280     {
    01281                     syck_add_transfer( yyvsp[-1].name, yyvsp[0].nodeData, ((SyckParser *)parser)->taguri_expansion );
    01282                     yyval.nodeData = yyvsp[0].nodeData;
    01283                 }
    01284     break;
    01285
    01286   case 18:
    01287 #line 127 "gram.y"
    01288     {
    01289                     syck_add_transfer( yyvsp[-1].name, yyvsp[0].nodeData, 0 );
    01290                     yyval.nodeData = yyvsp[0].nodeData;
    01291                 }
    01292     break;
    01293
    01294   case 19:
    01295 #line 132 "gram.y"
    01296     {
    01297                    /*
    01298                     * _Anchors_: The language binding must keep a separate symbol table
    01299                     * for anchors.  The actual ID in the symbol table is returned to the
    01300                     * higher nodes, though.
    01301                     */
    01302                    yyval.nodeData = syck_hdlr_add_anchor( (SyckParser *)parser, yyvsp[-1].name, yyvsp[0].nodeData );
    01303                 }
    01304     break;
    01305
    01306   case 26:
    01307 #line 165 "gram.y"
    01308     {
    01309                syck_add_transfer( yyvsp[-1].name, yyvsp[0].nodeData, ((SyckParser *)parser)->taguri_expansion );
    01310                yyval.nodeData = yyvsp[0].nodeData;
    01311             }
    01312     break;
    01313
    01314   case 27:
    01315 #line 170 "gram.y"
    01316     {
    01317                syck_add_transfer( yyvsp[-1].name, yyvsp[0].nodeData, 0 );
    01318                yyval.nodeData = yyvsp[0].nodeData;
    01319             }
    01320     break;
    01321
    01322   case 28:
    01323 #line 175 "gram.y"
    01324     {
    01325                if ( ((SyckParser *)parser)->implicit_typing == 1 )
    01326                {
    01327                   try_tag_implicit( yyvsp[0].nodeData, ((SyckParser *)parser)->taguri_expansion );
    01328                }
    01329                yyval.nodeData = yyvsp[0].nodeData;
    01330             }
    01331     break;
    01332
    01333   case 29:
    01334 #line 183 "gram.y"
    01335     {
    01336                yyval.nodeData = syck_hdlr_add_anchor( (SyckParser *)parser, yyvsp[-1].name, yyvsp[0].nodeData );
    01337             }
    01338     break;
    01339
    01340   case 30:
    01341 #line 187 "gram.y"
    01342     {
    01343                /*
    01344                 * _Aliases_: The anchor symbol table is scanned for the anchor name.
    01345                 * The anchor's ID in the language's symbol table is returned.
    01346                 */
    01347                yyval.nodeData = syck_hdlr_get_anchor( (SyckParser *)parser, yyvsp[0].name );
    01348             }
    01349     break;
    01350
    01351   case 31:
    01352 #line 195 "gram.y"
    01353     {
    01354                SyckNode *n = yyvsp[0].nodeData;
    01355                if ( ((SyckParser *)parser)->taguri_expansion == 1 )
    01356                {
    01357                    n->type_id = syck_taguri( YAML_DOMAIN, "str", 3 );
    01358                }
    01359                else
    01360                {
    01361                    n->type_id = syck_strndup( "str", 3 );
    01362                }
    01363                yyval.nodeData = n;
    01364             }
    01365     break;
    01366
    01367   case 33:
    01368 #line 209 "gram.y"
    01369     {
    01370                yyval.nodeData = yyvsp[-1].nodeData;
    01371             }
    01372     break;
    01373
    01374   case 39:
    01375 #line 229 "gram.y"
    01376     {
    01377                     yyval.nodeData = yyvsp[-1].nodeData;
    01378                 }
    01379     break;
    01380
    01381   case 40:
    01382 #line 233 "gram.y"
    01383     {
    01384                     yyval.nodeData = yyvsp[-1].nodeData;
    01385                 }
    01386     break;
    01387
    01388   case 41:
    01389 #line 239 "gram.y"
    01390     {
    01391                     yyval.nodeId = syck_hdlr_add_node( (SyckParser *)parser, yyvsp[0].nodeData );
    01392                 }
    01393     break;
    01394
    01395   case 42:
    01396 #line 245 "gram.y"
    01397     {
    01398                     syck_add_transfer( yyvsp[-2].name, yyvsp[0].nodeData, ((SyckParser *)parser)->taguri_expansion );
    01399                     yyval.nodeData = yyvsp[0].nodeData;
    01400                 }
    01401     break;
    01402
    01403   case 43:
    01404 #line 250 "gram.y"
    01405     {
    01406                     syck_add_transfer( yyvsp[-1].name, yyvsp[0].nodeData, ((SyckParser *)parser)->taguri_expansion );
    01407                     yyval.nodeData = yyvsp[0].nodeData;
    01408                 }
    01409     break;
    01410
    01411   case 44:
    01412 #line 255 "gram.y"
    01413     {
    01414                     syck_add_transfer( yyvsp[-2].name, yyvsp[0].nodeData, 0 );
    01415                     yyval.nodeData = yyvsp[0].nodeData;
    01416                 }
    01417     break;
    01418
    01419   case 45:
    01420 #line 260 "gram.y"
    01421     {
    01422                     syck_add_transfer( yyvsp[-1].name, yyvsp[0].nodeData, 0 );
    01423                     yyval.nodeData = yyvsp[0].nodeData;
    01424                 }
    01425     break;
    01426
    01427   case 46:
    01428 #line 265 "gram.y"
    01429     {
    01430                     yyval.nodeData = syck_hdlr_add_anchor( (SyckParser *)parser, yyvsp[-2].name, yyvsp[0].nodeData );
    01431                 }
    01432     break;
    01433
    01434   case 47:
    01435 #line 269 "gram.y"
    01436     {
    01437                     yyval.nodeData = syck_hdlr_add_anchor( (SyckParser *)parser, yyvsp[-1].name, yyvsp[0].nodeData );
    01438                 }
    01439     break;
    01440
    01441   case 48:
    01442 #line 275 "gram.y"
    01443     {
    01444                     yyval.nodeData = syck_new_seq( yyvsp[0].nodeId );
    01445                 }
    01446     break;
    01447
    01448   case 49:
    01449 #line 279 "gram.y"
    01450     {
    01451                     syck_seq_add( yyvsp[-2].nodeData, yyvsp[0].nodeId );
    01452                     yyval.nodeData = yyvsp[-2].nodeData;
    01453                                 }
    01454     break;
    01455
    01456   case 50:
    01457 #line 284 "gram.y"
    01458     {
    01459                     yyval.nodeData = yyvsp[-1].nodeData;
    01460                                 }
    01461     break;
    01462
    01463   case 51:
    01464 #line 293 "gram.y"
    01465     {
    01466                     yyval.nodeData = yyvsp[-1].nodeData;
    01467                 }
    01468     break;
    01469
    01470   case 52:
    01471 #line 297 "gram.y"
    01472     {
    01473                     yyval.nodeData = syck_alloc_seq();
    01474                 }
    01475     break;
    01476
    01477   case 53:
    01478 #line 303 "gram.y"
    01479     {
    01480                     yyval.nodeData = syck_new_seq( syck_hdlr_add_node( (SyckParser *)parser, yyvsp[0].nodeData ) );
    01481                 }
    01482     break;
    01483
    01484   case 54:
    01485 #line 307 "gram.y"
    01486     {
    01487                     syck_seq_add( yyvsp[-2].nodeData, syck_hdlr_add_node( (SyckParser *)parser, yyvsp[0].nodeData ) );
    01488                     yyval.nodeData = yyvsp[-2].nodeData;
    01489                                 }
    01490     break;
    01491
    01492   case 57:
    01493 #line 321 "gram.y"
    01494     {
    01495                     apply_seq_in_map( (SyckParser *)parser, yyvsp[-1].nodeData );
    01496                     yyval.nodeData = yyvsp[-1].nodeData;
    01497                 }
    01498     break;
    01499
    01500   case 58:
    01501 #line 326 "gram.y"
    01502     {
    01503                     apply_seq_in_map( (SyckParser *)parser, yyvsp[-1].nodeData );
    01504                     yyval.nodeData = yyvsp[-1].nodeData;
    01505                 }
    01506     break;
    01507
    01508   case 59:
    01509 #line 333 "gram.y"
    01510     {
    01511                     syck_add_transfer( yyvsp[-2].name, yyvsp[0].nodeData, ((SyckParser *)parser)->taguri_expansion );
    01512                     yyval.nodeData = yyvsp[0].nodeData;
    01513                 }
    01514     break;
    01515
    01516   case 60:
    01517 #line 338 "gram.y"
    01518     {
    01519                     syck_add_transfer( yyvsp[-1].name, yyvsp[0].nodeData, ((SyckParser *)parser)->taguri_expansion );
    01520                     yyval.nodeData = yyvsp[0].nodeData;
    01521                 }
    01522     break;
    01523
    01524   case 61:
    01525 #line 343 "gram.y"
    01526     {
    01527                     syck_add_transfer( yyvsp[-2].name, yyvsp[0].nodeData, 0 );
    01528                     yyval.nodeData = yyvsp[0].nodeData;
    01529                 }
    01530     break;
    01531
    01532   case 62:
    01533 #line 348 "gram.y"
    01534     {
    01535                     syck_add_transfer( yyvsp[-1].name, yyvsp[0].nodeData, 0 );
    01536                     yyval.nodeData = yyvsp[0].nodeData;
    01537                 }
    01538     break;
    01539
    01540   case 63:
    01541 #line 353 "gram.y"
    01542     {
    01543                     yyval.nodeData = syck_hdlr_add_anchor( (SyckParser *)parser, yyvsp[-2].name, yyvsp[0].nodeData );
    01544                 }
    01545     break;
    01546
    01547   case 64:
    01548 #line 357 "gram.y"
    01549     {
    01550                     yyval.nodeData = syck_hdlr_add_anchor( (SyckParser *)parser, yyvsp[-1].name, yyvsp[0].nodeData );
    01551                 }
    01552     break;
    01553
    01554   case 66:
    01555 #line 364 "gram.y"
    01556     {
    01557                     yyval.nodeData = yyvsp[-1].nodeData;
    01558                 }
    01559     break;
    01560
    01561   case 68:
    01562 #line 380 "gram.y"
    01563     {
    01564                     yyval.nodeData = syck_new_map(
    01565                         syck_hdlr_add_node( (SyckParser *)parser, yyvsp[-2].nodeData ),
    01566                         syck_hdlr_add_node( (SyckParser *)parser, yyvsp[0].nodeData ) );
    01567                 }
    01568     break;
    01569
    01570   case 70:
    01571 #line 398 "gram.y"
    01572     {
    01573                     if ( yyvsp[-2].nodeData->shortcut == NULL )
    01574                     {
    01575                         yyvsp[-2].nodeData->shortcut = syck_new_seq( yyvsp[0].nodeId );
    01576                     }
    01577                     else
    01578                     {
    01579                         syck_seq_add( yyvsp[-2].nodeData->shortcut, yyvsp[0].nodeId );
    01580                     }
    01581                     yyval.nodeData = yyvsp[-2].nodeData;
    01582                 }
    01583     break;
    01584
    01585   case 71:
    01586 #line 410 "gram.y"
    01587     {
    01588                     apply_seq_in_map( (SyckParser *)parser, yyvsp[-2].nodeData );
    01589                     syck_map_update( yyvsp[-2].nodeData, yyvsp[0].nodeData );
    01590                     syck_free_node( yyvsp[0].nodeData );
    01591                     yyvsp[0].nodeData = NULL;
    01592                     yyval.nodeData = yyvsp[-2].nodeData;
    01593                 }
    01594     break;
    01595
    01596   case 72:
    01597 #line 418 "gram.y"
    01598     {
    01599                     yyval.nodeData = yyvsp[-1].nodeData;
    01600                 }
    01601     break;
    01602
    01603   case 73:
    01604 #line 427 "gram.y"
    01605     {
    01606                     yyval.nodeData = syck_new_map(
    01607                         syck_hdlr_add_node( (SyckParser *)parser, yyvsp[-2].nodeData ),
    01608                         syck_hdlr_add_node( (SyckParser *)parser, yyvsp[0].nodeData ) );
    01609                 }
    01610     break;
    01611
    01612   case 74:
    01613 #line 435 "gram.y"
    01614     {
    01615                     yyval.nodeData = yyvsp[-1].nodeData;
    01616                 }
    01617     break;
    01618
    01619   case 75:
    01620 #line 439 "gram.y"
    01621     {
    01622                     yyval.nodeData = syck_alloc_map();
    01623                 }
    01624     break;
    01625
    01626   case 77:
    01627 #line 446 "gram.y"
    01628     {
    01629                     syck_map_update( yyvsp[-2].nodeData, yyvsp[0].nodeData );
    01630                     syck_free_node( yyvsp[0].nodeData );
    01631                     yyvsp[0].nodeData = NULL;
    01632                     yyval.nodeData = yyvsp[-2].nodeData;
    01633                                 }
    01634     break;
    01635
    01636   case 78:
    01637 #line 455 "gram.y"
    01638     {
    01639                     NULL_NODE( parser, n );
    01640                     yyval.nodeData = syck_new_map(
    01641                         syck_hdlr_add_node( (SyckParser *)parser, yyvsp[0].nodeData ),
    01642                         syck_hdlr_add_node( (SyckParser *)parser, n ) );
    01643                 }
    01644     break;
    01645
    01646
    01647     }
    01648
    01649 /* Line 1010 of yacc.c.  */
    01650 #line 1651 "gram.c"
    01651
    01652   yyvsp -= yylen;
    01653   yyssp -= yylen;
    01654
    01655
    01656   YY_STACK_PRINT (yyss, yyssp);
    01657
    01658   *++yyvsp = yyval;
    01659
    01660
    01661   /* Now `shift' the result of the reduction.  Determine what state
    01662      that goes to, based on the state we popped back to and the rule
    01663      number reduced by.  */
    01664
    01665   yyn = yyr1[yyn];
    01666
    01667   yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
    01668   if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
    01669     yystate = yytable[yystate];
    01670   else
    01671     yystate = yydefgoto[yyn - YYNTOKENS];
    01672
    01673   goto yynewstate;
    01674
    01675
    01676 /*------------------------------------.
    01677 | yyerrlab -- here on detecting error |
    01678 `------------------------------------*/
    01679 yyerrlab:
    01680   /* If not already recovering from an error, report this error.  */
    01681   if (!yyerrstatus)
    01682     {
    01683       ++yynerrs;
    01684 #if YYERROR_VERBOSE
    01685       yyn = yypact[yystate];
    01686
    01687       if (YYPACT_NINF < yyn && yyn < YYLAST)
    01688         {
    01689           YYSIZE_T yysize = 0;
    01690           int yytype = YYTRANSLATE (yychar);
    01691           const char* yyprefix;
    01692           char *yymsg;
    01693           int yyx;
    01694
    01695           /* Start YYX at -YYN if negative to avoid negative indexes in
    01696              YYCHECK.  */
    01697           int yyxbegin = yyn < 0 ? -yyn : 0;
    01698
    01699           /* Stay within bounds of both yycheck and yytname.  */
    01700           int yychecklim = YYLAST - yyn;
    01701           int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
    01702           int yycount = 0;
    01703
    01704           yyprefix = ", expecting ";
    01705           for (yyx = yyxbegin; yyx < yyxend; ++yyx)
    01706             if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
    01707               {
    01708                 yysize += yystrlen (yyprefix) + yystrlen (yytname [yyx]);
    01709                 yycount += 1;
    01710                 if (yycount == 5)
    01711                   {
    01712                     yysize = 0;
    01713                     break;
    01714                   }
    01715               }
    01716           yysize += (sizeof ("syntax error, unexpected ")
    01717                      + yystrlen (yytname[yytype]));
    01718           yymsg = (char *) YYSTACK_ALLOC (yysize);
    01719           if (yymsg != 0)
    01720             {
    01721               char *yyp = yystpcpy (yymsg, "syntax error, unexpected ");
    01722               yyp = yystpcpy (yyp, yytname[yytype]);
    01723
    01724               if (yycount < 5)
    01725                 {
    01726                   yyprefix = ", expecting ";
    01727                   for (yyx = yyxbegin; yyx < yyxend; ++yyx)
    01728                     if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
    01729                       {
    01730                         yyp = yystpcpy (yyp, yyprefix);
    01731                         yyp = yystpcpy (yyp, yytname[yyx]);
    01732                         yyprefix = " or ";
    01733                       }
    01734                 }
    01735               yyerror (yymsg);
    01736               YYSTACK_FREE (yymsg);
    01737             }
    01738           else
    01739             yyerror ("syntax error; also virtual memory exhausted");
    01740         }
    01741       else
    01742 #endif /* YYERROR_VERBOSE */
    01743         yyerror ("syntax error");
    01744     }
    01745
    01746
    01747
    01748   if (yyerrstatus == 3)
    01749     {
    01750       /* If just tried and failed to reuse lookahead token after an
    01751          error, discard it.  */
    01752
    01753       if (yychar <= YYEOF)
    01754         {
    01755           /* If at end of input, pop the error token,
    01756              then the rest of the stack, then return failure.  */
    01757           if (yychar == YYEOF)
    01758              for (;;)
    01759                {
    01760                  YYPOPSTACK;
    01761                  if (yyssp == yyss)
    01762                    YYABORT;
    01763                  YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp);
    01764                  yydestruct (yystos[*yyssp], yyvsp);
    01765                }
    01766         }
    01767       else
    01768         {
    01769           YYDSYMPRINTF ("Error: discarding", yytoken, &yylval, &yylloc);
    01770           yydestruct (yytoken, &yylval);
    01771           yychar = YYEMPTY;
    01772
    01773         }
    01774     }
    01775
    01776   /* Else will try to reuse lookahead token after shifting the error
    01777      token.  */
    01778   goto yyerrlab1;
    01779
    01780
    01781 /*---------------------------------------------------.
    01782 | yyerrorlab -- error raised explicitly by YYERROR.  |
    01783 `---------------------------------------------------*/
    01784 yyerrorlab:
    01785
    01786 #ifdef __GNUC__
    01787   /* Pacify GCC when the user code never invokes YYERROR and the label
    01788      yyerrorlab therefore never appears in user code.  */
    01789   if (0)
    01790      goto yyerrorlab;
    01791 #endif
    01792
    01793   yyvsp -= yylen;
    01794   yyssp -= yylen;
    01795   yystate = *yyssp;
    01796   goto yyerrlab1;
    01797
    01798
    01799 /*-------------------------------------------------------------.
    01800 | yyerrlab1 -- common code for both syntax error and YYERROR.  |
    01801 `-------------------------------------------------------------*/
    01802 yyerrlab1:
    01803   yyerrstatus = 3;      /* Each real token shifted decrements this.  */
    01804
    01805   for (;;)
    01806     {
    01807       yyn = yypact[yystate];
    01808       if (yyn != YYPACT_NINF)
    01809         {
    01810           yyn += YYTERROR;
    01811           if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
    01812             {
    01813               yyn = yytable[yyn];
    01814               if (0 < yyn)
    01815                 break;
    01816             }
    01817         }
    01818
    01819       /* Pop the current state because it cannot handle the error token.  */
    01820       if (yyssp == yyss)
    01821         YYABORT;
    01822
    01823       YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp);
    01824       yydestruct (yystos[yystate], yyvsp);
    01825       YYPOPSTACK;
    01826       yystate = *yyssp;
    01827       YY_STACK_PRINT (yyss, yyssp);
    01828     }
    01829
    01830   if (yyn == YYFINAL)
    01831     YYACCEPT;
    01832
    01833   YYDPRINTF ((stderr, "Shifting error token, "));
    01834
    01835   *++yyvsp = yylval;
    01836
    01837
    01838   yystate = yyn;
    01839   goto yynewstate;
    01840
    01841
    01842 /*-------------------------------------.
    01843 | yyacceptlab -- YYACCEPT comes here.  |
    01844 `-------------------------------------*/
    01845 yyacceptlab:
    01846   yyresult = 0;
    01847   goto yyreturn;
    01848
    01849 /*-----------------------------------.
    01850 | yyabortlab -- YYABORT comes here.  |
    01851 `-----------------------------------*/
    01852 yyabortlab:
    01853   yyresult = 1;
    01854   goto yyreturn;
    01855
    01856 #ifndef yyoverflow
    01857 /*----------------------------------------------.
    01858 | yyoverflowlab -- parser overflow comes here.  |
    01859 `----------------------------------------------*/
    01860 yyoverflowlab:
    01861   yyerror ("parser stack overflow");
    01862   yyresult = 2;
    01863   /* Fall through.  */
    01864 #endif
    01865
    01866 yyreturn:
    01867 #ifndef yyoverflow
    01868   if (yyss != yyssa)
    01869     YYSTACK_FREE (yyss);
    01870 #endif
    01871   return yyresult;
    01872 }
    01873
    01874
    01875 #line 464 "gram.y"
    01876
    01877
    01878 void
    01879 apply_seq_in_map( SyckParser *parser, SyckNode *n )
    01880 {
    01881     long map_len;
    01882     if ( n->shortcut == NULL )
    01883     {
    01884         return;
    01885     }
    01886
    01887     map_len = syck_map_count( n );
    01888     syck_map_assign( n, map_value, map_len - 1,
    01889         syck_hdlr_add_node( parser, n->shortcut ) );
    01890
    01891     n->shortcut = NULL;
    01892 }
    01893
    01894
    01895