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 19 "pic.y" /* yacc.c:339 */
71 extern int delim_flag;
72 extern void copy_rest_thru(const char *, const char *);
73 extern void copy_file_thru(const char *, const char *, const char *);
74 extern void push_body(const char *);
75 extern void do_for(char *var, double from, double to,
76 int by_is_multiplicative, double by, char *body);
77 extern void do_lookahead();
79 /* Maximum number of characters produced by printf("%g") */
83 void yyerror(const char *);
85 void reset(const char *nm);
88 place *lookup_label(const char *);
89 void define_label(const char *label, const place *pl);
91 direction current_direction;
92 position current_position;
94 implement_ptable(place)
96 PTABLE(place) top_table;
98 PTABLE(place) *current_table = &top_table;
99 saved_state *current_saved_state = 0;
103 const char *ordinal_postfix(int n);
104 const char *object_type_name(object_type type);
105 char *format_number(const char *form, double n);
106 char *do_sprintf(const char *form, const double *v, int nv);
109 #line 110 "pic.cpp" /* yacc.c:339 */
112 # if defined __cplusplus && 201103L <= __cplusplus
113 # define YY_NULLPTR nullptr
115 # define YY_NULLPTR 0
119 /* Enabling verbose error messages. */
120 #ifdef YYERROR_VERBOSE
121 # undef YYERROR_VERBOSE
122 # define YYERROR_VERBOSE 1
124 # define YYERROR_VERBOSE 0
127 /* In a future release of Bison, this section will be replaced
128 by #include "y.tab.h". */
129 #ifndef YY_YY_Y_TAB_H_INCLUDED
130 # define YY_YY_Y_TAB_H_INCLUDED
152 LEFT_ARROW_HEAD = 266,
153 RIGHT_ARROW_HEAD = 267,
154 DOUBLE_ARROW_HEAD = 268,
273 #define COMMAND_LINE 262
274 #define DELIMITED 263
277 #define LEFT_ARROW_HEAD 266
278 #define RIGHT_ARROW_HEAD 267
279 #define DOUBLE_ARROW_HEAD 268
309 #define INVISIBLE 298
329 #define DOT_START 318
364 #define EQUALEQUAL 353
365 #define LESSEQUAL 354
366 #define GREATEREQUAL 355
367 #define LEFT_CORNER 356
368 #define RIGHT_CORNER 357
379 #define THICKNESS 368
393 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
394 typedef union YYSTYPE YYSTYPE;
397 #line 65 "pic.y" /* yacc.c:355 */
402 struct { double x, y; } pair;
403 struct { double x; char *body; } if_data;
404 struct { char *str; const char *filename; int lineno; } lstr;
405 struct { double *v; int nv; int maxv; } dv;
406 struct { double val; int is_multiplicative; } by;
413 graphics_state state;
416 #line 417 "pic.cpp" /* yacc.c:355 */
418 # define YYSTYPE_IS_TRIVIAL 1
419 # define YYSTYPE_IS_DECLARED 1
423 extern YYSTYPE yylval;
427 #endif /* !YY_YY_Y_TAB_H_INCLUDED */
429 /* Copy the second part of user declarations. */
431 #line 432 "pic.cpp" /* yacc.c:358 */
438 typedef YYTYPE_UINT8 yytype_uint8;
440 typedef unsigned char yytype_uint8;
444 typedef YYTYPE_INT8 yytype_int8;
446 typedef signed char yytype_int8;
450 typedef YYTYPE_UINT16 yytype_uint16;
452 typedef unsigned short int yytype_uint16;
456 typedef YYTYPE_INT16 yytype_int16;
458 typedef short int yytype_int16;
462 # ifdef __SIZE_TYPE__
463 # define YYSIZE_T __SIZE_TYPE__
464 # elif defined size_t
465 # define YYSIZE_T size_t
466 # elif ! defined YYSIZE_T
467 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
468 # define YYSIZE_T size_t
470 # define YYSIZE_T unsigned int
474 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
477 # if defined YYENABLE_NLS && YYENABLE_NLS
479 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
480 # define YY_(Msgid) dgettext ("bison-runtime", Msgid)
484 # define YY_(Msgid) Msgid
489 # if (defined __GNUC__ \
490 && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \
491 || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C
492 # define YY_ATTRIBUTE(Spec) __attribute__(Spec)
494 # define YY_ATTRIBUTE(Spec) /* empty */
498 #ifndef YY_ATTRIBUTE_PURE
499 # define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__))
502 #ifndef YY_ATTRIBUTE_UNUSED
503 # define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__))
506 #if !defined _Noreturn \
507 && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112)
508 # if defined _MSC_VER && 1200 <= _MSC_VER
509 # define _Noreturn __declspec (noreturn)
511 # define _Noreturn YY_ATTRIBUTE ((__noreturn__))
515 /* Suppress unused-variable warnings by "using" E. */
516 #if ! defined lint || defined __GNUC__
517 # define YYUSE(E) ((void) (E))
519 # define YYUSE(E) /* empty */
522 #if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
523 /* Suppress an incorrect diagnostic about yylval being uninitialized. */
524 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
525 _Pragma ("GCC diagnostic push") \
526 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
527 _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
528 # define YY_IGNORE_MAYBE_UNINITIALIZED_END \
529 _Pragma ("GCC diagnostic pop")
531 # define YY_INITIAL_VALUE(Value) Value
533 #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
534 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
535 # define YY_IGNORE_MAYBE_UNINITIALIZED_END
537 #ifndef YY_INITIAL_VALUE
538 # define YY_INITIAL_VALUE(Value) /* Nothing. */
542 #if ! defined yyoverflow || YYERROR_VERBOSE
544 /* The parser invokes alloca or malloc; define the necessary symbols. */
546 # ifdef YYSTACK_USE_ALLOCA
547 # if YYSTACK_USE_ALLOCA
549 # define YYSTACK_ALLOC __builtin_alloca
550 # elif defined __BUILTIN_VA_ARG_INCR
551 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
553 # define YYSTACK_ALLOC __alloca
554 # elif defined _MSC_VER
555 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
556 # define alloca _alloca
558 # define YYSTACK_ALLOC alloca
559 # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
560 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
561 /* Use EXIT_SUCCESS as a witness for stdlib.h. */
562 # ifndef EXIT_SUCCESS
563 # define EXIT_SUCCESS 0
570 # ifdef YYSTACK_ALLOC
571 /* Pacify GCC's 'empty if-body' warning. */
572 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
573 # ifndef YYSTACK_ALLOC_MAXIMUM
574 /* The OS might guarantee only one guard page at the bottom of the stack,
575 and a page size can be as small as 4096 bytes. So we cannot safely
576 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
577 to allow for a few compiler-allocated temporary stack slots. */
578 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
581 # define YYSTACK_ALLOC YYMALLOC
582 # define YYSTACK_FREE YYFREE
583 # ifndef YYSTACK_ALLOC_MAXIMUM
584 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
586 # if (defined __cplusplus && ! defined EXIT_SUCCESS \
587 && ! ((defined YYMALLOC || defined malloc) \
588 && (defined YYFREE || defined free)))
589 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
590 # ifndef EXIT_SUCCESS
591 # define EXIT_SUCCESS 0
595 # define YYMALLOC malloc
596 # if ! defined malloc && ! defined EXIT_SUCCESS
597 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
602 # if ! defined free && ! defined EXIT_SUCCESS
603 void free (void *); /* INFRINGES ON USER NAME SPACE */
607 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
610 #if (! defined yyoverflow \
611 && (! defined __cplusplus \
612 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
614 /* A type that is properly aligned for any stack member. */
617 yytype_int16 yyss_alloc;
621 /* The size of the maximum gap between one aligned stack and the next. */
622 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
624 /* The size of an array large to enough to hold all stacks, each with
626 # define YYSTACK_BYTES(N) \
627 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
628 + YYSTACK_GAP_MAXIMUM)
630 # define YYCOPY_NEEDED 1
632 /* Relocate STACK from its old location to the new one. The
633 local variables YYSIZE and YYSTACKSIZE give the old and new number of
634 elements in the stack, and YYPTR gives the new location of the
635 stack. Advance YYPTR to a properly aligned location for the next
637 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
640 YYSIZE_T yynewbytes; \
641 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
642 Stack = &yyptr->Stack_alloc; \
643 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
644 yyptr += yynewbytes / sizeof (*yyptr); \
650 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
651 /* Copy COUNT objects from SRC to DST. The source and destination do
654 # if defined __GNUC__ && 1 < __GNUC__
655 # define YYCOPY(Dst, Src, Count) \
656 __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
658 # define YYCOPY(Dst, Src, Count) \
662 for (yyi = 0; yyi < (Count); yyi++) \
663 (Dst)[yyi] = (Src)[yyi]; \
668 #endif /* !YYCOPY_NEEDED */
670 /* YYFINAL -- State number of the termination state. */
672 /* YYLAST -- Last index in YYTABLE. */
675 /* YYNTOKENS -- Number of terminals. */
676 #define YYNTOKENS 146
677 /* YYNNTS -- Number of nonterminals. */
679 /* YYNRULES -- Number of rules. */
681 /* YYNSTATES -- Number of states. */
682 #define YYNSTATES 454
684 /* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned
685 by yylex, with out-of-bounds checking. */
687 #define YYMAXUTOK 379
689 #define YYTRANSLATE(YYX) \
690 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
692 /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
693 as returned by yylex, without out-of-bounds checking. */
694 static const yytype_uint8 yytranslate[] =
696 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
697 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
698 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
699 2, 2, 2, 137, 2, 2, 2, 136, 2, 2,
700 126, 145, 134, 132, 129, 133, 125, 135, 2, 2,
701 2, 2, 2, 2, 2, 2, 2, 2, 141, 139,
702 130, 140, 131, 2, 2, 2, 2, 2, 2, 2,
703 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
704 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
705 2, 128, 2, 144, 138, 2, 127, 2, 2, 2,
706 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
707 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
708 2, 2, 2, 142, 2, 143, 2, 2, 2, 2,
709 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
710 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
711 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
712 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
713 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
714 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
715 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
716 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
717 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
718 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
719 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
720 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
721 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
722 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
723 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
724 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
725 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
726 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
727 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
728 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
729 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
730 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
731 95, 96, 97, 98, 99, 100, 101, 102, 103, 104,
732 105, 106, 107, 108, 109, 110, 111, 112, 113, 114,
733 115, 116, 117, 118, 119, 120, 121, 122, 123, 124
737 /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
738 static const yytype_uint16 yyrline[] =
740 0, 275, 275, 276, 285, 290, 292, 296, 298, 302,
741 303, 307, 315, 320, 332, 334, 336, 338, 340, 345,
742 350, 357, 356, 367, 375, 377, 374, 388, 390, 387,
743 400, 399, 408, 417, 416, 430, 431, 436, 437, 441,
744 446, 451, 459, 461, 480, 487, 489, 500, 499, 511,
745 512, 517, 519, 524, 530, 536, 538, 540, 542, 544,
746 546, 548, 555, 559, 564, 572, 586, 592, 600, 607,
747 613, 606, 622, 632, 633, 638, 640, 642, 644, 649,
748 656, 663, 670, 677, 682, 687, 695, 694, 721, 727,
749 733, 739, 745, 764, 771, 778, 785, 792, 799, 806,
750 813, 820, 827, 842, 854, 860, 869, 876, 901, 905,
751 911, 917, 923, 929, 934, 940, 946, 952, 959, 968,
752 975, 991, 1008, 1013, 1018, 1023, 1028, 1033, 1038, 1043,
753 1051, 1061, 1071, 1081, 1091, 1097, 1105, 1107, 1119, 1124,
754 1154, 1156, 1162, 1171, 1173, 1178, 1183, 1188, 1193, 1198,
755 1203, 1209, 1214, 1222, 1223, 1227, 1232, 1238, 1240, 1246,
756 1252, 1258, 1267, 1277, 1279, 1288, 1290, 1298, 1300, 1305,
757 1320, 1338, 1340, 1342, 1344, 1346, 1348, 1350, 1352, 1354,
758 1359, 1361, 1369, 1373, 1375, 1383, 1385, 1391, 1397, 1403,
759 1409, 1418, 1420, 1422, 1424, 1426, 1428, 1430, 1432, 1434,
760 1436, 1438, 1440, 1442, 1444, 1446, 1448, 1450, 1452, 1454,
761 1456, 1458, 1460, 1462, 1464, 1466, 1468, 1470, 1472, 1474,
762 1476, 1478, 1480, 1485, 1487, 1492, 1497, 1505, 1507, 1514,
763 1521, 1528, 1535, 1542, 1544, 1546, 1548, 1556, 1564, 1577,
764 1579, 1581, 1590, 1599, 1612, 1621, 1630, 1639, 1641, 1643,
765 1645, 1647, 1653, 1658, 1660, 1662, 1664, 1666, 1668, 1670,
770 #if YYDEBUG || YYERROR_VERBOSE || 0
771 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
772 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
773 static const char *const yytname[] =
775 "$end", "error", "$undefined", "LABEL", "VARIABLE", "NUMBER", "TEXT",
776 "COMMAND_LINE", "DELIMITED", "ORDINAL", "TH", "LEFT_ARROW_HEAD",
777 "RIGHT_ARROW_HEAD", "DOUBLE_ARROW_HEAD", "LAST", "BOX", "CIRCLE",
778 "ELLIPSE", "ARC", "LINE", "ARROW", "MOVE", "SPLINE", "HEIGHT", "RADIUS",
779 "FIGNAME", "WIDTH", "DIAMETER", "UP", "DOWN", "RIGHT", "LEFT", "FROM",
780 "TO", "AT", "WITH", "BY", "THEN", "SOLID", "DOTTED", "DASHED", "CHOP",
781 "SAME", "INVISIBLE", "LJUST", "RJUST", "ABOVE", "BELOW", "OF", "THE",
782 "WAY", "BETWEEN", "AND", "HERE", "DOT_N", "DOT_E", "DOT_W", "DOT_S",
783 "DOT_NE", "DOT_SE", "DOT_NW", "DOT_SW", "DOT_C", "DOT_START", "DOT_END",
784 "DOT_X", "DOT_Y", "DOT_HT", "DOT_WID", "DOT_RAD", "SIN", "COS", "ATAN2",
785 "LOG", "EXP", "SQRT", "K_MAX", "K_MIN", "INT", "RAND", "SRAND", "COPY",
786 "THRU", "TOP", "BOTTOM", "UPPER", "LOWER", "SH", "PRINT", "CW", "CCW",
787 "FOR", "DO", "IF", "ELSE", "ANDAND", "OROR", "NOTEQUAL", "EQUALEQUAL",
788 "LESSEQUAL", "GREATEREQUAL", "LEFT_CORNER", "RIGHT_CORNER", "NORTH",
789 "SOUTH", "EAST", "WEST", "CENTER", "END", "START", "RESET", "UNTIL",
790 "PLOT", "THICKNESS", "FILL", "COLORED", "OUTLINED", "SHADED", "XSLANTED",
791 "YSLANTED", "ALIGNED", "SPRINTF", "COMMAND", "DEFINE", "UNDEF", "'.'",
792 "'('", "'`'", "'['", "','", "'<'", "'>'", "'+'", "'-'", "'*'", "'/'",
793 "'%'", "'!'", "'^'", "';'", "'='", "':'", "'{'", "'}'", "']'", "')'",
794 "$accept", "top", "element_list", "middle_element_list",
795 "optional_separator", "separator", "placeless_element", "$@1", "$@2",
796 "$@3", "$@4", "$@5", "$@6", "$@7", "macro_name", "reset_variables",
797 "print_args", "print_arg", "simple_if", "$@8", "until", "any_expr",
798 "text_expr", "optional_by", "element", "@9", "$@10", "optional_element",
799 "object_spec", "@11", "text", "sprintf_args", "position",
800 "position_not_place", "between", "expr_pair", "place", "label",
801 "ordinal", "optional_ordinal_last", "nth_primitive", "object_type",
802 "label_path", "relative_path", "path", "corner", "expr",
803 "expr_lower_than", "expr_not_lower_than", YY_NULLPTR
808 /* YYTOKNUM[NUM] -- (External) token number corresponding to the
809 (internal) symbol number NUM (which must be that of a token). */
810 static const yytype_uint16 yytoknum[] =
812 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
813 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
814 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
815 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
816 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
817 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
818 315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
819 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
820 335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
821 345, 346, 347, 348, 349, 350, 351, 352, 353, 354,
822 355, 356, 357, 358, 359, 360, 361, 362, 363, 364,
823 365, 366, 367, 368, 369, 370, 371, 372, 373, 374,
824 375, 376, 377, 378, 379, 46, 40, 96, 91, 44,
825 60, 62, 43, 45, 42, 47, 37, 33, 94, 59,
826 61, 58, 123, 125, 93, 41
830 #define YYPACT_NINF -240
832 #define yypact_value_is_default(Yystate) \
833 (!!((Yystate) == (-240)))
835 #define YYTABLE_NINF -206
837 #define yytable_value_is_error(Yytable_value) \
840 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
842 static const yytype_int16 yypact[] =
844 -114, -240, 20, -240, 757, -107, -240, -98, -123, -240,
845 -240, -240, -240, -240, -240, -240, -240, -240, -240, -106,
846 -240, -240, -240, -240, 9, -240, 1087, 46, 1172, 49,
847 1597, -70, 1087, -240, -240, -114, -240, 3, -33, -240,
848 877, -240, -240, -114, 1172, -60, 36, -14, -240, 74,
849 -240, -240, -240, -240, -240, -240, -240, -240, -240, -240,
850 -240, -240, -240, -240, -240, -240, -240, -240, -240, -34,
851 -18, 8, 38, 47, 51, 65, 101, 102, 112, 122,
852 -240, -240, 21, 150, -240, -240, -240, -240, -240, -240,
853 -240, -240, -240, 1257, 1172, 1597, 1597, 1087, -240, -240,
854 -43, -240, -240, 357, 2242, 59, 258, -240, 10, 2147,
855 -240, 1, 6, 1172, 1172, 145, -1, 2, 357, 2273,
856 -240, -240, 220, 249, 1087, -114, -114, -240, 721, -240,
857 252, -240, -240, -240, -240, 1597, 1597, 1597, 1597, 2024,
858 2024, 1853, 1939, 1682, 1682, 1682, 1427, 1767, -240, -240,
859 2024, 2024, 2024, -240, -240, -240, -240, -240, -240, -240,
860 -240, 1597, 2024, 23, 23, 23, 1597, 1597, -240, -240,
861 2282, 593, -240, 1172, -240, -240, -240, -240, 250, -240,
862 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 458,
863 1172, -240, -240, -240, -240, -240, -240, -240, -240, 121,
864 107, 123, 256, 2157, 137, 261, 134, 134, -240, 1767,
865 1767, -240, -240, -240, -240, -240, 276, -240, -240, -240,
866 -240, -240, -240, -240, -240, -240, -240, 138, -240, -240,
867 24, 156, 235, -240, 1597, 1597, 1597, 1597, 1597, 1597,
868 1597, 1597, 1597, 1597, 1597, 1597, 1597, 1597, 1597, 1682,
869 1682, 1597, -240, 134, -240, 1172, 1172, 23, 23, 1172,
870 1172, -240, -240, 143, 757, 153, -240, -240, 280, 2282,
871 2282, 2282, 2282, 2282, 2282, 2282, 2282, -43, 2147, -43,
872 -43, 2253, 275, 275, 295, 1002, -43, 2081, -240, -240,
873 10, 1342, -240, 694, 2282, 2282, 2282, 2282, 2282, -240,
874 -240, -240, 2282, 2282, -98, -123, 16, 28, -240, -43,
875 56, 302, -240, 291, -240, 155, 160, 172, 161, 164,
876 167, 184, 185, 181, -240, 186, 188, -240, 1682, 1767,
877 1767, -240, -240, 1682, 1682, -240, -240, -240, -240, -240,
878 156, 279, 314, 2291, 440, 440, 413, 413, 2282, 413,
879 413, -72, -72, 134, 134, 134, 134, -49, 117, 343,
880 322, -240, 314, 239, 2300, -240, -240, -240, 314, 239,
881 2300, -119, -240, -240, -240, -240, -240, 2116, 2116, -240,
882 206, 333, -240, 123, 2131, -240, 228, -240, -240, 1172,
883 -240, -240, -240, 1172, 1172, -240, -240, -240, -110, 195,
884 197, -47, 128, 292, 1682, 1682, 1597, -240, 1597, -240,
885 757, -240, -240, 2116, -240, 228, 338, -240, 200, 202,
886 212, -240, -240, -240, 1682, 1682, -240, -43, -27, 360,
887 2282, -240, -240, 214, -240, -240, -240, -240, -240, -73,
888 30, -240, 1512, 268, -240, -240, 216, 1597, 2282, -240,
889 -240, 2282, 354, -240
892 /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
893 Performed when YYTABLE does not specify something else to do. Zero
894 means the default is an error. */
895 static const yytype_uint16 yydefact[] =
897 7, 9, 0, 3, 2, 8, 1, 0, 0, 136,
898 18, 75, 76, 77, 78, 79, 80, 81, 82, 0,
899 14, 15, 17, 16, 0, 21, 0, 0, 0, 36,
900 0, 0, 0, 86, 69, 7, 72, 35, 32, 5,
901 65, 83, 10, 7, 0, 0, 0, 23, 27, 0,
902 162, 226, 227, 165, 167, 205, 204, 161, 191, 192,
903 193, 194, 195, 196, 197, 198, 199, 200, 201, 0,
904 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
905 202, 203, 0, 0, 210, 211, 216, 217, 218, 219,
906 220, 222, 221, 0, 0, 0, 0, 20, 42, 45,
907 46, 140, 143, 141, 157, 0, 0, 163, 0, 44,
908 223, 224, 0, 0, 0, 0, 52, 0, 0, 51,
909 224, 39, 84, 0, 19, 7, 7, 4, 8, 40,
910 0, 33, 124, 125, 126, 0, 0, 0, 0, 93,
911 95, 97, 99, 0, 0, 0, 0, 0, 107, 108,
912 109, 111, 120, 122, 123, 130, 131, 132, 133, 127,
913 128, 0, 113, 0, 0, 0, 0, 0, 135, 129,
914 92, 0, 12, 0, 38, 37, 11, 24, 0, 22,
915 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
916 0, 208, 206, 212, 214, 209, 207, 213, 215, 0,
917 0, 143, 141, 51, 224, 0, 239, 260, 43, 0,
918 0, 228, 229, 230, 231, 232, 0, 158, 179, 168,
919 171, 172, 173, 174, 175, 176, 177, 0, 169, 170,
920 0, 159, 0, 153, 0, 0, 0, 0, 0, 0,
921 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
922 0, 0, 61, 260, 47, 0, 0, 0, 0, 0,
923 0, 85, 138, 0, 0, 0, 6, 41, 0, 88,
924 89, 90, 91, 94, 96, 98, 100, 101, 0, 102,
925 103, 162, 165, 167, 0, 0, 105, 183, 185, 104,
926 182, 0, 106, 0, 110, 112, 121, 134, 114, 118,
927 119, 117, 115, 116, 162, 226, 205, 204, 66, 0,
928 67, 68, 13, 0, 28, 0, 0, 0, 0, 0,
929 0, 0, 0, 0, 251, 0, 0, 240, 0, 0,
930 0, 156, 142, 0, 0, 166, 144, 146, 164, 178,
931 160, 0, 258, 259, 257, 256, 253, 255, 155, 225,
932 254, 233, 234, 235, 236, 237, 238, 0, 0, 0,
933 0, 55, 56, 58, 59, 54, 53, 57, 258, 60,
934 259, 0, 87, 70, 34, 190, 182, 0, 0, 180,
935 0, 0, 184, 0, 51, 25, 49, 241, 242, 0,
936 244, 245, 246, 0, 0, 249, 250, 252, 0, 144,
937 146, 0, 0, 0, 0, 0, 0, 48, 0, 137,
938 73, 189, 188, 0, 181, 49, 0, 29, 0, 0,
939 0, 148, 145, 147, 0, 0, 154, 149, 0, 62,
940 139, 74, 71, 0, 26, 50, 243, 247, 248, 149,
941 0, 151, 0, 0, 186, 150, 151, 0, 63, 30,
945 /* YYPGOTO[NTERM-NUM]. */
946 static const yytype_int16 yypgoto[] =
948 -240, -240, 17, -240, 12, 329, -240, -240, -240, -240,
949 -240, -240, -240, -240, -240, -240, 334, -76, -240, -240,
950 -42, 13, -103, -240, -127, -240, -240, -240, -240, -240,
951 5, -240, 99, 194, 169, -44, 4, -100, -240, -240,
952 -240, -104, -240, -239, -240, -50, -26, -240, 61
955 /* YYDEFGOTO[NTERM-NUM]. */
956 static const yytype_int16 yydefgoto[] =
958 -1, 2, 3, 35, 264, 5, 36, 49, 313, 415,
959 178, 386, 452, 268, 176, 37, 97, 98, 38, 360,
960 417, 199, 116, 443, 39, 126, 410, 432, 40, 125,
961 117, 371, 100, 101, 249, 102, 118, 104, 105, 106,
962 107, 228, 287, 288, 289, 108, 119, 110, 120
965 /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
966 positive, shift that token. If negative, reduce the rule whose
967 number is the opposite. If YYTABLE_NINF, syntax error. */
968 static const yytype_int16 yytable[] =
970 109, 266, 229, 404, 122, 424, 109, 129, 231, 41,
971 408, 252, 4, 50, 170, 47, -17, 44, 45, 53,
972 6, 208, 209, 210, 54, 1, 409, 50, -16, 9,
973 103, 99, 42, 53, 46, 421, 103, 99, 54, 174,
974 175, 115, 375, 43, 308, 169, 380, 127, 208, 201,
975 112, 191, 192, 121, 217, 171, 123, 172, 230, 209,
976 210, 131, 245, 246, 247, 218, 248, 203, 177, 206,
977 207, 109, 445, 219, 220, 221, 222, 223, 224, 225,
978 173, 226, 179, 209, 210, 209, 210, 111, 253, 209,
979 210, 48, 180, 111, 255, 256, 290, 202, 109, 257,
980 258, 103, 99, 292, 441, 209, 210, 205, 181, 269,
981 270, 271, 272, 273, 274, 275, 276, 278, 278, 278,
982 278, 293, 193, 194, 294, 295, 296, 261, 103, 99,
983 340, 250, 130, 41, 182, 297, 298, 94, 411, 412,
984 302, 303, 263, 265, 31, 278, 251, 103, 103, 103,
985 103, 94, 361, 363, 204, -17, 367, 369, 111, -17,
986 -17, 446, 209, 210, 183, 336, 337, -16, 299, 300,
987 301, -16, -16, 184, 433, 311, 41, 185, 377, 378,
988 195, 196, 254, 293, 293, 111, 312, 227, -140, -140,
989 231, 186, 200, 315, 316, 317, 318, 319, 320, 321,
990 322, 323, 325, 326, 111, 111, 111, 111, 342, 343,
991 344, 345, 346, 347, 348, 349, 350, 351, 352, 353,
992 354, 355, 356, 278, 278, 359, 9, 187, 188, 362,
993 364, 376, 111, 368, 370, 290, 328, 382, 189, 329,
994 330, 201, 277, 279, 280, 286, 405, 383, 190, 209,
995 210, 197, 198, 103, 103, 262, 267, 425, 314, 203,
996 209, 210, 365, 366, 218, 384, 327, 334, 331, 41,
997 309, 335, 248, 220, 221, 222, 223, 224, 225, 338,
998 226, 216, 339, 431, 341, 399, 400, 372, 374, 202,
999 220, 221, 222, 223, 224, 225, 373, 226, 379, 385,
1000 387, 389, 278, 293, 293, 388, 390, 278, 278, 391,
1001 111, 111, 392, 393, 394, 234, 235, 236, 237, 238,
1002 239, 211, 212, 213, 214, 215, 395, 376, 376, 403,
1003 407, 396, 103, 397, 255, 413, 414, 103, 103, 416,
1004 422, 31, 423, 426, 435, 436, 204, 437, 357, 358,
1005 241, 242, 243, 244, 245, 246, 247, 438, 248, 444,
1006 449, 450, 453, 376, 128, 310, 124, 211, 212, 213,
1007 214, 215, 333, 434, 0, 0, 406, 0, 278, 278,
1008 429, 0, 430, 0, 200, 0, 227, 0, 0, 111,
1009 0, 0, 0, 0, 111, 111, 442, 0, 278, 278,
1010 0, 332, 418, 227, 0, 0, 419, 420, 103, 103,
1011 0, 236, 237, 238, 239, 41, 448, 0, 0, 0,
1012 0, 451, 211, 212, 213, 214, 215, 398, 103, 103,
1013 0, 0, 401, 402, -141, -141, 0, 0, 234, 235,
1014 236, 237, 238, 239, 241, 242, 243, 244, 245, 246,
1015 247, 0, 248, 0, 0, 234, 235, 236, 237, 238,
1016 239, 50, 51, 52, 9, 111, 111, 53, 0, 0,
1017 0, 0, 54, 241, 242, 243, 244, 245, 246, 247,
1018 0, 248, 0, 0, 0, 111, 111, 0, 55, 56,
1019 241, 242, 243, 244, 245, 246, 247, 0, 248, 0,
1020 0, 0, 0, 427, 428, 0, 0, 0, 0, 0,
1021 0, 57, 58, 59, 60, 61, 62, 63, 64, 65,
1022 66, 67, 68, 439, 440, 0, 0, 0, 69, 70,
1023 71, 72, 73, 74, 75, 76, 77, 78, 79, 238,
1024 239, 80, 81, 82, 83, 243, 244, 245, 246, 247,
1025 0, 248, 0, 0, 0, 0, 0, 0, 0, 84,
1026 85, 86, 87, 88, 89, 90, 91, 92, 0, 0,
1027 241, 242, 243, 244, 245, 246, 247, 0, 248, 31,
1028 0, 0, 0, 0, 113, 94, 0, 0, 0, 0,
1029 0, 95, 0, 0, 0, 114, 304, 305, 52, 9,
1030 10, 0, 53, 324, 0, 0, 0, 54, 11, 12,
1031 13, 14, 15, 16, 17, 18, 0, 0, 19, 0,
1032 0, 20, 21, 306, 307, 0, 0, 0, 0, 0,
1033 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1034 0, 0, 0, 0, 0, 0, 57, 58, 59, 60,
1035 61, 62, 63, 64, 65, 66, 67, 68, 0, 0,
1036 0, 0, 0, 69, 70, 71, 72, 73, 74, 75,
1037 76, 77, 78, 79, 24, 0, 80, 81, 82, 83,
1038 25, 26, 0, 0, 27, 0, 28, 0, 0, 0,
1039 0, 0, 0, 0, 84, 85, 86, 87, 88, 89,
1040 90, 91, 92, 29, 0, 30, 0, 0, 0, 0,
1041 0, 0, 0, 0, 31, 32, 0, 0, 0, 93,
1042 94, 33, 0, 0, 7, 8, 95, 9, 10, 0,
1043 96, 0, 0, 0, 0, 34, 11, 12, 13, 14,
1044 15, 16, 17, 18, 0, 0, 19, 0, 0, 20,
1045 21, 22, 23, 0, 0, 0, 0, 0, 0, 0,
1046 7, 8, 0, 9, 10, 0, 0, 0, 0, 0,
1047 0, 0, 11, 12, 13, 14, 15, 16, 17, 18,
1048 0, 0, 19, 0, 0, 20, 21, 22, 23, 234,
1049 235, 236, 237, 238, 239, 0, 0, 0, 0, 0,
1050 0, 0, 24, 0, 0, 0, 0, 0, 25, 26,
1051 0, 0, 27, 0, 28, 0, 0, 0, 0, 0,
1052 0, 0, 0, 240, 241, 242, 243, 244, 245, 246,
1053 247, 29, 248, 30, 0, 0, 0, 0, 24, 0,
1054 0, 0, 31, 32, 25, 26, 0, 0, 27, 33,
1055 28, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1056 42, 0, 0, 34, 0, 0, 0, 29, 0, 30,
1057 0, 0, 0, 0, 0, 0, 0, 0, 31, 32,
1058 50, 51, 52, 9, 0, 33, 53, 0, 132, 133,
1059 134, 54, 0, 0, 0, 0, 0, 0, 0, 34,
1060 135, 136, 0, 137, 138, 139, 140, 141, 142, 143,
1061 144, 145, 146, 147, 148, 149, 150, 151, 152, 153,
1062 154, 155, 156, 157, 158, 0, 0, 0, 0, 0,
1063 57, 58, 59, 60, 61, 62, 63, 64, 65, 66,
1064 67, 68, 0, 0, 0, 0, 0, 69, 70, 71,
1065 72, 73, 74, 75, 76, 77, 78, 79, 0, 0,
1066 80, 81, 82, 83, 0, 0, 159, 160, 0, 0,
1067 0, 0, 0, 0, 0, 0, 0, 0, 84, 85,
1068 86, 87, 88, 89, 90, 91, 92, 0, 0, 0,
1069 161, 162, 163, 164, 165, 166, 167, 168, 31, 0,
1070 0, 0, 0, 113, 94, 50, 51, 52, 9, 0,
1071 95, 53, 0, 0, 96, 0, 54, 0, 0, 0,
1072 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1073 0, 0, 55, 56, 0, 0, 0, 0, 0, 0,
1074 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1075 0, 0, 0, 0, 0, 57, 58, 59, 60, 61,
1076 62, 63, 64, 65, 66, 67, 68, 0, 0, 0,
1077 0, 0, 69, 70, 71, 72, 73, 74, 75, 76,
1078 77, 78, 79, 0, 0, 80, 81, 82, 83, 0,
1079 50, 51, 52, 9, 0, 0, 53, 0, 0, 0,
1080 0, 54, 0, 84, 85, 86, 87, 88, 89, 90,
1081 91, 92, 0, 0, 0, 0, 0, 55, 56, 0,
1082 0, 0, 0, 31, 0, 0, 0, 284, 93, 94,
1083 0, 0, 0, 0, 0, 95, 0, 0, 0, 114,
1084 57, 58, 59, 60, 61, 62, 63, 64, 65, 66,
1085 67, 68, 0, 0, 0, 0, 0, 69, 70, 71,
1086 72, 73, 74, 75, 76, 77, 78, 79, 0, 0,
1087 80, 81, 82, 83, 0, 50, 51, 52, 9, 0,
1088 0, 53, 0, 0, 0, 0, 54, 0, 84, 85,
1089 86, 87, 88, 89, 90, 91, 92, 0, 0, 0,
1090 0, 0, 55, 56, 0, 0, 0, 0, 31, 0,
1091 0, 0, 0, 93, 94, 0, 0, 0, 0, 0,
1092 95, 0, 0, 0, 96, 57, 58, 59, 60, 61,
1093 62, 63, 64, 65, 66, 67, 68, 0, 0, 0,
1094 0, 0, 69, 70, 71, 72, 73, 74, 75, 76,
1095 77, 78, 79, 0, 0, 80, 81, 82, 83, 0,
1096 50, 51, 52, 9, 0, 0, 53, 0, 0, 0,
1097 0, 54, 0, 84, 85, 86, 87, 88, 89, 90,
1098 91, 92, 0, 0, 0, 0, 0, 55, 56, 0,
1099 0, 0, 0, 31, 0, 0, 0, 0, 113, 94,
1100 0, 0, 0, 0, 0, 95, 0, 0, 0, 114,
1101 57, 58, 59, 60, 61, 62, 63, 64, 65, 66,
1102 67, 68, 0, 0, 0, 0, 0, 69, 70, 71,
1103 72, 73, 74, 75, 76, 77, 78, 79, 0, 0,
1104 80, 81, 82, 83, 0, 50, 51, 52, 9, 0,
1105 0, 53, 0, 0, 0, 0, 54, 0, 84, 85,
1106 86, 87, 88, 89, 90, 91, 92, 0, 0, 0,
1107 0, 0, 55, 56, 0, 0, 0, 0, 31, 0,
1108 0, 0, 0, 93, 94, 0, 0, 0, 0, 0,
1109 95, 0, 0, 0, 114, 57, 58, 59, 60, 61,
1110 62, 63, 64, 65, 66, 67, 68, 0, 0, 0,
1111 0, 0, 69, 70, 71, 72, 73, 74, 75, 76,
1112 77, 78, 79, 0, 0, 80, 81, 82, 83, 0,
1113 281, 51, 52, 0, 0, 0, 282, 0, 0, 0,
1114 0, 283, 0, 84, 85, 86, 87, 88, 89, 90,
1115 91, 92, 0, 0, 0, 0, 0, 55, 56, 0,
1116 0, 0, 0, 31, 0, 0, 0, 0, 291, 94,
1117 0, 0, 0, 0, 0, 95, 0, 0, 0, 114,
1118 57, 58, 59, 60, 61, 62, 63, 64, 65, 66,
1119 67, 68, 0, 0, 0, 0, 0, 69, 70, 71,
1120 72, 73, 74, 75, 76, 77, 78, 79, 0, 0,
1121 80, 81, 82, 83, 0, 50, 51, 52, 0, 0,
1122 0, 53, 0, 0, 0, 0, 54, 0, 84, 85,
1123 86, 87, 88, 89, 90, 91, 92, 0, 0, 0,
1124 0, 0, 55, 56, 0, 0, 0, 0, 0, 0,
1125 0, 0, 284, 285, 94, 0, 0, 0, 0, 0,
1126 95, 0, 0, 0, 96, 57, 58, 59, 60, 61,
1127 62, 63, 64, 65, 66, 67, 68, 0, 0, 0,
1128 0, 0, 69, 70, 71, 72, 73, 74, 75, 76,
1129 77, 78, 79, 0, 0, 80, 81, 82, 83, 0,
1130 50, 51, 52, 0, 0, 0, 53, 0, 0, 0,
1131 0, 54, 0, 84, 85, 86, 87, 88, 89, 90,
1132 91, 92, 0, 0, 0, 0, 0, 55, 56, 0,
1133 0, 0, 0, 0, 0, 0, 0, 0, 113, 94,
1134 0, 0, 0, 0, 0, 95, 447, 0, 0, 96,
1135 57, 58, 59, 60, 61, 62, 63, 64, 65, 66,
1136 67, 68, 0, 0, 0, 0, 0, 69, 70, 71,
1137 72, 73, 74, 75, 76, 77, 78, 79, 0, 0,
1138 80, 81, 82, 83, 0, 50, 51, 52, 0, 0,
1139 0, 53, 0, 0, 0, 0, 54, 0, 84, 85,
1140 86, 87, 88, 89, 90, 91, 92, 0, 0, 0,
1141 0, 0, 55, 56, 0, 0, 0, 0, 0, 0,
1142 0, 0, 0, 113, 94, 0, 0, 0, 0, 0,
1143 95, 0, 0, 0, 96, 57, 58, 59, 60, 61,
1144 62, 63, 64, 65, 66, 67, 68, 0, 0, 0,
1145 0, 0, 69, 70, 71, 72, 73, 74, 75, 76,
1146 77, 78, 79, 0, 0, 80, 81, 82, 83, 0,
1147 50, 51, 52, 0, 0, 0, 53, 0, 0, 0,
1148 0, 54, 0, 84, 85, 86, 87, 88, 89, 90,
1149 91, 92, 0, 0, 0, 0, 0, 55, 56, 0,
1150 0, 0, 0, 0, 0, 0, 0, 0, 93, 94,
1151 0, 0, 0, 0, 0, 95, 0, 0, 0, 96,
1152 57, 58, 59, 60, 61, 62, 63, 64, 65, 66,
1153 67, 68, 0, 0, 0, 0, 0, 69, 70, 71,
1154 72, 73, 74, 75, 76, 77, 78, 79, 0, 0,
1155 80, 81, 82, 83, 0, 0, 50, 51, 52, 0,
1156 0, 0, 53, 0, 0, 0, 0, 54, 84, 85,
1157 86, 87, 88, 89, 90, 91, 92, 0, 0, 0,
1158 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1159 0, 0, 0, 291, 94, 0, 0, 0, 0, 0,
1160 95, -205, 0, 0, 96, 0, 57, 58, 59, 60,
1161 61, 62, 63, 64, 65, 66, 67, 68, 0, 0,
1162 0, 0, 0, 69, 70, 71, 72, 73, 74, 75,
1163 76, 77, 78, 79, 0, 0, 80, 81, 82, 83,
1164 0, 0, 50, 51, 52, 0, 0, 0, 53, 0,
1165 0, 0, 0, 54, 84, 85, 86, 87, 88, 89,
1166 90, 91, 92, 0, 0, 0, 0, 0, 0, 0,
1167 0, 0, 0, 0, 0, 0, 0, 0, 0, 113,
1168 94, 0, 0, 0, 0, 0, 95, -204, 0, 0,
1169 96, 0, 57, 58, 59, 60, 61, 62, 63, 64,
1170 65, 66, 67, 68, 0, 0, 0, 0, 0, 69,
1171 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
1172 0, 0, 80, 81, 82, 83, 0, 50, 51, 52,
1173 0, 0, 0, 53, 0, 0, 0, 0, 54, 0,
1174 84, 85, 86, 87, 88, 89, 90, 91, 92, 0,
1175 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1176 0, 0, 0, 0, 0, 113, 94, 0, 0, 0,
1177 0, 0, 95, 0, 0, 0, 96, 57, 58, 59,
1178 60, 61, 62, 63, 64, 65, 66, 67, 68, 0,
1179 0, 0, 0, 0, 69, 70, 71, 72, 73, 74,
1180 75, 76, 77, 78, 79, 0, 0, 80, 81, 82,
1181 83, 55, 56, 0, 0, 0, 0, 0, 0, 0,
1182 0, 0, 0, 0, 0, 84, 85, 86, 87, 88,
1183 89, 90, 91, 92, 0, 58, 59, 60, 61, 62,
1184 63, 64, 65, 66, 67, 68, 55, 56, 0, 0,
1185 113, 94, 0, 0, 0, 0, 0, 95, 0, 0,
1186 0, 96, 0, 0, 80, 81, 82, 83, 0, 0,
1187 58, 59, 60, 61, 62, 63, 64, 65, 66, 67,
1188 68, 0, 84, 85, 86, 87, 88, 89, 90, 91,
1189 92, 0, 0, 0, 0, 232, 0, 0, 233, 80,
1190 81, 82, 83, 0, 0, 232, 381, 0, 233, 0,
1191 0, 0, 0, 0, 0, 0, 0, 84, 85, 86,
1192 87, 88, 89, 90, 91, 92, 259, 260, 236, 237,
1193 238, 239, 0, 0, 0, 0, 0, 0, 0, 0,
1194 0, 284, 234, 235, 236, 237, 238, 239, 0, 0,
1195 0, 0, 259, 260, 236, 237, 238, 239, 0, 0,
1196 240, 241, 242, 243, 244, 245, 246, 247, 0, 248,
1197 0, 0, 0, 0, 0, 0, 240, 241, 242, 243,
1198 244, 245, 246, 247, 0, 248, 240, 241, 242, 243,
1199 244, 245, 246, 247, 0, 248, 58, 59, 60, 61,
1200 62, 63, 64, 65, 66, 67, 68, 58, 59, 60,
1201 61, 62, 63, 64, 65, 66, 67, 68, 0, 0,
1202 0, 0, 0, 0, 0, 80, 81, 82, 83, 0,
1203 0, 0, 0, 0, 0, 0, 80, 81, 82, 83,
1204 0, 0, 0, 84, 85, 86, 87, 88, 89, 90,
1205 91, 92, 0, 0, 84, 85, 86, 87, 88, 89,
1206 90, 91, 92, 0, 0, 0, 0, 216, 259, 260,
1207 236, 237, 238, 239, 0, 0, 0, 234, 235, 236,
1208 237, 238, 239, 0, 0, 0, 234, 0, 236, 237,
1209 238, 239, 0, 0, 0, 259, 0, 236, 237, 238,
1210 239, 0, 0, 241, 242, 243, 244, 245, 246, 247,
1211 0, 248, 241, 242, 243, 244, 245, 246, 247, 0,
1212 248, 241, 242, 243, 244, 245, 246, 247, 0, 248,
1213 241, 242, 243, 244, 245, 246, 247, 0, 248
1216 static const yytype_int16 yycheck[] =
1218 26, 128, 106, 52, 30, 52, 32, 4, 108, 4,
1219 129, 114, 0, 3, 40, 6, 0, 140, 141, 9,
1220 0, 97, 132, 133, 14, 139, 145, 3, 0, 6,
1221 26, 26, 139, 9, 140, 145, 32, 32, 14, 3,
1222 4, 28, 281, 141, 171, 40, 285, 35, 124, 93,
1223 4, 30, 31, 4, 104, 43, 126, 44, 48, 132,
1224 133, 94, 134, 135, 136, 6, 138, 93, 82, 95,
1225 96, 97, 145, 14, 15, 16, 17, 18, 19, 20,
1226 140, 22, 8, 132, 133, 132, 133, 26, 114, 132,
1227 133, 82, 126, 32, 95, 96, 146, 93, 124, 97,
1228 98, 97, 97, 147, 131, 132, 133, 94, 126, 135,
1229 136, 137, 138, 139, 140, 141, 142, 143, 144, 145,
1230 146, 147, 101, 102, 150, 151, 152, 122, 124, 124,
1231 230, 130, 129, 128, 126, 161, 162, 127, 377, 378,
1232 166, 167, 125, 126, 121, 171, 140, 143, 144, 145,
1233 146, 127, 255, 256, 93, 139, 259, 260, 97, 143,
1234 144, 131, 132, 133, 126, 209, 210, 139, 163, 164,
1235 165, 143, 144, 126, 413, 171, 171, 126, 282, 283,
1236 30, 31, 37, 209, 210, 124, 173, 128, 132, 133,
1237 290, 126, 93, 180, 181, 182, 183, 184, 185, 186,
1238 187, 188, 189, 190, 143, 144, 145, 146, 234, 235,
1239 236, 237, 238, 239, 240, 241, 242, 243, 244, 245,
1240 246, 247, 248, 249, 250, 251, 6, 126, 126, 255,
1241 256, 281, 171, 259, 260, 285, 129, 287, 126, 132,
1242 133, 285, 143, 144, 145, 146, 129, 291, 126, 132,
1243 133, 101, 102, 249, 250, 6, 4, 129, 8, 285,
1244 132, 133, 257, 258, 6, 291, 145, 130, 145, 264,
1245 171, 10, 138, 15, 16, 17, 18, 19, 20, 3,
1246 22, 125, 144, 410, 49, 329, 330, 144, 8, 285,
1247 15, 16, 17, 18, 19, 20, 143, 22, 3, 8,
1248 145, 129, 328, 329, 330, 145, 145, 333, 334, 145,
1249 249, 250, 145, 129, 129, 95, 96, 97, 98, 99,
1250 100, 65, 66, 67, 68, 69, 145, 377, 378, 50,
1251 8, 145, 328, 145, 95, 129, 3, 333, 334, 111,
1252 145, 121, 145, 51, 6, 145, 285, 145, 249, 250,
1253 130, 131, 132, 133, 134, 135, 136, 145, 138, 145,
1254 92, 145, 8, 413, 35, 171, 32, 65, 66, 67,
1255 68, 69, 203, 415, -1, -1, 33, -1, 404, 405,
1256 406, -1, 408, -1, 285, -1, 128, -1, -1, 328,
1257 -1, -1, -1, -1, 333, 334, 36, -1, 424, 425,
1258 -1, 145, 389, 128, -1, -1, 393, 394, 404, 405,
1259 -1, 97, 98, 99, 100, 410, 442, -1, -1, -1,
1260 -1, 447, 65, 66, 67, 68, 69, 328, 424, 425,
1261 -1, -1, 333, 334, 132, 133, -1, -1, 95, 96,
1262 97, 98, 99, 100, 130, 131, 132, 133, 134, 135,
1263 136, -1, 138, -1, -1, 95, 96, 97, 98, 99,
1264 100, 3, 4, 5, 6, 404, 405, 9, -1, -1,
1265 -1, -1, 14, 130, 131, 132, 133, 134, 135, 136,
1266 -1, 138, -1, -1, -1, 424, 425, -1, 30, 31,
1267 130, 131, 132, 133, 134, 135, 136, -1, 138, -1,
1268 -1, -1, -1, 404, 405, -1, -1, -1, -1, -1,
1269 -1, 53, 54, 55, 56, 57, 58, 59, 60, 61,
1270 62, 63, 64, 424, 425, -1, -1, -1, 70, 71,
1271 72, 73, 74, 75, 76, 77, 78, 79, 80, 99,
1272 100, 83, 84, 85, 86, 132, 133, 134, 135, 136,
1273 -1, 138, -1, -1, -1, -1, -1, -1, -1, 101,
1274 102, 103, 104, 105, 106, 107, 108, 109, -1, -1,
1275 130, 131, 132, 133, 134, 135, 136, -1, 138, 121,
1276 -1, -1, -1, -1, 126, 127, -1, -1, -1, -1,
1277 -1, 133, -1, -1, -1, 137, 3, 4, 5, 6,
1278 7, -1, 9, 145, -1, -1, -1, 14, 15, 16,
1279 17, 18, 19, 20, 21, 22, -1, -1, 25, -1,
1280 -1, 28, 29, 30, 31, -1, -1, -1, -1, -1,
1281 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1282 -1, -1, -1, -1, -1, -1, 53, 54, 55, 56,
1283 57, 58, 59, 60, 61, 62, 63, 64, -1, -1,
1284 -1, -1, -1, 70, 71, 72, 73, 74, 75, 76,
1285 77, 78, 79, 80, 81, -1, 83, 84, 85, 86,
1286 87, 88, -1, -1, 91, -1, 93, -1, -1, -1,
1287 -1, -1, -1, -1, 101, 102, 103, 104, 105, 106,
1288 107, 108, 109, 110, -1, 112, -1, -1, -1, -1,
1289 -1, -1, -1, -1, 121, 122, -1, -1, -1, 126,
1290 127, 128, -1, -1, 3, 4, 133, 6, 7, -1,
1291 137, -1, -1, -1, -1, 142, 15, 16, 17, 18,
1292 19, 20, 21, 22, -1, -1, 25, -1, -1, 28,
1293 29, 30, 31, -1, -1, -1, -1, -1, -1, -1,
1294 3, 4, -1, 6, 7, -1, -1, -1, -1, -1,
1295 -1, -1, 15, 16, 17, 18, 19, 20, 21, 22,
1296 -1, -1, 25, -1, -1, 28, 29, 30, 31, 95,
1297 96, 97, 98, 99, 100, -1, -1, -1, -1, -1,
1298 -1, -1, 81, -1, -1, -1, -1, -1, 87, 88,
1299 -1, -1, 91, -1, 93, -1, -1, -1, -1, -1,
1300 -1, -1, -1, 129, 130, 131, 132, 133, 134, 135,
1301 136, 110, 138, 112, -1, -1, -1, -1, 81, -1,
1302 -1, -1, 121, 122, 87, 88, -1, -1, 91, 128,
1303 93, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1304 139, -1, -1, 142, -1, -1, -1, 110, -1, 112,
1305 -1, -1, -1, -1, -1, -1, -1, -1, 121, 122,
1306 3, 4, 5, 6, -1, 128, 9, -1, 11, 12,
1307 13, 14, -1, -1, -1, -1, -1, -1, -1, 142,
1308 23, 24, -1, 26, 27, 28, 29, 30, 31, 32,
1309 33, 34, 35, 36, 37, 38, 39, 40, 41, 42,
1310 43, 44, 45, 46, 47, -1, -1, -1, -1, -1,
1311 53, 54, 55, 56, 57, 58, 59, 60, 61, 62,
1312 63, 64, -1, -1, -1, -1, -1, 70, 71, 72,
1313 73, 74, 75, 76, 77, 78, 79, 80, -1, -1,
1314 83, 84, 85, 86, -1, -1, 89, 90, -1, -1,
1315 -1, -1, -1, -1, -1, -1, -1, -1, 101, 102,
1316 103, 104, 105, 106, 107, 108, 109, -1, -1, -1,
1317 113, 114, 115, 116, 117, 118, 119, 120, 121, -1,
1318 -1, -1, -1, 126, 127, 3, 4, 5, 6, -1,
1319 133, 9, -1, -1, 137, -1, 14, -1, -1, -1,
1320 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1321 -1, -1, 30, 31, -1, -1, -1, -1, -1, -1,
1322 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1323 -1, -1, -1, -1, -1, 53, 54, 55, 56, 57,
1324 58, 59, 60, 61, 62, 63, 64, -1, -1, -1,
1325 -1, -1, 70, 71, 72, 73, 74, 75, 76, 77,
1326 78, 79, 80, -1, -1, 83, 84, 85, 86, -1,
1327 3, 4, 5, 6, -1, -1, 9, -1, -1, -1,
1328 -1, 14, -1, 101, 102, 103, 104, 105, 106, 107,
1329 108, 109, -1, -1, -1, -1, -1, 30, 31, -1,
1330 -1, -1, -1, 121, -1, -1, -1, 125, 126, 127,
1331 -1, -1, -1, -1, -1, 133, -1, -1, -1, 137,
1332 53, 54, 55, 56, 57, 58, 59, 60, 61, 62,
1333 63, 64, -1, -1, -1, -1, -1, 70, 71, 72,
1334 73, 74, 75, 76, 77, 78, 79, 80, -1, -1,
1335 83, 84, 85, 86, -1, 3, 4, 5, 6, -1,
1336 -1, 9, -1, -1, -1, -1, 14, -1, 101, 102,
1337 103, 104, 105, 106, 107, 108, 109, -1, -1, -1,
1338 -1, -1, 30, 31, -1, -1, -1, -1, 121, -1,
1339 -1, -1, -1, 126, 127, -1, -1, -1, -1, -1,
1340 133, -1, -1, -1, 137, 53, 54, 55, 56, 57,
1341 58, 59, 60, 61, 62, 63, 64, -1, -1, -1,
1342 -1, -1, 70, 71, 72, 73, 74, 75, 76, 77,
1343 78, 79, 80, -1, -1, 83, 84, 85, 86, -1,
1344 3, 4, 5, 6, -1, -1, 9, -1, -1, -1,
1345 -1, 14, -1, 101, 102, 103, 104, 105, 106, 107,
1346 108, 109, -1, -1, -1, -1, -1, 30, 31, -1,
1347 -1, -1, -1, 121, -1, -1, -1, -1, 126, 127,
1348 -1, -1, -1, -1, -1, 133, -1, -1, -1, 137,
1349 53, 54, 55, 56, 57, 58, 59, 60, 61, 62,
1350 63, 64, -1, -1, -1, -1, -1, 70, 71, 72,
1351 73, 74, 75, 76, 77, 78, 79, 80, -1, -1,
1352 83, 84, 85, 86, -1, 3, 4, 5, 6, -1,
1353 -1, 9, -1, -1, -1, -1, 14, -1, 101, 102,
1354 103, 104, 105, 106, 107, 108, 109, -1, -1, -1,
1355 -1, -1, 30, 31, -1, -1, -1, -1, 121, -1,
1356 -1, -1, -1, 126, 127, -1, -1, -1, -1, -1,
1357 133, -1, -1, -1, 137, 53, 54, 55, 56, 57,
1358 58, 59, 60, 61, 62, 63, 64, -1, -1, -1,
1359 -1, -1, 70, 71, 72, 73, 74, 75, 76, 77,
1360 78, 79, 80, -1, -1, 83, 84, 85, 86, -1,
1361 3, 4, 5, -1, -1, -1, 9, -1, -1, -1,
1362 -1, 14, -1, 101, 102, 103, 104, 105, 106, 107,
1363 108, 109, -1, -1, -1, -1, -1, 30, 31, -1,
1364 -1, -1, -1, 121, -1, -1, -1, -1, 126, 127,
1365 -1, -1, -1, -1, -1, 133, -1, -1, -1, 137,
1366 53, 54, 55, 56, 57, 58, 59, 60, 61, 62,
1367 63, 64, -1, -1, -1, -1, -1, 70, 71, 72,
1368 73, 74, 75, 76, 77, 78, 79, 80, -1, -1,
1369 83, 84, 85, 86, -1, 3, 4, 5, -1, -1,
1370 -1, 9, -1, -1, -1, -1, 14, -1, 101, 102,
1371 103, 104, 105, 106, 107, 108, 109, -1, -1, -1,
1372 -1, -1, 30, 31, -1, -1, -1, -1, -1, -1,
1373 -1, -1, 125, 126, 127, -1, -1, -1, -1, -1,
1374 133, -1, -1, -1, 137, 53, 54, 55, 56, 57,
1375 58, 59, 60, 61, 62, 63, 64, -1, -1, -1,
1376 -1, -1, 70, 71, 72, 73, 74, 75, 76, 77,
1377 78, 79, 80, -1, -1, 83, 84, 85, 86, -1,
1378 3, 4, 5, -1, -1, -1, 9, -1, -1, -1,
1379 -1, 14, -1, 101, 102, 103, 104, 105, 106, 107,
1380 108, 109, -1, -1, -1, -1, -1, 30, 31, -1,
1381 -1, -1, -1, -1, -1, -1, -1, -1, 126, 127,
1382 -1, -1, -1, -1, -1, 133, 134, -1, -1, 137,
1383 53, 54, 55, 56, 57, 58, 59, 60, 61, 62,
1384 63, 64, -1, -1, -1, -1, -1, 70, 71, 72,
1385 73, 74, 75, 76, 77, 78, 79, 80, -1, -1,
1386 83, 84, 85, 86, -1, 3, 4, 5, -1, -1,
1387 -1, 9, -1, -1, -1, -1, 14, -1, 101, 102,
1388 103, 104, 105, 106, 107, 108, 109, -1, -1, -1,
1389 -1, -1, 30, 31, -1, -1, -1, -1, -1, -1,
1390 -1, -1, -1, 126, 127, -1, -1, -1, -1, -1,
1391 133, -1, -1, -1, 137, 53, 54, 55, 56, 57,
1392 58, 59, 60, 61, 62, 63, 64, -1, -1, -1,
1393 -1, -1, 70, 71, 72, 73, 74, 75, 76, 77,
1394 78, 79, 80, -1, -1, 83, 84, 85, 86, -1,
1395 3, 4, 5, -1, -1, -1, 9, -1, -1, -1,
1396 -1, 14, -1, 101, 102, 103, 104, 105, 106, 107,
1397 108, 109, -1, -1, -1, -1, -1, 30, 31, -1,
1398 -1, -1, -1, -1, -1, -1, -1, -1, 126, 127,
1399 -1, -1, -1, -1, -1, 133, -1, -1, -1, 137,
1400 53, 54, 55, 56, 57, 58, 59, 60, 61, 62,
1401 63, 64, -1, -1, -1, -1, -1, 70, 71, 72,
1402 73, 74, 75, 76, 77, 78, 79, 80, -1, -1,
1403 83, 84, 85, 86, -1, -1, 3, 4, 5, -1,
1404 -1, -1, 9, -1, -1, -1, -1, 14, 101, 102,
1405 103, 104, 105, 106, 107, 108, 109, -1, -1, -1,
1406 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1407 -1, -1, -1, 126, 127, -1, -1, -1, -1, -1,
1408 133, 48, -1, -1, 137, -1, 53, 54, 55, 56,
1409 57, 58, 59, 60, 61, 62, 63, 64, -1, -1,
1410 -1, -1, -1, 70, 71, 72, 73, 74, 75, 76,
1411 77, 78, 79, 80, -1, -1, 83, 84, 85, 86,
1412 -1, -1, 3, 4, 5, -1, -1, -1, 9, -1,
1413 -1, -1, -1, 14, 101, 102, 103, 104, 105, 106,
1414 107, 108, 109, -1, -1, -1, -1, -1, -1, -1,
1415 -1, -1, -1, -1, -1, -1, -1, -1, -1, 126,
1416 127, -1, -1, -1, -1, -1, 133, 48, -1, -1,
1417 137, -1, 53, 54, 55, 56, 57, 58, 59, 60,
1418 61, 62, 63, 64, -1, -1, -1, -1, -1, 70,
1419 71, 72, 73, 74, 75, 76, 77, 78, 79, 80,
1420 -1, -1, 83, 84, 85, 86, -1, 3, 4, 5,
1421 -1, -1, -1, 9, -1, -1, -1, -1, 14, -1,
1422 101, 102, 103, 104, 105, 106, 107, 108, 109, -1,
1423 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1424 -1, -1, -1, -1, -1, 126, 127, -1, -1, -1,
1425 -1, -1, 133, -1, -1, -1, 137, 53, 54, 55,
1426 56, 57, 58, 59, 60, 61, 62, 63, 64, -1,
1427 -1, -1, -1, -1, 70, 71, 72, 73, 74, 75,
1428 76, 77, 78, 79, 80, -1, -1, 83, 84, 85,
1429 86, 30, 31, -1, -1, -1, -1, -1, -1, -1,
1430 -1, -1, -1, -1, -1, 101, 102, 103, 104, 105,
1431 106, 107, 108, 109, -1, 54, 55, 56, 57, 58,
1432 59, 60, 61, 62, 63, 64, 30, 31, -1, -1,
1433 126, 127, -1, -1, -1, -1, -1, 133, -1, -1,
1434 -1, 137, -1, -1, 83, 84, 85, 86, -1, -1,
1435 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
1436 64, -1, 101, 102, 103, 104, 105, 106, 107, 108,
1437 109, -1, -1, -1, -1, 48, -1, -1, 51, 83,
1438 84, 85, 86, -1, -1, 48, 125, -1, 51, -1,
1439 -1, -1, -1, -1, -1, -1, -1, 101, 102, 103,
1440 104, 105, 106, 107, 108, 109, 95, 96, 97, 98,
1441 99, 100, -1, -1, -1, -1, -1, -1, -1, -1,
1442 -1, 125, 95, 96, 97, 98, 99, 100, -1, -1,
1443 -1, -1, 95, 96, 97, 98, 99, 100, -1, -1,
1444 129, 130, 131, 132, 133, 134, 135, 136, -1, 138,
1445 -1, -1, -1, -1, -1, -1, 129, 130, 131, 132,
1446 133, 134, 135, 136, -1, 138, 129, 130, 131, 132,
1447 133, 134, 135, 136, -1, 138, 54, 55, 56, 57,
1448 58, 59, 60, 61, 62, 63, 64, 54, 55, 56,
1449 57, 58, 59, 60, 61, 62, 63, 64, -1, -1,
1450 -1, -1, -1, -1, -1, 83, 84, 85, 86, -1,
1451 -1, -1, -1, -1, -1, -1, 83, 84, 85, 86,
1452 -1, -1, -1, 101, 102, 103, 104, 105, 106, 107,
1453 108, 109, -1, -1, 101, 102, 103, 104, 105, 106,
1454 107, 108, 109, -1, -1, -1, -1, 125, 95, 96,
1455 97, 98, 99, 100, -1, -1, -1, 95, 96, 97,
1456 98, 99, 100, -1, -1, -1, 95, -1, 97, 98,
1457 99, 100, -1, -1, -1, 95, -1, 97, 98, 99,
1458 100, -1, -1, 130, 131, 132, 133, 134, 135, 136,
1459 -1, 138, 130, 131, 132, 133, 134, 135, 136, -1,
1460 138, 130, 131, 132, 133, 134, 135, 136, -1, 138,
1461 130, 131, 132, 133, 134, 135, 136, -1, 138
1464 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
1465 symbol of state STATE-NUM. */
1466 static const yytype_uint8 yystos[] =
1468 0, 139, 147, 148, 150, 151, 0, 3, 4, 6,
1469 7, 15, 16, 17, 18, 19, 20, 21, 22, 25,
1470 28, 29, 30, 31, 81, 87, 88, 91, 93, 110,
1471 112, 121, 122, 128, 142, 149, 152, 161, 164, 170,
1472 174, 176, 139, 141, 140, 141, 140, 6, 82, 153,
1473 3, 4, 5, 9, 14, 30, 31, 53, 54, 55,
1474 56, 57, 58, 59, 60, 61, 62, 63, 64, 70,
1475 71, 72, 73, 74, 75, 76, 77, 78, 79, 80,
1476 83, 84, 85, 86, 101, 102, 103, 104, 105, 106,
1477 107, 108, 109, 126, 127, 133, 137, 162, 163, 176,
1478 178, 179, 181, 182, 183, 184, 185, 186, 191, 192,
1479 193, 194, 4, 126, 137, 167, 168, 176, 182, 192,
1480 194, 4, 192, 126, 162, 175, 171, 150, 151, 4,
1481 129, 94, 11, 12, 13, 23, 24, 26, 27, 28,
1482 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
1483 39, 40, 41, 42, 43, 44, 45, 46, 47, 89,
1484 90, 113, 114, 115, 116, 117, 118, 119, 120, 176,
1485 192, 150, 167, 140, 3, 4, 160, 82, 156, 8,
1486 126, 126, 126, 126, 126, 126, 126, 126, 126, 126,
1487 126, 30, 31, 101, 102, 30, 31, 101, 102, 167,
1488 178, 181, 182, 192, 194, 167, 192, 192, 163, 132,
1489 133, 65, 66, 67, 68, 69, 125, 191, 6, 14,
1490 15, 16, 17, 18, 19, 20, 22, 128, 187, 187,
1491 48, 183, 48, 51, 95, 96, 97, 98, 99, 100,
1492 129, 130, 131, 132, 133, 134, 135, 136, 138, 180,
1493 130, 140, 168, 192, 37, 95, 96, 97, 98, 95,
1494 96, 176, 6, 148, 150, 148, 170, 4, 159, 192,
1495 192, 192, 192, 192, 192, 192, 192, 178, 192, 178,
1496 178, 3, 9, 14, 125, 126, 178, 188, 189, 190,
1497 191, 126, 181, 192, 192, 192, 192, 192, 192, 176,
1498 176, 176, 192, 192, 3, 4, 30, 31, 170, 178,
1499 179, 182, 167, 154, 8, 167, 167, 167, 167, 167,
1500 167, 167, 167, 167, 145, 167, 167, 145, 129, 132,
1501 133, 145, 145, 180, 130, 10, 181, 181, 3, 144,
1502 183, 49, 192, 192, 192, 192, 192, 192, 192, 192,
1503 192, 192, 192, 192, 192, 192, 192, 178, 178, 192,
1504 165, 168, 192, 168, 192, 176, 176, 168, 192, 168,
1505 192, 177, 144, 143, 8, 189, 191, 187, 187, 3,
1506 189, 125, 191, 181, 192, 8, 157, 145, 145, 129,
1507 145, 145, 145, 129, 129, 145, 145, 145, 178, 181,
1508 181, 178, 178, 50, 52, 129, 33, 8, 129, 145,
1509 172, 189, 189, 129, 3, 155, 111, 166, 167, 167,
1510 167, 145, 145, 145, 52, 129, 51, 178, 178, 192,
1511 192, 170, 173, 189, 166, 6, 145, 145, 145, 178,
1512 178, 131, 36, 169, 145, 145, 131, 134, 192, 92,
1516 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
1517 static const yytype_uint8 yyr1[] =
1519 0, 146, 147, 147, 148, 149, 149, 150, 150, 151,
1520 151, 152, 152, 152, 152, 152, 152, 152, 152, 152,
1521 152, 153, 152, 152, 154, 155, 152, 156, 157, 152,
1522 158, 152, 152, 159, 152, 152, 152, 160, 160, 161,
1523 161, 161, 162, 162, 163, 163, 163, 165, 164, 166,
1524 166, 167, 167, 168, 168, 168, 168, 168, 168, 168,
1525 168, 168, 169, 169, 169, 170, 170, 170, 170, 171,
1526 172, 170, 170, 173, 173, 174, 174, 174, 174, 174,
1527 174, 174, 174, 174, 174, 174, 175, 174, 174, 174,
1528 174, 174, 174, 174, 174, 174, 174, 174, 174, 174,
1529 174, 174, 174, 174, 174, 174, 174, 174, 174, 174,
1530 174, 174, 174, 174, 174, 174, 174, 174, 174, 174,
1531 174, 174, 174, 174, 174, 174, 174, 174, 174, 174,
1532 174, 174, 174, 174, 174, 174, 176, 176, 177, 177,
1533 178, 178, 178, 179, 179, 179, 179, 179, 179, 179,
1534 179, 179, 179, 180, 180, 181, 181, 182, 182, 182,
1535 182, 182, 183, 183, 183, 184, 184, 185, 185, 186,
1536 186, 187, 187, 187, 187, 187, 187, 187, 187, 187,
1537 188, 188, 189, 189, 189, 190, 190, 190, 190, 190,
1538 190, 191, 191, 191, 191, 191, 191, 191, 191, 191,
1539 191, 191, 191, 191, 191, 191, 191, 191, 191, 191,
1540 191, 191, 191, 191, 191, 191, 191, 191, 191, 191,
1541 191, 191, 191, 192, 192, 193, 194, 194, 194, 194,
1542 194, 194, 194, 194, 194, 194, 194, 194, 194, 194,
1543 194, 194, 194, 194, 194, 194, 194, 194, 194, 194,
1544 194, 194, 194, 194, 194, 194, 194, 194, 194, 194,
1548 /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */
1549 static const yytype_uint8 yyr2[] =
1551 0, 2, 1, 1, 3, 1, 3, 0, 1, 1,
1552 2, 3, 3, 4, 1, 1, 1, 1, 1, 2,
1553 2, 0, 3, 2, 0, 0, 7, 0, 0, 6,
1554 0, 10, 1, 0, 4, 1, 1, 1, 1, 2,
1555 2, 3, 1, 2, 1, 1, 1, 0, 5, 0,
1556 2, 1, 1, 3, 3, 3, 3, 3, 3, 3,
1557 3, 2, 0, 2, 3, 1, 4, 4, 4, 0,
1558 0, 6, 1, 0, 1, 1, 1, 1, 1, 1,
1559 1, 1, 1, 1, 2, 3, 0, 4, 3, 3,
1560 3, 3, 2, 2, 3, 2, 3, 2, 3, 2,
1561 3, 3, 3, 3, 3, 3, 3, 2, 2, 2,
1562 3, 2, 3, 2, 3, 3, 3, 3, 3, 3,
1563 2, 3, 2, 2, 2, 2, 2, 2, 2, 2,
1564 2, 2, 2, 2, 3, 2, 1, 5, 0, 3,
1565 1, 1, 3, 1, 3, 5, 3, 5, 5, 5,
1566 7, 6, 8, 1, 4, 3, 3, 1, 2, 2,
1567 3, 1, 1, 1, 3, 1, 3, 1, 2, 2,
1568 2, 1, 1, 1, 1, 1, 1, 1, 2, 1,
1569 2, 3, 1, 1, 2, 1, 5, 4, 3, 3,
1570 2, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1571 1, 1, 1, 1, 1, 1, 2, 2, 2, 2,
1572 1, 1, 2, 2, 2, 2, 1, 1, 1, 1,
1573 1, 1, 1, 1, 1, 3, 1, 1, 2, 2,
1574 2, 2, 2, 3, 3, 3, 3, 3, 3, 2,
1575 3, 4, 4, 6, 4, 4, 4, 6, 6, 4,
1576 4, 3, 4, 3, 3, 3, 3, 3, 3, 3,
1581 #define yyerrok (yyerrstatus = 0)
1582 #define yyclearin (yychar = YYEMPTY)
1583 #define YYEMPTY (-2)
1586 #define YYACCEPT goto yyacceptlab
1587 #define YYABORT goto yyabortlab
1588 #define YYERROR goto yyerrorlab
1591 #define YYRECOVERING() (!!yyerrstatus)
1593 #define YYBACKUP(Token, Value) \
1595 if (yychar == YYEMPTY) \
1599 YYPOPSTACK (yylen); \
1605 yyerror (YY_("syntax error: cannot back up")); \
1610 /* Error token number */
1612 #define YYERRCODE 256
1616 /* Enable debugging if requested. */
1620 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
1621 # define YYFPRINTF fprintf
1624 # define YYDPRINTF(Args) \
1630 /* This macro is provided for backward compatibility. */
1631 #ifndef YY_LOCATION_PRINT
1632 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
1636 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
1640 YYFPRINTF (stderr, "%s ", Title); \
1641 yy_symbol_print (stderr, \
1643 YYFPRINTF (stderr, "\n"); \
1648 /*----------------------------------------.
1649 | Print this symbol's value on YYOUTPUT. |
1650 `----------------------------------------*/
1653 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
1655 FILE *yyo = yyoutput;
1660 if (yytype < YYNTOKENS)
1661 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
1667 /*--------------------------------.
1668 | Print this symbol on YYOUTPUT. |
1669 `--------------------------------*/
1672 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
1674 YYFPRINTF (yyoutput, "%s %s (",
1675 yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]);
1677 yy_symbol_value_print (yyoutput, yytype, yyvaluep);
1678 YYFPRINTF (yyoutput, ")");
1681 /*------------------------------------------------------------------.
1682 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
1684 `------------------------------------------------------------------*/
1687 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
1689 YYFPRINTF (stderr, "Stack now");
1690 for (; yybottom <= yytop; yybottom++)
1692 int yybot = *yybottom;
1693 YYFPRINTF (stderr, " %d", yybot);
1695 YYFPRINTF (stderr, "\n");
1698 # define YY_STACK_PRINT(Bottom, Top) \
1701 yy_stack_print ((Bottom), (Top)); \
1705 /*------------------------------------------------.
1706 | Report that the YYRULE is going to be reduced. |
1707 `------------------------------------------------*/
1710 yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule)
1712 unsigned long int yylno = yyrline[yyrule];
1713 int yynrhs = yyr2[yyrule];
1715 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
1717 /* The symbols being reduced. */
1718 for (yyi = 0; yyi < yynrhs; yyi++)
1720 YYFPRINTF (stderr, " $%d = ", yyi + 1);
1721 yy_symbol_print (stderr,
1722 yystos[yyssp[yyi + 1 - yynrhs]],
1723 &(yyvsp[(yyi + 1) - (yynrhs)])
1725 YYFPRINTF (stderr, "\n");
1729 # define YY_REDUCE_PRINT(Rule) \
1732 yy_reduce_print (yyssp, yyvsp, Rule); \
1735 /* Nonzero means print parse trace. It is left uninitialized so that
1736 multiple parsers can coexist. */
1738 #else /* !YYDEBUG */
1739 # define YYDPRINTF(Args)
1740 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
1741 # define YY_STACK_PRINT(Bottom, Top)
1742 # define YY_REDUCE_PRINT(Rule)
1743 #endif /* !YYDEBUG */
1746 /* YYINITDEPTH -- initial size of the parser's stacks. */
1748 # define YYINITDEPTH 200
1751 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1752 if the built-in stack extension method is used).
1754 Do not make this value too large; the results are undefined if
1755 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
1756 evaluated with infinite-precision integer arithmetic. */
1759 # define YYMAXDEPTH 10000
1766 # if defined __GLIBC__ && defined _STRING_H
1767 # define yystrlen strlen
1769 /* Return the length of YYSTR. */
1771 yystrlen (const char *yystr)
1774 for (yylen = 0; yystr[yylen]; yylen++)
1782 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
1783 # define yystpcpy stpcpy
1785 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1788 yystpcpy (char *yydest, const char *yysrc)
1791 const char *yys = yysrc;
1793 while ((*yyd++ = *yys++) != '\0')
1802 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
1803 quotes and backslashes, so that it's suitable for yyerror. The
1804 heuristic is that double-quoting is unnecessary unless the string
1805 contains an apostrophe, a comma, or backslash (other than
1806 backslash-backslash). YYSTR is taken from yytname. If YYRES is
1807 null, do not copy; instead, return the length of what the result
1810 yytnamerr (char *yyres, const char *yystr)
1815 char const *yyp = yystr;
1822 goto do_not_strip_quotes;
1826 goto do_not_strip_quotes;
1839 do_not_strip_quotes: ;
1843 return yystrlen (yystr);
1845 return yystpcpy (yyres, yystr) - yyres;
1849 /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
1850 about the unexpected token YYTOKEN for the state stack whose top is
1853 Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is
1854 not large enough to hold the message. In that case, also set
1855 *YYMSG_ALLOC to the required number of bytes. Return 2 if the
1856 required number of bytes is too large to store. */
1858 yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
1859 yytype_int16 *yyssp, int yytoken)
1861 YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]);
1862 YYSIZE_T yysize = yysize0;
1863 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1864 /* Internationalized format string. */
1865 const char *yyformat = YY_NULLPTR;
1866 /* Arguments of yyformat. */
1867 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1868 /* Number of reported tokens (one for the "unexpected", one per
1872 /* There are many possibilities here to consider:
1873 - If this state is a consistent state with a default action, then
1874 the only way this function was invoked is if the default action
1875 is an error action. In that case, don't check for expected
1876 tokens because there are none.
1877 - The only way there can be no lookahead present (in yychar) is if
1878 this state is a consistent state with a default action. Thus,
1879 detecting the absence of a lookahead is sufficient to determine
1880 that there is no unexpected or expected token to report. In that
1881 case, just report a simple "syntax error".
1882 - Don't assume there isn't a lookahead just because this state is a
1883 consistent state with a default action. There might have been a
1884 previous inconsistent state, consistent state with a non-default
1885 action, or user semantic action that manipulated yychar.
1886 - Of course, the expected token list depends on states to have
1887 correct lookahead information, and it depends on the parser not
1888 to perform extra reductions after fetching a lookahead from the
1889 scanner and before detecting a syntax error. Thus, state merging
1890 (from LALR or IELR) and default reductions corrupt the expected
1891 token list. However, the list is correct for canonical LR with
1892 one exception: it will still contain any token that will not be
1893 accepted due to an error action in a later state.
1895 if (yytoken != YYEMPTY)
1897 int yyn = yypact[*yyssp];
1898 yyarg[yycount++] = yytname[yytoken];
1899 if (!yypact_value_is_default (yyn))
1901 /* Start YYX at -YYN if negative to avoid negative indexes in
1902 YYCHECK. In other words, skip the first -YYN actions for
1903 this state because they are default actions. */
1904 int yyxbegin = yyn < 0 ? -yyn : 0;
1905 /* Stay within bounds of both yycheck and yytname. */
1906 int yychecklim = YYLAST - yyn + 1;
1907 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1910 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1911 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
1912 && !yytable_value_is_error (yytable[yyx + yyn]))
1914 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1920 yyarg[yycount++] = yytname[yyx];
1922 YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]);
1923 if (! (yysize <= yysize1
1924 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1934 # define YYCASE_(N, S) \
1938 YYCASE_(0, YY_("syntax error"));
1939 YYCASE_(1, YY_("syntax error, unexpected %s"));
1940 YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
1941 YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
1942 YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
1943 YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
1948 YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
1949 if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1954 if (*yymsg_alloc < yysize)
1956 *yymsg_alloc = 2 * yysize;
1957 if (! (yysize <= *yymsg_alloc
1958 && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
1959 *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
1963 /* Avoid sprintf, as that infringes on the user's name space.
1964 Don't have undefined behavior even if the translation
1965 produced a string with the wrong number of "%s"s. */
1969 while ((*yyp = *yyformat) != '\0')
1970 if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
1972 yyp += yytnamerr (yyp, yyarg[yyi++]);
1983 #endif /* YYERROR_VERBOSE */
1985 /*-----------------------------------------------.
1986 | Release the memory associated to this symbol. |
1987 `-----------------------------------------------*/
1990 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
1995 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1997 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1999 YY_IGNORE_MAYBE_UNINITIALIZED_END
2005 /* The lookahead symbol. */
2008 /* The semantic value of the lookahead symbol. */
2010 /* Number of syntax errors so far. */
2022 /* Number of tokens to shift before error messages enabled. */
2025 /* The stacks and their tools:
2026 'yyss': related to states.
2027 'yyvs': related to semantic values.
2029 Refer to the stacks through separate pointers, to allow yyoverflow
2030 to reallocate them elsewhere. */
2032 /* The state stack. */
2033 yytype_int16 yyssa[YYINITDEPTH];
2035 yytype_int16 *yyssp;
2037 /* The semantic value stack. */
2038 YYSTYPE yyvsa[YYINITDEPTH];
2042 YYSIZE_T yystacksize;
2046 /* Lookahead token as an internal (translated) token number. */
2048 /* The variables used to return semantic value and location from the
2053 /* Buffer for error messages, and its allocated size. */
2055 char *yymsg = yymsgbuf;
2056 YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
2059 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
2061 /* The number of symbols on the RHS of the reduced rule.
2062 Keep to zero when no symbol should be popped. */
2065 yyssp = yyss = yyssa;
2066 yyvsp = yyvs = yyvsa;
2067 yystacksize = YYINITDEPTH;
2069 YYDPRINTF ((stderr, "Starting parse\n"));
2074 yychar = YYEMPTY; /* Cause a token to be read. */
2077 /*------------------------------------------------------------.
2078 | yynewstate -- Push a new state, which is found in yystate. |
2079 `------------------------------------------------------------*/
2081 /* In all cases, when you get here, the value and location stacks
2082 have just been pushed. So pushing a state here evens the stacks. */
2088 if (yyss + yystacksize - 1 <= yyssp)
2090 /* Get the current used size of the three stacks, in elements. */
2091 YYSIZE_T yysize = yyssp - yyss + 1;
2095 /* Give user a chance to reallocate the stack. Use copies of
2096 these so that the &'s don't force the real ones into
2098 YYSTYPE *yyvs1 = yyvs;
2099 yytype_int16 *yyss1 = yyss;
2101 /* Each stack pointer address is followed by the size of the
2102 data in use in that stack, in bytes. This used to be a
2103 conditional around just the two extra args, but that might
2104 be undefined if yyoverflow is a macro. */
2105 yyoverflow (YY_("memory exhausted"),
2106 &yyss1, yysize * sizeof (*yyssp),
2107 &yyvs1, yysize * sizeof (*yyvsp),
2113 #else /* no yyoverflow */
2114 # ifndef YYSTACK_RELOCATE
2115 goto yyexhaustedlab;
2117 /* Extend the stack our own way. */
2118 if (YYMAXDEPTH <= yystacksize)
2119 goto yyexhaustedlab;
2121 if (YYMAXDEPTH < yystacksize)
2122 yystacksize = YYMAXDEPTH;
2125 yytype_int16 *yyss1 = yyss;
2126 union yyalloc *yyptr =
2127 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
2129 goto yyexhaustedlab;
2130 YYSTACK_RELOCATE (yyss_alloc, yyss);
2131 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
2132 # undef YYSTACK_RELOCATE
2134 YYSTACK_FREE (yyss1);
2137 #endif /* no yyoverflow */
2139 yyssp = yyss + yysize - 1;
2140 yyvsp = yyvs + yysize - 1;
2142 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
2143 (unsigned long int) yystacksize));
2145 if (yyss + yystacksize - 1 <= yyssp)
2149 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
2151 if (yystate == YYFINAL)
2161 /* Do appropriate processing given the current state. Read a
2162 lookahead token if we need one and don't already have one. */
2164 /* First try to decide what to do without reference to lookahead token. */
2165 yyn = yypact[yystate];
2166 if (yypact_value_is_default (yyn))
2169 /* Not known => get a lookahead token if don't already have one. */
2171 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
2172 if (yychar == YYEMPTY)
2174 YYDPRINTF ((stderr, "Reading a token: "));
2178 if (yychar <= YYEOF)
2180 yychar = yytoken = YYEOF;
2181 YYDPRINTF ((stderr, "Now at end of input.\n"));
2185 yytoken = YYTRANSLATE (yychar);
2186 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
2189 /* If the proper action on seeing token YYTOKEN is to reduce or to
2190 detect an error, take that action. */
2192 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
2197 if (yytable_value_is_error (yyn))
2203 /* Count tokens shifted since error; after three, turn off error
2208 /* Shift the lookahead token. */
2209 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
2211 /* Discard the shifted token. */
2215 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
2217 YY_IGNORE_MAYBE_UNINITIALIZED_END
2222 /*-----------------------------------------------------------.
2223 | yydefault -- do the default action for the current state. |
2224 `-----------------------------------------------------------*/
2226 yyn = yydefact[yystate];
2232 /*-----------------------------.
2233 | yyreduce -- Do a reduction. |
2234 `-----------------------------*/
2236 /* yyn is the number of a rule to reduce with. */
2239 /* If YYLEN is nonzero, implement the default value of the action:
2242 Otherwise, the following line sets YYVAL to garbage.
2243 This behavior is undocumented and Bison
2244 users should not rely upon it. Assigning to YYVAL
2245 unconditionally makes the parser a bit smaller, and it avoids a
2246 GCC warning that YYVAL may be used uninitialized. */
2247 yyval = yyvsp[1-yylen];
2250 YY_REDUCE_PRINT (yyn);
2254 #line 277 "pic.y" /* yacc.c:1646 */
2257 print_picture(olist.head);
2259 #line 2260 "pic.cpp" /* yacc.c:1646 */
2263 #line 286 "pic.y" /* yacc.c:1646 */
2264 { (yyval.pl) = (yyvsp[-1].pl); }
2265 #line 2266 "pic.cpp" /* yacc.c:1646 */
2269 #line 291 "pic.y" /* yacc.c:1646 */
2270 { (yyval.pl) = (yyvsp[0].pl); }
2271 #line 2272 "pic.cpp" /* yacc.c:1646 */
2275 #line 293 "pic.y" /* yacc.c:1646 */
2276 { (yyval.pl) = (yyvsp[-2].pl); }
2277 #line 2278 "pic.cpp" /* yacc.c:1646 */
2281 #line 308 "pic.y" /* yacc.c:1646 */
2284 graphname = new char[strlen((yyvsp[0].str)) + 1];
2285 strcpy(graphname, (yyvsp[0].str));
2286 a_delete (yyvsp[0].str);
2288 #line 2289 "pic.cpp" /* yacc.c:1646 */
2292 #line 316 "pic.y" /* yacc.c:1646 */
2294 define_variable((yyvsp[-2].str), (yyvsp[0].x));
2295 a_delete (yyvsp[-2].str);
2297 #line 2298 "pic.cpp" /* yacc.c:1646 */
2301 #line 321 "pic.y" /* yacc.c:1646 */
2303 place *p = lookup_label((yyvsp[-3].str));
2305 lex_error("variable `%1' not defined", (yyvsp[-3].str));
2309 p->x = (yyvsp[0].x);
2311 a_delete (yyvsp[-3].str);
2313 #line 2314 "pic.cpp" /* yacc.c:1646 */
2317 #line 333 "pic.y" /* yacc.c:1646 */
2318 { current_direction = UP_DIRECTION; }
2319 #line 2320 "pic.cpp" /* yacc.c:1646 */
2323 #line 335 "pic.y" /* yacc.c:1646 */
2324 { current_direction = DOWN_DIRECTION; }
2325 #line 2326 "pic.cpp" /* yacc.c:1646 */
2329 #line 337 "pic.y" /* yacc.c:1646 */
2330 { current_direction = LEFT_DIRECTION; }
2331 #line 2332 "pic.cpp" /* yacc.c:1646 */
2335 #line 339 "pic.y" /* yacc.c:1646 */
2336 { current_direction = RIGHT_DIRECTION; }
2337 #line 2338 "pic.cpp" /* yacc.c:1646 */
2341 #line 341 "pic.y" /* yacc.c:1646 */
2343 olist.append(make_command_object((yyvsp[0].lstr).str, (yyvsp[0].lstr).filename,
2344 (yyvsp[0].lstr).lineno));
2346 #line 2347 "pic.cpp" /* yacc.c:1646 */
2350 #line 346 "pic.y" /* yacc.c:1646 */
2352 olist.append(make_command_object((yyvsp[0].lstr).str, (yyvsp[0].lstr).filename,
2353 (yyvsp[0].lstr).lineno));
2355 #line 2356 "pic.cpp" /* yacc.c:1646 */
2359 #line 351 "pic.y" /* yacc.c:1646 */
2361 fprintf(stderr, "%s\n", (yyvsp[0].lstr).str);
2362 a_delete (yyvsp[0].lstr).str;
2365 #line 2366 "pic.cpp" /* yacc.c:1646 */
2369 #line 357 "pic.y" /* yacc.c:1646 */
2371 #line 2372 "pic.cpp" /* yacc.c:1646 */
2375 #line 359 "pic.y" /* yacc.c:1646 */
2379 lex_error("unsafe to run command `%1'", (yyvsp[0].str));
2381 system((yyvsp[0].str));
2382 a_delete (yyvsp[0].str);
2384 #line 2385 "pic.cpp" /* yacc.c:1646 */
2388 #line 368 "pic.y" /* yacc.c:1646 */
2392 do_copy((yyvsp[0].lstr).str);
2393 // do not delete the filename
2395 #line 2396 "pic.cpp" /* yacc.c:1646 */
2399 #line 375 "pic.y" /* yacc.c:1646 */
2401 #line 2402 "pic.cpp" /* yacc.c:1646 */
2405 #line 377 "pic.y" /* yacc.c:1646 */
2407 #line 2408 "pic.cpp" /* yacc.c:1646 */
2411 #line 379 "pic.y" /* yacc.c:1646 */
2415 copy_file_thru((yyvsp[-5].lstr).str, (yyvsp[-2].str), (yyvsp[0].str));
2416 // do not delete the filename
2417 a_delete (yyvsp[-2].str);
2418 a_delete (yyvsp[0].str);
2420 #line 2421 "pic.cpp" /* yacc.c:1646 */
2424 #line 388 "pic.y" /* yacc.c:1646 */
2426 #line 2427 "pic.cpp" /* yacc.c:1646 */
2430 #line 390 "pic.y" /* yacc.c:1646 */
2432 #line 2433 "pic.cpp" /* yacc.c:1646 */
2436 #line 392 "pic.y" /* yacc.c:1646 */
2440 copy_rest_thru((yyvsp[-2].str), (yyvsp[0].str));
2441 a_delete (yyvsp[-2].str);
2442 a_delete (yyvsp[0].str);
2444 #line 2445 "pic.cpp" /* yacc.c:1646 */
2448 #line 400 "pic.y" /* yacc.c:1646 */
2450 #line 2451 "pic.cpp" /* yacc.c:1646 */
2454 #line 402 "pic.y" /* yacc.c:1646 */
2459 do_for((yyvsp[-8].str), (yyvsp[-6].x), (yyvsp[-4].x), (yyvsp[-3].by).is_multiplicative, (yyvsp[-3].by).val, (yyvsp[0].str));
2461 #line 2462 "pic.cpp" /* yacc.c:1646 */
2465 #line 409 "pic.y" /* yacc.c:1646 */
2469 if ((yyvsp[0].if_data).x != 0.0)
2470 push_body((yyvsp[0].if_data).body);
2471 a_delete (yyvsp[0].if_data).body;
2473 #line 2474 "pic.cpp" /* yacc.c:1646 */
2477 #line 417 "pic.y" /* yacc.c:1646 */
2479 #line 2480 "pic.cpp" /* yacc.c:1646 */
2483 #line 419 "pic.y" /* yacc.c:1646 */
2488 if ((yyvsp[-3].if_data).x != 0.0)
2489 push_body((yyvsp[-3].if_data).body);
2491 push_body((yyvsp[0].str));
2492 a_delete (yyvsp[-3].if_data).body;
2493 a_delete (yyvsp[0].str);
2495 #line 2496 "pic.cpp" /* yacc.c:1646 */
2499 #line 432 "pic.y" /* yacc.c:1646 */
2500 { define_variable("scale", 1.0); }
2501 #line 2502 "pic.cpp" /* yacc.c:1646 */
2505 #line 442 "pic.y" /* yacc.c:1646 */
2507 reset((yyvsp[0].str));
2508 a_delete (yyvsp[0].str);
2510 #line 2511 "pic.cpp" /* yacc.c:1646 */
2514 #line 447 "pic.y" /* yacc.c:1646 */
2516 reset((yyvsp[0].str));
2517 a_delete (yyvsp[0].str);
2519 #line 2520 "pic.cpp" /* yacc.c:1646 */
2523 #line 452 "pic.y" /* yacc.c:1646 */
2525 reset((yyvsp[0].str));
2526 a_delete (yyvsp[0].str);
2528 #line 2529 "pic.cpp" /* yacc.c:1646 */
2532 #line 460 "pic.y" /* yacc.c:1646 */
2533 { (yyval.lstr) = (yyvsp[0].lstr); }
2534 #line 2535 "pic.cpp" /* yacc.c:1646 */
2538 #line 462 "pic.y" /* yacc.c:1646 */
2540 (yyval.lstr).str = new char[strlen((yyvsp[-1].lstr).str) + strlen((yyvsp[0].lstr).str) + 1];
2541 strcpy((yyval.lstr).str, (yyvsp[-1].lstr).str);
2542 strcat((yyval.lstr).str, (yyvsp[0].lstr).str);
2543 a_delete (yyvsp[-1].lstr).str;
2544 a_delete (yyvsp[0].lstr).str;
2545 if ((yyvsp[-1].lstr).filename) {
2546 (yyval.lstr).filename = (yyvsp[-1].lstr).filename;
2547 (yyval.lstr).lineno = (yyvsp[-1].lstr).lineno;
2549 else if ((yyvsp[0].lstr).filename) {
2550 (yyval.lstr).filename = (yyvsp[0].lstr).filename;
2551 (yyval.lstr).lineno = (yyvsp[0].lstr).lineno;
2554 #line 2555 "pic.cpp" /* yacc.c:1646 */
2558 #line 481 "pic.y" /* yacc.c:1646 */
2560 (yyval.lstr).str = new char[GDIGITS + 1];
2561 sprintf((yyval.lstr).str, "%g", (yyvsp[0].x));
2562 (yyval.lstr).filename = 0;
2563 (yyval.lstr).lineno = 0;
2565 #line 2566 "pic.cpp" /* yacc.c:1646 */
2569 #line 488 "pic.y" /* yacc.c:1646 */
2570 { (yyval.lstr) = (yyvsp[0].lstr); }
2571 #line 2572 "pic.cpp" /* yacc.c:1646 */
2575 #line 490 "pic.y" /* yacc.c:1646 */
2577 (yyval.lstr).str = new char[GDIGITS + 2 + GDIGITS + 1];
2578 sprintf((yyval.lstr).str, "%g, %g", (yyvsp[0].pair).x, (yyvsp[0].pair).y);
2579 (yyval.lstr).filename = 0;
2580 (yyval.lstr).lineno = 0;
2582 #line 2583 "pic.cpp" /* yacc.c:1646 */
2586 #line 500 "pic.y" /* yacc.c:1646 */
2588 #line 2589 "pic.cpp" /* yacc.c:1646 */
2592 #line 502 "pic.y" /* yacc.c:1646 */
2595 (yyval.if_data).x = (yyvsp[-3].x);
2596 (yyval.if_data).body = (yyvsp[0].str);
2598 #line 2599 "pic.cpp" /* yacc.c:1646 */
2602 #line 511 "pic.y" /* yacc.c:1646 */
2603 { (yyval.str) = 0; }
2604 #line 2605 "pic.cpp" /* yacc.c:1646 */
2608 #line 513 "pic.y" /* yacc.c:1646 */
2609 { (yyval.str) = (yyvsp[0].lstr).str; }
2610 #line 2611 "pic.cpp" /* yacc.c:1646 */
2614 #line 518 "pic.y" /* yacc.c:1646 */
2615 { (yyval.x) = (yyvsp[0].x); }
2616 #line 2617 "pic.cpp" /* yacc.c:1646 */
2620 #line 520 "pic.y" /* yacc.c:1646 */
2621 { (yyval.x) = (yyvsp[0].x); }
2622 #line 2623 "pic.cpp" /* yacc.c:1646 */
2626 #line 525 "pic.y" /* yacc.c:1646 */
2628 (yyval.x) = strcmp((yyvsp[-2].lstr).str, (yyvsp[0].lstr).str) == 0;
2629 a_delete (yyvsp[-2].lstr).str;
2630 a_delete (yyvsp[0].lstr).str;
2632 #line 2633 "pic.cpp" /* yacc.c:1646 */
2636 #line 531 "pic.y" /* yacc.c:1646 */
2638 (yyval.x) = strcmp((yyvsp[-2].lstr).str, (yyvsp[0].lstr).str) != 0;
2639 a_delete (yyvsp[-2].lstr).str;
2640 a_delete (yyvsp[0].lstr).str;
2642 #line 2643 "pic.cpp" /* yacc.c:1646 */
2646 #line 537 "pic.y" /* yacc.c:1646 */
2647 { (yyval.x) = ((yyvsp[-2].x) != 0.0 && (yyvsp[0].x) != 0.0); }
2648 #line 2649 "pic.cpp" /* yacc.c:1646 */
2652 #line 539 "pic.y" /* yacc.c:1646 */
2653 { (yyval.x) = ((yyvsp[-2].x) != 0.0 && (yyvsp[0].x) != 0.0); }
2654 #line 2655 "pic.cpp" /* yacc.c:1646 */
2658 #line 541 "pic.y" /* yacc.c:1646 */
2659 { (yyval.x) = ((yyvsp[-2].x) != 0.0 && (yyvsp[0].x) != 0.0); }
2660 #line 2661 "pic.cpp" /* yacc.c:1646 */
2664 #line 543 "pic.y" /* yacc.c:1646 */
2665 { (yyval.x) = ((yyvsp[-2].x) != 0.0 || (yyvsp[0].x) != 0.0); }
2666 #line 2667 "pic.cpp" /* yacc.c:1646 */
2670 #line 545 "pic.y" /* yacc.c:1646 */
2671 { (yyval.x) = ((yyvsp[-2].x) != 0.0 || (yyvsp[0].x) != 0.0); }
2672 #line 2673 "pic.cpp" /* yacc.c:1646 */
2676 #line 547 "pic.y" /* yacc.c:1646 */
2677 { (yyval.x) = ((yyvsp[-2].x) != 0.0 || (yyvsp[0].x) != 0.0); }
2678 #line 2679 "pic.cpp" /* yacc.c:1646 */
2682 #line 549 "pic.y" /* yacc.c:1646 */
2683 { (yyval.x) = ((yyvsp[0].x) == 0.0); }
2684 #line 2685 "pic.cpp" /* yacc.c:1646 */
2688 #line 555 "pic.y" /* yacc.c:1646 */
2690 (yyval.by).val = 1.0;
2691 (yyval.by).is_multiplicative = 0;
2693 #line 2694 "pic.cpp" /* yacc.c:1646 */
2697 #line 560 "pic.y" /* yacc.c:1646 */
2699 (yyval.by).val = (yyvsp[0].x);
2700 (yyval.by).is_multiplicative = 0;
2702 #line 2703 "pic.cpp" /* yacc.c:1646 */
2706 #line 565 "pic.y" /* yacc.c:1646 */
2708 (yyval.by).val = (yyvsp[0].x);
2709 (yyval.by).is_multiplicative = 1;
2711 #line 2712 "pic.cpp" /* yacc.c:1646 */
2715 #line 573 "pic.y" /* yacc.c:1646 */
2717 (yyval.pl).obj = (yyvsp[0].spec)->make_object(¤t_position,
2718 ¤t_direction);
2719 if ((yyval.pl).obj == 0)
2721 delete (yyvsp[0].spec);
2723 olist.append((yyval.pl).obj);
2725 (yyval.pl).x = current_position.x;
2726 (yyval.pl).y = current_position.y;
2729 #line 2730 "pic.cpp" /* yacc.c:1646 */
2733 #line 587 "pic.y" /* yacc.c:1646 */
2735 (yyval.pl) = (yyvsp[0].pl);
2736 define_label((yyvsp[-3].str), & (yyval.pl));
2737 a_delete (yyvsp[-3].str);
2739 #line 2740 "pic.cpp" /* yacc.c:1646 */
2743 #line 593 "pic.y" /* yacc.c:1646 */
2746 (yyval.pl).x = (yyvsp[0].pair).x;
2747 (yyval.pl).y = (yyvsp[0].pair).y;
2748 define_label((yyvsp[-3].str), & (yyval.pl));
2749 a_delete (yyvsp[-3].str);
2751 #line 2752 "pic.cpp" /* yacc.c:1646 */
2755 #line 601 "pic.y" /* yacc.c:1646 */
2757 (yyval.pl) = (yyvsp[0].pl);
2758 define_label((yyvsp[-3].str), & (yyval.pl));
2759 a_delete (yyvsp[-3].str);
2761 #line 2762 "pic.cpp" /* yacc.c:1646 */
2765 #line 607 "pic.y" /* yacc.c:1646 */
2767 (yyval.state).x = current_position.x;
2768 (yyval.state).y = current_position.y;
2769 (yyval.state).dir = current_direction;
2771 #line 2772 "pic.cpp" /* yacc.c:1646 */
2775 #line 613 "pic.y" /* yacc.c:1646 */
2777 current_position.x = (yyvsp[-2].state).x;
2778 current_position.y = (yyvsp[-2].state).y;
2779 current_direction = (yyvsp[-2].state).dir;
2781 #line 2782 "pic.cpp" /* yacc.c:1646 */
2785 #line 619 "pic.y" /* yacc.c:1646 */
2787 (yyval.pl) = (yyvsp[-3].pl);
2789 #line 2790 "pic.cpp" /* yacc.c:1646 */
2793 #line 623 "pic.y" /* yacc.c:1646 */
2796 (yyval.pl).x = current_position.x;
2797 (yyval.pl).y = current_position.y;
2799 #line 2800 "pic.cpp" /* yacc.c:1646 */
2803 #line 632 "pic.y" /* yacc.c:1646 */
2805 #line 2806 "pic.cpp" /* yacc.c:1646 */
2809 #line 634 "pic.y" /* yacc.c:1646 */
2811 #line 2812 "pic.cpp" /* yacc.c:1646 */
2815 #line 639 "pic.y" /* yacc.c:1646 */
2816 { (yyval.spec) = new object_spec(BOX_OBJECT); }
2817 #line 2818 "pic.cpp" /* yacc.c:1646 */
2821 #line 641 "pic.y" /* yacc.c:1646 */
2822 { (yyval.spec) = new object_spec(CIRCLE_OBJECT); }
2823 #line 2824 "pic.cpp" /* yacc.c:1646 */
2827 #line 643 "pic.y" /* yacc.c:1646 */
2828 { (yyval.spec) = new object_spec(ELLIPSE_OBJECT); }
2829 #line 2830 "pic.cpp" /* yacc.c:1646 */
2833 #line 645 "pic.y" /* yacc.c:1646 */
2835 (yyval.spec) = new object_spec(ARC_OBJECT);
2836 (yyval.spec)->dir = current_direction;
2838 #line 2839 "pic.cpp" /* yacc.c:1646 */
2842 #line 650 "pic.y" /* yacc.c:1646 */
2844 (yyval.spec) = new object_spec(LINE_OBJECT);
2845 lookup_variable("lineht", & (yyval.spec)->segment_height);
2846 lookup_variable("linewid", & (yyval.spec)->segment_width);
2847 (yyval.spec)->dir = current_direction;
2849 #line 2850 "pic.cpp" /* yacc.c:1646 */
2853 #line 657 "pic.y" /* yacc.c:1646 */
2855 (yyval.spec) = new object_spec(ARROW_OBJECT);
2856 lookup_variable("lineht", & (yyval.spec)->segment_height);
2857 lookup_variable("linewid", & (yyval.spec)->segment_width);
2858 (yyval.spec)->dir = current_direction;
2860 #line 2861 "pic.cpp" /* yacc.c:1646 */
2864 #line 664 "pic.y" /* yacc.c:1646 */
2866 (yyval.spec) = new object_spec(MOVE_OBJECT);
2867 lookup_variable("moveht", & (yyval.spec)->segment_height);
2868 lookup_variable("movewid", & (yyval.spec)->segment_width);
2869 (yyval.spec)->dir = current_direction;
2871 #line 2872 "pic.cpp" /* yacc.c:1646 */
2875 #line 671 "pic.y" /* yacc.c:1646 */
2877 (yyval.spec) = new object_spec(SPLINE_OBJECT);
2878 lookup_variable("lineht", & (yyval.spec)->segment_height);
2879 lookup_variable("linewid", & (yyval.spec)->segment_width);
2880 (yyval.spec)->dir = current_direction;
2882 #line 2883 "pic.cpp" /* yacc.c:1646 */
2886 #line 678 "pic.y" /* yacc.c:1646 */
2888 (yyval.spec) = new object_spec(TEXT_OBJECT);
2889 (yyval.spec)->text = new text_item((yyvsp[0].lstr).str, (yyvsp[0].lstr).filename, (yyvsp[0].lstr).lineno);
2891 #line 2892 "pic.cpp" /* yacc.c:1646 */
2895 #line 683 "pic.y" /* yacc.c:1646 */
2897 (yyval.spec) = new object_spec(TEXT_OBJECT);
2898 (yyval.spec)->text = new text_item(format_number(0, (yyvsp[0].x)), 0, -1);
2900 #line 2901 "pic.cpp" /* yacc.c:1646 */
2904 #line 688 "pic.y" /* yacc.c:1646 */
2906 (yyval.spec) = new object_spec(TEXT_OBJECT);
2907 (yyval.spec)->text = new text_item(format_number((yyvsp[0].lstr).str, (yyvsp[-1].x)),
2908 (yyvsp[0].lstr).filename, (yyvsp[0].lstr).lineno);
2909 a_delete (yyvsp[0].lstr).str;
2911 #line 2912 "pic.cpp" /* yacc.c:1646 */
2915 #line 695 "pic.y" /* yacc.c:1646 */
2917 saved_state *p = new saved_state;
2919 p->x = current_position.x;
2920 p->y = current_position.y;
2921 p->dir = current_direction;
2922 p->tbl = current_table;
2923 p->prev = current_saved_state;
2924 current_position.x = 0.0;
2925 current_position.y = 0.0;
2926 current_table = new PTABLE(place);
2927 current_saved_state = p;
2928 olist.append(make_mark_object());
2930 #line 2931 "pic.cpp" /* yacc.c:1646 */
2934 #line 710 "pic.y" /* yacc.c:1646 */
2936 current_position.x = (yyvsp[-2].pstate)->x;
2937 current_position.y = (yyvsp[-2].pstate)->y;
2938 current_direction = (yyvsp[-2].pstate)->dir;
2939 (yyval.spec) = new object_spec(BLOCK_OBJECT);
2940 olist.wrap_up_block(& (yyval.spec)->oblist);
2941 (yyval.spec)->tbl = current_table;
2942 current_table = (yyvsp[-2].pstate)->tbl;
2943 current_saved_state = (yyvsp[-2].pstate)->prev;
2944 delete (yyvsp[-2].pstate);
2946 #line 2947 "pic.cpp" /* yacc.c:1646 */
2950 #line 722 "pic.y" /* yacc.c:1646 */
2952 (yyval.spec) = (yyvsp[-2].spec);
2953 (yyval.spec)->height = (yyvsp[0].x);
2954 (yyval.spec)->flags |= HAS_HEIGHT;
2956 #line 2957 "pic.cpp" /* yacc.c:1646 */
2960 #line 728 "pic.y" /* yacc.c:1646 */
2962 (yyval.spec) = (yyvsp[-2].spec);
2963 (yyval.spec)->radius = (yyvsp[0].x);
2964 (yyval.spec)->flags |= HAS_RADIUS;
2966 #line 2967 "pic.cpp" /* yacc.c:1646 */
2970 #line 734 "pic.y" /* yacc.c:1646 */
2972 (yyval.spec) = (yyvsp[-2].spec);
2973 (yyval.spec)->width = (yyvsp[0].x);
2974 (yyval.spec)->flags |= HAS_WIDTH;
2976 #line 2977 "pic.cpp" /* yacc.c:1646 */
2980 #line 740 "pic.y" /* yacc.c:1646 */
2982 (yyval.spec) = (yyvsp[-2].spec);
2983 (yyval.spec)->radius = (yyvsp[0].x)/2.0;
2984 (yyval.spec)->flags |= HAS_RADIUS;
2986 #line 2987 "pic.cpp" /* yacc.c:1646 */
2990 #line 746 "pic.y" /* yacc.c:1646 */
2992 (yyval.spec) = (yyvsp[-1].spec);
2993 (yyval.spec)->flags |= HAS_SEGMENT;
2994 switch ((yyval.spec)->dir) {
2996 (yyval.spec)->segment_pos.y += (yyvsp[0].x);
2998 case DOWN_DIRECTION:
2999 (yyval.spec)->segment_pos.y -= (yyvsp[0].x);
3001 case RIGHT_DIRECTION:
3002 (yyval.spec)->segment_pos.x += (yyvsp[0].x);
3004 case LEFT_DIRECTION:
3005 (yyval.spec)->segment_pos.x -= (yyvsp[0].x);
3009 #line 3010 "pic.cpp" /* yacc.c:1646 */
3013 #line 765 "pic.y" /* yacc.c:1646 */
3015 (yyval.spec) = (yyvsp[-1].spec);
3016 (yyval.spec)->dir = UP_DIRECTION;
3017 (yyval.spec)->flags |= HAS_SEGMENT;
3018 (yyval.spec)->segment_pos.y += (yyval.spec)->segment_height;
3020 #line 3021 "pic.cpp" /* yacc.c:1646 */
3024 #line 772 "pic.y" /* yacc.c:1646 */
3026 (yyval.spec) = (yyvsp[-2].spec);
3027 (yyval.spec)->dir = UP_DIRECTION;
3028 (yyval.spec)->flags |= HAS_SEGMENT;
3029 (yyval.spec)->segment_pos.y += (yyvsp[0].x);
3031 #line 3032 "pic.cpp" /* yacc.c:1646 */
3035 #line 779 "pic.y" /* yacc.c:1646 */
3037 (yyval.spec) = (yyvsp[-1].spec);
3038 (yyval.spec)->dir = DOWN_DIRECTION;
3039 (yyval.spec)->flags |= HAS_SEGMENT;
3040 (yyval.spec)->segment_pos.y -= (yyval.spec)->segment_height;
3042 #line 3043 "pic.cpp" /* yacc.c:1646 */
3046 #line 786 "pic.y" /* yacc.c:1646 */
3048 (yyval.spec) = (yyvsp[-2].spec);
3049 (yyval.spec)->dir = DOWN_DIRECTION;
3050 (yyval.spec)->flags |= HAS_SEGMENT;
3051 (yyval.spec)->segment_pos.y -= (yyvsp[0].x);
3053 #line 3054 "pic.cpp" /* yacc.c:1646 */
3057 #line 793 "pic.y" /* yacc.c:1646 */
3059 (yyval.spec) = (yyvsp[-1].spec);
3060 (yyval.spec)->dir = RIGHT_DIRECTION;
3061 (yyval.spec)->flags |= HAS_SEGMENT;
3062 (yyval.spec)->segment_pos.x += (yyval.spec)->segment_width;
3064 #line 3065 "pic.cpp" /* yacc.c:1646 */
3068 #line 800 "pic.y" /* yacc.c:1646 */
3070 (yyval.spec) = (yyvsp[-2].spec);
3071 (yyval.spec)->dir = RIGHT_DIRECTION;
3072 (yyval.spec)->flags |= HAS_SEGMENT;
3073 (yyval.spec)->segment_pos.x += (yyvsp[0].x);
3075 #line 3076 "pic.cpp" /* yacc.c:1646 */
3079 #line 807 "pic.y" /* yacc.c:1646 */
3081 (yyval.spec) = (yyvsp[-1].spec);
3082 (yyval.spec)->dir = LEFT_DIRECTION;
3083 (yyval.spec)->flags |= HAS_SEGMENT;
3084 (yyval.spec)->segment_pos.x -= (yyval.spec)->segment_width;
3086 #line 3087 "pic.cpp" /* yacc.c:1646 */
3090 #line 814 "pic.y" /* yacc.c:1646 */
3092 (yyval.spec) = (yyvsp[-2].spec);
3093 (yyval.spec)->dir = LEFT_DIRECTION;
3094 (yyval.spec)->flags |= HAS_SEGMENT;
3095 (yyval.spec)->segment_pos.x -= (yyvsp[0].x);
3097 #line 3098 "pic.cpp" /* yacc.c:1646 */
3101 #line 821 "pic.y" /* yacc.c:1646 */
3103 (yyval.spec) = (yyvsp[-2].spec);
3104 (yyval.spec)->flags |= HAS_FROM;
3105 (yyval.spec)->from.x = (yyvsp[0].pair).x;
3106 (yyval.spec)->from.y = (yyvsp[0].pair).y;
3108 #line 3109 "pic.cpp" /* yacc.c:1646 */
3112 #line 828 "pic.y" /* yacc.c:1646 */
3114 (yyval.spec) = (yyvsp[-2].spec);
3115 if ((yyval.spec)->flags & HAS_SEGMENT)
3116 (yyval.spec)->segment_list = new segment((yyval.spec)->segment_pos,
3117 (yyval.spec)->segment_is_absolute,
3118 (yyval.spec)->segment_list);
3119 (yyval.spec)->flags |= HAS_SEGMENT;
3120 (yyval.spec)->segment_pos.x = (yyvsp[0].pair).x;
3121 (yyval.spec)->segment_pos.y = (yyvsp[0].pair).y;
3122 (yyval.spec)->segment_is_absolute = 1;
3123 (yyval.spec)->flags |= HAS_TO;
3124 (yyval.spec)->to.x = (yyvsp[0].pair).x;
3125 (yyval.spec)->to.y = (yyvsp[0].pair).y;
3127 #line 3128 "pic.cpp" /* yacc.c:1646 */
3131 #line 843 "pic.y" /* yacc.c:1646 */
3133 (yyval.spec) = (yyvsp[-2].spec);
3134 (yyval.spec)->flags |= HAS_AT;
3135 (yyval.spec)->at.x = (yyvsp[0].pair).x;
3136 (yyval.spec)->at.y = (yyvsp[0].pair).y;
3137 if ((yyval.spec)->type != ARC_OBJECT) {
3138 (yyval.spec)->flags |= HAS_FROM;
3139 (yyval.spec)->from.x = (yyvsp[0].pair).x;
3140 (yyval.spec)->from.y = (yyvsp[0].pair).y;
3143 #line 3144 "pic.cpp" /* yacc.c:1646 */
3147 #line 855 "pic.y" /* yacc.c:1646 */
3149 (yyval.spec) = (yyvsp[-2].spec);
3150 (yyval.spec)->flags |= HAS_WITH;
3151 (yyval.spec)->with = (yyvsp[0].pth);
3153 #line 3154 "pic.cpp" /* yacc.c:1646 */
3157 #line 861 "pic.y" /* yacc.c:1646 */
3159 (yyval.spec) = (yyvsp[-2].spec);
3160 (yyval.spec)->flags |= HAS_WITH;
3162 pos.x = (yyvsp[0].pair).x;
3163 pos.y = (yyvsp[0].pair).y;
3164 (yyval.spec)->with = new path(pos);
3166 #line 3167 "pic.cpp" /* yacc.c:1646 */
3170 #line 870 "pic.y" /* yacc.c:1646 */
3172 (yyval.spec) = (yyvsp[-2].spec);
3173 (yyval.spec)->flags |= HAS_SEGMENT;
3174 (yyval.spec)->segment_pos.x += (yyvsp[0].pair).x;
3175 (yyval.spec)->segment_pos.y += (yyvsp[0].pair).y;
3177 #line 3178 "pic.cpp" /* yacc.c:1646 */
3181 #line 877 "pic.y" /* yacc.c:1646 */
3183 (yyval.spec) = (yyvsp[-1].spec);
3184 if (!((yyval.spec)->flags & HAS_SEGMENT))
3185 switch ((yyval.spec)->dir) {
3187 (yyval.spec)->segment_pos.y += (yyval.spec)->segment_width;
3189 case DOWN_DIRECTION:
3190 (yyval.spec)->segment_pos.y -= (yyval.spec)->segment_width;
3192 case RIGHT_DIRECTION:
3193 (yyval.spec)->segment_pos.x += (yyval.spec)->segment_width;
3195 case LEFT_DIRECTION:
3196 (yyval.spec)->segment_pos.x -= (yyval.spec)->segment_width;
3199 (yyval.spec)->segment_list = new segment((yyval.spec)->segment_pos,
3200 (yyval.spec)->segment_is_absolute,
3201 (yyval.spec)->segment_list);
3202 (yyval.spec)->flags &= ~HAS_SEGMENT;
3203 (yyval.spec)->segment_pos.x = (yyval.spec)->segment_pos.y = 0.0;
3204 (yyval.spec)->segment_is_absolute = 0;
3206 #line 3207 "pic.cpp" /* yacc.c:1646 */
3210 #line 902 "pic.y" /* yacc.c:1646 */
3212 (yyval.spec) = (yyvsp[-1].spec); // nothing
3214 #line 3215 "pic.cpp" /* yacc.c:1646 */
3218 #line 906 "pic.y" /* yacc.c:1646 */
3220 (yyval.spec) = (yyvsp[-1].spec);
3221 (yyval.spec)->flags |= IS_DOTTED;
3222 lookup_variable("dashwid", & (yyval.spec)->dash_width);
3224 #line 3225 "pic.cpp" /* yacc.c:1646 */
3228 #line 912 "pic.y" /* yacc.c:1646 */
3230 (yyval.spec) = (yyvsp[-2].spec);
3231 (yyval.spec)->flags |= IS_DOTTED;
3232 (yyval.spec)->dash_width = (yyvsp[0].x);
3234 #line 3235 "pic.cpp" /* yacc.c:1646 */
3238 #line 918 "pic.y" /* yacc.c:1646 */
3240 (yyval.spec) = (yyvsp[-1].spec);
3241 (yyval.spec)->flags |= IS_DASHED;
3242 lookup_variable("dashwid", & (yyval.spec)->dash_width);
3244 #line 3245 "pic.cpp" /* yacc.c:1646 */
3248 #line 924 "pic.y" /* yacc.c:1646 */
3250 (yyval.spec) = (yyvsp[-2].spec);
3251 (yyval.spec)->flags |= IS_DASHED;
3252 (yyval.spec)->dash_width = (yyvsp[0].x);
3254 #line 3255 "pic.cpp" /* yacc.c:1646 */
3258 #line 930 "pic.y" /* yacc.c:1646 */
3260 (yyval.spec) = (yyvsp[-1].spec);
3261 (yyval.spec)->flags |= IS_DEFAULT_FILLED;
3263 #line 3264 "pic.cpp" /* yacc.c:1646 */
3267 #line 935 "pic.y" /* yacc.c:1646 */
3269 (yyval.spec) = (yyvsp[-2].spec);
3270 (yyval.spec)->flags |= IS_FILLED;
3271 (yyval.spec)->fill = (yyvsp[0].x);
3273 #line 3274 "pic.cpp" /* yacc.c:1646 */
3277 #line 941 "pic.y" /* yacc.c:1646 */
3279 (yyval.spec) = (yyvsp[-2].spec);
3280 (yyval.spec)->flags |= IS_XSLANTED;
3281 (yyval.spec)->xslanted = (yyvsp[0].x);
3283 #line 3284 "pic.cpp" /* yacc.c:1646 */
3287 #line 947 "pic.y" /* yacc.c:1646 */
3289 (yyval.spec) = (yyvsp[-2].spec);
3290 (yyval.spec)->flags |= IS_YSLANTED;
3291 (yyval.spec)->yslanted = (yyvsp[0].x);
3293 #line 3294 "pic.cpp" /* yacc.c:1646 */
3297 #line 953 "pic.y" /* yacc.c:1646 */
3299 (yyval.spec) = (yyvsp[-2].spec);
3300 (yyval.spec)->flags |= (IS_SHADED | IS_FILLED);
3301 (yyval.spec)->shaded = new char[strlen((yyvsp[0].lstr).str)+1];
3302 strcpy((yyval.spec)->shaded, (yyvsp[0].lstr).str);
3304 #line 3305 "pic.cpp" /* yacc.c:1646 */
3308 #line 960 "pic.y" /* yacc.c:1646 */
3310 (yyval.spec) = (yyvsp[-2].spec);
3311 (yyval.spec)->flags |= (IS_SHADED | IS_OUTLINED | IS_FILLED);
3312 (yyval.spec)->shaded = new char[strlen((yyvsp[0].lstr).str)+1];
3313 strcpy((yyval.spec)->shaded, (yyvsp[0].lstr).str);
3314 (yyval.spec)->outlined = new char[strlen((yyvsp[0].lstr).str)+1];
3315 strcpy((yyval.spec)->outlined, (yyvsp[0].lstr).str);
3317 #line 3318 "pic.cpp" /* yacc.c:1646 */
3321 #line 969 "pic.y" /* yacc.c:1646 */
3323 (yyval.spec) = (yyvsp[-2].spec);
3324 (yyval.spec)->flags |= IS_OUTLINED;
3325 (yyval.spec)->outlined = new char[strlen((yyvsp[0].lstr).str)+1];
3326 strcpy((yyval.spec)->outlined, (yyvsp[0].lstr).str);
3328 #line 3329 "pic.cpp" /* yacc.c:1646 */
3332 #line 976 "pic.y" /* yacc.c:1646 */
3334 (yyval.spec) = (yyvsp[-1].spec);
3335 // line chop chop means line chop 0 chop 0
3336 if ((yyval.spec)->flags & IS_DEFAULT_CHOPPED) {
3337 (yyval.spec)->flags |= IS_CHOPPED;
3338 (yyval.spec)->flags &= ~IS_DEFAULT_CHOPPED;
3339 (yyval.spec)->start_chop = (yyval.spec)->end_chop = 0.0;
3341 else if ((yyval.spec)->flags & IS_CHOPPED) {
3342 (yyval.spec)->end_chop = 0.0;
3345 (yyval.spec)->flags |= IS_DEFAULT_CHOPPED;
3348 #line 3349 "pic.cpp" /* yacc.c:1646 */
3352 #line 992 "pic.y" /* yacc.c:1646 */
3354 (yyval.spec) = (yyvsp[-2].spec);
3355 if ((yyval.spec)->flags & IS_DEFAULT_CHOPPED) {
3356 (yyval.spec)->flags |= IS_CHOPPED;
3357 (yyval.spec)->flags &= ~IS_DEFAULT_CHOPPED;
3358 (yyval.spec)->start_chop = 0.0;
3359 (yyval.spec)->end_chop = (yyvsp[0].x);
3361 else if ((yyval.spec)->flags & IS_CHOPPED) {
3362 (yyval.spec)->end_chop = (yyvsp[0].x);
3365 (yyval.spec)->start_chop = (yyval.spec)->end_chop = (yyvsp[0].x);
3366 (yyval.spec)->flags |= IS_CHOPPED;
3369 #line 3370 "pic.cpp" /* yacc.c:1646 */
3373 #line 1009 "pic.y" /* yacc.c:1646 */
3375 (yyval.spec) = (yyvsp[-1].spec);
3376 (yyval.spec)->flags |= IS_SAME;
3378 #line 3379 "pic.cpp" /* yacc.c:1646 */
3382 #line 1014 "pic.y" /* yacc.c:1646 */
3384 (yyval.spec) = (yyvsp[-1].spec);
3385 (yyval.spec)->flags |= IS_INVISIBLE;
3387 #line 3388 "pic.cpp" /* yacc.c:1646 */
3391 #line 1019 "pic.y" /* yacc.c:1646 */
3393 (yyval.spec) = (yyvsp[-1].spec);
3394 (yyval.spec)->flags |= HAS_LEFT_ARROW_HEAD;
3396 #line 3397 "pic.cpp" /* yacc.c:1646 */
3400 #line 1024 "pic.y" /* yacc.c:1646 */
3402 (yyval.spec) = (yyvsp[-1].spec);
3403 (yyval.spec)->flags |= HAS_RIGHT_ARROW_HEAD;
3405 #line 3406 "pic.cpp" /* yacc.c:1646 */
3409 #line 1029 "pic.y" /* yacc.c:1646 */
3411 (yyval.spec) = (yyvsp[-1].spec);
3412 (yyval.spec)->flags |= (HAS_LEFT_ARROW_HEAD|HAS_RIGHT_ARROW_HEAD);
3414 #line 3415 "pic.cpp" /* yacc.c:1646 */
3418 #line 1034 "pic.y" /* yacc.c:1646 */
3420 (yyval.spec) = (yyvsp[-1].spec);
3421 (yyval.spec)->flags |= IS_CLOCKWISE;
3423 #line 3424 "pic.cpp" /* yacc.c:1646 */
3427 #line 1039 "pic.y" /* yacc.c:1646 */
3429 (yyval.spec) = (yyvsp[-1].spec);
3430 (yyval.spec)->flags &= ~IS_CLOCKWISE;
3432 #line 3433 "pic.cpp" /* yacc.c:1646 */
3436 #line 1044 "pic.y" /* yacc.c:1646 */
3438 (yyval.spec) = (yyvsp[-1].spec);
3440 for (p = & (yyval.spec)->text; *p; p = &(*p)->next)
3442 *p = new text_item((yyvsp[0].lstr).str, (yyvsp[0].lstr).filename, (yyvsp[0].lstr).lineno);
3444 #line 3445 "pic.cpp" /* yacc.c:1646 */
3448 #line 1052 "pic.y" /* yacc.c:1646 */
3450 (yyval.spec) = (yyvsp[-1].spec);
3451 if ((yyval.spec)->text) {
3453 for (p = (yyval.spec)->text; p->next; p = p->next)
3455 p->adj.h = LEFT_ADJUST;
3458 #line 3459 "pic.cpp" /* yacc.c:1646 */
3462 #line 1062 "pic.y" /* yacc.c:1646 */
3464 (yyval.spec) = (yyvsp[-1].spec);
3465 if ((yyval.spec)->text) {
3467 for (p = (yyval.spec)->text; p->next; p = p->next)
3469 p->adj.h = RIGHT_ADJUST;
3472 #line 3473 "pic.cpp" /* yacc.c:1646 */
3476 #line 1072 "pic.y" /* yacc.c:1646 */
3478 (yyval.spec) = (yyvsp[-1].spec);
3479 if ((yyval.spec)->text) {
3481 for (p = (yyval.spec)->text; p->next; p = p->next)
3483 p->adj.v = ABOVE_ADJUST;
3486 #line 3487 "pic.cpp" /* yacc.c:1646 */
3490 #line 1082 "pic.y" /* yacc.c:1646 */
3492 (yyval.spec) = (yyvsp[-1].spec);
3493 if ((yyval.spec)->text) {
3495 for (p = (yyval.spec)->text; p->next; p = p->next)
3497 p->adj.v = BELOW_ADJUST;
3500 #line 3501 "pic.cpp" /* yacc.c:1646 */
3504 #line 1092 "pic.y" /* yacc.c:1646 */
3506 (yyval.spec) = (yyvsp[-2].spec);
3507 (yyval.spec)->flags |= HAS_THICKNESS;
3508 (yyval.spec)->thickness = (yyvsp[0].x);
3510 #line 3511 "pic.cpp" /* yacc.c:1646 */
3514 #line 1098 "pic.y" /* yacc.c:1646 */
3516 (yyval.spec) = (yyvsp[-1].spec);
3517 (yyval.spec)->flags |= IS_ALIGNED;
3519 #line 3520 "pic.cpp" /* yacc.c:1646 */
3523 #line 1106 "pic.y" /* yacc.c:1646 */
3524 { (yyval.lstr) = (yyvsp[0].lstr); }
3525 #line 3526 "pic.cpp" /* yacc.c:1646 */
3529 #line 1108 "pic.y" /* yacc.c:1646 */
3531 (yyval.lstr).filename = (yyvsp[-2].lstr).filename;
3532 (yyval.lstr).lineno = (yyvsp[-2].lstr).lineno;
3533 (yyval.lstr).str = do_sprintf((yyvsp[-2].lstr).str, (yyvsp[-1].dv).v, (yyvsp[-1].dv).nv);
3534 a_delete (yyvsp[-1].dv).v;
3535 a_delete (yyvsp[-2].lstr).str;
3537 #line 3538 "pic.cpp" /* yacc.c:1646 */
3541 #line 1119 "pic.y" /* yacc.c:1646 */
3545 (yyval.dv).maxv = 0;
3547 #line 3548 "pic.cpp" /* yacc.c:1646 */
3551 #line 1125 "pic.y" /* yacc.c:1646 */
3553 (yyval.dv) = (yyvsp[-2].dv);
3554 if ((yyval.dv).nv >= (yyval.dv).maxv) {
3555 if ((yyval.dv).nv == 0) {
3556 (yyval.dv).v = new double[4];
3557 (yyval.dv).maxv = 4;
3560 double *oldv = (yyval.dv).v;
3561 (yyval.dv).maxv *= 2;
3563 (yyval.dv).v = new double[(yyval.dv).maxv];
3564 memcpy((yyval.dv).v, oldv, (yyval.dv).nv*sizeof(double));
3566 // workaround for bug in Compaq C++ V6.5-033
3567 // for Compaq Tru64 UNIX V5.1A (Rev. 1885)
3568 double *foo = new double[(yyval.dv).maxv];
3569 memcpy(foo, oldv, (yyval.dv).nv*sizeof(double));
3575 (yyval.dv).v[(yyval.dv).nv] = (yyvsp[0].x);
3578 #line 3579 "pic.cpp" /* yacc.c:1646 */
3582 #line 1155 "pic.y" /* yacc.c:1646 */
3583 { (yyval.pair) = (yyvsp[0].pair); }
3584 #line 3585 "pic.cpp" /* yacc.c:1646 */
3588 #line 1157 "pic.y" /* yacc.c:1646 */
3590 position pos = (yyvsp[0].pl);
3591 (yyval.pair).x = pos.x;
3592 (yyval.pair).y = pos.y;
3594 #line 3595 "pic.cpp" /* yacc.c:1646 */
3598 #line 1163 "pic.y" /* yacc.c:1646 */
3600 position pos = (yyvsp[-1].pl);
3601 (yyval.pair).x = pos.x;
3602 (yyval.pair).y = pos.y;
3604 #line 3605 "pic.cpp" /* yacc.c:1646 */
3608 #line 1172 "pic.y" /* yacc.c:1646 */
3609 { (yyval.pair) = (yyvsp[0].pair); }
3610 #line 3611 "pic.cpp" /* yacc.c:1646 */
3614 #line 1174 "pic.y" /* yacc.c:1646 */
3616 (yyval.pair).x = (yyvsp[-2].pair).x + (yyvsp[0].pair).x;
3617 (yyval.pair).y = (yyvsp[-2].pair).y + (yyvsp[0].pair).y;
3619 #line 3620 "pic.cpp" /* yacc.c:1646 */
3623 #line 1179 "pic.y" /* yacc.c:1646 */
3625 (yyval.pair).x = (yyvsp[-3].pair).x + (yyvsp[-1].pair).x;
3626 (yyval.pair).y = (yyvsp[-3].pair).y + (yyvsp[-1].pair).y;
3628 #line 3629 "pic.cpp" /* yacc.c:1646 */
3632 #line 1184 "pic.y" /* yacc.c:1646 */
3634 (yyval.pair).x = (yyvsp[-2].pair).x - (yyvsp[0].pair).x;
3635 (yyval.pair).y = (yyvsp[-2].pair).y - (yyvsp[0].pair).y;
3637 #line 3638 "pic.cpp" /* yacc.c:1646 */
3641 #line 1189 "pic.y" /* yacc.c:1646 */
3643 (yyval.pair).x = (yyvsp[-3].pair).x - (yyvsp[-1].pair).x;
3644 (yyval.pair).y = (yyvsp[-3].pair).y - (yyvsp[-1].pair).y;
3646 #line 3647 "pic.cpp" /* yacc.c:1646 */
3650 #line 1194 "pic.y" /* yacc.c:1646 */
3652 (yyval.pair).x = (yyvsp[-3].pair).x;
3653 (yyval.pair).y = (yyvsp[-1].pair).y;
3655 #line 3656 "pic.cpp" /* yacc.c:1646 */
3659 #line 1199 "pic.y" /* yacc.c:1646 */
3661 (yyval.pair).x = (1.0 - (yyvsp[-4].x))*(yyvsp[-2].pair).x + (yyvsp[-4].x)*(yyvsp[0].pair).x;
3662 (yyval.pair).y = (1.0 - (yyvsp[-4].x))*(yyvsp[-2].pair).y + (yyvsp[-4].x)*(yyvsp[0].pair).y;
3664 #line 3665 "pic.cpp" /* yacc.c:1646 */
3668 #line 1204 "pic.y" /* yacc.c:1646 */
3670 (yyval.pair).x = (1.0 - (yyvsp[-5].x))*(yyvsp[-3].pair).x + (yyvsp[-5].x)*(yyvsp[-1].pair).x;
3671 (yyval.pair).y = (1.0 - (yyvsp[-5].x))*(yyvsp[-3].pair).y + (yyvsp[-5].x)*(yyvsp[-1].pair).y;
3673 #line 3674 "pic.cpp" /* yacc.c:1646 */
3677 #line 1210 "pic.y" /* yacc.c:1646 */
3679 (yyval.pair).x = (1.0 - (yyvsp[-5].x))*(yyvsp[-3].pair).x + (yyvsp[-5].x)*(yyvsp[-1].pair).x;
3680 (yyval.pair).y = (1.0 - (yyvsp[-5].x))*(yyvsp[-3].pair).y + (yyvsp[-5].x)*(yyvsp[-1].pair).y;
3682 #line 3683 "pic.cpp" /* yacc.c:1646 */
3686 #line 1215 "pic.y" /* yacc.c:1646 */
3688 (yyval.pair).x = (1.0 - (yyvsp[-6].x))*(yyvsp[-4].pair).x + (yyvsp[-6].x)*(yyvsp[-2].pair).x;
3689 (yyval.pair).y = (1.0 - (yyvsp[-6].x))*(yyvsp[-4].pair).y + (yyvsp[-6].x)*(yyvsp[-2].pair).y;
3691 #line 3692 "pic.cpp" /* yacc.c:1646 */
3695 #line 1228 "pic.y" /* yacc.c:1646 */
3697 (yyval.pair).x = (yyvsp[-2].x);
3698 (yyval.pair).y = (yyvsp[0].x);
3700 #line 3701 "pic.cpp" /* yacc.c:1646 */
3704 #line 1233 "pic.y" /* yacc.c:1646 */
3705 { (yyval.pair) = (yyvsp[-1].pair); }
3706 #line 3707 "pic.cpp" /* yacc.c:1646 */
3710 #line 1239 "pic.y" /* yacc.c:1646 */
3711 { (yyval.pl) = (yyvsp[0].pl); }
3712 #line 3713 "pic.cpp" /* yacc.c:1646 */
3716 #line 1241 "pic.y" /* yacc.c:1646 */
3718 path pth((yyvsp[0].crn));
3719 if (!pth.follow((yyvsp[-1].pl), & (yyval.pl)))
3722 #line 3723 "pic.cpp" /* yacc.c:1646 */
3726 #line 1247 "pic.y" /* yacc.c:1646 */
3728 path pth((yyvsp[-1].crn));
3729 if (!pth.follow((yyvsp[0].pl), & (yyval.pl)))
3732 #line 3733 "pic.cpp" /* yacc.c:1646 */
3736 #line 1253 "pic.y" /* yacc.c:1646 */
3738 path pth((yyvsp[-2].crn));
3739 if (!pth.follow((yyvsp[0].pl), & (yyval.pl)))
3742 #line 3743 "pic.cpp" /* yacc.c:1646 */
3746 #line 1259 "pic.y" /* yacc.c:1646 */
3748 (yyval.pl).x = current_position.x;
3749 (yyval.pl).y = current_position.y;
3752 #line 3753 "pic.cpp" /* yacc.c:1646 */
3756 #line 1268 "pic.y" /* yacc.c:1646 */
3758 place *p = lookup_label((yyvsp[0].str));
3760 lex_error("there is no place `%1'", (yyvsp[0].str));
3764 a_delete (yyvsp[0].str);
3766 #line 3767 "pic.cpp" /* yacc.c:1646 */
3770 #line 1278 "pic.y" /* yacc.c:1646 */
3771 { (yyval.pl).obj = (yyvsp[0].obj); }
3772 #line 3773 "pic.cpp" /* yacc.c:1646 */
3776 #line 1280 "pic.y" /* yacc.c:1646 */
3778 path pth((yyvsp[0].str));
3779 if (!pth.follow((yyvsp[-2].pl), & (yyval.pl)))
3782 #line 3783 "pic.cpp" /* yacc.c:1646 */
3786 #line 1289 "pic.y" /* yacc.c:1646 */
3787 { (yyval.n) = (yyvsp[0].n); }
3788 #line 3789 "pic.cpp" /* yacc.c:1646 */
3792 #line 1291 "pic.y" /* yacc.c:1646 */
3794 // XXX Check for overflow (and non-integers?).
3795 (yyval.n) = (int)(yyvsp[-1].x);
3797 #line 3798 "pic.cpp" /* yacc.c:1646 */
3801 #line 1299 "pic.y" /* yacc.c:1646 */
3803 #line 3804 "pic.cpp" /* yacc.c:1646 */
3807 #line 1301 "pic.y" /* yacc.c:1646 */
3808 { (yyval.n) = (yyvsp[-1].n); }
3809 #line 3810 "pic.cpp" /* yacc.c:1646 */
3813 #line 1306 "pic.y" /* yacc.c:1646 */
3817 for (p = olist.head; p != 0; p = p->next)
3818 if (p->type() == (yyvsp[0].obtype) && ++count == (yyvsp[-1].n)) {
3823 lex_error("there is no %1%2 %3", (yyvsp[-1].n), ordinal_postfix((yyvsp[-1].n)),
3824 object_type_name((yyvsp[0].obtype)));
3828 #line 3829 "pic.cpp" /* yacc.c:1646 */
3832 #line 1321 "pic.y" /* yacc.c:1646 */
3836 for (p = olist.tail; p != 0; p = p->prev)
3837 if (p->type() == (yyvsp[0].obtype) && ++count == (yyvsp[-1].n)) {
3842 lex_error("there is no %1%2 last %3", (yyvsp[-1].n),
3843 ordinal_postfix((yyvsp[-1].n)), object_type_name((yyvsp[0].obtype)));
3847 #line 3848 "pic.cpp" /* yacc.c:1646 */
3851 #line 1339 "pic.y" /* yacc.c:1646 */
3852 { (yyval.obtype) = BOX_OBJECT; }
3853 #line 3854 "pic.cpp" /* yacc.c:1646 */
3857 #line 1341 "pic.y" /* yacc.c:1646 */
3858 { (yyval.obtype) = CIRCLE_OBJECT; }
3859 #line 3860 "pic.cpp" /* yacc.c:1646 */
3863 #line 1343 "pic.y" /* yacc.c:1646 */
3864 { (yyval.obtype) = ELLIPSE_OBJECT; }
3865 #line 3866 "pic.cpp" /* yacc.c:1646 */
3869 #line 1345 "pic.y" /* yacc.c:1646 */
3870 { (yyval.obtype) = ARC_OBJECT; }
3871 #line 3872 "pic.cpp" /* yacc.c:1646 */
3875 #line 1347 "pic.y" /* yacc.c:1646 */
3876 { (yyval.obtype) = LINE_OBJECT; }
3877 #line 3878 "pic.cpp" /* yacc.c:1646 */
3881 #line 1349 "pic.y" /* yacc.c:1646 */
3882 { (yyval.obtype) = ARROW_OBJECT; }
3883 #line 3884 "pic.cpp" /* yacc.c:1646 */
3887 #line 1351 "pic.y" /* yacc.c:1646 */
3888 { (yyval.obtype) = SPLINE_OBJECT; }
3889 #line 3890 "pic.cpp" /* yacc.c:1646 */
3893 #line 1353 "pic.y" /* yacc.c:1646 */
3894 { (yyval.obtype) = BLOCK_OBJECT; }
3895 #line 3896 "pic.cpp" /* yacc.c:1646 */
3899 #line 1355 "pic.y" /* yacc.c:1646 */
3900 { (yyval.obtype) = TEXT_OBJECT; }
3901 #line 3902 "pic.cpp" /* yacc.c:1646 */
3905 #line 1360 "pic.y" /* yacc.c:1646 */
3906 { (yyval.pth) = new path((yyvsp[0].str)); }
3907 #line 3908 "pic.cpp" /* yacc.c:1646 */
3911 #line 1362 "pic.y" /* yacc.c:1646 */
3913 (yyval.pth) = (yyvsp[-2].pth);
3914 (yyval.pth)->append((yyvsp[0].str));
3916 #line 3917 "pic.cpp" /* yacc.c:1646 */
3920 #line 1370 "pic.y" /* yacc.c:1646 */
3921 { (yyval.pth) = new path((yyvsp[0].crn)); }
3922 #line 3923 "pic.cpp" /* yacc.c:1646 */
3926 #line 1374 "pic.y" /* yacc.c:1646 */
3927 { (yyval.pth) = (yyvsp[0].pth); }
3928 #line 3929 "pic.cpp" /* yacc.c:1646 */
3932 #line 1376 "pic.y" /* yacc.c:1646 */
3934 (yyval.pth) = (yyvsp[-1].pth);
3935 (yyval.pth)->append((yyvsp[0].crn));
3937 #line 3938 "pic.cpp" /* yacc.c:1646 */
3941 #line 1384 "pic.y" /* yacc.c:1646 */
3942 { (yyval.pth) = (yyvsp[0].pth); }
3943 #line 3944 "pic.cpp" /* yacc.c:1646 */
3947 #line 1386 "pic.y" /* yacc.c:1646 */
3949 (yyval.pth) = (yyvsp[-3].pth);
3950 (yyval.pth)->set_ypath((yyvsp[-1].pth));
3952 #line 3953 "pic.cpp" /* yacc.c:1646 */
3956 #line 1392 "pic.y" /* yacc.c:1646 */
3958 lex_warning("`%1%2 last %3' in `with' argument ignored",
3959 (yyvsp[-3].n), ordinal_postfix((yyvsp[-3].n)), object_type_name((yyvsp[-1].obtype)));
3960 (yyval.pth) = (yyvsp[0].pth);
3962 #line 3963 "pic.cpp" /* yacc.c:1646 */
3966 #line 1398 "pic.y" /* yacc.c:1646 */
3968 lex_warning("`last %1' in `with' argument ignored",
3969 object_type_name((yyvsp[-1].obtype)));
3970 (yyval.pth) = (yyvsp[0].pth);
3972 #line 3973 "pic.cpp" /* yacc.c:1646 */
3976 #line 1404 "pic.y" /* yacc.c:1646 */
3978 lex_warning("`%1%2 %3' in `with' argument ignored",
3979 (yyvsp[-2].n), ordinal_postfix((yyvsp[-2].n)), object_type_name((yyvsp[-1].obtype)));
3980 (yyval.pth) = (yyvsp[0].pth);
3982 #line 3983 "pic.cpp" /* yacc.c:1646 */
3986 #line 1410 "pic.y" /* yacc.c:1646 */
3988 lex_warning("initial `%1' in `with' argument ignored", (yyvsp[-1].str));
3989 a_delete (yyvsp[-1].str);
3990 (yyval.pth) = (yyvsp[0].pth);
3992 #line 3993 "pic.cpp" /* yacc.c:1646 */
3996 #line 1419 "pic.y" /* yacc.c:1646 */
3997 { (yyval.crn) = &object::north; }
3998 #line 3999 "pic.cpp" /* yacc.c:1646 */
4002 #line 1421 "pic.y" /* yacc.c:1646 */
4003 { (yyval.crn) = &object::east; }
4004 #line 4005 "pic.cpp" /* yacc.c:1646 */
4008 #line 1423 "pic.y" /* yacc.c:1646 */
4009 { (yyval.crn) = &object::west; }
4010 #line 4011 "pic.cpp" /* yacc.c:1646 */
4014 #line 1425 "pic.y" /* yacc.c:1646 */
4015 { (yyval.crn) = &object::south; }
4016 #line 4017 "pic.cpp" /* yacc.c:1646 */
4020 #line 1427 "pic.y" /* yacc.c:1646 */
4021 { (yyval.crn) = &object::north_east; }
4022 #line 4023 "pic.cpp" /* yacc.c:1646 */
4026 #line 1429 "pic.y" /* yacc.c:1646 */
4027 { (yyval.crn) = &object:: south_east; }
4028 #line 4029 "pic.cpp" /* yacc.c:1646 */
4032 #line 1431 "pic.y" /* yacc.c:1646 */
4033 { (yyval.crn) = &object::north_west; }
4034 #line 4035 "pic.cpp" /* yacc.c:1646 */
4038 #line 1433 "pic.y" /* yacc.c:1646 */
4039 { (yyval.crn) = &object::south_west; }
4040 #line 4041 "pic.cpp" /* yacc.c:1646 */
4044 #line 1435 "pic.y" /* yacc.c:1646 */
4045 { (yyval.crn) = &object::center; }
4046 #line 4047 "pic.cpp" /* yacc.c:1646 */
4050 #line 1437 "pic.y" /* yacc.c:1646 */
4051 { (yyval.crn) = &object::start; }
4052 #line 4053 "pic.cpp" /* yacc.c:1646 */
4056 #line 1439 "pic.y" /* yacc.c:1646 */
4057 { (yyval.crn) = &object::end; }
4058 #line 4059 "pic.cpp" /* yacc.c:1646 */
4062 #line 1441 "pic.y" /* yacc.c:1646 */
4063 { (yyval.crn) = &object::north; }
4064 #line 4065 "pic.cpp" /* yacc.c:1646 */
4068 #line 1443 "pic.y" /* yacc.c:1646 */
4069 { (yyval.crn) = &object::south; }
4070 #line 4071 "pic.cpp" /* yacc.c:1646 */
4074 #line 1445 "pic.y" /* yacc.c:1646 */
4075 { (yyval.crn) = &object::west; }
4076 #line 4077 "pic.cpp" /* yacc.c:1646 */
4080 #line 1447 "pic.y" /* yacc.c:1646 */
4081 { (yyval.crn) = &object::east; }
4082 #line 4083 "pic.cpp" /* yacc.c:1646 */
4086 #line 1449 "pic.y" /* yacc.c:1646 */
4087 { (yyval.crn) = &object::north_west; }
4088 #line 4089 "pic.cpp" /* yacc.c:1646 */
4092 #line 1451 "pic.y" /* yacc.c:1646 */
4093 { (yyval.crn) = &object::south_west; }
4094 #line 4095 "pic.cpp" /* yacc.c:1646 */
4098 #line 1453 "pic.y" /* yacc.c:1646 */
4099 { (yyval.crn) = &object::north_east; }
4100 #line 4101 "pic.cpp" /* yacc.c:1646 */
4104 #line 1455 "pic.y" /* yacc.c:1646 */
4105 { (yyval.crn) = &object::south_east; }
4106 #line 4107 "pic.cpp" /* yacc.c:1646 */
4110 #line 1457 "pic.y" /* yacc.c:1646 */
4111 { (yyval.crn) = &object::west; }
4112 #line 4113 "pic.cpp" /* yacc.c:1646 */
4116 #line 1459 "pic.y" /* yacc.c:1646 */
4117 { (yyval.crn) = &object::east; }
4118 #line 4119 "pic.cpp" /* yacc.c:1646 */
4122 #line 1461 "pic.y" /* yacc.c:1646 */
4123 { (yyval.crn) = &object::north_west; }
4124 #line 4125 "pic.cpp" /* yacc.c:1646 */
4128 #line 1463 "pic.y" /* yacc.c:1646 */
4129 { (yyval.crn) = &object::south_west; }
4130 #line 4131 "pic.cpp" /* yacc.c:1646 */
4134 #line 1465 "pic.y" /* yacc.c:1646 */
4135 { (yyval.crn) = &object::north_east; }
4136 #line 4137 "pic.cpp" /* yacc.c:1646 */
4140 #line 1467 "pic.y" /* yacc.c:1646 */
4141 { (yyval.crn) = &object::south_east; }
4142 #line 4143 "pic.cpp" /* yacc.c:1646 */
4146 #line 1469 "pic.y" /* yacc.c:1646 */
4147 { (yyval.crn) = &object::north; }
4148 #line 4149 "pic.cpp" /* yacc.c:1646 */
4152 #line 1471 "pic.y" /* yacc.c:1646 */
4153 { (yyval.crn) = &object::south; }
4154 #line 4155 "pic.cpp" /* yacc.c:1646 */
4158 #line 1473 "pic.y" /* yacc.c:1646 */
4159 { (yyval.crn) = &object::east; }
4160 #line 4161 "pic.cpp" /* yacc.c:1646 */
4164 #line 1475 "pic.y" /* yacc.c:1646 */
4165 { (yyval.crn) = &object::west; }
4166 #line 4167 "pic.cpp" /* yacc.c:1646 */
4170 #line 1477 "pic.y" /* yacc.c:1646 */
4171 { (yyval.crn) = &object::center; }
4172 #line 4173 "pic.cpp" /* yacc.c:1646 */
4176 #line 1479 "pic.y" /* yacc.c:1646 */
4177 { (yyval.crn) = &object::start; }
4178 #line 4179 "pic.cpp" /* yacc.c:1646 */
4182 #line 1481 "pic.y" /* yacc.c:1646 */
4183 { (yyval.crn) = &object::end; }
4184 #line 4185 "pic.cpp" /* yacc.c:1646 */
4188 #line 1486 "pic.y" /* yacc.c:1646 */
4189 { (yyval.x) = (yyvsp[0].x); }
4190 #line 4191 "pic.cpp" /* yacc.c:1646 */
4194 #line 1488 "pic.y" /* yacc.c:1646 */
4195 { (yyval.x) = (yyvsp[0].x); }
4196 #line 4197 "pic.cpp" /* yacc.c:1646 */
4200 #line 1493 "pic.y" /* yacc.c:1646 */
4201 { (yyval.x) = ((yyvsp[-2].x) < (yyvsp[0].x)); }
4202 #line 4203 "pic.cpp" /* yacc.c:1646 */
4206 #line 1498 "pic.y" /* yacc.c:1646 */
4208 if (!lookup_variable((yyvsp[0].str), & (yyval.x))) {
4209 lex_error("there is no variable `%1'", (yyvsp[0].str));
4212 a_delete (yyvsp[0].str);
4214 #line 4215 "pic.cpp" /* yacc.c:1646 */
4218 #line 1506 "pic.y" /* yacc.c:1646 */
4219 { (yyval.x) = (yyvsp[0].x); }
4220 #line 4221 "pic.cpp" /* yacc.c:1646 */
4224 #line 1508 "pic.y" /* yacc.c:1646 */
4226 if ((yyvsp[-1].pl).obj != 0)
4227 (yyval.x) = (yyvsp[-1].pl).obj->origin().x;
4229 (yyval.x) = (yyvsp[-1].pl).x;
4231 #line 4232 "pic.cpp" /* yacc.c:1646 */
4235 #line 1515 "pic.y" /* yacc.c:1646 */
4237 if ((yyvsp[-1].pl).obj != 0)
4238 (yyval.x) = (yyvsp[-1].pl).obj->origin().y;
4240 (yyval.x) = (yyvsp[-1].pl).y;
4242 #line 4243 "pic.cpp" /* yacc.c:1646 */
4246 #line 1522 "pic.y" /* yacc.c:1646 */
4248 if ((yyvsp[-1].pl).obj != 0)
4249 (yyval.x) = (yyvsp[-1].pl).obj->height();
4253 #line 4254 "pic.cpp" /* yacc.c:1646 */
4257 #line 1529 "pic.y" /* yacc.c:1646 */
4259 if ((yyvsp[-1].pl).obj != 0)
4260 (yyval.x) = (yyvsp[-1].pl).obj->width();
4264 #line 4265 "pic.cpp" /* yacc.c:1646 */
4268 #line 1536 "pic.y" /* yacc.c:1646 */
4270 if ((yyvsp[-1].pl).obj != 0)
4271 (yyval.x) = (yyvsp[-1].pl).obj->radius();
4275 #line 4276 "pic.cpp" /* yacc.c:1646 */
4279 #line 1543 "pic.y" /* yacc.c:1646 */
4280 { (yyval.x) = (yyvsp[-2].x) + (yyvsp[0].x); }
4281 #line 4282 "pic.cpp" /* yacc.c:1646 */
4285 #line 1545 "pic.y" /* yacc.c:1646 */
4286 { (yyval.x) = (yyvsp[-2].x) - (yyvsp[0].x); }
4287 #line 4288 "pic.cpp" /* yacc.c:1646 */
4291 #line 1547 "pic.y" /* yacc.c:1646 */
4292 { (yyval.x) = (yyvsp[-2].x) * (yyvsp[0].x); }
4293 #line 4294 "pic.cpp" /* yacc.c:1646 */
4297 #line 1549 "pic.y" /* yacc.c:1646 */
4299 if ((yyvsp[0].x) == 0.0) {
4300 lex_error("division by zero");
4303 (yyval.x) = (yyvsp[-2].x)/(yyvsp[0].x);
4305 #line 4306 "pic.cpp" /* yacc.c:1646 */
4309 #line 1557 "pic.y" /* yacc.c:1646 */
4311 if ((yyvsp[0].x) == 0.0) {
4312 lex_error("modulus by zero");
4315 (yyval.x) = fmod((yyvsp[-2].x), (yyvsp[0].x));
4317 #line 4318 "pic.cpp" /* yacc.c:1646 */
4321 #line 1565 "pic.y" /* yacc.c:1646 */
4324 (yyval.x) = pow((yyvsp[-2].x), (yyvsp[0].x));
4325 if (errno == EDOM) {
4326 lex_error("arguments to `^' operator out of domain");
4329 if (errno == ERANGE) {
4330 lex_error("result of `^' operator out of range");
4334 #line 4335 "pic.cpp" /* yacc.c:1646 */
4338 #line 1578 "pic.y" /* yacc.c:1646 */
4339 { (yyval.x) = -(yyvsp[0].x); }
4340 #line 4341 "pic.cpp" /* yacc.c:1646 */
4344 #line 1580 "pic.y" /* yacc.c:1646 */
4345 { (yyval.x) = (yyvsp[-1].x); }
4346 #line 4347 "pic.cpp" /* yacc.c:1646 */
4350 #line 1582 "pic.y" /* yacc.c:1646 */
4353 (yyval.x) = sin((yyvsp[-1].x));
4354 if (errno == ERANGE) {
4355 lex_error("sin result out of range");
4359 #line 4360 "pic.cpp" /* yacc.c:1646 */
4363 #line 1591 "pic.y" /* yacc.c:1646 */
4366 (yyval.x) = cos((yyvsp[-1].x));
4367 if (errno == ERANGE) {
4368 lex_error("cos result out of range");
4372 #line 4373 "pic.cpp" /* yacc.c:1646 */
4376 #line 1600 "pic.y" /* yacc.c:1646 */
4379 (yyval.x) = atan2((yyvsp[-3].x), (yyvsp[-1].x));
4380 if (errno == EDOM) {
4381 lex_error("atan2 argument out of domain");
4384 if (errno == ERANGE) {
4385 lex_error("atan2 result out of range");
4389 #line 4390 "pic.cpp" /* yacc.c:1646 */
4393 #line 1613 "pic.y" /* yacc.c:1646 */
4396 (yyval.x) = log10((yyvsp[-1].x));
4397 if (errno == ERANGE) {
4398 lex_error("log result out of range");
4402 #line 4403 "pic.cpp" /* yacc.c:1646 */
4406 #line 1622 "pic.y" /* yacc.c:1646 */
4409 (yyval.x) = pow(10.0, (yyvsp[-1].x));
4410 if (errno == ERANGE) {
4411 lex_error("exp result out of range");
4415 #line 4416 "pic.cpp" /* yacc.c:1646 */
4419 #line 1631 "pic.y" /* yacc.c:1646 */
4422 (yyval.x) = sqrt((yyvsp[-1].x));
4423 if (errno == EDOM) {
4424 lex_error("sqrt argument out of domain");
4428 #line 4429 "pic.cpp" /* yacc.c:1646 */
4432 #line 1640 "pic.y" /* yacc.c:1646 */
4433 { (yyval.x) = (yyvsp[-3].x) > (yyvsp[-1].x) ? (yyvsp[-3].x) : (yyvsp[-1].x); }
4434 #line 4435 "pic.cpp" /* yacc.c:1646 */
4438 #line 1642 "pic.y" /* yacc.c:1646 */
4439 { (yyval.x) = (yyvsp[-3].x) < (yyvsp[-1].x) ? (yyvsp[-3].x) : (yyvsp[-1].x); }
4440 #line 4441 "pic.cpp" /* yacc.c:1646 */
4444 #line 1644 "pic.y" /* yacc.c:1646 */
4445 { (yyval.x) = (yyvsp[-1].x) < 0 ? -floor(-(yyvsp[-1].x)) : floor((yyvsp[-1].x)); }
4446 #line 4447 "pic.cpp" /* yacc.c:1646 */
4450 #line 1646 "pic.y" /* yacc.c:1646 */
4451 { (yyval.x) = 1.0 + floor(((rand()&0x7fff)/double(0x7fff))*(yyvsp[-1].x)); }
4452 #line 4453 "pic.cpp" /* yacc.c:1646 */
4456 #line 1648 "pic.y" /* yacc.c:1646 */
4458 /* return a random number in the range [0,1) */
4459 /* portable, but not very random */
4460 (yyval.x) = (rand() & 0x7fff) / double(0x8000);
4462 #line 4463 "pic.cpp" /* yacc.c:1646 */
4466 #line 1654 "pic.y" /* yacc.c:1646 */
4469 srand((unsigned int)(yyvsp[-1].x));
4471 #line 4472 "pic.cpp" /* yacc.c:1646 */
4475 #line 1659 "pic.y" /* yacc.c:1646 */
4476 { (yyval.x) = ((yyvsp[-2].x) <= (yyvsp[0].x)); }
4477 #line 4478 "pic.cpp" /* yacc.c:1646 */
4481 #line 1661 "pic.y" /* yacc.c:1646 */
4482 { (yyval.x) = ((yyvsp[-2].x) > (yyvsp[0].x)); }
4483 #line 4484 "pic.cpp" /* yacc.c:1646 */
4487 #line 1663 "pic.y" /* yacc.c:1646 */
4488 { (yyval.x) = ((yyvsp[-2].x) >= (yyvsp[0].x)); }
4489 #line 4490 "pic.cpp" /* yacc.c:1646 */
4493 #line 1665 "pic.y" /* yacc.c:1646 */
4494 { (yyval.x) = ((yyvsp[-2].x) == (yyvsp[0].x)); }
4495 #line 4496 "pic.cpp" /* yacc.c:1646 */
4499 #line 1667 "pic.y" /* yacc.c:1646 */
4500 { (yyval.x) = ((yyvsp[-2].x) != (yyvsp[0].x)); }
4501 #line 4502 "pic.cpp" /* yacc.c:1646 */
4505 #line 1669 "pic.y" /* yacc.c:1646 */
4506 { (yyval.x) = ((yyvsp[-2].x) != 0.0 && (yyvsp[0].x) != 0.0); }
4507 #line 4508 "pic.cpp" /* yacc.c:1646 */
4511 #line 1671 "pic.y" /* yacc.c:1646 */
4512 { (yyval.x) = ((yyvsp[-2].x) != 0.0 || (yyvsp[0].x) != 0.0); }
4513 #line 4514 "pic.cpp" /* yacc.c:1646 */
4517 #line 1673 "pic.y" /* yacc.c:1646 */
4518 { (yyval.x) = ((yyvsp[0].x) == 0.0); }
4519 #line 4520 "pic.cpp" /* yacc.c:1646 */
4523 #line 4524 "pic.cpp" /* yacc.c:1646 */
4526 /* User semantic actions sometimes alter yychar, and that requires
4527 that yytoken be updated with the new translation. We take the
4528 approach of translating immediately before every use of yytoken.
4529 One alternative is translating here after every semantic action,
4530 but that translation would be missed if the semantic action invokes
4531 YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
4532 if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
4533 incorrect destructor might then be invoked immediately. In the
4534 case of YYERROR or YYBACKUP, subsequent parser actions might lead
4535 to an incorrect destructor call or verbose syntax error message
4536 before the lookahead is translated. */
4537 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
4541 YY_STACK_PRINT (yyss, yyssp);
4545 /* Now 'shift' the result of the reduction. Determine what state
4546 that goes to, based on the state we popped back to and the rule
4547 number reduced by. */
4551 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
4552 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
4553 yystate = yytable[yystate];
4555 yystate = yydefgoto[yyn - YYNTOKENS];
4560 /*--------------------------------------.
4561 | yyerrlab -- here on detecting error. |
4562 `--------------------------------------*/
4564 /* Make sure we have latest lookahead translation. See comments at
4565 user semantic actions for why this is necessary. */
4566 yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
4568 /* If not already recovering from an error, report this error. */
4572 #if ! YYERROR_VERBOSE
4573 yyerror (YY_("syntax error"));
4575 # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
4578 char const *yymsgp = YY_("syntax error");
4579 int yysyntax_error_status;
4580 yysyntax_error_status = YYSYNTAX_ERROR;
4581 if (yysyntax_error_status == 0)
4583 else if (yysyntax_error_status == 1)
4585 if (yymsg != yymsgbuf)
4586 YYSTACK_FREE (yymsg);
4587 yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
4591 yymsg_alloc = sizeof yymsgbuf;
4592 yysyntax_error_status = 2;
4596 yysyntax_error_status = YYSYNTAX_ERROR;
4601 if (yysyntax_error_status == 2)
4602 goto yyexhaustedlab;
4604 # undef YYSYNTAX_ERROR
4610 if (yyerrstatus == 3)
4612 /* If just tried and failed to reuse lookahead token after an
4613 error, discard it. */
4615 if (yychar <= YYEOF)
4617 /* Return failure if at end of input. */
4618 if (yychar == YYEOF)
4623 yydestruct ("Error: discarding",
4629 /* Else will try to reuse lookahead token after shifting the error
4634 /*---------------------------------------------------.
4635 | yyerrorlab -- error raised explicitly by YYERROR. |
4636 `---------------------------------------------------*/
4639 /* Pacify compilers like GCC when the user code never invokes
4640 YYERROR and the label yyerrorlab therefore never appears in user
4642 if (/*CONSTCOND*/ 0)
4645 /* Do not reclaim the symbols of the rule whose action triggered
4649 YY_STACK_PRINT (yyss, yyssp);
4654 /*-------------------------------------------------------------.
4655 | yyerrlab1 -- common code for both syntax error and YYERROR. |
4656 `-------------------------------------------------------------*/
4658 yyerrstatus = 3; /* Each real token shifted decrements this. */
4662 yyn = yypact[yystate];
4663 if (!yypact_value_is_default (yyn))
4666 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
4674 /* Pop the current state because it cannot handle the error token. */
4679 yydestruct ("Error: popping",
4680 yystos[yystate], yyvsp);
4683 YY_STACK_PRINT (yyss, yyssp);
4686 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
4688 YY_IGNORE_MAYBE_UNINITIALIZED_END
4691 /* Shift the error token. */
4692 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
4698 /*-------------------------------------.
4699 | yyacceptlab -- YYACCEPT comes here. |
4700 `-------------------------------------*/
4705 /*-----------------------------------.
4706 | yyabortlab -- YYABORT comes here. |
4707 `-----------------------------------*/
4712 #if !defined yyoverflow || YYERROR_VERBOSE
4713 /*-------------------------------------------------.
4714 | yyexhaustedlab -- memory exhaustion comes here. |
4715 `-------------------------------------------------*/
4717 yyerror (YY_("memory exhausted"));
4723 if (yychar != YYEMPTY)
4725 /* Make sure we have latest lookahead translation. See comments at
4726 user semantic actions for why this is necessary. */
4727 yytoken = YYTRANSLATE (yychar);
4728 yydestruct ("Cleanup: discarding lookahead",
4731 /* Do not reclaim the symbols of the rule whose action triggered
4732 this YYABORT or YYACCEPT. */
4734 YY_STACK_PRINT (yyss, yyssp);
4735 while (yyssp != yyss)
4737 yydestruct ("Cleanup: popping",
4738 yystos[*yyssp], yyvsp);
4743 YYSTACK_FREE (yyss);
4746 if (yymsg != yymsgbuf)
4747 YYSTACK_FREE (yymsg);
4751 #line 1677 "pic.y" /* yacc.c:1906 */
4754 /* bison defines const to be empty unless __STDC__ is defined, which it
4755 isn't under cfront */
4764 int scaled; // non-zero if val should be multiplied by scale
4765 } defaults_table[] = {
4766 { "arcrad", .25, 1 },
4767 { "arrowht", .1, 1 },
4768 { "arrowwid", .05, 1 },
4769 { "circlerad", .25, 1 },
4771 { "boxwid", .75, 1 },
4772 { "boxrad", 0.0, 1 },
4773 { "dashwid", .05, 1 },
4774 { "ellipseht", .5, 1 },
4775 { "ellipsewid", .75, 1 },
4776 { "moveht", .5, 1 },
4777 { "movewid", .5, 1 },
4778 { "lineht", .5, 1 },
4779 { "linewid", .5, 1 },
4780 { "textht", 0.0, 1 },
4781 { "textwid", 0.0, 1 },
4782 { "scale", 1.0, 0 },
4783 { "linethick", -1.0, 0 }, // in points
4784 { "fillval", .5, 0 },
4785 { "arrowhead", 1.0, 0 },
4786 { "maxpswid", 8.5, 0 },
4787 { "maxpsht", 11.0, 0 },
4790 place *lookup_label(const char *label)
4792 saved_state *state = current_saved_state;
4793 PTABLE(place) *tbl = current_table;
4795 place *pl = tbl->lookup(label);
4801 state = state->prev;
4805 void define_label(const char *label, const place *pl)
4807 place *p = new place[1];
4809 current_table->define(label, p);
4812 int lookup_variable(const char *name, double *val)
4814 place *pl = lookup_label(name);
4822 void define_variable(const char *name, double val)
4824 place *p = new place[1];
4828 current_table->define(name, p);
4829 if (strcmp(name, "scale") == 0) {
4830 // When the scale changes, reset all scaled pre-defined variables to
4831 // their default values.
4832 for (unsigned int i = 0;
4833 i < sizeof(defaults_table)/sizeof(defaults_table[0]); i++)
4834 if (defaults_table[i].scaled)
4835 define_variable(defaults_table[i].name, val*defaults_table[i].val);
4839 // called once only (not once per parse)
4843 current_direction = RIGHT_DIRECTION;
4844 current_position.x = 0.0;
4845 current_position.y = 0.0;
4846 // This resets everything to its default value.
4850 void reset(const char *nm)
4852 for (unsigned int i = 0;
4853 i < sizeof(defaults_table)/sizeof(defaults_table[0]); i++)
4854 if (strcmp(nm, defaults_table[i].name) == 0) {
4855 double val = defaults_table[i].val;
4856 if (defaults_table[i].scaled) {
4858 lookup_variable("scale", &scale);
4861 define_variable(defaults_table[i].name, val);
4864 lex_error("`%1' is not a predefined variable", nm);
4869 // We only have to explicitly reset the pre-defined variables that
4870 // aren't scaled because `scale' is not scaled, and changing the
4871 // value of `scale' will reset all the pre-defined variables that
4873 for (unsigned int i = 0;
4874 i < sizeof(defaults_table)/sizeof(defaults_table[0]); i++)
4875 if (!defaults_table[i].scaled)
4876 define_variable(defaults_table[i].name, defaults_table[i].val);
4879 // called after each parse
4881 void parse_cleanup()
4883 while (current_saved_state != 0) {
4884 delete current_table;
4885 current_table = current_saved_state->tbl;
4886 saved_state *tem = current_saved_state;
4887 current_saved_state = current_saved_state->prev;
4890 assert(current_table == &top_table);
4891 PTABLE_ITERATOR(place) iter(current_table);
4894 while (iter.next(&key, &pl))
4896 position pos = pl->obj->origin();
4901 while (olist.head != 0) {
4902 object *tem = olist.head;
4903 olist.head = olist.head->next;
4907 current_direction = RIGHT_DIRECTION;
4908 current_position.x = 0.0;
4909 current_position.y = 0.0;
4912 const char *ordinal_postfix(int n)
4914 if (n < 10 || n > 20)
4926 const char *object_type_name(object_type type)
4933 case ELLIPSE_OBJECT:
4957 static char sprintf_buf[1024];
4959 char *format_number(const char *form, double n)
4963 return do_sprintf(form, &n, 1);
4966 char *do_sprintf(const char *form, const double *v, int nv)
4973 one_format += *form++;
4974 for (; *form != '\0' && strchr("#-+ 0123456789.", *form) != 0; form++)
4975 one_format += *form;
4976 if (*form == '\0' || strchr("eEfgG%", *form) == 0) {
4977 lex_error("bad sprintf format");
4978 result += one_format;
4983 one_format += *form++;
4985 snprintf(sprintf_buf, sizeof(sprintf_buf),
4986 "%s", one_format.contents());
4990 lex_error("too few arguments to snprintf");
4991 result += one_format;
4995 one_format += *form++;
4997 snprintf(sprintf_buf, sizeof(sprintf_buf),
4998 one_format.contents(), v[i++]);
5001 result += sprintf_buf;
5007 return strsave(result.contents());