aa9cf9a370965ab62c5fd31069f7f463a2af6406
[occt.git] / src / StepFile / step.tab.c
1 /* A Bison parser, made by GNU Bison 2.7.  */
2
3 /* Bison implementation for Yacc-like parsers in C
4    
5       Copyright (C) 1984, 1989-1990, 2000-2012 Free Software Foundation, Inc.
6    
7    This program is free software: you can redistribute it and/or modify
8    it under the terms of the GNU General Public License as published by
9    the Free Software Foundation, either version 3 of the License, or
10    (at your option) any later version.
11    
12    This program is distributed in the hope that it will be useful,
13    but WITHOUT ANY WARRANTY; without even the implied warranty of
14    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15    GNU General Public License for more details.
16    
17    You should have received a copy of the GNU General Public License
18    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
19
20 /* As a special exception, you may create a larger work that contains
21    part or all of the Bison parser skeleton and distribute that work
22    under terms of your choice, so long as that work isn't itself a
23    parser generator using the skeleton or a modified version thereof
24    as a parser skeleton.  Alternatively, if you modify or redistribute
25    the parser skeleton itself, you may (at your option) remove this
26    special exception, which will cause the skeleton and the resulting
27    Bison output files to be licensed under the GNU General Public
28    License without this special exception.
29    
30    This special exception was added by the Free Software Foundation in
31    version 2.2 of Bison.  */
32
33 /* C LALR(1) parser skeleton written by Richard Stallman, by
34    simplifying the original so-called "semantic" parser.  */
35
36 /* All symbols defined below should begin with yy or YY, to avoid
37    infringing on user name space.  This should be done even for local
38    variables, as they might otherwise be expanded by user macros.
39    There are some unavoidable exceptions within include files to
40    define necessary library symbols; they are noted "INFRINGES ON
41    USER NAME SPACE" below.  */
42
43 /* Identify Bison output.  */
44 #define YYBISON 1
45
46 /* Bison version.  */
47 #define YYBISON_VERSION "2.7"
48
49 /* Skeleton name.  */
50 #define YYSKELETON_NAME "yacc.c"
51
52 /* Pure parsers.  */
53 #define YYPURE 0
54
55 /* Push parsers.  */
56 #define YYPUSH 0
57
58 /* Pull parsers.  */
59 #define YYPULL 1
60
61 /* "%code top" blocks.  */
62
63
64 // This file is part of Open CASCADE Technology software library.
65 // This file is generated, do not modify it directly; edit source file step.yacc instead.
66
67
68
69
70 /* Substitute the variable and function names.  */
71 #define yyparse         stepparse
72 #define yylex           steplex
73 #define yyerror         steperror
74 #define yylval          steplval
75 #define yychar          stepchar
76 #define yydebug         stepdebug
77 #define yynerrs         stepnerrs
78
79 /* Copy the first part of user declarations.  */
80
81
82 #include "recfile.ph"           /* definitions des types d'arguments */
83 #include "recfile.pc"           /* la-dedans, tout y est */
84
85 #define stepclearin yychar = -1
86 #define steperrok yyerrflag = 0
87
88 // disable MSVC warnings in bison code
89 #ifdef _MSC_VER
90 #pragma warning(disable:4244 4131 4127 4702)
91 #define YYMALLOC malloc
92 #define YYFREE free
93 #endif
94
95
96
97
98 # ifndef YY_NULL
99 #  if defined __cplusplus && 201103L <= __cplusplus
100 #   define YY_NULL nullptr
101 #  else
102 #   define YY_NULL 0
103 #  endif
104 # endif
105
106 /* Enabling verbose error messages.  */
107 #ifdef YYERROR_VERBOSE
108 # undef YYERROR_VERBOSE
109 # define YYERROR_VERBOSE 1
110 #else
111 # define YYERROR_VERBOSE 0
112 #endif
113
114 /* In a future release of Bison, this section will be replaced
115    by #include "step.tab.h".  */
116 #ifndef YY_STEP_D_ABV_OCCT_OCCT_SRC_STEPFILE_STEP_TAB_H_INCLUDED
117 # define YY_STEP_D_ABV_OCCT_OCCT_SRC_STEPFILE_STEP_TAB_H_INCLUDED
118 /* Enabling traces.  */
119 #ifndef YYDEBUG
120 # define YYDEBUG 0
121 #endif
122 #if YYDEBUG
123 extern int stepdebug;
124 #endif
125
126 /* Tokens.  */
127 #ifndef YYTOKENTYPE
128 # define YYTOKENTYPE
129    /* Put the tokens into the symbol table, so that GDB and other debuggers
130       know about them.  */
131    enum yytokentype {
132      STEP = 258,
133      HEADER = 259,
134      ENDSEC = 260,
135      DATA = 261,
136      ENDSTEP = 262,
137      SCOPE = 263,
138      ENDSCOPE = 264,
139      ENTITY = 265,
140      TYPE = 266,
141      INTEGER = 267,
142      FLOAT = 268,
143      IDENT = 269,
144      TEXT = 270,
145      NONDEF = 271,
146      ENUM = 272,
147      HEXA = 273,
148      QUID = 274
149    };
150 #endif
151
152
153 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
154 typedef int YYSTYPE;
155 # define YYSTYPE_IS_TRIVIAL 1
156 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
157 # define YYSTYPE_IS_DECLARED 1
158 #endif
159
160 extern YYSTYPE steplval;
161
162 #ifdef YYPARSE_PARAM
163 #if defined __STDC__ || defined __cplusplus
164 int stepparse (void *YYPARSE_PARAM);
165 #else
166 int stepparse ();
167 #endif
168 #else /* ! YYPARSE_PARAM */
169 #if defined __STDC__ || defined __cplusplus
170 int stepparse (void);
171 #else
172 int stepparse ();
173 #endif
174 #endif /* ! YYPARSE_PARAM */
175
176 #endif /* !YY_STEP_D_ABV_OCCT_OCCT_SRC_STEPFILE_STEP_TAB_H_INCLUDED  */
177
178 /* Copy the second part of user declarations.  */
179
180
181
182 #ifdef short
183 # undef short
184 #endif
185
186 #ifdef YYTYPE_UINT8
187 typedef YYTYPE_UINT8 yytype_uint8;
188 #else
189 typedef unsigned char yytype_uint8;
190 #endif
191
192 #ifdef YYTYPE_INT8
193 typedef YYTYPE_INT8 yytype_int8;
194 #elif (defined __STDC__ || defined __C99__FUNC__ \
195      || defined __cplusplus || defined _MSC_VER)
196 typedef signed char yytype_int8;
197 #else
198 typedef short int yytype_int8;
199 #endif
200
201 #ifdef YYTYPE_UINT16
202 typedef YYTYPE_UINT16 yytype_uint16;
203 #else
204 typedef unsigned short int yytype_uint16;
205 #endif
206
207 #ifdef YYTYPE_INT16
208 typedef YYTYPE_INT16 yytype_int16;
209 #else
210 typedef short int yytype_int16;
211 #endif
212
213 #ifndef YYSIZE_T
214 # ifdef __SIZE_TYPE__
215 #  define YYSIZE_T __SIZE_TYPE__
216 # elif defined size_t
217 #  define YYSIZE_T size_t
218 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
219      || defined __cplusplus || defined _MSC_VER)
220 #  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
221 #  define YYSIZE_T size_t
222 # else
223 #  define YYSIZE_T unsigned int
224 # endif
225 #endif
226
227 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
228
229 #ifndef YY_
230 # if defined YYENABLE_NLS && YYENABLE_NLS
231 #  if ENABLE_NLS
232 #   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
233 #   define YY_(Msgid) dgettext ("bison-runtime", Msgid)
234 #  endif
235 # endif
236 # ifndef YY_
237 #  define YY_(Msgid) Msgid
238 # endif
239 #endif
240
241 /* Suppress unused-variable warnings by "using" E.  */
242 #if ! defined lint || defined __GNUC__
243 # define YYUSE(E) ((void) (E))
244 #else
245 # define YYUSE(E) /* empty */
246 #endif
247
248 /* Identity function, used to suppress warnings about constant conditions.  */
249 #ifndef lint
250 # define YYID(N) (N)
251 #else
252 #if (defined __STDC__ || defined __C99__FUNC__ \
253      || defined __cplusplus || defined _MSC_VER)
254 static int
255 YYID (int yyi)
256 #else
257 static int
258 YYID (yyi)
259     int yyi;
260 #endif
261 {
262   return yyi;
263 }
264 #endif
265
266 #if ! defined yyoverflow || YYERROR_VERBOSE
267
268 /* The parser invokes alloca or malloc; define the necessary symbols.  */
269
270 # ifdef YYSTACK_USE_ALLOCA
271 #  if YYSTACK_USE_ALLOCA
272 #   ifdef __GNUC__
273 #    define YYSTACK_ALLOC __builtin_alloca
274 #   elif defined __BUILTIN_VA_ARG_INCR
275 #    include <alloca.h> /* INFRINGES ON USER NAME SPACE */
276 #   elif defined _AIX
277 #    define YYSTACK_ALLOC __alloca
278 #   elif defined _MSC_VER
279 #    include <malloc.h> /* INFRINGES ON USER NAME SPACE */
280 #    define alloca _alloca
281 #   else
282 #    define YYSTACK_ALLOC alloca
283 #    if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
284      || defined __cplusplus || defined _MSC_VER)
285 #     include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
286       /* Use EXIT_SUCCESS as a witness for stdlib.h.  */
287 #     ifndef EXIT_SUCCESS
288 #      define EXIT_SUCCESS 0
289 #     endif
290 #    endif
291 #   endif
292 #  endif
293 # endif
294
295 # ifdef YYSTACK_ALLOC
296    /* Pacify GCC's `empty if-body' warning.  */
297 #  define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
298 #  ifndef YYSTACK_ALLOC_MAXIMUM
299     /* The OS might guarantee only one guard page at the bottom of the stack,
300        and a page size can be as small as 4096 bytes.  So we cannot safely
301        invoke alloca (N) if N exceeds 4096.  Use a slightly smaller number
302        to allow for a few compiler-allocated temporary stack slots.  */
303 #   define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
304 #  endif
305 # else
306 #  define YYSTACK_ALLOC YYMALLOC
307 #  define YYSTACK_FREE YYFREE
308 #  ifndef YYSTACK_ALLOC_MAXIMUM
309 #   define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
310 #  endif
311 #  if (defined __cplusplus && ! defined EXIT_SUCCESS \
312        && ! ((defined YYMALLOC || defined malloc) \
313              && (defined YYFREE || defined free)))
314 #   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
315 #   ifndef EXIT_SUCCESS
316 #    define EXIT_SUCCESS 0
317 #   endif
318 #  endif
319 #  ifndef YYMALLOC
320 #   define YYMALLOC malloc
321 #   if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
322      || defined __cplusplus || defined _MSC_VER)
323 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
324 #   endif
325 #  endif
326 #  ifndef YYFREE
327 #   define YYFREE free
328 #   if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
329      || defined __cplusplus || defined _MSC_VER)
330 void free (void *); /* INFRINGES ON USER NAME SPACE */
331 #   endif
332 #  endif
333 # endif
334 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
335
336
337 #if (! defined yyoverflow \
338      && (! defined __cplusplus \
339          || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
340
341 /* A type that is properly aligned for any stack member.  */
342 union yyalloc
343 {
344   yytype_int16 yyss_alloc;
345   YYSTYPE yyvs_alloc;
346 };
347
348 /* The size of the maximum gap between one aligned stack and the next.  */
349 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
350
351 /* The size of an array large to enough to hold all stacks, each with
352    N elements.  */
353 # define YYSTACK_BYTES(N) \
354      ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
355       + YYSTACK_GAP_MAXIMUM)
356
357 # define YYCOPY_NEEDED 1
358
359 /* Relocate STACK from its old location to the new one.  The
360    local variables YYSIZE and YYSTACKSIZE give the old and new number of
361    elements in the stack, and YYPTR gives the new location of the
362    stack.  Advance YYPTR to a properly aligned location for the next
363    stack.  */
364 # define YYSTACK_RELOCATE(Stack_alloc, Stack)                           \
365     do                                                                  \
366       {                                                                 \
367         YYSIZE_T yynewbytes;                                            \
368         YYCOPY (&yyptr->Stack_alloc, Stack, yysize);                    \
369         Stack = &yyptr->Stack_alloc;                                    \
370         yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
371         yyptr += yynewbytes / sizeof (*yyptr);                          \
372       }                                                                 \
373     while (YYID (0))
374
375 #endif
376
377 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
378 /* Copy COUNT objects from SRC to DST.  The source and destination do
379    not overlap.  */
380 # ifndef YYCOPY
381 #  if defined __GNUC__ && 1 < __GNUC__
382 #   define YYCOPY(Dst, Src, Count) \
383       __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
384 #  else
385 #   define YYCOPY(Dst, Src, Count)              \
386       do                                        \
387         {                                       \
388           YYSIZE_T yyi;                         \
389           for (yyi = 0; yyi < (Count); yyi++)   \
390             (Dst)[yyi] = (Src)[yyi];            \
391         }                                       \
392       while (YYID (0))
393 #  endif
394 # endif
395 #endif /* !YYCOPY_NEEDED */
396
397 /* YYFINAL -- State number of the termination state.  */
398 #define YYFINAL  7
399 /* YYLAST -- Last index in YYTABLE.  */
400 #define YYLAST   81
401
402 /* YYNTOKENS -- Number of terminals.  */
403 #define YYNTOKENS  27
404 /* YYNNTS -- Number of nonterminals.  */
405 #define YYNNTS  27
406 /* YYNRULES -- Number of rules.  */
407 #define YYNRULES  49
408 /* YYNRULES -- Number of states.  */
409 #define YYNSTATES  85
410
411 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */
412 #define YYUNDEFTOK  2
413 #define YYMAXUTOK   274
414
415 #define YYTRANSLATE(YYX)                                                \
416   ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
417
418 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX.  */
419 static const yytype_uint8 yytranslate[] =
420 {
421        0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
422        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
423        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
424        2,     2,    20,     2,     2,     2,     2,     2,     2,     2,
425       22,    23,     2,     2,    24,     2,     2,    26,     2,     2,
426        2,     2,     2,     2,     2,     2,     2,     2,     2,    21,
427        2,    25,     2,     2,     2,     2,     2,     2,     2,     2,
428        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
429        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
430        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
431        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
432        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
433        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
434        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
435        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
436        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
437        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
438        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
439        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
440        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
441        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
442        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
443        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
444        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
445        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
446        2,     2,     2,     2,     2,     2,     1,     2,     3,     4,
447        5,     6,     7,     8,     9,    10,    11,    12,    13,    14,
448       15,    16,    17,    18,    19
449 };
450
451 #if YYDEBUG
452 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
453    YYRHS.  */
454 static const yytype_uint8 yyprhs[] =
455 {
456        0,     0,     3,     5,     8,    10,    13,    22,    30,    37,
457       39,    41,    43,    45,    48,    52,    54,    56,    58,    60,
458       62,    65,    67,    69,    71,    73,    76,    80,    83,    85,
459       89,    92,    94,    97,   102,   110,   117,   119,   122,   126,
460      129,   133,   135,   137,   139,   143,   145,   147,   152,   154
461 };
462
463 /* YYRHS -- A `-1'-separated list of the rules' RHS.  */
464 static const yytype_int8 yyrhs[] =
465 {
466       33,     0,    -1,    20,    -1,    28,    20,    -1,     7,    -1,
467        7,    28,    -1,     3,     4,    34,     5,    36,    43,     5,
468       29,    -1,     3,     4,     5,    36,    43,     5,     7,    -1,
469        3,     4,     5,    36,    43,     1,    -1,    30,    -1,    31,
470       -1,    32,    -1,    35,    -1,    34,    35,    -1,    53,    41,
471       21,    -1,     1,    -1,     6,    -1,    14,    -1,    19,    -1,
472       41,    -1,    38,    41,    -1,     1,    -1,    11,    -1,    22,
473       -1,    23,    -1,    39,    40,    -1,    39,    42,    40,    -1,
474       39,     1,    -1,    37,    -1,    42,    24,    37,    -1,    42,
475        1,    -1,    44,    -1,    43,    44,    -1,    52,    25,    46,
476       21,    -1,    52,    25,    47,    43,    51,    46,    21,    -1,
477       52,    25,    47,    51,    46,    21,    -1,     1,    -1,    53,
478       41,    -1,    45,    53,    41,    -1,    53,    41,    -1,    22,
479       45,    23,    -1,     8,    -1,    14,    -1,    48,    -1,    49,
480       24,    48,    -1,    26,    -1,     9,    -1,     9,    50,    49,
481       26,    -1,    10,    -1,    11,    -1
482 };
483
484 /* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
485 static const yytype_uint8 yyrline[] =
486 {
487        0,    41,    41,    42,    43,    44,    45,    46,    47,    48,
488       48,    48,    51,    52,    54,    55,    57,    60,    61,    62,
489       63,    64,    68,    71,    74,    79,    80,    81,    83,    84,
490       85,    87,    88,    90,    91,    92,    93,    95,    96,    98,
491       99,   101,   104,   107,   108,   110,   113,   115,   120,   123
492 };
493 #endif
494
495 #if YYDEBUG || YYERROR_VERBOSE || 0
496 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
497    First, the terminals, then, starting at YYNTOKENS, nonterminals.  */
498 static const char *const yytname[] =
499 {
500   "$end", "error", "$undefined", "STEP", "HEADER", "ENDSEC", "DATA",
501   "ENDSTEP", "SCOPE", "ENDSCOPE", "ENTITY", "TYPE", "INTEGER", "FLOAT",
502   "IDENT", "TEXT", "NONDEF", "ENUM", "HEXA", "QUID", "' '", "';'", "'('",
503   "')'", "','", "'='", "'/'", "$accept", "finvide", "finstep", "stepf1",
504   "stepf2", "stepf3", "stepf", "headl", "headent", "endhead", "unarg",
505   "listype", "deblist", "finlist", "listarg", "arglist", "model", "bloc",
506   "plex", "unent", "debscop", "unid", "export", "debexp", "finscop",
507   "entlab", "enttype", YY_NULL
508 };
509 #endif
510
511 # ifdef YYPRINT
512 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
513    token YYLEX-NUM.  */
514 static const yytype_uint16 yytoknum[] =
515 {
516        0,   256,   257,   258,   259,   260,   261,   262,   263,   264,
517      265,   266,   267,   268,   269,   270,   271,   272,   273,   274,
518       32,    59,    40,    41,    44,    61,    47
519 };
520 # endif
521
522 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
523 static const yytype_uint8 yyr1[] =
524 {
525        0,    27,    28,    28,    29,    29,    30,    31,    32,    33,
526       33,    33,    34,    34,    35,    35,    36,    37,    37,    37,
527       37,    37,    38,    39,    40,    41,    41,    41,    42,    42,
528       42,    43,    43,    44,    44,    44,    44,    45,    45,    46,
529       46,    47,    48,    49,    49,    50,    51,    51,    52,    53
530 };
531
532 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN.  */
533 static const yytype_uint8 yyr2[] =
534 {
535        0,     2,     1,     2,     1,     2,     8,     7,     6,     1,
536        1,     1,     1,     2,     3,     1,     1,     1,     1,     1,
537        2,     1,     1,     1,     1,     2,     3,     2,     1,     3,
538        2,     1,     2,     4,     7,     6,     1,     2,     3,     2,
539        3,     1,     1,     1,     3,     1,     1,     4,     1,     1
540 };
541
542 /* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM.
543    Performed when YYTABLE doesn't specify something else to do.  Zero
544    means the default is an error.  */
545 static const yytype_uint8 yydefact[] =
546 {
547        0,     0,     9,    10,    11,     0,     0,     1,    15,     0,
548       49,     0,    12,     0,    16,     0,     0,    13,    23,     0,
549        0,    36,    48,     0,    31,     0,     0,    21,    22,    17,
550       18,    24,    28,     0,    25,    19,     0,    14,    36,     0,
551       32,     0,     0,    20,    30,     0,    26,     7,    41,     0,
552        0,     0,     0,     0,    21,    29,     0,     0,    33,    46,
553        0,     0,    39,     4,     6,    40,     0,    37,    45,     0,
554        0,     0,     2,     5,    38,    42,    43,     0,     0,    35,
555        3,     0,    47,    34,    44
556 };
557
558 /* YYDEFGOTO[NTERM-NUM].  */
559 static const yytype_int8 yydefgoto[] =
560 {
561       -1,    73,    64,     2,     3,     4,     5,    11,    12,    15,
562       32,    33,    19,    34,    35,    36,    23,    24,    56,    50,
563       51,    76,    77,    69,    61,    25,    52
564 };
565
566 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
567    STATE-NUM.  */
568 #define YYPACT_NINF -26
569 static const yytype_int8 yypact[] =
570 {
571       27,    30,   -26,   -26,   -26,    31,    36,   -26,   -26,    55,
572      -26,    49,   -26,    14,   -26,    41,    55,   -26,   -26,    10,
573       42,   -26,   -26,     9,   -26,    37,    41,    -3,   -26,   -26,
574      -26,   -26,   -26,    14,   -26,   -26,     4,   -26,    65,    59,
575      -26,     1,    54,   -26,   -26,    24,   -26,   -26,   -26,    56,
576       48,    47,    14,    61,   -26,   -26,    -7,    14,   -26,    44,
577       47,    -5,   -26,    51,   -26,   -26,    14,   -26,   -26,    58,
578       -5,    52,   -26,    57,   -26,   -26,   -26,   -11,    53,   -26,
579      -26,    58,   -26,   -26,   -26
580 };
581
582 /* YYPGOTO[NTERM-NUM].  */
583 static const yytype_int8 yypgoto[] =
584 {
585      -26,   -26,   -26,   -26,   -26,   -26,   -26,   -26,    64,    60,
586       33,   -26,   -26,    43,   -13,   -26,   -25,   -20,   -26,   -12,
587      -26,    -1,   -26,   -26,    21,   -26,    -4
588 };
589
590 /* YYTABLE[YYPACT[STATE-NUM]].  What to do in state STATE-NUM.  If
591    positive, shift that token.  If negative, reduce the rule which
592    number is the opposite.  If YYTABLE_NINF, syntax error.  */
593 #define YYTABLE_NINF -28
594 static const yytype_int8 yytable[] =
595 {
596       20,    42,    13,    40,    10,    44,    10,    13,   -27,    48,
597       38,    27,    10,    81,    39,    82,    65,    49,   -27,    22,
598       43,    28,    40,    49,    29,    54,    60,    31,    45,    30,
599        1,     7,    18,    31,     6,    28,    18,     8,    29,    62,
600       40,     9,    21,    30,    67,    57,    18,    10,    21,    71,
601        8,    22,    66,    74,    16,    21,    59,    22,    78,    53,
602       10,    14,    41,    37,    22,    -8,    47,    10,    63,    58,
603       68,    72,    75,    79,    83,    17,    26,    80,    55,    46,
604       84,    70
605 };
606
607 #define yypact_value_is_default(Yystate) \
608   (!!((Yystate) == (-26)))
609
610 #define yytable_value_is_error(Yytable_value) \
611   YYID (0)
612
613 static const yytype_uint8 yycheck[] =
614 {
615       13,    26,     6,    23,    11,     1,    11,    11,    11,     8,
616        1,     1,    11,    24,     5,    26,    23,    22,    21,    10,
617       33,    11,    42,    22,    14,     1,    51,    23,    24,    19,
618        3,     0,    22,    23,     4,    11,    22,     1,    14,    52,
619       60,     5,     1,    19,    57,    49,    22,    11,     1,    61,
620        1,    10,    56,    66,     5,     1,     9,    10,    70,     5,
621       11,     6,    25,    21,    10,     0,     7,    11,     7,    21,
622       26,    20,    14,    21,    21,    11,    16,    20,    45,    36,
623       81,    60
624 };
625
626 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
627    symbol of state STATE-NUM.  */
628 static const yytype_uint8 yystos[] =
629 {
630        0,     3,    30,    31,    32,    33,     4,     0,     1,     5,
631       11,    34,    35,    53,     6,    36,     5,    35,    22,    39,
632       41,     1,    10,    43,    44,    52,    36,     1,    11,    14,
633       19,    23,    37,    38,    40,    41,    42,    21,     1,     5,
634       44,    25,    43,    41,     1,    24,    40,     7,     8,    22,
635       46,    47,    53,     5,     1,    37,    45,    53,    21,     9,
636       43,    51,    41,     7,    29,    23,    53,    41,    26,    50,
637       51,    46,    20,    28,    41,    14,    48,    49,    46,    21,
638       20,    24,    26,    21,    48
639 };
640
641 #define yyerrok         (yyerrstatus = 0)
642 #define yyclearin       (yychar = YYEMPTY)
643 #define YYEMPTY         (-2)
644 #define YYEOF           0
645
646 #define YYACCEPT        goto yyacceptlab
647 #define YYABORT         goto yyabortlab
648 #define YYERROR         goto yyerrorlab
649
650
651 /* Like YYERROR except do call yyerror.  This remains here temporarily
652    to ease the transition to the new meaning of YYERROR, for GCC.
653    Once GCC version 2 has supplanted version 1, this can go.  However,
654    YYFAIL appears to be in use.  Nevertheless, it is formally deprecated
655    in Bison 2.4.2's NEWS entry, where a plan to phase it out is
656    discussed.  */
657
658 #define YYFAIL          goto yyerrlab
659 #if defined YYFAIL
660   /* This is here to suppress warnings from the GCC cpp's
661      -Wunused-macros.  Normally we don't worry about that warning, but
662      some users do, and we want to make it easy for users to remove
663      YYFAIL uses, which will produce warnings from Bison 2.5.  */
664 #endif
665
666 #define YYRECOVERING()  (!!yyerrstatus)
667
668 #define YYBACKUP(Token, Value)                                  \
669 do                                                              \
670   if (yychar == YYEMPTY)                                        \
671     {                                                           \
672       yychar = (Token);                                         \
673       yylval = (Value);                                         \
674       YYPOPSTACK (yylen);                                       \
675       yystate = *yyssp;                                         \
676       goto yybackup;                                            \
677     }                                                           \
678   else                                                          \
679     {                                                           \
680       yyerror (YY_("syntax error: cannot back up")); \
681       YYERROR;                                                  \
682     }                                                           \
683 while (YYID (0))
684
685 /* Error token number */
686 #define YYTERROR        1
687 #define YYERRCODE       256
688
689
690 /* This macro is provided for backward compatibility. */
691 #ifndef YY_LOCATION_PRINT
692 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
693 #endif
694
695
696 /* YYLEX -- calling `yylex' with the right arguments.  */
697 #ifdef YYLEX_PARAM
698 # define YYLEX yylex (YYLEX_PARAM)
699 #else
700 # define YYLEX yylex ()
701 #endif
702
703 /* Enable debugging if requested.  */
704 #if YYDEBUG
705
706 # ifndef YYFPRINTF
707 #  include <stdio.h> /* INFRINGES ON USER NAME SPACE */
708 #  define YYFPRINTF fprintf
709 # endif
710
711 # define YYDPRINTF(Args)                        \
712 do {                                            \
713   if (yydebug)                                  \
714     YYFPRINTF Args;                             \
715 } while (YYID (0))
716
717 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)                    \
718 do {                                                                      \
719   if (yydebug)                                                            \
720     {                                                                     \
721       YYFPRINTF (stderr, "%s ", Title);                                   \
722       yy_symbol_print (stderr,                                            \
723                   Type, Value); \
724       YYFPRINTF (stderr, "\n");                                           \
725     }                                                                     \
726 } while (YYID (0))
727
728
729 /*--------------------------------.
730 | Print this symbol on YYOUTPUT.  |
731 `--------------------------------*/
732
733 /*ARGSUSED*/
734 #if (defined __STDC__ || defined __C99__FUNC__ \
735      || defined __cplusplus || defined _MSC_VER)
736 static void
737 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
738 #else
739 static void
740 yy_symbol_value_print (yyoutput, yytype, yyvaluep)
741     FILE *yyoutput;
742     int yytype;
743     YYSTYPE const * const yyvaluep;
744 #endif
745 {
746   FILE *yyo = yyoutput;
747   YYUSE (yyo);
748   if (!yyvaluep)
749     return;
750 # ifdef YYPRINT
751   if (yytype < YYNTOKENS)
752     YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
753 # else
754   YYUSE (yyoutput);
755 # endif
756   switch (yytype)
757     {
758       default:
759         break;
760     }
761 }
762
763
764 /*--------------------------------.
765 | Print this symbol on YYOUTPUT.  |
766 `--------------------------------*/
767
768 #if (defined __STDC__ || defined __C99__FUNC__ \
769      || defined __cplusplus || defined _MSC_VER)
770 static void
771 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
772 #else
773 static void
774 yy_symbol_print (yyoutput, yytype, yyvaluep)
775     FILE *yyoutput;
776     int yytype;
777     YYSTYPE const * const yyvaluep;
778 #endif
779 {
780   if (yytype < YYNTOKENS)
781     YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
782   else
783     YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
784
785   yy_symbol_value_print (yyoutput, yytype, yyvaluep);
786   YYFPRINTF (yyoutput, ")");
787 }
788
789 /*------------------------------------------------------------------.
790 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
791 | TOP (included).                                                   |
792 `------------------------------------------------------------------*/
793
794 #if (defined __STDC__ || defined __C99__FUNC__ \
795      || defined __cplusplus || defined _MSC_VER)
796 static void
797 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
798 #else
799 static void
800 yy_stack_print (yybottom, yytop)
801     yytype_int16 *yybottom;
802     yytype_int16 *yytop;
803 #endif
804 {
805   YYFPRINTF (stderr, "Stack now");
806   for (; yybottom <= yytop; yybottom++)
807     {
808       int yybot = *yybottom;
809       YYFPRINTF (stderr, " %d", yybot);
810     }
811   YYFPRINTF (stderr, "\n");
812 }
813
814 # define YY_STACK_PRINT(Bottom, Top)                            \
815 do {                                                            \
816   if (yydebug)                                                  \
817     yy_stack_print ((Bottom), (Top));                           \
818 } while (YYID (0))
819
820
821 /*------------------------------------------------.
822 | Report that the YYRULE is going to be reduced.  |
823 `------------------------------------------------*/
824
825 #if (defined __STDC__ || defined __C99__FUNC__ \
826      || defined __cplusplus || defined _MSC_VER)
827 static void
828 yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
829 #else
830 static void
831 yy_reduce_print (yyvsp, yyrule)
832     YYSTYPE *yyvsp;
833     int yyrule;
834 #endif
835 {
836   int yynrhs = yyr2[yyrule];
837   int yyi;
838   unsigned long int yylno = yyrline[yyrule];
839   YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
840              yyrule - 1, yylno);
841   /* The symbols being reduced.  */
842   for (yyi = 0; yyi < yynrhs; yyi++)
843     {
844       YYFPRINTF (stderr, "   $%d = ", yyi + 1);
845       yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
846                        &(yyvsp[(yyi + 1) - (yynrhs)])
847                                        );
848       YYFPRINTF (stderr, "\n");
849     }
850 }
851
852 # define YY_REDUCE_PRINT(Rule)          \
853 do {                                    \
854   if (yydebug)                          \
855     yy_reduce_print (yyvsp, Rule); \
856 } while (YYID (0))
857
858 /* Nonzero means print parse trace.  It is left uninitialized so that
859    multiple parsers can coexist.  */
860 int yydebug;
861 #else /* !YYDEBUG */
862 # define YYDPRINTF(Args)
863 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
864 # define YY_STACK_PRINT(Bottom, Top)
865 # define YY_REDUCE_PRINT(Rule)
866 #endif /* !YYDEBUG */
867
868
869 /* YYINITDEPTH -- initial size of the parser's stacks.  */
870 #ifndef YYINITDEPTH
871 # define YYINITDEPTH 200
872 #endif
873
874 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
875    if the built-in stack extension method is used).
876
877    Do not make this value too large; the results are undefined if
878    YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
879    evaluated with infinite-precision integer arithmetic.  */
880
881 #ifndef YYMAXDEPTH
882 # define YYMAXDEPTH 10000
883 #endif
884
885
886 #if YYERROR_VERBOSE
887
888 # ifndef yystrlen
889 #  if defined __GLIBC__ && defined _STRING_H
890 #   define yystrlen strlen
891 #  else
892 /* Return the length of YYSTR.  */
893 #if (defined __STDC__ || defined __C99__FUNC__ \
894      || defined __cplusplus || defined _MSC_VER)
895 static YYSIZE_T
896 yystrlen (const char *yystr)
897 #else
898 static YYSIZE_T
899 yystrlen (yystr)
900     const char *yystr;
901 #endif
902 {
903   YYSIZE_T yylen;
904   for (yylen = 0; yystr[yylen]; yylen++)
905     continue;
906   return yylen;
907 }
908 #  endif
909 # endif
910
911 # ifndef yystpcpy
912 #  if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
913 #   define yystpcpy stpcpy
914 #  else
915 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
916    YYDEST.  */
917 #if (defined __STDC__ || defined __C99__FUNC__ \
918      || defined __cplusplus || defined _MSC_VER)
919 static char *
920 yystpcpy (char *yydest, const char *yysrc)
921 #else
922 static char *
923 yystpcpy (yydest, yysrc)
924     char *yydest;
925     const char *yysrc;
926 #endif
927 {
928   char *yyd = yydest;
929   const char *yys = yysrc;
930
931   while ((*yyd++ = *yys++) != '\0')
932     continue;
933
934   return yyd - 1;
935 }
936 #  endif
937 # endif
938
939 # ifndef yytnamerr
940 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
941    quotes and backslashes, so that it's suitable for yyerror.  The
942    heuristic is that double-quoting is unnecessary unless the string
943    contains an apostrophe, a comma, or backslash (other than
944    backslash-backslash).  YYSTR is taken from yytname.  If YYRES is
945    null, do not copy; instead, return the length of what the result
946    would have been.  */
947 static YYSIZE_T
948 yytnamerr (char *yyres, const char *yystr)
949 {
950   if (*yystr == '"')
951     {
952       YYSIZE_T yyn = 0;
953       char const *yyp = yystr;
954
955       for (;;)
956         switch (*++yyp)
957           {
958           case '\'':
959           case ',':
960             goto do_not_strip_quotes;
961
962           case '\\':
963             if (*++yyp != '\\')
964               goto do_not_strip_quotes;
965             /* Fall through.  */
966           default:
967             if (yyres)
968               yyres[yyn] = *yyp;
969             yyn++;
970             break;
971
972           case '"':
973             if (yyres)
974               yyres[yyn] = '\0';
975             return yyn;
976           }
977     do_not_strip_quotes: ;
978     }
979
980   if (! yyres)
981     return yystrlen (yystr);
982
983   return yystpcpy (yyres, yystr) - yyres;
984 }
985 # endif
986
987 /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
988    about the unexpected token YYTOKEN for the state stack whose top is
989    YYSSP.
990
991    Return 0 if *YYMSG was successfully written.  Return 1 if *YYMSG is
992    not large enough to hold the message.  In that case, also set
993    *YYMSG_ALLOC to the required number of bytes.  Return 2 if the
994    required number of bytes is too large to store.  */
995 static int
996 yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
997                 yytype_int16 *yyssp, int yytoken)
998 {
999   YYSIZE_T yysize0 = yytnamerr (YY_NULL, yytname[yytoken]);
1000   YYSIZE_T yysize = yysize0;
1001   enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1002   /* Internationalized format string. */
1003   const char *yyformat = YY_NULL;
1004   /* Arguments of yyformat. */
1005   char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1006   /* Number of reported tokens (one for the "unexpected", one per
1007      "expected"). */
1008   int yycount = 0;
1009
1010   /* There are many possibilities here to consider:
1011      - Assume YYFAIL is not used.  It's too flawed to consider.  See
1012        <http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html>
1013        for details.  YYERROR is fine as it does not invoke this
1014        function.
1015      - If this state is a consistent state with a default action, then
1016        the only way this function was invoked is if the default action
1017        is an error action.  In that case, don't check for expected
1018        tokens because there are none.
1019      - The only way there can be no lookahead present (in yychar) is if
1020        this state is a consistent state with a default action.  Thus,
1021        detecting the absence of a lookahead is sufficient to determine
1022        that there is no unexpected or expected token to report.  In that
1023        case, just report a simple "syntax error".
1024      - Don't assume there isn't a lookahead just because this state is a
1025        consistent state with a default action.  There might have been a
1026        previous inconsistent state, consistent state with a non-default
1027        action, or user semantic action that manipulated yychar.
1028      - Of course, the expected token list depends on states to have
1029        correct lookahead information, and it depends on the parser not
1030        to perform extra reductions after fetching a lookahead from the
1031        scanner and before detecting a syntax error.  Thus, state merging
1032        (from LALR or IELR) and default reductions corrupt the expected
1033        token list.  However, the list is correct for canonical LR with
1034        one exception: it will still contain any token that will not be
1035        accepted due to an error action in a later state.
1036   */
1037   if (yytoken != YYEMPTY)
1038     {
1039       int yyn = yypact[*yyssp];
1040       yyarg[yycount++] = yytname[yytoken];
1041       if (!yypact_value_is_default (yyn))
1042         {
1043           /* Start YYX at -YYN if negative to avoid negative indexes in
1044              YYCHECK.  In other words, skip the first -YYN actions for
1045              this state because they are default actions.  */
1046           int yyxbegin = yyn < 0 ? -yyn : 0;
1047           /* Stay within bounds of both yycheck and yytname.  */
1048           int yychecklim = YYLAST - yyn + 1;
1049           int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1050           int yyx;
1051
1052           for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1053             if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
1054                 && !yytable_value_is_error (yytable[yyx + yyn]))
1055               {
1056                 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1057                   {
1058                     yycount = 1;
1059                     yysize = yysize0;
1060                     break;
1061                   }
1062                 yyarg[yycount++] = yytname[yyx];
1063                 {
1064                   YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]);
1065                   if (! (yysize <= yysize1
1066                          && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1067                     return 2;
1068                   yysize = yysize1;
1069                 }
1070               }
1071         }
1072     }
1073
1074   switch (yycount)
1075     {
1076 # define YYCASE_(N, S)                      \
1077       case N:                               \
1078         yyformat = S;                       \
1079       break
1080       YYCASE_(0, YY_("syntax error"));
1081       YYCASE_(1, YY_("syntax error, unexpected %s"));
1082       YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
1083       YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
1084       YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
1085       YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
1086 # undef YYCASE_
1087     }
1088
1089   {
1090     YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
1091     if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1092       return 2;
1093     yysize = yysize1;
1094   }
1095
1096   if (*yymsg_alloc < yysize)
1097     {
1098       *yymsg_alloc = 2 * yysize;
1099       if (! (yysize <= *yymsg_alloc
1100              && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
1101         *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
1102       return 1;
1103     }
1104
1105   /* Avoid sprintf, as that infringes on the user's name space.
1106      Don't have undefined behavior even if the translation
1107      produced a string with the wrong number of "%s"s.  */
1108   {
1109     char *yyp = *yymsg;
1110     int yyi = 0;
1111     while ((*yyp = *yyformat) != '\0')
1112       if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
1113         {
1114           yyp += yytnamerr (yyp, yyarg[yyi++]);
1115           yyformat += 2;
1116         }
1117       else
1118         {
1119           yyp++;
1120           yyformat++;
1121         }
1122   }
1123   return 0;
1124 }
1125 #endif /* YYERROR_VERBOSE */
1126
1127 /*-----------------------------------------------.
1128 | Release the memory associated to this symbol.  |
1129 `-----------------------------------------------*/
1130
1131 /*ARGSUSED*/
1132 #if (defined __STDC__ || defined __C99__FUNC__ \
1133      || defined __cplusplus || defined _MSC_VER)
1134 static void
1135 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
1136 #else
1137 static void
1138 yydestruct (yymsg, yytype, yyvaluep)
1139     const char *yymsg;
1140     int yytype;
1141     YYSTYPE *yyvaluep;
1142 #endif
1143 {
1144   YYUSE (yyvaluep);
1145
1146   if (!yymsg)
1147     yymsg = "Deleting";
1148   YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1149
1150   switch (yytype)
1151     {
1152
1153       default:
1154         break;
1155     }
1156 }
1157
1158
1159
1160
1161 /* The lookahead symbol.  */
1162 int yychar;
1163
1164
1165 #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1166 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1167 # define YY_IGNORE_MAYBE_UNINITIALIZED_END
1168 #endif
1169 #ifndef YY_INITIAL_VALUE
1170 # define YY_INITIAL_VALUE(Value) /* Nothing. */
1171 #endif
1172
1173 /* The semantic value of the lookahead symbol.  */
1174 YYSTYPE yylval YY_INITIAL_VALUE(yyval_default);
1175
1176 /* Number of syntax errors so far.  */
1177 int yynerrs;
1178
1179
1180 /*----------.
1181 | yyparse.  |
1182 `----------*/
1183
1184 #ifdef YYPARSE_PARAM
1185 #if (defined __STDC__ || defined __C99__FUNC__ \
1186      || defined __cplusplus || defined _MSC_VER)
1187 int
1188 yyparse (void *YYPARSE_PARAM)
1189 #else
1190 int
1191 yyparse (YYPARSE_PARAM)
1192     void *YYPARSE_PARAM;
1193 #endif
1194 #else /* ! YYPARSE_PARAM */
1195 #if (defined __STDC__ || defined __C99__FUNC__ \
1196      || defined __cplusplus || defined _MSC_VER)
1197 int
1198 yyparse (void)
1199 #else
1200 int
1201 yyparse ()
1202
1203 #endif
1204 #endif
1205 {
1206     int yystate;
1207     /* Number of tokens to shift before error messages enabled.  */
1208     int yyerrstatus;
1209
1210     /* The stacks and their tools:
1211        `yyss': related to states.
1212        `yyvs': related to semantic values.
1213
1214        Refer to the stacks through separate pointers, to allow yyoverflow
1215        to reallocate them elsewhere.  */
1216
1217     /* The state stack.  */
1218     yytype_int16 yyssa[YYINITDEPTH];
1219     yytype_int16 *yyss;
1220     yytype_int16 *yyssp;
1221
1222     /* The semantic value stack.  */
1223     YYSTYPE yyvsa[YYINITDEPTH];
1224     YYSTYPE *yyvs;
1225     YYSTYPE *yyvsp;
1226
1227     YYSIZE_T yystacksize;
1228
1229   int yyn;
1230   int yyresult;
1231   /* Lookahead token as an internal (translated) token number.  */
1232   int yytoken = 0;
1233   /* The variables used to return semantic value and location from the
1234      action routines.  */
1235   YYSTYPE yyval;
1236
1237 #if YYERROR_VERBOSE
1238   /* Buffer for error messages, and its allocated size.  */
1239   char yymsgbuf[128];
1240   char *yymsg = yymsgbuf;
1241   YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
1242 #endif
1243
1244 #define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N))
1245
1246   /* The number of symbols on the RHS of the reduced rule.
1247      Keep to zero when no symbol should be popped.  */
1248   int yylen = 0;
1249
1250   yyssp = yyss = yyssa;
1251   yyvsp = yyvs = yyvsa;
1252   yystacksize = YYINITDEPTH;
1253
1254   YYDPRINTF ((stderr, "Starting parse\n"));
1255
1256   yystate = 0;
1257   yyerrstatus = 0;
1258   yynerrs = 0;
1259   yychar = YYEMPTY; /* Cause a token to be read.  */
1260   goto yysetstate;
1261
1262 /*------------------------------------------------------------.
1263 | yynewstate -- Push a new state, which is found in yystate.  |
1264 `------------------------------------------------------------*/
1265  yynewstate:
1266   /* In all cases, when you get here, the value and location stacks
1267      have just been pushed.  So pushing a state here evens the stacks.  */
1268   yyssp++;
1269
1270  yysetstate:
1271   *yyssp = yystate;
1272
1273   if (yyss + yystacksize - 1 <= yyssp)
1274     {
1275       /* Get the current used size of the three stacks, in elements.  */
1276       YYSIZE_T yysize = yyssp - yyss + 1;
1277
1278 #ifdef yyoverflow
1279       {
1280         /* Give user a chance to reallocate the stack.  Use copies of
1281            these so that the &'s don't force the real ones into
1282            memory.  */
1283         YYSTYPE *yyvs1 = yyvs;
1284         yytype_int16 *yyss1 = yyss;
1285
1286         /* Each stack pointer address is followed by the size of the
1287            data in use in that stack, in bytes.  This used to be a
1288            conditional around just the two extra args, but that might
1289            be undefined if yyoverflow is a macro.  */
1290         yyoverflow (YY_("memory exhausted"),
1291                     &yyss1, yysize * sizeof (*yyssp),
1292                     &yyvs1, yysize * sizeof (*yyvsp),
1293                     &yystacksize);
1294
1295         yyss = yyss1;
1296         yyvs = yyvs1;
1297       }
1298 #else /* no yyoverflow */
1299 # ifndef YYSTACK_RELOCATE
1300       goto yyexhaustedlab;
1301 # else
1302       /* Extend the stack our own way.  */
1303       if (YYMAXDEPTH <= yystacksize)
1304         goto yyexhaustedlab;
1305       yystacksize *= 2;
1306       if (YYMAXDEPTH < yystacksize)
1307         yystacksize = YYMAXDEPTH;
1308
1309       {
1310         yytype_int16 *yyss1 = yyss;
1311         union yyalloc *yyptr =
1312           (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1313         if (! yyptr)
1314           goto yyexhaustedlab;
1315         YYSTACK_RELOCATE (yyss_alloc, yyss);
1316         YYSTACK_RELOCATE (yyvs_alloc, yyvs);
1317 #  undef YYSTACK_RELOCATE
1318         if (yyss1 != yyssa)
1319           YYSTACK_FREE (yyss1);
1320       }
1321 # endif
1322 #endif /* no yyoverflow */
1323
1324       yyssp = yyss + yysize - 1;
1325       yyvsp = yyvs + yysize - 1;
1326
1327       YYDPRINTF ((stderr, "Stack size increased to %lu\n",
1328                   (unsigned long int) yystacksize));
1329
1330       if (yyss + yystacksize - 1 <= yyssp)
1331         YYABORT;
1332     }
1333
1334   YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1335
1336   if (yystate == YYFINAL)
1337     YYACCEPT;
1338
1339   goto yybackup;
1340
1341 /*-----------.
1342 | yybackup.  |
1343 `-----------*/
1344 yybackup:
1345
1346   /* Do appropriate processing given the current state.  Read a
1347      lookahead token if we need one and don't already have one.  */
1348
1349   /* First try to decide what to do without reference to lookahead token.  */
1350   yyn = yypact[yystate];
1351   if (yypact_value_is_default (yyn))
1352     goto yydefault;
1353
1354   /* Not known => get a lookahead token if don't already have one.  */
1355
1356   /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol.  */
1357   if (yychar == YYEMPTY)
1358     {
1359       YYDPRINTF ((stderr, "Reading a token: "));
1360       yychar = YYLEX;
1361     }
1362
1363   if (yychar <= YYEOF)
1364     {
1365       yychar = yytoken = YYEOF;
1366       YYDPRINTF ((stderr, "Now at end of input.\n"));
1367     }
1368   else
1369     {
1370       yytoken = YYTRANSLATE (yychar);
1371       YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
1372     }
1373
1374   /* If the proper action on seeing token YYTOKEN is to reduce or to
1375      detect an error, take that action.  */
1376   yyn += yytoken;
1377   if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1378     goto yydefault;
1379   yyn = yytable[yyn];
1380   if (yyn <= 0)
1381     {
1382       if (yytable_value_is_error (yyn))
1383         goto yyerrlab;
1384       yyn = -yyn;
1385       goto yyreduce;
1386     }
1387
1388   /* Count tokens shifted since error; after three, turn off error
1389      status.  */
1390   if (yyerrstatus)
1391     yyerrstatus--;
1392
1393   /* Shift the lookahead token.  */
1394   YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
1395
1396   /* Discard the shifted token.  */
1397   yychar = YYEMPTY;
1398
1399   yystate = yyn;
1400   YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1401   *++yyvsp = yylval;
1402   YY_IGNORE_MAYBE_UNINITIALIZED_END
1403
1404   goto yynewstate;
1405
1406
1407 /*-----------------------------------------------------------.
1408 | yydefault -- do the default action for the current state.  |
1409 `-----------------------------------------------------------*/
1410 yydefault:
1411   yyn = yydefact[yystate];
1412   if (yyn == 0)
1413     goto yyerrlab;
1414   goto yyreduce;
1415
1416
1417 /*-----------------------------.
1418 | yyreduce -- Do a reduction.  |
1419 `-----------------------------*/
1420 yyreduce:
1421   /* yyn is the number of a rule to reduce with.  */
1422   yylen = yyr2[yyn];
1423
1424   /* If YYLEN is nonzero, implement the default value of the action:
1425      `$$ = $1'.
1426
1427      Otherwise, the following line sets YYVAL to garbage.
1428      This behavior is undocumented and Bison
1429      users should not rely upon it.  Assigning to YYVAL
1430      unconditionally makes the parser a bit smaller, and it avoids a
1431      GCC warning that YYVAL may be used uninitialized.  */
1432   yyval = yyvsp[1-yylen];
1433
1434
1435   YY_REDUCE_PRINT (yyn);
1436   switch (yyn)
1437     {
1438         case 11:
1439
1440     {  rec_finfile();  return(0);  /*  fini pour celui-la  */  }
1441     break;
1442
1443   case 16:
1444
1445     {  rec_finhead();  }
1446     break;
1447
1448   case 17:
1449
1450     {  rec_typarg(rec_argIdent);     rec_newarg();  }
1451     break;
1452
1453   case 18:
1454
1455     {  /* deja fait par lex*/    rec_newarg();  }
1456     break;
1457
1458   case 19:
1459
1460     {  rec_newarg();  }
1461     break;
1462
1463   case 20:
1464
1465     {  rec_newarg();  }
1466     break;
1467
1468   case 21:
1469
1470     {  rec_typarg(rec_argMisc);      rec_newarg();
1471                            yyerrstatus = 1; yyclearin;  }
1472     break;
1473
1474   case 22:
1475
1476     {  rec_listype();  }
1477     break;
1478
1479   case 23:
1480
1481     {  rec_deblist();  }
1482     break;
1483
1484   case 24:
1485
1486     {  if (modeprint > 0)
1487                 {  printf("Record no : %d -- ",nbrec+1);  rec_print(currec);  }
1488            rec_newent ();  yyerrstatus = 0; }
1489     break;
1490
1491   case 41:
1492
1493     {  scope_debut();  }
1494     break;
1495
1496   case 42:
1497
1498     {  rec_typarg(rec_argIdent);    rec_newarg();  }
1499     break;
1500
1501   case 45:
1502
1503     {  rec_deblist();  }
1504     break;
1505
1506   case 46:
1507
1508     {  scope_fin();  }
1509     break;
1510
1511   case 47:
1512
1513     {  printf("***  Warning : Export List not yet processed\n");
1514            rec_newent();  scope_fin() ; }
1515     break;
1516
1517   case 48:
1518
1519     {  rec_ident();  }
1520     break;
1521
1522   case 49:
1523
1524     {  rec_type ();  }
1525     break;
1526
1527
1528
1529       default: break;
1530     }
1531   /* User semantic actions sometimes alter yychar, and that requires
1532      that yytoken be updated with the new translation.  We take the
1533      approach of translating immediately before every use of yytoken.
1534      One alternative is translating here after every semantic action,
1535      but that translation would be missed if the semantic action invokes
1536      YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
1537      if it invokes YYBACKUP.  In the case of YYABORT or YYACCEPT, an
1538      incorrect destructor might then be invoked immediately.  In the
1539      case of YYERROR or YYBACKUP, subsequent parser actions might lead
1540      to an incorrect destructor call or verbose syntax error message
1541      before the lookahead is translated.  */
1542   YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
1543
1544   YYPOPSTACK (yylen);
1545   yylen = 0;
1546   YY_STACK_PRINT (yyss, yyssp);
1547
1548   *++yyvsp = yyval;
1549
1550   /* Now `shift' the result of the reduction.  Determine what state
1551      that goes to, based on the state we popped back to and the rule
1552      number reduced by.  */
1553
1554   yyn = yyr1[yyn];
1555
1556   yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
1557   if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
1558     yystate = yytable[yystate];
1559   else
1560     yystate = yydefgoto[yyn - YYNTOKENS];
1561
1562   goto yynewstate;
1563
1564
1565 /*------------------------------------.
1566 | yyerrlab -- here on detecting error |
1567 `------------------------------------*/
1568 yyerrlab:
1569   /* Make sure we have latest lookahead translation.  See comments at
1570      user semantic actions for why this is necessary.  */
1571   yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
1572
1573   /* If not already recovering from an error, report this error.  */
1574   if (!yyerrstatus)
1575     {
1576       ++yynerrs;
1577 #if ! YYERROR_VERBOSE
1578       yyerror (YY_("syntax error"));
1579 #else
1580 # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
1581                                         yyssp, yytoken)
1582       {
1583         char const *yymsgp = YY_("syntax error");
1584         int yysyntax_error_status;
1585         yysyntax_error_status = YYSYNTAX_ERROR;
1586         if (yysyntax_error_status == 0)
1587           yymsgp = yymsg;
1588         else if (yysyntax_error_status == 1)
1589           {
1590             if (yymsg != yymsgbuf)
1591               YYSTACK_FREE (yymsg);
1592             yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
1593             if (!yymsg)
1594               {
1595                 yymsg = yymsgbuf;
1596                 yymsg_alloc = sizeof yymsgbuf;
1597                 yysyntax_error_status = 2;
1598               }
1599             else
1600               {
1601                 yysyntax_error_status = YYSYNTAX_ERROR;
1602                 yymsgp = yymsg;
1603               }
1604           }
1605         yyerror (yymsgp);
1606         if (yysyntax_error_status == 2)
1607           goto yyexhaustedlab;
1608       }
1609 # undef YYSYNTAX_ERROR
1610 #endif
1611     }
1612
1613
1614
1615   if (yyerrstatus == 3)
1616     {
1617       /* If just tried and failed to reuse lookahead token after an
1618          error, discard it.  */
1619
1620       if (yychar <= YYEOF)
1621         {
1622           /* Return failure if at end of input.  */
1623           if (yychar == YYEOF)
1624             YYABORT;
1625         }
1626       else
1627         {
1628           yydestruct ("Error: discarding",
1629                       yytoken, &yylval);
1630           yychar = YYEMPTY;
1631         }
1632     }
1633
1634   /* Else will try to reuse lookahead token after shifting the error
1635      token.  */
1636   goto yyerrlab1;
1637
1638
1639 /*---------------------------------------------------.
1640 | yyerrorlab -- error raised explicitly by YYERROR.  |
1641 `---------------------------------------------------*/
1642 yyerrorlab:
1643
1644   /* Pacify compilers like GCC when the user code never invokes
1645      YYERROR and the label yyerrorlab therefore never appears in user
1646      code.  */
1647   if (/*CONSTCOND*/ 0)
1648      goto yyerrorlab;
1649
1650   /* Do not reclaim the symbols of the rule which action triggered
1651      this YYERROR.  */
1652   YYPOPSTACK (yylen);
1653   yylen = 0;
1654   YY_STACK_PRINT (yyss, yyssp);
1655   yystate = *yyssp;
1656   goto yyerrlab1;
1657
1658
1659 /*-------------------------------------------------------------.
1660 | yyerrlab1 -- common code for both syntax error and YYERROR.  |
1661 `-------------------------------------------------------------*/
1662 yyerrlab1:
1663   yyerrstatus = 3;      /* Each real token shifted decrements this.  */
1664
1665   for (;;)
1666     {
1667       yyn = yypact[yystate];
1668       if (!yypact_value_is_default (yyn))
1669         {
1670           yyn += YYTERROR;
1671           if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
1672             {
1673               yyn = yytable[yyn];
1674               if (0 < yyn)
1675                 break;
1676             }
1677         }
1678
1679       /* Pop the current state because it cannot handle the error token.  */
1680       if (yyssp == yyss)
1681         YYABORT;
1682
1683
1684       yydestruct ("Error: popping",
1685                   yystos[yystate], yyvsp);
1686       YYPOPSTACK (1);
1687       yystate = *yyssp;
1688       YY_STACK_PRINT (yyss, yyssp);
1689     }
1690
1691   YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1692   *++yyvsp = yylval;
1693   YY_IGNORE_MAYBE_UNINITIALIZED_END
1694
1695
1696   /* Shift the error token.  */
1697   YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
1698
1699   yystate = yyn;
1700   goto yynewstate;
1701
1702
1703 /*-------------------------------------.
1704 | yyacceptlab -- YYACCEPT comes here.  |
1705 `-------------------------------------*/
1706 yyacceptlab:
1707   yyresult = 0;
1708   goto yyreturn;
1709
1710 /*-----------------------------------.
1711 | yyabortlab -- YYABORT comes here.  |
1712 `-----------------------------------*/
1713 yyabortlab:
1714   yyresult = 1;
1715   goto yyreturn;
1716
1717 #if !defined yyoverflow || YYERROR_VERBOSE
1718 /*-------------------------------------------------.
1719 | yyexhaustedlab -- memory exhaustion comes here.  |
1720 `-------------------------------------------------*/
1721 yyexhaustedlab:
1722   yyerror (YY_("memory exhausted"));
1723   yyresult = 2;
1724   /* Fall through.  */
1725 #endif
1726
1727 yyreturn:
1728   if (yychar != YYEMPTY)
1729     {
1730       /* Make sure we have latest lookahead translation.  See comments at
1731          user semantic actions for why this is necessary.  */
1732       yytoken = YYTRANSLATE (yychar);
1733       yydestruct ("Cleanup: discarding lookahead",
1734                   yytoken, &yylval);
1735     }
1736   /* Do not reclaim the symbols of the rule which action triggered
1737      this YYABORT or YYACCEPT.  */
1738   YYPOPSTACK (yylen);
1739   YY_STACK_PRINT (yyss, yyssp);
1740   while (yyssp != yyss)
1741     {
1742       yydestruct ("Cleanup: popping",
1743                   yystos[*yyssp], yyvsp);
1744       YYPOPSTACK (1);
1745     }
1746 #ifndef yyoverflow
1747   if (yyss != yyssa)
1748     YYSTACK_FREE (yyss);
1749 #endif
1750 #if YYERROR_VERBOSE
1751   if (yymsg != yymsgbuf)
1752     YYSTACK_FREE (yymsg);
1753 #endif
1754   /* Make sure YYID is used.  */
1755   return YYID (yyresult);
1756 }
1757
1758