Changes In Branch this-keyword Excluding Merge-Ins
This is equivalent to a diff from 94bfff470d to b7966b5bfb
2021-02-14
| ||
02:15 | Add the special "this" objectname that refers to the object under construction. No documentation (yet). (check-in: 4a13f3a46e user: drh tags: trunk) | |
02:14 | Add a test case for the "this" objectname. (Closed-Leaf check-in: b7966b5bfb user: drh tags: this-keyword) | |
00:32 | Accept the object name "this" referring to the object under construction. See forum post 48cec7c89e for an explanation of why this might be useful. I'm still somewhat dubious, since not all attributes of "this" are necessarily defined at the point when it is invoked. Need to thing about this. (check-in: 3542e32d0b user: drh tags: this-keyword) | |
00:11 | Use darkmode rather than ardoise as the example dark-mode skin. (check-in: 94bfff470d user: drh tags: trunk) | |
2021-02-12
| ||
04:31 | Added -lm to linking instructions, per forum suggestion. (check-in: be1c126190 user: stephan tags: trunk) | |
Changes to pikchr.c.
︙ | ︙ | |||
564 565 566 567 568 569 570 | #define T_NTH 81 #define T_VERTEX 82 #define T_TOP 83 #define T_BOTTOM 84 #define T_START 85 #define T_END 86 #define T_IN 87 | > | | | | | | | | | | | 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 | #define T_NTH 81 #define T_VERTEX 82 #define T_TOP 83 #define T_BOTTOM 84 #define T_START 85 #define T_END 86 #define T_IN 87 #define T_THIS 88 #define T_DOT_U 89 #define T_LAST 90 #define T_NUMBER 91 #define T_FUNC1 92 #define T_FUNC2 93 #define T_DIST 94 #define T_DOT_XY 95 #define T_X 96 #define T_Y 97 #define T_DOT_L 98 #endif /**************** End token definitions ***************************************/ /* The next sections is a series of control #defines. ** various aspects of the generated parser. ** YYCODETYPE is the data type used to store the integer codes ** that represent terminal and non-terminal symbols. |
︙ | ︙ | |||
633 634 635 636 637 638 639 | ** YY_MAX_REDUCE Maximum value for reduce actions */ #ifndef INTERFACE # define INTERFACE 1 #endif /************* Begin control #defines *****************************************/ #define YYCODETYPE unsigned char | | > | | > | | < < | | | | | | | | | | | 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 | ** YY_MAX_REDUCE Maximum value for reduce actions */ #ifndef INTERFACE # define INTERFACE 1 #endif /************* Begin control #defines *****************************************/ #define YYCODETYPE unsigned char #define YYNOCODE 135 #define YYACTIONTYPE unsigned short int #define pik_parserTOKENTYPE PToken typedef union { int yyinit; pik_parserTOKENTYPE yy0; PRel yy10; PObj* yy36; PPoint yy79; PNum yy153; short int yy164; PList* yy227; } YYMINORTYPE; #ifndef YYSTACKDEPTH #define YYSTACKDEPTH 100 #endif #define pik_parserARG_SDECL #define pik_parserARG_PDECL #define pik_parserARG_PARAM #define pik_parserARG_FETCH #define pik_parserARG_STORE #define pik_parserCTX_SDECL Pik *p; #define pik_parserCTX_PDECL ,Pik *p #define pik_parserCTX_PARAM ,p #define pik_parserCTX_FETCH Pik *p=yypParser->p; #define pik_parserCTX_STORE yypParser->p=p; #define YYFALLBACK 1 #define YYNSTATE 164 #define YYNRULE 156 #define YYNRULE_WITH_ACTION 116 #define YYNTOKEN 99 #define YY_MAX_SHIFT 163 #define YY_MIN_SHIFTREDUCE 287 #define YY_MAX_SHIFTREDUCE 442 #define YY_ERROR_ACTION 443 #define YY_ACCEPT_ACTION 444 #define YY_NO_ACTION 445 #define YY_MIN_REDUCE 446 #define YY_MAX_REDUCE 601 /************* End control #defines *******************************************/ #define YY_NLOOKAHEAD ((int)(sizeof(yy_lookahead)/sizeof(yy_lookahead[0]))) /* Define the yytestcase() macro to be a no-op if is not already defined ** otherwise. ** ** Applications can choose to define yytestcase() in the %include section |
︙ | ︙ | |||
738 739 740 741 742 743 744 | ** yy_shift_ofst[] For each state, the offset into yy_action for ** shifting terminals. ** yy_reduce_ofst[] For each state, the offset into yy_action for ** shifting non-terminals after a reduce. ** yy_default[] Default action for each state. ** *********** Begin parsing tables **********************************************/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | > | > | | < < | | | | | | > > | > | | | | | | | | > > | | > | | > > | | | > | | > | | | | | | < < | | < < > | | | | < < | > | | | | | | | | < | < | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | > > | | | | | | < < | | | | | | | | | | | | | | | | | | | | | | | > | | > | > < < < | | | | | | | | | | | | | | | | | | | | | | | | | | | | > > > > | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 | ** yy_shift_ofst[] For each state, the offset into yy_action for ** shifting terminals. ** yy_reduce_ofst[] For each state, the offset into yy_action for ** shifting non-terminals after a reduce. ** yy_default[] Default action for each state. ** *********** Begin parsing tables **********************************************/ #define YY_ACTTAB_COUNT (1303) static const YYACTIONTYPE yy_action[] = { /* 0 */ 575, 495, 161, 119, 25, 452, 29, 74, 129, 148, /* 10 */ 575, 492, 161, 119, 453, 113, 120, 161, 119, 530, /* 20 */ 427, 428, 339, 559, 81, 30, 560, 561, 575, 64, /* 30 */ 63, 62, 61, 322, 323, 9, 8, 33, 149, 32, /* 40 */ 7, 71, 127, 38, 335, 66, 48, 37, 28, 339, /* 50 */ 339, 339, 339, 425, 426, 340, 341, 342, 343, 344, /* 60 */ 345, 346, 347, 348, 474, 528, 161, 119, 577, 77, /* 70 */ 577, 73, 376, 148, 474, 533, 161, 119, 112, 113, /* 80 */ 120, 161, 119, 128, 427, 428, 339, 357, 81, 531, /* 90 */ 161, 119, 474, 36, 330, 13, 306, 322, 323, 9, /* 100 */ 8, 33, 149, 32, 7, 71, 127, 328, 335, 66, /* 110 */ 579, 310, 31, 339, 339, 339, 339, 425, 426, 340, /* 120 */ 341, 342, 343, 344, 345, 346, 347, 348, 394, 435, /* 130 */ 46, 59, 60, 64, 63, 62, 61, 54, 51, 376, /* 140 */ 69, 108, 2, 47, 403, 83, 297, 435, 375, 84, /* 150 */ 117, 80, 35, 308, 79, 133, 122, 126, 441, 440, /* 160 */ 299, 123, 3, 404, 405, 406, 408, 80, 298, 308, /* 170 */ 79, 4, 411, 412, 413, 414, 441, 440, 350, 350, /* 180 */ 350, 350, 350, 350, 350, 350, 350, 350, 62, 61, /* 190 */ 67, 434, 1, 75, 378, 158, 74, 76, 148, 411, /* 200 */ 412, 413, 414, 124, 113, 120, 161, 119, 106, 434, /* 210 */ 436, 437, 438, 439, 5, 375, 6, 117, 393, 155, /* 220 */ 154, 153, 394, 435, 69, 59, 60, 149, 436, 437, /* 230 */ 438, 439, 535, 376, 398, 399, 2, 424, 427, 428, /* 240 */ 339, 156, 156, 156, 423, 394, 435, 65, 59, 60, /* 250 */ 162, 131, 441, 440, 397, 72, 376, 148, 118, 2, /* 260 */ 380, 157, 125, 113, 120, 161, 119, 339, 339, 339, /* 270 */ 339, 425, 426, 535, 11, 441, 440, 394, 356, 535, /* 280 */ 59, 60, 535, 379, 159, 434, 149, 12, 102, 446, /* 290 */ 432, 42, 138, 14, 435, 139, 301, 302, 303, 36, /* 300 */ 305, 430, 106, 16, 436, 437, 438, 439, 434, 375, /* 310 */ 18, 117, 393, 155, 154, 153, 44, 142, 140, 64, /* 320 */ 63, 62, 61, 441, 440, 106, 19, 436, 437, 438, /* 330 */ 439, 45, 375, 20, 117, 393, 155, 154, 153, 68, /* 340 */ 55, 114, 64, 63, 62, 61, 147, 146, 394, 473, /* 350 */ 359, 59, 60, 43, 23, 391, 434, 106, 26, 376, /* 360 */ 57, 58, 42, 49, 375, 392, 117, 393, 155, 154, /* 370 */ 153, 64, 63, 62, 61, 436, 437, 438, 439, 384, /* 380 */ 382, 383, 22, 21, 377, 473, 160, 70, 39, 445, /* 390 */ 24, 445, 145, 141, 431, 142, 140, 64, 63, 62, /* 400 */ 61, 394, 15, 445, 59, 60, 64, 63, 62, 61, /* 410 */ 391, 445, 376, 445, 445, 42, 445, 445, 55, 391, /* 420 */ 156, 156, 156, 445, 147, 146, 445, 52, 106, 445, /* 430 */ 445, 43, 445, 445, 445, 375, 445, 117, 393, 155, /* 440 */ 154, 153, 445, 394, 143, 445, 59, 60, 64, 63, /* 450 */ 62, 61, 313, 445, 376, 378, 158, 42, 445, 445, /* 460 */ 22, 21, 121, 447, 454, 29, 445, 445, 24, 450, /* 470 */ 145, 141, 431, 142, 140, 64, 63, 62, 61, 445, /* 480 */ 163, 106, 445, 445, 444, 27, 445, 445, 375, 445, /* 490 */ 117, 393, 155, 154, 153, 445, 55, 74, 445, 148, /* 500 */ 445, 445, 147, 146, 497, 113, 120, 161, 119, 43, /* 510 */ 445, 394, 445, 445, 59, 60, 445, 445, 445, 118, /* 520 */ 445, 445, 376, 106, 445, 42, 445, 445, 149, 445, /* 530 */ 375, 445, 117, 393, 155, 154, 153, 445, 22, 21, /* 540 */ 394, 144, 445, 59, 60, 445, 24, 445, 145, 141, /* 550 */ 431, 376, 445, 445, 42, 445, 132, 130, 394, 445, /* 560 */ 445, 59, 60, 109, 447, 454, 29, 445, 445, 376, /* 570 */ 450, 445, 42, 445, 394, 445, 445, 59, 60, 445, /* 580 */ 445, 163, 445, 445, 445, 102, 27, 445, 42, 445, /* 590 */ 445, 106, 445, 64, 63, 62, 61, 445, 375, 445, /* 600 */ 117, 393, 155, 154, 153, 394, 355, 445, 59, 60, /* 610 */ 445, 445, 445, 445, 445, 74, 376, 148, 445, 40, /* 620 */ 106, 445, 496, 113, 120, 161, 119, 375, 445, 117, /* 630 */ 393, 155, 154, 153, 445, 448, 454, 29, 106, 445, /* 640 */ 445, 450, 445, 445, 445, 375, 149, 117, 393, 155, /* 650 */ 154, 153, 163, 445, 106, 445, 445, 27, 445, 445, /* 660 */ 445, 375, 445, 117, 393, 155, 154, 153, 394, 445, /* 670 */ 445, 59, 60, 64, 63, 62, 61, 445, 445, 376, /* 680 */ 445, 445, 41, 445, 445, 106, 354, 64, 63, 62, /* 690 */ 61, 445, 375, 445, 117, 393, 155, 154, 153, 445, /* 700 */ 445, 445, 74, 445, 148, 445, 88, 445, 445, 490, /* 710 */ 113, 120, 161, 119, 445, 120, 161, 119, 17, 74, /* 720 */ 445, 148, 110, 110, 445, 445, 484, 113, 120, 161, /* 730 */ 119, 445, 445, 149, 74, 445, 148, 152, 445, 445, /* 740 */ 445, 483, 113, 120, 161, 119, 445, 445, 106, 445, /* 750 */ 149, 445, 445, 107, 445, 375, 445, 117, 393, 155, /* 760 */ 154, 153, 120, 161, 119, 149, 478, 74, 445, 148, /* 770 */ 445, 88, 445, 445, 480, 113, 120, 161, 119, 445, /* 780 */ 120, 161, 119, 74, 152, 148, 10, 479, 479, 445, /* 790 */ 134, 113, 120, 161, 119, 445, 445, 445, 149, 74, /* 800 */ 445, 148, 152, 445, 445, 445, 517, 113, 120, 161, /* 810 */ 119, 445, 445, 74, 149, 148, 445, 445, 445, 445, /* 820 */ 137, 113, 120, 161, 119, 74, 445, 148, 445, 445, /* 830 */ 149, 445, 525, 113, 120, 161, 119, 445, 74, 445, /* 840 */ 148, 445, 445, 445, 149, 527, 113, 120, 161, 119, /* 850 */ 445, 445, 74, 445, 148, 445, 149, 445, 445, 524, /* 860 */ 113, 120, 161, 119, 74, 445, 148, 445, 445, 149, /* 870 */ 445, 526, 113, 120, 161, 119, 445, 445, 74, 445, /* 880 */ 148, 445, 88, 149, 445, 523, 113, 120, 161, 119, /* 890 */ 445, 120, 161, 119, 74, 149, 148, 85, 111, 111, /* 900 */ 445, 522, 113, 120, 161, 119, 120, 161, 119, 149, /* 910 */ 74, 445, 148, 152, 445, 445, 445, 521, 113, 120, /* 920 */ 161, 119, 445, 445, 74, 149, 148, 445, 152, 445, /* 930 */ 445, 520, 113, 120, 161, 119, 74, 445, 148, 445, /* 940 */ 445, 149, 445, 519, 113, 120, 161, 119, 445, 74, /* 950 */ 445, 148, 445, 445, 445, 149, 150, 113, 120, 161, /* 960 */ 119, 445, 445, 74, 445, 148, 445, 149, 445, 445, /* 970 */ 151, 113, 120, 161, 119, 74, 445, 148, 445, 445, /* 980 */ 149, 445, 136, 113, 120, 161, 119, 445, 445, 74, /* 990 */ 445, 148, 107, 445, 149, 445, 135, 113, 120, 161, /* 1000 */ 119, 120, 161, 119, 445, 463, 149, 445, 88, 445, /* 1010 */ 445, 445, 78, 78, 445, 445, 107, 120, 161, 119, /* 1020 */ 149, 445, 445, 152, 82, 120, 161, 119, 445, 463, /* 1030 */ 445, 466, 86, 34, 445, 88, 445, 569, 445, 152, /* 1040 */ 445, 120, 161, 119, 120, 161, 119, 152, 107, 445, /* 1050 */ 445, 475, 64, 63, 62, 61, 445, 120, 161, 119, /* 1060 */ 98, 451, 445, 152, 89, 396, 152, 90, 445, 120, /* 1070 */ 161, 119, 445, 120, 161, 119, 120, 161, 119, 152, /* 1080 */ 445, 64, 63, 62, 61, 445, 445, 445, 445, 445, /* 1090 */ 87, 152, 445, 99, 395, 152, 100, 445, 152, 120, /* 1100 */ 161, 119, 120, 161, 119, 120, 161, 119, 445, 101, /* 1110 */ 64, 63, 62, 61, 445, 445, 445, 445, 120, 161, /* 1120 */ 119, 152, 91, 391, 152, 445, 445, 152, 103, 445, /* 1130 */ 445, 120, 161, 119, 445, 92, 445, 120, 161, 119, /* 1140 */ 152, 93, 445, 445, 120, 161, 119, 104, 445, 445, /* 1150 */ 120, 161, 119, 152, 445, 445, 120, 161, 119, 152, /* 1160 */ 445, 445, 445, 445, 94, 445, 152, 445, 445, 445, /* 1170 */ 105, 445, 152, 120, 161, 119, 445, 95, 152, 120, /* 1180 */ 161, 119, 96, 445, 445, 445, 120, 161, 119, 445, /* 1190 */ 445, 120, 161, 119, 97, 152, 445, 445, 445, 445, /* 1200 */ 549, 152, 445, 120, 161, 119, 548, 445, 152, 120, /* 1210 */ 161, 119, 445, 152, 445, 120, 161, 119, 445, 445, /* 1220 */ 445, 445, 445, 547, 445, 152, 445, 445, 445, 445, /* 1230 */ 445, 152, 120, 161, 119, 546, 445, 152, 445, 115, /* 1240 */ 445, 445, 116, 445, 120, 161, 119, 445, 120, 161, /* 1250 */ 119, 120, 161, 119, 152, 64, 63, 62, 61, 64, /* 1260 */ 63, 62, 61, 445, 445, 445, 152, 445, 445, 445, /* 1270 */ 152, 445, 445, 152, 445, 445, 50, 445, 445, 445, /* 1280 */ 53, 64, 63, 62, 61, 445, 445, 445, 445, 445, /* 1290 */ 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, /* 1300 */ 445, 445, 56, }; static const YYCODETYPE yy_lookahead[] = { /* 0 */ 0, 112, 113, 114, 133, 101, 102, 103, 105, 105, /* 10 */ 10, 112, 113, 114, 110, 111, 112, 113, 114, 105, /* 20 */ 20, 21, 22, 104, 24, 125, 107, 108, 28, 4, /* 30 */ 5, 6, 7, 33, 34, 35, 36, 37, 134, 39, /* 40 */ 40, 41, 42, 104, 44, 45, 107, 108, 106, 49, /* 50 */ 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, /* 60 */ 60, 61, 62, 63, 0, 112, 113, 114, 129, 130, /* 70 */ 131, 103, 12, 105, 10, 112, 113, 114, 110, 111, /* 80 */ 112, 113, 114, 105, 20, 21, 22, 17, 24, 112, /* 90 */ 113, 114, 28, 10, 2, 25, 25, 33, 34, 35, /* 100 */ 36, 37, 134, 39, 40, 41, 42, 2, 44, 45, /* 110 */ 132, 28, 127, 49, 50, 51, 52, 53, 54, 55, /* 120 */ 56, 57, 58, 59, 60, 61, 62, 63, 1, 2, /* 130 */ 38, 4, 5, 4, 5, 6, 7, 4, 5, 12, /* 140 */ 3, 81, 15, 38, 1, 115, 17, 2, 88, 115, /* 150 */ 90, 24, 128, 26, 27, 12, 1, 14, 31, 32, /* 160 */ 19, 18, 16, 20, 21, 22, 23, 24, 17, 26, /* 170 */ 27, 15, 29, 30, 31, 32, 31, 32, 64, 65, /* 180 */ 66, 67, 68, 69, 70, 71, 72, 73, 6, 7, /* 190 */ 43, 64, 13, 48, 26, 27, 103, 48, 105, 29, /* 200 */ 30, 31, 32, 110, 111, 112, 113, 114, 81, 64, /* 210 */ 83, 84, 85, 86, 40, 88, 40, 90, 91, 92, /* 220 */ 93, 94, 1, 2, 87, 4, 5, 134, 83, 84, /* 230 */ 85, 86, 48, 12, 96, 97, 15, 41, 20, 21, /* 240 */ 22, 20, 21, 22, 41, 1, 2, 98, 4, 5, /* 250 */ 82, 47, 31, 32, 17, 103, 12, 105, 90, 15, /* 260 */ 26, 27, 110, 111, 112, 113, 114, 49, 50, 51, /* 270 */ 52, 53, 54, 89, 25, 31, 32, 1, 17, 95, /* 280 */ 4, 5, 98, 26, 27, 64, 134, 74, 12, 0, /* 290 */ 79, 15, 78, 3, 2, 80, 20, 21, 22, 10, /* 300 */ 24, 79, 81, 3, 83, 84, 85, 86, 64, 88, /* 310 */ 3, 90, 91, 92, 93, 94, 38, 2, 3, 4, /* 320 */ 5, 6, 7, 31, 32, 81, 3, 83, 84, 85, /* 330 */ 86, 16, 88, 3, 90, 91, 92, 93, 94, 3, /* 340 */ 25, 95, 4, 5, 6, 7, 31, 32, 1, 2, /* 350 */ 76, 4, 5, 38, 25, 17, 64, 81, 15, 12, /* 360 */ 15, 15, 15, 25, 88, 17, 90, 91, 92, 93, /* 370 */ 94, 4, 5, 6, 7, 83, 84, 85, 86, 28, /* 380 */ 28, 28, 67, 68, 12, 38, 89, 3, 11, 135, /* 390 */ 75, 135, 77, 78, 79, 2, 3, 4, 5, 6, /* 400 */ 7, 1, 35, 135, 4, 5, 4, 5, 6, 7, /* 410 */ 17, 135, 12, 135, 135, 15, 135, 135, 25, 17, /* 420 */ 20, 21, 22, 135, 31, 32, 135, 25, 81, 135, /* 430 */ 135, 38, 135, 135, 135, 88, 135, 90, 91, 92, /* 440 */ 93, 94, 135, 1, 2, 135, 4, 5, 4, 5, /* 450 */ 6, 7, 8, 135, 12, 26, 27, 15, 135, 135, /* 460 */ 67, 68, 99, 100, 101, 102, 135, 135, 75, 106, /* 470 */ 77, 78, 79, 2, 3, 4, 5, 6, 7, 135, /* 480 */ 117, 81, 135, 135, 121, 122, 135, 135, 88, 135, /* 490 */ 90, 91, 92, 93, 94, 135, 25, 103, 135, 105, /* 500 */ 135, 135, 31, 32, 110, 111, 112, 113, 114, 38, /* 510 */ 135, 1, 135, 135, 4, 5, 135, 135, 135, 90, /* 520 */ 135, 135, 12, 81, 135, 15, 135, 135, 134, 135, /* 530 */ 88, 135, 90, 91, 92, 93, 94, 135, 67, 68, /* 540 */ 1, 2, 135, 4, 5, 135, 75, 135, 77, 78, /* 550 */ 79, 12, 135, 135, 15, 135, 46, 47, 1, 135, /* 560 */ 135, 4, 5, 99, 100, 101, 102, 135, 135, 12, /* 570 */ 106, 135, 15, 135, 1, 135, 135, 4, 5, 135, /* 580 */ 135, 117, 135, 135, 135, 12, 122, 135, 15, 135, /* 590 */ 135, 81, 135, 4, 5, 6, 7, 135, 88, 135, /* 600 */ 90, 91, 92, 93, 94, 1, 17, 135, 4, 5, /* 610 */ 135, 135, 135, 135, 135, 103, 12, 105, 135, 15, /* 620 */ 81, 135, 110, 111, 112, 113, 114, 88, 135, 90, /* 630 */ 91, 92, 93, 94, 135, 100, 101, 102, 81, 135, /* 640 */ 135, 106, 135, 135, 135, 88, 134, 90, 91, 92, /* 650 */ 93, 94, 117, 135, 81, 135, 135, 122, 135, 135, /* 660 */ 135, 88, 135, 90, 91, 92, 93, 94, 1, 135, /* 670 */ 135, 4, 5, 4, 5, 6, 7, 135, 135, 12, /* 680 */ 135, 135, 15, 135, 135, 81, 17, 4, 5, 6, /* 690 */ 7, 135, 88, 135, 90, 91, 92, 93, 94, 135, /* 700 */ 135, 135, 103, 135, 105, 135, 103, 135, 135, 110, /* 710 */ 111, 112, 113, 114, 135, 112, 113, 114, 35, 103, /* 720 */ 135, 105, 119, 120, 135, 135, 110, 111, 112, 113, /* 730 */ 114, 135, 135, 134, 103, 135, 105, 134, 135, 135, /* 740 */ 135, 110, 111, 112, 113, 114, 135, 135, 81, 135, /* 750 */ 134, 135, 135, 103, 135, 88, 135, 90, 91, 92, /* 760 */ 93, 94, 112, 113, 114, 134, 116, 103, 135, 105, /* 770 */ 135, 103, 135, 135, 110, 111, 112, 113, 114, 135, /* 780 */ 112, 113, 114, 103, 134, 105, 118, 119, 120, 135, /* 790 */ 110, 111, 112, 113, 114, 135, 135, 135, 134, 103, /* 800 */ 135, 105, 134, 135, 135, 135, 110, 111, 112, 113, /* 810 */ 114, 135, 135, 103, 134, 105, 135, 135, 135, 135, /* 820 */ 110, 111, 112, 113, 114, 103, 135, 105, 135, 135, /* 830 */ 134, 135, 110, 111, 112, 113, 114, 135, 103, 135, /* 840 */ 105, 135, 135, 135, 134, 110, 111, 112, 113, 114, /* 850 */ 135, 135, 103, 135, 105, 135, 134, 135, 135, 110, /* 860 */ 111, 112, 113, 114, 103, 135, 105, 135, 135, 134, /* 870 */ 135, 110, 111, 112, 113, 114, 135, 135, 103, 135, /* 880 */ 105, 135, 103, 134, 135, 110, 111, 112, 113, 114, /* 890 */ 135, 112, 113, 114, 103, 134, 105, 103, 119, 120, /* 900 */ 135, 110, 111, 112, 113, 114, 112, 113, 114, 134, /* 910 */ 103, 135, 105, 134, 135, 135, 135, 110, 111, 112, /* 920 */ 113, 114, 135, 135, 103, 134, 105, 135, 134, 135, /* 930 */ 135, 110, 111, 112, 113, 114, 103, 135, 105, 135, /* 940 */ 135, 134, 135, 110, 111, 112, 113, 114, 135, 103, /* 950 */ 135, 105, 135, 135, 135, 134, 110, 111, 112, 113, /* 960 */ 114, 135, 135, 103, 135, 105, 135, 134, 135, 135, /* 970 */ 110, 111, 112, 113, 114, 103, 135, 105, 135, 135, /* 980 */ 134, 135, 110, 111, 112, 113, 114, 135, 135, 103, /* 990 */ 135, 105, 103, 135, 134, 135, 110, 111, 112, 113, /* 1000 */ 114, 112, 113, 114, 135, 116, 134, 135, 103, 135, /* 1010 */ 135, 135, 123, 124, 135, 135, 103, 112, 113, 114, /* 1020 */ 134, 135, 135, 134, 119, 112, 113, 114, 135, 116, /* 1030 */ 135, 126, 103, 128, 135, 103, 135, 124, 135, 134, /* 1040 */ 135, 112, 113, 114, 112, 113, 114, 134, 103, 135, /* 1050 */ 135, 119, 4, 5, 6, 7, 135, 112, 113, 114, /* 1060 */ 103, 116, 135, 134, 103, 17, 134, 103, 135, 112, /* 1070 */ 113, 114, 135, 112, 113, 114, 112, 113, 114, 134, /* 1080 */ 135, 4, 5, 6, 7, 135, 135, 135, 135, 135, /* 1090 */ 103, 134, 135, 103, 17, 134, 103, 135, 134, 112, /* 1100 */ 113, 114, 112, 113, 114, 112, 113, 114, 135, 103, /* 1110 */ 4, 5, 6, 7, 135, 135, 135, 135, 112, 113, /* 1120 */ 114, 134, 103, 17, 134, 135, 135, 134, 103, 135, /* 1130 */ 135, 112, 113, 114, 135, 103, 135, 112, 113, 114, /* 1140 */ 134, 103, 135, 135, 112, 113, 114, 103, 135, 135, /* 1150 */ 112, 113, 114, 134, 135, 135, 112, 113, 114, 134, /* 1160 */ 135, 135, 135, 135, 103, 135, 134, 135, 135, 135, /* 1170 */ 103, 135, 134, 112, 113, 114, 135, 103, 134, 112, /* 1180 */ 113, 114, 103, 135, 135, 135, 112, 113, 114, 135, /* 1190 */ 135, 112, 113, 114, 103, 134, 135, 135, 135, 135, /* 1200 */ 103, 134, 135, 112, 113, 114, 103, 135, 134, 112, /* 1210 */ 113, 114, 135, 134, 135, 112, 113, 114, 135, 135, /* 1220 */ 135, 135, 135, 103, 135, 134, 135, 135, 135, 135, /* 1230 */ 135, 134, 112, 113, 114, 103, 135, 134, 135, 103, /* 1240 */ 135, 135, 103, 135, 112, 113, 114, 135, 112, 113, /* 1250 */ 114, 112, 113, 114, 134, 4, 5, 6, 7, 4, /* 1260 */ 5, 6, 7, 135, 135, 135, 134, 135, 135, 135, /* 1270 */ 134, 135, 135, 134, 135, 135, 25, 135, 135, 135, /* 1280 */ 25, 4, 5, 6, 7, 135, 135, 135, 135, 135, /* 1290 */ 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, /* 1300 */ 135, 135, 25, 135, 135, 135, 135, 135, 135, 135, /* 1310 */ 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, /* 1320 */ 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, /* 1330 */ 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, /* 1340 */ 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, /* 1350 */ 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, /* 1360 */ 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, /* 1370 */ 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, /* 1380 */ 135, 99, 99, 99, 99, 99, 99, 99, 99, 99, /* 1390 */ 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, /* 1400 */ 99, 99, }; #define YY_SHIFT_COUNT (163) #define YY_SHIFT_MIN (0) #define YY_SHIFT_MAX (1277) static const unsigned short int yy_shift_ofst[] = { /* 0 */ 143, 127, 221, 244, 244, 244, 244, 244, 244, 244, /* 10 */ 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, /* 20 */ 244, 244, 244, 244, 244, 244, 244, 276, 510, 557, /* 30 */ 276, 143, 347, 347, 0, 64, 143, 573, 557, 573, /* 40 */ 400, 400, 400, 442, 539, 557, 557, 557, 557, 557, /* 50 */ 557, 604, 557, 557, 667, 557, 557, 557, 557, 557, /* 60 */ 557, 557, 557, 557, 557, 218, 60, 60, 60, 60, /* 70 */ 60, 145, 315, 393, 471, 292, 292, 170, 71, 1303, /* 80 */ 1303, 1303, 1303, 114, 114, 338, 402, 129, 444, 367, /* 90 */ 683, 589, 1251, 669, 1255, 1048, 1277, 1077, 1106, 25, /* 100 */ 25, 25, 184, 25, 25, 25, 168, 25, 429, 83, /* 110 */ 92, 105, 70, 133, 138, 182, 182, 234, 257, 137, /* 120 */ 149, 289, 141, 155, 151, 146, 156, 147, 174, 176, /* 130 */ 196, 203, 204, 179, 237, 249, 213, 261, 211, 214, /* 140 */ 215, 222, 290, 300, 307, 278, 323, 330, 336, 246, /* 150 */ 274, 329, 246, 343, 345, 346, 348, 351, 352, 353, /* 160 */ 372, 297, 384, 377, }; #define YY_REDUCE_COUNT (82) #define YY_REDUCE_MIN (-129) #define YY_REDUCE_MAX (1139) static const short yy_reduce_ofst[] = { /* 0 */ 363, -96, -32, 93, 152, 394, 512, 599, 616, 631, /* 10 */ 664, 680, 696, 710, 722, 735, 749, 761, 775, 791, /* 20 */ 807, 821, 833, 846, 860, 872, 886, 889, 668, 905, /* 30 */ 913, 464, 603, 779, -61, -61, 535, 650, 932, 945, /* 40 */ 794, 929, 957, 961, 964, 987, 990, 993, 1006, 1019, /* 50 */ 1025, 1032, 1038, 1044, 1061, 1067, 1074, 1079, 1091, 1097, /* 60 */ 1103, 1120, 1132, 1136, 1139, -81, -111, -101, -47, -37, /* 70 */ -23, -22, -129, -129, -129, -97, -86, -58, -100, -15, /* 80 */ 30, 34, 24, }; static const YYACTIONTYPE yy_default[] = { /* 0 */ 449, 443, 443, 443, 443, 443, 443, 443, 443, 443, /* 10 */ 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, /* 20 */ 443, 443, 443, 443, 443, 443, 443, 443, 473, 576, /* 30 */ 443, 449, 580, 485, 581, 581, 449, 443, 443, 443, /* 40 */ 443, 443, 443, 443, 443, 443, 443, 443, 477, 443, /* 50 */ 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, /* 60 */ 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, /* 70 */ 443, 443, 443, 443, 443, 443, 443, 443, 455, 470, /* 80 */ 508, 508, 576, 468, 493, 443, 443, 443, 471, 443, /* 90 */ 443, 443, 443, 443, 443, 443, 443, 443, 443, 488, /* 100 */ 486, 476, 459, 512, 511, 510, 443, 566, 443, 443, /* 110 */ 443, 443, 443, 588, 443, 545, 544, 540, 443, 532, /* 120 */ 529, 443, 443, 443, 443, 443, 443, 491, 443, 443, /* 130 */ 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, /* 140 */ 443, 443, 443, 443, 443, 443, 443, 443, 443, 592, /* 150 */ 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, /* 160 */ 443, 601, 443, 443, }; /********** End of lemon-generated parsing tables *****************************/ /* The next table maps tokens (terminal symbols) into fallback tokens. ** If a construct like the following: ** ** %fallback ID X Y Z. |
︙ | ︙ | |||
1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 | 0, /* NTH => nothing */ 0, /* VERTEX => nothing */ 0, /* TOP => nothing */ 0, /* BOTTOM => nothing */ 0, /* START => nothing */ 0, /* END => nothing */ 0, /* IN => nothing */ 0, /* DOT_U => nothing */ 0, /* LAST => nothing */ 0, /* NUMBER => nothing */ 0, /* FUNC1 => nothing */ 0, /* FUNC2 => nothing */ 0, /* DIST => nothing */ 0, /* DOT_XY => nothing */ | > | 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 | 0, /* NTH => nothing */ 0, /* VERTEX => nothing */ 0, /* TOP => nothing */ 0, /* BOTTOM => nothing */ 0, /* START => nothing */ 0, /* END => nothing */ 0, /* IN => nothing */ 0, /* THIS => nothing */ 0, /* DOT_U => nothing */ 0, /* LAST => nothing */ 0, /* NUMBER => nothing */ 0, /* FUNC1 => nothing */ 0, /* FUNC2 => nothing */ 0, /* DIST => nothing */ 0, /* DOT_XY => nothing */ |
︙ | ︙ | |||
1354 1355 1356 1357 1358 1359 1360 | /* 81 */ "NTH", /* 82 */ "VERTEX", /* 83 */ "TOP", /* 84 */ "BOTTOM", /* 85 */ "START", /* 86 */ "END", /* 87 */ "IN", | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | > | 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 | /* 81 */ "NTH", /* 82 */ "VERTEX", /* 83 */ "TOP", /* 84 */ "BOTTOM", /* 85 */ "START", /* 86 */ "END", /* 87 */ "IN", /* 88 */ "THIS", /* 89 */ "DOT_U", /* 90 */ "LAST", /* 91 */ "NUMBER", /* 92 */ "FUNC1", /* 93 */ "FUNC2", /* 94 */ "DIST", /* 95 */ "DOT_XY", /* 96 */ "X", /* 97 */ "Y", /* 98 */ "DOT_L", /* 99 */ "statement_list", /* 100 */ "statement", /* 101 */ "unnamed_statement", /* 102 */ "basetype", /* 103 */ "expr", /* 104 */ "numproperty", /* 105 */ "edge", /* 106 */ "direction", /* 107 */ "dashproperty", /* 108 */ "colorproperty", /* 109 */ "locproperty", /* 110 */ "position", /* 111 */ "place", /* 112 */ "object", /* 113 */ "objectname", /* 114 */ "nth", /* 115 */ "textposition", /* 116 */ "rvalue", /* 117 */ "lvalue", /* 118 */ "even", /* 119 */ "relexpr", /* 120 */ "optrelexpr", /* 121 */ "document", /* 122 */ "print", /* 123 */ "prlist", /* 124 */ "pritem", /* 125 */ "prsep", /* 126 */ "attribute_list", /* 127 */ "savelist", /* 128 */ "alist", /* 129 */ "attribute", /* 130 */ "go", /* 131 */ "boolproperty", /* 132 */ "withclause", /* 133 */ "between", /* 134 */ "place2", }; #endif /* defined(YYCOVERAGE) || !defined(NDEBUG) */ #ifndef NDEBUG /* For tracing reduce actions, the names of all rules are required. */ static const char *const yyRuleName[] = { |
︙ | ︙ | |||
1495 1496 1497 1498 1499 1500 1501 | /* 81 */ "position ::= expr HEADING expr FROM position", /* 82 */ "place ::= edge OF object", /* 83 */ "place2 ::= object", /* 84 */ "place2 ::= object DOT_E edge", /* 85 */ "place2 ::= NTH VERTEX OF object", /* 86 */ "object ::= nth", /* 87 */ "object ::= nth OF|IN object", | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | > | | < | | | | | > | | | | | | | | | | | | | | | | | | | < | | | | | | | > | | 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 | /* 81 */ "position ::= expr HEADING expr FROM position", /* 82 */ "place ::= edge OF object", /* 83 */ "place2 ::= object", /* 84 */ "place2 ::= object DOT_E edge", /* 85 */ "place2 ::= NTH VERTEX OF object", /* 86 */ "object ::= nth", /* 87 */ "object ::= nth OF|IN object", /* 88 */ "objectname ::= THIS", /* 89 */ "objectname ::= PLACENAME", /* 90 */ "objectname ::= objectname DOT_U PLACENAME", /* 91 */ "nth ::= NTH CLASSNAME", /* 92 */ "nth ::= NTH LAST CLASSNAME", /* 93 */ "nth ::= LAST CLASSNAME", /* 94 */ "nth ::= LAST", /* 95 */ "nth ::= NTH LB RB", /* 96 */ "nth ::= NTH LAST LB RB", /* 97 */ "nth ::= LAST LB RB", /* 98 */ "expr ::= expr PLUS expr", /* 99 */ "expr ::= expr MINUS expr", /* 100 */ "expr ::= expr STAR expr", /* 101 */ "expr ::= expr SLASH expr", /* 102 */ "expr ::= MINUS expr", /* 103 */ "expr ::= PLUS expr", /* 104 */ "expr ::= LP expr RP", /* 105 */ "expr ::= LP FILL|COLOR|THICKNESS RP", /* 106 */ "expr ::= NUMBER", /* 107 */ "expr ::= ID", /* 108 */ "expr ::= FUNC1 LP expr RP", /* 109 */ "expr ::= FUNC2 LP expr COMMA expr RP", /* 110 */ "expr ::= DIST LP position COMMA position RP", /* 111 */ "expr ::= place2 DOT_XY X", /* 112 */ "expr ::= place2 DOT_XY Y", /* 113 */ "expr ::= object DOT_L numproperty", /* 114 */ "expr ::= object DOT_L dashproperty", /* 115 */ "expr ::= object DOT_L colorproperty", /* 116 */ "lvalue ::= ID", /* 117 */ "lvalue ::= FILL", /* 118 */ "lvalue ::= COLOR", /* 119 */ "lvalue ::= THICKNESS", /* 120 */ "rvalue ::= expr", /* 121 */ "print ::= PRINT", /* 122 */ "prlist ::= pritem", /* 123 */ "prlist ::= prlist prsep pritem", /* 124 */ "direction ::= UP", /* 125 */ "direction ::= DOWN", /* 126 */ "direction ::= LEFT", /* 127 */ "direction ::= RIGHT", /* 128 */ "optrelexpr ::= relexpr", /* 129 */ "attribute_list ::= alist", /* 130 */ "alist ::=", /* 131 */ "alist ::= alist attribute", /* 132 */ "attribute ::= boolproperty", /* 133 */ "attribute ::= WITH withclause", /* 134 */ "go ::= GO", /* 135 */ "go ::=", /* 136 */ "even ::= UNTIL EVEN WITH", /* 137 */ "even ::= EVEN WITH", /* 138 */ "dashproperty ::= DOTTED", /* 139 */ "dashproperty ::= DASHED", /* 140 */ "colorproperty ::= FILL", /* 141 */ "colorproperty ::= COLOR", /* 142 */ "position ::= place", /* 143 */ "between ::= WAY BETWEEN", /* 144 */ "between ::= BETWEEN", /* 145 */ "between ::= OF THE WAY BETWEEN", /* 146 */ "place ::= place2", /* 147 */ "edge ::= CENTER", /* 148 */ "edge ::= EDGEPT", /* 149 */ "edge ::= TOP", /* 150 */ "edge ::= BOTTOM", /* 151 */ "edge ::= START", /* 152 */ "edge ::= END", /* 153 */ "edge ::= RIGHT", /* 154 */ "edge ::= LEFT", /* 155 */ "object ::= objectname", }; #endif /* NDEBUG */ #if YYSTACKDEPTH<=0 /* ** Try to increase the size of the parser stack. Return the number |
︙ | ︙ | |||
1687 1688 1689 1690 1691 1692 1693 | ** being destroyed before it is finished parsing. ** ** Note: during a reduce, the only symbols destroyed are those ** which appear on the RHS of the rule, but which are *not* used ** inside the C code. */ /********* Begin destructor definitions ***************************************/ | | | | | | | | | | 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 | ** being destroyed before it is finished parsing. ** ** Note: during a reduce, the only symbols destroyed are those ** which appear on the RHS of the rule, but which are *not* used ** inside the C code. */ /********* Begin destructor definitions ***************************************/ case 99: /* statement_list */ { #line 494 "pikchr.y" pik_elist_free(p,(yypminor->yy227)); #line 1735 "pikchr.c" } break; case 100: /* statement */ case 101: /* unnamed_statement */ case 102: /* basetype */ { #line 496 "pikchr.y" pik_elem_free(p,(yypminor->yy36)); #line 1744 "pikchr.c" } break; /********* End destructor definitions *****************************************/ default: break; /* If no destructor action specified: do nothing */ } } |
︙ | ︙ | |||
1921 1922 1923 1924 1925 1926 1927 | while( yypParser->yytos>yypParser->yystack ) yy_pop_parser_stack(yypParser); /* Here code is inserted which will execute if the parser ** stack every overflows */ /******** Begin %stack_overflow code ******************************************/ #line 528 "pikchr.y" pik_error(p, 0, "parser stack overflow"); | | | 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 | while( yypParser->yytos>yypParser->yystack ) yy_pop_parser_stack(yypParser); /* Here code is inserted which will execute if the parser ** stack every overflows */ /******** Begin %stack_overflow code ******************************************/ #line 528 "pikchr.y" pik_error(p, 0, "parser stack overflow"); #line 1965 "pikchr.c" /******** End %stack_overflow code ********************************************/ pik_parserARG_STORE /* Suppress warning about unused %extra_argument var */ pik_parserCTX_STORE } /* ** Print tracing information for a SHIFT action |
︙ | ︙ | |||
1993 1994 1995 1996 1997 1998 1999 | yytos->minor.yy0 = yyMinor; yyTraceShift(yypParser, yyNewState, "Shift"); } /* For rule J, yyRuleInfoLhs[J] contains the symbol on the left-hand side ** of that rule */ static const YYCODETYPE yyRuleInfoLhs[] = { | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | > | | | | | | | | | | | | | | | | | | | | | | | | | | | < | | > | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 | yytos->minor.yy0 = yyMinor; yyTraceShift(yypParser, yyNewState, "Shift"); } /* For rule J, yyRuleInfoLhs[J] contains the symbol on the left-hand side ** of that rule */ static const YYCODETYPE yyRuleInfoLhs[] = { 121, /* (0) document ::= statement_list */ 99, /* (1) statement_list ::= statement */ 99, /* (2) statement_list ::= statement_list EOL statement */ 100, /* (3) statement ::= */ 100, /* (4) statement ::= direction */ 100, /* (5) statement ::= lvalue ASSIGN rvalue */ 100, /* (6) statement ::= PLACENAME COLON unnamed_statement */ 100, /* (7) statement ::= PLACENAME COLON position */ 100, /* (8) statement ::= unnamed_statement */ 100, /* (9) statement ::= print prlist */ 100, /* (10) statement ::= ASSERT LP expr EQ expr RP */ 100, /* (11) statement ::= ASSERT LP position EQ position RP */ 100, /* (12) statement ::= DEFINE ID CODEBLOCK */ 116, /* (13) rvalue ::= PLACENAME */ 124, /* (14) pritem ::= FILL */ 124, /* (15) pritem ::= COLOR */ 124, /* (16) pritem ::= THICKNESS */ 124, /* (17) pritem ::= rvalue */ 124, /* (18) pritem ::= STRING */ 125, /* (19) prsep ::= COMMA */ 101, /* (20) unnamed_statement ::= basetype attribute_list */ 102, /* (21) basetype ::= CLASSNAME */ 102, /* (22) basetype ::= STRING textposition */ 102, /* (23) basetype ::= LB savelist statement_list RB */ 127, /* (24) savelist ::= */ 119, /* (25) relexpr ::= expr */ 119, /* (26) relexpr ::= expr PERCENT */ 120, /* (27) optrelexpr ::= */ 126, /* (28) attribute_list ::= relexpr alist */ 129, /* (29) attribute ::= numproperty relexpr */ 129, /* (30) attribute ::= dashproperty expr */ 129, /* (31) attribute ::= dashproperty */ 129, /* (32) attribute ::= colorproperty rvalue */ 129, /* (33) attribute ::= go direction optrelexpr */ 129, /* (34) attribute ::= go direction even position */ 129, /* (35) attribute ::= CLOSE */ 129, /* (36) attribute ::= CHOP */ 129, /* (37) attribute ::= FROM position */ 129, /* (38) attribute ::= TO position */ 129, /* (39) attribute ::= THEN */ 129, /* (40) attribute ::= THEN optrelexpr HEADING expr */ 129, /* (41) attribute ::= THEN optrelexpr EDGEPT */ 129, /* (42) attribute ::= GO optrelexpr HEADING expr */ 129, /* (43) attribute ::= GO optrelexpr EDGEPT */ 129, /* (44) attribute ::= AT position */ 129, /* (45) attribute ::= SAME */ 129, /* (46) attribute ::= SAME AS object */ 129, /* (47) attribute ::= STRING textposition */ 129, /* (48) attribute ::= FIT */ 129, /* (49) attribute ::= BEHIND object */ 132, /* (50) withclause ::= DOT_E edge AT position */ 132, /* (51) withclause ::= edge AT position */ 104, /* (52) numproperty ::= HEIGHT|WIDTH|RADIUS|DIAMETER|THICKNESS */ 131, /* (53) boolproperty ::= CW */ 131, /* (54) boolproperty ::= CCW */ 131, /* (55) boolproperty ::= LARROW */ 131, /* (56) boolproperty ::= RARROW */ 131, /* (57) boolproperty ::= LRARROW */ 131, /* (58) boolproperty ::= INVIS */ 131, /* (59) boolproperty ::= THICK */ 131, /* (60) boolproperty ::= THIN */ 131, /* (61) boolproperty ::= SOLID */ 115, /* (62) textposition ::= */ 115, /* (63) textposition ::= textposition CENTER|LJUST|RJUST|ABOVE|BELOW|ITALIC|BOLD|ALIGNED|BIG|SMALL */ 110, /* (64) position ::= expr COMMA expr */ 110, /* (65) position ::= place PLUS expr COMMA expr */ 110, /* (66) position ::= place MINUS expr COMMA expr */ 110, /* (67) position ::= place PLUS LP expr COMMA expr RP */ 110, /* (68) position ::= place MINUS LP expr COMMA expr RP */ 110, /* (69) position ::= LP position COMMA position RP */ 110, /* (70) position ::= LP position RP */ 110, /* (71) position ::= expr between position AND position */ 110, /* (72) position ::= expr LT position COMMA position GT */ 110, /* (73) position ::= expr ABOVE position */ 110, /* (74) position ::= expr BELOW position */ 110, /* (75) position ::= expr LEFT OF position */ 110, /* (76) position ::= expr RIGHT OF position */ 110, /* (77) position ::= expr ON HEADING EDGEPT OF position */ 110, /* (78) position ::= expr HEADING EDGEPT OF position */ 110, /* (79) position ::= expr EDGEPT OF position */ 110, /* (80) position ::= expr ON HEADING expr FROM position */ 110, /* (81) position ::= expr HEADING expr FROM position */ 111, /* (82) place ::= edge OF object */ 134, /* (83) place2 ::= object */ 134, /* (84) place2 ::= object DOT_E edge */ 134, /* (85) place2 ::= NTH VERTEX OF object */ 112, /* (86) object ::= nth */ 112, /* (87) object ::= nth OF|IN object */ 113, /* (88) objectname ::= THIS */ 113, /* (89) objectname ::= PLACENAME */ 113, /* (90) objectname ::= objectname DOT_U PLACENAME */ 114, /* (91) nth ::= NTH CLASSNAME */ 114, /* (92) nth ::= NTH LAST CLASSNAME */ 114, /* (93) nth ::= LAST CLASSNAME */ 114, /* (94) nth ::= LAST */ 114, /* (95) nth ::= NTH LB RB */ 114, /* (96) nth ::= NTH LAST LB RB */ 114, /* (97) nth ::= LAST LB RB */ 103, /* (98) expr ::= expr PLUS expr */ 103, /* (99) expr ::= expr MINUS expr */ 103, /* (100) expr ::= expr STAR expr */ 103, /* (101) expr ::= expr SLASH expr */ 103, /* (102) expr ::= MINUS expr */ 103, /* (103) expr ::= PLUS expr */ 103, /* (104) expr ::= LP expr RP */ 103, /* (105) expr ::= LP FILL|COLOR|THICKNESS RP */ 103, /* (106) expr ::= NUMBER */ 103, /* (107) expr ::= ID */ 103, /* (108) expr ::= FUNC1 LP expr RP */ 103, /* (109) expr ::= FUNC2 LP expr COMMA expr RP */ 103, /* (110) expr ::= DIST LP position COMMA position RP */ 103, /* (111) expr ::= place2 DOT_XY X */ 103, /* (112) expr ::= place2 DOT_XY Y */ 103, /* (113) expr ::= object DOT_L numproperty */ 103, /* (114) expr ::= object DOT_L dashproperty */ 103, /* (115) expr ::= object DOT_L colorproperty */ 117, /* (116) lvalue ::= ID */ 117, /* (117) lvalue ::= FILL */ 117, /* (118) lvalue ::= COLOR */ 117, /* (119) lvalue ::= THICKNESS */ 116, /* (120) rvalue ::= expr */ 122, /* (121) print ::= PRINT */ 123, /* (122) prlist ::= pritem */ 123, /* (123) prlist ::= prlist prsep pritem */ 106, /* (124) direction ::= UP */ 106, /* (125) direction ::= DOWN */ 106, /* (126) direction ::= LEFT */ 106, /* (127) direction ::= RIGHT */ 120, /* (128) optrelexpr ::= relexpr */ 126, /* (129) attribute_list ::= alist */ 128, /* (130) alist ::= */ 128, /* (131) alist ::= alist attribute */ 129, /* (132) attribute ::= boolproperty */ 129, /* (133) attribute ::= WITH withclause */ 130, /* (134) go ::= GO */ 130, /* (135) go ::= */ 118, /* (136) even ::= UNTIL EVEN WITH */ 118, /* (137) even ::= EVEN WITH */ 107, /* (138) dashproperty ::= DOTTED */ 107, /* (139) dashproperty ::= DASHED */ 108, /* (140) colorproperty ::= FILL */ 108, /* (141) colorproperty ::= COLOR */ 110, /* (142) position ::= place */ 133, /* (143) between ::= WAY BETWEEN */ 133, /* (144) between ::= BETWEEN */ 133, /* (145) between ::= OF THE WAY BETWEEN */ 111, /* (146) place ::= place2 */ 105, /* (147) edge ::= CENTER */ 105, /* (148) edge ::= EDGEPT */ 105, /* (149) edge ::= TOP */ 105, /* (150) edge ::= BOTTOM */ 105, /* (151) edge ::= START */ 105, /* (152) edge ::= END */ 105, /* (153) edge ::= RIGHT */ 105, /* (154) edge ::= LEFT */ 112, /* (155) object ::= objectname */ }; /* For rule J, yyRuleInfoNRhs[J] contains the negative of the number ** of symbols on the right-hand side of that rule. */ static const signed char yyRuleInfoNRhs[] = { -1, /* (0) document ::= statement_list */ -1, /* (1) statement_list ::= statement */ |
︙ | ︙ | |||
2241 2242 2243 2244 2245 2246 2247 | -5, /* (81) position ::= expr HEADING expr FROM position */ -3, /* (82) place ::= edge OF object */ -1, /* (83) place2 ::= object */ -3, /* (84) place2 ::= object DOT_E edge */ -4, /* (85) place2 ::= NTH VERTEX OF object */ -1, /* (86) object ::= nth */ -3, /* (87) object ::= nth OF|IN object */ | | > | | | | | | | | < | | | | | | | | | > | | | < | | | | | | | | > | | | | < | | | > | | | | | | | | | | | | | | | | | | | < | | | | | | | > | | 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 | -5, /* (81) position ::= expr HEADING expr FROM position */ -3, /* (82) place ::= edge OF object */ -1, /* (83) place2 ::= object */ -3, /* (84) place2 ::= object DOT_E edge */ -4, /* (85) place2 ::= NTH VERTEX OF object */ -1, /* (86) object ::= nth */ -3, /* (87) object ::= nth OF|IN object */ -1, /* (88) objectname ::= THIS */ -1, /* (89) objectname ::= PLACENAME */ -3, /* (90) objectname ::= objectname DOT_U PLACENAME */ -2, /* (91) nth ::= NTH CLASSNAME */ -3, /* (92) nth ::= NTH LAST CLASSNAME */ -2, /* (93) nth ::= LAST CLASSNAME */ -1, /* (94) nth ::= LAST */ -3, /* (95) nth ::= NTH LB RB */ -4, /* (96) nth ::= NTH LAST LB RB */ -3, /* (97) nth ::= LAST LB RB */ -3, /* (98) expr ::= expr PLUS expr */ -3, /* (99) expr ::= expr MINUS expr */ -3, /* (100) expr ::= expr STAR expr */ -3, /* (101) expr ::= expr SLASH expr */ -2, /* (102) expr ::= MINUS expr */ -2, /* (103) expr ::= PLUS expr */ -3, /* (104) expr ::= LP expr RP */ -3, /* (105) expr ::= LP FILL|COLOR|THICKNESS RP */ -1, /* (106) expr ::= NUMBER */ -1, /* (107) expr ::= ID */ -4, /* (108) expr ::= FUNC1 LP expr RP */ -6, /* (109) expr ::= FUNC2 LP expr COMMA expr RP */ -6, /* (110) expr ::= DIST LP position COMMA position RP */ -3, /* (111) expr ::= place2 DOT_XY X */ -3, /* (112) expr ::= place2 DOT_XY Y */ -3, /* (113) expr ::= object DOT_L numproperty */ -3, /* (114) expr ::= object DOT_L dashproperty */ -3, /* (115) expr ::= object DOT_L colorproperty */ -1, /* (116) lvalue ::= ID */ -1, /* (117) lvalue ::= FILL */ -1, /* (118) lvalue ::= COLOR */ -1, /* (119) lvalue ::= THICKNESS */ -1, /* (120) rvalue ::= expr */ -1, /* (121) print ::= PRINT */ -1, /* (122) prlist ::= pritem */ -3, /* (123) prlist ::= prlist prsep pritem */ -1, /* (124) direction ::= UP */ -1, /* (125) direction ::= DOWN */ -1, /* (126) direction ::= LEFT */ -1, /* (127) direction ::= RIGHT */ -1, /* (128) optrelexpr ::= relexpr */ -1, /* (129) attribute_list ::= alist */ 0, /* (130) alist ::= */ -2, /* (131) alist ::= alist attribute */ -1, /* (132) attribute ::= boolproperty */ -2, /* (133) attribute ::= WITH withclause */ -1, /* (134) go ::= GO */ 0, /* (135) go ::= */ -3, /* (136) even ::= UNTIL EVEN WITH */ -2, /* (137) even ::= EVEN WITH */ -1, /* (138) dashproperty ::= DOTTED */ -1, /* (139) dashproperty ::= DASHED */ -1, /* (140) colorproperty ::= FILL */ -1, /* (141) colorproperty ::= COLOR */ -1, /* (142) position ::= place */ -2, /* (143) between ::= WAY BETWEEN */ -1, /* (144) between ::= BETWEEN */ -4, /* (145) between ::= OF THE WAY BETWEEN */ -1, /* (146) place ::= place2 */ -1, /* (147) edge ::= CENTER */ -1, /* (148) edge ::= EDGEPT */ -1, /* (149) edge ::= TOP */ -1, /* (150) edge ::= BOTTOM */ -1, /* (151) edge ::= START */ -1, /* (152) edge ::= END */ -1, /* (153) edge ::= RIGHT */ -1, /* (154) edge ::= LEFT */ -1, /* (155) object ::= objectname */ }; static void yy_accept(yyParser*); /* Forward Declaration */ /* ** Perform a reduce action and the shift that must immediately ** follow the reduce. |
︙ | ︙ | |||
2400 2401 2402 2403 2404 2405 2406 | ** #line <lineno> <thisfile> ** break; */ /********** Begin reduce actions **********************************************/ YYMINORTYPE yylhsminor; case 0: /* document ::= statement_list */ #line 532 "pikchr.y" | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | > > > > > | | | | | | | | | | | | | | | | | | | | | | | | | | | | | < < < < < < | | | | | | | | | < < | < | | | | > | > > | > | | | | | | | | | | | | < | | | | | | | | | | | | | | | > | > > > > > | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 | ** #line <lineno> <thisfile> ** break; */ /********** Begin reduce actions **********************************************/ YYMINORTYPE yylhsminor; case 0: /* document ::= statement_list */ #line 532 "pikchr.y" {pik_render(p,yymsp[0].minor.yy227);} #line 2447 "pikchr.c" break; case 1: /* statement_list ::= statement */ #line 535 "pikchr.y" { yylhsminor.yy227 = pik_elist_append(p,0,yymsp[0].minor.yy36); } #line 2452 "pikchr.c" yymsp[0].minor.yy227 = yylhsminor.yy227; break; case 2: /* statement_list ::= statement_list EOL statement */ #line 537 "pikchr.y" { yylhsminor.yy227 = pik_elist_append(p,yymsp[-2].minor.yy227,yymsp[0].minor.yy36); } #line 2458 "pikchr.c" yymsp[-2].minor.yy227 = yylhsminor.yy227; break; case 3: /* statement ::= */ #line 540 "pikchr.y" { yymsp[1].minor.yy36 = 0; } #line 2464 "pikchr.c" break; case 4: /* statement ::= direction */ #line 541 "pikchr.y" { pik_set_direction(p,yymsp[0].minor.yy0.eCode); yylhsminor.yy36=0; } #line 2469 "pikchr.c" yymsp[0].minor.yy36 = yylhsminor.yy36; break; case 5: /* statement ::= lvalue ASSIGN rvalue */ #line 542 "pikchr.y" {pik_set_var(p,&yymsp[-2].minor.yy0,yymsp[0].minor.yy153,&yymsp[-1].minor.yy0); yylhsminor.yy36=0;} #line 2475 "pikchr.c" yymsp[-2].minor.yy36 = yylhsminor.yy36; break; case 6: /* statement ::= PLACENAME COLON unnamed_statement */ #line 544 "pikchr.y" { yylhsminor.yy36 = yymsp[0].minor.yy36; pik_elem_setname(p,yymsp[0].minor.yy36,&yymsp[-2].minor.yy0); } #line 2481 "pikchr.c" yymsp[-2].minor.yy36 = yylhsminor.yy36; break; case 7: /* statement ::= PLACENAME COLON position */ #line 546 "pikchr.y" { yylhsminor.yy36 = pik_elem_new(p,0,0,0); if(yylhsminor.yy36){ yylhsminor.yy36->ptAt = yymsp[0].minor.yy79; pik_elem_setname(p,yylhsminor.yy36,&yymsp[-2].minor.yy0); }} #line 2488 "pikchr.c" yymsp[-2].minor.yy36 = yylhsminor.yy36; break; case 8: /* statement ::= unnamed_statement */ #line 548 "pikchr.y" {yylhsminor.yy36 = yymsp[0].minor.yy36;} #line 2494 "pikchr.c" yymsp[0].minor.yy36 = yylhsminor.yy36; break; case 9: /* statement ::= print prlist */ #line 549 "pikchr.y" {pik_append(p,"<br>\n",5); yymsp[-1].minor.yy36=0;} #line 2500 "pikchr.c" break; case 10: /* statement ::= ASSERT LP expr EQ expr RP */ #line 554 "pikchr.y" {yymsp[-5].minor.yy36=pik_assert(p,yymsp[-3].minor.yy153,&yymsp[-2].minor.yy0,yymsp[-1].minor.yy153);} #line 2505 "pikchr.c" break; case 11: /* statement ::= ASSERT LP position EQ position RP */ #line 556 "pikchr.y" {yymsp[-5].minor.yy36=pik_position_assert(p,&yymsp[-3].minor.yy79,&yymsp[-2].minor.yy0,&yymsp[-1].minor.yy79);} #line 2510 "pikchr.c" break; case 12: /* statement ::= DEFINE ID CODEBLOCK */ #line 557 "pikchr.y" {yymsp[-2].minor.yy36=0; pik_add_macro(p,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy0);} #line 2515 "pikchr.c" break; case 13: /* rvalue ::= PLACENAME */ #line 568 "pikchr.y" {yylhsminor.yy153 = pik_lookup_color(p,&yymsp[0].minor.yy0);} #line 2520 "pikchr.c" yymsp[0].minor.yy153 = yylhsminor.yy153; break; case 14: /* pritem ::= FILL */ case 15: /* pritem ::= COLOR */ yytestcase(yyruleno==15); case 16: /* pritem ::= THICKNESS */ yytestcase(yyruleno==16); #line 573 "pikchr.y" {pik_append_num(p,"",pik_value(p,yymsp[0].minor.yy0.z,yymsp[0].minor.yy0.n,0));} #line 2528 "pikchr.c" break; case 17: /* pritem ::= rvalue */ #line 576 "pikchr.y" {pik_append_num(p,"",yymsp[0].minor.yy153);} #line 2533 "pikchr.c" break; case 18: /* pritem ::= STRING */ #line 577 "pikchr.y" {pik_append_text(p,yymsp[0].minor.yy0.z+1,yymsp[0].minor.yy0.n-2,0);} #line 2538 "pikchr.c" break; case 19: /* prsep ::= COMMA */ #line 578 "pikchr.y" {pik_append(p, " ", 1);} #line 2543 "pikchr.c" break; case 20: /* unnamed_statement ::= basetype attribute_list */ #line 581 "pikchr.y" {yylhsminor.yy36 = yymsp[-1].minor.yy36; pik_after_adding_attributes(p,yylhsminor.yy36);} #line 2548 "pikchr.c" yymsp[-1].minor.yy36 = yylhsminor.yy36; break; case 21: /* basetype ::= CLASSNAME */ #line 583 "pikchr.y" {yylhsminor.yy36 = pik_elem_new(p,&yymsp[0].minor.yy0,0,0); } #line 2554 "pikchr.c" yymsp[0].minor.yy36 = yylhsminor.yy36; break; case 22: /* basetype ::= STRING textposition */ #line 585 "pikchr.y" {yymsp[-1].minor.yy0.eCode = yymsp[0].minor.yy164; yylhsminor.yy36 = pik_elem_new(p,0,&yymsp[-1].minor.yy0,0); } #line 2560 "pikchr.c" yymsp[-1].minor.yy36 = yylhsminor.yy36; break; case 23: /* basetype ::= LB savelist statement_list RB */ #line 587 "pikchr.y" { p->list = yymsp[-2].minor.yy227; yymsp[-3].minor.yy36 = pik_elem_new(p,0,0,yymsp[-1].minor.yy227); if(yymsp[-3].minor.yy36) yymsp[-3].minor.yy36->errTok = yymsp[0].minor.yy0; } #line 2566 "pikchr.c" break; case 24: /* savelist ::= */ #line 592 "pikchr.y" {yymsp[1].minor.yy227 = p->list; p->list = 0;} #line 2571 "pikchr.c" break; case 25: /* relexpr ::= expr */ #line 599 "pikchr.y" {yylhsminor.yy10.rAbs = yymsp[0].minor.yy153; yylhsminor.yy10.rRel = 0;} #line 2576 "pikchr.c" yymsp[0].minor.yy10 = yylhsminor.yy10; break; case 26: /* relexpr ::= expr PERCENT */ #line 600 "pikchr.y" {yylhsminor.yy10.rAbs = 0; yylhsminor.yy10.rRel = yymsp[-1].minor.yy153/100;} #line 2582 "pikchr.c" yymsp[-1].minor.yy10 = yylhsminor.yy10; break; case 27: /* optrelexpr ::= */ #line 602 "pikchr.y" {yymsp[1].minor.yy10.rAbs = 0; yymsp[1].minor.yy10.rRel = 1.0;} #line 2588 "pikchr.c" break; case 28: /* attribute_list ::= relexpr alist */ #line 604 "pikchr.y" {pik_add_direction(p,0,&yymsp[-1].minor.yy10);} #line 2593 "pikchr.c" break; case 29: /* attribute ::= numproperty relexpr */ #line 608 "pikchr.y" { pik_set_numprop(p,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy10); } #line 2598 "pikchr.c" break; case 30: /* attribute ::= dashproperty expr */ #line 609 "pikchr.y" { pik_set_dashed(p,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy153); } #line 2603 "pikchr.c" break; case 31: /* attribute ::= dashproperty */ #line 610 "pikchr.y" { pik_set_dashed(p,&yymsp[0].minor.yy0,0); } #line 2608 "pikchr.c" break; case 32: /* attribute ::= colorproperty rvalue */ #line 611 "pikchr.y" { pik_set_clrprop(p,&yymsp[-1].minor.yy0,yymsp[0].minor.yy153); } #line 2613 "pikchr.c" break; case 33: /* attribute ::= go direction optrelexpr */ #line 612 "pikchr.y" { pik_add_direction(p,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy10);} #line 2618 "pikchr.c" break; case 34: /* attribute ::= go direction even position */ #line 613 "pikchr.y" {pik_evenwith(p,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy79);} #line 2623 "pikchr.c" break; case 35: /* attribute ::= CLOSE */ #line 614 "pikchr.y" { pik_close_path(p,&yymsp[0].minor.yy0); } #line 2628 "pikchr.c" break; case 36: /* attribute ::= CHOP */ #line 615 "pikchr.y" { p->cur->bChop = 1; } #line 2633 "pikchr.c" break; case 37: /* attribute ::= FROM position */ #line 616 "pikchr.y" { pik_set_from(p,p->cur,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy79); } #line 2638 "pikchr.c" break; case 38: /* attribute ::= TO position */ #line 617 "pikchr.y" { pik_add_to(p,p->cur,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy79); } #line 2643 "pikchr.c" break; case 39: /* attribute ::= THEN */ #line 618 "pikchr.y" { pik_then(p, &yymsp[0].minor.yy0, p->cur); } #line 2648 "pikchr.c" break; case 40: /* attribute ::= THEN optrelexpr HEADING expr */ case 42: /* attribute ::= GO optrelexpr HEADING expr */ yytestcase(yyruleno==42); #line 620 "pikchr.y" {pik_move_hdg(p,&yymsp[-2].minor.yy10,&yymsp[-1].minor.yy0,yymsp[0].minor.yy153,0,&yymsp[-3].minor.yy0);} #line 2654 "pikchr.c" break; case 41: /* attribute ::= THEN optrelexpr EDGEPT */ case 43: /* attribute ::= GO optrelexpr EDGEPT */ yytestcase(yyruleno==43); #line 621 "pikchr.y" {pik_move_hdg(p,&yymsp[-1].minor.yy10,0,0,&yymsp[0].minor.yy0,&yymsp[-2].minor.yy0);} #line 2660 "pikchr.c" break; case 44: /* attribute ::= AT position */ #line 626 "pikchr.y" { pik_set_at(p,0,&yymsp[0].minor.yy79,&yymsp[-1].minor.yy0); } #line 2665 "pikchr.c" break; case 45: /* attribute ::= SAME */ #line 628 "pikchr.y" {pik_same(p,0,&yymsp[0].minor.yy0);} #line 2670 "pikchr.c" break; case 46: /* attribute ::= SAME AS object */ #line 629 "pikchr.y" {pik_same(p,yymsp[0].minor.yy36,&yymsp[-2].minor.yy0);} #line 2675 "pikchr.c" break; case 47: /* attribute ::= STRING textposition */ #line 630 "pikchr.y" {pik_add_txt(p,&yymsp[-1].minor.yy0,yymsp[0].minor.yy164);} #line 2680 "pikchr.c" break; case 48: /* attribute ::= FIT */ #line 631 "pikchr.y" {pik_size_to_fit(p,&yymsp[0].minor.yy0,3); } #line 2685 "pikchr.c" break; case 49: /* attribute ::= BEHIND object */ #line 632 "pikchr.y" {pik_behind(p,yymsp[0].minor.yy36);} #line 2690 "pikchr.c" break; case 50: /* withclause ::= DOT_E edge AT position */ case 51: /* withclause ::= edge AT position */ yytestcase(yyruleno==51); #line 640 "pikchr.y" { pik_set_at(p,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy79,&yymsp[-1].minor.yy0); } #line 2696 "pikchr.c" break; case 52: /* numproperty ::= HEIGHT|WIDTH|RADIUS|DIAMETER|THICKNESS */ #line 644 "pikchr.y" {yylhsminor.yy0 = yymsp[0].minor.yy0;} #line 2701 "pikchr.c" yymsp[0].minor.yy0 = yylhsminor.yy0; break; case 53: /* boolproperty ::= CW */ #line 655 "pikchr.y" {p->cur->cw = 1;} #line 2707 "pikchr.c" break; case 54: /* boolproperty ::= CCW */ #line 656 "pikchr.y" {p->cur->cw = 0;} #line 2712 "pikchr.c" break; case 55: /* boolproperty ::= LARROW */ #line 657 "pikchr.y" {p->cur->larrow=1; p->cur->rarrow=0; } #line 2717 "pikchr.c" break; case 56: /* boolproperty ::= RARROW */ #line 658 "pikchr.y" {p->cur->larrow=0; p->cur->rarrow=1; } #line 2722 "pikchr.c" break; case 57: /* boolproperty ::= LRARROW */ #line 659 "pikchr.y" {p->cur->larrow=1; p->cur->rarrow=1; } #line 2727 "pikchr.c" break; case 58: /* boolproperty ::= INVIS */ #line 660 "pikchr.y" {p->cur->sw = 0.0;} #line 2732 "pikchr.c" break; case 59: /* boolproperty ::= THICK */ #line 661 "pikchr.y" {p->cur->sw *= 1.5;} #line 2737 "pikchr.c" break; case 60: /* boolproperty ::= THIN */ #line 662 "pikchr.y" {p->cur->sw *= 0.67;} #line 2742 "pikchr.c" break; case 61: /* boolproperty ::= SOLID */ #line 663 "pikchr.y" {p->cur->sw = pik_value(p,"thickness",9,0); p->cur->dotted = p->cur->dashed = 0.0;} #line 2748 "pikchr.c" break; case 62: /* textposition ::= */ #line 666 "pikchr.y" {yymsp[1].minor.yy164 = 0;} #line 2753 "pikchr.c" break; case 63: /* textposition ::= textposition CENTER|LJUST|RJUST|ABOVE|BELOW|ITALIC|BOLD|ALIGNED|BIG|SMALL */ #line 669 "pikchr.y" {yylhsminor.yy164 = (short int)pik_text_position(yymsp[-1].minor.yy164,&yymsp[0].minor.yy0);} #line 2758 "pikchr.c" yymsp[-1].minor.yy164 = yylhsminor.yy164; break; case 64: /* position ::= expr COMMA expr */ #line 672 "pikchr.y" {yylhsminor.yy79.x=yymsp[-2].minor.yy153; yylhsminor.yy79.y=yymsp[0].minor.yy153;} #line 2764 "pikchr.c" yymsp[-2].minor.yy79 = yylhsminor.yy79; break; case 65: /* position ::= place PLUS expr COMMA expr */ #line 674 "pikchr.y" {yylhsminor.yy79.x=yymsp[-4].minor.yy79.x+yymsp[-2].minor.yy153; yylhsminor.yy79.y=yymsp[-4].minor.yy79.y+yymsp[0].minor.yy153;} #line 2770 "pikchr.c" yymsp[-4].minor.yy79 = yylhsminor.yy79; break; case 66: /* position ::= place MINUS expr COMMA expr */ #line 675 "pikchr.y" {yylhsminor.yy79.x=yymsp[-4].minor.yy79.x-yymsp[-2].minor.yy153; yylhsminor.yy79.y=yymsp[-4].minor.yy79.y-yymsp[0].minor.yy153;} #line 2776 "pikchr.c" yymsp[-4].minor.yy79 = yylhsminor.yy79; break; case 67: /* position ::= place PLUS LP expr COMMA expr RP */ #line 677 "pikchr.y" {yylhsminor.yy79.x=yymsp[-6].minor.yy79.x+yymsp[-3].minor.yy153; yylhsminor.yy79.y=yymsp[-6].minor.yy79.y+yymsp[-1].minor.yy153;} #line 2782 "pikchr.c" yymsp[-6].minor.yy79 = yylhsminor.yy79; break; case 68: /* position ::= place MINUS LP expr COMMA expr RP */ #line 679 "pikchr.y" {yylhsminor.yy79.x=yymsp[-6].minor.yy79.x-yymsp[-3].minor.yy153; yylhsminor.yy79.y=yymsp[-6].minor.yy79.y-yymsp[-1].minor.yy153;} #line 2788 "pikchr.c" yymsp[-6].minor.yy79 = yylhsminor.yy79; break; case 69: /* position ::= LP position COMMA position RP */ #line 680 "pikchr.y" {yymsp[-4].minor.yy79.x=yymsp[-3].minor.yy79.x; yymsp[-4].minor.yy79.y=yymsp[-1].minor.yy79.y;} #line 2794 "pikchr.c" break; case 70: /* position ::= LP position RP */ #line 681 "pikchr.y" {yymsp[-2].minor.yy79=yymsp[-1].minor.yy79;} #line 2799 "pikchr.c" break; case 71: /* position ::= expr between position AND position */ #line 683 "pikchr.y" {yylhsminor.yy79 = pik_position_between(yymsp[-4].minor.yy153,yymsp[-2].minor.yy79,yymsp[0].minor.yy79);} #line 2804 "pikchr.c" yymsp[-4].minor.yy79 = yylhsminor.yy79; break; case 72: /* position ::= expr LT position COMMA position GT */ #line 685 "pikchr.y" {yylhsminor.yy79 = pik_position_between(yymsp[-5].minor.yy153,yymsp[-3].minor.yy79,yymsp[-1].minor.yy79);} #line 2810 "pikchr.c" yymsp[-5].minor.yy79 = yylhsminor.yy79; break; case 73: /* position ::= expr ABOVE position */ #line 686 "pikchr.y" {yylhsminor.yy79=yymsp[0].minor.yy79; yylhsminor.yy79.y += yymsp[-2].minor.yy153;} #line 2816 "pikchr.c" yymsp[-2].minor.yy79 = yylhsminor.yy79; break; case 74: /* position ::= expr BELOW position */ #line 687 "pikchr.y" {yylhsminor.yy79=yymsp[0].minor.yy79; yylhsminor.yy79.y -= yymsp[-2].minor.yy153;} #line 2822 "pikchr.c" yymsp[-2].minor.yy79 = yylhsminor.yy79; break; case 75: /* position ::= expr LEFT OF position */ #line 688 "pikchr.y" {yylhsminor.yy79=yymsp[0].minor.yy79; yylhsminor.yy79.x -= yymsp[-3].minor.yy153;} #line 2828 "pikchr.c" yymsp[-3].minor.yy79 = yylhsminor.yy79; break; case 76: /* position ::= expr RIGHT OF position */ #line 689 "pikchr.y" {yylhsminor.yy79=yymsp[0].minor.yy79; yylhsminor.yy79.x += yymsp[-3].minor.yy153;} #line 2834 "pikchr.c" yymsp[-3].minor.yy79 = yylhsminor.yy79; break; case 77: /* position ::= expr ON HEADING EDGEPT OF position */ #line 691 "pikchr.y" {yylhsminor.yy79 = pik_position_at_hdg(yymsp[-5].minor.yy153,&yymsp[-2].minor.yy0,yymsp[0].minor.yy79);} #line 2840 "pikchr.c" yymsp[-5].minor.yy79 = yylhsminor.yy79; break; case 78: /* position ::= expr HEADING EDGEPT OF position */ #line 693 "pikchr.y" {yylhsminor.yy79 = pik_position_at_hdg(yymsp[-4].minor.yy153,&yymsp[-2].minor.yy0,yymsp[0].minor.yy79);} #line 2846 "pikchr.c" yymsp[-4].minor.yy79 = yylhsminor.yy79; break; case 79: /* position ::= expr EDGEPT OF position */ #line 695 "pikchr.y" {yylhsminor.yy79 = pik_position_at_hdg(yymsp[-3].minor.yy153,&yymsp[-2].minor.yy0,yymsp[0].minor.yy79);} #line 2852 "pikchr.c" yymsp[-3].minor.yy79 = yylhsminor.yy79; break; case 80: /* position ::= expr ON HEADING expr FROM position */ #line 697 "pikchr.y" {yylhsminor.yy79 = pik_position_at_angle(yymsp[-5].minor.yy153,yymsp[-2].minor.yy153,yymsp[0].minor.yy79);} #line 2858 "pikchr.c" yymsp[-5].minor.yy79 = yylhsminor.yy79; break; case 81: /* position ::= expr HEADING expr FROM position */ #line 699 "pikchr.y" {yylhsminor.yy79 = pik_position_at_angle(yymsp[-4].minor.yy153,yymsp[-2].minor.yy153,yymsp[0].minor.yy79);} #line 2864 "pikchr.c" yymsp[-4].minor.yy79 = yylhsminor.yy79; break; case 82: /* place ::= edge OF object */ #line 711 "pikchr.y" {yylhsminor.yy79 = pik_place_of_elem(p,yymsp[0].minor.yy36,&yymsp[-2].minor.yy0);} #line 2870 "pikchr.c" yymsp[-2].minor.yy79 = yylhsminor.yy79; break; case 83: /* place2 ::= object */ #line 712 "pikchr.y" {yylhsminor.yy79 = pik_place_of_elem(p,yymsp[0].minor.yy36,0);} #line 2876 "pikchr.c" yymsp[0].minor.yy79 = yylhsminor.yy79; break; case 84: /* place2 ::= object DOT_E edge */ #line 713 "pikchr.y" {yylhsminor.yy79 = pik_place_of_elem(p,yymsp[-2].minor.yy36,&yymsp[0].minor.yy0);} #line 2882 "pikchr.c" yymsp[-2].minor.yy79 = yylhsminor.yy79; break; case 85: /* place2 ::= NTH VERTEX OF object */ #line 714 "pikchr.y" {yylhsminor.yy79 = pik_nth_vertex(p,&yymsp[-3].minor.yy0,&yymsp[-2].minor.yy0,yymsp[0].minor.yy36);} #line 2888 "pikchr.c" yymsp[-3].minor.yy79 = yylhsminor.yy79; break; case 86: /* object ::= nth */ #line 726 "pikchr.y" {yylhsminor.yy36 = pik_find_nth(p,0,&yymsp[0].minor.yy0);} #line 2894 "pikchr.c" yymsp[0].minor.yy36 = yylhsminor.yy36; break; case 87: /* object ::= nth OF|IN object */ #line 727 "pikchr.y" {yylhsminor.yy36 = pik_find_nth(p,yymsp[0].minor.yy36,&yymsp[-2].minor.yy0);} #line 2900 "pikchr.c" yymsp[-2].minor.yy36 = yylhsminor.yy36; break; case 88: /* objectname ::= THIS */ #line 729 "pikchr.y" {yymsp[0].minor.yy36 = p->cur;} #line 2906 "pikchr.c" break; case 89: /* objectname ::= PLACENAME */ #line 730 "pikchr.y" {yylhsminor.yy36 = pik_find_byname(p,0,&yymsp[0].minor.yy0);} #line 2911 "pikchr.c" yymsp[0].minor.yy36 = yylhsminor.yy36; break; case 90: /* objectname ::= objectname DOT_U PLACENAME */ #line 732 "pikchr.y" {yylhsminor.yy36 = pik_find_byname(p,yymsp[-2].minor.yy36,&yymsp[0].minor.yy0);} #line 2917 "pikchr.c" yymsp[-2].minor.yy36 = yylhsminor.yy36; break; case 91: /* nth ::= NTH CLASSNAME */ #line 734 "pikchr.y" {yylhsminor.yy0=yymsp[0].minor.yy0; yylhsminor.yy0.eCode = pik_nth_value(p,&yymsp[-1].minor.yy0); } #line 2923 "pikchr.c" yymsp[-1].minor.yy0 = yylhsminor.yy0; break; case 92: /* nth ::= NTH LAST CLASSNAME */ #line 735 "pikchr.y" {yylhsminor.yy0=yymsp[0].minor.yy0; yylhsminor.yy0.eCode = -pik_nth_value(p,&yymsp[-2].minor.yy0); } #line 2929 "pikchr.c" yymsp[-2].minor.yy0 = yylhsminor.yy0; break; case 93: /* nth ::= LAST CLASSNAME */ #line 736 "pikchr.y" {yymsp[-1].minor.yy0=yymsp[0].minor.yy0; yymsp[-1].minor.yy0.eCode = -1;} #line 2935 "pikchr.c" break; case 94: /* nth ::= LAST */ #line 737 "pikchr.y" {yylhsminor.yy0=yymsp[0].minor.yy0; yylhsminor.yy0.eCode = -1;} #line 2940 "pikchr.c" yymsp[0].minor.yy0 = yylhsminor.yy0; break; case 95: /* nth ::= NTH LB RB */ #line 738 "pikchr.y" {yylhsminor.yy0=yymsp[-1].minor.yy0; yylhsminor.yy0.eCode = pik_nth_value(p,&yymsp[-2].minor.yy0);} #line 2946 "pikchr.c" yymsp[-2].minor.yy0 = yylhsminor.yy0; break; case 96: /* nth ::= NTH LAST LB RB */ #line 739 "pikchr.y" {yylhsminor.yy0=yymsp[-1].minor.yy0; yylhsminor.yy0.eCode = -pik_nth_value(p,&yymsp[-3].minor.yy0);} #line 2952 "pikchr.c" yymsp[-3].minor.yy0 = yylhsminor.yy0; break; case 97: /* nth ::= LAST LB RB */ #line 740 "pikchr.y" {yymsp[-2].minor.yy0=yymsp[-1].minor.yy0; yymsp[-2].minor.yy0.eCode = -1; } #line 2958 "pikchr.c" break; case 98: /* expr ::= expr PLUS expr */ #line 742 "pikchr.y" {yylhsminor.yy153=yymsp[-2].minor.yy153+yymsp[0].minor.yy153;} #line 2963 "pikchr.c" yymsp[-2].minor.yy153 = yylhsminor.yy153; break; case 99: /* expr ::= expr MINUS expr */ #line 743 "pikchr.y" {yylhsminor.yy153=yymsp[-2].minor.yy153-yymsp[0].minor.yy153;} #line 2969 "pikchr.c" yymsp[-2].minor.yy153 = yylhsminor.yy153; break; case 100: /* expr ::= expr STAR expr */ #line 744 "pikchr.y" {yylhsminor.yy153=yymsp[-2].minor.yy153*yymsp[0].minor.yy153;} #line 2975 "pikchr.c" yymsp[-2].minor.yy153 = yylhsminor.yy153; break; case 101: /* expr ::= expr SLASH expr */ #line 745 "pikchr.y" { if( yymsp[0].minor.yy153==0.0 ){ pik_error(p, &yymsp[-1].minor.yy0, "division by zero"); yylhsminor.yy153 = 0.0; } else{ yylhsminor.yy153 = yymsp[-2].minor.yy153/yymsp[0].minor.yy153; } } #line 2984 "pikchr.c" yymsp[-2].minor.yy153 = yylhsminor.yy153; break; case 102: /* expr ::= MINUS expr */ #line 749 "pikchr.y" {yymsp[-1].minor.yy153=-yymsp[0].minor.yy153;} #line 2990 "pikchr.c" break; case 103: /* expr ::= PLUS expr */ #line 750 "pikchr.y" {yymsp[-1].minor.yy153=yymsp[0].minor.yy153;} #line 2995 "pikchr.c" break; case 104: /* expr ::= LP expr RP */ #line 751 "pikchr.y" {yymsp[-2].minor.yy153=yymsp[-1].minor.yy153;} #line 3000 "pikchr.c" break; case 105: /* expr ::= LP FILL|COLOR|THICKNESS RP */ #line 752 "pikchr.y" {yymsp[-2].minor.yy153=pik_get_var(p,&yymsp[-1].minor.yy0);} #line 3005 "pikchr.c" break; case 106: /* expr ::= NUMBER */ #line 753 "pikchr.y" {yylhsminor.yy153=pik_atof(&yymsp[0].minor.yy0);} #line 3010 "pikchr.c" yymsp[0].minor.yy153 = yylhsminor.yy153; break; case 107: /* expr ::= ID */ #line 754 "pikchr.y" {yylhsminor.yy153=pik_get_var(p,&yymsp[0].minor.yy0);} #line 3016 "pikchr.c" yymsp[0].minor.yy153 = yylhsminor.yy153; break; case 108: /* expr ::= FUNC1 LP expr RP */ #line 755 "pikchr.y" {yylhsminor.yy153 = pik_func(p,&yymsp[-3].minor.yy0,yymsp[-1].minor.yy153,0.0);} #line 3022 "pikchr.c" yymsp[-3].minor.yy153 = yylhsminor.yy153; break; case 109: /* expr ::= FUNC2 LP expr COMMA expr RP */ #line 756 "pikchr.y" {yylhsminor.yy153 = pik_func(p,&yymsp[-5].minor.yy0,yymsp[-3].minor.yy153,yymsp[-1].minor.yy153);} #line 3028 "pikchr.c" yymsp[-5].minor.yy153 = yylhsminor.yy153; break; case 110: /* expr ::= DIST LP position COMMA position RP */ #line 757 "pikchr.y" {yymsp[-5].minor.yy153 = pik_dist(&yymsp[-3].minor.yy79,&yymsp[-1].minor.yy79);} #line 3034 "pikchr.c" break; case 111: /* expr ::= place2 DOT_XY X */ #line 758 "pikchr.y" {yylhsminor.yy153 = yymsp[-2].minor.yy79.x;} #line 3039 "pikchr.c" yymsp[-2].minor.yy153 = yylhsminor.yy153; break; case 112: /* expr ::= place2 DOT_XY Y */ #line 759 "pikchr.y" {yylhsminor.yy153 = yymsp[-2].minor.yy79.y;} #line 3045 "pikchr.c" yymsp[-2].minor.yy153 = yylhsminor.yy153; break; case 113: /* expr ::= object DOT_L numproperty */ case 114: /* expr ::= object DOT_L dashproperty */ yytestcase(yyruleno==114); case 115: /* expr ::= object DOT_L colorproperty */ yytestcase(yyruleno==115); #line 760 "pikchr.y" {yylhsminor.yy153=pik_property_of(yymsp[-2].minor.yy36,&yymsp[0].minor.yy0);} #line 3053 "pikchr.c" yymsp[-2].minor.yy153 = yylhsminor.yy153; break; default: /* (116) lvalue ::= ID */ yytestcase(yyruleno==116); /* (117) lvalue ::= FILL */ yytestcase(yyruleno==117); /* (118) lvalue ::= COLOR */ yytestcase(yyruleno==118); /* (119) lvalue ::= THICKNESS */ yytestcase(yyruleno==119); /* (120) rvalue ::= expr */ yytestcase(yyruleno==120); /* (121) print ::= PRINT */ yytestcase(yyruleno==121); /* (122) prlist ::= pritem (OPTIMIZED OUT) */ assert(yyruleno!=122); /* (123) prlist ::= prlist prsep pritem */ yytestcase(yyruleno==123); /* (124) direction ::= UP */ yytestcase(yyruleno==124); /* (125) direction ::= DOWN */ yytestcase(yyruleno==125); /* (126) direction ::= LEFT */ yytestcase(yyruleno==126); /* (127) direction ::= RIGHT */ yytestcase(yyruleno==127); /* (128) optrelexpr ::= relexpr (OPTIMIZED OUT) */ assert(yyruleno!=128); /* (129) attribute_list ::= alist */ yytestcase(yyruleno==129); /* (130) alist ::= */ yytestcase(yyruleno==130); /* (131) alist ::= alist attribute */ yytestcase(yyruleno==131); /* (132) attribute ::= boolproperty (OPTIMIZED OUT) */ assert(yyruleno!=132); /* (133) attribute ::= WITH withclause */ yytestcase(yyruleno==133); /* (134) go ::= GO */ yytestcase(yyruleno==134); /* (135) go ::= */ yytestcase(yyruleno==135); /* (136) even ::= UNTIL EVEN WITH */ yytestcase(yyruleno==136); /* (137) even ::= EVEN WITH */ yytestcase(yyruleno==137); /* (138) dashproperty ::= DOTTED */ yytestcase(yyruleno==138); /* (139) dashproperty ::= DASHED */ yytestcase(yyruleno==139); /* (140) colorproperty ::= FILL */ yytestcase(yyruleno==140); /* (141) colorproperty ::= COLOR */ yytestcase(yyruleno==141); /* (142) position ::= place */ yytestcase(yyruleno==142); /* (143) between ::= WAY BETWEEN */ yytestcase(yyruleno==143); /* (144) between ::= BETWEEN */ yytestcase(yyruleno==144); /* (145) between ::= OF THE WAY BETWEEN */ yytestcase(yyruleno==145); /* (146) place ::= place2 */ yytestcase(yyruleno==146); /* (147) edge ::= CENTER */ yytestcase(yyruleno==147); /* (148) edge ::= EDGEPT */ yytestcase(yyruleno==148); /* (149) edge ::= TOP */ yytestcase(yyruleno==149); /* (150) edge ::= BOTTOM */ yytestcase(yyruleno==150); /* (151) edge ::= START */ yytestcase(yyruleno==151); /* (152) edge ::= END */ yytestcase(yyruleno==152); /* (153) edge ::= RIGHT */ yytestcase(yyruleno==153); /* (154) edge ::= LEFT */ yytestcase(yyruleno==154); /* (155) object ::= objectname */ yytestcase(yyruleno==155); break; /********** End reduce actions ************************************************/ }; assert( yyruleno<sizeof(yyRuleInfoLhs)/sizeof(yyRuleInfoLhs[0]) ); yygoto = yyRuleInfoLhs[yyruleno]; yysize = yyRuleInfoNRhs[yyruleno]; yyact = yy_find_reduce_action(yymsp[yysize].stateno,(YYCODETYPE)yygoto); |
︙ | ︙ | |||
3113 3114 3115 3116 3117 3118 3119 | if( TOKEN.z && TOKEN.z[0] ){ pik_error(p, &TOKEN, "syntax error"); }else{ pik_error(p, 0, "syntax error"); } UNUSED_PARAMETER(yymajor); | | | 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 | if( TOKEN.z && TOKEN.z[0] ){ pik_error(p, &TOKEN, "syntax error"); }else{ pik_error(p, 0, "syntax error"); } UNUSED_PARAMETER(yymajor); #line 3164 "pikchr.c" /************ End %syntax_error code ******************************************/ pik_parserARG_STORE /* Suppress warning about unused %extra_argument variable */ pik_parserCTX_STORE } /* ** The following is executed when the parser accepts |
︙ | ︙ | |||
3346 3347 3348 3349 3350 3351 3352 | assert( iToken<(int)(sizeof(yyFallback)/sizeof(yyFallback[0])) ); return yyFallback[iToken]; #else (void)iToken; return 0; #endif } | | | 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 | assert( iToken<(int)(sizeof(yyFallback)/sizeof(yyFallback[0])) ); return yyFallback[iToken]; #else (void)iToken; return 0; #endif } #line 765 "pikchr.y" /* Chart of the 148 official CSS color names with their ** corresponding RGB values thru Color Module Level 4: ** https://developer.mozilla.org/en-US/docs/Web/CSS/color_value ** |
︙ | ︙ | |||
7093 7094 7095 7096 7097 7098 7099 7100 7101 7102 7103 7104 7105 7106 | { "sw", 2, T_EDGEPT, 0, CP_SW }, { "t", 1, T_TOP, 0, CP_N }, { "the", 3, T_THE, 0, 0 }, { "then", 4, T_THEN, 0, 0 }, { "thick", 5, T_THICK, 0, 0 }, { "thickness", 9, T_THICKNESS, 0, 0 }, { "thin", 4, T_THIN, 0, 0 }, { "to", 2, T_TO, 0, 0 }, { "top", 3, T_TOP, 0, CP_N }, { "until", 5, T_UNTIL, 0, 0 }, { "up", 2, T_UP, DIR_UP, 0 }, { "vertex", 6, T_VERTEX, 0, 0 }, { "w", 1, T_EDGEPT, 0, CP_W }, { "way", 3, T_WAY, 0, 0 }, | > | 7112 7113 7114 7115 7116 7117 7118 7119 7120 7121 7122 7123 7124 7125 7126 | { "sw", 2, T_EDGEPT, 0, CP_SW }, { "t", 1, T_TOP, 0, CP_N }, { "the", 3, T_THE, 0, 0 }, { "then", 4, T_THEN, 0, 0 }, { "thick", 5, T_THICK, 0, 0 }, { "thickness", 9, T_THICKNESS, 0, 0 }, { "thin", 4, T_THIN, 0, 0 }, { "this", 4, T_THIS, 0, 0 }, { "to", 2, T_TO, 0, 0 }, { "top", 3, T_TOP, 0, CP_N }, { "until", 5, T_UNTIL, 0, 0 }, { "up", 2, T_UP, DIR_UP, 0 }, { "vertex", 6, T_VERTEX, 0, 0 }, { "w", 1, T_EDGEPT, 0, CP_W }, { "way", 3, T_WAY, 0, 0 }, |
︙ | ︙ | |||
7938 7939 7940 7941 7942 7943 7944 | return TCL_OK; } #endif /* PIKCHR_TCL */ | | | 7958 7959 7960 7961 7962 7963 7964 7965 | return TCL_OK; } #endif /* PIKCHR_TCL */ #line 7990 "pikchr.c" |
Changes to pikchr.y.
︙ | ︙ | |||
722 723 724 725 726 727 728 729 730 731 732 733 734 735 | edge(A) ::= RIGHT(A). edge(A) ::= LEFT(A). object(A) ::= objectname(A). object(A) ::= nth(N). {A = pik_find_nth(p,0,&N);} object(A) ::= nth(N) OF|IN object(B). {A = pik_find_nth(p,B,&N);} objectname(A) ::= PLACENAME(N). {A = pik_find_byname(p,0,&N);} objectname(A) ::= objectname(B) DOT_U PLACENAME(N). {A = pik_find_byname(p,B,&N);} nth(A) ::= NTH(N) CLASSNAME(ID). {A=ID; A.eCode = pik_nth_value(p,&N); } nth(A) ::= NTH(N) LAST CLASSNAME(ID). {A=ID; A.eCode = -pik_nth_value(p,&N); } nth(A) ::= LAST CLASSNAME(ID). {A=ID; A.eCode = -1;} | > | 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 | edge(A) ::= RIGHT(A). edge(A) ::= LEFT(A). object(A) ::= objectname(A). object(A) ::= nth(N). {A = pik_find_nth(p,0,&N);} object(A) ::= nth(N) OF|IN object(B). {A = pik_find_nth(p,B,&N);} objectname(A) ::= THIS. {A = p->cur;} objectname(A) ::= PLACENAME(N). {A = pik_find_byname(p,0,&N);} objectname(A) ::= objectname(B) DOT_U PLACENAME(N). {A = pik_find_byname(p,B,&N);} nth(A) ::= NTH(N) CLASSNAME(ID). {A=ID; A.eCode = pik_nth_value(p,&N); } nth(A) ::= NTH(N) LAST CLASSNAME(ID). {A=ID; A.eCode = -pik_nth_value(p,&N); } nth(A) ::= LAST CLASSNAME(ID). {A=ID; A.eCode = -1;} |
︙ | ︙ | |||
4503 4504 4505 4506 4507 4508 4509 4510 4511 4512 4513 4514 4515 4516 | { "sw", 2, T_EDGEPT, 0, CP_SW }, { "t", 1, T_TOP, 0, CP_N }, { "the", 3, T_THE, 0, 0 }, { "then", 4, T_THEN, 0, 0 }, { "thick", 5, T_THICK, 0, 0 }, { "thickness", 9, T_THICKNESS, 0, 0 }, { "thin", 4, T_THIN, 0, 0 }, { "to", 2, T_TO, 0, 0 }, { "top", 3, T_TOP, 0, CP_N }, { "until", 5, T_UNTIL, 0, 0 }, { "up", 2, T_UP, DIR_UP, 0 }, { "vertex", 6, T_VERTEX, 0, 0 }, { "w", 1, T_EDGEPT, 0, CP_W }, { "way", 3, T_WAY, 0, 0 }, | > | 4504 4505 4506 4507 4508 4509 4510 4511 4512 4513 4514 4515 4516 4517 4518 | { "sw", 2, T_EDGEPT, 0, CP_SW }, { "t", 1, T_TOP, 0, CP_N }, { "the", 3, T_THE, 0, 0 }, { "then", 4, T_THEN, 0, 0 }, { "thick", 5, T_THICK, 0, 0 }, { "thickness", 9, T_THICKNESS, 0, 0 }, { "thin", 4, T_THIN, 0, 0 }, { "this", 4, T_THIS, 0, 0 }, { "to", 2, T_TO, 0, 0 }, { "top", 3, T_TOP, 0, CP_N }, { "until", 5, T_UNTIL, 0, 0 }, { "up", 2, T_UP, DIR_UP, 0 }, { "vertex", 6, T_VERTEX, 0, 0 }, { "w", 1, T_EDGEPT, 0, CP_W }, { "way", 3, T_WAY, 0, 0 }, |
︙ | ︙ |
Added tests/test74.pikchr.
> > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 | /* Use of the "this" objectname */ A: box "a" fit ht this.wid B: box "bbbb" fit ht this.wid with .sw at previous.se C: box "ccccccccc" fit ht this.wid with .sw at previous.se D: box "a" fit ht this.wid rad 0.25*this.wid \ with .n at 1cm below A.s E: box "bbbb" fit ht this.wid rad 0.25*this.wid \ with .n at (previous.e.x+0.5*this.width, previous.n.y) F: box "ccccccccc" fit ht this.wid rad 0.25*this.wid \ with .n at (previous.e.x+0.5*this.wid, previous.n.y) |