1 /* A Bison parser, made by GNU Bison 3.0.2. */
3 /* Bison implementation for Yacc-like parsers in C
5 Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc.
7 This program is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program. If not, see <http://www.gnu.org/licenses/>. */
20 /* As a special exception, you may create a larger work that contains
21 part or all of the Bison parser skeleton and distribute that work
22 under terms of your choice, so long as that work isn't itself a
23 parser generator using the skeleton or a modified version thereof
24 as a parser skeleton. Alternatively, if you modify or redistribute
25 the parser skeleton itself, you may (at your option) remove this
26 special exception, which will cause the skeleton and the resulting
27 Bison output files to be licensed under the GNU General Public
28 License without this special exception.
30 This special exception was added by the Free Software Foundation in
31 version 2.2 of Bison. */
33 /* C LALR(1) parser skeleton written by Richard Stallman, by
34 simplifying the original so-called "semantic" parser. */
36 /* All symbols defined below should begin with yy or YY, to avoid
37 infringing on user name space. This should be done even for local
38 variables, as they might otherwise be expanded by user macros.
39 There are some unavoidable exceptions within include files to
40 define necessary library symbols; they are noted "INFRINGES ON
41 USER NAME SPACE" below. */
43 /* Identify Bison output. */
47 #define YYBISON_VERSION "3.0.2"
50 #define YYSKELETON_NAME "yacc.c"
64 /* Copy the first part of user declarations. */
65 #line 18 "eqn.y" /* yacc.c:339 */
73 extern int non_empty_flag;
75 void yyerror(const char *);
77 #line 78 "eqn.cpp" /* yacc.c:339 */
80 # if defined __cplusplus && 201103L <= __cplusplus
81 # define YY_NULLPTR nullptr
87 /* Enabling verbose error messages. */
88 #ifdef YYERROR_VERBOSE
89 # undef YYERROR_VERBOSE
90 # define YYERROR_VERBOSE 1
92 # define YYERROR_VERBOSE 0
95 /* In a future release of Bison, this section will be replaced
96 by #include "y.tab.h". */
97 #ifndef YY_YY_Y_TAB_H_INCLUDED
98 # define YY_YY_Y_TAB_H_INCLUDED
174 #define SMALLOVER 259
197 #define QUOTED_TEXT 282
233 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
234 typedef union YYSTYPE YYSTYPE;
237 #line 30 "eqn.y" /* yacc.c:355 */
246 #line 247 "eqn.cpp" /* yacc.c:355 */
248 # define YYSTYPE_IS_TRIVIAL 1
249 # define YYSTYPE_IS_DECLARED 1
253 extern YYSTYPE yylval;
257 #endif /* !YY_YY_Y_TAB_H_INCLUDED */
259 /* Copy the second part of user declarations. */
261 #line 262 "eqn.cpp" /* yacc.c:358 */
268 typedef YYTYPE_UINT8 yytype_uint8;
270 typedef unsigned char yytype_uint8;
274 typedef YYTYPE_INT8 yytype_int8;
276 typedef signed char yytype_int8;
280 typedef YYTYPE_UINT16 yytype_uint16;
282 typedef unsigned short int yytype_uint16;
286 typedef YYTYPE_INT16 yytype_int16;
288 typedef short int yytype_int16;
292 # ifdef __SIZE_TYPE__
293 # define YYSIZE_T __SIZE_TYPE__
294 # elif defined size_t
295 # define YYSIZE_T size_t
296 # elif ! defined YYSIZE_T
297 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
298 # define YYSIZE_T size_t
300 # define YYSIZE_T unsigned int
304 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
307 # if defined YYENABLE_NLS && YYENABLE_NLS
309 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
310 # define YY_(Msgid) dgettext ("bison-runtime", Msgid)
314 # define YY_(Msgid) Msgid
319 # if (defined __GNUC__ \
320 && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \
321 || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C
322 # define YY_ATTRIBUTE(Spec) __attribute__(Spec)
324 # define YY_ATTRIBUTE(Spec) /* empty */
328 #ifndef YY_ATTRIBUTE_PURE
329 # define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__))
332 #ifndef YY_ATTRIBUTE_UNUSED
333 # define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__))
336 #if !defined _Noreturn \
337 && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112)
338 # if defined _MSC_VER && 1200 <= _MSC_VER
339 # define _Noreturn __declspec (noreturn)
341 # define _Noreturn YY_ATTRIBUTE ((__noreturn__))
345 /* Suppress unused-variable warnings by "using" E. */
346 #if ! defined lint || defined __GNUC__
347 # define YYUSE(E) ((void) (E))
349 # define YYUSE(E) /* empty */
352 #if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
353 /* Suppress an incorrect diagnostic about yylval being uninitialized. */
354 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
355 _Pragma ("GCC diagnostic push") \
356 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
357 _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
358 # define YY_IGNORE_MAYBE_UNINITIALIZED_END \
359 _Pragma ("GCC diagnostic pop")
361 # define YY_INITIAL_VALUE(Value) Value
363 #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
364 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
365 # define YY_IGNORE_MAYBE_UNINITIALIZED_END
367 #ifndef YY_INITIAL_VALUE
368 # define YY_INITIAL_VALUE(Value) /* Nothing. */
372 #if ! defined yyoverflow || YYERROR_VERBOSE
374 /* The parser invokes alloca or malloc; define the necessary symbols. */
376 # ifdef YYSTACK_USE_ALLOCA
377 # if YYSTACK_USE_ALLOCA
379 # define YYSTACK_ALLOC __builtin_alloca
380 # elif defined __BUILTIN_VA_ARG_INCR
381 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
383 # define YYSTACK_ALLOC __alloca
384 # elif defined _MSC_VER
385 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
386 # define alloca _alloca
388 # define YYSTACK_ALLOC alloca
389 # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
390 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
391 /* Use EXIT_SUCCESS as a witness for stdlib.h. */
392 # ifndef EXIT_SUCCESS
393 # define EXIT_SUCCESS 0
400 # ifdef YYSTACK_ALLOC
401 /* Pacify GCC's 'empty if-body' warning. */
402 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
403 # ifndef YYSTACK_ALLOC_MAXIMUM
404 /* The OS might guarantee only one guard page at the bottom of the stack,
405 and a page size can be as small as 4096 bytes. So we cannot safely
406 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
407 to allow for a few compiler-allocated temporary stack slots. */
408 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
411 # define YYSTACK_ALLOC YYMALLOC
412 # define YYSTACK_FREE YYFREE
413 # ifndef YYSTACK_ALLOC_MAXIMUM
414 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
416 # if (defined __cplusplus && ! defined EXIT_SUCCESS \
417 && ! ((defined YYMALLOC || defined malloc) \
418 && (defined YYFREE || defined free)))
419 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
420 # ifndef EXIT_SUCCESS
421 # define EXIT_SUCCESS 0
425 # define YYMALLOC malloc
426 # if ! defined malloc && ! defined EXIT_SUCCESS
427 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
432 # if ! defined free && ! defined EXIT_SUCCESS
433 void free (void *); /* INFRINGES ON USER NAME SPACE */
437 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
440 #if (! defined yyoverflow \
441 && (! defined __cplusplus \
442 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
444 /* A type that is properly aligned for any stack member. */
447 yytype_int16 yyss_alloc;
451 /* The size of the maximum gap between one aligned stack and the next. */
452 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
454 /* The size of an array large to enough to hold all stacks, each with
456 # define YYSTACK_BYTES(N) \
457 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
458 + YYSTACK_GAP_MAXIMUM)
460 # define YYCOPY_NEEDED 1
462 /* Relocate STACK from its old location to the new one. The
463 local variables YYSIZE and YYSTACKSIZE give the old and new number of
464 elements in the stack, and YYPTR gives the new location of the
465 stack. Advance YYPTR to a properly aligned location for the next
467 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
470 YYSIZE_T yynewbytes; \
471 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
472 Stack = &yyptr->Stack_alloc; \
473 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
474 yyptr += yynewbytes / sizeof (*yyptr); \
480 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
481 /* Copy COUNT objects from SRC to DST. The source and destination do
484 # if defined __GNUC__ && 1 < __GNUC__
485 # define YYCOPY(Dst, Src, Count) \
486 __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
488 # define YYCOPY(Dst, Src, Count) \
492 for (yyi = 0; yyi < (Count); yyi++) \
493 (Dst)[yyi] = (Src)[yyi]; \
498 #endif /* !YYCOPY_NEEDED */
500 /* YYFINAL -- State number of the termination state. */
502 /* YYLAST -- Last index in YYTABLE. */
505 /* YYNTOKENS -- Number of terminals. */
507 /* YYNNTS -- Number of nonterminals. */
509 /* YYNRULES -- Number of rules. */
511 /* YYNSTATES -- Number of states. */
512 #define YYNSTATES 142
514 /* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned
515 by yylex, with out-of-bounds checking. */
517 #define YYMAXUTOK 315
519 #define YYTRANSLATE(YYX) \
520 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
522 /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
523 as returned by yylex, without out-of-bounds checking. */
524 static const yytype_uint8 yytranslate[] =
526 0, 2, 2, 2, 2, 2, 2, 2, 2, 63,
527 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
528 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
529 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
530 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
531 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
532 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
533 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
534 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
535 2, 2, 2, 2, 61, 2, 2, 2, 2, 2,
536 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
537 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
538 2, 2, 2, 64, 2, 65, 62, 2, 2, 2,
539 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
540 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
541 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
542 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
543 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
544 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
545 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
546 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
547 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
548 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
549 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
550 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
551 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
552 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
553 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
554 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
555 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
556 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
557 55, 56, 57, 58, 59, 60
561 /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
562 static const yytype_uint16 yyrline[] =
564 0, 121, 121, 123, 128, 130, 141, 143, 145, 150,
565 152, 154, 156, 158, 163, 165, 167, 169, 174, 176,
566 181, 183, 185, 190, 192, 194, 196, 198, 200, 202,
567 204, 206, 208, 210, 212, 214, 216, 218, 220, 222,
568 224, 226, 228, 230, 232, 234, 236, 238, 240, 242,
569 244, 246, 248, 250, 252, 254, 259, 269, 271, 276,
570 278, 283, 285, 290, 292, 297, 299, 304, 306, 308,
571 310, 314, 316, 321, 323, 325
575 #if YYDEBUG || YYERROR_VERBOSE || 0
576 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
577 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
578 static const char *const yytname[] =
580 "$end", "error", "$undefined", "OVER", "SMALLOVER", "SQRT", "SUB",
581 "SUP", "LPILE", "RPILE", "CPILE", "PILE", "LEFT", "RIGHT", "TO", "FROM",
582 "SIZE", "FONT", "ROMAN", "BOLD", "ITALIC", "FAT", "ACCENT", "BAR",
583 "UNDER", "ABOVE", "TEXT", "QUOTED_TEXT", "FWD", "BACK", "DOWN", "UP",
584 "MATRIX", "COL", "LCOL", "RCOL", "CCOL", "MARK", "LINEUP", "TYPE",
585 "VCENTER", "PRIME", "SPLIT", "NOSPLIT", "UACCENT", "SPECIAL", "SPACE",
586 "GFONT", "GSIZE", "DEFINE", "NDEFINE", "TDEFINE", "SDEFINE", "UNDEF",
587 "IFDEF", "INCLUDE", "DELIM", "CHARTYPE", "SET", "GRFONT", "GBFONT",
588 "'^'", "'~'", "'\\t'", "'{'", "'}'", "$accept", "top", "equation",
589 "mark", "from_to", "sqrt_over", "script", "nonsup", "simple", "number",
590 "pile_element_list", "pile_arg", "column_list", "column_element_list",
591 "column_arg", "column", "text", "delim", YY_NULLPTR
596 /* YYTOKNUM[NUM] -- (External) token number corresponding to the
597 (internal) symbol number NUM (which must be that of a token). */
598 static const yytype_uint16 yytoknum[] =
600 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
601 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
602 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
603 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
604 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
605 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
606 315, 94, 126, 9, 123, 125
610 #define YYPACT_NINF -76
612 #define yypact_value_is_default(Yystate) \
613 (!!((Yystate) == (-76)))
615 #define YYTABLE_NINF -1
617 #define yytable_value_is_error(Yytable_value) \
620 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
622 static const yytype_int16 yypact[] =
624 230, 269, 6, 6, 6, 6, 2, 14, 14, 308,
625 308, 308, 308, -76, -76, 14, 14, 14, 14, -50,
626 230, 230, 14, 308, 4, 23, 14, -76, -76, -76,
627 230, 24, 230, -76, -76, 70, -76, -76, 20, -76,
628 -76, -76, 230, -44, -76, -76, -76, -76, -76, -76,
629 -76, -76, 230, 308, 308, 57, 57, 57, 57, 308,
630 308, 308, 308, 3, -76, -76, 308, 57, -76, -76,
631 308, 130, -76, -76, 269, 269, 269, 269, 308, 308,
632 308, -76, -76, -76, 308, 230, -12, 230, 191, 57,
633 57, 57, 57, 57, 57, 8, 8, 8, 8, 12,
634 -76, 57, 57, -76, -76, -76, -76, 79, -76, 335,
635 -76, -76, -76, 230, -76, -6, 2, 230, 28, -76,
636 -76, -76, -76, -76, -76, 269, 269, 308, 230, -76,
637 -76, 230, -3, 230, -76, -76, -76, 230, -76, -2,
641 /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
642 Performed when YYTABLE does not specify something else to do. Zero
643 means the default is an error. */
644 static const yytype_uint8 yydefact[] =
646 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,
647 0, 0, 0, 23, 24, 0, 0, 0, 0, 0,
648 0, 0, 0, 0, 0, 0, 0, 27, 28, 29,
649 0, 0, 3, 4, 6, 9, 14, 18, 20, 15,
650 71, 72, 0, 0, 32, 56, 33, 34, 31, 74,
651 75, 73, 0, 0, 0, 43, 44, 45, 46, 0,
652 0, 0, 0, 0, 7, 8, 0, 54, 25, 26,
653 0, 0, 1, 5, 0, 0, 0, 0, 0, 0,
654 0, 38, 39, 40, 0, 57, 0, 0, 37, 48,
655 47, 49, 50, 52, 51, 0, 0, 0, 0, 0,
656 61, 53, 55, 30, 16, 17, 10, 11, 21, 20,
657 19, 41, 42, 0, 59, 0, 0, 0, 0, 67,
658 68, 69, 70, 35, 62, 0, 0, 0, 58, 60,
659 36, 63, 0, 0, 12, 13, 22, 0, 65, 0,
663 /* YYPGOTO[NTERM-NUM]. */
664 static const yytype_int8 yypgoto[] =
666 -76, -76, 0, -17, -75, 1, -67, -13, 46, -7,
667 9, 13, -76, -47, 22, -4, -1, -29
670 /* YYDEFGOTO[NTERM-NUM]. */
671 static const yytype_int16 yydefgoto[] =
673 -1, 31, 85, 33, 34, 35, 36, 37, 38, 43,
674 86, 44, 99, 132, 119, 100, 45, 52
677 /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
678 positive, shift that token. If negative, reduce the rule whose
679 number is the opposite. If YYTABLE_NINF, syntax error. */
680 static const yytype_uint8 yytable[] =
682 32, 106, 39, 64, 65, 51, 53, 54, 59, 60,
683 61, 62, 110, 113, 63, 73, 46, 47, 48, 113,
684 87, 66, 137, 137, 72, 70, 78, 79, 40, 41,
685 71, 68, 40, 41, 40, 41, 95, 96, 97, 98,
686 40, 41, 80, 81, 82, 95, 96, 97, 98, 69,
687 134, 135, 88, 114, 73, 55, 56, 57, 58, 129,
688 136, 83, 138, 141, 84, 108, 49, 50, 73, 67,
689 42, 73, 117, 74, 75, 104, 105, 123, 107, 80,
690 81, 82, 74, 75, 76, 77, 139, 130, 118, 118,
691 118, 118, 133, 125, 126, 124, 115, 0, 83, 89,
692 90, 84, 0, 0, 0, 91, 92, 93, 94, 0,
693 0, 73, 101, 128, 73, 51, 102, 131, 120, 121,
694 122, 0, 0, 73, 109, 0, 111, 0, 0, 0,
695 112, 0, 0, 131, 0, 1, 0, 140, 2, 3,
696 4, 5, 6, 0, 0, 0, 7, 8, 9, 10,
697 11, 12, 0, 0, 0, 0, 13, 14, 15, 16,
698 17, 18, 19, 0, 0, 0, 0, 20, 21, 22,
699 23, 0, 24, 25, 0, 26, 0, 0, 0, 0,
700 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
701 0, 27, 28, 29, 30, 103, 1, 0, 0, 2,
702 3, 4, 5, 6, 116, 0, 0, 7, 8, 9,
703 10, 11, 12, 0, 0, 0, 0, 13, 14, 15,
704 16, 17, 18, 19, 0, 0, 0, 0, 20, 21,
705 22, 23, 0, 24, 25, 1, 26, 0, 2, 3,
706 4, 5, 6, 0, 0, 0, 7, 8, 9, 10,
707 11, 12, 27, 28, 29, 30, 13, 14, 15, 16,
708 17, 18, 19, 0, 0, 0, 0, 20, 21, 22,
709 23, 0, 24, 25, 1, 26, 0, 2, 3, 4,
710 5, 6, 0, 0, 0, 7, 8, 9, 10, 11,
711 12, 27, 28, 29, 30, 13, 14, 15, 16, 17,
712 18, 19, 0, 0, 0, 0, 0, 0, 22, 23,
713 0, 24, 25, 0, 26, 0, 2, 3, 4, 5,
714 6, 0, 0, 0, 7, 8, 9, 10, 11, 12,
715 27, 28, 29, 30, 13, 14, 15, 16, 17, 18,
716 19, 78, 127, 0, 0, 0, 0, 22, 23, 0,
717 24, 25, 0, 26, 0, 0, 0, 80, 81, 82,
718 0, 0, 0, 0, 0, 0, 0, 0, 0, 27,
719 28, 29, 30, 0, 0, 0, 83, 0, 0, 84
722 static const yytype_int16 yycheck[] =
724 0, 76, 1, 20, 21, 6, 7, 8, 15, 16,
725 17, 18, 79, 25, 64, 32, 3, 4, 5, 25,
726 64, 22, 25, 25, 0, 26, 6, 7, 26, 27,
727 30, 27, 26, 27, 26, 27, 33, 34, 35, 36,
728 26, 27, 22, 23, 24, 33, 34, 35, 36, 26,
729 125, 126, 52, 65, 71, 9, 10, 11, 12, 65,
730 127, 41, 65, 65, 44, 78, 64, 65, 85, 23,
731 64, 88, 64, 3, 4, 74, 75, 65, 77, 22,
732 23, 24, 3, 4, 14, 15, 133, 116, 95, 96,
733 97, 98, 64, 14, 15, 99, 87, -1, 41, 53,
734 54, 44, -1, -1, -1, 59, 60, 61, 62, -1,
735 -1, 128, 66, 113, 131, 116, 70, 117, 96, 97,
736 98, -1, -1, 140, 78, -1, 80, -1, -1, -1,
737 84, -1, -1, 133, -1, 5, -1, 137, 8, 9,
738 10, 11, 12, -1, -1, -1, 16, 17, 18, 19,
739 20, 21, -1, -1, -1, -1, 26, 27, 28, 29,
740 30, 31, 32, -1, -1, -1, -1, 37, 38, 39,
741 40, -1, 42, 43, -1, 45, -1, -1, -1, -1,
742 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
743 -1, 61, 62, 63, 64, 65, 5, -1, -1, 8,
744 9, 10, 11, 12, 13, -1, -1, 16, 17, 18,
745 19, 20, 21, -1, -1, -1, -1, 26, 27, 28,
746 29, 30, 31, 32, -1, -1, -1, -1, 37, 38,
747 39, 40, -1, 42, 43, 5, 45, -1, 8, 9,
748 10, 11, 12, -1, -1, -1, 16, 17, 18, 19,
749 20, 21, 61, 62, 63, 64, 26, 27, 28, 29,
750 30, 31, 32, -1, -1, -1, -1, 37, 38, 39,
751 40, -1, 42, 43, 5, 45, -1, 8, 9, 10,
752 11, 12, -1, -1, -1, 16, 17, 18, 19, 20,
753 21, 61, 62, 63, 64, 26, 27, 28, 29, 30,
754 31, 32, -1, -1, -1, -1, -1, -1, 39, 40,
755 -1, 42, 43, -1, 45, -1, 8, 9, 10, 11,
756 12, -1, -1, -1, 16, 17, 18, 19, 20, 21,
757 61, 62, 63, 64, 26, 27, 28, 29, 30, 31,
758 32, 6, 7, -1, -1, -1, -1, 39, 40, -1,
759 42, 43, -1, 45, -1, -1, -1, 22, 23, 24,
760 -1, -1, -1, -1, -1, -1, -1, -1, -1, 61,
761 62, 63, 64, -1, -1, -1, 41, -1, -1, 44
764 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
765 symbol of state STATE-NUM. */
766 static const yytype_uint8 yystos[] =
768 0, 5, 8, 9, 10, 11, 12, 16, 17, 18,
769 19, 20, 21, 26, 27, 28, 29, 30, 31, 32,
770 37, 38, 39, 40, 42, 43, 45, 61, 62, 63,
771 64, 67, 68, 69, 70, 71, 72, 73, 74, 71,
772 26, 27, 64, 75, 77, 82, 77, 77, 77, 64,
773 65, 82, 83, 82, 82, 74, 74, 74, 74, 75,
774 75, 75, 75, 64, 69, 69, 82, 74, 27, 26,
775 82, 68, 0, 69, 3, 4, 14, 15, 6, 7,
776 22, 23, 24, 41, 44, 68, 76, 64, 68, 74,
777 74, 74, 74, 74, 74, 33, 34, 35, 36, 78,
778 81, 74, 74, 65, 71, 71, 70, 71, 73, 74,
779 72, 74, 74, 25, 65, 76, 13, 64, 75, 80,
780 80, 80, 80, 65, 81, 14, 15, 7, 68, 65,
781 83, 68, 79, 64, 70, 70, 72, 25, 65, 79,
785 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
786 static const yytype_uint8 yyr1[] =
788 0, 66, 67, 67, 68, 68, 69, 69, 69, 70,
789 70, 70, 70, 70, 71, 71, 71, 71, 72, 72,
790 73, 73, 73, 74, 74, 74, 74, 74, 74, 74,
791 74, 74, 74, 74, 74, 74, 74, 74, 74, 74,
792 74, 74, 74, 74, 74, 74, 74, 74, 74, 74,
793 74, 74, 74, 74, 74, 74, 75, 76, 76, 77,
794 77, 78, 78, 79, 79, 80, 80, 81, 81, 81,
795 81, 82, 82, 83, 83, 83
798 /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */
799 static const yytype_uint8 yyr2[] =
801 0, 2, 0, 1, 1, 2, 1, 2, 2, 1,
802 3, 3, 5, 5, 1, 2, 3, 3, 1, 3,
803 1, 3, 5, 1, 1, 2, 2, 1, 1, 1,
804 3, 2, 2, 2, 2, 4, 5, 3, 2, 2,
805 2, 3, 3, 2, 2, 2, 2, 3, 3, 3,
806 3, 3, 3, 3, 2, 3, 1, 1, 3, 3,
807 4, 1, 2, 1, 3, 3, 4, 2, 2, 2,
812 #define yyerrok (yyerrstatus = 0)
813 #define yyclearin (yychar = YYEMPTY)
817 #define YYACCEPT goto yyacceptlab
818 #define YYABORT goto yyabortlab
819 #define YYERROR goto yyerrorlab
822 #define YYRECOVERING() (!!yyerrstatus)
824 #define YYBACKUP(Token, Value) \
826 if (yychar == YYEMPTY) \
830 YYPOPSTACK (yylen); \
836 yyerror (YY_("syntax error: cannot back up")); \
841 /* Error token number */
843 #define YYERRCODE 256
847 /* Enable debugging if requested. */
851 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
852 # define YYFPRINTF fprintf
855 # define YYDPRINTF(Args) \
861 /* This macro is provided for backward compatibility. */
862 #ifndef YY_LOCATION_PRINT
863 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
867 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
871 YYFPRINTF (stderr, "%s ", Title); \
872 yy_symbol_print (stderr, \
874 YYFPRINTF (stderr, "\n"); \
879 /*----------------------------------------.
880 | Print this symbol's value on YYOUTPUT. |
881 `----------------------------------------*/
884 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
886 FILE *yyo = yyoutput;
891 if (yytype < YYNTOKENS)
892 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
898 /*--------------------------------.
899 | Print this symbol on YYOUTPUT. |
900 `--------------------------------*/
903 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
905 YYFPRINTF (yyoutput, "%s %s (",
906 yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]);
908 yy_symbol_value_print (yyoutput, yytype, yyvaluep);
909 YYFPRINTF (yyoutput, ")");
912 /*------------------------------------------------------------------.
913 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
915 `------------------------------------------------------------------*/
918 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
920 YYFPRINTF (stderr, "Stack now");
921 for (; yybottom <= yytop; yybottom++)
923 int yybot = *yybottom;
924 YYFPRINTF (stderr, " %d", yybot);
926 YYFPRINTF (stderr, "\n");
929 # define YY_STACK_PRINT(Bottom, Top) \
932 yy_stack_print ((Bottom), (Top)); \
936 /*------------------------------------------------.
937 | Report that the YYRULE is going to be reduced. |
938 `------------------------------------------------*/
941 yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule)
943 unsigned long int yylno = yyrline[yyrule];
944 int yynrhs = yyr2[yyrule];
946 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
948 /* The symbols being reduced. */
949 for (yyi = 0; yyi < yynrhs; yyi++)
951 YYFPRINTF (stderr, " $%d = ", yyi + 1);
952 yy_symbol_print (stderr,
953 yystos[yyssp[yyi + 1 - yynrhs]],
954 &(yyvsp[(yyi + 1) - (yynrhs)])
956 YYFPRINTF (stderr, "\n");
960 # define YY_REDUCE_PRINT(Rule) \
963 yy_reduce_print (yyssp, yyvsp, Rule); \
966 /* Nonzero means print parse trace. It is left uninitialized so that
967 multiple parsers can coexist. */
970 # define YYDPRINTF(Args)
971 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
972 # define YY_STACK_PRINT(Bottom, Top)
973 # define YY_REDUCE_PRINT(Rule)
974 #endif /* !YYDEBUG */
977 /* YYINITDEPTH -- initial size of the parser's stacks. */
979 # define YYINITDEPTH 200
982 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
983 if the built-in stack extension method is used).
985 Do not make this value too large; the results are undefined if
986 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
987 evaluated with infinite-precision integer arithmetic. */
990 # define YYMAXDEPTH 10000
997 # if defined __GLIBC__ && defined _STRING_H
998 # define yystrlen strlen
1000 /* Return the length of YYSTR. */
1002 yystrlen (const char *yystr)
1005 for (yylen = 0; yystr[yylen]; yylen++)
1013 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
1014 # define yystpcpy stpcpy
1016 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1019 yystpcpy (char *yydest, const char *yysrc)
1022 const char *yys = yysrc;
1024 while ((*yyd++ = *yys++) != '\0')
1033 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
1034 quotes and backslashes, so that it's suitable for yyerror. The
1035 heuristic is that double-quoting is unnecessary unless the string
1036 contains an apostrophe, a comma, or backslash (other than
1037 backslash-backslash). YYSTR is taken from yytname. If YYRES is
1038 null, do not copy; instead, return the length of what the result
1041 yytnamerr (char *yyres, const char *yystr)
1046 char const *yyp = yystr;
1053 goto do_not_strip_quotes;
1057 goto do_not_strip_quotes;
1070 do_not_strip_quotes: ;
1074 return yystrlen (yystr);
1076 return yystpcpy (yyres, yystr) - yyres;
1080 /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
1081 about the unexpected token YYTOKEN for the state stack whose top is
1084 Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is
1085 not large enough to hold the message. In that case, also set
1086 *YYMSG_ALLOC to the required number of bytes. Return 2 if the
1087 required number of bytes is too large to store. */
1089 yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
1090 yytype_int16 *yyssp, int yytoken)
1092 YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]);
1093 YYSIZE_T yysize = yysize0;
1094 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1095 /* Internationalized format string. */
1096 const char *yyformat = YY_NULLPTR;
1097 /* Arguments of yyformat. */
1098 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1099 /* Number of reported tokens (one for the "unexpected", one per
1103 /* There are many possibilities here to consider:
1104 - If this state is a consistent state with a default action, then
1105 the only way this function was invoked is if the default action
1106 is an error action. In that case, don't check for expected
1107 tokens because there are none.
1108 - The only way there can be no lookahead present (in yychar) is if
1109 this state is a consistent state with a default action. Thus,
1110 detecting the absence of a lookahead is sufficient to determine
1111 that there is no unexpected or expected token to report. In that
1112 case, just report a simple "syntax error".
1113 - Don't assume there isn't a lookahead just because this state is a
1114 consistent state with a default action. There might have been a
1115 previous inconsistent state, consistent state with a non-default
1116 action, or user semantic action that manipulated yychar.
1117 - Of course, the expected token list depends on states to have
1118 correct lookahead information, and it depends on the parser not
1119 to perform extra reductions after fetching a lookahead from the
1120 scanner and before detecting a syntax error. Thus, state merging
1121 (from LALR or IELR) and default reductions corrupt the expected
1122 token list. However, the list is correct for canonical LR with
1123 one exception: it will still contain any token that will not be
1124 accepted due to an error action in a later state.
1126 if (yytoken != YYEMPTY)
1128 int yyn = yypact[*yyssp];
1129 yyarg[yycount++] = yytname[yytoken];
1130 if (!yypact_value_is_default (yyn))
1132 /* Start YYX at -YYN if negative to avoid negative indexes in
1133 YYCHECK. In other words, skip the first -YYN actions for
1134 this state because they are default actions. */
1135 int yyxbegin = yyn < 0 ? -yyn : 0;
1136 /* Stay within bounds of both yycheck and yytname. */
1137 int yychecklim = YYLAST - yyn + 1;
1138 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1141 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1142 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
1143 && !yytable_value_is_error (yytable[yyx + yyn]))
1145 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1151 yyarg[yycount++] = yytname[yyx];
1153 YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]);
1154 if (! (yysize <= yysize1
1155 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1165 # define YYCASE_(N, S) \
1169 YYCASE_(0, YY_("syntax error"));
1170 YYCASE_(1, YY_("syntax error, unexpected %s"));
1171 YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
1172 YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
1173 YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
1174 YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
1179 YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
1180 if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1185 if (*yymsg_alloc < yysize)
1187 *yymsg_alloc = 2 * yysize;
1188 if (! (yysize <= *yymsg_alloc
1189 && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
1190 *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
1194 /* Avoid sprintf, as that infringes on the user's name space.
1195 Don't have undefined behavior even if the translation
1196 produced a string with the wrong number of "%s"s. */
1200 while ((*yyp = *yyformat) != '\0')
1201 if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
1203 yyp += yytnamerr (yyp, yyarg[yyi++]);
1214 #endif /* YYERROR_VERBOSE */
1216 /*-----------------------------------------------.
1217 | Release the memory associated to this symbol. |
1218 `-----------------------------------------------*/
1221 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
1226 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1228 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1230 YY_IGNORE_MAYBE_UNINITIALIZED_END
1236 /* The lookahead symbol. */
1239 /* The semantic value of the lookahead symbol. */
1241 /* Number of syntax errors so far. */
1253 /* Number of tokens to shift before error messages enabled. */
1256 /* The stacks and their tools:
1257 'yyss': related to states.
1258 'yyvs': related to semantic values.
1260 Refer to the stacks through separate pointers, to allow yyoverflow
1261 to reallocate them elsewhere. */
1263 /* The state stack. */
1264 yytype_int16 yyssa[YYINITDEPTH];
1266 yytype_int16 *yyssp;
1268 /* The semantic value stack. */
1269 YYSTYPE yyvsa[YYINITDEPTH];
1273 YYSIZE_T yystacksize;
1277 /* Lookahead token as an internal (translated) token number. */
1279 /* The variables used to return semantic value and location from the
1284 /* Buffer for error messages, and its allocated size. */
1286 char *yymsg = yymsgbuf;
1287 YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
1290 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
1292 /* The number of symbols on the RHS of the reduced rule.
1293 Keep to zero when no symbol should be popped. */
1296 yyssp = yyss = yyssa;
1297 yyvsp = yyvs = yyvsa;
1298 yystacksize = YYINITDEPTH;
1300 YYDPRINTF ((stderr, "Starting parse\n"));
1305 yychar = YYEMPTY; /* Cause a token to be read. */
1308 /*------------------------------------------------------------.
1309 | yynewstate -- Push a new state, which is found in yystate. |
1310 `------------------------------------------------------------*/
1312 /* In all cases, when you get here, the value and location stacks
1313 have just been pushed. So pushing a state here evens the stacks. */
1319 if (yyss + yystacksize - 1 <= yyssp)
1321 /* Get the current used size of the three stacks, in elements. */
1322 YYSIZE_T yysize = yyssp - yyss + 1;
1326 /* Give user a chance to reallocate the stack. Use copies of
1327 these so that the &'s don't force the real ones into
1329 YYSTYPE *yyvs1 = yyvs;
1330 yytype_int16 *yyss1 = yyss;
1332 /* Each stack pointer address is followed by the size of the
1333 data in use in that stack, in bytes. This used to be a
1334 conditional around just the two extra args, but that might
1335 be undefined if yyoverflow is a macro. */
1336 yyoverflow (YY_("memory exhausted"),
1337 &yyss1, yysize * sizeof (*yyssp),
1338 &yyvs1, yysize * sizeof (*yyvsp),
1344 #else /* no yyoverflow */
1345 # ifndef YYSTACK_RELOCATE
1346 goto yyexhaustedlab;
1348 /* Extend the stack our own way. */
1349 if (YYMAXDEPTH <= yystacksize)
1350 goto yyexhaustedlab;
1352 if (YYMAXDEPTH < yystacksize)
1353 yystacksize = YYMAXDEPTH;
1356 yytype_int16 *yyss1 = yyss;
1357 union yyalloc *yyptr =
1358 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1360 goto yyexhaustedlab;
1361 YYSTACK_RELOCATE (yyss_alloc, yyss);
1362 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
1363 # undef YYSTACK_RELOCATE
1365 YYSTACK_FREE (yyss1);
1368 #endif /* no yyoverflow */
1370 yyssp = yyss + yysize - 1;
1371 yyvsp = yyvs + yysize - 1;
1373 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
1374 (unsigned long int) yystacksize));
1376 if (yyss + yystacksize - 1 <= yyssp)
1380 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1382 if (yystate == YYFINAL)
1392 /* Do appropriate processing given the current state. Read a
1393 lookahead token if we need one and don't already have one. */
1395 /* First try to decide what to do without reference to lookahead token. */
1396 yyn = yypact[yystate];
1397 if (yypact_value_is_default (yyn))
1400 /* Not known => get a lookahead token if don't already have one. */
1402 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
1403 if (yychar == YYEMPTY)
1405 YYDPRINTF ((stderr, "Reading a token: "));
1409 if (yychar <= YYEOF)
1411 yychar = yytoken = YYEOF;
1412 YYDPRINTF ((stderr, "Now at end of input.\n"));
1416 yytoken = YYTRANSLATE (yychar);
1417 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
1420 /* If the proper action on seeing token YYTOKEN is to reduce or to
1421 detect an error, take that action. */
1423 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1428 if (yytable_value_is_error (yyn))
1434 /* Count tokens shifted since error; after three, turn off error
1439 /* Shift the lookahead token. */
1440 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
1442 /* Discard the shifted token. */
1446 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1448 YY_IGNORE_MAYBE_UNINITIALIZED_END
1453 /*-----------------------------------------------------------.
1454 | yydefault -- do the default action for the current state. |
1455 `-----------------------------------------------------------*/
1457 yyn = yydefact[yystate];
1463 /*-----------------------------.
1464 | yyreduce -- Do a reduction. |
1465 `-----------------------------*/
1467 /* yyn is the number of a rule to reduce with. */
1470 /* If YYLEN is nonzero, implement the default value of the action:
1473 Otherwise, the following line sets YYVAL to garbage.
1474 This behavior is undocumented and Bison
1475 users should not rely upon it. Assigning to YYVAL
1476 unconditionally makes the parser a bit smaller, and it avoids a
1477 GCC warning that YYVAL may be used uninitialized. */
1478 yyval = yyvsp[1-yylen];
1481 YY_REDUCE_PRINT (yyn);
1485 #line 124 "eqn.y" /* yacc.c:1646 */
1486 { (yyvsp[0].b)->top_level(); non_empty_flag = 1; }
1487 #line 1488 "eqn.cpp" /* yacc.c:1646 */
1491 #line 129 "eqn.y" /* yacc.c:1646 */
1492 { (yyval.b) = (yyvsp[0].b); }
1493 #line 1494 "eqn.cpp" /* yacc.c:1646 */
1497 #line 131 "eqn.y" /* yacc.c:1646 */
1499 list_box *lb = (yyvsp[-1].b)->to_list_box();
1501 lb = new list_box((yyvsp[-1].b));
1502 lb->append((yyvsp[0].b));
1505 #line 1506 "eqn.cpp" /* yacc.c:1646 */
1509 #line 142 "eqn.y" /* yacc.c:1646 */
1510 { (yyval.b) = (yyvsp[0].b); }
1511 #line 1512 "eqn.cpp" /* yacc.c:1646 */
1515 #line 144 "eqn.y" /* yacc.c:1646 */
1516 { (yyval.b) = make_mark_box((yyvsp[0].b)); }
1517 #line 1518 "eqn.cpp" /* yacc.c:1646 */
1521 #line 146 "eqn.y" /* yacc.c:1646 */
1522 { (yyval.b) = make_lineup_box((yyvsp[0].b)); }
1523 #line 1524 "eqn.cpp" /* yacc.c:1646 */
1527 #line 151 "eqn.y" /* yacc.c:1646 */
1528 { (yyval.b) = (yyvsp[0].b); }
1529 #line 1530 "eqn.cpp" /* yacc.c:1646 */
1533 #line 153 "eqn.y" /* yacc.c:1646 */
1534 { (yyval.b) = make_limit_box((yyvsp[-2].b), 0, (yyvsp[0].b)); }
1535 #line 1536 "eqn.cpp" /* yacc.c:1646 */
1539 #line 155 "eqn.y" /* yacc.c:1646 */
1540 { (yyval.b) = make_limit_box((yyvsp[-2].b), (yyvsp[0].b), 0); }
1541 #line 1542 "eqn.cpp" /* yacc.c:1646 */
1545 #line 157 "eqn.y" /* yacc.c:1646 */
1546 { (yyval.b) = make_limit_box((yyvsp[-4].b), (yyvsp[-2].b), (yyvsp[0].b)); }
1547 #line 1548 "eqn.cpp" /* yacc.c:1646 */
1551 #line 159 "eqn.y" /* yacc.c:1646 */
1552 { (yyval.b) = make_limit_box((yyvsp[-4].b), make_limit_box((yyvsp[-2].b), (yyvsp[0].b), 0), 0); }
1553 #line 1554 "eqn.cpp" /* yacc.c:1646 */
1557 #line 164 "eqn.y" /* yacc.c:1646 */
1558 { (yyval.b) = (yyvsp[0].b); }
1559 #line 1560 "eqn.cpp" /* yacc.c:1646 */
1563 #line 166 "eqn.y" /* yacc.c:1646 */
1564 { (yyval.b) = make_sqrt_box((yyvsp[0].b)); }
1565 #line 1566 "eqn.cpp" /* yacc.c:1646 */
1569 #line 168 "eqn.y" /* yacc.c:1646 */
1570 { (yyval.b) = make_over_box((yyvsp[-2].b), (yyvsp[0].b)); }
1571 #line 1572 "eqn.cpp" /* yacc.c:1646 */
1575 #line 170 "eqn.y" /* yacc.c:1646 */
1576 { (yyval.b) = make_small_over_box((yyvsp[-2].b), (yyvsp[0].b)); }
1577 #line 1578 "eqn.cpp" /* yacc.c:1646 */
1581 #line 175 "eqn.y" /* yacc.c:1646 */
1582 { (yyval.b) = (yyvsp[0].b); }
1583 #line 1584 "eqn.cpp" /* yacc.c:1646 */
1587 #line 177 "eqn.y" /* yacc.c:1646 */
1588 { (yyval.b) = make_script_box((yyvsp[-2].b), 0, (yyvsp[0].b)); }
1589 #line 1590 "eqn.cpp" /* yacc.c:1646 */
1593 #line 182 "eqn.y" /* yacc.c:1646 */
1594 { (yyval.b) = (yyvsp[0].b); }
1595 #line 1596 "eqn.cpp" /* yacc.c:1646 */
1599 #line 184 "eqn.y" /* yacc.c:1646 */
1600 { (yyval.b) = make_script_box((yyvsp[-2].b), (yyvsp[0].b), 0); }
1601 #line 1602 "eqn.cpp" /* yacc.c:1646 */
1605 #line 186 "eqn.y" /* yacc.c:1646 */
1606 { (yyval.b) = make_script_box((yyvsp[-4].b), (yyvsp[-2].b), (yyvsp[0].b)); }
1607 #line 1608 "eqn.cpp" /* yacc.c:1646 */
1611 #line 191 "eqn.y" /* yacc.c:1646 */
1612 { (yyval.b) = split_text((yyvsp[0].str)); }
1613 #line 1614 "eqn.cpp" /* yacc.c:1646 */
1617 #line 193 "eqn.y" /* yacc.c:1646 */
1618 { (yyval.b) = new quoted_text_box((yyvsp[0].str)); }
1619 #line 1620 "eqn.cpp" /* yacc.c:1646 */
1623 #line 195 "eqn.y" /* yacc.c:1646 */
1624 { (yyval.b) = split_text((yyvsp[0].str)); }
1625 #line 1626 "eqn.cpp" /* yacc.c:1646 */
1629 #line 197 "eqn.y" /* yacc.c:1646 */
1630 { (yyval.b) = new quoted_text_box((yyvsp[0].str)); }
1631 #line 1632 "eqn.cpp" /* yacc.c:1646 */
1635 #line 199 "eqn.y" /* yacc.c:1646 */
1636 { (yyval.b) = new half_space_box; }
1637 #line 1638 "eqn.cpp" /* yacc.c:1646 */
1641 #line 201 "eqn.y" /* yacc.c:1646 */
1642 { (yyval.b) = new space_box; }
1643 #line 1644 "eqn.cpp" /* yacc.c:1646 */
1647 #line 203 "eqn.y" /* yacc.c:1646 */
1648 { (yyval.b) = new tab_box; }
1649 #line 1650 "eqn.cpp" /* yacc.c:1646 */
1653 #line 205 "eqn.y" /* yacc.c:1646 */
1654 { (yyval.b) = (yyvsp[-1].b); }
1655 #line 1656 "eqn.cpp" /* yacc.c:1646 */
1659 #line 207 "eqn.y" /* yacc.c:1646 */
1660 { (yyvsp[0].pb)->set_alignment(CENTER_ALIGN); (yyval.b) = (yyvsp[0].pb); }
1661 #line 1662 "eqn.cpp" /* yacc.c:1646 */
1665 #line 209 "eqn.y" /* yacc.c:1646 */
1666 { (yyvsp[0].pb)->set_alignment(LEFT_ALIGN); (yyval.b) = (yyvsp[0].pb); }
1667 #line 1668 "eqn.cpp" /* yacc.c:1646 */
1671 #line 211 "eqn.y" /* yacc.c:1646 */
1672 { (yyvsp[0].pb)->set_alignment(RIGHT_ALIGN); (yyval.b) = (yyvsp[0].pb); }
1673 #line 1674 "eqn.cpp" /* yacc.c:1646 */
1677 #line 213 "eqn.y" /* yacc.c:1646 */
1678 { (yyvsp[0].pb)->set_alignment(CENTER_ALIGN); (yyval.b) = (yyvsp[0].pb); }
1679 #line 1680 "eqn.cpp" /* yacc.c:1646 */
1683 #line 215 "eqn.y" /* yacc.c:1646 */
1684 { (yyval.b) = (yyvsp[-1].mb); }
1685 #line 1686 "eqn.cpp" /* yacc.c:1646 */
1689 #line 217 "eqn.y" /* yacc.c:1646 */
1690 { (yyval.b) = make_delim_box((yyvsp[-3].str), (yyvsp[-2].b), (yyvsp[0].str)); }
1691 #line 1692 "eqn.cpp" /* yacc.c:1646 */
1695 #line 219 "eqn.y" /* yacc.c:1646 */
1696 { (yyval.b) = make_delim_box((yyvsp[-1].str), (yyvsp[0].b), 0); }
1697 #line 1698 "eqn.cpp" /* yacc.c:1646 */
1701 #line 221 "eqn.y" /* yacc.c:1646 */
1702 { (yyval.b) = make_overline_box((yyvsp[-1].b)); }
1703 #line 1704 "eqn.cpp" /* yacc.c:1646 */
1707 #line 223 "eqn.y" /* yacc.c:1646 */
1708 { (yyval.b) = make_underline_box((yyvsp[-1].b)); }
1709 #line 1710 "eqn.cpp" /* yacc.c:1646 */
1713 #line 225 "eqn.y" /* yacc.c:1646 */
1714 { (yyval.b) = make_prime_box((yyvsp[-1].b)); }
1715 #line 1716 "eqn.cpp" /* yacc.c:1646 */
1719 #line 227 "eqn.y" /* yacc.c:1646 */
1720 { (yyval.b) = make_accent_box((yyvsp[-2].b), (yyvsp[0].b)); }
1721 #line 1722 "eqn.cpp" /* yacc.c:1646 */
1725 #line 229 "eqn.y" /* yacc.c:1646 */
1726 { (yyval.b) = make_uaccent_box((yyvsp[-2].b), (yyvsp[0].b)); }
1727 #line 1728 "eqn.cpp" /* yacc.c:1646 */
1731 #line 231 "eqn.y" /* yacc.c:1646 */
1732 { (yyval.b) = new font_box(strsave(get_grfont()), (yyvsp[0].b)); }
1733 #line 1734 "eqn.cpp" /* yacc.c:1646 */
1737 #line 233 "eqn.y" /* yacc.c:1646 */
1738 { (yyval.b) = new font_box(strsave(get_gbfont()), (yyvsp[0].b)); }
1739 #line 1740 "eqn.cpp" /* yacc.c:1646 */
1743 #line 235 "eqn.y" /* yacc.c:1646 */
1744 { (yyval.b) = new font_box(strsave(get_gfont()), (yyvsp[0].b)); }
1745 #line 1746 "eqn.cpp" /* yacc.c:1646 */
1749 #line 237 "eqn.y" /* yacc.c:1646 */
1750 { (yyval.b) = new fat_box((yyvsp[0].b)); }
1751 #line 1752 "eqn.cpp" /* yacc.c:1646 */
1755 #line 239 "eqn.y" /* yacc.c:1646 */
1756 { (yyval.b) = new font_box((yyvsp[-1].str), (yyvsp[0].b)); }
1757 #line 1758 "eqn.cpp" /* yacc.c:1646 */
1761 #line 241 "eqn.y" /* yacc.c:1646 */
1762 { (yyval.b) = new size_box((yyvsp[-1].str), (yyvsp[0].b)); }
1763 #line 1764 "eqn.cpp" /* yacc.c:1646 */
1767 #line 243 "eqn.y" /* yacc.c:1646 */
1768 { (yyval.b) = new hmotion_box((yyvsp[-1].n), (yyvsp[0].b)); }
1769 #line 1770 "eqn.cpp" /* yacc.c:1646 */
1773 #line 245 "eqn.y" /* yacc.c:1646 */
1774 { (yyval.b) = new hmotion_box(-(yyvsp[-1].n), (yyvsp[0].b)); }
1775 #line 1776 "eqn.cpp" /* yacc.c:1646 */
1779 #line 247 "eqn.y" /* yacc.c:1646 */
1780 { (yyval.b) = new vmotion_box((yyvsp[-1].n), (yyvsp[0].b)); }
1781 #line 1782 "eqn.cpp" /* yacc.c:1646 */
1785 #line 249 "eqn.y" /* yacc.c:1646 */
1786 { (yyval.b) = new vmotion_box(-(yyvsp[-1].n), (yyvsp[0].b)); }
1787 #line 1788 "eqn.cpp" /* yacc.c:1646 */
1791 #line 251 "eqn.y" /* yacc.c:1646 */
1792 { (yyvsp[0].b)->set_spacing_type((yyvsp[-1].str)); (yyval.b) = (yyvsp[0].b); }
1793 #line 1794 "eqn.cpp" /* yacc.c:1646 */
1797 #line 253 "eqn.y" /* yacc.c:1646 */
1798 { (yyval.b) = new vcenter_box((yyvsp[0].b)); }
1799 #line 1800 "eqn.cpp" /* yacc.c:1646 */
1803 #line 255 "eqn.y" /* yacc.c:1646 */
1804 { (yyval.b) = make_special_box((yyvsp[-1].str), (yyvsp[0].b)); }
1805 #line 1806 "eqn.cpp" /* yacc.c:1646 */
1809 #line 260 "eqn.y" /* yacc.c:1646 */
1812 if (sscanf((yyvsp[0].str), "%d", &n) == 1)
1814 a_delete (yyvsp[0].str);
1816 #line 1817 "eqn.cpp" /* yacc.c:1646 */
1820 #line 270 "eqn.y" /* yacc.c:1646 */
1821 { (yyval.pb) = new pile_box((yyvsp[0].b)); }
1822 #line 1823 "eqn.cpp" /* yacc.c:1646 */
1826 #line 272 "eqn.y" /* yacc.c:1646 */
1827 { (yyvsp[-2].pb)->append((yyvsp[0].b)); (yyval.pb) = (yyvsp[-2].pb); }
1828 #line 1829 "eqn.cpp" /* yacc.c:1646 */
1832 #line 277 "eqn.y" /* yacc.c:1646 */
1833 { (yyval.pb) = (yyvsp[-1].pb); }
1834 #line 1835 "eqn.cpp" /* yacc.c:1646 */
1838 #line 279 "eqn.y" /* yacc.c:1646 */
1839 { (yyvsp[-1].pb)->set_space((yyvsp[-3].n)); (yyval.pb) = (yyvsp[-1].pb); }
1840 #line 1841 "eqn.cpp" /* yacc.c:1646 */
1844 #line 284 "eqn.y" /* yacc.c:1646 */
1845 { (yyval.mb) = new matrix_box((yyvsp[0].col)); }
1846 #line 1847 "eqn.cpp" /* yacc.c:1646 */
1850 #line 286 "eqn.y" /* yacc.c:1646 */
1851 { (yyvsp[-1].mb)->append((yyvsp[0].col)); (yyval.mb) = (yyvsp[-1].mb); }
1852 #line 1853 "eqn.cpp" /* yacc.c:1646 */
1856 #line 291 "eqn.y" /* yacc.c:1646 */
1857 { (yyval.col) = new column((yyvsp[0].b)); }
1858 #line 1859 "eqn.cpp" /* yacc.c:1646 */
1862 #line 293 "eqn.y" /* yacc.c:1646 */
1863 { (yyvsp[-2].col)->append((yyvsp[0].b)); (yyval.col) = (yyvsp[-2].col); }
1864 #line 1865 "eqn.cpp" /* yacc.c:1646 */
1868 #line 298 "eqn.y" /* yacc.c:1646 */
1869 { (yyval.col) = (yyvsp[-1].col); }
1870 #line 1871 "eqn.cpp" /* yacc.c:1646 */
1874 #line 300 "eqn.y" /* yacc.c:1646 */
1875 { (yyvsp[-1].col)->set_space((yyvsp[-3].n)); (yyval.col) = (yyvsp[-1].col); }
1876 #line 1877 "eqn.cpp" /* yacc.c:1646 */
1880 #line 305 "eqn.y" /* yacc.c:1646 */
1881 { (yyvsp[0].col)->set_alignment(CENTER_ALIGN); (yyval.col) = (yyvsp[0].col); }
1882 #line 1883 "eqn.cpp" /* yacc.c:1646 */
1886 #line 307 "eqn.y" /* yacc.c:1646 */
1887 { (yyvsp[0].col)->set_alignment(LEFT_ALIGN); (yyval.col) = (yyvsp[0].col); }
1888 #line 1889 "eqn.cpp" /* yacc.c:1646 */
1892 #line 309 "eqn.y" /* yacc.c:1646 */
1893 { (yyvsp[0].col)->set_alignment(RIGHT_ALIGN); (yyval.col) = (yyvsp[0].col); }
1894 #line 1895 "eqn.cpp" /* yacc.c:1646 */
1898 #line 311 "eqn.y" /* yacc.c:1646 */
1899 { (yyvsp[0].col)->set_alignment(CENTER_ALIGN); (yyval.col) = (yyvsp[0].col); }
1900 #line 1901 "eqn.cpp" /* yacc.c:1646 */
1904 #line 315 "eqn.y" /* yacc.c:1646 */
1905 { (yyval.str) = (yyvsp[0].str); }
1906 #line 1907 "eqn.cpp" /* yacc.c:1646 */
1910 #line 317 "eqn.y" /* yacc.c:1646 */
1911 { (yyval.str) = (yyvsp[0].str); }
1912 #line 1913 "eqn.cpp" /* yacc.c:1646 */
1916 #line 322 "eqn.y" /* yacc.c:1646 */
1917 { (yyval.str) = (yyvsp[0].str); }
1918 #line 1919 "eqn.cpp" /* yacc.c:1646 */
1922 #line 324 "eqn.y" /* yacc.c:1646 */
1923 { (yyval.str) = strsave("{"); }
1924 #line 1925 "eqn.cpp" /* yacc.c:1646 */
1928 #line 326 "eqn.y" /* yacc.c:1646 */
1929 { (yyval.str) = strsave("}"); }
1930 #line 1931 "eqn.cpp" /* yacc.c:1646 */
1934 #line 1935 "eqn.cpp" /* yacc.c:1646 */
1937 /* User semantic actions sometimes alter yychar, and that requires
1938 that yytoken be updated with the new translation. We take the
1939 approach of translating immediately before every use of yytoken.
1940 One alternative is translating here after every semantic action,
1941 but that translation would be missed if the semantic action invokes
1942 YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
1943 if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
1944 incorrect destructor might then be invoked immediately. In the
1945 case of YYERROR or YYBACKUP, subsequent parser actions might lead
1946 to an incorrect destructor call or verbose syntax error message
1947 before the lookahead is translated. */
1948 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
1952 YY_STACK_PRINT (yyss, yyssp);
1956 /* Now 'shift' the result of the reduction. Determine what state
1957 that goes to, based on the state we popped back to and the rule
1958 number reduced by. */
1962 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
1963 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
1964 yystate = yytable[yystate];
1966 yystate = yydefgoto[yyn - YYNTOKENS];
1971 /*--------------------------------------.
1972 | yyerrlab -- here on detecting error. |
1973 `--------------------------------------*/
1975 /* Make sure we have latest lookahead translation. See comments at
1976 user semantic actions for why this is necessary. */
1977 yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
1979 /* If not already recovering from an error, report this error. */
1983 #if ! YYERROR_VERBOSE
1984 yyerror (YY_("syntax error"));
1986 # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
1989 char const *yymsgp = YY_("syntax error");
1990 int yysyntax_error_status;
1991 yysyntax_error_status = YYSYNTAX_ERROR;
1992 if (yysyntax_error_status == 0)
1994 else if (yysyntax_error_status == 1)
1996 if (yymsg != yymsgbuf)
1997 YYSTACK_FREE (yymsg);
1998 yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
2002 yymsg_alloc = sizeof yymsgbuf;
2003 yysyntax_error_status = 2;
2007 yysyntax_error_status = YYSYNTAX_ERROR;
2012 if (yysyntax_error_status == 2)
2013 goto yyexhaustedlab;
2015 # undef YYSYNTAX_ERROR
2021 if (yyerrstatus == 3)
2023 /* If just tried and failed to reuse lookahead token after an
2024 error, discard it. */
2026 if (yychar <= YYEOF)
2028 /* Return failure if at end of input. */
2029 if (yychar == YYEOF)
2034 yydestruct ("Error: discarding",
2040 /* Else will try to reuse lookahead token after shifting the error
2045 /*---------------------------------------------------.
2046 | yyerrorlab -- error raised explicitly by YYERROR. |
2047 `---------------------------------------------------*/
2050 /* Pacify compilers like GCC when the user code never invokes
2051 YYERROR and the label yyerrorlab therefore never appears in user
2053 if (/*CONSTCOND*/ 0)
2056 /* Do not reclaim the symbols of the rule whose action triggered
2060 YY_STACK_PRINT (yyss, yyssp);
2065 /*-------------------------------------------------------------.
2066 | yyerrlab1 -- common code for both syntax error and YYERROR. |
2067 `-------------------------------------------------------------*/
2069 yyerrstatus = 3; /* Each real token shifted decrements this. */
2073 yyn = yypact[yystate];
2074 if (!yypact_value_is_default (yyn))
2077 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
2085 /* Pop the current state because it cannot handle the error token. */
2090 yydestruct ("Error: popping",
2091 yystos[yystate], yyvsp);
2094 YY_STACK_PRINT (yyss, yyssp);
2097 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
2099 YY_IGNORE_MAYBE_UNINITIALIZED_END
2102 /* Shift the error token. */
2103 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
2109 /*-------------------------------------.
2110 | yyacceptlab -- YYACCEPT comes here. |
2111 `-------------------------------------*/
2116 /*-----------------------------------.
2117 | yyabortlab -- YYABORT comes here. |
2118 `-----------------------------------*/
2123 #if !defined yyoverflow || YYERROR_VERBOSE
2124 /*-------------------------------------------------.
2125 | yyexhaustedlab -- memory exhaustion comes here. |
2126 `-------------------------------------------------*/
2128 yyerror (YY_("memory exhausted"));
2134 if (yychar != YYEMPTY)
2136 /* Make sure we have latest lookahead translation. See comments at
2137 user semantic actions for why this is necessary. */
2138 yytoken = YYTRANSLATE (yychar);
2139 yydestruct ("Cleanup: discarding lookahead",
2142 /* Do not reclaim the symbols of the rule whose action triggered
2143 this YYABORT or YYACCEPT. */
2145 YY_STACK_PRINT (yyss, yyssp);
2146 while (yyssp != yyss)
2148 yydestruct ("Cleanup: popping",
2149 yystos[*yyssp], yyvsp);
2154 YYSTACK_FREE (yyss);
2157 if (yymsg != yymsgbuf)
2158 YYSTACK_FREE (yymsg);
2162 #line 329 "eqn.y" /* yacc.c:1906 */