1 /* A Bison parser, made by GNU Bison 2.4.3.  */
2 
3 /* Skeleton implementation for Bison's Yacc-like parsers in C
4 
5       Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
6    2009, 2010 Free Software Foundation, Inc.
7 
8    This program is free software: you can redistribute it and/or modify
9    it under the terms of the GNU General Public License as published by
10    the Free Software Foundation, either version 3 of the License, or
11    (at your option) any later version.
12 
13    This program is distributed in the hope that it will be useful,
14    but WITHOUT ANY WARRANTY; without even the implied warranty of
15    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16    GNU General Public License for more details.
17 
18    You should have received a copy of the GNU General Public License
19    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
20 
21 /* As a special exception, you may create a larger work that contains
22    part or all of the Bison parser skeleton and distribute that work
23    under terms of your choice, so long as that work isn't itself a
24    parser generator using the skeleton or a modified version thereof
25    as a parser skeleton.  Alternatively, if you modify or redistribute
26    the parser skeleton itself, you may (at your option) remove this
27    special exception, which will cause the skeleton and the resulting
28    Bison output files to be licensed under the GNU General Public
29    License without this special exception.
30 
31    This special exception was added by the Free Software Foundation in
32    version 2.2 of Bison.  */
33 
34 /* C LALR(1) parser skeleton written by Richard Stallman, by
35    simplifying the original so-called "semantic" parser.  */
36 
37 /* All symbols defined below should begin with yy or YY, to avoid
38    infringing on user name space.  This should be done even for local
39    variables, as they might otherwise be expanded by user macros.
40    There are some unavoidable exceptions within include files to
41    define necessary library symbols; they are noted "INFRINGES ON
42    USER NAME SPACE" below.  */
43 
44 /* Identify Bison output.  */
45 #define YYBISON 1
46 
47 /* Bison version.  */
48 #define YYBISON_VERSION "2.4.3"
49 
50 /* Skeleton name.  */
51 #define YYSKELETON_NAME "yacc.c"
52 
53 /* Pure parsers.  */
54 #define YYPURE 1
55 
56 /* Push parsers.  */
57 #define YYPUSH 0
58 
59 /* Pull parsers.  */
60 #define YYPULL 1
61 
62 /* Using locations.  */
63 #define YYLSP_NEEDED 0
64 
65 /* Substitute the variable and function names.  */
66 #define yyparse         number_yyparse
67 #define yylex           number_yylex
68 #define yyerror         number_yyerror
69 #define yylval          number_yylval
70 #define yychar          number_yychar
71 #define yydebug         number_yydebug
72 #define yynerrs         number_yynerrs
73 
74 
75 /* Copy the first part of user declarations.  */
76 
77 /* Line 189 of yacc.c  */
78 #line 32 "src/NumberReader.y"
79 
80 #include <stdio.h>
81 #include <stdlib.h>
82 #include "scheme.h"
83 #include "Object.h"
84 #include "Object-inl.h"
85 #include "Pair.h"
86 #include "Pair-inl.h"
87 #include "SString.h"
88 #include "StringProcedures.h"
89 #include "EqHashTable.h"
90 #include "NumberScanner.h"
91 #include "TextualInputPort.h"
92 #include "TextualOutputPort.h"
93 #include "Arithmetic.h"
94 #include "Reader.h"
95 #include "NumberReader.h"
96 #include "ScannerHelper.h"
97 #include "Scanner.h"
98 #include "Ratnum.h"
99 #include "Flonum.h"
100 #include "ProcedureMacro.h"
101 #include "MultiVMProcedures.h"
102 
103 using namespace scheme;
104 extern int number_yylex(YYSTYPE* yylval);
105 extern int number_yyerror(const char *);
106 //#define YYDEBUG 1
107 // yydebug = 1
108 
109 /* static int ucs4stringToInt(const ucs4string& text) */
110 /* { */
111 /*     int ret = strtol(text.ascii_c_str(), NULL, 10); */
112 /*     if (errno == ERANGE) { */
113 /*         MOSH_FATAL("reader suffix"); */
114 /*     } */
115 /*     return ret; */
116 /* } */
117 
118 // e1000 => 1000 e+100 => 100, e-100 =>-100
119 /* static int suffix(const ucs4string& text) */
120 /* { */
121 /*     MOSH_ASSERT(text.size() > 0); */
122 /*     const char* p = text.ascii_c_str(); */
123 /*     int ret = strtol(p + 1, NULL, 10); */
124 /*     if (errno == ERANGE) { */
125 /*         MOSH_FATAL("reader suffix"); */
126 /*     } */
127 /*     return ret; */
128 /* } */
129 
130 // text => "e100", "e+100" or "e-100" style
suffixToNumberOld(const ucs4string & text)131 static Object suffixToNumberOld(const ucs4string& text)
132 {
133     int sign = 1;
134     ucs4string decimal10(UC(""));
135     if (text[1] == '-') {
136         sign = -1;
137         decimal10 = text.substr(2, text.size() - 2);
138     } else if (text[1] == '+') {
139         decimal10 = text.substr(2, text.size() - 2);
140     } else {
141         decimal10 = text.substr(1, text.size() - 1);
142     }
143     Object exponent = Bignum::makeInteger(decimal10);
144     if (sign == -1) {
145         exponent = Arithmetic::negate(exponent);
146     }
147     MOSH_ASSERT(!exponent.isBignum());
148     return Arithmetic::expt(Object::makeFixnum(10), exponent);
149 }
150 
suffixToNumber(const ucs4string & text)151 static Object suffixToNumber(const ucs4string& text)
152 {
153     int sign = 1;
154     ucs4string decimal10(UC(""));
155     if (text[1] == '-') {
156         sign = -1;
157         decimal10 = text.substr(2, text.size() - 2);
158     } else if (text[1] == '+') {
159         decimal10 = text.substr(2, text.size() - 2);
160     } else {
161         decimal10 = text.substr(1, text.size() - 1);
162     }
163     Object exponent = Bignum::makeInteger(decimal10);
164     if (sign == -1) {
165         exponent = Arithmetic::negate(exponent);
166     }
167     return exponent;
168 }
169 
170 
171 
172 /* Line 189 of yacc.c  */
173 #line 174 "src/NumberReader.tab.cpp"
174 
175 /* Enabling traces.  */
176 #ifndef YYDEBUG
177 # define YYDEBUG 0
178 #endif
179 
180 /* Enabling verbose error messages.  */
181 #ifdef YYERROR_VERBOSE
182 # undef YYERROR_VERBOSE
183 # define YYERROR_VERBOSE 1
184 #else
185 # define YYERROR_VERBOSE 0
186 #endif
187 
188 /* Enabling the token table.  */
189 #ifndef YYTOKEN_TABLE
190 # define YYTOKEN_TABLE 0
191 #endif
192 
193 
194 /* Tokens.  */
195 #ifndef YYTOKENTYPE
196 # define YYTOKENTYPE
197    /* Put the tokens into the symbol table, so that GDB and other debuggers
198       know about them.  */
199    enum yytokentype {
200      END_OF_FILE = 258,
201      PLUS = 259,
202      MINUS = 260,
203      SLASH = 261,
204      DOT = 262,
205      AT = 263,
206      MY_NAN = 264,
207      MY_INF = 265,
208      IMAG = 266,
209      RADIX_2 = 267,
210      RADIX_8 = 268,
211      RADIX_10 = 269,
212      RADIX_16 = 270,
213      EXACT = 271,
214      INEXACT = 272,
215      DIGIT_2 = 273,
216      DIGIT_8 = 274,
217      DIGIT_10 = 275,
218      DIGIT_16 = 276,
219      EXPONENT_MARKER = 277
220    };
221 #endif
222 
223 
224 
225 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
226 
227 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
228 # define YYSTYPE_IS_DECLARED 1
229 #endif
230 
231 
232 /* Copy the second part of user declarations.  */
233 
234 
235 /* Line 264 of yacc.c  */
236 #line 237 "src/NumberReader.tab.cpp"
237 
238 #ifdef short
239 # undef short
240 #endif
241 
242 #ifdef YYTYPE_UINT8
243 typedef YYTYPE_UINT8 yytype_uint8;
244 #else
245 typedef unsigned char yytype_uint8;
246 #endif
247 
248 #ifdef YYTYPE_INT8
249 typedef YYTYPE_INT8 yytype_int8;
250 #elif (defined __STDC__ || defined __C99__FUNC__ \
251      || defined __cplusplus || defined _MSC_VER)
252 typedef signed char yytype_int8;
253 #else
254 typedef short int yytype_int8;
255 #endif
256 
257 #ifdef YYTYPE_UINT16
258 typedef YYTYPE_UINT16 yytype_uint16;
259 #else
260 typedef unsigned short int yytype_uint16;
261 #endif
262 
263 #ifdef YYTYPE_INT16
264 typedef YYTYPE_INT16 yytype_int16;
265 #else
266 typedef short int yytype_int16;
267 #endif
268 
269 #ifndef YYSIZE_T
270 # ifdef __SIZE_TYPE__
271 #  define YYSIZE_T __SIZE_TYPE__
272 # elif defined size_t
273 #  define YYSIZE_T size_t
274 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
275      || defined __cplusplus || defined _MSC_VER)
276 #  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
277 #  define YYSIZE_T size_t
278 # else
279 #  define YYSIZE_T unsigned int
280 # endif
281 #endif
282 
283 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
284 
285 #ifndef YY_
286 # if defined YYENABLE_NLS && YYENABLE_NLS
287 #  if ENABLE_NLS
288 #   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
289 #   define YY_(msgid) dgettext ("bison-runtime", msgid)
290 #  endif
291 # endif
292 # ifndef YY_
293 #  define YY_(msgid) msgid
294 # endif
295 #endif
296 
297 /* Suppress unused-variable warnings by "using" E.  */
298 #if ! defined lint || defined __GNUC__
299 # define YYUSE(e) ((void) (e))
300 #else
301 # define YYUSE(e) /* empty */
302 #endif
303 
304 /* Identity function, used to suppress warnings about constant conditions.  */
305 #ifndef lint
306 # define YYID(n) (n)
307 #else
308 #if (defined __STDC__ || defined __C99__FUNC__ \
309      || defined __cplusplus || defined _MSC_VER)
310 static int
YYID(int yyi)311 YYID (int yyi)
312 #else
313 static int
314 YYID (yyi)
315     int yyi;
316 #endif
317 {
318   return yyi;
319 }
320 #endif
321 
322 #if ! defined yyoverflow || YYERROR_VERBOSE
323 
324 /* The parser invokes alloca or malloc; define the necessary symbols.  */
325 
326 # ifdef YYSTACK_USE_ALLOCA
327 #  if YYSTACK_USE_ALLOCA
328 #   ifdef __GNUC__
329 #    define YYSTACK_ALLOC __builtin_alloca
330 #   elif defined __BUILTIN_VA_ARG_INCR
331 #    include <alloca.h> /* INFRINGES ON USER NAME SPACE */
332 #   elif defined _AIX
333 #    define YYSTACK_ALLOC __alloca
334 #   elif defined _MSC_VER
335 #    include <malloc.h> /* INFRINGES ON USER NAME SPACE */
336 #    define alloca _alloca
337 #   else
338 #    define YYSTACK_ALLOC alloca
339 #    if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
340      || defined __cplusplus || defined _MSC_VER)
341 #     include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
342 #     ifndef _STDLIB_H
343 #      define _STDLIB_H 1
344 #     endif
345 #    endif
346 #   endif
347 #  endif
348 # endif
349 
350 # ifdef YYSTACK_ALLOC
351    /* Pacify GCC's `empty if-body' warning.  */
352 #  define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
353 #  ifndef YYSTACK_ALLOC_MAXIMUM
354     /* The OS might guarantee only one guard page at the bottom of the stack,
355        and a page size can be as small as 4096 bytes.  So we cannot safely
356        invoke alloca (N) if N exceeds 4096.  Use a slightly smaller number
357        to allow for a few compiler-allocated temporary stack slots.  */
358 #   define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
359 #  endif
360 # else
361 #  define YYSTACK_ALLOC YYMALLOC
362 #  define YYSTACK_FREE YYFREE
363 #  ifndef YYSTACK_ALLOC_MAXIMUM
364 #   define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
365 #  endif
366 #  if (defined __cplusplus && ! defined _STDLIB_H \
367        && ! ((defined YYMALLOC || defined malloc) \
368 	     && (defined YYFREE || defined free)))
369 #   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
370 #   ifndef _STDLIB_H
371 #    define _STDLIB_H 1
372 #   endif
373 #  endif
374 #  ifndef YYMALLOC
375 #   define YYMALLOC malloc
376 #   if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
377      || defined __cplusplus || defined _MSC_VER)
378 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
379 #   endif
380 #  endif
381 #  ifndef YYFREE
382 #   define YYFREE free
383 #   if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
384      || defined __cplusplus || defined _MSC_VER)
385 void free (void *); /* INFRINGES ON USER NAME SPACE */
386 #   endif
387 #  endif
388 # endif
389 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
390 
391 
392 #if (! defined yyoverflow \
393      && (! defined __cplusplus \
394 	 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
395 
396 /* A type that is properly aligned for any stack member.  */
397 union yyalloc
398 {
399   yytype_int16 yyss_alloc;
400   YYSTYPE yyvs_alloc;
401 };
402 
403 /* The size of the maximum gap between one aligned stack and the next.  */
404 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
405 
406 /* The size of an array large to enough to hold all stacks, each with
407    N elements.  */
408 # define YYSTACK_BYTES(N) \
409      ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
410       + YYSTACK_GAP_MAXIMUM)
411 
412 /* Copy COUNT objects from FROM to TO.  The source and destination do
413    not overlap.  */
414 # ifndef YYCOPY
415 #  if defined __GNUC__ && 1 < __GNUC__
416 #   define YYCOPY(To, From, Count) \
417       __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
418 #  else
419 #   define YYCOPY(To, From, Count)		\
420       do					\
421 	{					\
422 	  YYSIZE_T yyi;				\
423 	  for (yyi = 0; yyi < (Count); yyi++)	\
424 	    (To)[yyi] = (From)[yyi];		\
425 	}					\
426       while (YYID (0))
427 #  endif
428 # endif
429 
430 /* Relocate STACK from its old location to the new one.  The
431    local variables YYSIZE and YYSTACKSIZE give the old and new number of
432    elements in the stack, and YYPTR gives the new location of the
433    stack.  Advance YYPTR to a properly aligned location for the next
434    stack.  */
435 # define YYSTACK_RELOCATE(Stack_alloc, Stack)				\
436     do									\
437       {									\
438 	YYSIZE_T yynewbytes;						\
439 	YYCOPY (&yyptr->Stack_alloc, Stack, yysize);			\
440 	Stack = &yyptr->Stack_alloc;					\
441 	yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
442 	yyptr += yynewbytes / sizeof (*yyptr);				\
443       }									\
444     while (YYID (0))
445 
446 #endif
447 
448 /* YYFINAL -- State number of the termination state.  */
449 #define YYFINAL  40
450 /* YYLAST -- Last index in YYTABLE.  */
451 #define YYLAST   383
452 
453 /* YYNTOKENS -- Number of terminals.  */
454 #define YYNTOKENS  23
455 /* YYNNTS -- Number of nonterminals.  */
456 #define YYNNTS  41
457 /* YYNRULES -- Number of rules.  */
458 #define YYNRULES  140
459 /* YYNRULES -- Number of states.  */
460 #define YYNSTATES  226
461 
462 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */
463 #define YYUNDEFTOK  2
464 #define YYMAXUTOK   277
465 
466 #define YYTRANSLATE(YYX)						\
467   ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
468 
469 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX.  */
470 static const yytype_uint8 yytranslate[] =
471 {
472        0,     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,     2,     2,     2,     2,
480        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
481        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
482        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
483        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
484        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
485        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
486        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
487        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
488        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
489        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
490        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
491        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
492        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
493        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
494        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
495        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
496        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
497        2,     2,     2,     2,     2,     2,     1,     2,     3,     4,
498        5,     6,     7,     8,     9,    10,    11,    12,    13,    14,
499       15,    16,    17,    18,    19,    20,    21,    22
500 };
501 
502 #if YYDEBUG
503 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
504    YYRHS.  */
505 static const yytype_uint16 yyprhs[] =
506 {
507        0,     0,     3,     5,     7,     9,    11,    13,    15,    18,
508       20,    24,    27,    32,    37,    41,    45,    48,    51,    56,
509       61,    65,    69,    71,    73,    76,    79,    81,    85,    88,
510       91,    93,    96,    98,   101,   103,   107,   112,   117,   121,
511      125,   129,   133,   136,   139,   144,   149,   153,   157,   159,
512      161,   164,   167,   169,   173,   176,   179,   181,   184,   186,
513      188,   191,   193,   197,   202,   207,   211,   215,   219,   223,
514      226,   229,   234,   239,   243,   247,   249,   251,   254,   257,
515      259,   263,   266,   269,   271,   274,   276,   278,   280,   283,
516      286,   292,   298,   303,   308,   310,   314,   319,   324,   328,
517      332,   336,   340,   343,   346,   351,   356,   360,   364,   366,
518      368,   371,   374,   376,   380,   383,   386,   389,   393,   398,
519      402,   404,   406,   409,   411,   413,   414,   416,   418,   419,
520      421,   424,   427,   430,   433,   435,   438,   441,   444,   447,
521      449
522 };
523 
524 /* YYRHS -- A `-1'-separated list of the rules' RHS.  */
525 static const yytype_int8 yyrhs[] =
526 {
527       24,     0,    -1,    25,    -1,     3,    -1,    26,    -1,    33,
528       -1,    47,    -1,    40,    -1,    59,    27,    -1,    28,    -1,
529       28,     8,    28,    -1,    30,    11,    -1,    28,     4,    29,
530       11,    -1,    28,     5,    29,    11,    -1,    28,     4,    11,
531       -1,    28,     5,    11,    -1,     4,    11,    -1,     5,    11,
532       -1,    28,     4,    63,    11,    -1,    28,     5,    63,    11,
533       -1,     4,    63,    11,    -1,     5,    63,    11,    -1,    29,
534       -1,    30,    -1,     4,    63,    -1,     5,    63,    -1,    31,
535       -1,    31,     6,    31,    -1,     4,    29,    -1,     5,    29,
536       -1,    32,    -1,    31,    32,    -1,    18,    -1,    61,    34,
537       -1,    35,    -1,    35,     8,    35,    -1,    35,     4,    36,
538       11,    -1,    35,     5,    36,    11,    -1,    35,     4,    11,
539       -1,    35,     5,    11,    -1,     4,    36,    11,    -1,     5,
540       36,    11,    -1,     4,    11,    -1,     5,    11,    -1,    35,
541        4,    63,    11,    -1,    35,     5,    63,    11,    -1,     4,
542       63,    11,    -1,     5,    63,    11,    -1,    36,    -1,    37,
543       -1,     4,    63,    -1,     5,    63,    -1,    38,    -1,    38,
544        6,    38,    -1,     4,    36,    -1,     5,    36,    -1,    39,
545       -1,    38,    39,    -1,    32,    -1,    19,    -1,    62,    41,
546       -1,    42,    -1,    42,     8,    42,    -1,    42,     4,    43,
547       11,    -1,    42,     5,    43,    11,    -1,    42,     4,    11,
548       -1,    42,     5,    11,    -1,     4,    43,    11,    -1,     5,
549       43,    11,    -1,     4,    11,    -1,     5,    11,    -1,    42,
550        4,    63,    11,    -1,    42,     5,    63,    11,    -1,     4,
551       63,    11,    -1,     5,    63,    11,    -1,    43,    -1,    44,
552       -1,     4,    63,    -1,     5,    63,    -1,    45,    -1,    45,
553        6,    45,    -1,     4,    43,    -1,     5,    43,    -1,    46,
554       -1,    45,    46,    -1,    56,    -1,    21,    -1,    48,    -1,
555       60,    49,    -1,    17,    50,    -1,    17,    50,     4,    51,
556       11,    -1,    17,    50,     5,    51,    11,    -1,    17,     4,
557       51,    11,    -1,    17,     5,    51,    11,    -1,    50,    -1,
558       50,     8,    50,    -1,    50,     4,    51,    11,    -1,    50,
559        5,    51,    11,    -1,    50,     4,    11,    -1,    50,     5,
560       11,    -1,     4,    51,    11,    -1,     5,    51,    11,    -1,
561        4,    11,    -1,     5,    11,    -1,    50,     4,    63,    11,
562       -1,    50,     5,    63,    11,    -1,     4,    63,    11,    -1,
563        5,    63,    11,    -1,    51,    -1,    52,    -1,     4,    63,
564       -1,     5,    63,    -1,    53,    -1,    54,     6,    54,    -1,
565        4,    51,    -1,     5,    51,    -1,    55,    58,    -1,     7,
566       55,    58,    -1,    55,     7,    55,    58,    -1,    55,     7,
567       58,    -1,    55,    -1,    56,    -1,    55,    56,    -1,    39,
568       -1,    20,    -1,    -1,    16,    -1,    17,    -1,    -1,    22,
569       -1,    12,    57,    -1,    57,    12,    -1,    14,    57,    -1,
570       57,    14,    -1,    57,    -1,    13,    57,    -1,    57,    13,
571       -1,    15,    57,    -1,    57,    15,    -1,     9,    -1,    10,
572       -1
573 };
574 
575 /* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
576 static const yytype_uint16 yyrline[] =
577 {
578        0,   143,   143,   144,   146,   146,   146,   146,   148,   151,
579      152,   153,   154,   155,   156,   157,   158,   159,   160,   161,
580      162,   163,   165,   166,   167,   168,   171,   172,   182,   183,
581      186,   187,   192,   194,   196,   197,   198,   199,   200,   201,
582      202,   203,   204,   205,   206,   207,   208,   209,   212,   213,
583      214,   215,   218,   219,   229,   230,   233,   234,   239,   240,
584      243,   245,   246,   247,   248,   249,   250,   251,   252,   253,
585      254,   255,   256,   257,   258,   261,   262,   263,   264,   267,
586      268,   278,   279,   282,   283,   288,   289,   292,   293,   298,
587      301,   308,   315,   322,   331,   332,   333,   334,   335,   336,
588      337,   338,   339,   340,   341,   342,   343,   344,   347,   348,
589      349,   350,   353,   354,   364,   365,   368,   381,   392,   416,
590      430,   432,   437,   444,   445,   448,   449,   450,   453,   454,
591      461,   462,   465,   466,   467,   470,   471,   474,   475,   478,
592      479
593 };
594 #endif
595 
596 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
597 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
598    First, the terminals, then, starting at YYNTOKENS, nonterminals.  */
599 static const char *const yytname[] =
600 {
601   "$end", "error", "$undefined", "END_OF_FILE", "PLUS", "MINUS", "SLASH",
602   "DOT", "AT", "MY_NAN", "MY_INF", "IMAG", "RADIX_2", "RADIX_8",
603   "RADIX_10", "RADIX_16", "EXACT", "INEXACT", "DIGIT_2", "DIGIT_8",
604   "DIGIT_10", "DIGIT_16", "EXPONENT_MARKER", "$accept", "top_level",
605   "datum", "num2", "complex2", "real2", "ureal2", "sreal2", "uinteger2",
606   "digit2", "num8", "complex8", "real8", "ureal8", "sreal8", "uinteger8",
607   "digit8", "num16", "complex16", "real16", "ureal16", "sreal16",
608   "uinteger16", "digit16", "num10", "inexact_complex10", "complex10",
609   "real10", "ureal10", "sreal10", "decimal10", "uinteger10",
610   "uinteger10String", "digit10", "exactness", "suffix", "prefix2",
611   "prefix10", "prefix8", "prefix16", "naninf", 0
612 };
613 #endif
614 
615 # ifdef YYPRINT
616 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
617    token YYLEX-NUM.  */
618 static const yytype_uint16 yytoknum[] =
619 {
620        0,   256,   257,   258,   259,   260,   261,   262,   263,   264,
621      265,   266,   267,   268,   269,   270,   271,   272,   273,   274,
622      275,   276,   277
623 };
624 # endif
625 
626 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
627 static const yytype_uint8 yyr1[] =
628 {
629        0,    23,    24,    24,    25,    25,    25,    25,    26,    27,
630       27,    27,    27,    27,    27,    27,    27,    27,    27,    27,
631       27,    27,    28,    28,    28,    28,    29,    29,    30,    30,
632       31,    31,    32,    33,    34,    34,    34,    34,    34,    34,
633       34,    34,    34,    34,    34,    34,    34,    34,    35,    35,
634       35,    35,    36,    36,    37,    37,    38,    38,    39,    39,
635       40,    41,    41,    41,    41,    41,    41,    41,    41,    41,
636       41,    41,    41,    41,    41,    42,    42,    42,    42,    43,
637       43,    44,    44,    45,    45,    46,    46,    47,    47,    48,
638       48,    48,    48,    48,    49,    49,    49,    49,    49,    49,
639       49,    49,    49,    49,    49,    49,    49,    49,    50,    50,
640       50,    50,    51,    51,    52,    52,    53,    53,    53,    53,
641       54,    55,    55,    56,    56,    57,    57,    57,    58,    58,
642       59,    59,    60,    60,    60,    61,    61,    62,    62,    63,
643       63
644 };
645 
646 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN.  */
647 static const yytype_uint8 yyr2[] =
648 {
649        0,     2,     1,     1,     1,     1,     1,     1,     2,     1,
650        3,     2,     4,     4,     3,     3,     2,     2,     4,     4,
651        3,     3,     1,     1,     2,     2,     1,     3,     2,     2,
652        1,     2,     1,     2,     1,     3,     4,     4,     3,     3,
653        3,     3,     2,     2,     4,     4,     3,     3,     1,     1,
654        2,     2,     1,     3,     2,     2,     1,     2,     1,     1,
655        2,     1,     3,     4,     4,     3,     3,     3,     3,     2,
656        2,     4,     4,     3,     3,     1,     1,     2,     2,     1,
657        3,     2,     2,     1,     2,     1,     1,     1,     2,     2,
658        5,     5,     4,     4,     1,     3,     4,     4,     3,     3,
659        3,     3,     2,     2,     4,     4,     3,     3,     1,     1,
660        2,     2,     1,     3,     2,     2,     2,     3,     4,     3,
661        1,     1,     2,     1,     1,     0,     1,     1,     0,     1,
662        2,     2,     2,     2,     1,     2,     2,     2,     2,     1,
663        1
664 };
665 
666 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
667    STATE-NUM when YYTABLE doesn't specify something else to do.  Zero
668    means the default is an error.  */
669 static const yytype_uint8 yydefact[] =
670 {
671      125,     3,   125,   125,   125,   125,   126,   127,     0,     2,
672        4,     5,     7,     6,    87,   134,     0,     0,     0,     0,
673      127,   130,   135,   132,   137,     0,     0,     0,    32,    59,
674      124,    58,   123,    89,   108,   109,   112,     0,   128,   121,
675        1,   131,   136,   133,   138,     0,     0,     8,     9,    22,
676       23,    26,    30,     0,     0,    88,    94,     0,     0,    33,
677       34,    48,    49,    52,    56,     0,     0,    86,    60,    61,
678       75,    76,    79,    83,    85,   139,   140,   114,   110,   115,
679      111,   128,     0,     0,     0,   128,   129,   122,   116,    16,
680       28,    24,    17,    29,    25,     0,     0,     0,    11,     0,
681       31,   102,   114,   110,   103,   115,   111,     0,     0,     0,
682       42,    54,    50,    43,    55,    51,     0,     0,     0,     0,
683       57,    69,    81,    77,    70,    82,    78,     0,     0,     0,
684        0,    84,    92,    93,   117,     0,     0,   113,   120,   128,
685      119,    20,    21,    14,     0,     0,    15,     0,     0,     0,
686        0,    10,    23,    27,   100,   106,   101,   107,    98,     0,
687        0,    99,     0,     0,     0,     0,    95,    40,    46,    41,
688       47,    38,     0,     0,    39,     0,     0,     0,     0,    35,
689       53,    67,    73,    68,    74,    65,     0,     0,    66,     0,
690        0,     0,     0,    62,    80,    90,    91,   118,    12,    18,
691       13,    19,    24,    25,    96,   104,    97,   105,   114,   115,
692       36,    44,    37,    45,    54,    50,    55,    51,    63,    71,
693       64,    72,    81,    77,    82,    78
694 };
695 
696 /* YYDEFGOTO[NTERM-NUM].  */
697 static const yytype_int8 yydefgoto[] =
698 {
699       -1,     8,     9,    10,    47,    48,    49,    50,    51,    31,
700       11,    59,    60,    61,    62,    63,    32,    12,    68,    69,
701       70,    71,    72,    73,    13,    14,    55,    33,    34,    35,
702       36,    37,    38,    39,    15,    88,    16,    17,    18,    19,
703       78
704 };
705 
706 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
707    STATE-NUM.  */
708 #define YYPACT_NINF -67
709 static const yytype_int16 yypact[] =
710 {
711      194,   -67,    90,    90,    90,    90,   -67,   164,     8,   -67,
712      -67,   -67,   -67,   -67,   -67,   359,   100,   181,    59,   139,
713      -67,   -67,   -67,   -67,   -67,   243,   243,   103,   -67,   -67,
714      -67,   -67,   -67,   134,   -67,   -67,   -67,     6,    17,   -67,
715      -67,   -67,   -67,   -67,   -67,    78,   327,   -67,   141,   -67,
716        4,     7,   -67,   205,   210,   -67,   355,   297,   308,   -67,
717      357,   -67,   -67,   248,   -67,   259,   263,   -67,   -67,   362,
718      -67,   -67,    36,   -67,   -67,   -67,   -67,    27,   -67,    34,
719      -67,   334,   238,   238,   103,   334,   -67,   -67,   -67,   -67,
720      -67,    37,   -67,   -67,    41,   330,   340,   111,   -67,     9,
721      -67,   -67,    47,    50,   -67,    54,    61,   224,   229,   185,
722      -67,    70,    75,   -67,    79,    87,   311,   314,   108,   146,
723      -67,   -67,   106,   145,   -67,   150,   159,   276,   280,   158,
724      358,   -67,   -67,   -67,   -67,   163,   169,   -67,   103,   334,
725      -67,   -67,   -67,   -67,   170,   176,   -67,   180,   184,     0,
726        0,   -67,   -67,     9,   -67,   -67,   -67,   -67,   -67,   187,
727      191,   -67,   202,   207,   243,   243,   -67,   -67,   -67,   -67,
728      -67,   -67,   211,   215,   -67,   216,   221,   325,   325,   -67,
729      146,   -67,   -67,   -67,   -67,   -67,   226,   230,   -67,   235,
730      240,   293,   293,   -67,   358,   -67,   -67,   -67,   -67,   -67,
731      -67,   -67,   -67,   -67,   -67,   -67,   -67,   -67,   -67,   -67,
732      -67,   -67,   -67,   -67,   -67,   -67,   -67,   -67,   -67,   -67,
733      -67,   -67,   -67,   -67,   -67,   -67
734 };
735 
736 /* YYPGOTO[NTERM-NUM].  */
737 static const yytype_int16 yypgoto[] =
738 {
739      -67,   -67,   -67,   -67,   -67,    53,     5,   162,    15,    -2,
740      -67,   -67,   137,   -41,   -67,   152,    16,   -67,   -67,   131,
741      -61,   -67,   135,   -66,   -67,   -67,   -67,   -10,   -23,   -67,
742      -67,   192,   -16,   -19,   378,   -59,   -67,   -67,   -67,   -67,
743      -25
744 };
745 
746 /* YYTABLE[YYPACT[STATE-NUM]].  What to do in state STATE-NUM.  If
747    positive, shift that token.  If negative, reduce the rule which
748    number is the opposite.  If zero, do what YYDEFACT says.
749    If YYTABLE_NINF, syntax error.  */
750 #define YYTABLE_NINF -121
751 static const yytype_int16 yytable[] =
752 {
753       74,    80,    77,    79,   122,   125,   131,    56,    40,    75,
754       76,    81,    84,    99,    52,    98,   111,   114,    28,    87,
755       91,    94,   134,  -120,    85,    28,   140,    28,   103,   106,
756      102,   105,   112,   115,    64,    28,    29,    30,   132,    86,
757      123,   126,   130,    52,    52,   133,    74,    74,   141,   100,
758       90,    93,   142,    74,    28,    29,    30,    67,   154,   135,
759      136,   155,    87,    57,    58,   156,   186,   189,   138,   139,
760      145,   148,   157,    64,    64,   172,   175,    28,    29,   120,
761      197,   167,   160,   163,   159,   162,   168,    75,    76,    89,
762      169,   173,   176,    52,    52,    52,    28,    52,   170,   166,
763      144,   147,   187,   190,    45,    46,     6,    20,    74,    74,
764       74,    74,   177,   178,   153,   149,   150,   181,    28,    87,
765       87,    28,    29,    30,   202,   203,    28,    29,   131,    28,
766      222,   224,    64,    64,    64,    64,   214,   216,    82,    83,
767       80,   208,   209,    65,    66,    95,    96,    52,    52,    97,
768      151,   100,   215,   217,    90,    93,   182,    28,    29,    30,
769       67,   183,   191,   192,    28,    29,   223,   225,    25,    26,
770      184,    27,    74,    74,   195,    74,    28,    29,    30,    67,
771      196,   198,    28,    29,    30,    53,    54,   199,    27,   164,
772      165,   200,    27,    64,    64,   201,   120,     1,   204,    28,
773       29,    30,   205,    28,    29,    30,     2,     3,     4,     5,
774        6,     7,    27,   206,    75,    76,   101,    27,   207,    75,
775       76,   104,   210,    28,    29,    30,   211,   212,    28,    29,
776       30,    27,   213,    75,    76,   158,    27,   218,    75,    76,
777      161,   219,    28,    29,    30,    27,   220,    28,    29,    30,
778       27,   221,    75,    76,   119,   179,    28,    29,    30,   152,
779      193,    28,    29,    30,     0,   194,    28,    29,    75,    76,
780      121,   180,    75,    76,   124,     0,   137,    28,    29,    30,
781       67,    28,    29,    30,    67,    75,    76,   185,     0,    75,
782       76,   188,     0,     0,    28,    29,    30,    67,    28,    29,
783       30,    67,    75,    76,     0,     0,    75,    76,   110,     0,
784        0,    28,    29,    30,    67,    28,    29,    75,    76,   113,
785       75,    76,   171,    75,    76,   174,    28,    29,     0,    28,
786       29,     0,    28,    29,    75,    76,    75,    76,    92,    75,
787       76,   143,     0,    28,    29,    28,     0,     0,    28,    75,
788       76,   146,    28,    29,    30,     0,    86,     0,    28,   107,
789      108,   116,   117,   109,     0,   118,   127,   128,     0,     0,
790      129,    41,    42,    43,    44,     0,    28,    29,    30,    67,
791       21,    22,    23,    24
792 };
793 
794 static const yytype_int16 yycheck[] =
795 {
796       19,    26,    25,    26,    65,    66,    72,    17,     0,     9,
797       10,    27,     6,     6,    16,    11,    57,    58,    18,    38,
798       45,    46,    81,     6,     7,    18,    85,    18,    53,    54,
799       53,    54,    57,    58,    18,    18,    19,    20,    11,    22,
800       65,    66,     6,    45,    46,    11,    65,    66,    11,    51,
801       45,    46,    11,    72,    18,    19,    20,    21,    11,    82,
802       83,    11,    81,     4,     5,    11,   127,   128,    84,    85,
803       95,    96,    11,    57,    58,   116,   117,    18,    19,    63,
804      139,    11,   107,   108,   107,   108,    11,     9,    10,    11,
805       11,   116,   117,    95,    96,    97,    18,    99,    11,   109,
806       95,    96,   127,   128,     4,     5,    16,    17,   127,   128,
807      129,   130,     4,     5,    99,     4,     5,    11,    18,   138,
808      139,    18,    19,    20,   149,   150,    18,    19,   194,    18,
809      191,   192,   116,   117,   118,   119,   177,   178,     4,     5,
810      165,   164,   165,     4,     5,     4,     5,   149,   150,     8,
811       97,   153,   177,   178,   149,   150,    11,    18,    19,    20,
812       21,    11,     4,     5,    18,    19,   191,   192,     4,     5,
813       11,     7,   191,   192,    11,   194,    18,    19,    20,    21,
814       11,    11,    18,    19,    20,     4,     5,    11,     7,     4,
815        5,    11,     7,   177,   178,    11,   180,     3,    11,    18,
816       19,    20,    11,    18,    19,    20,    12,    13,    14,    15,
817       16,    17,     7,    11,     9,    10,    11,     7,    11,     9,
818       10,    11,    11,    18,    19,    20,    11,    11,    18,    19,
819       20,     7,    11,     9,    10,    11,     7,    11,     9,    10,
820       11,    11,    18,    19,    20,     7,    11,    18,    19,    20,
821        7,    11,     9,    10,     6,   118,    18,    19,    20,    97,
822      129,    18,    19,    20,    -1,   130,    18,    19,     9,    10,
823       11,   119,     9,    10,    11,    -1,    84,    18,    19,    20,
824       21,    18,    19,    20,    21,     9,    10,    11,    -1,     9,
825       10,    11,    -1,    -1,    18,    19,    20,    21,    18,    19,
826       20,    21,     9,    10,    -1,    -1,     9,    10,    11,    -1,
827       -1,    18,    19,    20,    21,    18,    19,     9,    10,    11,
828        9,    10,    11,     9,    10,    11,    18,    19,    -1,    18,
829       19,    -1,    18,    19,     9,    10,     9,    10,    11,     9,
830       10,    11,    -1,    18,    19,    18,    -1,    -1,    18,     9,
831       10,    11,    18,    19,    20,    -1,    22,    -1,    18,     4,
832        5,     4,     5,     8,    -1,     8,     4,     5,    -1,    -1,
833        8,    12,    13,    14,    15,    -1,    18,    19,    20,    21,
834        2,     3,     4,     5
835 };
836 
837 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
838    symbol of state STATE-NUM.  */
839 static const yytype_uint8 yystos[] =
840 {
841        0,     3,    12,    13,    14,    15,    16,    17,    24,    25,
842       26,    33,    40,    47,    48,    57,    59,    60,    61,    62,
843       17,    57,    57,    57,    57,     4,     5,     7,    18,    19,
844       20,    32,    39,    50,    51,    52,    53,    54,    55,    56,
845        0,    12,    13,    14,    15,     4,     5,    27,    28,    29,
846       30,    31,    32,     4,     5,    49,    50,     4,     5,    34,
847       35,    36,    37,    38,    39,     4,     5,    21,    41,    42,
848       43,    44,    45,    46,    56,     9,    10,    51,    63,    51,
849       63,    55,     4,     5,     6,     7,    22,    56,    58,    11,
850       29,    63,    11,    29,    63,     4,     5,     8,    11,     6,
851       32,    11,    51,    63,    11,    51,    63,     4,     5,     8,
852       11,    36,    63,    11,    36,    63,     4,     5,     8,     6,
853       39,    11,    43,    63,    11,    43,    63,     4,     5,     8,
854        6,    46,    11,    11,    58,    51,    51,    54,    55,    55,
855       58,    11,    11,    11,    29,    63,    11,    29,    63,     4,
856        5,    28,    30,    31,    11,    11,    11,    11,    11,    51,
857       63,    11,    51,    63,     4,     5,    50,    11,    11,    11,
858       11,    11,    36,    63,    11,    36,    63,     4,     5,    35,
859       38,    11,    11,    11,    11,    11,    43,    63,    11,    43,
860       63,     4,     5,    42,    45,    11,    11,    58,    11,    11,
861       11,    11,    63,    63,    11,    11,    11,    11,    51,    51,
862       11,    11,    11,    11,    36,    63,    36,    63,    11,    11,
863       11,    11,    43,    63,    43,    63
864 };
865 
866 #define yyerrok		(yyerrstatus = 0)
867 #define yyclearin	(yychar = YYEMPTY)
868 #define YYEMPTY		(-2)
869 #define YYEOF		0
870 
871 #define YYACCEPT	goto yyacceptlab
872 #define YYABORT		goto yyabortlab
873 #define YYERROR		goto yyerrorlab
874 
875 
876 /* Like YYERROR except do call yyerror.  This remains here temporarily
877    to ease the transition to the new meaning of YYERROR, for GCC.
878    Once GCC version 2 has supplanted version 1, this can go.  However,
879    YYFAIL appears to be in use.  Nevertheless, it is formally deprecated
880    in Bison 2.4.2's NEWS entry, where a plan to phase it out is
881    discussed.  */
882 
883 #define YYFAIL		goto yyerrlab
884 #if defined YYFAIL
885   /* This is here to suppress warnings from the GCC cpp's
886      -Wunused-macros.  Normally we don't worry about that warning, but
887      some users do, and we want to make it easy for users to remove
888      YYFAIL uses, which will produce warnings from Bison 2.5.  */
889 #endif
890 
891 #define YYRECOVERING()  (!!yyerrstatus)
892 
893 #define YYBACKUP(Token, Value)					\
894 do								\
895   if (yychar == YYEMPTY && yylen == 1)				\
896     {								\
897       yychar = (Token);						\
898       yylval = (Value);						\
899       yytoken = YYTRANSLATE (yychar);				\
900       YYPOPSTACK (1);						\
901       goto yybackup;						\
902     }								\
903   else								\
904     {								\
905       yyerror (YY_("syntax error: cannot back up")); \
906       YYERROR;							\
907     }								\
908 while (YYID (0))
909 
910 
911 #define YYTERROR	1
912 #define YYERRCODE	256
913 
914 
915 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
916    If N is 0, then set CURRENT to the empty location which ends
917    the previous symbol: RHS[0] (always defined).  */
918 
919 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
920 #ifndef YYLLOC_DEFAULT
921 # define YYLLOC_DEFAULT(Current, Rhs, N)				\
922     do									\
923       if (YYID (N))                                                    \
924 	{								\
925 	  (Current).first_line   = YYRHSLOC (Rhs, 1).first_line;	\
926 	  (Current).first_column = YYRHSLOC (Rhs, 1).first_column;	\
927 	  (Current).last_line    = YYRHSLOC (Rhs, N).last_line;		\
928 	  (Current).last_column  = YYRHSLOC (Rhs, N).last_column;	\
929 	}								\
930       else								\
931 	{								\
932 	  (Current).first_line   = (Current).last_line   =		\
933 	    YYRHSLOC (Rhs, 0).last_line;				\
934 	  (Current).first_column = (Current).last_column =		\
935 	    YYRHSLOC (Rhs, 0).last_column;				\
936 	}								\
937     while (YYID (0))
938 #endif
939 
940 
941 /* YY_LOCATION_PRINT -- Print the location on the stream.
942    This macro was not mandated originally: define only if we know
943    we won't break user code: when these are the locations we know.  */
944 
945 #ifndef YY_LOCATION_PRINT
946 # if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
947 #  define YY_LOCATION_PRINT(File, Loc)			\
948      fprintf (File, "%d.%d-%d.%d",			\
949 	      (Loc).first_line, (Loc).first_column,	\
950 	      (Loc).last_line,  (Loc).last_column)
951 # else
952 #  define YY_LOCATION_PRINT(File, Loc) ((void) 0)
953 # endif
954 #endif
955 
956 
957 /* YYLEX -- calling `yylex' with the right arguments.  */
958 
959 #ifdef YYLEX_PARAM
960 # define YYLEX yylex (&yylval, YYLEX_PARAM)
961 #else
962 # define YYLEX yylex (&yylval)
963 #endif
964 
965 /* Enable debugging if requested.  */
966 #if YYDEBUG
967 
968 # ifndef YYFPRINTF
969 #  include <stdio.h> /* INFRINGES ON USER NAME SPACE */
970 #  define YYFPRINTF fprintf
971 # endif
972 
973 # define YYDPRINTF(Args)			\
974 do {						\
975   if (yydebug)					\
976     YYFPRINTF Args;				\
977 } while (YYID (0))
978 
979 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)			  \
980 do {									  \
981   if (yydebug)								  \
982     {									  \
983       YYFPRINTF (stderr, "%s ", Title);					  \
984       yy_symbol_print (stderr,						  \
985 		  Type, Value); \
986       YYFPRINTF (stderr, "\n");						  \
987     }									  \
988 } while (YYID (0))
989 
990 
991 /*--------------------------------.
992 | Print this symbol on YYOUTPUT.  |
993 `--------------------------------*/
994 
995 /*ARGSUSED*/
996 #if (defined __STDC__ || defined __C99__FUNC__ \
997      || defined __cplusplus || defined _MSC_VER)
998 static void
yy_symbol_value_print(FILE * yyoutput,int yytype,YYSTYPE const * const yyvaluep)999 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
1000 #else
1001 static void
1002 yy_symbol_value_print (yyoutput, yytype, yyvaluep)
1003     FILE *yyoutput;
1004     int yytype;
1005     YYSTYPE const * const yyvaluep;
1006 #endif
1007 {
1008   if (!yyvaluep)
1009     return;
1010 # ifdef YYPRINT
1011   if (yytype < YYNTOKENS)
1012     YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
1013 # else
1014   YYUSE (yyoutput);
1015 # endif
1016   switch (yytype)
1017     {
1018       default:
1019 	break;
1020     }
1021 }
1022 
1023 
1024 /*--------------------------------.
1025 | Print this symbol on YYOUTPUT.  |
1026 `--------------------------------*/
1027 
1028 #if (defined __STDC__ || defined __C99__FUNC__ \
1029      || defined __cplusplus || defined _MSC_VER)
1030 static void
yy_symbol_print(FILE * yyoutput,int yytype,YYSTYPE const * const yyvaluep)1031 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
1032 #else
1033 static void
1034 yy_symbol_print (yyoutput, yytype, yyvaluep)
1035     FILE *yyoutput;
1036     int yytype;
1037     YYSTYPE const * const yyvaluep;
1038 #endif
1039 {
1040   if (yytype < YYNTOKENS)
1041     YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
1042   else
1043     YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
1044 
1045   yy_symbol_value_print (yyoutput, yytype, yyvaluep);
1046   YYFPRINTF (yyoutput, ")");
1047 }
1048 
1049 /*------------------------------------------------------------------.
1050 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
1051 | TOP (included).                                                   |
1052 `------------------------------------------------------------------*/
1053 
1054 #if (defined __STDC__ || defined __C99__FUNC__ \
1055      || defined __cplusplus || defined _MSC_VER)
1056 static void
yy_stack_print(yytype_int16 * yybottom,yytype_int16 * yytop)1057 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
1058 #else
1059 static void
1060 yy_stack_print (yybottom, yytop)
1061     yytype_int16 *yybottom;
1062     yytype_int16 *yytop;
1063 #endif
1064 {
1065   YYFPRINTF (stderr, "Stack now");
1066   for (; yybottom <= yytop; yybottom++)
1067     {
1068       int yybot = *yybottom;
1069       YYFPRINTF (stderr, " %d", yybot);
1070     }
1071   YYFPRINTF (stderr, "\n");
1072 }
1073 
1074 # define YY_STACK_PRINT(Bottom, Top)				\
1075 do {								\
1076   if (yydebug)							\
1077     yy_stack_print ((Bottom), (Top));				\
1078 } while (YYID (0))
1079 
1080 
1081 /*------------------------------------------------.
1082 | Report that the YYRULE is going to be reduced.  |
1083 `------------------------------------------------*/
1084 
1085 #if (defined __STDC__ || defined __C99__FUNC__ \
1086      || defined __cplusplus || defined _MSC_VER)
1087 static void
yy_reduce_print(YYSTYPE * yyvsp,int yyrule)1088 yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
1089 #else
1090 static void
1091 yy_reduce_print (yyvsp, yyrule)
1092     YYSTYPE *yyvsp;
1093     int yyrule;
1094 #endif
1095 {
1096   int yynrhs = yyr2[yyrule];
1097   int yyi;
1098   unsigned long int yylno = yyrline[yyrule];
1099   YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
1100 	     yyrule - 1, yylno);
1101   /* The symbols being reduced.  */
1102   for (yyi = 0; yyi < yynrhs; yyi++)
1103     {
1104       YYFPRINTF (stderr, "   $%d = ", yyi + 1);
1105       yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
1106 		       &(yyvsp[(yyi + 1) - (yynrhs)])
1107 		       		       );
1108       YYFPRINTF (stderr, "\n");
1109     }
1110 }
1111 
1112 # define YY_REDUCE_PRINT(Rule)		\
1113 do {					\
1114   if (yydebug)				\
1115     yy_reduce_print (yyvsp, Rule); \
1116 } while (YYID (0))
1117 
1118 /* Nonzero means print parse trace.  It is left uninitialized so that
1119    multiple parsers can coexist.  */
1120 int yydebug;
1121 #else /* !YYDEBUG */
1122 # define YYDPRINTF(Args)
1123 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
1124 # define YY_STACK_PRINT(Bottom, Top)
1125 # define YY_REDUCE_PRINT(Rule)
1126 #endif /* !YYDEBUG */
1127 
1128 
1129 /* YYINITDEPTH -- initial size of the parser's stacks.  */
1130 #ifndef	YYINITDEPTH
1131 # define YYINITDEPTH 200
1132 #endif
1133 
1134 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1135    if the built-in stack extension method is used).
1136 
1137    Do not make this value too large; the results are undefined if
1138    YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
1139    evaluated with infinite-precision integer arithmetic.  */
1140 
1141 #ifndef YYMAXDEPTH
1142 # define YYMAXDEPTH 10000
1143 #endif
1144 
1145 
1146 
1147 #if YYERROR_VERBOSE
1148 
1149 # ifndef yystrlen
1150 #  if defined __GLIBC__ && defined _STRING_H
1151 #   define yystrlen strlen
1152 #  else
1153 /* Return the length of YYSTR.  */
1154 #if (defined __STDC__ || defined __C99__FUNC__ \
1155      || defined __cplusplus || defined _MSC_VER)
1156 static YYSIZE_T
yystrlen(const char * yystr)1157 yystrlen (const char *yystr)
1158 #else
1159 static YYSIZE_T
1160 yystrlen (yystr)
1161     const char *yystr;
1162 #endif
1163 {
1164   YYSIZE_T yylen;
1165   for (yylen = 0; yystr[yylen]; yylen++)
1166     continue;
1167   return yylen;
1168 }
1169 #  endif
1170 # endif
1171 
1172 # ifndef yystpcpy
1173 #  if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
1174 #   define yystpcpy stpcpy
1175 #  else
1176 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1177    YYDEST.  */
1178 #if (defined __STDC__ || defined __C99__FUNC__ \
1179      || defined __cplusplus || defined _MSC_VER)
1180 static char *
yystpcpy(char * yydest,const char * yysrc)1181 yystpcpy (char *yydest, const char *yysrc)
1182 #else
1183 static char *
1184 yystpcpy (yydest, yysrc)
1185     char *yydest;
1186     const char *yysrc;
1187 #endif
1188 {
1189   char *yyd = yydest;
1190   const char *yys = yysrc;
1191 
1192   while ((*yyd++ = *yys++) != '\0')
1193     continue;
1194 
1195   return yyd - 1;
1196 }
1197 #  endif
1198 # endif
1199 
1200 # ifndef yytnamerr
1201 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
1202    quotes and backslashes, so that it's suitable for yyerror.  The
1203    heuristic is that double-quoting is unnecessary unless the string
1204    contains an apostrophe, a comma, or backslash (other than
1205    backslash-backslash).  YYSTR is taken from yytname.  If YYRES is
1206    null, do not copy; instead, return the length of what the result
1207    would have been.  */
1208 static YYSIZE_T
yytnamerr(char * yyres,const char * yystr)1209 yytnamerr (char *yyres, const char *yystr)
1210 {
1211   if (*yystr == '"')
1212     {
1213       YYSIZE_T yyn = 0;
1214       char const *yyp = yystr;
1215 
1216       for (;;)
1217 	switch (*++yyp)
1218 	  {
1219 	  case '\'':
1220 	  case ',':
1221 	    goto do_not_strip_quotes;
1222 
1223 	  case '\\':
1224 	    if (*++yyp != '\\')
1225 	      goto do_not_strip_quotes;
1226 	    /* Fall through.  */
1227 	  default:
1228 	    if (yyres)
1229 	      yyres[yyn] = *yyp;
1230 	    yyn++;
1231 	    break;
1232 
1233 	  case '"':
1234 	    if (yyres)
1235 	      yyres[yyn] = '\0';
1236 	    return yyn;
1237 	  }
1238     do_not_strip_quotes: ;
1239     }
1240 
1241   if (! yyres)
1242     return yystrlen (yystr);
1243 
1244   return yystpcpy (yyres, yystr) - yyres;
1245 }
1246 # endif
1247 
1248 /* Copy into YYRESULT an error message about the unexpected token
1249    YYCHAR while in state YYSTATE.  Return the number of bytes copied,
1250    including the terminating null byte.  If YYRESULT is null, do not
1251    copy anything; just return the number of bytes that would be
1252    copied.  As a special case, return 0 if an ordinary "syntax error"
1253    message will do.  Return YYSIZE_MAXIMUM if overflow occurs during
1254    size calculation.  */
1255 static YYSIZE_T
yysyntax_error(char * yyresult,int yystate,int yychar)1256 yysyntax_error (char *yyresult, int yystate, int yychar)
1257 {
1258   int yyn = yypact[yystate];
1259 
1260   if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
1261     return 0;
1262   else
1263     {
1264       int yytype = YYTRANSLATE (yychar);
1265       YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
1266       YYSIZE_T yysize = yysize0;
1267       YYSIZE_T yysize1;
1268       int yysize_overflow = 0;
1269       enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1270       char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1271       int yyx;
1272 
1273 # if 0
1274       /* This is so xgettext sees the translatable formats that are
1275 	 constructed on the fly.  */
1276       YY_("syntax error, unexpected %s");
1277       YY_("syntax error, unexpected %s, expecting %s");
1278       YY_("syntax error, unexpected %s, expecting %s or %s");
1279       YY_("syntax error, unexpected %s, expecting %s or %s or %s");
1280       YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
1281 # endif
1282       char *yyfmt;
1283       char const *yyf;
1284       static char const yyunexpected[] = "syntax error, unexpected %s";
1285       static char const yyexpecting[] = ", expecting %s";
1286       static char const yyor[] = " or %s";
1287       char yyformat[sizeof yyunexpected
1288 		    + sizeof yyexpecting - 1
1289 		    + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
1290 		       * (sizeof yyor - 1))];
1291       char const *yyprefix = yyexpecting;
1292 
1293       /* Start YYX at -YYN if negative to avoid negative indexes in
1294 	 YYCHECK.  */
1295       int yyxbegin = yyn < 0 ? -yyn : 0;
1296 
1297       /* Stay within bounds of both yycheck and yytname.  */
1298       int yychecklim = YYLAST - yyn + 1;
1299       int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1300       int yycount = 1;
1301 
1302       yyarg[0] = yytname[yytype];
1303       yyfmt = yystpcpy (yyformat, yyunexpected);
1304 
1305       for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1306 	if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
1307 	  {
1308 	    if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1309 	      {
1310 		yycount = 1;
1311 		yysize = yysize0;
1312 		yyformat[sizeof yyunexpected - 1] = '\0';
1313 		break;
1314 	      }
1315 	    yyarg[yycount++] = yytname[yyx];
1316 	    yysize1 = yysize + yytnamerr (0, yytname[yyx]);
1317 	    yysize_overflow |= (yysize1 < yysize);
1318 	    yysize = yysize1;
1319 	    yyfmt = yystpcpy (yyfmt, yyprefix);
1320 	    yyprefix = yyor;
1321 	  }
1322 
1323       yyf = YY_(yyformat);
1324       yysize1 = yysize + yystrlen (yyf);
1325       yysize_overflow |= (yysize1 < yysize);
1326       yysize = yysize1;
1327 
1328       if (yysize_overflow)
1329 	return YYSIZE_MAXIMUM;
1330 
1331       if (yyresult)
1332 	{
1333 	  /* Avoid sprintf, as that infringes on the user's name space.
1334 	     Don't have undefined behavior even if the translation
1335 	     produced a string with the wrong number of "%s"s.  */
1336 	  char *yyp = yyresult;
1337 	  int yyi = 0;
1338 	  while ((*yyp = *yyf) != '\0')
1339 	    {
1340 	      if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
1341 		{
1342 		  yyp += yytnamerr (yyp, yyarg[yyi++]);
1343 		  yyf += 2;
1344 		}
1345 	      else
1346 		{
1347 		  yyp++;
1348 		  yyf++;
1349 		}
1350 	    }
1351 	}
1352       return yysize;
1353     }
1354 }
1355 #endif /* YYERROR_VERBOSE */
1356 
1357 
1358 /*-----------------------------------------------.
1359 | Release the memory associated to this symbol.  |
1360 `-----------------------------------------------*/
1361 
1362 /*ARGSUSED*/
1363 #if (defined __STDC__ || defined __C99__FUNC__ \
1364      || defined __cplusplus || defined _MSC_VER)
1365 static void
yydestruct(const char * yymsg,int yytype,YYSTYPE * yyvaluep)1366 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
1367 #else
1368 static void
1369 yydestruct (yymsg, yytype, yyvaluep)
1370     const char *yymsg;
1371     int yytype;
1372     YYSTYPE *yyvaluep;
1373 #endif
1374 {
1375   YYUSE (yyvaluep);
1376 
1377   if (!yymsg)
1378     yymsg = "Deleting";
1379   YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1380 
1381   switch (yytype)
1382     {
1383 
1384       default:
1385 	break;
1386     }
1387 }
1388 
1389 /* Prevent warnings from -Wmissing-prototypes.  */
1390 #ifdef YYPARSE_PARAM
1391 #if defined __STDC__ || defined __cplusplus
1392 int yyparse (void *YYPARSE_PARAM);
1393 #else
1394 int yyparse ();
1395 #endif
1396 #else /* ! YYPARSE_PARAM */
1397 #if defined __STDC__ || defined __cplusplus
1398 int yyparse (void);
1399 #else
1400 int yyparse ();
1401 #endif
1402 #endif /* ! YYPARSE_PARAM */
1403 
1404 
1405 
1406 
1407 
1408 /*-------------------------.
1409 | yyparse or yypush_parse.  |
1410 `-------------------------*/
1411 
1412 #ifdef YYPARSE_PARAM
1413 #if (defined __STDC__ || defined __C99__FUNC__ \
1414      || defined __cplusplus || defined _MSC_VER)
1415 int
yyparse(void * YYPARSE_PARAM)1416 yyparse (void *YYPARSE_PARAM)
1417 #else
1418 int
1419 yyparse (YYPARSE_PARAM)
1420     void *YYPARSE_PARAM;
1421 #endif
1422 #else /* ! YYPARSE_PARAM */
1423 #if (defined __STDC__ || defined __C99__FUNC__ \
1424      || defined __cplusplus || defined _MSC_VER)
1425 int
1426 yyparse (void)
1427 #else
1428 int
1429 yyparse ()
1430 
1431 #endif
1432 #endif
1433 {
1434 /* The lookahead symbol.  */
1435 int yychar;
1436 
1437 /* The semantic value of the lookahead symbol.  */
1438 YYSTYPE yylval;
1439 
1440     /* Number of syntax errors so far.  */
1441     int yynerrs;
1442 
1443     int yystate;
1444     /* Number of tokens to shift before error messages enabled.  */
1445     int yyerrstatus;
1446 
1447     /* The stacks and their tools:
1448        `yyss': related to states.
1449        `yyvs': related to semantic values.
1450 
1451        Refer to the stacks thru separate pointers, to allow yyoverflow
1452        to reallocate them elsewhere.  */
1453 
1454     /* The state stack.  */
1455     yytype_int16 yyssa[YYINITDEPTH];
1456     yytype_int16 *yyss;
1457     yytype_int16 *yyssp;
1458 
1459     /* The semantic value stack.  */
1460     YYSTYPE yyvsa[YYINITDEPTH];
1461     YYSTYPE *yyvs;
1462     YYSTYPE *yyvsp;
1463 
1464     YYSIZE_T yystacksize;
1465 
1466   int yyn;
1467   int yyresult;
1468   /* Lookahead token as an internal (translated) token number.  */
1469   int yytoken;
1470   /* The variables used to return semantic value and location from the
1471      action routines.  */
1472   YYSTYPE yyval;
1473 
1474 #if YYERROR_VERBOSE
1475   /* Buffer for error messages, and its allocated size.  */
1476   char yymsgbuf[128];
1477   char *yymsg = yymsgbuf;
1478   YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
1479 #endif
1480 
1481 #define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N))
1482 
1483   /* The number of symbols on the RHS of the reduced rule.
1484      Keep to zero when no symbol should be popped.  */
1485   int yylen = 0;
1486 
1487   yytoken = 0;
1488   yyss = yyssa;
1489   yyvs = yyvsa;
1490   yystacksize = YYINITDEPTH;
1491 
1492   YYDPRINTF ((stderr, "Starting parse\n"));
1493 
1494   yystate = 0;
1495   yyerrstatus = 0;
1496   yynerrs = 0;
1497   yychar = YYEMPTY; /* Cause a token to be read.  */
1498 
1499   /* Initialize stack pointers.
1500      Waste one element of value and location stack
1501      so that they stay on the same level as the state stack.
1502      The wasted elements are never initialized.  */
1503   yyssp = yyss;
1504   yyvsp = yyvs;
1505 
1506   goto yysetstate;
1507 
1508 /*------------------------------------------------------------.
1509 | yynewstate -- Push a new state, which is found in yystate.  |
1510 `------------------------------------------------------------*/
1511  yynewstate:
1512   /* In all cases, when you get here, the value and location stacks
1513      have just been pushed.  So pushing a state here evens the stacks.  */
1514   yyssp++;
1515 
1516  yysetstate:
1517   *yyssp = yystate;
1518 
1519   if (yyss + yystacksize - 1 <= yyssp)
1520     {
1521       /* Get the current used size of the three stacks, in elements.  */
1522       YYSIZE_T yysize = yyssp - yyss + 1;
1523 
1524 #ifdef yyoverflow
1525       {
1526 	/* Give user a chance to reallocate the stack.  Use copies of
1527 	   these so that the &'s don't force the real ones into
1528 	   memory.  */
1529 	YYSTYPE *yyvs1 = yyvs;
1530 	yytype_int16 *yyss1 = yyss;
1531 
1532 	/* Each stack pointer address is followed by the size of the
1533 	   data in use in that stack, in bytes.  This used to be a
1534 	   conditional around just the two extra args, but that might
1535 	   be undefined if yyoverflow is a macro.  */
1536 	yyoverflow (YY_("memory exhausted"),
1537 		    &yyss1, yysize * sizeof (*yyssp),
1538 		    &yyvs1, yysize * sizeof (*yyvsp),
1539 		    &yystacksize);
1540 
1541 	yyss = yyss1;
1542 	yyvs = yyvs1;
1543       }
1544 #else /* no yyoverflow */
1545 # ifndef YYSTACK_RELOCATE
1546       goto yyexhaustedlab;
1547 # else
1548       /* Extend the stack our own way.  */
1549       if (YYMAXDEPTH <= yystacksize)
1550 	goto yyexhaustedlab;
1551       yystacksize *= 2;
1552       if (YYMAXDEPTH < yystacksize)
1553 	yystacksize = YYMAXDEPTH;
1554 
1555       {
1556 	yytype_int16 *yyss1 = yyss;
1557 	union yyalloc *yyptr =
1558 	  (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1559 	if (! yyptr)
1560 	  goto yyexhaustedlab;
1561 	YYSTACK_RELOCATE (yyss_alloc, yyss);
1562 	YYSTACK_RELOCATE (yyvs_alloc, yyvs);
1563 #  undef YYSTACK_RELOCATE
1564 	if (yyss1 != yyssa)
1565 	  YYSTACK_FREE (yyss1);
1566       }
1567 # endif
1568 #endif /* no yyoverflow */
1569 
1570       yyssp = yyss + yysize - 1;
1571       yyvsp = yyvs + yysize - 1;
1572 
1573       YYDPRINTF ((stderr, "Stack size increased to %lu\n",
1574 		  (unsigned long int) yystacksize));
1575 
1576       if (yyss + yystacksize - 1 <= yyssp)
1577 	YYABORT;
1578     }
1579 
1580   YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1581 
1582   if (yystate == YYFINAL)
1583     YYACCEPT;
1584 
1585   goto yybackup;
1586 
1587 /*-----------.
1588 | yybackup.  |
1589 `-----------*/
1590 yybackup:
1591 
1592   /* Do appropriate processing given the current state.  Read a
1593      lookahead token if we need one and don't already have one.  */
1594 
1595   /* First try to decide what to do without reference to lookahead token.  */
1596   yyn = yypact[yystate];
1597   if (yyn == YYPACT_NINF)
1598     goto yydefault;
1599 
1600   /* Not known => get a lookahead token if don't already have one.  */
1601 
1602   /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol.  */
1603   if (yychar == YYEMPTY)
1604     {
1605       YYDPRINTF ((stderr, "Reading a token: "));
1606       yychar = YYLEX;
1607     }
1608 
1609   if (yychar <= YYEOF)
1610     {
1611       yychar = yytoken = YYEOF;
1612       YYDPRINTF ((stderr, "Now at end of input.\n"));
1613     }
1614   else
1615     {
1616       yytoken = YYTRANSLATE (yychar);
1617       YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
1618     }
1619 
1620   /* If the proper action on seeing token YYTOKEN is to reduce or to
1621      detect an error, take that action.  */
1622   yyn += yytoken;
1623   if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1624     goto yydefault;
1625   yyn = yytable[yyn];
1626   if (yyn <= 0)
1627     {
1628       if (yyn == 0 || yyn == YYTABLE_NINF)
1629 	goto yyerrlab;
1630       yyn = -yyn;
1631       goto yyreduce;
1632     }
1633 
1634   /* Count tokens shifted since error; after three, turn off error
1635      status.  */
1636   if (yyerrstatus)
1637     yyerrstatus--;
1638 
1639   /* Shift the lookahead token.  */
1640   YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
1641 
1642   /* Discard the shifted token.  */
1643   yychar = YYEMPTY;
1644 
1645   yystate = yyn;
1646   *++yyvsp = yylval;
1647 
1648   goto yynewstate;
1649 
1650 
1651 /*-----------------------------------------------------------.
1652 | yydefault -- do the default action for the current state.  |
1653 `-----------------------------------------------------------*/
1654 yydefault:
1655   yyn = yydefact[yystate];
1656   if (yyn == 0)
1657     goto yyerrlab;
1658   goto yyreduce;
1659 
1660 
1661 /*-----------------------------.
1662 | yyreduce -- Do a reduction.  |
1663 `-----------------------------*/
1664 yyreduce:
1665   /* yyn is the number of a rule to reduce with.  */
1666   yylen = yyr2[yyn];
1667 
1668   /* If YYLEN is nonzero, implement the default value of the action:
1669      `$$ = $1'.
1670 
1671      Otherwise, the following line sets YYVAL to garbage.
1672      This behavior is undocumented and Bison
1673      users should not rely upon it.  Assigning to YYVAL
1674      unconditionally makes the parser a bit smaller, and it avoids a
1675      GCC warning that YYVAL may be used uninitialized.  */
1676   yyval = yyvsp[1-yylen];
1677 
1678 
1679   YY_REDUCE_PRINT (yyn);
1680   switch (yyn)
1681     {
1682         case 2:
1683 
1684 /* Line 1464 of yacc.c  */
1685 #line 143 "src/NumberReader.y"
1686     { currentVM()->numberReaderContext()->setParsed((yyval.object)); YYACCEPT; ;}
1687     break;
1688 
1689   case 3:
1690 
1691 /* Line 1464 of yacc.c  */
1692 #line 144 "src/NumberReader.y"
1693     { currentVM()->numberReaderContext()->setParsed(Object::Eof); YYACCEPT; ;}
1694     break;
1695 
1696   case 8:
1697 
1698 /* Line 1464 of yacc.c  */
1699 #line 148 "src/NumberReader.y"
1700     { (yyval.object) = ScannerHelper::applyExactness((yyvsp[(1) - (2)].exactValue), (yyvsp[(2) - (2)].object)); ;}
1701     break;
1702 
1703   case 10:
1704 
1705 /* Line 1464 of yacc.c  */
1706 #line 152 "src/NumberReader.y"
1707     { (yyval.object) = Arithmetic::makePolar((yyvsp[(1) - (3)].object), (yyvsp[(3) - (3)].object)); ;}
1708     break;
1709 
1710   case 11:
1711 
1712 /* Line 1464 of yacc.c  */
1713 #line 153 "src/NumberReader.y"
1714     { (yyval.object) = Object::makeCompnum(Object::makeFixnum(0), (yyvsp[(1) - (2)].object)); ;}
1715     break;
1716 
1717   case 12:
1718 
1719 /* Line 1464 of yacc.c  */
1720 #line 154 "src/NumberReader.y"
1721     { (yyval.object) = Object::makeCompnum((yyvsp[(1) - (4)].object), (yyvsp[(3) - (4)].object)); ;}
1722     break;
1723 
1724   case 13:
1725 
1726 /* Line 1464 of yacc.c  */
1727 #line 155 "src/NumberReader.y"
1728     { (yyval.object) = Object::makeCompnum((yyvsp[(1) - (4)].object), Arithmetic::mul(-1, (yyvsp[(3) - (4)].object))); ;}
1729     break;
1730 
1731   case 14:
1732 
1733 /* Line 1464 of yacc.c  */
1734 #line 156 "src/NumberReader.y"
1735     { (yyval.object) = Object::makeCompnum((yyvsp[(1) - (3)].object), Object::makeFixnum(1)); ;}
1736     break;
1737 
1738   case 15:
1739 
1740 /* Line 1464 of yacc.c  */
1741 #line 157 "src/NumberReader.y"
1742     { (yyval.object) = Object::makeCompnum((yyvsp[(1) - (3)].object), Object::makeFixnum(-1)); ;}
1743     break;
1744 
1745   case 16:
1746 
1747 /* Line 1464 of yacc.c  */
1748 #line 158 "src/NumberReader.y"
1749     { (yyval.object) = Object::makeCompnum(Object::makeFixnum(0), Object::makeFixnum(1)); ;}
1750     break;
1751 
1752   case 17:
1753 
1754 /* Line 1464 of yacc.c  */
1755 #line 159 "src/NumberReader.y"
1756     { (yyval.object) = Object::makeCompnum(Object::makeFixnum(0), Object::makeFixnum(-1)); ;}
1757     break;
1758 
1759   case 18:
1760 
1761 /* Line 1464 of yacc.c  */
1762 #line 160 "src/NumberReader.y"
1763     { (yyval.object) = Object::makeCompnum((yyvsp[(1) - (4)].object), (yyvsp[(3) - (4)].object)); ;}
1764     break;
1765 
1766   case 19:
1767 
1768 /* Line 1464 of yacc.c  */
1769 #line 161 "src/NumberReader.y"
1770     { (yyval.object) = Object::makeCompnum((yyvsp[(1) - (4)].object), Arithmetic::mul(-1, (yyvsp[(3) - (4)].object))); ;}
1771     break;
1772 
1773   case 20:
1774 
1775 /* Line 1464 of yacc.c  */
1776 #line 162 "src/NumberReader.y"
1777     { (yyval.object) = Object::makeCompnum(Object::makeFixnum(0), (yyvsp[(2) - (3)].object)); ;}
1778     break;
1779 
1780   case 21:
1781 
1782 /* Line 1464 of yacc.c  */
1783 #line 163 "src/NumberReader.y"
1784     { (yyval.object) = Object::makeCompnum(Object::makeFixnum(0), Arithmetic::mul(-1, (yyvsp[(2) - (3)].object))); ;}
1785     break;
1786 
1787   case 24:
1788 
1789 /* Line 1464 of yacc.c  */
1790 #line 167 "src/NumberReader.y"
1791     { (yyval.object) = (yyvsp[(2) - (2)].object); ;}
1792     break;
1793 
1794   case 25:
1795 
1796 /* Line 1464 of yacc.c  */
1797 #line 168 "src/NumberReader.y"
1798     { (yyval.object) = Arithmetic::mul(-1, (yyvsp[(2) - (2)].object)); ;}
1799     break;
1800 
1801   case 27:
1802 
1803 /* Line 1464 of yacc.c  */
1804 #line 172 "src/NumberReader.y"
1805     {
1806                bool isDiv0Error = false;
1807                (yyval.object) = Arithmetic::div((yyvsp[(1) - (3)].object), (yyvsp[(3) - (3)].object), isDiv0Error);
1808                if (isDiv0Error) {
1809                    yyerror("division by zero");
1810                    YYERROR;
1811                }
1812           ;}
1813     break;
1814 
1815   case 28:
1816 
1817 /* Line 1464 of yacc.c  */
1818 #line 182 "src/NumberReader.y"
1819     { (yyval.object) = (yyvsp[(2) - (2)].object); ;}
1820     break;
1821 
1822   case 29:
1823 
1824 /* Line 1464 of yacc.c  */
1825 #line 183 "src/NumberReader.y"
1826     { (yyval.object) = Arithmetic::mul(-1, (yyvsp[(2) - (2)].object)); ;}
1827     break;
1828 
1829   case 30:
1830 
1831 /* Line 1464 of yacc.c  */
1832 #line 186 "src/NumberReader.y"
1833     { (yyval.object) = Object::makeFixnum((yyvsp[(1) - (1)].intValue)); ;}
1834     break;
1835 
1836   case 31:
1837 
1838 /* Line 1464 of yacc.c  */
1839 #line 187 "src/NumberReader.y"
1840     {
1841                (yyval.object) = Arithmetic::add(Arithmetic::mul(2, (yyvsp[(1) - (2)].object)), Object::makeFixnum((yyvsp[(2) - (2)].intValue)));
1842           ;}
1843     break;
1844 
1845   case 33:
1846 
1847 /* Line 1464 of yacc.c  */
1848 #line 194 "src/NumberReader.y"
1849     { (yyval.object) = ScannerHelper::applyExactness((yyvsp[(1) - (2)].exactValue), (yyvsp[(2) - (2)].object)); ;}
1850     break;
1851 
1852   case 35:
1853 
1854 /* Line 1464 of yacc.c  */
1855 #line 197 "src/NumberReader.y"
1856     { (yyval.object) = Arithmetic::makePolar((yyvsp[(1) - (3)].object), (yyvsp[(3) - (3)].object)); ;}
1857     break;
1858 
1859   case 36:
1860 
1861 /* Line 1464 of yacc.c  */
1862 #line 198 "src/NumberReader.y"
1863     { (yyval.object) = Object::makeCompnum((yyvsp[(1) - (4)].object), (yyvsp[(3) - (4)].object)); ;}
1864     break;
1865 
1866   case 37:
1867 
1868 /* Line 1464 of yacc.c  */
1869 #line 199 "src/NumberReader.y"
1870     { (yyval.object) = Object::makeCompnum((yyvsp[(1) - (4)].object), Arithmetic::mul(-1, (yyvsp[(3) - (4)].object))); ;}
1871     break;
1872 
1873   case 38:
1874 
1875 /* Line 1464 of yacc.c  */
1876 #line 200 "src/NumberReader.y"
1877     { (yyval.object) = Object::makeCompnum((yyvsp[(1) - (3)].object), Object::makeFixnum(1)); ;}
1878     break;
1879 
1880   case 39:
1881 
1882 /* Line 1464 of yacc.c  */
1883 #line 201 "src/NumberReader.y"
1884     { (yyval.object) = Object::makeCompnum((yyvsp[(1) - (3)].object), Object::makeFixnum(-1)); ;}
1885     break;
1886 
1887   case 40:
1888 
1889 /* Line 1464 of yacc.c  */
1890 #line 202 "src/NumberReader.y"
1891     { (yyval.object) = Object::makeCompnum(Object::makeFixnum(0), (yyvsp[(2) - (3)].object)); ;}
1892     break;
1893 
1894   case 41:
1895 
1896 /* Line 1464 of yacc.c  */
1897 #line 203 "src/NumberReader.y"
1898     { (yyval.object) = Object::makeCompnum(Object::makeFixnum(0), Arithmetic::mul(-1, (yyvsp[(2) - (3)].object))); ;}
1899     break;
1900 
1901   case 42:
1902 
1903 /* Line 1464 of yacc.c  */
1904 #line 204 "src/NumberReader.y"
1905     { (yyval.object) = Object::makeCompnum(Object::makeFixnum(0), Object::makeFixnum(1)); ;}
1906     break;
1907 
1908   case 43:
1909 
1910 /* Line 1464 of yacc.c  */
1911 #line 205 "src/NumberReader.y"
1912     { (yyval.object) = Object::makeCompnum(Object::makeFixnum(0), Object::makeFixnum(-1)); ;}
1913     break;
1914 
1915   case 44:
1916 
1917 /* Line 1464 of yacc.c  */
1918 #line 206 "src/NumberReader.y"
1919     { (yyval.object) = Object::makeCompnum((yyvsp[(1) - (4)].object), (yyvsp[(3) - (4)].object)); ;}
1920     break;
1921 
1922   case 45:
1923 
1924 /* Line 1464 of yacc.c  */
1925 #line 207 "src/NumberReader.y"
1926     { (yyval.object) = Object::makeCompnum((yyvsp[(1) - (4)].object), Arithmetic::mul(-1, (yyvsp[(3) - (4)].object))); ;}
1927     break;
1928 
1929   case 46:
1930 
1931 /* Line 1464 of yacc.c  */
1932 #line 208 "src/NumberReader.y"
1933     { (yyval.object) = Object::makeCompnum(Object::makeFixnum(0), (yyvsp[(2) - (3)].object)); ;}
1934     break;
1935 
1936   case 47:
1937 
1938 /* Line 1464 of yacc.c  */
1939 #line 209 "src/NumberReader.y"
1940     { (yyval.object) = Object::makeCompnum(Object::makeFixnum(0), Arithmetic::mul(-1, (yyvsp[(2) - (3)].object))); ;}
1941     break;
1942 
1943   case 50:
1944 
1945 /* Line 1464 of yacc.c  */
1946 #line 214 "src/NumberReader.y"
1947     { (yyval.object) = (yyvsp[(2) - (2)].object); ;}
1948     break;
1949 
1950   case 51:
1951 
1952 /* Line 1464 of yacc.c  */
1953 #line 215 "src/NumberReader.y"
1954     { (yyval.object) = Arithmetic::mul(-1, (yyvsp[(2) - (2)].object)); ;}
1955     break;
1956 
1957   case 53:
1958 
1959 /* Line 1464 of yacc.c  */
1960 #line 219 "src/NumberReader.y"
1961     {
1962                bool isDiv0Error = false;
1963                (yyval.object) = Arithmetic::div((yyvsp[(1) - (3)].object), (yyvsp[(3) - (3)].object), isDiv0Error);
1964                if (isDiv0Error) {
1965                    yyerror("division by zero");
1966                    YYERROR;
1967                }
1968           ;}
1969     break;
1970 
1971   case 54:
1972 
1973 /* Line 1464 of yacc.c  */
1974 #line 229 "src/NumberReader.y"
1975     { (yyval.object) = (yyvsp[(2) - (2)].object); ;}
1976     break;
1977 
1978   case 55:
1979 
1980 /* Line 1464 of yacc.c  */
1981 #line 230 "src/NumberReader.y"
1982     { (yyval.object) = Arithmetic::mul(-1, (yyvsp[(2) - (2)].object)); ;}
1983     break;
1984 
1985   case 56:
1986 
1987 /* Line 1464 of yacc.c  */
1988 #line 233 "src/NumberReader.y"
1989     { (yyval.object) = Object::makeFixnum((yyvsp[(1) - (1)].intValue)); ;}
1990     break;
1991 
1992   case 57:
1993 
1994 /* Line 1464 of yacc.c  */
1995 #line 234 "src/NumberReader.y"
1996     {
1997                 (yyval.object) = Arithmetic::add(Arithmetic::mul(8, (yyvsp[(1) - (2)].object)), Object::makeFixnum((yyvsp[(2) - (2)].intValue)));
1998           ;}
1999     break;
2000 
2001   case 59:
2002 
2003 /* Line 1464 of yacc.c  */
2004 #line 240 "src/NumberReader.y"
2005     { (yyval.intValue) = (yyvsp[(1) - (1)].intValue); ;}
2006     break;
2007 
2008   case 60:
2009 
2010 /* Line 1464 of yacc.c  */
2011 #line 243 "src/NumberReader.y"
2012     { (yyval.object) = ScannerHelper::applyExactness((yyvsp[(1) - (2)].exactValue), (yyvsp[(2) - (2)].object)); ;}
2013     break;
2014 
2015   case 62:
2016 
2017 /* Line 1464 of yacc.c  */
2018 #line 246 "src/NumberReader.y"
2019     { (yyval.object) = Arithmetic::makePolar((yyvsp[(1) - (3)].object), (yyvsp[(3) - (3)].object)); ;}
2020     break;
2021 
2022   case 63:
2023 
2024 /* Line 1464 of yacc.c  */
2025 #line 247 "src/NumberReader.y"
2026     { (yyval.object) = Object::makeCompnum((yyvsp[(1) - (4)].object), (yyvsp[(3) - (4)].object)); ;}
2027     break;
2028 
2029   case 64:
2030 
2031 /* Line 1464 of yacc.c  */
2032 #line 248 "src/NumberReader.y"
2033     { (yyval.object) = Object::makeCompnum((yyvsp[(1) - (4)].object), Arithmetic::mul(-1, (yyvsp[(3) - (4)].object))); ;}
2034     break;
2035 
2036   case 65:
2037 
2038 /* Line 1464 of yacc.c  */
2039 #line 249 "src/NumberReader.y"
2040     { (yyval.object) = Object::makeCompnum((yyvsp[(1) - (3)].object), Object::makeFixnum(1)); ;}
2041     break;
2042 
2043   case 66:
2044 
2045 /* Line 1464 of yacc.c  */
2046 #line 250 "src/NumberReader.y"
2047     { (yyval.object) = Object::makeCompnum((yyvsp[(1) - (3)].object), Object::makeFixnum(-1)); ;}
2048     break;
2049 
2050   case 67:
2051 
2052 /* Line 1464 of yacc.c  */
2053 #line 251 "src/NumberReader.y"
2054     { (yyval.object) = Object::makeCompnum(Object::makeFixnum(0), (yyvsp[(2) - (3)].object)); ;}
2055     break;
2056 
2057   case 68:
2058 
2059 /* Line 1464 of yacc.c  */
2060 #line 252 "src/NumberReader.y"
2061     { (yyval.object) = Object::makeCompnum(Object::makeFixnum(0), Arithmetic::mul(-1, (yyvsp[(2) - (3)].object))); ;}
2062     break;
2063 
2064   case 69:
2065 
2066 /* Line 1464 of yacc.c  */
2067 #line 253 "src/NumberReader.y"
2068     { (yyval.object) = Object::makeCompnum(Object::makeFixnum(0), Object::makeFixnum(1)); ;}
2069     break;
2070 
2071   case 70:
2072 
2073 /* Line 1464 of yacc.c  */
2074 #line 254 "src/NumberReader.y"
2075     { (yyval.object) = Object::makeCompnum(Object::makeFixnum(0), Object::makeFixnum(-1)); ;}
2076     break;
2077 
2078   case 71:
2079 
2080 /* Line 1464 of yacc.c  */
2081 #line 255 "src/NumberReader.y"
2082     { (yyval.object) = Object::makeCompnum((yyvsp[(1) - (4)].object), (yyvsp[(3) - (4)].object)); ;}
2083     break;
2084 
2085   case 72:
2086 
2087 /* Line 1464 of yacc.c  */
2088 #line 256 "src/NumberReader.y"
2089     { (yyval.object) = Object::makeCompnum((yyvsp[(1) - (4)].object), Arithmetic::mul(-1, (yyvsp[(3) - (4)].object))); ;}
2090     break;
2091 
2092   case 73:
2093 
2094 /* Line 1464 of yacc.c  */
2095 #line 257 "src/NumberReader.y"
2096     { (yyval.object) = Object::makeCompnum(Object::makeFixnum(0), (yyvsp[(2) - (3)].object)); ;}
2097     break;
2098 
2099   case 74:
2100 
2101 /* Line 1464 of yacc.c  */
2102 #line 258 "src/NumberReader.y"
2103     { (yyval.object) = Object::makeCompnum(Object::makeFixnum(0), Arithmetic::mul(-1, (yyvsp[(2) - (3)].object))); ;}
2104     break;
2105 
2106   case 77:
2107 
2108 /* Line 1464 of yacc.c  */
2109 #line 263 "src/NumberReader.y"
2110     { (yyval.object) = (yyvsp[(2) - (2)].object); ;}
2111     break;
2112 
2113   case 78:
2114 
2115 /* Line 1464 of yacc.c  */
2116 #line 264 "src/NumberReader.y"
2117     { (yyval.object) = Arithmetic::mul(-1, (yyvsp[(2) - (2)].object)); ;}
2118     break;
2119 
2120   case 80:
2121 
2122 /* Line 1464 of yacc.c  */
2123 #line 268 "src/NumberReader.y"
2124     {
2125                bool isDiv0Error = false;
2126                (yyval.object) = Arithmetic::div((yyvsp[(1) - (3)].object), (yyvsp[(3) - (3)].object), isDiv0Error);
2127                if (isDiv0Error) {
2128                    yyerror("division by zero");
2129                    YYERROR;
2130                }
2131           ;}
2132     break;
2133 
2134   case 81:
2135 
2136 /* Line 1464 of yacc.c  */
2137 #line 278 "src/NumberReader.y"
2138     { (yyval.object) = (yyvsp[(2) - (2)].object); ;}
2139     break;
2140 
2141   case 82:
2142 
2143 /* Line 1464 of yacc.c  */
2144 #line 279 "src/NumberReader.y"
2145     { (yyval.object) = Arithmetic::mul(-1, (yyvsp[(2) - (2)].object)); ;}
2146     break;
2147 
2148   case 83:
2149 
2150 /* Line 1464 of yacc.c  */
2151 #line 282 "src/NumberReader.y"
2152     { (yyval.object) = Object::makeFixnum((yyvsp[(1) - (1)].intValue)); ;}
2153     break;
2154 
2155   case 84:
2156 
2157 /* Line 1464 of yacc.c  */
2158 #line 283 "src/NumberReader.y"
2159     {
2160                 (yyval.object) = Arithmetic::add(Arithmetic::mul(16, (yyvsp[(1) - (2)].object)), Object::makeFixnum((yyvsp[(2) - (2)].intValue)));
2161           ;}
2162     break;
2163 
2164   case 86:
2165 
2166 /* Line 1464 of yacc.c  */
2167 #line 289 "src/NumberReader.y"
2168     { (yyval.intValue) = (yyvsp[(1) - (1)].intValue); ;}
2169     break;
2170 
2171   case 88:
2172 
2173 /* Line 1464 of yacc.c  */
2174 #line 293 "src/NumberReader.y"
2175     { (yyval.object) = ScannerHelper::applyExactness((yyvsp[(1) - (2)].exactValue), (yyvsp[(2) - (2)].object)); ;}
2176     break;
2177 
2178   case 89:
2179 
2180 /* Line 1464 of yacc.c  */
2181 #line 298 "src/NumberReader.y"
2182     {
2183             (yyval.object) = ScannerHelper::applyExactness(-1, (yyvsp[(2) - (2)].object));
2184           ;}
2185     break;
2186 
2187   case 90:
2188 
2189 /* Line 1464 of yacc.c  */
2190 #line 301 "src/NumberReader.y"
2191     {
2192             if (Arithmetic::isExactZero((yyvsp[(4) - (5)].object))) {
2193               (yyval.object) = Object::makeCompnum(ScannerHelper::applyExactness(-1, (yyvsp[(2) - (5)].object)), Object::makeFlonum(0.0));
2194             } else {
2195               (yyval.object) = ScannerHelper::applyExactness(-1, Object::makeCompnum((yyvsp[(2) - (5)].object), (yyvsp[(4) - (5)].object)));
2196             }
2197           ;}
2198     break;
2199 
2200   case 91:
2201 
2202 /* Line 1464 of yacc.c  */
2203 #line 308 "src/NumberReader.y"
2204     {
2205             if (Arithmetic::isExactZero((yyvsp[(4) - (5)].object))) {
2206               (yyval.object) = Object::makeCompnum(ScannerHelper::applyExactness(-1, (yyvsp[(2) - (5)].object)), Object::makeFlonum(0.0));
2207             } else {
2208               (yyval.object) = ScannerHelper::applyExactness(-1, Arithmetic::mul(-1, Object::makeCompnum((yyvsp[(2) - (5)].object), (yyvsp[(4) - (5)].object))));
2209             }
2210           ;}
2211     break;
2212 
2213   case 92:
2214 
2215 /* Line 1464 of yacc.c  */
2216 #line 315 "src/NumberReader.y"
2217     {
2218             if (Arithmetic::isExactZero((yyvsp[(3) - (4)].object))) {
2219               (yyval.object) = Object::makeCompnum(Object::makeFlonum(0.0), Object::makeFlonum(0.0));
2220             } else {
2221               (yyval.object) = Object::makeCompnum(Object::makeFlonum(0.0), ScannerHelper::applyExactness(-1, (yyvsp[(3) - (4)].object)));
2222             }
2223           ;}
2224     break;
2225 
2226   case 93:
2227 
2228 /* Line 1464 of yacc.c  */
2229 #line 322 "src/NumberReader.y"
2230     {
2231             if (Arithmetic::isExactZero((yyvsp[(3) - (4)].object))) {
2232               (yyval.object) = Object::makeCompnum(Object::makeFlonum(0.0), Object::makeFlonum(0.0));
2233             } else {
2234               (yyval.object) = Object::makeCompnum(Object::makeFlonum(0.0), ScannerHelper::applyExactness(-1, Arithmetic::mul(-1, (yyvsp[(3) - (4)].object))));
2235             }
2236           ;}
2237     break;
2238 
2239   case 95:
2240 
2241 /* Line 1464 of yacc.c  */
2242 #line 332 "src/NumberReader.y"
2243     { (yyval.object) = Arithmetic::makePolar((yyvsp[(1) - (3)].object), (yyvsp[(3) - (3)].object)); ;}
2244     break;
2245 
2246   case 96:
2247 
2248 /* Line 1464 of yacc.c  */
2249 #line 333 "src/NumberReader.y"
2250     { (yyval.object) = Object::makeCompnum((yyvsp[(1) - (4)].object), (yyvsp[(3) - (4)].object)); ;}
2251     break;
2252 
2253   case 97:
2254 
2255 /* Line 1464 of yacc.c  */
2256 #line 334 "src/NumberReader.y"
2257     { (yyval.object) = Object::makeCompnum((yyvsp[(1) - (4)].object), Arithmetic::mul(-1, (yyvsp[(3) - (4)].object))); ;}
2258     break;
2259 
2260   case 98:
2261 
2262 /* Line 1464 of yacc.c  */
2263 #line 335 "src/NumberReader.y"
2264     { (yyval.object) = Object::makeCompnum((yyvsp[(1) - (3)].object), Object::makeFixnum(1)); ;}
2265     break;
2266 
2267   case 99:
2268 
2269 /* Line 1464 of yacc.c  */
2270 #line 336 "src/NumberReader.y"
2271     { (yyval.object) = Object::makeCompnum((yyvsp[(1) - (3)].object), Object::makeFixnum(-1)); ;}
2272     break;
2273 
2274   case 100:
2275 
2276 /* Line 1464 of yacc.c  */
2277 #line 337 "src/NumberReader.y"
2278     { (yyval.object) = Object::makeCompnum(Object::makeFixnum(0), (yyvsp[(2) - (3)].object)); ;}
2279     break;
2280 
2281   case 101:
2282 
2283 /* Line 1464 of yacc.c  */
2284 #line 338 "src/NumberReader.y"
2285     { (yyval.object) = Object::makeCompnum(Object::makeFixnum(0), Arithmetic::mul(-1, (yyvsp[(2) - (3)].object))); ;}
2286     break;
2287 
2288   case 102:
2289 
2290 /* Line 1464 of yacc.c  */
2291 #line 339 "src/NumberReader.y"
2292     { (yyval.object) = Object::makeCompnum(Object::makeFixnum(0), Object::makeFixnum(1)); ;}
2293     break;
2294 
2295   case 103:
2296 
2297 /* Line 1464 of yacc.c  */
2298 #line 340 "src/NumberReader.y"
2299     { (yyval.object) = Object::makeCompnum(Object::makeFixnum(0), Object::makeFixnum(-1)); ;}
2300     break;
2301 
2302   case 104:
2303 
2304 /* Line 1464 of yacc.c  */
2305 #line 341 "src/NumberReader.y"
2306     { (yyval.object) = Object::makeCompnum((yyvsp[(1) - (4)].object), (yyvsp[(3) - (4)].object)); ;}
2307     break;
2308 
2309   case 105:
2310 
2311 /* Line 1464 of yacc.c  */
2312 #line 342 "src/NumberReader.y"
2313     { (yyval.object) = Object::makeCompnum((yyvsp[(1) - (4)].object), Arithmetic::mul(-1, (yyvsp[(3) - (4)].object))); ;}
2314     break;
2315 
2316   case 106:
2317 
2318 /* Line 1464 of yacc.c  */
2319 #line 343 "src/NumberReader.y"
2320     { (yyval.object) = Object::makeCompnum(Object::makeFixnum(0), (yyvsp[(2) - (3)].object)); ;}
2321     break;
2322 
2323   case 107:
2324 
2325 /* Line 1464 of yacc.c  */
2326 #line 344 "src/NumberReader.y"
2327     { (yyval.object) = Object::makeCompnum(Object::makeFixnum(0), Arithmetic::mul(-1, (yyvsp[(2) - (3)].object))); ;}
2328     break;
2329 
2330   case 110:
2331 
2332 /* Line 1464 of yacc.c  */
2333 #line 349 "src/NumberReader.y"
2334     { (yyval.object) = (yyvsp[(2) - (2)].object); ;}
2335     break;
2336 
2337   case 111:
2338 
2339 /* Line 1464 of yacc.c  */
2340 #line 350 "src/NumberReader.y"
2341     { (yyval.object) = Arithmetic::mul(-1, (yyvsp[(2) - (2)].object)); ;}
2342     break;
2343 
2344   case 113:
2345 
2346 /* Line 1464 of yacc.c  */
2347 #line 354 "src/NumberReader.y"
2348     {
2349                bool isDiv0Error = false;
2350                (yyval.object) = Arithmetic::div((yyvsp[(1) - (3)].object), (yyvsp[(3) - (3)].object), isDiv0Error);
2351                if (isDiv0Error) {
2352                    yyerror("division by zero");
2353                    YYERROR;
2354                }
2355           ;}
2356     break;
2357 
2358   case 114:
2359 
2360 /* Line 1464 of yacc.c  */
2361 #line 364 "src/NumberReader.y"
2362     { (yyval.object) = (yyvsp[(2) - (2)].object); ;}
2363     break;
2364 
2365   case 115:
2366 
2367 /* Line 1464 of yacc.c  */
2368 #line 365 "src/NumberReader.y"
2369     { (yyval.object) = Arithmetic::mul(-1, (yyvsp[(2) - (2)].object)); ;}
2370     break;
2371 
2372   case 116:
2373 
2374 /* Line 1464 of yacc.c  */
2375 #line 368 "src/NumberReader.y"
2376     {
2377               if ((yyvsp[(2) - (2)].stringValue).empty()) {
2378                   (yyval.object) = Bignum::makeInteger((yyvsp[(1) - (2)].stringValue));
2379               } else {
2380                   (yyval.object) = Arithmetic::mul(Bignum::makeInteger((yyvsp[(1) - (2)].stringValue)), suffixToNumberOld((yyvsp[(2) - (2)].stringValue)));
2381 // todo ("#e-1e-1000" (- (expt 10 -1000)))
2382 //                   int suffixNum = suffix($2);
2383 //                   Object z0 = Arithmetic::mul(Bignum::makeInteger($1),
2384 //                                               Arithmetic::expt(Object::makeFixnum(10), Object::makeFixnum(suffixNum)));
2385 //                   z0 = Arithmetic::inexact(z0);
2386 //                   $$ = Object::makeFlonum(FlonumUtil::algorithmR(Bignum::makeInteger($1), suffixNum, z0.toFlonum()->value()));
2387               }
2388           ;}
2389     break;
2390 
2391   case 117:
2392 
2393 /* Line 1464 of yacc.c  */
2394 #line 381 "src/NumberReader.y"
2395     {
2396               ucs4string ret = UC(".");
2397               ret += (yyvsp[(2) - (3)].stringValue);
2398               if (!(yyvsp[(3) - (3)].stringValue).empty()) {
2399                   (yyval.object) = Arithmetic::mul(Flonum::fromString(ret), suffixToNumberOld((yyvsp[(3) - (3)].stringValue)));
2400               } else {
2401 
2402                   (yyval.object) = Flonum::fromString(ret);
2403               }
2404 
2405           ;}
2406     break;
2407 
2408   case 118:
2409 
2410 /* Line 1464 of yacc.c  */
2411 #line 392 "src/NumberReader.y"
2412     {
2413               ucs4string uinteger10 = (yyvsp[(1) - (4)].stringValue);
2414               uinteger10 += (yyvsp[(3) - (4)].stringValue);
2415               Object f = Bignum::makeInteger(uinteger10);
2416               if (!(yyvsp[(4) - (4)].stringValue).empty()) {
2417                 Object e = suffixToNumber((yyvsp[(4) - (4)].stringValue));
2418                 ucs4string fstring = (yyvsp[(1) - (4)].stringValue);
2419                 fstring += UC(".");
2420                 fstring += (yyvsp[(3) - (4)].stringValue);
2421                 double z0 = Arithmetic::mul(Flonum::fromString(fstring), suffixToNumberOld((yyvsp[(4) - (4)].stringValue))).toFlonum()->value();
2422                 if (!e.isFixnum()) {
2423                   yyerror("invalid flonum expression: suffix");
2424                 }
2425                 if (!f.isFixnum()) {
2426                   yyerror("invalid flonum expression: too large significand");
2427                 }
2428                 const int digit = (yyvsp[(3) - (4)].stringValue).size();
2429                 (yyval.object) = Object::makeFlonum(FlonumUtil::algorithmR(f, e.toFixnum() - digit, z0));
2430               } else {
2431                 ucs4string ret = (yyvsp[(1) - (4)].stringValue);
2432                 ret += UC(".") + (yyvsp[(3) - (4)].stringValue);
2433                 (yyval.object) = Flonum::fromString(ret);
2434               }
2435           ;}
2436     break;
2437 
2438   case 119:
2439 
2440 /* Line 1464 of yacc.c  */
2441 #line 416 "src/NumberReader.y"
2442     {
2443               ucs4string ret = (yyvsp[(1) - (3)].stringValue);
2444               ret += UC(".0");
2445               if (!(yyvsp[(3) - (3)].stringValue).empty()) {
2446 //                  printf("%s %s:%d\n", __func__, __FILE__, __LINE__);fflush(stdout);// debug
2447                 (yyval.object) = Arithmetic::mul(Flonum::fromString(ret), suffixToNumberOld((yyvsp[(3) - (3)].stringValue)));
2448               } else {
2449 //                  printf("%s %s:%d\n", __func__, __FILE__, __LINE__);fflush(stdout);// debug
2450                   (yyval.object) = Flonum::fromString(ret);
2451               }
2452           ;}
2453     break;
2454 
2455   case 120:
2456 
2457 /* Line 1464 of yacc.c  */
2458 #line 430 "src/NumberReader.y"
2459     { (yyval.object) = Bignum::makeInteger((yyvsp[(1) - (1)].stringValue)); ;}
2460     break;
2461 
2462   case 121:
2463 
2464 /* Line 1464 of yacc.c  */
2465 #line 432 "src/NumberReader.y"
2466     {
2467                 const ucs4char ch = '0' + (yyvsp[(1) - (1)].intValue);
2468                 (yyval.stringValue) = UC("");
2469                 (yyval.stringValue) += ch;
2470            ;}
2471     break;
2472 
2473   case 122:
2474 
2475 /* Line 1464 of yacc.c  */
2476 #line 437 "src/NumberReader.y"
2477     {
2478                const ucs4char ch = '0' + (yyvsp[(2) - (2)].intValue);
2479                (yyval.stringValue) = (yyvsp[(1) - (2)].stringValue);
2480                (yyval.stringValue) += ch;
2481           ;}
2482     break;
2483 
2484   case 124:
2485 
2486 /* Line 1464 of yacc.c  */
2487 #line 445 "src/NumberReader.y"
2488     { (yyval.intValue) = (yyvsp[(1) - (1)].intValue); ;}
2489     break;
2490 
2491   case 125:
2492 
2493 /* Line 1464 of yacc.c  */
2494 #line 448 "src/NumberReader.y"
2495     { (yyval.exactValue) = 0; ;}
2496     break;
2497 
2498   case 126:
2499 
2500 /* Line 1464 of yacc.c  */
2501 #line 449 "src/NumberReader.y"
2502     { (yyval.exactValue) = 1; ;}
2503     break;
2504 
2505   case 127:
2506 
2507 /* Line 1464 of yacc.c  */
2508 #line 450 "src/NumberReader.y"
2509     { (yyval.exactValue) = -1; ;}
2510     break;
2511 
2512   case 128:
2513 
2514 /* Line 1464 of yacc.c  */
2515 #line 453 "src/NumberReader.y"
2516     { (yyval.stringValue) = UC(""); ;}
2517     break;
2518 
2519   case 129:
2520 
2521 /* Line 1464 of yacc.c  */
2522 #line 454 "src/NumberReader.y"
2523     {
2524               ucs4string ret = UC("e");
2525               ret += (yyvsp[(1) - (1)].stringValue).substr(1, (yyvsp[(1) - (1)].stringValue).size() - 1);
2526               (yyval.stringValue) = ret;
2527           ;}
2528     break;
2529 
2530   case 130:
2531 
2532 /* Line 1464 of yacc.c  */
2533 #line 461 "src/NumberReader.y"
2534     { (yyval.exactValue) = (yyvsp[(2) - (2)].exactValue); ;}
2535     break;
2536 
2537   case 131:
2538 
2539 /* Line 1464 of yacc.c  */
2540 #line 462 "src/NumberReader.y"
2541     { (yyval.exactValue) = (yyvsp[(1) - (2)].exactValue); ;}
2542     break;
2543 
2544   case 132:
2545 
2546 /* Line 1464 of yacc.c  */
2547 #line 465 "src/NumberReader.y"
2548     { (yyval.exactValue) = (yyvsp[(2) - (2)].exactValue);;}
2549     break;
2550 
2551   case 133:
2552 
2553 /* Line 1464 of yacc.c  */
2554 #line 466 "src/NumberReader.y"
2555     { (yyval.exactValue) = (yyvsp[(1) - (2)].exactValue);;}
2556     break;
2557 
2558   case 135:
2559 
2560 /* Line 1464 of yacc.c  */
2561 #line 470 "src/NumberReader.y"
2562     { (yyval.exactValue) = (yyvsp[(2) - (2)].exactValue);;}
2563     break;
2564 
2565   case 136:
2566 
2567 /* Line 1464 of yacc.c  */
2568 #line 471 "src/NumberReader.y"
2569     { (yyval.exactValue) = (yyvsp[(1) - (2)].exactValue);;}
2570     break;
2571 
2572   case 137:
2573 
2574 /* Line 1464 of yacc.c  */
2575 #line 474 "src/NumberReader.y"
2576     { (yyval.exactValue) = (yyvsp[(2) - (2)].exactValue);;}
2577     break;
2578 
2579   case 138:
2580 
2581 /* Line 1464 of yacc.c  */
2582 #line 475 "src/NumberReader.y"
2583     { (yyval.exactValue) = (yyvsp[(1) - (2)].exactValue);;}
2584     break;
2585 
2586   case 139:
2587 
2588 /* Line 1464 of yacc.c  */
2589 #line 478 "src/NumberReader.y"
2590     { (yyval.object) = Flonum::NOT_A_NUMBER; ;}
2591     break;
2592 
2593   case 140:
2594 
2595 /* Line 1464 of yacc.c  */
2596 #line 479 "src/NumberReader.y"
2597     { (yyval.object) = Flonum::POSITIVE_INF; ;}
2598     break;
2599 
2600 
2601 
2602 /* Line 1464 of yacc.c  */
2603 #line 2604 "src/NumberReader.tab.cpp"
2604       default: break;
2605     }
2606   YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
2607 
2608   YYPOPSTACK (yylen);
2609   yylen = 0;
2610   YY_STACK_PRINT (yyss, yyssp);
2611 
2612   *++yyvsp = yyval;
2613 
2614   /* Now `shift' the result of the reduction.  Determine what state
2615      that goes to, based on the state we popped back to and the rule
2616      number reduced by.  */
2617 
2618   yyn = yyr1[yyn];
2619 
2620   yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
2621   if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
2622     yystate = yytable[yystate];
2623   else
2624     yystate = yydefgoto[yyn - YYNTOKENS];
2625 
2626   goto yynewstate;
2627 
2628 
2629 /*------------------------------------.
2630 | yyerrlab -- here on detecting error |
2631 `------------------------------------*/
2632 yyerrlab:
2633   /* If not already recovering from an error, report this error.  */
2634   if (!yyerrstatus)
2635     {
2636       ++yynerrs;
2637 #if ! YYERROR_VERBOSE
2638       yyerror (YY_("syntax error"));
2639 #else
2640       {
2641 	YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
2642 	if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
2643 	  {
2644 	    YYSIZE_T yyalloc = 2 * yysize;
2645 	    if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
2646 	      yyalloc = YYSTACK_ALLOC_MAXIMUM;
2647 	    if (yymsg != yymsgbuf)
2648 	      YYSTACK_FREE (yymsg);
2649 	    yymsg = (char *) YYSTACK_ALLOC (yyalloc);
2650 	    if (yymsg)
2651 	      yymsg_alloc = yyalloc;
2652 	    else
2653 	      {
2654 		yymsg = yymsgbuf;
2655 		yymsg_alloc = sizeof yymsgbuf;
2656 	      }
2657 	  }
2658 
2659 	if (0 < yysize && yysize <= yymsg_alloc)
2660 	  {
2661 	    (void) yysyntax_error (yymsg, yystate, yychar);
2662 	    yyerror (yymsg);
2663 	  }
2664 	else
2665 	  {
2666 	    yyerror (YY_("syntax error"));
2667 	    if (yysize != 0)
2668 	      goto yyexhaustedlab;
2669 	  }
2670       }
2671 #endif
2672     }
2673 
2674 
2675 
2676   if (yyerrstatus == 3)
2677     {
2678       /* If just tried and failed to reuse lookahead token after an
2679 	 error, discard it.  */
2680 
2681       if (yychar <= YYEOF)
2682 	{
2683 	  /* Return failure if at end of input.  */
2684 	  if (yychar == YYEOF)
2685 	    YYABORT;
2686 	}
2687       else
2688 	{
2689 	  yydestruct ("Error: discarding",
2690 		      yytoken, &yylval);
2691 	  yychar = YYEMPTY;
2692 	}
2693     }
2694 
2695   /* Else will try to reuse lookahead token after shifting the error
2696      token.  */
2697   goto yyerrlab1;
2698 
2699 
2700 /*---------------------------------------------------.
2701 | yyerrorlab -- error raised explicitly by YYERROR.  |
2702 `---------------------------------------------------*/
2703 yyerrorlab:
2704 
2705   /* Pacify compilers like GCC when the user code never invokes
2706      YYERROR and the label yyerrorlab therefore never appears in user
2707      code.  */
2708   if (/*CONSTCOND*/ 0)
2709      goto yyerrorlab;
2710 
2711   /* Do not reclaim the symbols of the rule which action triggered
2712      this YYERROR.  */
2713   YYPOPSTACK (yylen);
2714   yylen = 0;
2715   YY_STACK_PRINT (yyss, yyssp);
2716   yystate = *yyssp;
2717   goto yyerrlab1;
2718 
2719 
2720 /*-------------------------------------------------------------.
2721 | yyerrlab1 -- common code for both syntax error and YYERROR.  |
2722 `-------------------------------------------------------------*/
2723 yyerrlab1:
2724   yyerrstatus = 3;	/* Each real token shifted decrements this.  */
2725 
2726   for (;;)
2727     {
2728       yyn = yypact[yystate];
2729       if (yyn != YYPACT_NINF)
2730 	{
2731 	  yyn += YYTERROR;
2732 	  if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
2733 	    {
2734 	      yyn = yytable[yyn];
2735 	      if (0 < yyn)
2736 		break;
2737 	    }
2738 	}
2739 
2740       /* Pop the current state because it cannot handle the error token.  */
2741       if (yyssp == yyss)
2742 	YYABORT;
2743 
2744 
2745       yydestruct ("Error: popping",
2746 		  yystos[yystate], yyvsp);
2747       YYPOPSTACK (1);
2748       yystate = *yyssp;
2749       YY_STACK_PRINT (yyss, yyssp);
2750     }
2751 
2752   *++yyvsp = yylval;
2753 
2754 
2755   /* Shift the error token.  */
2756   YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
2757 
2758   yystate = yyn;
2759   goto yynewstate;
2760 
2761 
2762 /*-------------------------------------.
2763 | yyacceptlab -- YYACCEPT comes here.  |
2764 `-------------------------------------*/
2765 yyacceptlab:
2766   yyresult = 0;
2767   goto yyreturn;
2768 
2769 /*-----------------------------------.
2770 | yyabortlab -- YYABORT comes here.  |
2771 `-----------------------------------*/
2772 yyabortlab:
2773   yyresult = 1;
2774   goto yyreturn;
2775 
2776 #if !defined(yyoverflow) || YYERROR_VERBOSE
2777 /*-------------------------------------------------.
2778 | yyexhaustedlab -- memory exhaustion comes here.  |
2779 `-------------------------------------------------*/
2780 yyexhaustedlab:
2781   yyerror (YY_("memory exhausted"));
2782   yyresult = 2;
2783   /* Fall through.  */
2784 #endif
2785 
2786 yyreturn:
2787   if (yychar != YYEMPTY)
2788      yydestruct ("Cleanup: discarding lookahead",
2789 		 yytoken, &yylval);
2790   /* Do not reclaim the symbols of the rule which action triggered
2791      this YYABORT or YYACCEPT.  */
2792   YYPOPSTACK (yylen);
2793   YY_STACK_PRINT (yyss, yyssp);
2794   while (yyssp != yyss)
2795     {
2796       yydestruct ("Cleanup: popping",
2797 		  yystos[*yyssp], yyvsp);
2798       YYPOPSTACK (1);
2799     }
2800 #ifndef yyoverflow
2801   if (yyss != yyssa)
2802     YYSTACK_FREE (yyss);
2803 #endif
2804 #if YYERROR_VERBOSE
2805   if (yymsg != yymsgbuf)
2806     YYSTACK_FREE (yymsg);
2807 #endif
2808   /* Make sure YYID is used.  */
2809   return YYID (yyresult);
2810 }
2811 
2812 
2813 
2814 /* Line 1684 of yacc.c  */
2815 #line 480 "src/NumberReader.y"
2816 
2817 
2818 extern ucs4char* token;
number_yyerror(char const * str)2819 int number_yyerror(char const *str)
2820 {
2821   TextualInputPort* const port = currentVM()->numberReaderContext()->port();
2822   port->setError(format(NULL, UC("~a near [~a] at ~a:~d. "),
2823                         Pair::list4(str, Object::makeString(port->scanner()->currentToken()), port->toString(), Object::makeFixnum(port->getLineNo()))));
2824   return 0;
2825 }
2826 
2827