~ubuntu-branches/ubuntu/precise/code-saturne/precise

« back to all changes in this revision

Viewing changes to src/mei/mei_parser.c

  • Committer: Package Import Robot
  • Author(s): Sylvestre Ledru
  • Date: 2011-11-24 00:00:08 UTC
  • mfrom: (6.1.9 sid)
  • Revision ID: package-import@ubuntu.com-20111124000008-2vo99e38267942q5
Tags: 2.1.0-3
Install a missing file

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
/* A Bison parser, made by GNU Bison 2.4.1.  */
 
3
 
 
4
/* Skeleton implementation for Bison's Yacc-like parsers in C
 
5
   
 
6
      Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
 
7
   Free Software Foundation, Inc.
 
8
   
 
9
   This program is free software: you can redistribute it and/or modify
 
10
   it under the terms of the GNU General Public License as published by
 
11
   the Free Software Foundation, either version 3 of the License, or
 
12
   (at your option) any later version.
 
13
   
 
14
   This program is distributed in the hope that it will be useful,
 
15
   but WITHOUT ANY WARRANTY; without even the implied warranty of
 
16
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
17
   GNU General Public License for more details.
 
18
   
 
19
   You should have received a copy of the GNU General Public License
 
20
   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
21
 
 
22
/* As a special exception, you may create a larger work that contains
 
23
   part or all of the Bison parser skeleton and distribute that work
 
24
   under terms of your choice, so long as that work isn't itself a
 
25
   parser generator using the skeleton or a modified version thereof
 
26
   as a parser skeleton.  Alternatively, if you modify or redistribute
 
27
   the parser skeleton itself, you may (at your option) remove this
 
28
   special exception, which will cause the skeleton and the resulting
 
29
   Bison output files to be licensed under the GNU General Public
 
30
   License without this special exception.
 
31
   
 
32
   This special exception was added by the Free Software Foundation in
 
33
   version 2.2 of Bison.  */
 
34
 
 
35
/* C LALR(1) parser skeleton written by Richard Stallman, by
 
36
   simplifying the original so-called "semantic" parser.  */
 
37
 
 
38
/* All symbols defined below should begin with yy or YY, to avoid
 
39
   infringing on user name space.  This should be done even for local
 
40
   variables, as they might otherwise be expanded by user macros.
 
41
   There are some unavoidable exceptions within include files to
 
42
   define necessary library symbols; they are noted "INFRINGES ON
 
43
   USER NAME SPACE" below.  */
 
44
 
 
45
/* Identify Bison output.  */
 
46
#define YYBISON 1
 
47
 
 
48
/* Bison version.  */
 
49
#define YYBISON_VERSION "2.4.1"
 
50
 
 
51
/* Skeleton name.  */
 
52
#define YYSKELETON_NAME "yacc.c"
 
53
 
 
54
/* Pure parsers.  */
 
55
#define YYPURE 0
 
56
 
 
57
/* Push parsers.  */
 
58
#define YYPUSH 0
 
59
 
 
60
/* Pull parsers.  */
 
61
#define YYPULL 1
 
62
 
 
63
/* Using locations.  */
 
64
#define YYLSP_NEEDED 0
 
65
 
 
66
 
 
67
 
 
68
/* Copy the first part of user declarations.  */
 
69
 
 
70
/* Line 189 of yacc.c  */
 
71
#line 1 "mei_parser.y"
 
72
 
 
73
/*============================================================================
 
74
 * Define the grammar for the mathematical expression
 
75
 *============================================================================*/
 
76
 
 
77
/*
 
78
  This file is part of the "Mathematical Expression Interpreter" library.
 
79
 
 
80
  Copyright (C) 2008-2010  EDF
 
81
 
 
82
  This library is free software; you can redistribute it and/or
 
83
  modify it under the terms of the GNU Lesser General Public
 
84
  License as published by the Free Software Foundation; either
 
85
  version 2.1 of the License, or (at your option) any later version.
 
86
 
 
87
  This library is distributed in the hope that it will be useful,
 
88
  but WITHOUT ANY WARRANTY; without even the implied warranty of
 
89
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
90
  Lesser General Public License for more details.
 
91
 
 
92
  You should have received a copy of the GNU Lesser General Public
 
93
  License along with this library; if not, write to the Free Software
 
94
  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
95
*/
 
96
 
 
97
/*----------------------------------------------------------------------------
 
98
 * Standard C library headers
 
99
 *----------------------------------------------------------------------------*/
 
100
 
 
101
#include <string.h>
 
102
 
 
103
/*----------------------------------------------------------------------------
 
104
 * Local headers
 
105
 *----------------------------------------------------------------------------*/
 
106
 
 
107
#include "mei_node.h"
 
108
#include "mei_parser_glob.h"
 
109
 
 
110
/*----------------------------------------------------------------------------
 
111
 * BFT library headers
 
112
 *----------------------------------------------------------------------------*/
 
113
 
 
114
#include <bft_mem.h>
 
115
#include <bft_printf.h>
 
116
 
 
117
 
 
118
 
 
119
/* Line 189 of yacc.c  */
 
120
#line 121 "mei_parser.c"
 
121
 
 
122
/* Enabling traces.  */
 
123
#ifndef YYDEBUG
 
124
# define YYDEBUG 0
 
125
#endif
 
126
 
 
127
/* Enabling verbose error messages.  */
 
128
#ifdef YYERROR_VERBOSE
 
129
# undef YYERROR_VERBOSE
 
130
# define YYERROR_VERBOSE 1
 
131
#else
 
132
# define YYERROR_VERBOSE 0
 
133
#endif
 
134
 
 
135
/* Enabling the token table.  */
 
136
#ifndef YYTOKEN_TABLE
 
137
# define YYTOKEN_TABLE 0
 
138
#endif
 
139
 
 
140
 
 
141
/* Tokens.  */
 
142
#ifndef YYTOKENTYPE
 
143
# define YYTOKENTYPE
 
144
   /* Put the tokens into the symbol table, so that GDB and other debuggers
 
145
      know about them.  */
 
146
   enum yytokentype {
 
147
     NUMBER = 258,
 
148
     VAR = 259,
 
149
     FUN1 = 260,
 
150
     FUN2 = 261,
 
151
     FUN3 = 262,
 
152
     FUN4 = 263,
 
153
     WHILE = 264,
 
154
     IF = 265,
 
155
     PRINT = 266,
 
156
     IFX = 267,
 
157
     ELSE = 268,
 
158
     OR = 269,
 
159
     AND = 270,
 
160
     NE = 271,
 
161
     EQ = 272,
 
162
     LE = 273,
 
163
     GE = 274,
 
164
     UMINUS = 275,
 
165
     UPLUS = 276
 
166
   };
 
167
#endif
 
168
/* Tokens.  */
 
169
#define NUMBER 258
 
170
#define VAR 259
 
171
#define FUN1 260
 
172
#define FUN2 261
 
173
#define FUN3 262
 
174
#define FUN4 263
 
175
#define WHILE 264
 
176
#define IF 265
 
177
#define PRINT 266
 
178
#define IFX 267
 
179
#define ELSE 268
 
180
#define OR 269
 
181
#define AND 270
 
182
#define NE 271
 
183
#define EQ 272
 
184
#define LE 273
 
185
#define GE 274
 
186
#define UMINUS 275
 
187
#define UPLUS 276
 
188
 
 
189
 
 
190
 
 
191
 
 
192
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
 
193
typedef union YYSTYPE
 
194
{
 
195
 
 
196
/* Line 214 of yacc.c  */
 
197
#line 52 "mei_parser.y"
 
198
 
 
199
    double iValue;              /* double value */
 
200
    char sIndex[200];           /* variable, constant or function identifier */
 
201
    mei_node_t *nPtr;           /* node pointer */
 
202
 
 
203
 
 
204
 
 
205
/* Line 214 of yacc.c  */
 
206
#line 207 "mei_parser.c"
 
207
} YYSTYPE;
 
208
# define YYSTYPE_IS_TRIVIAL 1
 
209
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
 
210
# define YYSTYPE_IS_DECLARED 1
 
211
#endif
 
212
 
 
213
 
 
214
/* Copy the second part of user declarations.  */
 
215
 
 
216
 
 
217
/* Line 264 of yacc.c  */
 
218
#line 219 "mei_parser.c"
 
219
 
 
220
#ifdef short
 
221
# undef short
 
222
#endif
 
223
 
 
224
#ifdef YYTYPE_UINT8
 
225
typedef YYTYPE_UINT8 yytype_uint8;
 
226
#else
 
227
typedef unsigned char yytype_uint8;
 
228
#endif
 
229
 
 
230
#ifdef YYTYPE_INT8
 
231
typedef YYTYPE_INT8 yytype_int8;
 
232
#elif (defined __STDC__ || defined __C99__FUNC__ \
 
233
     || defined __cplusplus || defined _MSC_VER)
 
234
typedef signed char yytype_int8;
 
235
#else
 
236
typedef short int yytype_int8;
 
237
#endif
 
238
 
 
239
#ifdef YYTYPE_UINT16
 
240
typedef YYTYPE_UINT16 yytype_uint16;
 
241
#else
 
242
typedef unsigned short int yytype_uint16;
 
243
#endif
 
244
 
 
245
#ifdef YYTYPE_INT16
 
246
typedef YYTYPE_INT16 yytype_int16;
 
247
#else
 
248
typedef short int yytype_int16;
 
249
#endif
 
250
 
 
251
#ifndef YYSIZE_T
 
252
# ifdef __SIZE_TYPE__
 
253
#  define YYSIZE_T __SIZE_TYPE__
 
254
# elif defined size_t
 
255
#  define YYSIZE_T size_t
 
256
# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
 
257
     || defined __cplusplus || defined _MSC_VER)
 
258
#  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
 
259
#  define YYSIZE_T size_t
 
260
# else
 
261
#  define YYSIZE_T unsigned int
 
262
# endif
 
263
#endif
 
264
 
 
265
#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
 
266
 
 
267
#ifndef YY_
 
268
# if YYENABLE_NLS
 
269
#  if ENABLE_NLS
 
270
#   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
 
271
#   define YY_(msgid) dgettext ("bison-runtime", msgid)
 
272
#  endif
 
273
# endif
 
274
# ifndef YY_
 
275
#  define YY_(msgid) msgid
 
276
# endif
 
277
#endif
 
278
 
 
279
/* Suppress unused-variable warnings by "using" E.  */
 
280
#if ! defined lint || defined __GNUC__
 
281
# define YYUSE(e) ((void) (e))
 
282
#else
 
283
# define YYUSE(e) /* empty */
 
284
#endif
 
285
 
 
286
/* Identity function, used to suppress warnings about constant conditions.  */
 
287
#ifndef lint
 
288
# define YYID(n) (n)
 
289
#else
 
290
#if (defined __STDC__ || defined __C99__FUNC__ \
 
291
     || defined __cplusplus || defined _MSC_VER)
 
292
static int
 
293
YYID (int yyi)
 
294
#else
 
295
static int
 
296
YYID (yyi)
 
297
    int yyi;
 
298
#endif
 
299
{
 
300
  return yyi;
 
301
}
 
302
#endif
 
303
 
 
304
#if ! defined yyoverflow || YYERROR_VERBOSE
 
305
 
 
306
/* The parser invokes alloca or malloc; define the necessary symbols.  */
 
307
 
 
308
# ifdef YYSTACK_USE_ALLOCA
 
309
#  if YYSTACK_USE_ALLOCA
 
310
#   ifdef __GNUC__
 
311
#    define YYSTACK_ALLOC __builtin_alloca
 
312
#   elif defined __BUILTIN_VA_ARG_INCR
 
313
#    include <alloca.h> /* INFRINGES ON USER NAME SPACE */
 
314
#   elif defined _AIX
 
315
#    define YYSTACK_ALLOC __alloca
 
316
#   elif defined _MSC_VER
 
317
#    include <malloc.h> /* INFRINGES ON USER NAME SPACE */
 
318
#    define alloca _alloca
 
319
#   else
 
320
#    define YYSTACK_ALLOC alloca
 
321
#    if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
 
322
     || defined __cplusplus || defined _MSC_VER)
 
323
#     include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
 
324
#     ifndef _STDLIB_H
 
325
#      define _STDLIB_H 1
 
326
#     endif
 
327
#    endif
 
328
#   endif
 
329
#  endif
 
330
# endif
 
331
 
 
332
# ifdef YYSTACK_ALLOC
 
333
   /* Pacify GCC's `empty if-body' warning.  */
 
334
#  define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
 
335
#  ifndef YYSTACK_ALLOC_MAXIMUM
 
336
    /* The OS might guarantee only one guard page at the bottom of the stack,
 
337
       and a page size can be as small as 4096 bytes.  So we cannot safely
 
338
       invoke alloca (N) if N exceeds 4096.  Use a slightly smaller number
 
339
       to allow for a few compiler-allocated temporary stack slots.  */
 
340
#   define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
 
341
#  endif
 
342
# else
 
343
#  define YYSTACK_ALLOC YYMALLOC
 
344
#  define YYSTACK_FREE YYFREE
 
345
#  ifndef YYSTACK_ALLOC_MAXIMUM
 
346
#   define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
 
347
#  endif
 
348
#  if (defined __cplusplus && ! defined _STDLIB_H \
 
349
       && ! ((defined YYMALLOC || defined malloc) \
 
350
             && (defined YYFREE || defined free)))
 
351
#   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
 
352
#   ifndef _STDLIB_H
 
353
#    define _STDLIB_H 1
 
354
#   endif
 
355
#  endif
 
356
#  ifndef YYMALLOC
 
357
#   define YYMALLOC malloc
 
358
#   if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
 
359
     || defined __cplusplus || defined _MSC_VER)
 
360
void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
 
361
#   endif
 
362
#  endif
 
363
#  ifndef YYFREE
 
364
#   define YYFREE free
 
365
#   if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
 
366
     || defined __cplusplus || defined _MSC_VER)
 
367
void free (void *); /* INFRINGES ON USER NAME SPACE */
 
368
#   endif
 
369
#  endif
 
370
# endif
 
371
#endif /* ! defined yyoverflow || YYERROR_VERBOSE */
 
372
 
 
373
 
 
374
#if (! defined yyoverflow \
 
375
     && (! defined __cplusplus \
 
376
         || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
 
377
 
 
378
/* A type that is properly aligned for any stack member.  */
 
379
union yyalloc
 
380
{
 
381
  yytype_int16 yyss_alloc;
 
382
  YYSTYPE yyvs_alloc;
 
383
};
 
384
 
 
385
/* The size of the maximum gap between one aligned stack and the next.  */
 
386
# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
 
387
 
 
388
/* The size of an array large to enough to hold all stacks, each with
 
389
   N elements.  */
 
390
# define YYSTACK_BYTES(N) \
 
391
     ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
 
392
      + YYSTACK_GAP_MAXIMUM)
 
393
 
 
394
/* Copy COUNT objects from FROM to TO.  The source and destination do
 
395
   not overlap.  */
 
396
# ifndef YYCOPY
 
397
#  if defined __GNUC__ && 1 < __GNUC__
 
398
#   define YYCOPY(To, From, Count) \
 
399
      __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
 
400
#  else
 
401
#   define YYCOPY(To, From, Count)              \
 
402
      do                                        \
 
403
        {                                       \
 
404
          YYSIZE_T yyi;                         \
 
405
          for (yyi = 0; yyi < (Count); yyi++)   \
 
406
            (To)[yyi] = (From)[yyi];            \
 
407
        }                                       \
 
408
      while (YYID (0))
 
409
#  endif
 
410
# endif
 
411
 
 
412
/* Relocate STACK from its old location to the new one.  The
 
413
   local variables YYSIZE and YYSTACKSIZE give the old and new number of
 
414
   elements in the stack, and YYPTR gives the new location of the
 
415
   stack.  Advance YYPTR to a properly aligned location for the next
 
416
   stack.  */
 
417
# define YYSTACK_RELOCATE(Stack_alloc, Stack)                           \
 
418
    do                                                                  \
 
419
      {                                                                 \
 
420
        YYSIZE_T yynewbytes;                                            \
 
421
        YYCOPY (&yyptr->Stack_alloc, Stack, yysize);                    \
 
422
        Stack = &yyptr->Stack_alloc;                                    \
 
423
        yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
 
424
        yyptr += yynewbytes / sizeof (*yyptr);                          \
 
425
      }                                                                 \
 
426
    while (YYID (0))
 
427
 
 
428
#endif
 
429
 
 
430
/* YYFINAL -- State number of the termination state.  */
 
431
#define YYFINAL  34
 
432
/* YYLAST -- Last index in YYTABLE.  */
 
433
#define YYLAST   1114
 
434
 
 
435
/* YYNTOKENS -- Number of terminals.  */
 
436
#define YYNTOKENS  37
 
437
/* YYNNTS -- Number of nonterminals.  */
 
438
#define YYNNTS  5
 
439
/* YYNRULES -- Number of rules.  */
 
440
#define YYNRULES  38
 
441
/* YYNRULES -- Number of states.  */
 
442
#define YYNSTATES  98
 
443
 
 
444
/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */
 
445
#define YYUNDEFTOK  2
 
446
#define YYMAXUTOK   276
 
447
 
 
448
#define YYTRANSLATE(YYX)                                                \
 
449
  ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
 
450
 
 
451
/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX.  */
 
452
static const yytype_uint8 yytranslate[] =
 
453
{
 
454
       0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 
455
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 
456
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 
457
       2,     2,     2,    27,     2,     2,     2,     2,     2,     2,
 
458
      32,    33,    25,    23,    36,    24,     2,    26,     2,     2,
 
459
       2,     2,     2,     2,     2,     2,     2,     2,     2,    31,
 
460
      20,    14,    19,     2,     2,     2,     2,     2,     2,     2,
 
461
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 
462
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 
463
       2,     2,     2,     2,    30,     2,     2,     2,     2,     2,
 
464
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 
465
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 
466
       2,     2,     2,    34,     2,    35,     2,     2,     2,     2,
 
467
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 
468
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 
469
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 
470
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 
471
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 
472
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 
473
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 
474
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 
475
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 
476
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 
477
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 
478
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 
479
       2,     2,     2,     2,     2,     2,     1,     2,     3,     4,
 
480
       5,     6,     7,     8,     9,    10,    11,    12,    13,    15,
 
481
      16,    17,    18,    21,    22,    28,    29
 
482
};
 
483
 
 
484
#if YYDEBUG
 
485
/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
 
486
   YYRHS.  */
 
487
static const yytype_uint8 yyprhs[] =
 
488
{
 
489
       0,     0,     3,     4,     6,     9,    11,    13,    16,    20,
 
490
      25,    31,    37,    45,    49,    52,    54,    56,    61,    68,
 
491
      77,    88,    91,    94,    97,   101,   105,   109,   113,   117,
 
492
     121,   125,   129,   133,   137,   141,   145,   149,   153
 
493
};
 
494
 
 
495
/* YYRHS -- A `-1'-separated list of the rules' RHS.  */
 
496
static const yytype_int8 yyrhs[] =
 
497
{
 
498
      38,     0,    -1,    -1,    39,    -1,    39,    40,    -1,    40,
 
499
      -1,    31,    -1,    41,    31,    -1,    11,    41,    31,    -1,
 
500
       4,    14,    41,    31,    -1,     9,    32,    41,    33,    40,
 
501
      -1,    10,    32,    41,    33,    40,    -1,    10,    32,    41,
 
502
      33,    40,    13,    40,    -1,    34,    39,    35,    -1,    40,
 
503
       1,    -1,     3,    -1,     4,    -1,     5,    32,    41,    33,
 
504
      -1,     6,    32,    41,    36,    41,    33,    -1,     7,    32,
 
505
      41,    36,    41,    36,    41,    33,    -1,     8,    32,    41,
 
506
      36,    41,    36,    41,    36,    41,    33,    -1,    27,    41,
 
507
      -1,    24,    41,    -1,    23,    41,    -1,    41,    23,    41,
 
508
      -1,    41,    24,    41,    -1,    41,    25,    41,    -1,    41,
 
509
      26,    41,    -1,    41,    30,    41,    -1,    41,    20,    41,
 
510
      -1,    41,    19,    41,    -1,    41,    22,    41,    -1,    41,
 
511
      21,    41,    -1,    41,    17,    41,    -1,    41,    18,    41,
 
512
      -1,    41,    15,    41,    -1,    41,    16,    41,    -1,    32,
 
513
      41,    33,    -1,    41,     1,    -1
 
514
};
 
515
 
 
516
/* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
 
517
static const yytype_uint8 yyrline[] =
 
518
{
 
519
       0,    87,    87,    88,    92,    93,    97,    98,    99,   100,
 
520
     101,   102,   103,   104,   105,   109,   110,   111,   112,   113,
 
521
     114,   115,   116,   117,   118,   119,   120,   121,   122,   123,
 
522
     124,   125,   126,   127,   128,   129,   130,   131,   132
 
523
};
 
524
#endif
 
525
 
 
526
#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
 
527
/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
 
528
   First, the terminals, then, starting at YYNTOKENS, nonterminals.  */
 
529
static const char *const yytname[] =
 
530
{
 
531
  "$end", "error", "$undefined", "NUMBER", "VAR", "FUN1", "FUN2", "FUN3",
 
532
  "FUN4", "WHILE", "IF", "PRINT", "IFX", "ELSE", "'='", "OR", "AND", "NE",
 
533
  "EQ", "'>'", "'<'", "LE", "GE", "'+'", "'-'", "'*'", "'/'", "'!'",
 
534
  "UMINUS", "UPLUS", "'^'", "';'", "'('", "')'", "'{'", "'}'", "','",
 
535
  "$accept", "program", "stmt_list", "stmt", "expr", 0
 
536
};
 
537
#endif
 
538
 
 
539
# ifdef YYPRINT
 
540
/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
 
541
   token YYLEX-NUM.  */
 
542
static const yytype_uint16 yytoknum[] =
 
543
{
 
544
       0,   256,   257,   258,   259,   260,   261,   262,   263,   264,
 
545
     265,   266,   267,   268,    61,   269,   270,   271,   272,    62,
 
546
      60,   273,   274,    43,    45,    42,    47,    33,   275,   276,
 
547
      94,    59,    40,    41,   123,   125,    44
 
548
};
 
549
# endif
 
550
 
 
551
/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
 
552
static const yytype_uint8 yyr1[] =
 
553
{
 
554
       0,    37,    38,    38,    39,    39,    40,    40,    40,    40,
 
555
      40,    40,    40,    40,    40,    41,    41,    41,    41,    41,
 
556
      41,    41,    41,    41,    41,    41,    41,    41,    41,    41,
 
557
      41,    41,    41,    41,    41,    41,    41,    41,    41
 
558
};
 
559
 
 
560
/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN.  */
 
561
static const yytype_uint8 yyr2[] =
 
562
{
 
563
       0,     2,     0,     1,     2,     1,     1,     2,     3,     4,
 
564
       5,     5,     7,     3,     2,     1,     1,     4,     6,     8,
 
565
      10,     2,     2,     2,     3,     3,     3,     3,     3,     3,
 
566
       3,     3,     3,     3,     3,     3,     3,     3,     2
 
567
};
 
568
 
 
569
/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
 
570
   STATE-NUM when YYTABLE doesn't specify something else to do.  Zero
 
571
   means the default is an error.  */
 
572
static const yytype_uint8 yydefact[] =
 
573
{
 
574
       2,    15,    16,     0,     0,     0,     0,     0,     0,     0,
 
575
       0,     0,     0,     6,     0,     0,     0,     3,     0,     0,
 
576
       0,     0,     0,     0,     0,     0,     0,    16,     0,     0,
 
577
       0,     0,     0,     0,     1,     0,    14,    38,     0,     0,
 
578
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
 
579
       0,     7,     0,     0,     0,     0,     0,     0,     0,     8,
 
580
      37,    13,     0,     0,     0,     0,     0,     0,     0,     0,
 
581
       0,     0,     0,     0,     0,     9,    17,     0,     0,     0,
 
582
       0,     0,     0,     0,     0,     0,     0,    18,     0,     0,
 
583
       0,     0,     0,     0,    19,     0,     0,    20
 
584
};
 
585
 
 
586
/* YYDEFGOTO[NTERM-NUM].  */
 
587
static const yytype_int8 yydefgoto[] =
 
588
{
 
589
      -1,    16,    17,    18,    19
 
590
};
 
591
 
 
592
/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
 
593
   STATE-NUM.  */
 
594
#define YYPACT_NINF -27
 
595
static const yytype_int16 yypact[] =
 
596
{
 
597
    1011,   -27,   -10,   -26,   -25,   -24,   -22,   -14,   -13,   855,
 
598
     855,   855,   855,   -27,   855,  1011,    20,  1011,   192,  1031,
 
599
     855,   855,   855,   855,   855,   855,   855,   -27,  1057,    27,
 
600
     249,   275,   824,   803,   -27,   228,   -27,   -27,   855,   855,
 
601
     855,   855,   855,   855,   855,   855,   855,   855,   855,   855,
 
602
     855,   -27,  1083,   850,   639,   665,   691,   876,   902,   -27,
 
603
     -27,   -27,   301,   327,   353,   379,   405,   431,   457,   483,
 
604
     509,   535,   561,   587,   613,   -27,   -27,   855,   855,   855,
 
605
    1011,  1011,   928,   717,   743,    84,   120,   -27,   855,   855,
 
606
    1011,   954,   769,   156,   -27,   855,   980,   -27
 
607
};
 
608
 
 
609
/* YYPGOTO[NTERM-NUM].  */
 
610
static const yytype_int8 yypgoto[] =
 
611
{
 
612
     -27,   -27,     6,    -8,    -9
 
613
};
 
614
 
 
615
/* YYTABLE[YYPACT[STATE-NUM]].  What to do in state STATE-NUM.  If
 
616
   positive, shift that token.  If negative, reduce the rule which
 
617
   number is the opposite.  If zero, do what YYDEFACT says.
 
618
   If YYTABLE_NINF, syntax error.  */
 
619
#define YYTABLE_NINF -37
 
620
static const yytype_int8 yytable[] =
 
621
{
 
622
      28,    29,    30,    31,    20,    32,    21,    22,    23,    35,
 
623
      24,    52,    53,    54,    55,    56,    57,    58,    25,    26,
 
624
      34,    33,     0,     0,     0,    35,     0,     0,    37,    62,
 
625
      63,    64,    65,    66,    67,    68,    69,    70,    71,    72,
 
626
      73,    74,   -23,   -23,   -23,   -23,   -23,   -23,   -23,   -23,
 
627
     -23,   -23,   -23,   -23,     0,     0,     0,    50,   -23,     0,
 
628
     -23,     0,     0,   -23,     0,     0,     0,     0,    82,    83,
 
629
      84,     0,    85,    86,     0,     0,     0,     0,     0,    91,
 
630
      92,     0,    93,     0,   -10,    36,    96,   -10,   -10,   -10,
 
631
     -10,   -10,   -10,   -10,   -10,   -10,     0,   -10,     0,     0,
 
632
       0,     0,     0,     0,     0,     0,     0,   -10,   -10,     0,
 
633
       0,   -10,     0,     0,     0,   -10,   -10,     0,   -10,   -10,
 
634
     -11,    36,     0,   -11,   -11,   -11,   -11,   -11,   -11,   -11,
 
635
     -11,   -11,     0,    90,     0,     0,     0,     0,     0,     0,
 
636
       0,     0,     0,   -11,   -11,     0,     0,   -11,     0,     0,
 
637
       0,   -11,   -11,     0,   -11,   -11,   -12,    36,     0,   -12,
 
638
     -12,   -12,   -12,   -12,   -12,   -12,   -12,   -12,     0,   -12,
 
639
       0,     0,     0,     0,     0,     0,     0,     0,     0,   -12,
 
640
     -12,     0,     0,   -12,     0,     0,     0,   -12,   -12,     0,
 
641
     -12,   -12,    -5,    36,     0,    -5,    -5,    -5,    -5,    -5,
 
642
      -5,    -5,    -5,    -5,     0,     0,     0,     0,     0,     0,
 
643
       0,     0,     0,     0,     0,    -5,    -5,     0,     0,    -5,
 
644
       0,     0,     0,    -5,    -5,     0,    -5,    -5,    -4,    36,
 
645
       0,    -4,    -4,    -4,    -4,    -4,    -4,    -4,    -4,    -4,
 
646
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
 
647
      37,    -4,    -4,     0,     0,    -4,     0,     0,     0,    -4,
 
648
      -4,     0,    -4,    -4,   -22,   -22,   -22,   -22,   -22,   -22,
 
649
     -22,   -22,   -22,   -22,   -22,   -22,    37,     0,     0,    50,
 
650
     -22,     0,   -22,     0,     0,   -22,     0,     0,     0,     0,
 
651
     -21,   -21,   -21,   -21,   -21,   -21,   -21,   -21,   -21,   -21,
 
652
     -21,   -21,    37,     0,     0,    50,   -21,     0,   -21,     0,
 
653
       0,   -21,     0,     0,     0,     0,   -35,    39,    40,    41,
 
654
      42,    43,    44,    45,    46,    47,    48,    49,    37,     0,
 
655
       0,    50,   -35,     0,   -35,     0,     0,   -35,     0,     0,
 
656
       0,     0,   -36,   -36,    40,    41,    42,    43,    44,    45,
 
657
      46,    47,    48,    49,    37,     0,     0,    50,   -36,     0,
 
658
     -36,     0,     0,   -36,     0,     0,     0,     0,   -33,   -33,
 
659
     -33,   -33,    42,    43,    44,    45,    46,    47,    48,    49,
 
660
      37,     0,     0,    50,   -33,     0,   -33,     0,     0,   -33,
 
661
       0,     0,     0,     0,   -34,   -34,   -34,   -34,    42,    43,
 
662
      44,    45,    46,    47,    48,    49,    37,     0,     0,    50,
 
663
     -34,     0,   -34,     0,     0,   -34,     0,     0,     0,     0,
 
664
     -30,   -30,   -30,   -30,   -30,   -30,   -30,   -30,    46,    47,
 
665
      48,    49,    37,     0,     0,    50,   -30,     0,   -30,     0,
 
666
       0,   -30,     0,     0,     0,     0,   -29,   -29,   -29,   -29,
 
667
     -29,   -29,   -29,   -29,    46,    47,    48,    49,    37,     0,
 
668
       0,    50,   -29,     0,   -29,     0,     0,   -29,     0,     0,
 
669
       0,     0,   -32,   -32,   -32,   -32,   -32,   -32,   -32,   -32,
 
670
      46,    47,    48,    49,    37,     0,     0,    50,   -32,     0,
 
671
     -32,     0,     0,   -32,     0,     0,     0,     0,   -31,   -31,
 
672
     -31,   -31,   -31,   -31,   -31,   -31,    46,    47,    48,    49,
 
673
      37,     0,     0,    50,   -31,     0,   -31,     0,     0,   -31,
 
674
       0,     0,     0,     0,   -24,   -24,   -24,   -24,   -24,   -24,
 
675
     -24,   -24,   -24,   -24,    48,    49,    37,     0,     0,    50,
 
676
     -24,     0,   -24,     0,     0,   -24,     0,     0,     0,     0,
 
677
     -25,   -25,   -25,   -25,   -25,   -25,   -25,   -25,   -25,   -25,
 
678
      48,    49,    37,     0,     0,    50,   -25,     0,   -25,     0,
 
679
       0,   -25,     0,     0,     0,     0,   -26,   -26,   -26,   -26,
 
680
     -26,   -26,   -26,   -26,   -26,   -26,   -26,   -26,    37,     0,
 
681
       0,    50,   -26,     0,   -26,     0,     0,   -26,     0,     0,
 
682
       0,     0,   -27,   -27,   -27,   -27,   -27,   -27,   -27,   -27,
 
683
     -27,   -27,   -27,   -27,    37,     0,     0,    50,   -27,     0,
 
684
     -27,     0,     0,   -27,     0,     0,     0,     0,   -28,   -28,
 
685
     -28,   -28,   -28,   -28,   -28,   -28,   -28,   -28,   -28,   -28,
 
686
      37,     0,     0,    50,   -28,     0,   -28,     0,     0,   -28,
 
687
       0,     0,     0,     0,    38,    39,    40,    41,    42,    43,
 
688
      44,    45,    46,    47,    48,    49,    37,     0,     0,    50,
 
689
       0,     0,     0,     0,     0,    77,     0,     0,     0,     0,
 
690
      38,    39,    40,    41,    42,    43,    44,    45,    46,    47,
 
691
      48,    49,    37,     0,     0,    50,     0,     0,     0,     0,
 
692
       0,    78,     0,     0,     0,     0,    38,    39,    40,    41,
 
693
      42,    43,    44,    45,    46,    47,    48,    49,    37,     0,
 
694
       0,    50,     0,     0,     0,     0,     0,    79,     0,     0,
 
695
       0,     0,    38,    39,    40,    41,    42,    43,    44,    45,
 
696
      46,    47,    48,    49,    37,     0,     0,    50,     0,     0,
 
697
       0,     0,     0,    88,     0,     0,     0,     0,    38,    39,
 
698
      40,    41,    42,    43,    44,    45,    46,    47,    48,    49,
 
699
      37,     0,     0,    50,     0,     0,     0,     0,     0,    89,
 
700
       0,     0,     0,     0,    38,    39,    40,    41,    42,    43,
 
701
      44,    45,    46,    47,    48,    49,     0,     0,     0,    50,
 
702
       0,     0,     0,     0,     0,    95,     1,     2,     3,     4,
 
703
       5,     6,     7,     8,     9,     0,     0,     0,     0,     0,
 
704
       0,     0,     0,     0,     0,    37,    10,    11,     0,     0,
 
705
      12,     0,     0,     0,    13,    14,     0,    15,    61,    38,
 
706
      39,    40,    41,    42,    43,    44,    45,    46,    47,    48,
 
707
      49,    37,     0,     0,    50,     0,     0,    60,     1,    27,
 
708
       3,     4,     5,     6,     0,    38,    39,    40,    41,    42,
 
709
      43,    44,    45,    46,    47,    48,    49,    37,    10,    11,
 
710
      50,     0,    12,    76,     0,     0,     0,    14,     0,     0,
 
711
       0,    38,    39,    40,    41,    42,    43,    44,    45,    46,
 
712
      47,    48,    49,    37,     0,     0,    50,     0,     0,    80,
 
713
       0,     0,     0,     0,     0,     0,     0,    38,    39,    40,
 
714
      41,    42,    43,    44,    45,    46,    47,    48,    49,    37,
 
715
       0,     0,    50,     0,     0,    81,     0,     0,     0,     0,
 
716
       0,     0,     0,    38,    39,    40,    41,    42,    43,    44,
 
717
      45,    46,    47,    48,    49,    37,     0,     0,    50,     0,
 
718
       0,    87,     0,     0,     0,     0,     0,     0,     0,    38,
 
719
      39,    40,    41,    42,    43,    44,    45,    46,    47,    48,
 
720
      49,    37,     0,     0,    50,     0,     0,    94,     0,     0,
 
721
       0,     0,     0,     0,     0,    38,    39,    40,    41,    42,
 
722
      43,    44,    45,    46,    47,    48,    49,     0,     0,     0,
 
723
      50,     0,     0,    97,     1,     2,     3,     4,     5,     6,
 
724
       7,     8,     9,     0,     0,     0,     0,     0,     0,     0,
 
725
       0,     0,    37,     0,    10,    11,     0,     0,    12,     0,
 
726
       0,     0,    13,    14,     0,    15,    38,    39,    40,    41,
 
727
      42,    43,    44,    45,    46,    47,    48,    49,    37,     0,
 
728
       0,    50,    51,     0,     0,     0,     0,     0,     0,     0,
 
729
       0,     0,    38,    39,    40,    41,    42,    43,    44,    45,
 
730
      46,    47,    48,    49,    37,     0,     0,    50,    59,     0,
 
731
       0,     0,     0,     0,     0,     0,     0,     0,    38,    39,
 
732
      40,    41,    42,    43,    44,    45,    46,    47,    48,    49,
 
733
       0,     0,     0,    50,    75
 
734
};
 
735
 
 
736
static const yytype_int8 yycheck[] =
 
737
{
 
738
       9,    10,    11,    12,    14,    14,    32,    32,    32,    17,
 
739
      32,    20,    21,    22,    23,    24,    25,    26,    32,    32,
 
740
       0,    15,    -1,    -1,    -1,    33,    -1,    -1,     1,    38,
 
741
      39,    40,    41,    42,    43,    44,    45,    46,    47,    48,
 
742
      49,    50,    15,    16,    17,    18,    19,    20,    21,    22,
 
743
      23,    24,    25,    26,    -1,    -1,    -1,    30,    31,    -1,
 
744
      33,    -1,    -1,    36,    -1,    -1,    -1,    -1,    77,    78,
 
745
      79,    -1,    80,    81,    -1,    -1,    -1,    -1,    -1,    88,
 
746
      89,    -1,    90,    -1,     0,     1,    95,     3,     4,     5,
 
747
       6,     7,     8,     9,    10,    11,    -1,    13,    -1,    -1,
 
748
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    23,    24,    -1,
 
749
      -1,    27,    -1,    -1,    -1,    31,    32,    -1,    34,    35,
 
750
       0,     1,    -1,     3,     4,     5,     6,     7,     8,     9,
 
751
      10,    11,    -1,    13,    -1,    -1,    -1,    -1,    -1,    -1,
 
752
      -1,    -1,    -1,    23,    24,    -1,    -1,    27,    -1,    -1,
 
753
      -1,    31,    32,    -1,    34,    35,     0,     1,    -1,     3,
 
754
       4,     5,     6,     7,     8,     9,    10,    11,    -1,    13,
 
755
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    23,
 
756
      24,    -1,    -1,    27,    -1,    -1,    -1,    31,    32,    -1,
 
757
      34,    35,     0,     1,    -1,     3,     4,     5,     6,     7,
 
758
       8,     9,    10,    11,    -1,    -1,    -1,    -1,    -1,    -1,
 
759
      -1,    -1,    -1,    -1,    -1,    23,    24,    -1,    -1,    27,
 
760
      -1,    -1,    -1,    31,    32,    -1,    34,    35,     0,     1,
 
761
      -1,     3,     4,     5,     6,     7,     8,     9,    10,    11,
 
762
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
 
763
       1,    23,    24,    -1,    -1,    27,    -1,    -1,    -1,    31,
 
764
      32,    -1,    34,    35,    15,    16,    17,    18,    19,    20,
 
765
      21,    22,    23,    24,    25,    26,     1,    -1,    -1,    30,
 
766
      31,    -1,    33,    -1,    -1,    36,    -1,    -1,    -1,    -1,
 
767
      15,    16,    17,    18,    19,    20,    21,    22,    23,    24,
 
768
      25,    26,     1,    -1,    -1,    30,    31,    -1,    33,    -1,
 
769
      -1,    36,    -1,    -1,    -1,    -1,    15,    16,    17,    18,
 
770
      19,    20,    21,    22,    23,    24,    25,    26,     1,    -1,
 
771
      -1,    30,    31,    -1,    33,    -1,    -1,    36,    -1,    -1,
 
772
      -1,    -1,    15,    16,    17,    18,    19,    20,    21,    22,
 
773
      23,    24,    25,    26,     1,    -1,    -1,    30,    31,    -1,
 
774
      33,    -1,    -1,    36,    -1,    -1,    -1,    -1,    15,    16,
 
775
      17,    18,    19,    20,    21,    22,    23,    24,    25,    26,
 
776
       1,    -1,    -1,    30,    31,    -1,    33,    -1,    -1,    36,
 
777
      -1,    -1,    -1,    -1,    15,    16,    17,    18,    19,    20,
 
778
      21,    22,    23,    24,    25,    26,     1,    -1,    -1,    30,
 
779
      31,    -1,    33,    -1,    -1,    36,    -1,    -1,    -1,    -1,
 
780
      15,    16,    17,    18,    19,    20,    21,    22,    23,    24,
 
781
      25,    26,     1,    -1,    -1,    30,    31,    -1,    33,    -1,
 
782
      -1,    36,    -1,    -1,    -1,    -1,    15,    16,    17,    18,
 
783
      19,    20,    21,    22,    23,    24,    25,    26,     1,    -1,
 
784
      -1,    30,    31,    -1,    33,    -1,    -1,    36,    -1,    -1,
 
785
      -1,    -1,    15,    16,    17,    18,    19,    20,    21,    22,
 
786
      23,    24,    25,    26,     1,    -1,    -1,    30,    31,    -1,
 
787
      33,    -1,    -1,    36,    -1,    -1,    -1,    -1,    15,    16,
 
788
      17,    18,    19,    20,    21,    22,    23,    24,    25,    26,
 
789
       1,    -1,    -1,    30,    31,    -1,    33,    -1,    -1,    36,
 
790
      -1,    -1,    -1,    -1,    15,    16,    17,    18,    19,    20,
 
791
      21,    22,    23,    24,    25,    26,     1,    -1,    -1,    30,
 
792
      31,    -1,    33,    -1,    -1,    36,    -1,    -1,    -1,    -1,
 
793
      15,    16,    17,    18,    19,    20,    21,    22,    23,    24,
 
794
      25,    26,     1,    -1,    -1,    30,    31,    -1,    33,    -1,
 
795
      -1,    36,    -1,    -1,    -1,    -1,    15,    16,    17,    18,
 
796
      19,    20,    21,    22,    23,    24,    25,    26,     1,    -1,
 
797
      -1,    30,    31,    -1,    33,    -1,    -1,    36,    -1,    -1,
 
798
      -1,    -1,    15,    16,    17,    18,    19,    20,    21,    22,
 
799
      23,    24,    25,    26,     1,    -1,    -1,    30,    31,    -1,
 
800
      33,    -1,    -1,    36,    -1,    -1,    -1,    -1,    15,    16,
 
801
      17,    18,    19,    20,    21,    22,    23,    24,    25,    26,
 
802
       1,    -1,    -1,    30,    31,    -1,    33,    -1,    -1,    36,
 
803
      -1,    -1,    -1,    -1,    15,    16,    17,    18,    19,    20,
 
804
      21,    22,    23,    24,    25,    26,     1,    -1,    -1,    30,
 
805
      -1,    -1,    -1,    -1,    -1,    36,    -1,    -1,    -1,    -1,
 
806
      15,    16,    17,    18,    19,    20,    21,    22,    23,    24,
 
807
      25,    26,     1,    -1,    -1,    30,    -1,    -1,    -1,    -1,
 
808
      -1,    36,    -1,    -1,    -1,    -1,    15,    16,    17,    18,
 
809
      19,    20,    21,    22,    23,    24,    25,    26,     1,    -1,
 
810
      -1,    30,    -1,    -1,    -1,    -1,    -1,    36,    -1,    -1,
 
811
      -1,    -1,    15,    16,    17,    18,    19,    20,    21,    22,
 
812
      23,    24,    25,    26,     1,    -1,    -1,    30,    -1,    -1,
 
813
      -1,    -1,    -1,    36,    -1,    -1,    -1,    -1,    15,    16,
 
814
      17,    18,    19,    20,    21,    22,    23,    24,    25,    26,
 
815
       1,    -1,    -1,    30,    -1,    -1,    -1,    -1,    -1,    36,
 
816
      -1,    -1,    -1,    -1,    15,    16,    17,    18,    19,    20,
 
817
      21,    22,    23,    24,    25,    26,    -1,    -1,    -1,    30,
 
818
      -1,    -1,    -1,    -1,    -1,    36,     3,     4,     5,     6,
 
819
       7,     8,     9,    10,    11,    -1,    -1,    -1,    -1,    -1,
 
820
      -1,    -1,    -1,    -1,    -1,     1,    23,    24,    -1,    -1,
 
821
      27,    -1,    -1,    -1,    31,    32,    -1,    34,    35,    15,
 
822
      16,    17,    18,    19,    20,    21,    22,    23,    24,    25,
 
823
      26,     1,    -1,    -1,    30,    -1,    -1,    33,     3,     4,
 
824
       5,     6,     7,     8,    -1,    15,    16,    17,    18,    19,
 
825
      20,    21,    22,    23,    24,    25,    26,     1,    23,    24,
 
826
      30,    -1,    27,    33,    -1,    -1,    -1,    32,    -1,    -1,
 
827
      -1,    15,    16,    17,    18,    19,    20,    21,    22,    23,
 
828
      24,    25,    26,     1,    -1,    -1,    30,    -1,    -1,    33,
 
829
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    15,    16,    17,
 
830
      18,    19,    20,    21,    22,    23,    24,    25,    26,     1,
 
831
      -1,    -1,    30,    -1,    -1,    33,    -1,    -1,    -1,    -1,
 
832
      -1,    -1,    -1,    15,    16,    17,    18,    19,    20,    21,
 
833
      22,    23,    24,    25,    26,     1,    -1,    -1,    30,    -1,
 
834
      -1,    33,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    15,
 
835
      16,    17,    18,    19,    20,    21,    22,    23,    24,    25,
 
836
      26,     1,    -1,    -1,    30,    -1,    -1,    33,    -1,    -1,
 
837
      -1,    -1,    -1,    -1,    -1,    15,    16,    17,    18,    19,
 
838
      20,    21,    22,    23,    24,    25,    26,    -1,    -1,    -1,
 
839
      30,    -1,    -1,    33,     3,     4,     5,     6,     7,     8,
 
840
       9,    10,    11,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
 
841
      -1,    -1,     1,    -1,    23,    24,    -1,    -1,    27,    -1,
 
842
      -1,    -1,    31,    32,    -1,    34,    15,    16,    17,    18,
 
843
      19,    20,    21,    22,    23,    24,    25,    26,     1,    -1,
 
844
      -1,    30,    31,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
 
845
      -1,    -1,    15,    16,    17,    18,    19,    20,    21,    22,
 
846
      23,    24,    25,    26,     1,    -1,    -1,    30,    31,    -1,
 
847
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    15,    16,
 
848
      17,    18,    19,    20,    21,    22,    23,    24,    25,    26,
 
849
      -1,    -1,    -1,    30,    31
 
850
};
 
851
 
 
852
/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
 
853
   symbol of state STATE-NUM.  */
 
854
static const yytype_uint8 yystos[] =
 
855
{
 
856
       0,     3,     4,     5,     6,     7,     8,     9,    10,    11,
 
857
      23,    24,    27,    31,    32,    34,    38,    39,    40,    41,
 
858
      14,    32,    32,    32,    32,    32,    32,     4,    41,    41,
 
859
      41,    41,    41,    39,     0,    40,     1,     1,    15,    16,
 
860
      17,    18,    19,    20,    21,    22,    23,    24,    25,    26,
 
861
      30,    31,    41,    41,    41,    41,    41,    41,    41,    31,
 
862
      33,    35,    41,    41,    41,    41,    41,    41,    41,    41,
 
863
      41,    41,    41,    41,    41,    31,    33,    36,    36,    36,
 
864
      33,    33,    41,    41,    41,    40,    40,    33,    36,    36,
 
865
      13,    41,    41,    40,    33,    36,    41,    33
 
866
};
 
867
 
 
868
#define yyerrok         (yyerrstatus = 0)
 
869
#define yyclearin       (yychar = YYEMPTY)
 
870
#define YYEMPTY         (-2)
 
871
#define YYEOF           0
 
872
 
 
873
#define YYACCEPT        goto yyacceptlab
 
874
#define YYABORT         goto yyabortlab
 
875
#define YYERROR         goto yyerrorlab
 
876
 
 
877
 
 
878
/* Like YYERROR except do call yyerror.  This remains here temporarily
 
879
   to ease the transition to the new meaning of YYERROR, for GCC.
 
880
   Once GCC version 2 has supplanted version 1, this can go.  */
 
881
 
 
882
#define YYFAIL          goto yyerrlab
 
883
 
 
884
#define YYRECOVERING()  (!!yyerrstatus)
 
885
 
 
886
#define YYBACKUP(Token, Value)                                  \
 
887
do                                                              \
 
888
  if (yychar == YYEMPTY && yylen == 1)                          \
 
889
    {                                                           \
 
890
      yychar = (Token);                                         \
 
891
      yylval = (Value);                                         \
 
892
      yytoken = YYTRANSLATE (yychar);                           \
 
893
      YYPOPSTACK (1);                                           \
 
894
      goto yybackup;                                            \
 
895
    }                                                           \
 
896
  else                                                          \
 
897
    {                                                           \
 
898
      yyerror (YY_("syntax error: cannot back up")); \
 
899
      YYERROR;                                                  \
 
900
    }                                                           \
 
901
while (YYID (0))
 
902
 
 
903
 
 
904
#define YYTERROR        1
 
905
#define YYERRCODE       256
 
906
 
 
907
 
 
908
/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
 
909
   If N is 0, then set CURRENT to the empty location which ends
 
910
   the previous symbol: RHS[0] (always defined).  */
 
911
 
 
912
#define YYRHSLOC(Rhs, K) ((Rhs)[K])
 
913
#ifndef YYLLOC_DEFAULT
 
914
# define YYLLOC_DEFAULT(Current, Rhs, N)                                \
 
915
    do                                                                  \
 
916
      if (YYID (N))                                                    \
 
917
        {                                                               \
 
918
          (Current).first_line   = YYRHSLOC (Rhs, 1).first_line;        \
 
919
          (Current).first_column = YYRHSLOC (Rhs, 1).first_column;      \
 
920
          (Current).last_line    = YYRHSLOC (Rhs, N).last_line;         \
 
921
          (Current).last_column  = YYRHSLOC (Rhs, N).last_column;       \
 
922
        }                                                               \
 
923
      else                                                              \
 
924
        {                                                               \
 
925
          (Current).first_line   = (Current).last_line   =              \
 
926
            YYRHSLOC (Rhs, 0).last_line;                                \
 
927
          (Current).first_column = (Current).last_column =              \
 
928
            YYRHSLOC (Rhs, 0).last_column;                              \
 
929
        }                                                               \
 
930
    while (YYID (0))
 
931
#endif
 
932
 
 
933
 
 
934
/* YY_LOCATION_PRINT -- Print the location on the stream.
 
935
   This macro was not mandated originally: define only if we know
 
936
   we won't break user code: when these are the locations we know.  */
 
937
 
 
938
#ifndef YY_LOCATION_PRINT
 
939
# if YYLTYPE_IS_TRIVIAL
 
940
#  define YY_LOCATION_PRINT(File, Loc)                  \
 
941
     fprintf (File, "%d.%d-%d.%d",                      \
 
942
              (Loc).first_line, (Loc).first_column,     \
 
943
              (Loc).last_line,  (Loc).last_column)
 
944
# else
 
945
#  define YY_LOCATION_PRINT(File, Loc) ((void) 0)
 
946
# endif
 
947
#endif
 
948
 
 
949
 
 
950
/* YYLEX -- calling `yylex' with the right arguments.  */
 
951
 
 
952
#ifdef YYLEX_PARAM
 
953
# define YYLEX yylex (YYLEX_PARAM)
 
954
#else
 
955
# define YYLEX yylex ()
 
956
#endif
 
957
 
 
958
/* Enable debugging if requested.  */
 
959
#if YYDEBUG
 
960
 
 
961
# ifndef YYFPRINTF
 
962
#  include <stdio.h> /* INFRINGES ON USER NAME SPACE */
 
963
#  define YYFPRINTF fprintf
 
964
# endif
 
965
 
 
966
# define YYDPRINTF(Args)                        \
 
967
do {                                            \
 
968
  if (yydebug)                                  \
 
969
    YYFPRINTF Args;                             \
 
970
} while (YYID (0))
 
971
 
 
972
# define YY_SYMBOL_PRINT(Title, Type, Value, Location)                    \
 
973
do {                                                                      \
 
974
  if (yydebug)                                                            \
 
975
    {                                                                     \
 
976
      YYFPRINTF (stderr, "%s ", Title);                                   \
 
977
      yy_symbol_print (stderr,                                            \
 
978
                  Type, Value); \
 
979
      YYFPRINTF (stderr, "\n");                                           \
 
980
    }                                                                     \
 
981
} while (YYID (0))
 
982
 
 
983
 
 
984
/*--------------------------------.
 
985
| Print this symbol on YYOUTPUT.  |
 
986
`--------------------------------*/
 
987
 
 
988
/*ARGSUSED*/
 
989
#if (defined __STDC__ || defined __C99__FUNC__ \
 
990
     || defined __cplusplus || defined _MSC_VER)
 
991
static void
 
992
yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
 
993
#else
 
994
static void
 
995
yy_symbol_value_print (yyoutput, yytype, yyvaluep)
 
996
    FILE *yyoutput;
 
997
    int yytype;
 
998
    YYSTYPE const * const yyvaluep;
 
999
#endif
 
1000
{
 
1001
  if (!yyvaluep)
 
1002
    return;
 
1003
# ifdef YYPRINT
 
1004
  if (yytype < YYNTOKENS)
 
1005
    YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
 
1006
# else
 
1007
  YYUSE (yyoutput);
 
1008
# endif
 
1009
  switch (yytype)
 
1010
    {
 
1011
      default:
 
1012
        break;
 
1013
    }
 
1014
}
 
1015
 
 
1016
 
 
1017
/*--------------------------------.
 
1018
| Print this symbol on YYOUTPUT.  |
 
1019
`--------------------------------*/
 
1020
 
 
1021
#if (defined __STDC__ || defined __C99__FUNC__ \
 
1022
     || defined __cplusplus || defined _MSC_VER)
 
1023
static void
 
1024
yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
 
1025
#else
 
1026
static void
 
1027
yy_symbol_print (yyoutput, yytype, yyvaluep)
 
1028
    FILE *yyoutput;
 
1029
    int yytype;
 
1030
    YYSTYPE const * const yyvaluep;
 
1031
#endif
 
1032
{
 
1033
  if (yytype < YYNTOKENS)
 
1034
    YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
 
1035
  else
 
1036
    YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
 
1037
 
 
1038
  yy_symbol_value_print (yyoutput, yytype, yyvaluep);
 
1039
  YYFPRINTF (yyoutput, ")");
 
1040
}
 
1041
 
 
1042
/*------------------------------------------------------------------.
 
1043
| yy_stack_print -- Print the state stack from its BOTTOM up to its |
 
1044
| TOP (included).                                                   |
 
1045
`------------------------------------------------------------------*/
 
1046
 
 
1047
#if (defined __STDC__ || defined __C99__FUNC__ \
 
1048
     || defined __cplusplus || defined _MSC_VER)
 
1049
static void
 
1050
yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
 
1051
#else
 
1052
static void
 
1053
yy_stack_print (yybottom, yytop)
 
1054
    yytype_int16 *yybottom;
 
1055
    yytype_int16 *yytop;
 
1056
#endif
 
1057
{
 
1058
  YYFPRINTF (stderr, "Stack now");
 
1059
  for (; yybottom <= yytop; yybottom++)
 
1060
    {
 
1061
      int yybot = *yybottom;
 
1062
      YYFPRINTF (stderr, " %d", yybot);
 
1063
    }
 
1064
  YYFPRINTF (stderr, "\n");
 
1065
}
 
1066
 
 
1067
# define YY_STACK_PRINT(Bottom, Top)                            \
 
1068
do {                                                            \
 
1069
  if (yydebug)                                                  \
 
1070
    yy_stack_print ((Bottom), (Top));                           \
 
1071
} while (YYID (0))
 
1072
 
 
1073
 
 
1074
/*------------------------------------------------.
 
1075
| Report that the YYRULE is going to be reduced.  |
 
1076
`------------------------------------------------*/
 
1077
 
 
1078
#if (defined __STDC__ || defined __C99__FUNC__ \
 
1079
     || defined __cplusplus || defined _MSC_VER)
 
1080
static void
 
1081
yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
 
1082
#else
 
1083
static void
 
1084
yy_reduce_print (yyvsp, yyrule)
 
1085
    YYSTYPE *yyvsp;
 
1086
    int yyrule;
 
1087
#endif
 
1088
{
 
1089
  int yynrhs = yyr2[yyrule];
 
1090
  int yyi;
 
1091
  unsigned long int yylno = yyrline[yyrule];
 
1092
  YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
 
1093
             yyrule - 1, yylno);
 
1094
  /* The symbols being reduced.  */
 
1095
  for (yyi = 0; yyi < yynrhs; yyi++)
 
1096
    {
 
1097
      YYFPRINTF (stderr, "   $%d = ", yyi + 1);
 
1098
      yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
 
1099
                       &(yyvsp[(yyi + 1) - (yynrhs)])
 
1100
                                       );
 
1101
      YYFPRINTF (stderr, "\n");
 
1102
    }
 
1103
}
 
1104
 
 
1105
# define YY_REDUCE_PRINT(Rule)          \
 
1106
do {                                    \
 
1107
  if (yydebug)                          \
 
1108
    yy_reduce_print (yyvsp, Rule); \
 
1109
} while (YYID (0))
 
1110
 
 
1111
/* Nonzero means print parse trace.  It is left uninitialized so that
 
1112
   multiple parsers can coexist.  */
 
1113
int yydebug;
 
1114
#else /* !YYDEBUG */
 
1115
# define YYDPRINTF(Args)
 
1116
# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
 
1117
# define YY_STACK_PRINT(Bottom, Top)
 
1118
# define YY_REDUCE_PRINT(Rule)
 
1119
#endif /* !YYDEBUG */
 
1120
 
 
1121
 
 
1122
/* YYINITDEPTH -- initial size of the parser's stacks.  */
 
1123
#ifndef YYINITDEPTH
 
1124
# define YYINITDEPTH 200
 
1125
#endif
 
1126
 
 
1127
/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
 
1128
   if the built-in stack extension method is used).
 
1129
 
 
1130
   Do not make this value too large; the results are undefined if
 
1131
   YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
 
1132
   evaluated with infinite-precision integer arithmetic.  */
 
1133
 
 
1134
#ifndef YYMAXDEPTH
 
1135
# define YYMAXDEPTH 10000
 
1136
#endif
 
1137
 
 
1138
 
 
1139
 
 
1140
#if YYERROR_VERBOSE
 
1141
 
 
1142
# ifndef yystrlen
 
1143
#  if defined __GLIBC__ && defined _STRING_H
 
1144
#   define yystrlen strlen
 
1145
#  else
 
1146
/* Return the length of YYSTR.  */
 
1147
#if (defined __STDC__ || defined __C99__FUNC__ \
 
1148
     || defined __cplusplus || defined _MSC_VER)
 
1149
static YYSIZE_T
 
1150
yystrlen (const char *yystr)
 
1151
#else
 
1152
static YYSIZE_T
 
1153
yystrlen (yystr)
 
1154
    const char *yystr;
 
1155
#endif
 
1156
{
 
1157
  YYSIZE_T yylen;
 
1158
  for (yylen = 0; yystr[yylen]; yylen++)
 
1159
    continue;
 
1160
  return yylen;
 
1161
}
 
1162
#  endif
 
1163
# endif
 
1164
 
 
1165
# ifndef yystpcpy
 
1166
#  if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
 
1167
#   define yystpcpy stpcpy
 
1168
#  else
 
1169
/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
 
1170
   YYDEST.  */
 
1171
#if (defined __STDC__ || defined __C99__FUNC__ \
 
1172
     || defined __cplusplus || defined _MSC_VER)
 
1173
static char *
 
1174
yystpcpy (char *yydest, const char *yysrc)
 
1175
#else
 
1176
static char *
 
1177
yystpcpy (yydest, yysrc)
 
1178
    char *yydest;
 
1179
    const char *yysrc;
 
1180
#endif
 
1181
{
 
1182
  char *yyd = yydest;
 
1183
  const char *yys = yysrc;
 
1184
 
 
1185
  while ((*yyd++ = *yys++) != '\0')
 
1186
    continue;
 
1187
 
 
1188
  return yyd - 1;
 
1189
}
 
1190
#  endif
 
1191
# endif
 
1192
 
 
1193
# ifndef yytnamerr
 
1194
/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
 
1195
   quotes and backslashes, so that it's suitable for yyerror.  The
 
1196
   heuristic is that double-quoting is unnecessary unless the string
 
1197
   contains an apostrophe, a comma, or backslash (other than
 
1198
   backslash-backslash).  YYSTR is taken from yytname.  If YYRES is
 
1199
   null, do not copy; instead, return the length of what the result
 
1200
   would have been.  */
 
1201
static YYSIZE_T
 
1202
yytnamerr (char *yyres, const char *yystr)
 
1203
{
 
1204
  if (*yystr == '"')
 
1205
    {
 
1206
      YYSIZE_T yyn = 0;
 
1207
      char const *yyp = yystr;
 
1208
 
 
1209
      for (;;)
 
1210
        switch (*++yyp)
 
1211
          {
 
1212
          case '\'':
 
1213
          case ',':
 
1214
            goto do_not_strip_quotes;
 
1215
 
 
1216
          case '\\':
 
1217
            if (*++yyp != '\\')
 
1218
              goto do_not_strip_quotes;
 
1219
            /* Fall through.  */
 
1220
          default:
 
1221
            if (yyres)
 
1222
              yyres[yyn] = *yyp;
 
1223
            yyn++;
 
1224
            break;
 
1225
 
 
1226
          case '"':
 
1227
            if (yyres)
 
1228
              yyres[yyn] = '\0';
 
1229
            return yyn;
 
1230
          }
 
1231
    do_not_strip_quotes: ;
 
1232
    }
 
1233
 
 
1234
  if (! yyres)
 
1235
    return yystrlen (yystr);
 
1236
 
 
1237
  return yystpcpy (yyres, yystr) - yyres;
 
1238
}
 
1239
# endif
 
1240
 
 
1241
/* Copy into YYRESULT an error message about the unexpected token
 
1242
   YYCHAR while in state YYSTATE.  Return the number of bytes copied,
 
1243
   including the terminating null byte.  If YYRESULT is null, do not
 
1244
   copy anything; just return the number of bytes that would be
 
1245
   copied.  As a special case, return 0 if an ordinary "syntax error"
 
1246
   message will do.  Return YYSIZE_MAXIMUM if overflow occurs during
 
1247
   size calculation.  */
 
1248
static YYSIZE_T
 
1249
yysyntax_error (char *yyresult, int yystate, int yychar)
 
1250
{
 
1251
  int yyn = yypact[yystate];
 
1252
 
 
1253
  if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
 
1254
    return 0;
 
1255
  else
 
1256
    {
 
1257
      int yytype = YYTRANSLATE (yychar);
 
1258
      YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
 
1259
      YYSIZE_T yysize = yysize0;
 
1260
      YYSIZE_T yysize1;
 
1261
      int yysize_overflow = 0;
 
1262
      enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
 
1263
      char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
 
1264
      int yyx;
 
1265
 
 
1266
# if 0
 
1267
      /* This is so xgettext sees the translatable formats that are
 
1268
         constructed on the fly.  */
 
1269
      YY_("syntax error, unexpected %s");
 
1270
      YY_("syntax error, unexpected %s, expecting %s");
 
1271
      YY_("syntax error, unexpected %s, expecting %s or %s");
 
1272
      YY_("syntax error, unexpected %s, expecting %s or %s or %s");
 
1273
      YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
 
1274
# endif
 
1275
      char *yyfmt;
 
1276
      char const *yyf;
 
1277
      static char const yyunexpected[] = "syntax error, unexpected %s";
 
1278
      static char const yyexpecting[] = ", expecting %s";
 
1279
      static char const yyor[] = " or %s";
 
1280
      char yyformat[sizeof yyunexpected
 
1281
                    + sizeof yyexpecting - 1
 
1282
                    + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
 
1283
                       * (sizeof yyor - 1))];
 
1284
      char const *yyprefix = yyexpecting;
 
1285
 
 
1286
      /* Start YYX at -YYN if negative to avoid negative indexes in
 
1287
         YYCHECK.  */
 
1288
      int yyxbegin = yyn < 0 ? -yyn : 0;
 
1289
 
 
1290
      /* Stay within bounds of both yycheck and yytname.  */
 
1291
      int yychecklim = YYLAST - yyn + 1;
 
1292
      int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
 
1293
      int yycount = 1;
 
1294
 
 
1295
      yyarg[0] = yytname[yytype];
 
1296
      yyfmt = yystpcpy (yyformat, yyunexpected);
 
1297
 
 
1298
      for (yyx = yyxbegin; yyx < yyxend; ++yyx)
 
1299
        if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
 
1300
          {
 
1301
            if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
 
1302
              {
 
1303
                yycount = 1;
 
1304
                yysize = yysize0;
 
1305
                yyformat[sizeof yyunexpected - 1] = '\0';
 
1306
                break;
 
1307
              }
 
1308
            yyarg[yycount++] = yytname[yyx];
 
1309
            yysize1 = yysize + yytnamerr (0, yytname[yyx]);
 
1310
            yysize_overflow |= (yysize1 < yysize);
 
1311
            yysize = yysize1;
 
1312
            yyfmt = yystpcpy (yyfmt, yyprefix);
 
1313
            yyprefix = yyor;
 
1314
          }
 
1315
 
 
1316
      yyf = YY_(yyformat);
 
1317
      yysize1 = yysize + yystrlen (yyf);
 
1318
      yysize_overflow |= (yysize1 < yysize);
 
1319
      yysize = yysize1;
 
1320
 
 
1321
      if (yysize_overflow)
 
1322
        return YYSIZE_MAXIMUM;
 
1323
 
 
1324
      if (yyresult)
 
1325
        {
 
1326
          /* Avoid sprintf, as that infringes on the user's name space.
 
1327
             Don't have undefined behavior even if the translation
 
1328
             produced a string with the wrong number of "%s"s.  */
 
1329
          char *yyp = yyresult;
 
1330
          int yyi = 0;
 
1331
          while ((*yyp = *yyf) != '\0')
 
1332
            {
 
1333
              if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
 
1334
                {
 
1335
                  yyp += yytnamerr (yyp, yyarg[yyi++]);
 
1336
                  yyf += 2;
 
1337
                }
 
1338
              else
 
1339
                {
 
1340
                  yyp++;
 
1341
                  yyf++;
 
1342
                }
 
1343
            }
 
1344
        }
 
1345
      return yysize;
 
1346
    }
 
1347
}
 
1348
#endif /* YYERROR_VERBOSE */
 
1349
 
 
1350
 
 
1351
/*-----------------------------------------------.
 
1352
| Release the memory associated to this symbol.  |
 
1353
`-----------------------------------------------*/
 
1354
 
 
1355
/*ARGSUSED*/
 
1356
#if (defined __STDC__ || defined __C99__FUNC__ \
 
1357
     || defined __cplusplus || defined _MSC_VER)
 
1358
static void
 
1359
yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
 
1360
#else
 
1361
static void
 
1362
yydestruct (yymsg, yytype, yyvaluep)
 
1363
    const char *yymsg;
 
1364
    int yytype;
 
1365
    YYSTYPE *yyvaluep;
 
1366
#endif
 
1367
{
 
1368
  YYUSE (yyvaluep);
 
1369
 
 
1370
  if (!yymsg)
 
1371
    yymsg = "Deleting";
 
1372
  YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
 
1373
 
 
1374
  switch (yytype)
 
1375
    {
 
1376
 
 
1377
      default:
 
1378
        break;
 
1379
    }
 
1380
}
 
1381
 
 
1382
/* Prevent warnings from -Wmissing-prototypes.  */
 
1383
#ifdef YYPARSE_PARAM
 
1384
#if defined __STDC__ || defined __cplusplus
 
1385
int yyparse (void *YYPARSE_PARAM);
 
1386
#else
 
1387
int yyparse ();
 
1388
#endif
 
1389
#else /* ! YYPARSE_PARAM */
 
1390
#if defined __STDC__ || defined __cplusplus
 
1391
int yyparse (void);
 
1392
#else
 
1393
int yyparse ();
 
1394
#endif
 
1395
#endif /* ! YYPARSE_PARAM */
 
1396
 
 
1397
 
 
1398
/* The lookahead symbol.  */
 
1399
int yychar;
 
1400
 
 
1401
/* The semantic value of the lookahead symbol.  */
 
1402
YYSTYPE yylval;
 
1403
 
 
1404
/* Number of syntax errors so far.  */
 
1405
int yynerrs;
 
1406
 
 
1407
 
 
1408
 
 
1409
/*-------------------------.
 
1410
| yyparse or yypush_parse.  |
 
1411
`-------------------------*/
 
1412
 
 
1413
#ifdef YYPARSE_PARAM
 
1414
#if (defined __STDC__ || defined __C99__FUNC__ \
 
1415
     || defined __cplusplus || defined _MSC_VER)
 
1416
int
 
1417
yyparse (void *YYPARSE_PARAM)
 
1418
#else
 
1419
int
 
1420
yyparse (YYPARSE_PARAM)
 
1421
    void *YYPARSE_PARAM;
 
1422
#endif
 
1423
#else /* ! YYPARSE_PARAM */
 
1424
#if (defined __STDC__ || defined __C99__FUNC__ \
 
1425
     || defined __cplusplus || defined _MSC_VER)
 
1426
int
 
1427
yyparse (void)
 
1428
#else
 
1429
int
 
1430
yyparse ()
 
1431
 
 
1432
#endif
 
1433
#endif
 
1434
{
 
1435
 
 
1436
 
 
1437
    int yystate;
 
1438
    /* Number of tokens to shift before error messages enabled.  */
 
1439
    int yyerrstatus;
 
1440
 
 
1441
    /* The stacks and their tools:
 
1442
       `yyss': related to states.
 
1443
       `yyvs': related to semantic values.
 
1444
 
 
1445
       Refer to the stacks thru separate pointers, to allow yyoverflow
 
1446
       to reallocate them elsewhere.  */
 
1447
 
 
1448
    /* The state stack.  */
 
1449
    yytype_int16 yyssa[YYINITDEPTH];
 
1450
    yytype_int16 *yyss;
 
1451
    yytype_int16 *yyssp;
 
1452
 
 
1453
    /* The semantic value stack.  */
 
1454
    YYSTYPE yyvsa[YYINITDEPTH];
 
1455
    YYSTYPE *yyvs;
 
1456
    YYSTYPE *yyvsp;
 
1457
 
 
1458
    YYSIZE_T yystacksize;
 
1459
 
 
1460
  int yyn;
 
1461
  int yyresult;
 
1462
  /* Lookahead token as an internal (translated) token number.  */
 
1463
  int yytoken;
 
1464
  /* The variables used to return semantic value and location from the
 
1465
     action routines.  */
 
1466
  YYSTYPE yyval;
 
1467
 
 
1468
#if YYERROR_VERBOSE
 
1469
  /* Buffer for error messages, and its allocated size.  */
 
1470
  char yymsgbuf[128];
 
1471
  char *yymsg = yymsgbuf;
 
1472
  YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
 
1473
#endif
 
1474
 
 
1475
#define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N))
 
1476
 
 
1477
  /* The number of symbols on the RHS of the reduced rule.
 
1478
     Keep to zero when no symbol should be popped.  */
 
1479
  int yylen = 0;
 
1480
 
 
1481
  yytoken = 0;
 
1482
  yyss = yyssa;
 
1483
  yyvs = yyvsa;
 
1484
  yystacksize = YYINITDEPTH;
 
1485
 
 
1486
  YYDPRINTF ((stderr, "Starting parse\n"));
 
1487
 
 
1488
  yystate = 0;
 
1489
  yyerrstatus = 0;
 
1490
  yynerrs = 0;
 
1491
  yychar = YYEMPTY; /* Cause a token to be read.  */
 
1492
 
 
1493
  /* Initialize stack pointers.
 
1494
     Waste one element of value and location stack
 
1495
     so that they stay on the same level as the state stack.
 
1496
     The wasted elements are never initialized.  */
 
1497
  yyssp = yyss;
 
1498
  yyvsp = yyvs;
 
1499
 
 
1500
  goto yysetstate;
 
1501
 
 
1502
/*------------------------------------------------------------.
 
1503
| yynewstate -- Push a new state, which is found in yystate.  |
 
1504
`------------------------------------------------------------*/
 
1505
 yynewstate:
 
1506
  /* In all cases, when you get here, the value and location stacks
 
1507
     have just been pushed.  So pushing a state here evens the stacks.  */
 
1508
  yyssp++;
 
1509
 
 
1510
 yysetstate:
 
1511
  *yyssp = yystate;
 
1512
 
 
1513
  if (yyss + yystacksize - 1 <= yyssp)
 
1514
    {
 
1515
      /* Get the current used size of the three stacks, in elements.  */
 
1516
      YYSIZE_T yysize = yyssp - yyss + 1;
 
1517
 
 
1518
#ifdef yyoverflow
 
1519
      {
 
1520
        /* Give user a chance to reallocate the stack.  Use copies of
 
1521
           these so that the &'s don't force the real ones into
 
1522
           memory.  */
 
1523
        YYSTYPE *yyvs1 = yyvs;
 
1524
        yytype_int16 *yyss1 = yyss;
 
1525
 
 
1526
        /* Each stack pointer address is followed by the size of the
 
1527
           data in use in that stack, in bytes.  This used to be a
 
1528
           conditional around just the two extra args, but that might
 
1529
           be undefined if yyoverflow is a macro.  */
 
1530
        yyoverflow (YY_("memory exhausted"),
 
1531
                    &yyss1, yysize * sizeof (*yyssp),
 
1532
                    &yyvs1, yysize * sizeof (*yyvsp),
 
1533
                    &yystacksize);
 
1534
 
 
1535
        yyss = yyss1;
 
1536
        yyvs = yyvs1;
 
1537
      }
 
1538
#else /* no yyoverflow */
 
1539
# ifndef YYSTACK_RELOCATE
 
1540
      goto yyexhaustedlab;
 
1541
# else
 
1542
      /* Extend the stack our own way.  */
 
1543
      if (YYMAXDEPTH <= yystacksize)
 
1544
        goto yyexhaustedlab;
 
1545
      yystacksize *= 2;
 
1546
      if (YYMAXDEPTH < yystacksize)
 
1547
        yystacksize = YYMAXDEPTH;
 
1548
 
 
1549
      {
 
1550
        yytype_int16 *yyss1 = yyss;
 
1551
        union yyalloc *yyptr =
 
1552
          (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
 
1553
        if (! yyptr)
 
1554
          goto yyexhaustedlab;
 
1555
        YYSTACK_RELOCATE (yyss_alloc, yyss);
 
1556
        YYSTACK_RELOCATE (yyvs_alloc, yyvs);
 
1557
#  undef YYSTACK_RELOCATE
 
1558
        if (yyss1 != yyssa)
 
1559
          YYSTACK_FREE (yyss1);
 
1560
      }
 
1561
# endif
 
1562
#endif /* no yyoverflow */
 
1563
 
 
1564
      yyssp = yyss + yysize - 1;
 
1565
      yyvsp = yyvs + yysize - 1;
 
1566
 
 
1567
      YYDPRINTF ((stderr, "Stack size increased to %lu\n",
 
1568
                  (unsigned long int) yystacksize));
 
1569
 
 
1570
      if (yyss + yystacksize - 1 <= yyssp)
 
1571
        YYABORT;
 
1572
    }
 
1573
 
 
1574
  YYDPRINTF ((stderr, "Entering state %d\n", yystate));
 
1575
 
 
1576
  if (yystate == YYFINAL)
 
1577
    YYACCEPT;
 
1578
 
 
1579
  goto yybackup;
 
1580
 
 
1581
/*-----------.
 
1582
| yybackup.  |
 
1583
`-----------*/
 
1584
yybackup:
 
1585
 
 
1586
  /* Do appropriate processing given the current state.  Read a
 
1587
     lookahead token if we need one and don't already have one.  */
 
1588
 
 
1589
  /* First try to decide what to do without reference to lookahead token.  */
 
1590
  yyn = yypact[yystate];
 
1591
  if (yyn == YYPACT_NINF)
 
1592
    goto yydefault;
 
1593
 
 
1594
  /* Not known => get a lookahead token if don't already have one.  */
 
1595
 
 
1596
  /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol.  */
 
1597
  if (yychar == YYEMPTY)
 
1598
    {
 
1599
      YYDPRINTF ((stderr, "Reading a token: "));
 
1600
      yychar = YYLEX;
 
1601
    }
 
1602
 
 
1603
  if (yychar <= YYEOF)
 
1604
    {
 
1605
      yychar = yytoken = YYEOF;
 
1606
      YYDPRINTF ((stderr, "Now at end of input.\n"));
 
1607
    }
 
1608
  else
 
1609
    {
 
1610
      yytoken = YYTRANSLATE (yychar);
 
1611
      YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
 
1612
    }
 
1613
 
 
1614
  /* If the proper action on seeing token YYTOKEN is to reduce or to
 
1615
     detect an error, take that action.  */
 
1616
  yyn += yytoken;
 
1617
  if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
 
1618
    goto yydefault;
 
1619
  yyn = yytable[yyn];
 
1620
  if (yyn <= 0)
 
1621
    {
 
1622
      if (yyn == 0 || yyn == YYTABLE_NINF)
 
1623
        goto yyerrlab;
 
1624
      yyn = -yyn;
 
1625
      goto yyreduce;
 
1626
    }
 
1627
 
 
1628
  /* Count tokens shifted since error; after three, turn off error
 
1629
     status.  */
 
1630
  if (yyerrstatus)
 
1631
    yyerrstatus--;
 
1632
 
 
1633
  /* Shift the lookahead token.  */
 
1634
  YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
 
1635
 
 
1636
  /* Discard the shifted token.  */
 
1637
  yychar = YYEMPTY;
 
1638
 
 
1639
  yystate = yyn;
 
1640
  *++yyvsp = yylval;
 
1641
 
 
1642
  goto yynewstate;
 
1643
 
 
1644
 
 
1645
/*-----------------------------------------------------------.
 
1646
| yydefault -- do the default action for the current state.  |
 
1647
`-----------------------------------------------------------*/
 
1648
yydefault:
 
1649
  yyn = yydefact[yystate];
 
1650
  if (yyn == 0)
 
1651
    goto yyerrlab;
 
1652
  goto yyreduce;
 
1653
 
 
1654
 
 
1655
/*-----------------------------.
 
1656
| yyreduce -- Do a reduction.  |
 
1657
`-----------------------------*/
 
1658
yyreduce:
 
1659
  /* yyn is the number of a rule to reduce with.  */
 
1660
  yylen = yyr2[yyn];
 
1661
 
 
1662
  /* If YYLEN is nonzero, implement the default value of the action:
 
1663
     `$$ = $1'.
 
1664
 
 
1665
     Otherwise, the following line sets YYVAL to garbage.
 
1666
     This behavior is undocumented and Bison
 
1667
     users should not rely upon it.  Assigning to YYVAL
 
1668
     unconditionally makes the parser a bit smaller, and it avoids a
 
1669
     GCC warning that YYVAL may be used uninitialized.  */
 
1670
  yyval = yyvsp[1-yylen];
 
1671
 
 
1672
 
 
1673
  YY_REDUCE_PRINT (yyn);
 
1674
  switch (yyn)
 
1675
    {
 
1676
        case 2:
 
1677
 
 
1678
/* Line 1455 of yacc.c  */
 
1679
#line 87 "mei_parser.y"
 
1680
    { return 1; }
 
1681
    break;
 
1682
 
 
1683
  case 3:
 
1684
 
 
1685
/* Line 1455 of yacc.c  */
 
1686
#line 88 "mei_parser.y"
 
1687
    { mei_glob_root = (yyvsp[(1) - (1)].nPtr); return 1; }
 
1688
    break;
 
1689
 
 
1690
  case 4:
 
1691
 
 
1692
/* Line 1455 of yacc.c  */
 
1693
#line 92 "mei_parser.y"
 
1694
    { (yyval.nPtr) = mei_opr_node(';', 2, (yyvsp[(1) - (2)].nPtr), (yyvsp[(2) - (2)].nPtr)); }
 
1695
    break;
 
1696
 
 
1697
  case 5:
 
1698
 
 
1699
/* Line 1455 of yacc.c  */
 
1700
#line 93 "mei_parser.y"
 
1701
    { (yyval.nPtr) = (yyvsp[(1) - (1)].nPtr); }
 
1702
    break;
 
1703
 
 
1704
  case 6:
 
1705
 
 
1706
/* Line 1455 of yacc.c  */
 
1707
#line 97 "mei_parser.y"
 
1708
    { (yyval.nPtr) = mei_opr_node(';', 2, NULL, NULL); }
 
1709
    break;
 
1710
 
 
1711
  case 7:
 
1712
 
 
1713
/* Line 1455 of yacc.c  */
 
1714
#line 98 "mei_parser.y"
 
1715
    { (yyval.nPtr) = (yyvsp[(1) - (2)].nPtr); }
 
1716
    break;
 
1717
 
 
1718
  case 8:
 
1719
 
 
1720
/* Line 1455 of yacc.c  */
 
1721
#line 99 "mei_parser.y"
 
1722
    { (yyval.nPtr) = mei_opr_node(PRINT, 1, (yyvsp[(2) - (3)].nPtr)); }
 
1723
    break;
 
1724
 
 
1725
  case 9:
 
1726
 
 
1727
/* Line 1455 of yacc.c  */
 
1728
#line 100 "mei_parser.y"
 
1729
    { (yyval.nPtr) = mei_opr_node('=', 2, mei_id_node((yyvsp[(1) - (4)].sIndex)), (yyvsp[(3) - (4)].nPtr)); }
 
1730
    break;
 
1731
 
 
1732
  case 10:
 
1733
 
 
1734
/* Line 1455 of yacc.c  */
 
1735
#line 101 "mei_parser.y"
 
1736
    { (yyval.nPtr) = mei_opr_node(WHILE, 2, (yyvsp[(3) - (5)].nPtr), (yyvsp[(5) - (5)].nPtr)); }
 
1737
    break;
 
1738
 
 
1739
  case 11:
 
1740
 
 
1741
/* Line 1455 of yacc.c  */
 
1742
#line 102 "mei_parser.y"
 
1743
    { (yyval.nPtr) = mei_opr_node(IF, 2, (yyvsp[(3) - (5)].nPtr), (yyvsp[(5) - (5)].nPtr)); }
 
1744
    break;
 
1745
 
 
1746
  case 12:
 
1747
 
 
1748
/* Line 1455 of yacc.c  */
 
1749
#line 103 "mei_parser.y"
 
1750
    { (yyval.nPtr) = mei_opr_node(IF, 3, (yyvsp[(3) - (7)].nPtr), (yyvsp[(5) - (7)].nPtr), (yyvsp[(7) - (7)].nPtr)); }
 
1751
    break;
 
1752
 
 
1753
  case 13:
 
1754
 
 
1755
/* Line 1455 of yacc.c  */
 
1756
#line 104 "mei_parser.y"
 
1757
    { (yyval.nPtr) = (yyvsp[(2) - (3)].nPtr); }
 
1758
    break;
 
1759
 
 
1760
  case 14:
 
1761
 
 
1762
/* Line 1455 of yacc.c  */
 
1763
#line 105 "mei_parser.y"
 
1764
    { yyerror(mei_label_node((yyvsp[(1) - (2)].nPtr))); return 0; }
 
1765
    break;
 
1766
 
 
1767
  case 15:
 
1768
 
 
1769
/* Line 1455 of yacc.c  */
 
1770
#line 109 "mei_parser.y"
 
1771
    { (yyval.nPtr) = mei_const_node((yyvsp[(1) - (1)].iValue)); }
 
1772
    break;
 
1773
 
 
1774
  case 16:
 
1775
 
 
1776
/* Line 1455 of yacc.c  */
 
1777
#line 110 "mei_parser.y"
 
1778
    { (yyval.nPtr) = mei_id_node((yyvsp[(1) - (1)].sIndex)); }
 
1779
    break;
 
1780
 
 
1781
  case 17:
 
1782
 
 
1783
/* Line 1455 of yacc.c  */
 
1784
#line 111 "mei_parser.y"
 
1785
    { (yyval.nPtr) = mei_func_node((yyvsp[(1) - (4)].sIndex), (yyvsp[(3) - (4)].nPtr)); }
 
1786
    break;
 
1787
 
 
1788
  case 18:
 
1789
 
 
1790
/* Line 1455 of yacc.c  */
 
1791
#line 112 "mei_parser.y"
 
1792
    { (yyval.nPtr) = mei_funcx_node((yyvsp[(1) - (6)].sIndex), 2, (yyvsp[(3) - (6)].nPtr), (yyvsp[(5) - (6)].nPtr)); }
 
1793
    break;
 
1794
 
 
1795
  case 19:
 
1796
 
 
1797
/* Line 1455 of yacc.c  */
 
1798
#line 113 "mei_parser.y"
 
1799
    { (yyval.nPtr) = mei_funcx_node((yyvsp[(1) - (8)].sIndex), 3, (yyvsp[(3) - (8)].nPtr), (yyvsp[(5) - (8)].nPtr), (yyvsp[(7) - (8)].nPtr)); }
 
1800
    break;
 
1801
 
 
1802
  case 20:
 
1803
 
 
1804
/* Line 1455 of yacc.c  */
 
1805
#line 114 "mei_parser.y"
 
1806
    { (yyval.nPtr) = mei_funcx_node((yyvsp[(1) - (10)].sIndex), 4, (yyvsp[(3) - (10)].nPtr), (yyvsp[(5) - (10)].nPtr), (yyvsp[(7) - (10)].nPtr), (yyvsp[(9) - (10)].nPtr)); }
 
1807
    break;
 
1808
 
 
1809
  case 21:
 
1810
 
 
1811
/* Line 1455 of yacc.c  */
 
1812
#line 115 "mei_parser.y"
 
1813
    { (yyval.nPtr) = mei_opr_node('!',     1, (yyvsp[(2) - (2)].nPtr)); }
 
1814
    break;
 
1815
 
 
1816
  case 22:
 
1817
 
 
1818
/* Line 1455 of yacc.c  */
 
1819
#line 116 "mei_parser.y"
 
1820
    { (yyval.nPtr) = mei_opr_node(UMINUS,  1, (yyvsp[(2) - (2)].nPtr)); }
 
1821
    break;
 
1822
 
 
1823
  case 23:
 
1824
 
 
1825
/* Line 1455 of yacc.c  */
 
1826
#line 117 "mei_parser.y"
 
1827
    { (yyval.nPtr) = mei_opr_node(UPLUS,   1, (yyvsp[(2) - (2)].nPtr)); }
 
1828
    break;
 
1829
 
 
1830
  case 24:
 
1831
 
 
1832
/* Line 1455 of yacc.c  */
 
1833
#line 118 "mei_parser.y"
 
1834
    { (yyval.nPtr) = mei_opr_node('+', 2, (yyvsp[(1) - (3)].nPtr), (yyvsp[(3) - (3)].nPtr)); }
 
1835
    break;
 
1836
 
 
1837
  case 25:
 
1838
 
 
1839
/* Line 1455 of yacc.c  */
 
1840
#line 119 "mei_parser.y"
 
1841
    { (yyval.nPtr) = mei_opr_node('-', 2, (yyvsp[(1) - (3)].nPtr), (yyvsp[(3) - (3)].nPtr)); }
 
1842
    break;
 
1843
 
 
1844
  case 26:
 
1845
 
 
1846
/* Line 1455 of yacc.c  */
 
1847
#line 120 "mei_parser.y"
 
1848
    { (yyval.nPtr) = mei_opr_node('*', 2, (yyvsp[(1) - (3)].nPtr), (yyvsp[(3) - (3)].nPtr)); }
 
1849
    break;
 
1850
 
 
1851
  case 27:
 
1852
 
 
1853
/* Line 1455 of yacc.c  */
 
1854
#line 121 "mei_parser.y"
 
1855
    { (yyval.nPtr) = mei_opr_node('/', 2, (yyvsp[(1) - (3)].nPtr), (yyvsp[(3) - (3)].nPtr)); }
 
1856
    break;
 
1857
 
 
1858
  case 28:
 
1859
 
 
1860
/* Line 1455 of yacc.c  */
 
1861
#line 122 "mei_parser.y"
 
1862
    { (yyval.nPtr) = mei_opr_node('^', 2, (yyvsp[(1) - (3)].nPtr), (yyvsp[(3) - (3)].nPtr)); }
 
1863
    break;
 
1864
 
 
1865
  case 29:
 
1866
 
 
1867
/* Line 1455 of yacc.c  */
 
1868
#line 123 "mei_parser.y"
 
1869
    { (yyval.nPtr) = mei_opr_node('<', 2, (yyvsp[(1) - (3)].nPtr), (yyvsp[(3) - (3)].nPtr)); }
 
1870
    break;
 
1871
 
 
1872
  case 30:
 
1873
 
 
1874
/* Line 1455 of yacc.c  */
 
1875
#line 124 "mei_parser.y"
 
1876
    { (yyval.nPtr) = mei_opr_node('>', 2, (yyvsp[(1) - (3)].nPtr), (yyvsp[(3) - (3)].nPtr)); }
 
1877
    break;
 
1878
 
 
1879
  case 31:
 
1880
 
 
1881
/* Line 1455 of yacc.c  */
 
1882
#line 125 "mei_parser.y"
 
1883
    { (yyval.nPtr) = mei_opr_node(GE,  2, (yyvsp[(1) - (3)].nPtr), (yyvsp[(3) - (3)].nPtr)); }
 
1884
    break;
 
1885
 
 
1886
  case 32:
 
1887
 
 
1888
/* Line 1455 of yacc.c  */
 
1889
#line 126 "mei_parser.y"
 
1890
    { (yyval.nPtr) = mei_opr_node(LE,  2, (yyvsp[(1) - (3)].nPtr), (yyvsp[(3) - (3)].nPtr)); }
 
1891
    break;
 
1892
 
 
1893
  case 33:
 
1894
 
 
1895
/* Line 1455 of yacc.c  */
 
1896
#line 127 "mei_parser.y"
 
1897
    { (yyval.nPtr) = mei_opr_node(NE,  2, (yyvsp[(1) - (3)].nPtr), (yyvsp[(3) - (3)].nPtr)); }
 
1898
    break;
 
1899
 
 
1900
  case 34:
 
1901
 
 
1902
/* Line 1455 of yacc.c  */
 
1903
#line 128 "mei_parser.y"
 
1904
    { (yyval.nPtr) = mei_opr_node(EQ,  2, (yyvsp[(1) - (3)].nPtr), (yyvsp[(3) - (3)].nPtr)); }
 
1905
    break;
 
1906
 
 
1907
  case 35:
 
1908
 
 
1909
/* Line 1455 of yacc.c  */
 
1910
#line 129 "mei_parser.y"
 
1911
    { (yyval.nPtr) = mei_opr_node(OR,  2, (yyvsp[(1) - (3)].nPtr), (yyvsp[(3) - (3)].nPtr)); }
 
1912
    break;
 
1913
 
 
1914
  case 36:
 
1915
 
 
1916
/* Line 1455 of yacc.c  */
 
1917
#line 130 "mei_parser.y"
 
1918
    { (yyval.nPtr) = mei_opr_node(AND, 2, (yyvsp[(1) - (3)].nPtr), (yyvsp[(3) - (3)].nPtr)); }
 
1919
    break;
 
1920
 
 
1921
  case 37:
 
1922
 
 
1923
/* Line 1455 of yacc.c  */
 
1924
#line 131 "mei_parser.y"
 
1925
    { (yyval.nPtr) = (yyvsp[(2) - (3)].nPtr); }
 
1926
    break;
 
1927
 
 
1928
  case 38:
 
1929
 
 
1930
/* Line 1455 of yacc.c  */
 
1931
#line 132 "mei_parser.y"
 
1932
    { yyerror(mei_label_node((yyvsp[(1) - (2)].nPtr))); return 0; }
 
1933
    break;
 
1934
 
 
1935
 
 
1936
 
 
1937
/* Line 1455 of yacc.c  */
 
1938
#line 1939 "mei_parser.c"
 
1939
      default: break;
 
1940
    }
 
1941
  YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
 
1942
 
 
1943
  YYPOPSTACK (yylen);
 
1944
  yylen = 0;
 
1945
  YY_STACK_PRINT (yyss, yyssp);
 
1946
 
 
1947
  *++yyvsp = yyval;
 
1948
 
 
1949
  /* Now `shift' the result of the reduction.  Determine what state
 
1950
     that goes to, based on the state we popped back to and the rule
 
1951
     number reduced by.  */
 
1952
 
 
1953
  yyn = yyr1[yyn];
 
1954
 
 
1955
  yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
 
1956
  if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
 
1957
    yystate = yytable[yystate];
 
1958
  else
 
1959
    yystate = yydefgoto[yyn - YYNTOKENS];
 
1960
 
 
1961
  goto yynewstate;
 
1962
 
 
1963
 
 
1964
/*------------------------------------.
 
1965
| yyerrlab -- here on detecting error |
 
1966
`------------------------------------*/
 
1967
yyerrlab:
 
1968
  /* If not already recovering from an error, report this error.  */
 
1969
  if (!yyerrstatus)
 
1970
    {
 
1971
      ++yynerrs;
 
1972
#if ! YYERROR_VERBOSE
 
1973
      yyerror (YY_("syntax error"));
 
1974
#else
 
1975
      {
 
1976
        YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
 
1977
        if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
 
1978
          {
 
1979
            YYSIZE_T yyalloc = 2 * yysize;
 
1980
            if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
 
1981
              yyalloc = YYSTACK_ALLOC_MAXIMUM;
 
1982
            if (yymsg != yymsgbuf)
 
1983
              YYSTACK_FREE (yymsg);
 
1984
            yymsg = (char *) YYSTACK_ALLOC (yyalloc);
 
1985
            if (yymsg)
 
1986
              yymsg_alloc = yyalloc;
 
1987
            else
 
1988
              {
 
1989
                yymsg = yymsgbuf;
 
1990
                yymsg_alloc = sizeof yymsgbuf;
 
1991
              }
 
1992
          }
 
1993
 
 
1994
        if (0 < yysize && yysize <= yymsg_alloc)
 
1995
          {
 
1996
            (void) yysyntax_error (yymsg, yystate, yychar);
 
1997
            yyerror (yymsg);
 
1998
          }
 
1999
        else
 
2000
          {
 
2001
            yyerror (YY_("syntax error"));
 
2002
            if (yysize != 0)
 
2003
              goto yyexhaustedlab;
 
2004
          }
 
2005
      }
 
2006
#endif
 
2007
    }
 
2008
 
 
2009
 
 
2010
 
 
2011
  if (yyerrstatus == 3)
 
2012
    {
 
2013
      /* If just tried and failed to reuse lookahead token after an
 
2014
         error, discard it.  */
 
2015
 
 
2016
      if (yychar <= YYEOF)
 
2017
        {
 
2018
          /* Return failure if at end of input.  */
 
2019
          if (yychar == YYEOF)
 
2020
            YYABORT;
 
2021
        }
 
2022
      else
 
2023
        {
 
2024
          yydestruct ("Error: discarding",
 
2025
                      yytoken, &yylval);
 
2026
          yychar = YYEMPTY;
 
2027
        }
 
2028
    }
 
2029
 
 
2030
  /* Else will try to reuse lookahead token after shifting the error
 
2031
     token.  */
 
2032
  goto yyerrlab1;
 
2033
 
 
2034
 
 
2035
/*---------------------------------------------------.
 
2036
| yyerrorlab -- error raised explicitly by YYERROR.  |
 
2037
`---------------------------------------------------*/
 
2038
yyerrorlab:
 
2039
 
 
2040
  /* Pacify compilers like GCC when the user code never invokes
 
2041
     YYERROR and the label yyerrorlab therefore never appears in user
 
2042
     code.  */
 
2043
  if (/*CONSTCOND*/ 0)
 
2044
     goto yyerrorlab;
 
2045
 
 
2046
  /* Do not reclaim the symbols of the rule which action triggered
 
2047
     this YYERROR.  */
 
2048
  YYPOPSTACK (yylen);
 
2049
  yylen = 0;
 
2050
  YY_STACK_PRINT (yyss, yyssp);
 
2051
  yystate = *yyssp;
 
2052
  goto yyerrlab1;
 
2053
 
 
2054
 
 
2055
/*-------------------------------------------------------------.
 
2056
| yyerrlab1 -- common code for both syntax error and YYERROR.  |
 
2057
`-------------------------------------------------------------*/
 
2058
yyerrlab1:
 
2059
  yyerrstatus = 3;      /* Each real token shifted decrements this.  */
 
2060
 
 
2061
  for (;;)
 
2062
    {
 
2063
      yyn = yypact[yystate];
 
2064
      if (yyn != YYPACT_NINF)
 
2065
        {
 
2066
          yyn += YYTERROR;
 
2067
          if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
 
2068
            {
 
2069
              yyn = yytable[yyn];
 
2070
              if (0 < yyn)
 
2071
                break;
 
2072
            }
 
2073
        }
 
2074
 
 
2075
      /* Pop the current state because it cannot handle the error token.  */
 
2076
      if (yyssp == yyss)
 
2077
        YYABORT;
 
2078
 
 
2079
 
 
2080
      yydestruct ("Error: popping",
 
2081
                  yystos[yystate], yyvsp);
 
2082
      YYPOPSTACK (1);
 
2083
      yystate = *yyssp;
 
2084
      YY_STACK_PRINT (yyss, yyssp);
 
2085
    }
 
2086
 
 
2087
  *++yyvsp = yylval;
 
2088
 
 
2089
 
 
2090
  /* Shift the error token.  */
 
2091
  YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
 
2092
 
 
2093
  yystate = yyn;
 
2094
  goto yynewstate;
 
2095
 
 
2096
 
 
2097
/*-------------------------------------.
 
2098
| yyacceptlab -- YYACCEPT comes here.  |
 
2099
`-------------------------------------*/
 
2100
yyacceptlab:
 
2101
  yyresult = 0;
 
2102
  goto yyreturn;
 
2103
 
 
2104
/*-----------------------------------.
 
2105
| yyabortlab -- YYABORT comes here.  |
 
2106
`-----------------------------------*/
 
2107
yyabortlab:
 
2108
  yyresult = 1;
 
2109
  goto yyreturn;
 
2110
 
 
2111
#if !defined(yyoverflow) || YYERROR_VERBOSE
 
2112
/*-------------------------------------------------.
 
2113
| yyexhaustedlab -- memory exhaustion comes here.  |
 
2114
`-------------------------------------------------*/
 
2115
yyexhaustedlab:
 
2116
  yyerror (YY_("memory exhausted"));
 
2117
  yyresult = 2;
 
2118
  /* Fall through.  */
 
2119
#endif
 
2120
 
 
2121
yyreturn:
 
2122
  if (yychar != YYEMPTY)
 
2123
     yydestruct ("Cleanup: discarding lookahead",
 
2124
                 yytoken, &yylval);
 
2125
  /* Do not reclaim the symbols of the rule which action triggered
 
2126
     this YYABORT or YYACCEPT.  */
 
2127
  YYPOPSTACK (yylen);
 
2128
  YY_STACK_PRINT (yyss, yyssp);
 
2129
  while (yyssp != yyss)
 
2130
    {
 
2131
      yydestruct ("Cleanup: popping",
 
2132
                  yystos[*yyssp], yyvsp);
 
2133
      YYPOPSTACK (1);
 
2134
    }
 
2135
#ifndef yyoverflow
 
2136
  if (yyss != yyssa)
 
2137
    YYSTACK_FREE (yyss);
 
2138
#endif
 
2139
#if YYERROR_VERBOSE
 
2140
  if (yymsg != yymsgbuf)
 
2141
    YYSTACK_FREE (yymsg);
 
2142
#endif
 
2143
  /* Make sure YYID is used.  */
 
2144
  return YYID (yyresult);
 
2145
}
 
2146
 
 
2147
 
 
2148
 
 
2149
/* Line 1675 of yacc.c  */
 
2150
#line 135 "mei_parser.y"
 
2151
 
 
2152
 
 
2153
/*----------------------------------------------------------------------------
 
2154
 * Parsing error management
 
2155
 *----------------------------------------------------------------------------*/
 
2156
 
 
2157
void
 
2158
yyerror(const char *s)
 
2159
{
 
2160
    int l;
 
2161
 
 
2162
    mei_free_node(mei_glob_root);
 
2163
    --mei_glob_column;
 
2164
 
 
2165
    /* bft_printf("Warning: %s\n", s); */
 
2166
    /* bft_printf("line %i column %i \n", line, column); */
 
2167
 
 
2168
    BFT_REALLOC(mei_glob_label_list,  mei_glob_ierr_list+1, char*);
 
2169
    BFT_REALLOC(mei_glob_line_list,   mei_glob_ierr_list+1, int);
 
2170
    BFT_REALLOC(mei_glob_column_list, mei_glob_ierr_list+1, int);
 
2171
 
 
2172
    l = strlen("Warning: ") +1;
 
2173
    BFT_MALLOC(mei_glob_label_list[mei_glob_ierr_list], l, char);
 
2174
    strncpy(mei_glob_label_list[mei_glob_ierr_list], "Error: ", l);
 
2175
 
 
2176
    l += strlen(s);
 
2177
    BFT_REALLOC(mei_glob_label_list[mei_glob_ierr_list], l, char);
 
2178
    strncat(mei_glob_label_list[mei_glob_ierr_list], s, l);
 
2179
 
 
2180
    l += strlen(" \n");
 
2181
    BFT_REALLOC(mei_glob_label_list[mei_glob_ierr_list], l, char);
 
2182
    strncat(mei_glob_label_list[mei_glob_ierr_list], " \n", l);
 
2183
 
 
2184
    mei_glob_line_list[mei_glob_ierr_list]   = mei_glob_line;
 
2185
    mei_glob_column_list[mei_glob_ierr_list] = mei_glob_column;
 
2186
 
 
2187
    mei_glob_ierr_list++;
 
2188
 
 
2189
    return;
 
2190
}
 
2191
 
 
2192
/*----------------------------------------------------------------------------*/
 
2193