Fossil SCM

Merge the latest trunk enhancements into the comment-markdown-links branch.

drh 2025-03-07 23:19 comment-markdown-links merge
Commit 459499b0eac09ff1f718ee0cbaa749d93c59ef9ef527c388d88ed1bd569c4be1
--- extsrc/pikchr-worker.js
+++ extsrc/pikchr-worker.js
@@ -206,16 +206,17 @@
206206
data:{step: ++f.last.step, text: text||null}
207207
});
208208
}
209209
};
210210
211
- importScripts('pikchr.js');
211
+ importScripts('pikchr-v7583078860.js');
212212
/**
213213
initPikchrModule() is installed via pikchr.js due to
214214
building with:
215215
216216
emcc ... -sMODULARIZE=1 -sEXPORT_NAME=initPikchrModule
217217
*/
218218
initPikchrModule(pikchrModule).then(function(thisModule){
219
- wMsg('pikchr-ready');
219
+ //globalThis.M = pikchrModule; console.warn("pikchrModule=globalThis.M=",globalThis.M);
220
+ wMsg('pikchr-ready', pikchrModule.ccall('pikchr_version','string'));
220221
});
221222
})();
222223
--- extsrc/pikchr-worker.js
+++ extsrc/pikchr-worker.js
@@ -206,16 +206,17 @@
206 data:{step: ++f.last.step, text: text||null}
207 });
208 }
209 };
210
211 importScripts('pikchr.js');
212 /**
213 initPikchrModule() is installed via pikchr.js due to
214 building with:
215
216 emcc ... -sMODULARIZE=1 -sEXPORT_NAME=initPikchrModule
217 */
218 initPikchrModule(pikchrModule).then(function(thisModule){
219 wMsg('pikchr-ready');
 
220 });
221 })();
222
--- extsrc/pikchr-worker.js
+++ extsrc/pikchr-worker.js
@@ -206,16 +206,17 @@
206 data:{step: ++f.last.step, text: text||null}
207 });
208 }
209 };
210
211 importScripts('pikchr-v7583078860.js');
212 /**
213 initPikchrModule() is installed via pikchr.js due to
214 building with:
215
216 emcc ... -sMODULARIZE=1 -sEXPORT_NAME=initPikchrModule
217 */
218 initPikchrModule(pikchrModule).then(function(thisModule){
219 //globalThis.M = pikchrModule; console.warn("pikchrModule=globalThis.M=",globalThis.M);
220 wMsg('pikchr-ready', pikchrModule.ccall('pikchr_version','string'));
221 });
222 })();
223
+1088 -1026
--- extsrc/pikchr.c
+++ extsrc/pikchr.c
@@ -1,8 +1,47 @@
11
/* This file is automatically generated by Lemon from input grammar
22
** source file "pikchr.y".
33
*/
4
+/*
5
+** 2000-05-29
6
+**
7
+** The author disclaims copyright to this source code. In place of
8
+** a legal notice, here is a blessing:
9
+**
10
+** May you do good and not evil.
11
+** May you find forgiveness for yourself and forgive others.
12
+** May you share freely, never taking more than you give.
13
+**
14
+*************************************************************************
15
+** Driver template for the LEMON parser generator.
16
+**
17
+** The "lemon" program processes an LALR(1) input grammar file, then uses
18
+** this template to construct a parser. The "lemon" program inserts text
19
+** at each "%%" line. Also, any "P-a-r-s-e" identifier prefix (without the
20
+** interstitial "-" characters) contained in this template is changed into
21
+** the value of the %name directive from the grammar. Otherwise, the content
22
+** of this template is copied straight through into the generate parser
23
+** source file.
24
+**
25
+** The following is the concatenation of all %include directives from the
26
+** input grammar file:
27
+*/
28
+/************ Begin %include sections from the grammar ************************/
29
+#line 1 "VERSION.h"
30
+#define MANIFEST_UUID "052f07296e76ab2312caf2a4bf6237e574b3e533c7a36ee8f34db833baa3efb4"
31
+#define MANIFEST_VERSION "[052f07296e]"
32
+#define MANIFEST_DATE "2025-03-05 10:54:16"
33
+#define MANIFEST_YEAR "2025"
34
+#define MANIFEST_ISODATE "20250305105416"
35
+#define MANIFEST_NUMERIC_DATE 20250305
36
+#define MANIFEST_NUMERIC_TIME 105416
37
+#define RELEASE_VERSION "1.0"
38
+#define RELEASE_VERSION_NUMBER 10000
39
+#define RELEASE_RESOURCE_VERSION 1,0,0,0
40
+#define COMPILER "gcc-13.3.0"
41
+#line 2 "pikchr.y"
42
+
443
/*
544
** Zero-Clause BSD license:
645
**
746
** Copyright (C) 2020-09-01 by D. Richard Hipp <[email protected]>
847
**
@@ -504,11 +543,11 @@
504543
static PObj *pik_position_assert(Pik*,PPoint*,PToken*,PPoint*);
505544
static PNum pik_dist(PPoint*,PPoint*);
506545
static void pik_add_macro(Pik*,PToken *pId,PToken *pCode);
507546
508547
509
-#line 535 "pikchr.c"
548
+#line 549 "pikchr.c"
510549
/**************** End of %include directives **********************************/
511550
/* These constants specify the various numeric values for terminal symbols.
512551
***************** Begin token definitions *************************************/
513552
#ifndef T_ID
514553
#define T_ID 1
@@ -534,84 +573,85 @@
534573
#define T_COLOR 21
535574
#define T_THICKNESS 22
536575
#define T_PRINT 23
537576
#define T_STRING 24
538577
#define T_COMMA 25
539
-#define T_CLASSNAME 26
540
-#define T_LB 27
541
-#define T_RB 28
542
-#define T_UP 29
543
-#define T_DOWN 30
544
-#define T_LEFT 31
545
-#define T_RIGHT 32
546
-#define T_CLOSE 33
547
-#define T_CHOP 34
548
-#define T_FROM 35
549
-#define T_TO 36
550
-#define T_THEN 37
551
-#define T_HEADING 38
552
-#define T_GO 39
553
-#define T_AT 40
554
-#define T_WITH 41
555
-#define T_SAME 42
556
-#define T_AS 43
557
-#define T_FIT 44
558
-#define T_BEHIND 45
559
-#define T_UNTIL 46
560
-#define T_EVEN 47
561
-#define T_DOT_E 48
562
-#define T_HEIGHT 49
563
-#define T_WIDTH 50
564
-#define T_RADIUS 51
565
-#define T_DIAMETER 52
566
-#define T_DOTTED 53
567
-#define T_DASHED 54
568
-#define T_CW 55
569
-#define T_CCW 56
570
-#define T_LARROW 57
571
-#define T_RARROW 58
572
-#define T_LRARROW 59
573
-#define T_INVIS 60
574
-#define T_THICK 61
575
-#define T_THIN 62
576
-#define T_SOLID 63
577
-#define T_CENTER 64
578
-#define T_LJUST 65
579
-#define T_RJUST 66
580
-#define T_ABOVE 67
581
-#define T_BELOW 68
582
-#define T_ITALIC 69
583
-#define T_BOLD 70
584
-#define T_MONO 71
585
-#define T_ALIGNED 72
586
-#define T_BIG 73
587
-#define T_SMALL 74
588
-#define T_AND 75
589
-#define T_LT 76
590
-#define T_GT 77
591
-#define T_ON 78
592
-#define T_WAY 79
593
-#define T_BETWEEN 80
594
-#define T_THE 81
595
-#define T_NTH 82
596
-#define T_VERTEX 83
597
-#define T_TOP 84
598
-#define T_BOTTOM 85
599
-#define T_START 86
600
-#define T_END 87
601
-#define T_IN 88
602
-#define T_THIS 89
603
-#define T_DOT_U 90
604
-#define T_LAST 91
605
-#define T_NUMBER 92
606
-#define T_FUNC1 93
607
-#define T_FUNC2 94
608
-#define T_DIST 95
609
-#define T_DOT_XY 96
610
-#define T_X 97
611
-#define T_Y 98
612
-#define T_DOT_L 99
578
+#define T_ISODATE 26
579
+#define T_CLASSNAME 27
580
+#define T_LB 28
581
+#define T_RB 29
582
+#define T_UP 30
583
+#define T_DOWN 31
584
+#define T_LEFT 32
585
+#define T_RIGHT 33
586
+#define T_CLOSE 34
587
+#define T_CHOP 35
588
+#define T_FROM 36
589
+#define T_TO 37
590
+#define T_THEN 38
591
+#define T_HEADING 39
592
+#define T_GO 40
593
+#define T_AT 41
594
+#define T_WITH 42
595
+#define T_SAME 43
596
+#define T_AS 44
597
+#define T_FIT 45
598
+#define T_BEHIND 46
599
+#define T_UNTIL 47
600
+#define T_EVEN 48
601
+#define T_DOT_E 49
602
+#define T_HEIGHT 50
603
+#define T_WIDTH 51
604
+#define T_RADIUS 52
605
+#define T_DIAMETER 53
606
+#define T_DOTTED 54
607
+#define T_DASHED 55
608
+#define T_CW 56
609
+#define T_CCW 57
610
+#define T_LARROW 58
611
+#define T_RARROW 59
612
+#define T_LRARROW 60
613
+#define T_INVIS 61
614
+#define T_THICK 62
615
+#define T_THIN 63
616
+#define T_SOLID 64
617
+#define T_CENTER 65
618
+#define T_LJUST 66
619
+#define T_RJUST 67
620
+#define T_ABOVE 68
621
+#define T_BELOW 69
622
+#define T_ITALIC 70
623
+#define T_BOLD 71
624
+#define T_MONO 72
625
+#define T_ALIGNED 73
626
+#define T_BIG 74
627
+#define T_SMALL 75
628
+#define T_AND 76
629
+#define T_LT 77
630
+#define T_GT 78
631
+#define T_ON 79
632
+#define T_WAY 80
633
+#define T_BETWEEN 81
634
+#define T_THE 82
635
+#define T_NTH 83
636
+#define T_VERTEX 84
637
+#define T_TOP 85
638
+#define T_BOTTOM 86
639
+#define T_START 87
640
+#define T_END 88
641
+#define T_IN 89
642
+#define T_THIS 90
643
+#define T_DOT_U 91
644
+#define T_LAST 92
645
+#define T_NUMBER 93
646
+#define T_FUNC1 94
647
+#define T_FUNC2 95
648
+#define T_DIST 96
649
+#define T_DOT_XY 97
650
+#define T_X 98
651
+#define T_Y 99
652
+#define T_DOT_L 100
613653
#endif
614654
/**************** End token definitions ***************************************/
615655
616656
/* The next sections is a series of control #defines.
617657
** various aspects of the generated parser.
@@ -672,22 +712,22 @@
672712
#ifndef INTERFACE
673713
# define INTERFACE 1
674714
#endif
675715
/************* Begin control #defines *****************************************/
676716
#define YYCODETYPE unsigned char
677
-#define YYNOCODE 136
717
+#define YYNOCODE 138
678718
#define YYACTIONTYPE unsigned short int
679719
#define pik_parserTOKENTYPE PToken
680720
typedef union {
681721
int yyinit;
682722
pik_parserTOKENTYPE yy0;
683
- PNum yy21;
684
- PPoint yy63;
685
- PRel yy72;
686
- PObj* yy162;
687
- short int yy188;
688
- PList* yy235;
723
+ PList* yy23;
724
+ PRel yy28;
725
+ PObj* yy54;
726
+ PNum yy129;
727
+ PPoint yy187;
728
+ short int yy272;
689729
} YYMINORTYPE;
690730
#ifndef YYSTACKDEPTH
691731
#define YYSTACKDEPTH 100
692732
#endif
693733
#define pik_parserARG_SDECL
@@ -705,21 +745,21 @@
705745
#define pik_parserCTX_STORE yypParser->p=p;
706746
#define YYFALLBACK 1
707747
#define YYNSTATE 164
708748
#define YYNRULE 156
709749
#define YYNRULE_WITH_ACTION 116
710
-#define YYNTOKEN 100
750
+#define YYNTOKEN 101
711751
#define YY_MAX_SHIFT 163
712752
#define YY_MIN_SHIFTREDUCE 287
713753
#define YY_MAX_SHIFTREDUCE 442
714754
#define YY_ERROR_ACTION 443
715755
#define YY_ACCEPT_ACTION 444
716756
#define YY_NO_ACTION 445
717757
#define YY_MIN_REDUCE 446
718758
#define YY_MAX_REDUCE 601
719
-#define YY_MIN_DSTRCTR 100
720
-#define YY_MAX_DSTRCTR 103
759
+#define YY_MIN_DSTRCTR 101
760
+#define YY_MAX_DSTRCTR 104
721761
/************* End control #defines *******************************************/
722762
#define YY_NLOOKAHEAD ((int)(sizeof(yy_lookahead)/sizeof(yy_lookahead[0])))
723763
724764
/* Define the yytestcase() macro to be a no-op if is not already defined
725765
** otherwise.
@@ -798,324 +838,322 @@
798838
** yy_reduce_ofst[] For each state, the offset into yy_action for
799839
** shifting non-terminals after a reduce.
800840
** yy_default[] Default action for each state.
801841
**
802842
*********** Begin parsing tables **********************************************/
803
-#define YY_ACTTAB_COUNT (1313)
843
+#define YY_ACTTAB_COUNT (1305)
804844
static const YYACTIONTYPE yy_action[] = {
805845
/* 0 */ 575, 495, 161, 119, 25, 452, 29, 74, 129, 148,
806
- /* 10 */ 575, 492, 161, 119, 453, 113, 120, 161, 119, 530,
807
- /* 20 */ 427, 428, 339, 559, 81, 30, 560, 561, 575, 64,
808
- /* 30 */ 63, 62, 61, 322, 323, 9, 8, 33, 149, 32,
809
- /* 40 */ 7, 71, 127, 38, 335, 66, 48, 37, 28, 339,
810
- /* 50 */ 339, 339, 339, 425, 426, 340, 341, 342, 343, 344,
811
- /* 60 */ 345, 346, 347, 348, 474, 528, 161, 119, 577, 77,
812
- /* 70 */ 577, 73, 306, 148, 474, 533, 161, 119, 112, 113,
813
- /* 80 */ 120, 161, 119, 128, 427, 428, 339, 31, 81, 531,
814
- /* 90 */ 161, 119, 474, 35, 330, 378, 158, 322, 323, 9,
815
- /* 100 */ 8, 33, 149, 32, 7, 71, 127, 328, 335, 66,
816
- /* 110 */ 579, 378, 158, 339, 339, 339, 339, 425, 426, 340,
817
- /* 120 */ 341, 342, 343, 344, 345, 346, 347, 348, 394, 435,
818
- /* 130 */ 46, 59, 60, 64, 63, 62, 61, 357, 36, 376,
819
- /* 140 */ 54, 51, 2, 47, 403, 13, 297, 411, 412, 413,
820
- /* 150 */ 414, 80, 162, 308, 79, 133, 310, 126, 441, 440,
821
- /* 160 */ 118, 123, 83, 404, 405, 406, 408, 80, 84, 308,
822
- /* 170 */ 79, 299, 411, 412, 413, 414, 118, 69, 350, 350,
823
- /* 180 */ 350, 350, 350, 350, 350, 350, 350, 350, 350, 62,
824
- /* 190 */ 61, 434, 64, 63, 62, 61, 313, 398, 399, 427,
825
- /* 200 */ 428, 339, 380, 157, 64, 63, 62, 61, 122, 106,
826
- /* 210 */ 535, 436, 437, 438, 439, 298, 375, 391, 117, 393,
827
- /* 220 */ 155, 154, 153, 394, 435, 49, 59, 60, 339, 339,
828
- /* 230 */ 339, 339, 425, 426, 376, 3, 4, 2, 64, 63,
829
- /* 240 */ 62, 61, 156, 156, 156, 394, 379, 159, 59, 60,
830
- /* 250 */ 76, 67, 535, 441, 440, 5, 102, 6, 535, 42,
831
- /* 260 */ 131, 535, 69, 107, 301, 302, 303, 394, 305, 15,
832
- /* 270 */ 59, 60, 120, 161, 119, 446, 463, 424, 376, 423,
833
- /* 280 */ 1, 42, 397, 78, 78, 36, 434, 11, 394, 435,
834
- /* 290 */ 356, 59, 60, 12, 152, 139, 432, 14, 16, 376,
835
- /* 300 */ 18, 65, 2, 138, 106, 430, 436, 437, 438, 439,
836
- /* 310 */ 44, 375, 19, 117, 393, 155, 154, 153, 441, 440,
837
- /* 320 */ 142, 140, 64, 63, 62, 61, 106, 20, 68, 376,
838
- /* 330 */ 359, 107, 23, 375, 45, 117, 393, 155, 154, 153,
839
- /* 340 */ 120, 161, 119, 55, 463, 114, 26, 57, 106, 147,
840
- /* 350 */ 146, 434, 569, 58, 392, 375, 43, 117, 393, 155,
841
- /* 360 */ 154, 153, 152, 384, 64, 63, 62, 61, 382, 106,
842
- /* 370 */ 383, 436, 437, 438, 439, 377, 375, 70, 117, 393,
843
- /* 380 */ 155, 154, 153, 160, 39, 22, 21, 445, 142, 140,
844
- /* 390 */ 64, 63, 62, 61, 24, 17, 145, 141, 431, 108,
845
- /* 400 */ 445, 445, 445, 391, 445, 445, 375, 445, 117, 445,
846
- /* 410 */ 445, 55, 74, 445, 148, 445, 445, 147, 146, 124,
847
- /* 420 */ 113, 120, 161, 119, 43, 445, 445, 142, 140, 64,
848
- /* 430 */ 63, 62, 61, 445, 394, 445, 445, 59, 60, 64,
849
- /* 440 */ 63, 62, 61, 149, 445, 376, 445, 445, 42, 445,
850
- /* 450 */ 55, 445, 391, 22, 21, 445, 147, 146, 445, 445,
851
- /* 460 */ 52, 445, 24, 43, 145, 141, 431, 394, 445, 445,
852
- /* 470 */ 59, 60, 64, 63, 62, 61, 445, 445, 376, 132,
853
- /* 480 */ 130, 42, 445, 445, 445, 355, 156, 156, 156, 445,
854
- /* 490 */ 445, 445, 22, 21, 445, 394, 473, 445, 59, 60,
855
- /* 500 */ 445, 24, 445, 145, 141, 431, 376, 445, 107, 42,
856
- /* 510 */ 64, 63, 62, 61, 445, 106, 445, 120, 161, 119,
857
- /* 520 */ 445, 478, 375, 354, 117, 393, 155, 154, 153, 445,
858
- /* 530 */ 394, 143, 473, 59, 60, 64, 63, 62, 61, 152,
859
- /* 540 */ 445, 376, 445, 445, 42, 445, 445, 445, 106, 64,
860
- /* 550 */ 63, 62, 61, 445, 445, 375, 50, 117, 393, 155,
861
- /* 560 */ 154, 153, 445, 394, 144, 445, 59, 60, 445, 445,
862
- /* 570 */ 53, 72, 445, 148, 376, 445, 106, 42, 125, 113,
863
- /* 580 */ 120, 161, 119, 375, 445, 117, 393, 155, 154, 153,
864
- /* 590 */ 394, 445, 445, 59, 60, 445, 445, 445, 445, 445,
865
- /* 600 */ 445, 102, 149, 445, 42, 445, 74, 445, 148, 445,
866
- /* 610 */ 445, 106, 445, 497, 113, 120, 161, 119, 375, 445,
867
- /* 620 */ 117, 393, 155, 154, 153, 394, 445, 445, 59, 60,
868
- /* 630 */ 445, 445, 88, 445, 445, 445, 376, 149, 445, 40,
869
- /* 640 */ 445, 120, 161, 119, 106, 445, 445, 435, 110, 110,
870
- /* 650 */ 445, 375, 445, 117, 393, 155, 154, 153, 394, 445,
871
- /* 660 */ 445, 59, 60, 152, 85, 445, 445, 445, 445, 376,
872
- /* 670 */ 445, 106, 41, 120, 161, 119, 441, 440, 375, 445,
873
- /* 680 */ 117, 393, 155, 154, 153, 448, 454, 29, 445, 445,
874
- /* 690 */ 74, 450, 148, 75, 88, 152, 445, 496, 113, 120,
875
- /* 700 */ 161, 119, 163, 120, 161, 119, 106, 27, 445, 434,
876
- /* 710 */ 111, 111, 445, 375, 445, 117, 393, 155, 154, 153,
877
- /* 720 */ 445, 149, 445, 445, 445, 152, 74, 445, 148, 436,
878
- /* 730 */ 437, 438, 439, 490, 113, 120, 161, 119, 445, 106,
879
- /* 740 */ 121, 447, 454, 29, 445, 445, 375, 450, 117, 393,
880
- /* 750 */ 155, 154, 153, 445, 445, 445, 445, 149, 163, 74,
881
- /* 760 */ 445, 148, 444, 27, 445, 445, 484, 113, 120, 161,
882
- /* 770 */ 119, 445, 445, 445, 74, 445, 148, 445, 445, 445,
883
- /* 780 */ 445, 483, 113, 120, 161, 119, 74, 445, 148, 86,
884
- /* 790 */ 149, 445, 445, 480, 113, 120, 161, 119, 120, 161,
885
- /* 800 */ 119, 445, 74, 445, 148, 149, 445, 445, 445, 134,
886
- /* 810 */ 113, 120, 161, 119, 74, 445, 148, 149, 445, 445,
887
- /* 820 */ 152, 517, 113, 120, 161, 119, 88, 64, 63, 62,
888
- /* 830 */ 61, 445, 445, 149, 445, 120, 161, 119, 445, 74,
889
- /* 840 */ 396, 148, 475, 445, 445, 149, 137, 113, 120, 161,
890
- /* 850 */ 119, 74, 445, 148, 445, 445, 445, 152, 525, 113,
891
- /* 860 */ 120, 161, 119, 445, 74, 445, 148, 445, 445, 445,
892
- /* 870 */ 149, 527, 113, 120, 161, 119, 445, 445, 445, 74,
893
- /* 880 */ 445, 148, 149, 445, 445, 445, 524, 113, 120, 161,
894
- /* 890 */ 119, 74, 445, 148, 98, 149, 445, 445, 526, 113,
895
- /* 900 */ 120, 161, 119, 120, 161, 119, 445, 74, 445, 148,
896
- /* 910 */ 149, 445, 445, 445, 523, 113, 120, 161, 119, 74,
897
- /* 920 */ 445, 148, 149, 445, 445, 152, 522, 113, 120, 161,
898
- /* 930 */ 119, 89, 64, 63, 62, 61, 445, 445, 149, 445,
899
- /* 940 */ 120, 161, 119, 445, 74, 395, 148, 445, 445, 445,
900
- /* 950 */ 149, 521, 113, 120, 161, 119, 74, 445, 148, 445,
901
- /* 960 */ 445, 445, 152, 520, 113, 120, 161, 119, 445, 74,
902
- /* 970 */ 445, 148, 445, 445, 445, 149, 519, 113, 120, 161,
903
- /* 980 */ 119, 445, 445, 445, 74, 445, 148, 149, 445, 445,
904
- /* 990 */ 445, 150, 113, 120, 161, 119, 74, 445, 148, 90,
905
- /* 1000 */ 149, 445, 445, 151, 113, 120, 161, 119, 120, 161,
906
- /* 1010 */ 119, 445, 74, 445, 148, 149, 445, 435, 445, 136,
907
- /* 1020 */ 113, 120, 161, 119, 74, 445, 148, 149, 445, 445,
908
- /* 1030 */ 152, 135, 113, 120, 161, 119, 64, 63, 62, 61,
909
- /* 1040 */ 445, 445, 445, 149, 445, 445, 441, 440, 445, 88,
910
- /* 1050 */ 445, 445, 445, 445, 445, 149, 445, 56, 120, 161,
911
- /* 1060 */ 119, 88, 445, 445, 10, 479, 479, 445, 445, 445,
912
- /* 1070 */ 120, 161, 119, 445, 445, 445, 445, 82, 445, 434,
913
- /* 1080 */ 152, 445, 445, 445, 466, 445, 34, 109, 447, 454,
914
- /* 1090 */ 29, 445, 152, 445, 450, 445, 445, 445, 107, 436,
915
- /* 1100 */ 437, 438, 439, 87, 445, 163, 445, 120, 161, 119,
916
- /* 1110 */ 27, 451, 120, 161, 119, 99, 445, 64, 63, 62,
917
- /* 1120 */ 61, 445, 100, 445, 120, 161, 119, 101, 445, 152,
918
- /* 1130 */ 391, 120, 161, 119, 152, 445, 120, 161, 119, 91,
919
- /* 1140 */ 445, 445, 445, 445, 445, 445, 152, 445, 120, 161,
920
- /* 1150 */ 119, 103, 445, 152, 92, 445, 445, 445, 152, 445,
921
- /* 1160 */ 120, 161, 119, 120, 161, 119, 93, 445, 445, 104,
922
- /* 1170 */ 152, 445, 445, 445, 445, 120, 161, 119, 120, 161,
923
- /* 1180 */ 119, 445, 152, 445, 94, 152, 445, 445, 445, 445,
924
- /* 1190 */ 445, 445, 105, 120, 161, 119, 445, 152, 445, 95,
925
- /* 1200 */ 152, 120, 161, 119, 445, 445, 445, 96, 120, 161,
926
- /* 1210 */ 119, 445, 445, 445, 445, 152, 120, 161, 119, 445,
927
- /* 1220 */ 445, 445, 445, 152, 445, 445, 445, 445, 445, 445,
928
- /* 1230 */ 152, 97, 445, 445, 549, 445, 445, 548, 152, 445,
929
- /* 1240 */ 120, 161, 119, 120, 161, 119, 120, 161, 119, 445,
930
- /* 1250 */ 445, 445, 445, 445, 445, 445, 445, 445, 445, 445,
931
- /* 1260 */ 445, 445, 152, 547, 445, 152, 546, 445, 152, 115,
932
- /* 1270 */ 445, 445, 120, 161, 119, 120, 161, 119, 120, 161,
933
- /* 1280 */ 119, 116, 445, 445, 445, 445, 445, 445, 445, 445,
934
- /* 1290 */ 120, 161, 119, 445, 152, 445, 445, 152, 445, 445,
935
- /* 1300 */ 152, 445, 445, 445, 445, 445, 445, 445, 445, 445,
936
- /* 1310 */ 445, 445, 152,
846
+ /* 10 */ 575, 64, 63, 62, 61, 453, 113, 120, 161, 119,
847
+ /* 20 */ 427, 428, 339, 357, 81, 121, 447, 454, 29, 575,
848
+ /* 30 */ 530, 13, 50, 450, 322, 323, 9, 8, 33, 149,
849
+ /* 40 */ 32, 7, 71, 127, 163, 335, 66, 28, 444, 27,
850
+ /* 50 */ 339, 339, 339, 339, 425, 426, 340, 341, 342, 343,
851
+ /* 60 */ 344, 345, 346, 347, 348, 474, 64, 63, 62, 61,
852
+ /* 70 */ 54, 51, 73, 306, 148, 474, 492, 161, 119, 297,
853
+ /* 80 */ 112, 113, 120, 161, 119, 427, 428, 339, 30, 81,
854
+ /* 90 */ 109, 447, 454, 29, 474, 528, 161, 119, 450, 322,
855
+ /* 100 */ 323, 9, 8, 33, 149, 32, 7, 71, 127, 163,
856
+ /* 110 */ 335, 66, 535, 36, 27, 339, 339, 339, 339, 425,
857
+ /* 120 */ 426, 340, 341, 342, 343, 344, 345, 346, 347, 348,
858
+ /* 130 */ 394, 435, 310, 59, 60, 64, 63, 62, 61, 313,
859
+ /* 140 */ 74, 376, 148, 69, 2, 533, 161, 119, 124, 113,
860
+ /* 150 */ 120, 161, 119, 80, 535, 31, 308, 79, 83, 107,
861
+ /* 160 */ 535, 441, 440, 535, 394, 435, 299, 59, 60, 120,
862
+ /* 170 */ 161, 119, 149, 463, 376, 376, 330, 84, 2, 122,
863
+ /* 180 */ 78, 78, 38, 156, 156, 156, 48, 37, 559, 328,
864
+ /* 190 */ 128, 152, 560, 561, 434, 441, 440, 350, 350, 350,
865
+ /* 200 */ 350, 350, 350, 350, 350, 350, 350, 350, 577, 77,
866
+ /* 210 */ 577, 35, 106, 46, 436, 437, 438, 439, 579, 375,
867
+ /* 220 */ 298, 117, 393, 155, 154, 153, 47, 4, 434, 69,
868
+ /* 230 */ 394, 435, 3, 59, 60, 411, 412, 413, 414, 398,
869
+ /* 240 */ 399, 376, 62, 61, 2, 108, 106, 5, 436, 437,
870
+ /* 250 */ 438, 439, 375, 375, 117, 117, 393, 155, 154, 153,
871
+ /* 260 */ 76, 441, 440, 67, 6, 142, 140, 64, 63, 62,
872
+ /* 270 */ 61, 380, 157, 424, 427, 428, 339, 379, 159, 45,
873
+ /* 280 */ 423, 72, 131, 148, 531, 161, 119, 1, 55, 125,
874
+ /* 290 */ 113, 120, 161, 119, 434, 147, 146, 64, 63, 62,
875
+ /* 300 */ 61, 397, 43, 11, 339, 339, 339, 339, 425, 426,
876
+ /* 310 */ 355, 65, 106, 149, 436, 437, 438, 439, 74, 375,
877
+ /* 320 */ 148, 117, 393, 155, 154, 153, 497, 113, 120, 161,
878
+ /* 330 */ 119, 22, 21, 12, 142, 140, 64, 63, 62, 61,
879
+ /* 340 */ 24, 356, 145, 141, 431, 64, 63, 62, 61, 391,
880
+ /* 350 */ 149, 448, 454, 29, 378, 158, 85, 55, 450, 394,
881
+ /* 360 */ 432, 138, 59, 60, 147, 146, 120, 161, 119, 163,
882
+ /* 370 */ 102, 43, 139, 42, 27, 430, 14, 15, 301, 302,
883
+ /* 380 */ 303, 446, 305, 16, 44, 74, 18, 148, 152, 19,
884
+ /* 390 */ 20, 36, 68, 496, 113, 120, 161, 119, 114, 359,
885
+ /* 400 */ 22, 21, 23, 142, 140, 64, 63, 62, 61, 24,
886
+ /* 410 */ 107, 145, 141, 431, 26, 57, 377, 149, 58, 118,
887
+ /* 420 */ 120, 161, 119, 392, 463, 384, 55, 64, 63, 62,
888
+ /* 430 */ 61, 382, 569, 147, 146, 160, 383, 435, 39, 70,
889
+ /* 440 */ 43, 106, 152, 445, 445, 88, 445, 445, 375, 445,
890
+ /* 450 */ 117, 393, 155, 154, 153, 120, 161, 119, 445, 17,
891
+ /* 460 */ 445, 10, 479, 479, 445, 445, 435, 441, 440, 22,
892
+ /* 470 */ 21, 445, 403, 64, 63, 62, 61, 152, 24, 445,
893
+ /* 480 */ 145, 141, 431, 133, 75, 126, 354, 445, 445, 123,
894
+ /* 490 */ 445, 404, 405, 406, 408, 80, 441, 440, 308, 79,
895
+ /* 500 */ 434, 411, 412, 413, 414, 394, 445, 445, 59, 60,
896
+ /* 510 */ 64, 63, 62, 61, 445, 445, 376, 445, 445, 42,
897
+ /* 520 */ 436, 437, 438, 439, 156, 156, 156, 394, 445, 434,
898
+ /* 530 */ 59, 60, 64, 63, 62, 61, 445, 445, 376, 445,
899
+ /* 540 */ 445, 42, 445, 394, 473, 391, 59, 60, 445, 436,
900
+ /* 550 */ 437, 438, 439, 49, 376, 445, 74, 42, 148, 445,
901
+ /* 560 */ 88, 445, 445, 445, 490, 113, 120, 161, 119, 445,
902
+ /* 570 */ 120, 161, 119, 132, 130, 394, 143, 475, 59, 60,
903
+ /* 580 */ 445, 473, 64, 63, 62, 61, 376, 106, 149, 42,
904
+ /* 590 */ 445, 445, 152, 445, 375, 391, 117, 393, 155, 154,
905
+ /* 600 */ 153, 394, 144, 52, 59, 60, 445, 445, 445, 106,
906
+ /* 610 */ 445, 445, 376, 445, 445, 42, 375, 445, 117, 393,
907
+ /* 620 */ 155, 154, 153, 445, 445, 106, 64, 63, 62, 61,
908
+ /* 630 */ 445, 445, 375, 445, 117, 393, 155, 154, 153, 394,
909
+ /* 640 */ 445, 445, 59, 60, 88, 445, 445, 53, 445, 445,
910
+ /* 650 */ 376, 445, 445, 42, 120, 161, 119, 106, 445, 445,
911
+ /* 660 */ 445, 110, 110, 445, 375, 445, 117, 393, 155, 154,
912
+ /* 670 */ 153, 394, 445, 445, 59, 60, 152, 107, 445, 445,
913
+ /* 680 */ 445, 445, 102, 106, 445, 42, 445, 120, 161, 119,
914
+ /* 690 */ 375, 451, 117, 393, 155, 154, 153, 394, 445, 445,
915
+ /* 700 */ 59, 60, 64, 63, 62, 61, 445, 445, 376, 152,
916
+ /* 710 */ 445, 40, 445, 394, 445, 396, 59, 60, 445, 445,
917
+ /* 720 */ 445, 106, 445, 445, 376, 88, 445, 41, 375, 445,
918
+ /* 730 */ 117, 393, 155, 154, 153, 120, 161, 119, 74, 445,
919
+ /* 740 */ 148, 445, 111, 111, 107, 445, 484, 113, 120, 161,
920
+ /* 750 */ 119, 445, 445, 106, 120, 161, 119, 152, 478, 445,
921
+ /* 760 */ 375, 86, 117, 393, 155, 154, 153, 445, 445, 445,
922
+ /* 770 */ 149, 120, 161, 119, 445, 445, 152, 445, 445, 106,
923
+ /* 780 */ 445, 64, 63, 62, 61, 445, 375, 445, 117, 393,
924
+ /* 790 */ 155, 154, 153, 152, 395, 106, 64, 63, 62, 61,
925
+ /* 800 */ 98, 445, 375, 445, 117, 393, 155, 154, 153, 445,
926
+ /* 810 */ 120, 161, 119, 445, 74, 445, 148, 56, 445, 74,
927
+ /* 820 */ 445, 148, 483, 113, 120, 161, 119, 480, 113, 120,
928
+ /* 830 */ 161, 119, 152, 74, 445, 148, 445, 89, 445, 445,
929
+ /* 840 */ 445, 134, 113, 120, 161, 119, 149, 120, 161, 119,
930
+ /* 850 */ 445, 149, 74, 445, 148, 445, 445, 445, 378, 158,
931
+ /* 860 */ 517, 113, 120, 161, 119, 149, 74, 445, 148, 152,
932
+ /* 870 */ 445, 74, 445, 148, 137, 113, 120, 161, 119, 525,
933
+ /* 880 */ 113, 120, 161, 119, 149, 74, 445, 148, 64, 63,
934
+ /* 890 */ 62, 61, 445, 527, 113, 120, 161, 119, 149, 445,
935
+ /* 900 */ 445, 391, 445, 149, 445, 445, 445, 445, 445, 445,
936
+ /* 910 */ 74, 445, 148, 445, 445, 162, 445, 149, 524, 113,
937
+ /* 920 */ 120, 161, 119, 118, 445, 74, 445, 148, 445, 445,
938
+ /* 930 */ 445, 445, 445, 526, 113, 120, 161, 119, 445, 74,
939
+ /* 940 */ 445, 148, 149, 445, 445, 445, 445, 523, 113, 120,
940
+ /* 950 */ 161, 119, 74, 445, 148, 445, 445, 149, 445, 445,
941
+ /* 960 */ 522, 113, 120, 161, 119, 445, 74, 445, 148, 445,
942
+ /* 970 */ 445, 149, 445, 445, 521, 113, 120, 161, 119, 74,
943
+ /* 980 */ 445, 148, 445, 445, 149, 445, 445, 520, 113, 120,
944
+ /* 990 */ 161, 119, 445, 74, 445, 148, 445, 445, 149, 445,
945
+ /* 1000 */ 445, 519, 113, 120, 161, 119, 445, 445, 445, 445,
946
+ /* 1010 */ 445, 149, 445, 445, 445, 445, 445, 445, 74, 445,
947
+ /* 1020 */ 148, 445, 445, 445, 445, 149, 150, 113, 120, 161,
948
+ /* 1030 */ 119, 74, 445, 148, 445, 445, 445, 445, 445, 151,
949
+ /* 1040 */ 113, 120, 161, 119, 445, 74, 445, 148, 445, 445,
950
+ /* 1050 */ 149, 445, 445, 136, 113, 120, 161, 119, 74, 445,
951
+ /* 1060 */ 148, 445, 445, 149, 445, 445, 135, 113, 120, 161,
952
+ /* 1070 */ 119, 445, 88, 445, 445, 445, 445, 149, 445, 445,
953
+ /* 1080 */ 445, 90, 120, 161, 119, 445, 445, 445, 445, 82,
954
+ /* 1090 */ 149, 120, 161, 119, 445, 87, 466, 445, 34, 99,
955
+ /* 1100 */ 445, 445, 445, 445, 152, 120, 161, 119, 100, 120,
956
+ /* 1110 */ 161, 119, 445, 152, 445, 445, 445, 445, 120, 161,
957
+ /* 1120 */ 119, 445, 445, 445, 101, 445, 445, 152, 445, 445,
958
+ /* 1130 */ 445, 152, 91, 445, 120, 161, 119, 103, 445, 445,
959
+ /* 1140 */ 152, 445, 120, 161, 119, 445, 445, 120, 161, 119,
960
+ /* 1150 */ 445, 92, 445, 445, 445, 445, 152, 445, 445, 445,
961
+ /* 1160 */ 93, 120, 161, 119, 152, 445, 104, 445, 445, 152,
962
+ /* 1170 */ 120, 161, 119, 445, 94, 445, 120, 161, 119, 445,
963
+ /* 1180 */ 445, 445, 445, 152, 120, 161, 119, 445, 445, 105,
964
+ /* 1190 */ 445, 445, 152, 445, 445, 445, 445, 95, 152, 120,
965
+ /* 1200 */ 161, 119, 96, 445, 445, 97, 152, 120, 161, 119,
966
+ /* 1210 */ 445, 445, 120, 161, 119, 120, 161, 119, 445, 445,
967
+ /* 1220 */ 445, 152, 445, 445, 445, 445, 445, 445, 445, 152,
968
+ /* 1230 */ 549, 445, 445, 548, 152, 445, 445, 152, 547, 445,
969
+ /* 1240 */ 120, 161, 119, 120, 161, 119, 546, 445, 120, 161,
970
+ /* 1250 */ 119, 445, 445, 445, 445, 445, 120, 161, 119, 445,
971
+ /* 1260 */ 445, 445, 152, 445, 445, 152, 445, 445, 445, 115,
972
+ /* 1270 */ 152, 445, 116, 445, 445, 445, 445, 445, 152, 120,
973
+ /* 1280 */ 161, 119, 120, 161, 119, 445, 445, 445, 445, 445,
974
+ /* 1290 */ 445, 445, 445, 445, 445, 445, 445, 445, 445, 445,
975
+ /* 1300 */ 445, 152, 445, 445, 152,
937976
};
938977
static const YYCODETYPE yy_lookahead[] = {
939
- /* 0 */ 0, 113, 114, 115, 134, 102, 103, 104, 106, 106,
940
- /* 10 */ 10, 113, 114, 115, 111, 112, 113, 114, 115, 106,
941
- /* 20 */ 20, 21, 22, 105, 24, 126, 108, 109, 28, 4,
942
- /* 30 */ 5, 6, 7, 33, 34, 35, 36, 37, 135, 39,
943
- /* 40 */ 40, 41, 42, 105, 44, 45, 108, 109, 107, 49,
978
+ /* 0 */ 0, 115, 116, 117, 136, 103, 104, 105, 107, 107,
979
+ /* 10 */ 10, 4, 5, 6, 7, 113, 114, 115, 116, 117,
980
+ /* 20 */ 20, 21, 22, 17, 24, 101, 102, 103, 104, 29,
981
+ /* 30 */ 107, 25, 25, 109, 34, 35, 36, 37, 38, 137,
982
+ /* 40 */ 40, 41, 42, 43, 120, 45, 46, 109, 124, 125,
944983
/* 50 */ 50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
945
- /* 60 */ 60, 61, 62, 63, 0, 113, 114, 115, 130, 131,
946
- /* 70 */ 132, 104, 25, 106, 10, 113, 114, 115, 111, 112,
947
- /* 80 */ 113, 114, 115, 106, 20, 21, 22, 128, 24, 113,
948
- /* 90 */ 114, 115, 28, 129, 2, 26, 27, 33, 34, 35,
949
- /* 100 */ 36, 37, 135, 39, 40, 41, 42, 2, 44, 45,
950
- /* 110 */ 133, 26, 27, 49, 50, 51, 52, 53, 54, 55,
951
- /* 120 */ 56, 57, 58, 59, 60, 61, 62, 63, 1, 2,
952
- /* 130 */ 38, 4, 5, 4, 5, 6, 7, 17, 10, 12,
953
- /* 140 */ 4, 5, 15, 38, 1, 25, 17, 29, 30, 31,
954
- /* 150 */ 32, 24, 83, 26, 27, 12, 28, 14, 31, 32,
955
- /* 160 */ 91, 18, 116, 20, 21, 22, 23, 24, 116, 26,
956
- /* 170 */ 27, 19, 29, 30, 31, 32, 91, 3, 64, 65,
957
- /* 180 */ 66, 67, 68, 69, 70, 71, 72, 73, 74, 6,
958
- /* 190 */ 7, 64, 4, 5, 6, 7, 8, 97, 98, 20,
959
- /* 200 */ 21, 22, 26, 27, 4, 5, 6, 7, 1, 82,
960
- /* 210 */ 48, 84, 85, 86, 87, 17, 89, 17, 91, 92,
961
- /* 220 */ 93, 94, 95, 1, 2, 25, 4, 5, 49, 50,
962
- /* 230 */ 51, 52, 53, 54, 12, 16, 15, 15, 4, 5,
963
- /* 240 */ 6, 7, 20, 21, 22, 1, 26, 27, 4, 5,
964
- /* 250 */ 48, 43, 90, 31, 32, 40, 12, 40, 96, 15,
965
- /* 260 */ 47, 99, 88, 104, 20, 21, 22, 1, 24, 35,
966
- /* 270 */ 4, 5, 113, 114, 115, 0, 117, 41, 12, 41,
967
- /* 280 */ 13, 15, 17, 124, 125, 10, 64, 25, 1, 2,
968
- /* 290 */ 17, 4, 5, 75, 135, 81, 80, 3, 3, 12,
969
- /* 300 */ 3, 99, 15, 79, 82, 80, 84, 85, 86, 87,
970
- /* 310 */ 38, 89, 3, 91, 92, 93, 94, 95, 31, 32,
971
- /* 320 */ 2, 3, 4, 5, 6, 7, 82, 3, 3, 12,
972
- /* 330 */ 77, 104, 25, 89, 16, 91, 92, 93, 94, 95,
973
- /* 340 */ 113, 114, 115, 25, 117, 96, 15, 15, 82, 31,
974
- /* 350 */ 32, 64, 125, 15, 17, 89, 38, 91, 92, 93,
975
- /* 360 */ 94, 95, 135, 28, 4, 5, 6, 7, 28, 82,
976
- /* 370 */ 28, 84, 85, 86, 87, 12, 89, 3, 91, 92,
977
- /* 380 */ 93, 94, 95, 90, 11, 67, 68, 136, 2, 3,
978
- /* 390 */ 4, 5, 6, 7, 76, 35, 78, 79, 80, 82,
979
- /* 400 */ 136, 136, 136, 17, 136, 136, 89, 136, 91, 136,
980
- /* 410 */ 136, 25, 104, 136, 106, 136, 136, 31, 32, 111,
981
- /* 420 */ 112, 113, 114, 115, 38, 136, 136, 2, 3, 4,
982
- /* 430 */ 5, 6, 7, 136, 1, 136, 136, 4, 5, 4,
983
- /* 440 */ 5, 6, 7, 135, 136, 12, 136, 136, 15, 136,
984
- /* 450 */ 25, 136, 17, 67, 68, 136, 31, 32, 136, 136,
985
- /* 460 */ 25, 136, 76, 38, 78, 79, 80, 1, 136, 136,
986
- /* 470 */ 4, 5, 4, 5, 6, 7, 136, 136, 12, 46,
987
- /* 480 */ 47, 15, 136, 136, 136, 17, 20, 21, 22, 136,
988
- /* 490 */ 136, 136, 67, 68, 136, 1, 2, 136, 4, 5,
989
- /* 500 */ 136, 76, 136, 78, 79, 80, 12, 136, 104, 15,
990
- /* 510 */ 4, 5, 6, 7, 136, 82, 136, 113, 114, 115,
991
- /* 520 */ 136, 117, 89, 17, 91, 92, 93, 94, 95, 136,
992
- /* 530 */ 1, 2, 38, 4, 5, 4, 5, 6, 7, 135,
993
- /* 540 */ 136, 12, 136, 136, 15, 136, 136, 136, 82, 4,
994
- /* 550 */ 5, 6, 7, 136, 136, 89, 25, 91, 92, 93,
995
- /* 560 */ 94, 95, 136, 1, 2, 136, 4, 5, 136, 136,
996
- /* 570 */ 25, 104, 136, 106, 12, 136, 82, 15, 111, 112,
997
- /* 580 */ 113, 114, 115, 89, 136, 91, 92, 93, 94, 95,
998
- /* 590 */ 1, 136, 136, 4, 5, 136, 136, 136, 136, 136,
999
- /* 600 */ 136, 12, 135, 136, 15, 136, 104, 136, 106, 136,
1000
- /* 610 */ 136, 82, 136, 111, 112, 113, 114, 115, 89, 136,
1001
- /* 620 */ 91, 92, 93, 94, 95, 1, 136, 136, 4, 5,
1002
- /* 630 */ 136, 136, 104, 136, 136, 136, 12, 135, 136, 15,
1003
- /* 640 */ 136, 113, 114, 115, 82, 136, 136, 2, 120, 121,
1004
- /* 650 */ 136, 89, 136, 91, 92, 93, 94, 95, 1, 136,
1005
- /* 660 */ 136, 4, 5, 135, 104, 136, 136, 136, 136, 12,
1006
- /* 670 */ 136, 82, 15, 113, 114, 115, 31, 32, 89, 136,
1007
- /* 680 */ 91, 92, 93, 94, 95, 101, 102, 103, 136, 136,
1008
- /* 690 */ 104, 107, 106, 48, 104, 135, 136, 111, 112, 113,
1009
- /* 700 */ 114, 115, 118, 113, 114, 115, 82, 123, 136, 64,
1010
- /* 710 */ 120, 121, 136, 89, 136, 91, 92, 93, 94, 95,
1011
- /* 720 */ 136, 135, 136, 136, 136, 135, 104, 136, 106, 84,
1012
- /* 730 */ 85, 86, 87, 111, 112, 113, 114, 115, 136, 82,
1013
- /* 740 */ 100, 101, 102, 103, 136, 136, 89, 107, 91, 92,
1014
- /* 750 */ 93, 94, 95, 136, 136, 136, 136, 135, 118, 104,
1015
- /* 760 */ 136, 106, 122, 123, 136, 136, 111, 112, 113, 114,
1016
- /* 770 */ 115, 136, 136, 136, 104, 136, 106, 136, 136, 136,
1017
- /* 780 */ 136, 111, 112, 113, 114, 115, 104, 136, 106, 104,
1018
- /* 790 */ 135, 136, 136, 111, 112, 113, 114, 115, 113, 114,
1019
- /* 800 */ 115, 136, 104, 136, 106, 135, 136, 136, 136, 111,
1020
- /* 810 */ 112, 113, 114, 115, 104, 136, 106, 135, 136, 136,
1021
- /* 820 */ 135, 111, 112, 113, 114, 115, 104, 4, 5, 6,
1022
- /* 830 */ 7, 136, 136, 135, 136, 113, 114, 115, 136, 104,
1023
- /* 840 */ 17, 106, 120, 136, 136, 135, 111, 112, 113, 114,
1024
- /* 850 */ 115, 104, 136, 106, 136, 136, 136, 135, 111, 112,
1025
- /* 860 */ 113, 114, 115, 136, 104, 136, 106, 136, 136, 136,
1026
- /* 870 */ 135, 111, 112, 113, 114, 115, 136, 136, 136, 104,
1027
- /* 880 */ 136, 106, 135, 136, 136, 136, 111, 112, 113, 114,
1028
- /* 890 */ 115, 104, 136, 106, 104, 135, 136, 136, 111, 112,
1029
- /* 900 */ 113, 114, 115, 113, 114, 115, 136, 104, 136, 106,
1030
- /* 910 */ 135, 136, 136, 136, 111, 112, 113, 114, 115, 104,
1031
- /* 920 */ 136, 106, 135, 136, 136, 135, 111, 112, 113, 114,
1032
- /* 930 */ 115, 104, 4, 5, 6, 7, 136, 136, 135, 136,
1033
- /* 940 */ 113, 114, 115, 136, 104, 17, 106, 136, 136, 136,
1034
- /* 950 */ 135, 111, 112, 113, 114, 115, 104, 136, 106, 136,
1035
- /* 960 */ 136, 136, 135, 111, 112, 113, 114, 115, 136, 104,
1036
- /* 970 */ 136, 106, 136, 136, 136, 135, 111, 112, 113, 114,
1037
- /* 980 */ 115, 136, 136, 136, 104, 136, 106, 135, 136, 136,
1038
- /* 990 */ 136, 111, 112, 113, 114, 115, 104, 136, 106, 104,
1039
- /* 1000 */ 135, 136, 136, 111, 112, 113, 114, 115, 113, 114,
1040
- /* 1010 */ 115, 136, 104, 136, 106, 135, 136, 2, 136, 111,
1041
- /* 1020 */ 112, 113, 114, 115, 104, 136, 106, 135, 136, 136,
1042
- /* 1030 */ 135, 111, 112, 113, 114, 115, 4, 5, 6, 7,
1043
- /* 1040 */ 136, 136, 136, 135, 136, 136, 31, 32, 136, 104,
1044
- /* 1050 */ 136, 136, 136, 136, 136, 135, 136, 25, 113, 114,
1045
- /* 1060 */ 115, 104, 136, 136, 119, 120, 121, 136, 136, 136,
1046
- /* 1070 */ 113, 114, 115, 136, 136, 136, 136, 120, 136, 64,
1047
- /* 1080 */ 135, 136, 136, 136, 127, 136, 129, 100, 101, 102,
1048
- /* 1090 */ 103, 136, 135, 136, 107, 136, 136, 136, 104, 84,
1049
- /* 1100 */ 85, 86, 87, 104, 136, 118, 136, 113, 114, 115,
1050
- /* 1110 */ 123, 117, 113, 114, 115, 104, 136, 4, 5, 6,
1051
- /* 1120 */ 7, 136, 104, 136, 113, 114, 115, 104, 136, 135,
1052
- /* 1130 */ 17, 113, 114, 115, 135, 136, 113, 114, 115, 104,
1053
- /* 1140 */ 136, 136, 136, 136, 136, 136, 135, 136, 113, 114,
1054
- /* 1150 */ 115, 104, 136, 135, 104, 136, 136, 136, 135, 136,
1055
- /* 1160 */ 113, 114, 115, 113, 114, 115, 104, 136, 136, 104,
1056
- /* 1170 */ 135, 136, 136, 136, 136, 113, 114, 115, 113, 114,
1057
- /* 1180 */ 115, 136, 135, 136, 104, 135, 136, 136, 136, 136,
1058
- /* 1190 */ 136, 136, 104, 113, 114, 115, 136, 135, 136, 104,
1059
- /* 1200 */ 135, 113, 114, 115, 136, 136, 136, 104, 113, 114,
1060
- /* 1210 */ 115, 136, 136, 136, 136, 135, 113, 114, 115, 136,
1061
- /* 1220 */ 136, 136, 136, 135, 136, 136, 136, 136, 136, 136,
1062
- /* 1230 */ 135, 104, 136, 136, 104, 136, 136, 104, 135, 136,
1063
- /* 1240 */ 113, 114, 115, 113, 114, 115, 113, 114, 115, 136,
1064
- /* 1250 */ 136, 136, 136, 136, 136, 136, 136, 136, 136, 136,
1065
- /* 1260 */ 136, 136, 135, 104, 136, 135, 104, 136, 135, 104,
1066
- /* 1270 */ 136, 136, 113, 114, 115, 113, 114, 115, 113, 114,
1067
- /* 1280 */ 115, 104, 136, 136, 136, 136, 136, 136, 136, 136,
1068
- /* 1290 */ 113, 114, 115, 136, 135, 136, 136, 135, 136, 136,
1069
- /* 1300 */ 135, 136, 136, 136, 136, 136, 136, 136, 136, 136,
1070
- /* 1310 */ 136, 136, 135, 100, 100, 100, 100, 100, 100, 100,
1071
- /* 1320 */ 100, 100, 100, 100, 100, 100, 100, 100, 100, 100,
1072
- /* 1330 */ 100, 100, 100, 100, 100, 100, 100, 100, 100, 100,
1073
- /* 1340 */ 100, 100, 100, 100, 100, 100, 100, 100, 100, 100,
1074
- /* 1350 */ 100, 100, 100, 100, 100, 100, 100, 100, 100, 100,
1075
- /* 1360 */ 100, 100, 100, 100, 100, 100, 100, 100, 100, 100,
1076
- /* 1370 */ 100, 100, 100, 100, 100, 100, 100, 100, 100, 100,
1077
- /* 1380 */ 100, 100, 100, 100, 100, 100, 100, 100, 100, 100,
1078
- /* 1390 */ 100, 100, 100, 100, 100, 100, 100, 100, 100, 100,
1079
- /* 1400 */ 100, 100, 100, 100, 100, 100, 100, 100, 100, 100,
1080
- /* 1410 */ 100, 100, 100,
984
+ /* 60 */ 60, 61, 62, 63, 64, 0, 4, 5, 6, 7,
985
+ /* 70 */ 4, 5, 105, 25, 107, 10, 115, 116, 117, 17,
986
+ /* 80 */ 113, 114, 115, 116, 117, 20, 21, 22, 128, 24,
987
+ /* 90 */ 101, 102, 103, 104, 29, 115, 116, 117, 109, 34,
988
+ /* 100 */ 35, 36, 37, 38, 137, 40, 41, 42, 43, 120,
989
+ /* 110 */ 45, 46, 49, 10, 125, 50, 51, 52, 53, 54,
990
+ /* 120 */ 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
991
+ /* 130 */ 1, 2, 29, 4, 5, 4, 5, 6, 7, 8,
992
+ /* 140 */ 105, 12, 107, 3, 15, 115, 116, 117, 113, 114,
993
+ /* 150 */ 115, 116, 117, 24, 91, 130, 27, 28, 118, 105,
994
+ /* 160 */ 97, 32, 33, 100, 1, 2, 19, 4, 5, 115,
995
+ /* 170 */ 116, 117, 137, 119, 12, 12, 2, 118, 15, 1,
996
+ /* 180 */ 126, 127, 106, 20, 21, 22, 110, 111, 106, 2,
997
+ /* 190 */ 107, 137, 110, 111, 65, 32, 33, 65, 66, 67,
998
+ /* 200 */ 68, 69, 70, 71, 72, 73, 74, 75, 132, 133,
999
+ /* 210 */ 134, 131, 83, 39, 85, 86, 87, 88, 135, 90,
1000
+ /* 220 */ 17, 92, 93, 94, 95, 96, 39, 15, 65, 89,
1001
+ /* 230 */ 1, 2, 16, 4, 5, 30, 31, 32, 33, 98,
1002
+ /* 240 */ 99, 12, 6, 7, 15, 83, 83, 41, 85, 86,
1003
+ /* 250 */ 87, 88, 90, 90, 92, 92, 93, 94, 95, 96,
1004
+ /* 260 */ 49, 32, 33, 44, 41, 2, 3, 4, 5, 6,
1005
+ /* 270 */ 7, 27, 28, 42, 20, 21, 22, 27, 28, 16,
1006
+ /* 280 */ 42, 105, 48, 107, 115, 116, 117, 13, 25, 113,
1007
+ /* 290 */ 114, 115, 116, 117, 65, 32, 33, 4, 5, 6,
1008
+ /* 300 */ 7, 17, 39, 25, 50, 51, 52, 53, 54, 55,
1009
+ /* 310 */ 17, 100, 83, 137, 85, 86, 87, 88, 105, 90,
1010
+ /* 320 */ 107, 92, 93, 94, 95, 96, 113, 114, 115, 116,
1011
+ /* 330 */ 117, 68, 69, 76, 2, 3, 4, 5, 6, 7,
1012
+ /* 340 */ 77, 17, 79, 80, 81, 4, 5, 6, 7, 17,
1013
+ /* 350 */ 137, 102, 103, 104, 27, 28, 105, 25, 109, 1,
1014
+ /* 360 */ 81, 80, 4, 5, 32, 33, 115, 116, 117, 120,
1015
+ /* 370 */ 12, 39, 82, 15, 125, 81, 3, 36, 20, 21,
1016
+ /* 380 */ 22, 0, 24, 3, 39, 105, 3, 107, 137, 3,
1017
+ /* 390 */ 3, 10, 3, 113, 114, 115, 116, 117, 97, 78,
1018
+ /* 400 */ 68, 69, 25, 2, 3, 4, 5, 6, 7, 77,
1019
+ /* 410 */ 105, 79, 80, 81, 15, 15, 12, 137, 15, 92,
1020
+ /* 420 */ 115, 116, 117, 17, 119, 29, 25, 4, 5, 6,
1021
+ /* 430 */ 7, 29, 127, 32, 33, 91, 29, 2, 11, 3,
1022
+ /* 440 */ 39, 83, 137, 138, 138, 105, 138, 138, 90, 138,
1023
+ /* 450 */ 92, 93, 94, 95, 96, 115, 116, 117, 138, 36,
1024
+ /* 460 */ 138, 121, 122, 123, 138, 138, 2, 32, 33, 68,
1025
+ /* 470 */ 69, 138, 1, 4, 5, 6, 7, 137, 77, 138,
1026
+ /* 480 */ 79, 80, 81, 12, 49, 14, 17, 138, 138, 18,
1027
+ /* 490 */ 138, 20, 21, 22, 23, 24, 32, 33, 27, 28,
1028
+ /* 500 */ 65, 30, 31, 32, 33, 1, 138, 138, 4, 5,
1029
+ /* 510 */ 4, 5, 6, 7, 138, 138, 12, 138, 138, 15,
1030
+ /* 520 */ 85, 86, 87, 88, 20, 21, 22, 1, 138, 65,
1031
+ /* 530 */ 4, 5, 4, 5, 6, 7, 138, 138, 12, 138,
1032
+ /* 540 */ 138, 15, 138, 1, 2, 17, 4, 5, 138, 85,
1033
+ /* 550 */ 86, 87, 88, 25, 12, 138, 105, 15, 107, 138,
1034
+ /* 560 */ 105, 138, 138, 138, 113, 114, 115, 116, 117, 138,
1035
+ /* 570 */ 115, 116, 117, 47, 48, 1, 2, 122, 4, 5,
1036
+ /* 580 */ 138, 39, 4, 5, 6, 7, 12, 83, 137, 15,
1037
+ /* 590 */ 138, 138, 137, 138, 90, 17, 92, 93, 94, 95,
1038
+ /* 600 */ 96, 1, 2, 25, 4, 5, 138, 138, 138, 83,
1039
+ /* 610 */ 138, 138, 12, 138, 138, 15, 90, 138, 92, 93,
1040
+ /* 620 */ 94, 95, 96, 138, 138, 83, 4, 5, 6, 7,
1041
+ /* 630 */ 138, 138, 90, 138, 92, 93, 94, 95, 96, 1,
1042
+ /* 640 */ 138, 138, 4, 5, 105, 138, 138, 25, 138, 138,
1043
+ /* 650 */ 12, 138, 138, 15, 115, 116, 117, 83, 138, 138,
1044
+ /* 660 */ 138, 122, 123, 138, 90, 138, 92, 93, 94, 95,
1045
+ /* 670 */ 96, 1, 138, 138, 4, 5, 137, 105, 138, 138,
1046
+ /* 680 */ 138, 138, 12, 83, 138, 15, 138, 115, 116, 117,
1047
+ /* 690 */ 90, 119, 92, 93, 94, 95, 96, 1, 138, 138,
1048
+ /* 700 */ 4, 5, 4, 5, 6, 7, 138, 138, 12, 137,
1049
+ /* 710 */ 138, 15, 138, 1, 138, 17, 4, 5, 138, 138,
1050
+ /* 720 */ 138, 83, 138, 138, 12, 105, 138, 15, 90, 138,
1051
+ /* 730 */ 92, 93, 94, 95, 96, 115, 116, 117, 105, 138,
1052
+ /* 740 */ 107, 138, 122, 123, 105, 138, 113, 114, 115, 116,
1053
+ /* 750 */ 117, 138, 138, 83, 115, 116, 117, 137, 119, 138,
1054
+ /* 760 */ 90, 105, 92, 93, 94, 95, 96, 138, 138, 138,
1055
+ /* 770 */ 137, 115, 116, 117, 138, 138, 137, 138, 138, 83,
1056
+ /* 780 */ 138, 4, 5, 6, 7, 138, 90, 138, 92, 93,
1057
+ /* 790 */ 94, 95, 96, 137, 17, 83, 4, 5, 6, 7,
1058
+ /* 800 */ 105, 138, 90, 138, 92, 93, 94, 95, 96, 138,
1059
+ /* 810 */ 115, 116, 117, 138, 105, 138, 107, 25, 138, 105,
1060
+ /* 820 */ 138, 107, 113, 114, 115, 116, 117, 113, 114, 115,
1061
+ /* 830 */ 116, 117, 137, 105, 138, 107, 138, 105, 138, 138,
1062
+ /* 840 */ 138, 113, 114, 115, 116, 117, 137, 115, 116, 117,
1063
+ /* 850 */ 138, 137, 105, 138, 107, 138, 138, 138, 27, 28,
1064
+ /* 860 */ 113, 114, 115, 116, 117, 137, 105, 138, 107, 137,
1065
+ /* 870 */ 138, 105, 138, 107, 113, 114, 115, 116, 117, 113,
1066
+ /* 880 */ 114, 115, 116, 117, 137, 105, 138, 107, 4, 5,
1067
+ /* 890 */ 6, 7, 138, 113, 114, 115, 116, 117, 137, 138,
1068
+ /* 900 */ 138, 17, 138, 137, 138, 138, 138, 138, 138, 138,
1069
+ /* 910 */ 105, 138, 107, 138, 138, 84, 138, 137, 113, 114,
1070
+ /* 920 */ 115, 116, 117, 92, 138, 105, 138, 107, 138, 138,
1071
+ /* 930 */ 138, 138, 138, 113, 114, 115, 116, 117, 138, 105,
1072
+ /* 940 */ 138, 107, 137, 138, 138, 138, 138, 113, 114, 115,
1073
+ /* 950 */ 116, 117, 105, 138, 107, 138, 138, 137, 138, 138,
1074
+ /* 960 */ 113, 114, 115, 116, 117, 138, 105, 138, 107, 138,
1075
+ /* 970 */ 138, 137, 138, 138, 113, 114, 115, 116, 117, 105,
1076
+ /* 980 */ 138, 107, 138, 138, 137, 138, 138, 113, 114, 115,
1077
+ /* 990 */ 116, 117, 138, 105, 138, 107, 138, 138, 137, 138,
1078
+ /* 1000 */ 138, 113, 114, 115, 116, 117, 138, 138, 138, 138,
1079
+ /* 1010 */ 138, 137, 138, 138, 138, 138, 138, 138, 105, 138,
1080
+ /* 1020 */ 107, 138, 138, 138, 138, 137, 113, 114, 115, 116,
1081
+ /* 1030 */ 117, 105, 138, 107, 138, 138, 138, 138, 138, 113,
1082
+ /* 1040 */ 114, 115, 116, 117, 138, 105, 138, 107, 138, 138,
1083
+ /* 1050 */ 137, 138, 138, 113, 114, 115, 116, 117, 105, 138,
1084
+ /* 1060 */ 107, 138, 138, 137, 138, 138, 113, 114, 115, 116,
1085
+ /* 1070 */ 117, 138, 105, 138, 138, 138, 138, 137, 138, 138,
1086
+ /* 1080 */ 138, 105, 115, 116, 117, 138, 138, 138, 138, 122,
1087
+ /* 1090 */ 137, 115, 116, 117, 138, 105, 129, 138, 131, 105,
1088
+ /* 1100 */ 138, 138, 138, 138, 137, 115, 116, 117, 105, 115,
1089
+ /* 1110 */ 116, 117, 138, 137, 138, 138, 138, 138, 115, 116,
1090
+ /* 1120 */ 117, 138, 138, 138, 105, 138, 138, 137, 138, 138,
1091
+ /* 1130 */ 138, 137, 105, 138, 115, 116, 117, 105, 138, 138,
1092
+ /* 1140 */ 137, 138, 115, 116, 117, 138, 138, 115, 116, 117,
1093
+ /* 1150 */ 138, 105, 138, 138, 138, 138, 137, 138, 138, 138,
1094
+ /* 1160 */ 105, 115, 116, 117, 137, 138, 105, 138, 138, 137,
1095
+ /* 1170 */ 115, 116, 117, 138, 105, 138, 115, 116, 117, 138,
1096
+ /* 1180 */ 138, 138, 138, 137, 115, 116, 117, 138, 138, 105,
1097
+ /* 1190 */ 138, 138, 137, 138, 138, 138, 138, 105, 137, 115,
1098
+ /* 1200 */ 116, 117, 105, 138, 138, 105, 137, 115, 116, 117,
1099
+ /* 1210 */ 138, 138, 115, 116, 117, 115, 116, 117, 138, 138,
1100
+ /* 1220 */ 138, 137, 138, 138, 138, 138, 138, 138, 138, 137,
1101
+ /* 1230 */ 105, 138, 138, 105, 137, 138, 138, 137, 105, 138,
1102
+ /* 1240 */ 115, 116, 117, 115, 116, 117, 105, 138, 115, 116,
1103
+ /* 1250 */ 117, 138, 138, 138, 138, 138, 115, 116, 117, 138,
1104
+ /* 1260 */ 138, 138, 137, 138, 138, 137, 138, 138, 138, 105,
1105
+ /* 1270 */ 137, 138, 105, 138, 138, 138, 138, 138, 137, 115,
1106
+ /* 1280 */ 116, 117, 115, 116, 117, 138, 138, 138, 138, 138,
1107
+ /* 1290 */ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
1108
+ /* 1300 */ 138, 137, 138, 138, 137, 101, 101, 101, 101, 101,
1109
+ /* 1310 */ 101, 101, 101, 101, 101, 101, 101, 101, 101, 101,
1110
+ /* 1320 */ 101, 101, 101, 101, 101, 101, 101, 101, 101, 101,
1111
+ /* 1330 */ 101, 101, 101, 101, 101, 101, 101, 101, 101, 101,
1112
+ /* 1340 */ 101, 101, 101, 101, 101, 101, 101, 101, 101, 101,
1113
+ /* 1350 */ 101, 101, 101, 101, 101, 101, 101, 101, 101, 101,
1114
+ /* 1360 */ 101, 101, 101, 101, 101, 101, 101, 101, 101, 101,
1115
+ /* 1370 */ 101, 101, 101, 101, 101, 101, 101, 101, 101, 101,
1116
+ /* 1380 */ 101, 101, 101, 101, 101, 101, 101, 101, 101, 101,
1117
+ /* 1390 */ 101, 101, 101, 101, 101, 101, 101, 101, 101, 101,
1118
+ /* 1400 */ 101, 101, 101, 101, 101, 101,
10811119
};
10821120
#define YY_SHIFT_COUNT (163)
10831121
#define YY_SHIFT_MIN (0)
1084
-#define YY_SHIFT_MAX (1113)
1122
+#define YY_SHIFT_MAX (884)
10851123
static const unsigned short int yy_shift_ofst[] = {
1086
- /* 0 */ 143, 127, 222, 287, 287, 287, 287, 287, 287, 287,
1087
- /* 10 */ 287, 287, 287, 287, 287, 287, 287, 287, 287, 287,
1088
- /* 20 */ 287, 287, 287, 287, 287, 287, 287, 244, 433, 266,
1089
- /* 30 */ 244, 143, 494, 494, 0, 64, 143, 589, 266, 589,
1090
- /* 40 */ 466, 466, 466, 529, 562, 266, 266, 266, 266, 266,
1091
- /* 50 */ 266, 624, 266, 266, 657, 266, 266, 266, 266, 266,
1092
- /* 60 */ 266, 266, 266, 266, 266, 179, 317, 317, 317, 317,
1093
- /* 70 */ 317, 645, 318, 386, 425, 1015, 1015, 118, 47, 1313,
1094
- /* 80 */ 1313, 1313, 1313, 114, 114, 200, 435, 129, 188, 234,
1095
- /* 90 */ 360, 468, 531, 506, 545, 823, 1032, 928, 1113, 25,
1096
- /* 100 */ 25, 25, 162, 25, 25, 25, 69, 25, 85, 128,
1097
- /* 110 */ 92, 105, 120, 136, 100, 183, 183, 176, 220, 174,
1098
- /* 120 */ 202, 275, 152, 207, 198, 219, 221, 208, 215, 217,
1099
- /* 130 */ 236, 238, 213, 267, 265, 262, 218, 273, 216, 224,
1100
- /* 140 */ 214, 225, 294, 295, 297, 272, 309, 324, 325, 249,
1101
- /* 150 */ 253, 307, 249, 331, 332, 338, 337, 335, 340, 342,
1102
- /* 160 */ 363, 293, 374, 373,
1124
+ /* 0 */ 471, 129, 163, 229, 229, 229, 229, 229, 229, 229,
1125
+ /* 10 */ 229, 229, 229, 229, 229, 229, 229, 229, 229, 229,
1126
+ /* 20 */ 229, 229, 229, 229, 229, 229, 229, 358, 526, 638,
1127
+ /* 30 */ 358, 471, 542, 542, 0, 65, 471, 670, 638, 670,
1128
+ /* 40 */ 504, 504, 504, 574, 600, 638, 638, 638, 638, 638,
1129
+ /* 50 */ 638, 696, 638, 638, 712, 638, 638, 638, 638, 638,
1130
+ /* 60 */ 638, 638, 638, 638, 638, 254, 162, 162, 162, 162,
1131
+ /* 70 */ 162, 435, 263, 332, 401, 464, 464, 205, 48, 1305,
1132
+ /* 80 */ 1305, 1305, 1305, 132, 132, 528, 578, 62, 131, 341,
1133
+ /* 90 */ 423, 293, 7, 469, 622, 698, 792, 777, 884, 506,
1134
+ /* 100 */ 506, 506, 63, 506, 506, 506, 831, 506, 327, 103,
1135
+ /* 110 */ 174, 187, 6, 66, 141, 236, 236, 244, 250, 140,
1136
+ /* 120 */ 211, 381, 147, 178, 203, 216, 212, 219, 206, 223,
1137
+ /* 130 */ 231, 238, 234, 274, 284, 278, 257, 324, 279, 281,
1138
+ /* 140 */ 290, 294, 373, 380, 383, 345, 386, 387, 389, 301,
1139
+ /* 150 */ 321, 377, 301, 399, 400, 403, 406, 396, 402, 407,
1140
+ /* 160 */ 404, 344, 436, 427,
11031141
};
11041142
#define YY_REDUCE_COUNT (82)
1105
-#define YY_REDUCE_MIN (-130)
1106
-#define YY_REDUCE_MAX (1177)
1143
+#define YY_REDUCE_MIN (-132)
1144
+#define YY_REDUCE_MAX (1167)
11071145
static const short yy_reduce_ofst[] = {
1108
- /* 0 */ 640, -97, -33, 308, 467, 502, 586, 622, 655, 670,
1109
- /* 10 */ 682, 698, 710, 735, 747, 760, 775, 787, 803, 815,
1110
- /* 20 */ 840, 852, 865, 880, 892, 908, 920, 159, 945, 957,
1111
- /* 30 */ 227, 987, 528, 590, -62, -62, 584, 404, 722, 994,
1112
- /* 40 */ 560, 685, 790, 827, 895, 999, 1011, 1018, 1023, 1035,
1113
- /* 50 */ 1047, 1050, 1062, 1065, 1080, 1088, 1095, 1103, 1127, 1130,
1114
- /* 60 */ 1133, 1159, 1162, 1165, 1177, -82, -112, -102, -48, -38,
1115
- /* 70 */ -24, -23, -130, -130, -130, -98, -87, -59, -101, -41,
1116
- /* 80 */ 46, 52, -36,
1146
+ /* 0 */ -76, -98, -33, 35, 176, 213, 280, 451, 633, 709,
1147
+ /* 10 */ 714, 728, 747, 761, 766, 780, 805, 820, 834, 847,
1148
+ /* 20 */ 861, 874, 888, 913, 926, 940, 953, 54, 340, 967,
1149
+ /* 30 */ 305, -11, 539, 620, 76, 76, 249, 639, 455, 572,
1150
+ /* 40 */ 251, 656, 695, 732, 976, 990, 994, 1003, 1019, 1027,
1151
+ /* 50 */ 1032, 1046, 1055, 1061, 1069, 1084, 1092, 1097, 1100, 1125,
1152
+ /* 60 */ 1128, 1133, 1141, 1164, 1167, 82, -114, -39, -20, 30,
1153
+ /* 70 */ 169, 83, -132, -132, -132, -99, -77, -62, -40, 25,
1154
+ /* 80 */ 40, 59, 80,
11171155
};
11181156
static const YYACTIONTYPE yy_default[] = {
11191157
/* 0 */ 449, 443, 443, 443, 443, 443, 443, 443, 443, 443,
11201158
/* 10 */ 443, 443, 443, 443, 443, 443, 443, 443, 443, 443,
11211159
/* 20 */ 443, 443, 443, 443, 443, 443, 443, 443, 473, 576,
@@ -1176,10 +1214,11 @@
11761214
0, /* COLOR => nothing */
11771215
0, /* THICKNESS => nothing */
11781216
0, /* PRINT => nothing */
11791217
0, /* STRING => nothing */
11801218
0, /* COMMA => nothing */
1219
+ 0, /* ISODATE => nothing */
11811220
0, /* CLASSNAME => nothing */
11821221
0, /* LB => nothing */
11831222
0, /* RB => nothing */
11841223
0, /* UP => nothing */
11851224
0, /* DOWN => nothing */
@@ -1359,120 +1398,122 @@
13591398
/* 21 */ "COLOR",
13601399
/* 22 */ "THICKNESS",
13611400
/* 23 */ "PRINT",
13621401
/* 24 */ "STRING",
13631402
/* 25 */ "COMMA",
1364
- /* 26 */ "CLASSNAME",
1365
- /* 27 */ "LB",
1366
- /* 28 */ "RB",
1367
- /* 29 */ "UP",
1368
- /* 30 */ "DOWN",
1369
- /* 31 */ "LEFT",
1370
- /* 32 */ "RIGHT",
1371
- /* 33 */ "CLOSE",
1372
- /* 34 */ "CHOP",
1373
- /* 35 */ "FROM",
1374
- /* 36 */ "TO",
1375
- /* 37 */ "THEN",
1376
- /* 38 */ "HEADING",
1377
- /* 39 */ "GO",
1378
- /* 40 */ "AT",
1379
- /* 41 */ "WITH",
1380
- /* 42 */ "SAME",
1381
- /* 43 */ "AS",
1382
- /* 44 */ "FIT",
1383
- /* 45 */ "BEHIND",
1384
- /* 46 */ "UNTIL",
1385
- /* 47 */ "EVEN",
1386
- /* 48 */ "DOT_E",
1387
- /* 49 */ "HEIGHT",
1388
- /* 50 */ "WIDTH",
1389
- /* 51 */ "RADIUS",
1390
- /* 52 */ "DIAMETER",
1391
- /* 53 */ "DOTTED",
1392
- /* 54 */ "DASHED",
1393
- /* 55 */ "CW",
1394
- /* 56 */ "CCW",
1395
- /* 57 */ "LARROW",
1396
- /* 58 */ "RARROW",
1397
- /* 59 */ "LRARROW",
1398
- /* 60 */ "INVIS",
1399
- /* 61 */ "THICK",
1400
- /* 62 */ "THIN",
1401
- /* 63 */ "SOLID",
1402
- /* 64 */ "CENTER",
1403
- /* 65 */ "LJUST",
1404
- /* 66 */ "RJUST",
1405
- /* 67 */ "ABOVE",
1406
- /* 68 */ "BELOW",
1407
- /* 69 */ "ITALIC",
1408
- /* 70 */ "BOLD",
1409
- /* 71 */ "MONO",
1410
- /* 72 */ "ALIGNED",
1411
- /* 73 */ "BIG",
1412
- /* 74 */ "SMALL",
1413
- /* 75 */ "AND",
1414
- /* 76 */ "LT",
1415
- /* 77 */ "GT",
1416
- /* 78 */ "ON",
1417
- /* 79 */ "WAY",
1418
- /* 80 */ "BETWEEN",
1419
- /* 81 */ "THE",
1420
- /* 82 */ "NTH",
1421
- /* 83 */ "VERTEX",
1422
- /* 84 */ "TOP",
1423
- /* 85 */ "BOTTOM",
1424
- /* 86 */ "START",
1425
- /* 87 */ "END",
1426
- /* 88 */ "IN",
1427
- /* 89 */ "THIS",
1428
- /* 90 */ "DOT_U",
1429
- /* 91 */ "LAST",
1430
- /* 92 */ "NUMBER",
1431
- /* 93 */ "FUNC1",
1432
- /* 94 */ "FUNC2",
1433
- /* 95 */ "DIST",
1434
- /* 96 */ "DOT_XY",
1435
- /* 97 */ "X",
1436
- /* 98 */ "Y",
1437
- /* 99 */ "DOT_L",
1438
- /* 100 */ "statement_list",
1439
- /* 101 */ "statement",
1440
- /* 102 */ "unnamed_statement",
1441
- /* 103 */ "basetype",
1442
- /* 104 */ "expr",
1443
- /* 105 */ "numproperty",
1444
- /* 106 */ "edge",
1445
- /* 107 */ "direction",
1446
- /* 108 */ "dashproperty",
1447
- /* 109 */ "colorproperty",
1448
- /* 110 */ "locproperty",
1449
- /* 111 */ "position",
1450
- /* 112 */ "place",
1451
- /* 113 */ "object",
1452
- /* 114 */ "objectname",
1453
- /* 115 */ "nth",
1454
- /* 116 */ "textposition",
1455
- /* 117 */ "rvalue",
1456
- /* 118 */ "lvalue",
1457
- /* 119 */ "even",
1458
- /* 120 */ "relexpr",
1459
- /* 121 */ "optrelexpr",
1460
- /* 122 */ "document",
1461
- /* 123 */ "print",
1462
- /* 124 */ "prlist",
1463
- /* 125 */ "pritem",
1464
- /* 126 */ "prsep",
1465
- /* 127 */ "attribute_list",
1466
- /* 128 */ "savelist",
1467
- /* 129 */ "alist",
1468
- /* 130 */ "attribute",
1469
- /* 131 */ "go",
1470
- /* 132 */ "boolproperty",
1471
- /* 133 */ "withclause",
1472
- /* 134 */ "between",
1473
- /* 135 */ "place2",
1403
+ /* 26 */ "ISODATE",
1404
+ /* 27 */ "CLASSNAME",
1405
+ /* 28 */ "LB",
1406
+ /* 29 */ "RB",
1407
+ /* 30 */ "UP",
1408
+ /* 31 */ "DOWN",
1409
+ /* 32 */ "LEFT",
1410
+ /* 33 */ "RIGHT",
1411
+ /* 34 */ "CLOSE",
1412
+ /* 35 */ "CHOP",
1413
+ /* 36 */ "FROM",
1414
+ /* 37 */ "TO",
1415
+ /* 38 */ "THEN",
1416
+ /* 39 */ "HEADING",
1417
+ /* 40 */ "GO",
1418
+ /* 41 */ "AT",
1419
+ /* 42 */ "WITH",
1420
+ /* 43 */ "SAME",
1421
+ /* 44 */ "AS",
1422
+ /* 45 */ "FIT",
1423
+ /* 46 */ "BEHIND",
1424
+ /* 47 */ "UNTIL",
1425
+ /* 48 */ "EVEN",
1426
+ /* 49 */ "DOT_E",
1427
+ /* 50 */ "HEIGHT",
1428
+ /* 51 */ "WIDTH",
1429
+ /* 52 */ "RADIUS",
1430
+ /* 53 */ "DIAMETER",
1431
+ /* 54 */ "DOTTED",
1432
+ /* 55 */ "DASHED",
1433
+ /* 56 */ "CW",
1434
+ /* 57 */ "CCW",
1435
+ /* 58 */ "LARROW",
1436
+ /* 59 */ "RARROW",
1437
+ /* 60 */ "LRARROW",
1438
+ /* 61 */ "INVIS",
1439
+ /* 62 */ "THICK",
1440
+ /* 63 */ "THIN",
1441
+ /* 64 */ "SOLID",
1442
+ /* 65 */ "CENTER",
1443
+ /* 66 */ "LJUST",
1444
+ /* 67 */ "RJUST",
1445
+ /* 68 */ "ABOVE",
1446
+ /* 69 */ "BELOW",
1447
+ /* 70 */ "ITALIC",
1448
+ /* 71 */ "BOLD",
1449
+ /* 72 */ "MONO",
1450
+ /* 73 */ "ALIGNED",
1451
+ /* 74 */ "BIG",
1452
+ /* 75 */ "SMALL",
1453
+ /* 76 */ "AND",
1454
+ /* 77 */ "LT",
1455
+ /* 78 */ "GT",
1456
+ /* 79 */ "ON",
1457
+ /* 80 */ "WAY",
1458
+ /* 81 */ "BETWEEN",
1459
+ /* 82 */ "THE",
1460
+ /* 83 */ "NTH",
1461
+ /* 84 */ "VERTEX",
1462
+ /* 85 */ "TOP",
1463
+ /* 86 */ "BOTTOM",
1464
+ /* 87 */ "START",
1465
+ /* 88 */ "END",
1466
+ /* 89 */ "IN",
1467
+ /* 90 */ "THIS",
1468
+ /* 91 */ "DOT_U",
1469
+ /* 92 */ "LAST",
1470
+ /* 93 */ "NUMBER",
1471
+ /* 94 */ "FUNC1",
1472
+ /* 95 */ "FUNC2",
1473
+ /* 96 */ "DIST",
1474
+ /* 97 */ "DOT_XY",
1475
+ /* 98 */ "X",
1476
+ /* 99 */ "Y",
1477
+ /* 100 */ "DOT_L",
1478
+ /* 101 */ "statement_list",
1479
+ /* 102 */ "statement",
1480
+ /* 103 */ "unnamed_statement",
1481
+ /* 104 */ "basetype",
1482
+ /* 105 */ "expr",
1483
+ /* 106 */ "numproperty",
1484
+ /* 107 */ "edge",
1485
+ /* 108 */ "isodate",
1486
+ /* 109 */ "direction",
1487
+ /* 110 */ "dashproperty",
1488
+ /* 111 */ "colorproperty",
1489
+ /* 112 */ "locproperty",
1490
+ /* 113 */ "position",
1491
+ /* 114 */ "place",
1492
+ /* 115 */ "object",
1493
+ /* 116 */ "objectname",
1494
+ /* 117 */ "nth",
1495
+ /* 118 */ "textposition",
1496
+ /* 119 */ "rvalue",
1497
+ /* 120 */ "lvalue",
1498
+ /* 121 */ "even",
1499
+ /* 122 */ "relexpr",
1500
+ /* 123 */ "optrelexpr",
1501
+ /* 124 */ "document",
1502
+ /* 125 */ "print",
1503
+ /* 126 */ "prlist",
1504
+ /* 127 */ "pritem",
1505
+ /* 128 */ "prsep",
1506
+ /* 129 */ "attribute_list",
1507
+ /* 130 */ "savelist",
1508
+ /* 131 */ "alist",
1509
+ /* 132 */ "attribute",
1510
+ /* 133 */ "go",
1511
+ /* 134 */ "boolproperty",
1512
+ /* 135 */ "withclause",
1513
+ /* 136 */ "between",
1514
+ /* 137 */ "place2",
14741515
};
14751516
#endif /* defined(YYCOVERAGE) || !defined(NDEBUG) */
14761517
14771518
#ifndef NDEBUG
14781519
/* For tracing reduce actions, the names of all rules are required.
@@ -1755,24 +1796,24 @@
17551796
** Note: during a reduce, the only symbols destroyed are those
17561797
** which appear on the RHS of the rule, but which are *not* used
17571798
** inside the C code.
17581799
*/
17591800
/********* Begin destructor definitions ***************************************/
1760
- case 100: /* statement_list */
1761
-{
1762
-#line 523 "pikchr.y"
1763
-pik_elist_free(p,(yypminor->yy235));
1764
-#line 1789 "pikchr.c"
1765
-}
1766
- break;
1767
- case 101: /* statement */
1768
- case 102: /* unnamed_statement */
1769
- case 103: /* basetype */
1770
-{
1771
-#line 525 "pikchr.y"
1772
-pik_elem_free(p,(yypminor->yy162));
1773
-#line 1798 "pikchr.c"
1801
+ case 101: /* statement_list */
1802
+{
1803
+#line 524 "pikchr.y"
1804
+pik_elist_free(p,(yypminor->yy23));
1805
+#line 1805 "pikchr.c"
1806
+}
1807
+ break;
1808
+ case 102: /* statement */
1809
+ case 103: /* unnamed_statement */
1810
+ case 104: /* basetype */
1811
+{
1812
+#line 526 "pikchr.y"
1813
+pik_elem_free(p,(yypminor->yy54));
1814
+#line 1814 "pikchr.c"
17741815
}
17751816
break;
17761817
/********* End destructor definitions *****************************************/
17771818
default: break; /* If no destructor action specified: do nothing */
17781819
}
@@ -2003,14 +2044,14 @@
20032044
#endif
20042045
while( yypParser->yytos>yypParser->yystack ) yy_pop_parser_stack(yypParser);
20052046
/* Here code is inserted which will execute if the parser
20062047
** stack every overflows */
20072048
/******** Begin %stack_overflow code ******************************************/
2008
-#line 557 "pikchr.y"
2049
+#line 559 "pikchr.y"
20092050
20102051
pik_error(p, 0, "parser stack overflow");
2011
-#line 2036 "pikchr.c"
2052
+#line 2052 "pikchr.c"
20122053
/******** End %stack_overflow code ********************************************/
20132054
pik_parserARG_STORE /* Suppress warning about unused %extra_argument var */
20142055
pik_parserCTX_STORE
20152056
}
20162057
@@ -2072,166 +2113,166 @@
20722113
}
20732114
20742115
/* For rule J, yyRuleInfoLhs[J] contains the symbol on the left-hand side
20752116
** of that rule */
20762117
static const YYCODETYPE yyRuleInfoLhs[] = {
2077
- 122, /* (0) document ::= statement_list */
2078
- 100, /* (1) statement_list ::= statement */
2079
- 100, /* (2) statement_list ::= statement_list EOL statement */
2080
- 101, /* (3) statement ::= */
2081
- 101, /* (4) statement ::= direction */
2082
- 101, /* (5) statement ::= lvalue ASSIGN rvalue */
2083
- 101, /* (6) statement ::= PLACENAME COLON unnamed_statement */
2084
- 101, /* (7) statement ::= PLACENAME COLON position */
2085
- 101, /* (8) statement ::= unnamed_statement */
2086
- 101, /* (9) statement ::= print prlist */
2087
- 101, /* (10) statement ::= ASSERT LP expr EQ expr RP */
2088
- 101, /* (11) statement ::= ASSERT LP position EQ position RP */
2089
- 101, /* (12) statement ::= DEFINE ID CODEBLOCK */
2090
- 117, /* (13) rvalue ::= PLACENAME */
2091
- 125, /* (14) pritem ::= FILL */
2092
- 125, /* (15) pritem ::= COLOR */
2093
- 125, /* (16) pritem ::= THICKNESS */
2094
- 125, /* (17) pritem ::= rvalue */
2095
- 125, /* (18) pritem ::= STRING */
2096
- 126, /* (19) prsep ::= COMMA */
2097
- 102, /* (20) unnamed_statement ::= basetype attribute_list */
2098
- 103, /* (21) basetype ::= CLASSNAME */
2099
- 103, /* (22) basetype ::= STRING textposition */
2100
- 103, /* (23) basetype ::= LB savelist statement_list RB */
2101
- 128, /* (24) savelist ::= */
2102
- 120, /* (25) relexpr ::= expr */
2103
- 120, /* (26) relexpr ::= expr PERCENT */
2104
- 121, /* (27) optrelexpr ::= */
2105
- 127, /* (28) attribute_list ::= relexpr alist */
2106
- 130, /* (29) attribute ::= numproperty relexpr */
2107
- 130, /* (30) attribute ::= dashproperty expr */
2108
- 130, /* (31) attribute ::= dashproperty */
2109
- 130, /* (32) attribute ::= colorproperty rvalue */
2110
- 130, /* (33) attribute ::= go direction optrelexpr */
2111
- 130, /* (34) attribute ::= go direction even position */
2112
- 130, /* (35) attribute ::= CLOSE */
2113
- 130, /* (36) attribute ::= CHOP */
2114
- 130, /* (37) attribute ::= FROM position */
2115
- 130, /* (38) attribute ::= TO position */
2116
- 130, /* (39) attribute ::= THEN */
2117
- 130, /* (40) attribute ::= THEN optrelexpr HEADING expr */
2118
- 130, /* (41) attribute ::= THEN optrelexpr EDGEPT */
2119
- 130, /* (42) attribute ::= GO optrelexpr HEADING expr */
2120
- 130, /* (43) attribute ::= GO optrelexpr EDGEPT */
2121
- 130, /* (44) attribute ::= AT position */
2122
- 130, /* (45) attribute ::= SAME */
2123
- 130, /* (46) attribute ::= SAME AS object */
2124
- 130, /* (47) attribute ::= STRING textposition */
2125
- 130, /* (48) attribute ::= FIT */
2126
- 130, /* (49) attribute ::= BEHIND object */
2127
- 133, /* (50) withclause ::= DOT_E edge AT position */
2128
- 133, /* (51) withclause ::= edge AT position */
2129
- 105, /* (52) numproperty ::= HEIGHT|WIDTH|RADIUS|DIAMETER|THICKNESS */
2130
- 132, /* (53) boolproperty ::= CW */
2131
- 132, /* (54) boolproperty ::= CCW */
2132
- 132, /* (55) boolproperty ::= LARROW */
2133
- 132, /* (56) boolproperty ::= RARROW */
2134
- 132, /* (57) boolproperty ::= LRARROW */
2135
- 132, /* (58) boolproperty ::= INVIS */
2136
- 132, /* (59) boolproperty ::= THICK */
2137
- 132, /* (60) boolproperty ::= THIN */
2138
- 132, /* (61) boolproperty ::= SOLID */
2139
- 116, /* (62) textposition ::= */
2140
- 116, /* (63) textposition ::= textposition CENTER|LJUST|RJUST|ABOVE|BELOW|ITALIC|BOLD|MONO|ALIGNED|BIG|SMALL */
2141
- 111, /* (64) position ::= expr COMMA expr */
2142
- 111, /* (65) position ::= place PLUS expr COMMA expr */
2143
- 111, /* (66) position ::= place MINUS expr COMMA expr */
2144
- 111, /* (67) position ::= place PLUS LP expr COMMA expr RP */
2145
- 111, /* (68) position ::= place MINUS LP expr COMMA expr RP */
2146
- 111, /* (69) position ::= LP position COMMA position RP */
2147
- 111, /* (70) position ::= LP position RP */
2148
- 111, /* (71) position ::= expr between position AND position */
2149
- 111, /* (72) position ::= expr LT position COMMA position GT */
2150
- 111, /* (73) position ::= expr ABOVE position */
2151
- 111, /* (74) position ::= expr BELOW position */
2152
- 111, /* (75) position ::= expr LEFT OF position */
2153
- 111, /* (76) position ::= expr RIGHT OF position */
2154
- 111, /* (77) position ::= expr ON HEADING EDGEPT OF position */
2155
- 111, /* (78) position ::= expr HEADING EDGEPT OF position */
2156
- 111, /* (79) position ::= expr EDGEPT OF position */
2157
- 111, /* (80) position ::= expr ON HEADING expr FROM position */
2158
- 111, /* (81) position ::= expr HEADING expr FROM position */
2159
- 112, /* (82) place ::= edge OF object */
2160
- 135, /* (83) place2 ::= object */
2161
- 135, /* (84) place2 ::= object DOT_E edge */
2162
- 135, /* (85) place2 ::= NTH VERTEX OF object */
2163
- 113, /* (86) object ::= nth */
2164
- 113, /* (87) object ::= nth OF|IN object */
2165
- 114, /* (88) objectname ::= THIS */
2166
- 114, /* (89) objectname ::= PLACENAME */
2167
- 114, /* (90) objectname ::= objectname DOT_U PLACENAME */
2168
- 115, /* (91) nth ::= NTH CLASSNAME */
2169
- 115, /* (92) nth ::= NTH LAST CLASSNAME */
2170
- 115, /* (93) nth ::= LAST CLASSNAME */
2171
- 115, /* (94) nth ::= LAST */
2172
- 115, /* (95) nth ::= NTH LB RB */
2173
- 115, /* (96) nth ::= NTH LAST LB RB */
2174
- 115, /* (97) nth ::= LAST LB RB */
2175
- 104, /* (98) expr ::= expr PLUS expr */
2176
- 104, /* (99) expr ::= expr MINUS expr */
2177
- 104, /* (100) expr ::= expr STAR expr */
2178
- 104, /* (101) expr ::= expr SLASH expr */
2179
- 104, /* (102) expr ::= MINUS expr */
2180
- 104, /* (103) expr ::= PLUS expr */
2181
- 104, /* (104) expr ::= LP expr RP */
2182
- 104, /* (105) expr ::= LP FILL|COLOR|THICKNESS RP */
2183
- 104, /* (106) expr ::= NUMBER */
2184
- 104, /* (107) expr ::= ID */
2185
- 104, /* (108) expr ::= FUNC1 LP expr RP */
2186
- 104, /* (109) expr ::= FUNC2 LP expr COMMA expr RP */
2187
- 104, /* (110) expr ::= DIST LP position COMMA position RP */
2188
- 104, /* (111) expr ::= place2 DOT_XY X */
2189
- 104, /* (112) expr ::= place2 DOT_XY Y */
2190
- 104, /* (113) expr ::= object DOT_L numproperty */
2191
- 104, /* (114) expr ::= object DOT_L dashproperty */
2192
- 104, /* (115) expr ::= object DOT_L colorproperty */
2193
- 118, /* (116) lvalue ::= ID */
2194
- 118, /* (117) lvalue ::= FILL */
2195
- 118, /* (118) lvalue ::= COLOR */
2196
- 118, /* (119) lvalue ::= THICKNESS */
2197
- 117, /* (120) rvalue ::= expr */
2198
- 123, /* (121) print ::= PRINT */
2199
- 124, /* (122) prlist ::= pritem */
2200
- 124, /* (123) prlist ::= prlist prsep pritem */
2201
- 107, /* (124) direction ::= UP */
2202
- 107, /* (125) direction ::= DOWN */
2203
- 107, /* (126) direction ::= LEFT */
2204
- 107, /* (127) direction ::= RIGHT */
2205
- 121, /* (128) optrelexpr ::= relexpr */
2206
- 127, /* (129) attribute_list ::= alist */
2207
- 129, /* (130) alist ::= */
2208
- 129, /* (131) alist ::= alist attribute */
2209
- 130, /* (132) attribute ::= boolproperty */
2210
- 130, /* (133) attribute ::= WITH withclause */
2211
- 131, /* (134) go ::= GO */
2212
- 131, /* (135) go ::= */
2213
- 119, /* (136) even ::= UNTIL EVEN WITH */
2214
- 119, /* (137) even ::= EVEN WITH */
2215
- 108, /* (138) dashproperty ::= DOTTED */
2216
- 108, /* (139) dashproperty ::= DASHED */
2217
- 109, /* (140) colorproperty ::= FILL */
2218
- 109, /* (141) colorproperty ::= COLOR */
2219
- 111, /* (142) position ::= place */
2220
- 134, /* (143) between ::= WAY BETWEEN */
2221
- 134, /* (144) between ::= BETWEEN */
2222
- 134, /* (145) between ::= OF THE WAY BETWEEN */
2223
- 112, /* (146) place ::= place2 */
2224
- 106, /* (147) edge ::= CENTER */
2225
- 106, /* (148) edge ::= EDGEPT */
2226
- 106, /* (149) edge ::= TOP */
2227
- 106, /* (150) edge ::= BOTTOM */
2228
- 106, /* (151) edge ::= START */
2229
- 106, /* (152) edge ::= END */
2230
- 106, /* (153) edge ::= RIGHT */
2231
- 106, /* (154) edge ::= LEFT */
2232
- 113, /* (155) object ::= objectname */
2118
+ 124, /* (0) document ::= statement_list */
2119
+ 101, /* (1) statement_list ::= statement */
2120
+ 101, /* (2) statement_list ::= statement_list EOL statement */
2121
+ 102, /* (3) statement ::= */
2122
+ 102, /* (4) statement ::= direction */
2123
+ 102, /* (5) statement ::= lvalue ASSIGN rvalue */
2124
+ 102, /* (6) statement ::= PLACENAME COLON unnamed_statement */
2125
+ 102, /* (7) statement ::= PLACENAME COLON position */
2126
+ 102, /* (8) statement ::= unnamed_statement */
2127
+ 102, /* (9) statement ::= print prlist */
2128
+ 102, /* (10) statement ::= ASSERT LP expr EQ expr RP */
2129
+ 102, /* (11) statement ::= ASSERT LP position EQ position RP */
2130
+ 102, /* (12) statement ::= DEFINE ID CODEBLOCK */
2131
+ 119, /* (13) rvalue ::= PLACENAME */
2132
+ 127, /* (14) pritem ::= FILL */
2133
+ 127, /* (15) pritem ::= COLOR */
2134
+ 127, /* (16) pritem ::= THICKNESS */
2135
+ 127, /* (17) pritem ::= rvalue */
2136
+ 127, /* (18) pritem ::= STRING */
2137
+ 128, /* (19) prsep ::= COMMA */
2138
+ 103, /* (20) unnamed_statement ::= basetype attribute_list */
2139
+ 104, /* (21) basetype ::= CLASSNAME */
2140
+ 104, /* (22) basetype ::= STRING textposition */
2141
+ 104, /* (23) basetype ::= LB savelist statement_list RB */
2142
+ 130, /* (24) savelist ::= */
2143
+ 122, /* (25) relexpr ::= expr */
2144
+ 122, /* (26) relexpr ::= expr PERCENT */
2145
+ 123, /* (27) optrelexpr ::= */
2146
+ 129, /* (28) attribute_list ::= relexpr alist */
2147
+ 132, /* (29) attribute ::= numproperty relexpr */
2148
+ 132, /* (30) attribute ::= dashproperty expr */
2149
+ 132, /* (31) attribute ::= dashproperty */
2150
+ 132, /* (32) attribute ::= colorproperty rvalue */
2151
+ 132, /* (33) attribute ::= go direction optrelexpr */
2152
+ 132, /* (34) attribute ::= go direction even position */
2153
+ 132, /* (35) attribute ::= CLOSE */
2154
+ 132, /* (36) attribute ::= CHOP */
2155
+ 132, /* (37) attribute ::= FROM position */
2156
+ 132, /* (38) attribute ::= TO position */
2157
+ 132, /* (39) attribute ::= THEN */
2158
+ 132, /* (40) attribute ::= THEN optrelexpr HEADING expr */
2159
+ 132, /* (41) attribute ::= THEN optrelexpr EDGEPT */
2160
+ 132, /* (42) attribute ::= GO optrelexpr HEADING expr */
2161
+ 132, /* (43) attribute ::= GO optrelexpr EDGEPT */
2162
+ 132, /* (44) attribute ::= AT position */
2163
+ 132, /* (45) attribute ::= SAME */
2164
+ 132, /* (46) attribute ::= SAME AS object */
2165
+ 132, /* (47) attribute ::= STRING textposition */
2166
+ 132, /* (48) attribute ::= FIT */
2167
+ 132, /* (49) attribute ::= BEHIND object */
2168
+ 135, /* (50) withclause ::= DOT_E edge AT position */
2169
+ 135, /* (51) withclause ::= edge AT position */
2170
+ 106, /* (52) numproperty ::= HEIGHT|WIDTH|RADIUS|DIAMETER|THICKNESS */
2171
+ 134, /* (53) boolproperty ::= CW */
2172
+ 134, /* (54) boolproperty ::= CCW */
2173
+ 134, /* (55) boolproperty ::= LARROW */
2174
+ 134, /* (56) boolproperty ::= RARROW */
2175
+ 134, /* (57) boolproperty ::= LRARROW */
2176
+ 134, /* (58) boolproperty ::= INVIS */
2177
+ 134, /* (59) boolproperty ::= THICK */
2178
+ 134, /* (60) boolproperty ::= THIN */
2179
+ 134, /* (61) boolproperty ::= SOLID */
2180
+ 118, /* (62) textposition ::= */
2181
+ 118, /* (63) textposition ::= textposition CENTER|LJUST|RJUST|ABOVE|BELOW|ITALIC|BOLD|MONO|ALIGNED|BIG|SMALL */
2182
+ 113, /* (64) position ::= expr COMMA expr */
2183
+ 113, /* (65) position ::= place PLUS expr COMMA expr */
2184
+ 113, /* (66) position ::= place MINUS expr COMMA expr */
2185
+ 113, /* (67) position ::= place PLUS LP expr COMMA expr RP */
2186
+ 113, /* (68) position ::= place MINUS LP expr COMMA expr RP */
2187
+ 113, /* (69) position ::= LP position COMMA position RP */
2188
+ 113, /* (70) position ::= LP position RP */
2189
+ 113, /* (71) position ::= expr between position AND position */
2190
+ 113, /* (72) position ::= expr LT position COMMA position GT */
2191
+ 113, /* (73) position ::= expr ABOVE position */
2192
+ 113, /* (74) position ::= expr BELOW position */
2193
+ 113, /* (75) position ::= expr LEFT OF position */
2194
+ 113, /* (76) position ::= expr RIGHT OF position */
2195
+ 113, /* (77) position ::= expr ON HEADING EDGEPT OF position */
2196
+ 113, /* (78) position ::= expr HEADING EDGEPT OF position */
2197
+ 113, /* (79) position ::= expr EDGEPT OF position */
2198
+ 113, /* (80) position ::= expr ON HEADING expr FROM position */
2199
+ 113, /* (81) position ::= expr HEADING expr FROM position */
2200
+ 114, /* (82) place ::= edge OF object */
2201
+ 137, /* (83) place2 ::= object */
2202
+ 137, /* (84) place2 ::= object DOT_E edge */
2203
+ 137, /* (85) place2 ::= NTH VERTEX OF object */
2204
+ 115, /* (86) object ::= nth */
2205
+ 115, /* (87) object ::= nth OF|IN object */
2206
+ 116, /* (88) objectname ::= THIS */
2207
+ 116, /* (89) objectname ::= PLACENAME */
2208
+ 116, /* (90) objectname ::= objectname DOT_U PLACENAME */
2209
+ 117, /* (91) nth ::= NTH CLASSNAME */
2210
+ 117, /* (92) nth ::= NTH LAST CLASSNAME */
2211
+ 117, /* (93) nth ::= LAST CLASSNAME */
2212
+ 117, /* (94) nth ::= LAST */
2213
+ 117, /* (95) nth ::= NTH LB RB */
2214
+ 117, /* (96) nth ::= NTH LAST LB RB */
2215
+ 117, /* (97) nth ::= LAST LB RB */
2216
+ 105, /* (98) expr ::= expr PLUS expr */
2217
+ 105, /* (99) expr ::= expr MINUS expr */
2218
+ 105, /* (100) expr ::= expr STAR expr */
2219
+ 105, /* (101) expr ::= expr SLASH expr */
2220
+ 105, /* (102) expr ::= MINUS expr */
2221
+ 105, /* (103) expr ::= PLUS expr */
2222
+ 105, /* (104) expr ::= LP expr RP */
2223
+ 105, /* (105) expr ::= LP FILL|COLOR|THICKNESS RP */
2224
+ 105, /* (106) expr ::= NUMBER */
2225
+ 105, /* (107) expr ::= ID */
2226
+ 105, /* (108) expr ::= FUNC1 LP expr RP */
2227
+ 105, /* (109) expr ::= FUNC2 LP expr COMMA expr RP */
2228
+ 105, /* (110) expr ::= DIST LP position COMMA position RP */
2229
+ 105, /* (111) expr ::= place2 DOT_XY X */
2230
+ 105, /* (112) expr ::= place2 DOT_XY Y */
2231
+ 105, /* (113) expr ::= object DOT_L numproperty */
2232
+ 105, /* (114) expr ::= object DOT_L dashproperty */
2233
+ 105, /* (115) expr ::= object DOT_L colorproperty */
2234
+ 120, /* (116) lvalue ::= ID */
2235
+ 120, /* (117) lvalue ::= FILL */
2236
+ 120, /* (118) lvalue ::= COLOR */
2237
+ 120, /* (119) lvalue ::= THICKNESS */
2238
+ 119, /* (120) rvalue ::= expr */
2239
+ 125, /* (121) print ::= PRINT */
2240
+ 126, /* (122) prlist ::= pritem */
2241
+ 126, /* (123) prlist ::= prlist prsep pritem */
2242
+ 109, /* (124) direction ::= UP */
2243
+ 109, /* (125) direction ::= DOWN */
2244
+ 109, /* (126) direction ::= LEFT */
2245
+ 109, /* (127) direction ::= RIGHT */
2246
+ 123, /* (128) optrelexpr ::= relexpr */
2247
+ 129, /* (129) attribute_list ::= alist */
2248
+ 131, /* (130) alist ::= */
2249
+ 131, /* (131) alist ::= alist attribute */
2250
+ 132, /* (132) attribute ::= boolproperty */
2251
+ 132, /* (133) attribute ::= WITH withclause */
2252
+ 133, /* (134) go ::= GO */
2253
+ 133, /* (135) go ::= */
2254
+ 121, /* (136) even ::= UNTIL EVEN WITH */
2255
+ 121, /* (137) even ::= EVEN WITH */
2256
+ 110, /* (138) dashproperty ::= DOTTED */
2257
+ 110, /* (139) dashproperty ::= DASHED */
2258
+ 111, /* (140) colorproperty ::= FILL */
2259
+ 111, /* (141) colorproperty ::= COLOR */
2260
+ 113, /* (142) position ::= place */
2261
+ 136, /* (143) between ::= WAY BETWEEN */
2262
+ 136, /* (144) between ::= BETWEEN */
2263
+ 136, /* (145) between ::= OF THE WAY BETWEEN */
2264
+ 114, /* (146) place ::= place2 */
2265
+ 107, /* (147) edge ::= CENTER */
2266
+ 107, /* (148) edge ::= EDGEPT */
2267
+ 107, /* (149) edge ::= TOP */
2268
+ 107, /* (150) edge ::= BOTTOM */
2269
+ 107, /* (151) edge ::= START */
2270
+ 107, /* (152) edge ::= END */
2271
+ 107, /* (153) edge ::= RIGHT */
2272
+ 107, /* (154) edge ::= LEFT */
2273
+ 115, /* (155) object ::= objectname */
22332274
};
22342275
22352276
/* For rule J, yyRuleInfoNRhs[J] contains the negative of the number
22362277
** of symbols on the right-hand side of that rule. */
22372278
static const signed char yyRuleInfoNRhs[] = {
@@ -2431,620 +2472,620 @@
24312472
** break;
24322473
*/
24332474
/********** Begin reduce actions **********************************************/
24342475
YYMINORTYPE yylhsminor;
24352476
case 0: /* document ::= statement_list */
2436
-#line 561 "pikchr.y"
2437
-{pik_render(p,yymsp[0].minor.yy235);}
2438
-#line 2463 "pikchr.c"
2477
+#line 563 "pikchr.y"
2478
+{pik_render(p,yymsp[0].minor.yy23);}
2479
+#line 2479 "pikchr.c"
24392480
break;
24402481
case 1: /* statement_list ::= statement */
2441
-#line 564 "pikchr.y"
2442
-{ yylhsminor.yy235 = pik_elist_append(p,0,yymsp[0].minor.yy162); }
2443
-#line 2468 "pikchr.c"
2444
- yymsp[0].minor.yy235 = yylhsminor.yy235;
2482
+#line 566 "pikchr.y"
2483
+{ yylhsminor.yy23 = pik_elist_append(p,0,yymsp[0].minor.yy54); }
2484
+#line 2484 "pikchr.c"
2485
+ yymsp[0].minor.yy23 = yylhsminor.yy23;
24452486
break;
24462487
case 2: /* statement_list ::= statement_list EOL statement */
2447
-#line 566 "pikchr.y"
2448
-{ yylhsminor.yy235 = pik_elist_append(p,yymsp[-2].minor.yy235,yymsp[0].minor.yy162); }
2449
-#line 2474 "pikchr.c"
2450
- yymsp[-2].minor.yy235 = yylhsminor.yy235;
2488
+#line 568 "pikchr.y"
2489
+{ yylhsminor.yy23 = pik_elist_append(p,yymsp[-2].minor.yy23,yymsp[0].minor.yy54); }
2490
+#line 2490 "pikchr.c"
2491
+ yymsp[-2].minor.yy23 = yylhsminor.yy23;
24512492
break;
24522493
case 3: /* statement ::= */
2453
-#line 569 "pikchr.y"
2454
-{ yymsp[1].minor.yy162 = 0; }
2455
-#line 2480 "pikchr.c"
2494
+#line 571 "pikchr.y"
2495
+{ yymsp[1].minor.yy54 = 0; }
2496
+#line 2496 "pikchr.c"
24562497
break;
24572498
case 4: /* statement ::= direction */
2458
-#line 570 "pikchr.y"
2459
-{ pik_set_direction(p,yymsp[0].minor.yy0.eCode); yylhsminor.yy162=0; }
2460
-#line 2485 "pikchr.c"
2461
- yymsp[0].minor.yy162 = yylhsminor.yy162;
2499
+#line 572 "pikchr.y"
2500
+{ pik_set_direction(p,yymsp[0].minor.yy0.eCode); yylhsminor.yy54=0; }
2501
+#line 2501 "pikchr.c"
2502
+ yymsp[0].minor.yy54 = yylhsminor.yy54;
24622503
break;
24632504
case 5: /* statement ::= lvalue ASSIGN rvalue */
2464
-#line 571 "pikchr.y"
2465
-{pik_set_var(p,&yymsp[-2].minor.yy0,yymsp[0].minor.yy21,&yymsp[-1].minor.yy0); yylhsminor.yy162=0;}
2466
-#line 2491 "pikchr.c"
2467
- yymsp[-2].minor.yy162 = yylhsminor.yy162;
2505
+#line 573 "pikchr.y"
2506
+{pik_set_var(p,&yymsp[-2].minor.yy0,yymsp[0].minor.yy129,&yymsp[-1].minor.yy0); yylhsminor.yy54=0;}
2507
+#line 2507 "pikchr.c"
2508
+ yymsp[-2].minor.yy54 = yylhsminor.yy54;
24682509
break;
24692510
case 6: /* statement ::= PLACENAME COLON unnamed_statement */
2470
-#line 573 "pikchr.y"
2471
-{ yylhsminor.yy162 = yymsp[0].minor.yy162; pik_elem_setname(p,yymsp[0].minor.yy162,&yymsp[-2].minor.yy0); }
2472
-#line 2497 "pikchr.c"
2473
- yymsp[-2].minor.yy162 = yylhsminor.yy162;
2511
+#line 575 "pikchr.y"
2512
+{ yylhsminor.yy54 = yymsp[0].minor.yy54; pik_elem_setname(p,yymsp[0].minor.yy54,&yymsp[-2].minor.yy0); }
2513
+#line 2513 "pikchr.c"
2514
+ yymsp[-2].minor.yy54 = yylhsminor.yy54;
24742515
break;
24752516
case 7: /* statement ::= PLACENAME COLON position */
2476
-#line 575 "pikchr.y"
2477
-{ yylhsminor.yy162 = pik_elem_new(p,0,0,0);
2478
- if(yylhsminor.yy162){ yylhsminor.yy162->ptAt = yymsp[0].minor.yy63; pik_elem_setname(p,yylhsminor.yy162,&yymsp[-2].minor.yy0); }}
2479
-#line 2504 "pikchr.c"
2480
- yymsp[-2].minor.yy162 = yylhsminor.yy162;
2517
+#line 577 "pikchr.y"
2518
+{ yylhsminor.yy54 = pik_elem_new(p,0,0,0);
2519
+ if(yylhsminor.yy54){ yylhsminor.yy54->ptAt = yymsp[0].minor.yy187; pik_elem_setname(p,yylhsminor.yy54,&yymsp[-2].minor.yy0); }}
2520
+#line 2520 "pikchr.c"
2521
+ yymsp[-2].minor.yy54 = yylhsminor.yy54;
24812522
break;
24822523
case 8: /* statement ::= unnamed_statement */
2483
-#line 577 "pikchr.y"
2484
-{yylhsminor.yy162 = yymsp[0].minor.yy162;}
2485
-#line 2510 "pikchr.c"
2486
- yymsp[0].minor.yy162 = yylhsminor.yy162;
2524
+#line 579 "pikchr.y"
2525
+{yylhsminor.yy54 = yymsp[0].minor.yy54;}
2526
+#line 2526 "pikchr.c"
2527
+ yymsp[0].minor.yy54 = yylhsminor.yy54;
24872528
break;
24882529
case 9: /* statement ::= print prlist */
2489
-#line 578 "pikchr.y"
2490
-{pik_append(p,"<br>\n",5); yymsp[-1].minor.yy162=0;}
2491
-#line 2516 "pikchr.c"
2530
+#line 580 "pikchr.y"
2531
+{pik_append(p,"<br>\n",5); yymsp[-1].minor.yy54=0;}
2532
+#line 2532 "pikchr.c"
24922533
break;
24932534
case 10: /* statement ::= ASSERT LP expr EQ expr RP */
2494
-#line 583 "pikchr.y"
2495
-{yymsp[-5].minor.yy162=pik_assert(p,yymsp[-3].minor.yy21,&yymsp[-2].minor.yy0,yymsp[-1].minor.yy21);}
2496
-#line 2521 "pikchr.c"
2535
+#line 585 "pikchr.y"
2536
+{yymsp[-5].minor.yy54=pik_assert(p,yymsp[-3].minor.yy129,&yymsp[-2].minor.yy0,yymsp[-1].minor.yy129);}
2537
+#line 2537 "pikchr.c"
24972538
break;
24982539
case 11: /* statement ::= ASSERT LP position EQ position RP */
2499
-#line 585 "pikchr.y"
2500
-{yymsp[-5].minor.yy162=pik_position_assert(p,&yymsp[-3].minor.yy63,&yymsp[-2].minor.yy0,&yymsp[-1].minor.yy63);}
2501
-#line 2526 "pikchr.c"
2540
+#line 587 "pikchr.y"
2541
+{yymsp[-5].minor.yy54=pik_position_assert(p,&yymsp[-3].minor.yy187,&yymsp[-2].minor.yy0,&yymsp[-1].minor.yy187);}
2542
+#line 2542 "pikchr.c"
25022543
break;
25032544
case 12: /* statement ::= DEFINE ID CODEBLOCK */
2504
-#line 586 "pikchr.y"
2505
-{yymsp[-2].minor.yy162=0; pik_add_macro(p,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy0);}
2506
-#line 2531 "pikchr.c"
2545
+#line 588 "pikchr.y"
2546
+{yymsp[-2].minor.yy54=0; pik_add_macro(p,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy0);}
2547
+#line 2547 "pikchr.c"
25072548
break;
25082549
case 13: /* rvalue ::= PLACENAME */
2509
-#line 597 "pikchr.y"
2510
-{yylhsminor.yy21 = pik_lookup_color(p,&yymsp[0].minor.yy0);}
2511
-#line 2536 "pikchr.c"
2512
- yymsp[0].minor.yy21 = yylhsminor.yy21;
2550
+#line 599 "pikchr.y"
2551
+{yylhsminor.yy129 = pik_lookup_color(p,&yymsp[0].minor.yy0);}
2552
+#line 2552 "pikchr.c"
2553
+ yymsp[0].minor.yy129 = yylhsminor.yy129;
25132554
break;
25142555
case 14: /* pritem ::= FILL */
25152556
case 15: /* pritem ::= COLOR */ yytestcase(yyruleno==15);
25162557
case 16: /* pritem ::= THICKNESS */ yytestcase(yyruleno==16);
2517
-#line 602 "pikchr.y"
2558
+#line 604 "pikchr.y"
25182559
{pik_append_num(p,"",pik_value(p,yymsp[0].minor.yy0.z,yymsp[0].minor.yy0.n,0));}
2519
-#line 2544 "pikchr.c"
2560
+#line 2560 "pikchr.c"
25202561
break;
25212562
case 17: /* pritem ::= rvalue */
2522
-#line 605 "pikchr.y"
2523
-{pik_append_num(p,"",yymsp[0].minor.yy21);}
2524
-#line 2549 "pikchr.c"
2563
+#line 607 "pikchr.y"
2564
+{pik_append_num(p,"",yymsp[0].minor.yy129);}
2565
+#line 2565 "pikchr.c"
25252566
break;
25262567
case 18: /* pritem ::= STRING */
2527
-#line 606 "pikchr.y"
2568
+#line 608 "pikchr.y"
25282569
{pik_append_text(p,yymsp[0].minor.yy0.z+1,yymsp[0].minor.yy0.n-2,0);}
2529
-#line 2554 "pikchr.c"
2570
+#line 2570 "pikchr.c"
25302571
break;
25312572
case 19: /* prsep ::= COMMA */
2532
-#line 607 "pikchr.y"
2573
+#line 609 "pikchr.y"
25332574
{pik_append(p, " ", 1);}
2534
-#line 2559 "pikchr.c"
2575
+#line 2575 "pikchr.c"
25352576
break;
25362577
case 20: /* unnamed_statement ::= basetype attribute_list */
2537
-#line 610 "pikchr.y"
2538
-{yylhsminor.yy162 = yymsp[-1].minor.yy162; pik_after_adding_attributes(p,yylhsminor.yy162);}
2539
-#line 2564 "pikchr.c"
2540
- yymsp[-1].minor.yy162 = yylhsminor.yy162;
2578
+#line 614 "pikchr.y"
2579
+{yylhsminor.yy54 = yymsp[-1].minor.yy54; pik_after_adding_attributes(p,yylhsminor.yy54);}
2580
+#line 2580 "pikchr.c"
2581
+ yymsp[-1].minor.yy54 = yylhsminor.yy54;
25412582
break;
25422583
case 21: /* basetype ::= CLASSNAME */
2543
-#line 612 "pikchr.y"
2544
-{yylhsminor.yy162 = pik_elem_new(p,&yymsp[0].minor.yy0,0,0); }
2545
-#line 2570 "pikchr.c"
2546
- yymsp[0].minor.yy162 = yylhsminor.yy162;
2584
+#line 616 "pikchr.y"
2585
+{yylhsminor.yy54 = pik_elem_new(p,&yymsp[0].minor.yy0,0,0); }
2586
+#line 2586 "pikchr.c"
2587
+ yymsp[0].minor.yy54 = yylhsminor.yy54;
25472588
break;
25482589
case 22: /* basetype ::= STRING textposition */
2549
-#line 614 "pikchr.y"
2550
-{yymsp[-1].minor.yy0.eCode = yymsp[0].minor.yy188; yylhsminor.yy162 = pik_elem_new(p,0,&yymsp[-1].minor.yy0,0); }
2551
-#line 2576 "pikchr.c"
2552
- yymsp[-1].minor.yy162 = yylhsminor.yy162;
2590
+#line 618 "pikchr.y"
2591
+{yymsp[-1].minor.yy0.eCode = yymsp[0].minor.yy272; yylhsminor.yy54 = pik_elem_new(p,0,&yymsp[-1].minor.yy0,0); }
2592
+#line 2592 "pikchr.c"
2593
+ yymsp[-1].minor.yy54 = yylhsminor.yy54;
25532594
break;
25542595
case 23: /* basetype ::= LB savelist statement_list RB */
2555
-#line 616 "pikchr.y"
2556
-{ p->list = yymsp[-2].minor.yy235; yymsp[-3].minor.yy162 = pik_elem_new(p,0,0,yymsp[-1].minor.yy235); if(yymsp[-3].minor.yy162) yymsp[-3].minor.yy162->errTok = yymsp[0].minor.yy0; }
2557
-#line 2582 "pikchr.c"
2596
+#line 620 "pikchr.y"
2597
+{ p->list = yymsp[-2].minor.yy23; yymsp[-3].minor.yy54 = pik_elem_new(p,0,0,yymsp[-1].minor.yy23); if(yymsp[-3].minor.yy54) yymsp[-3].minor.yy54->errTok = yymsp[0].minor.yy0; }
2598
+#line 2598 "pikchr.c"
25582599
break;
25592600
case 24: /* savelist ::= */
2560
-#line 621 "pikchr.y"
2561
-{yymsp[1].minor.yy235 = p->list; p->list = 0;}
2562
-#line 2587 "pikchr.c"
2601
+#line 625 "pikchr.y"
2602
+{yymsp[1].minor.yy23 = p->list; p->list = 0;}
2603
+#line 2603 "pikchr.c"
25632604
break;
25642605
case 25: /* relexpr ::= expr */
2565
-#line 628 "pikchr.y"
2566
-{yylhsminor.yy72.rAbs = yymsp[0].minor.yy21; yylhsminor.yy72.rRel = 0;}
2567
-#line 2592 "pikchr.c"
2568
- yymsp[0].minor.yy72 = yylhsminor.yy72;
2606
+#line 632 "pikchr.y"
2607
+{yylhsminor.yy28.rAbs = yymsp[0].minor.yy129; yylhsminor.yy28.rRel = 0;}
2608
+#line 2608 "pikchr.c"
2609
+ yymsp[0].minor.yy28 = yylhsminor.yy28;
25692610
break;
25702611
case 26: /* relexpr ::= expr PERCENT */
2571
-#line 629 "pikchr.y"
2572
-{yylhsminor.yy72.rAbs = 0; yylhsminor.yy72.rRel = yymsp[-1].minor.yy21/100;}
2573
-#line 2598 "pikchr.c"
2574
- yymsp[-1].minor.yy72 = yylhsminor.yy72;
2612
+#line 633 "pikchr.y"
2613
+{yylhsminor.yy28.rAbs = 0; yylhsminor.yy28.rRel = yymsp[-1].minor.yy129/100;}
2614
+#line 2614 "pikchr.c"
2615
+ yymsp[-1].minor.yy28 = yylhsminor.yy28;
25752616
break;
25762617
case 27: /* optrelexpr ::= */
2577
-#line 631 "pikchr.y"
2578
-{yymsp[1].minor.yy72.rAbs = 0; yymsp[1].minor.yy72.rRel = 1.0;}
2579
-#line 2604 "pikchr.c"
2618
+#line 635 "pikchr.y"
2619
+{yymsp[1].minor.yy28.rAbs = 0; yymsp[1].minor.yy28.rRel = 1.0;}
2620
+#line 2620 "pikchr.c"
25802621
break;
25812622
case 28: /* attribute_list ::= relexpr alist */
2582
-#line 633 "pikchr.y"
2583
-{pik_add_direction(p,0,&yymsp[-1].minor.yy72);}
2584
-#line 2609 "pikchr.c"
2623
+#line 637 "pikchr.y"
2624
+{pik_add_direction(p,0,&yymsp[-1].minor.yy28);}
2625
+#line 2625 "pikchr.c"
25852626
break;
25862627
case 29: /* attribute ::= numproperty relexpr */
2587
-#line 637 "pikchr.y"
2588
-{ pik_set_numprop(p,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy72); }
2589
-#line 2614 "pikchr.c"
2628
+#line 641 "pikchr.y"
2629
+{ pik_set_numprop(p,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy28); }
2630
+#line 2630 "pikchr.c"
25902631
break;
25912632
case 30: /* attribute ::= dashproperty expr */
2592
-#line 638 "pikchr.y"
2593
-{ pik_set_dashed(p,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy21); }
2594
-#line 2619 "pikchr.c"
2633
+#line 642 "pikchr.y"
2634
+{ pik_set_dashed(p,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy129); }
2635
+#line 2635 "pikchr.c"
25952636
break;
25962637
case 31: /* attribute ::= dashproperty */
2597
-#line 639 "pikchr.y"
2638
+#line 643 "pikchr.y"
25982639
{ pik_set_dashed(p,&yymsp[0].minor.yy0,0); }
2599
-#line 2624 "pikchr.c"
2640
+#line 2640 "pikchr.c"
26002641
break;
26012642
case 32: /* attribute ::= colorproperty rvalue */
2602
-#line 640 "pikchr.y"
2603
-{ pik_set_clrprop(p,&yymsp[-1].minor.yy0,yymsp[0].minor.yy21); }
2604
-#line 2629 "pikchr.c"
2643
+#line 644 "pikchr.y"
2644
+{ pik_set_clrprop(p,&yymsp[-1].minor.yy0,yymsp[0].minor.yy129); }
2645
+#line 2645 "pikchr.c"
26052646
break;
26062647
case 33: /* attribute ::= go direction optrelexpr */
2607
-#line 641 "pikchr.y"
2608
-{ pik_add_direction(p,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy72);}
2609
-#line 2634 "pikchr.c"
2648
+#line 645 "pikchr.y"
2649
+{ pik_add_direction(p,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy28);}
2650
+#line 2650 "pikchr.c"
26102651
break;
26112652
case 34: /* attribute ::= go direction even position */
2612
-#line 642 "pikchr.y"
2613
-{pik_evenwith(p,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy63);}
2614
-#line 2639 "pikchr.c"
2653
+#line 646 "pikchr.y"
2654
+{pik_evenwith(p,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy187);}
2655
+#line 2655 "pikchr.c"
26152656
break;
26162657
case 35: /* attribute ::= CLOSE */
2617
-#line 643 "pikchr.y"
2658
+#line 647 "pikchr.y"
26182659
{ pik_close_path(p,&yymsp[0].minor.yy0); }
2619
-#line 2644 "pikchr.c"
2660
+#line 2660 "pikchr.c"
26202661
break;
26212662
case 36: /* attribute ::= CHOP */
2622
-#line 644 "pikchr.y"
2663
+#line 648 "pikchr.y"
26232664
{ p->cur->bChop = 1; }
2624
-#line 2649 "pikchr.c"
2665
+#line 2665 "pikchr.c"
26252666
break;
26262667
case 37: /* attribute ::= FROM position */
2627
-#line 645 "pikchr.y"
2628
-{ pik_set_from(p,p->cur,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy63); }
2629
-#line 2654 "pikchr.c"
2668
+#line 649 "pikchr.y"
2669
+{ pik_set_from(p,p->cur,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy187); }
2670
+#line 2670 "pikchr.c"
26302671
break;
26312672
case 38: /* attribute ::= TO position */
2632
-#line 646 "pikchr.y"
2633
-{ pik_add_to(p,p->cur,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy63); }
2634
-#line 2659 "pikchr.c"
2673
+#line 650 "pikchr.y"
2674
+{ pik_add_to(p,p->cur,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy187); }
2675
+#line 2675 "pikchr.c"
26352676
break;
26362677
case 39: /* attribute ::= THEN */
2637
-#line 647 "pikchr.y"
2678
+#line 651 "pikchr.y"
26382679
{ pik_then(p, &yymsp[0].minor.yy0, p->cur); }
2639
-#line 2664 "pikchr.c"
2680
+#line 2680 "pikchr.c"
26402681
break;
26412682
case 40: /* attribute ::= THEN optrelexpr HEADING expr */
26422683
case 42: /* attribute ::= GO optrelexpr HEADING expr */ yytestcase(yyruleno==42);
2643
-#line 649 "pikchr.y"
2644
-{pik_move_hdg(p,&yymsp[-2].minor.yy72,&yymsp[-1].minor.yy0,yymsp[0].minor.yy21,0,&yymsp[-3].minor.yy0);}
2645
-#line 2670 "pikchr.c"
2684
+#line 653 "pikchr.y"
2685
+{pik_move_hdg(p,&yymsp[-2].minor.yy28,&yymsp[-1].minor.yy0,yymsp[0].minor.yy129,0,&yymsp[-3].minor.yy0);}
2686
+#line 2686 "pikchr.c"
26462687
break;
26472688
case 41: /* attribute ::= THEN optrelexpr EDGEPT */
26482689
case 43: /* attribute ::= GO optrelexpr EDGEPT */ yytestcase(yyruleno==43);
2649
-#line 650 "pikchr.y"
2650
-{pik_move_hdg(p,&yymsp[-1].minor.yy72,0,0,&yymsp[0].minor.yy0,&yymsp[-2].minor.yy0);}
2651
-#line 2676 "pikchr.c"
2690
+#line 654 "pikchr.y"
2691
+{pik_move_hdg(p,&yymsp[-1].minor.yy28,0,0,&yymsp[0].minor.yy0,&yymsp[-2].minor.yy0);}
2692
+#line 2692 "pikchr.c"
26522693
break;
26532694
case 44: /* attribute ::= AT position */
2654
-#line 655 "pikchr.y"
2655
-{ pik_set_at(p,0,&yymsp[0].minor.yy63,&yymsp[-1].minor.yy0); }
2656
-#line 2681 "pikchr.c"
2695
+#line 659 "pikchr.y"
2696
+{ pik_set_at(p,0,&yymsp[0].minor.yy187,&yymsp[-1].minor.yy0); }
2697
+#line 2697 "pikchr.c"
26572698
break;
26582699
case 45: /* attribute ::= SAME */
2659
-#line 657 "pikchr.y"
2700
+#line 661 "pikchr.y"
26602701
{pik_same(p,0,&yymsp[0].minor.yy0);}
2661
-#line 2686 "pikchr.c"
2702
+#line 2702 "pikchr.c"
26622703
break;
26632704
case 46: /* attribute ::= SAME AS object */
2664
-#line 658 "pikchr.y"
2665
-{pik_same(p,yymsp[0].minor.yy162,&yymsp[-2].minor.yy0);}
2666
-#line 2691 "pikchr.c"
2705
+#line 662 "pikchr.y"
2706
+{pik_same(p,yymsp[0].minor.yy54,&yymsp[-2].minor.yy0);}
2707
+#line 2707 "pikchr.c"
26672708
break;
26682709
case 47: /* attribute ::= STRING textposition */
2669
-#line 659 "pikchr.y"
2670
-{pik_add_txt(p,&yymsp[-1].minor.yy0,yymsp[0].minor.yy188);}
2671
-#line 2696 "pikchr.c"
2710
+#line 663 "pikchr.y"
2711
+{pik_add_txt(p,&yymsp[-1].minor.yy0,yymsp[0].minor.yy272);}
2712
+#line 2712 "pikchr.c"
26722713
break;
26732714
case 48: /* attribute ::= FIT */
2674
-#line 660 "pikchr.y"
2715
+#line 664 "pikchr.y"
26752716
{pik_size_to_fit(p,0,&yymsp[0].minor.yy0,3); }
2676
-#line 2701 "pikchr.c"
2717
+#line 2717 "pikchr.c"
26772718
break;
26782719
case 49: /* attribute ::= BEHIND object */
2679
-#line 661 "pikchr.y"
2680
-{pik_behind(p,yymsp[0].minor.yy162);}
2681
-#line 2706 "pikchr.c"
2720
+#line 665 "pikchr.y"
2721
+{pik_behind(p,yymsp[0].minor.yy54);}
2722
+#line 2722 "pikchr.c"
26822723
break;
26832724
case 50: /* withclause ::= DOT_E edge AT position */
26842725
case 51: /* withclause ::= edge AT position */ yytestcase(yyruleno==51);
2685
-#line 669 "pikchr.y"
2686
-{ pik_set_at(p,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy63,&yymsp[-1].minor.yy0); }
2687
-#line 2712 "pikchr.c"
2726
+#line 673 "pikchr.y"
2727
+{ pik_set_at(p,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy187,&yymsp[-1].minor.yy0); }
2728
+#line 2728 "pikchr.c"
26882729
break;
26892730
case 52: /* numproperty ::= HEIGHT|WIDTH|RADIUS|DIAMETER|THICKNESS */
2690
-#line 673 "pikchr.y"
2731
+#line 677 "pikchr.y"
26912732
{yylhsminor.yy0 = yymsp[0].minor.yy0;}
2692
-#line 2717 "pikchr.c"
2733
+#line 2733 "pikchr.c"
26932734
yymsp[0].minor.yy0 = yylhsminor.yy0;
26942735
break;
26952736
case 53: /* boolproperty ::= CW */
2696
-#line 684 "pikchr.y"
2737
+#line 688 "pikchr.y"
26972738
{p->cur->cw = 1;}
2698
-#line 2723 "pikchr.c"
2739
+#line 2739 "pikchr.c"
26992740
break;
27002741
case 54: /* boolproperty ::= CCW */
2701
-#line 685 "pikchr.y"
2742
+#line 689 "pikchr.y"
27022743
{p->cur->cw = 0;}
2703
-#line 2728 "pikchr.c"
2744
+#line 2744 "pikchr.c"
27042745
break;
27052746
case 55: /* boolproperty ::= LARROW */
2706
-#line 686 "pikchr.y"
2747
+#line 690 "pikchr.y"
27072748
{p->cur->larrow=1; p->cur->rarrow=0; }
2708
-#line 2733 "pikchr.c"
2749
+#line 2749 "pikchr.c"
27092750
break;
27102751
case 56: /* boolproperty ::= RARROW */
2711
-#line 687 "pikchr.y"
2752
+#line 691 "pikchr.y"
27122753
{p->cur->larrow=0; p->cur->rarrow=1; }
2713
-#line 2738 "pikchr.c"
2754
+#line 2754 "pikchr.c"
27142755
break;
27152756
case 57: /* boolproperty ::= LRARROW */
2716
-#line 688 "pikchr.y"
2757
+#line 692 "pikchr.y"
27172758
{p->cur->larrow=1; p->cur->rarrow=1; }
2718
-#line 2743 "pikchr.c"
2759
+#line 2759 "pikchr.c"
27192760
break;
27202761
case 58: /* boolproperty ::= INVIS */
2721
-#line 689 "pikchr.y"
2762
+#line 693 "pikchr.y"
27222763
{p->cur->sw = -0.00001;}
2723
-#line 2748 "pikchr.c"
2764
+#line 2764 "pikchr.c"
27242765
break;
27252766
case 59: /* boolproperty ::= THICK */
2726
-#line 690 "pikchr.y"
2767
+#line 694 "pikchr.y"
27272768
{p->cur->sw *= 1.5;}
2728
-#line 2753 "pikchr.c"
2769
+#line 2769 "pikchr.c"
27292770
break;
27302771
case 60: /* boolproperty ::= THIN */
2731
-#line 691 "pikchr.y"
2772
+#line 695 "pikchr.y"
27322773
{p->cur->sw *= 0.67;}
2733
-#line 2758 "pikchr.c"
2774
+#line 2774 "pikchr.c"
27342775
break;
27352776
case 61: /* boolproperty ::= SOLID */
2736
-#line 692 "pikchr.y"
2777
+#line 696 "pikchr.y"
27372778
{p->cur->sw = pik_value(p,"thickness",9,0);
27382779
p->cur->dotted = p->cur->dashed = 0.0;}
2739
-#line 2764 "pikchr.c"
2780
+#line 2780 "pikchr.c"
27402781
break;
27412782
case 62: /* textposition ::= */
2742
-#line 695 "pikchr.y"
2743
-{yymsp[1].minor.yy188 = 0;}
2744
-#line 2769 "pikchr.c"
2783
+#line 699 "pikchr.y"
2784
+{yymsp[1].minor.yy272 = 0;}
2785
+#line 2785 "pikchr.c"
27452786
break;
27462787
case 63: /* textposition ::= textposition CENTER|LJUST|RJUST|ABOVE|BELOW|ITALIC|BOLD|MONO|ALIGNED|BIG|SMALL */
2747
-#line 698 "pikchr.y"
2748
-{yylhsminor.yy188 = (short int)pik_text_position(yymsp[-1].minor.yy188,&yymsp[0].minor.yy0);}
2749
-#line 2774 "pikchr.c"
2750
- yymsp[-1].minor.yy188 = yylhsminor.yy188;
2788
+#line 702 "pikchr.y"
2789
+{yylhsminor.yy272 = (short int)pik_text_position(yymsp[-1].minor.yy272,&yymsp[0].minor.yy0);}
2790
+#line 2790 "pikchr.c"
2791
+ yymsp[-1].minor.yy272 = yylhsminor.yy272;
27512792
break;
27522793
case 64: /* position ::= expr COMMA expr */
2753
-#line 701 "pikchr.y"
2754
-{yylhsminor.yy63.x=yymsp[-2].minor.yy21; yylhsminor.yy63.y=yymsp[0].minor.yy21;}
2755
-#line 2780 "pikchr.c"
2756
- yymsp[-2].minor.yy63 = yylhsminor.yy63;
2794
+#line 705 "pikchr.y"
2795
+{yylhsminor.yy187.x=yymsp[-2].minor.yy129; yylhsminor.yy187.y=yymsp[0].minor.yy129;}
2796
+#line 2796 "pikchr.c"
2797
+ yymsp[-2].minor.yy187 = yylhsminor.yy187;
27572798
break;
27582799
case 65: /* position ::= place PLUS expr COMMA expr */
2759
-#line 703 "pikchr.y"
2760
-{yylhsminor.yy63.x=yymsp[-4].minor.yy63.x+yymsp[-2].minor.yy21; yylhsminor.yy63.y=yymsp[-4].minor.yy63.y+yymsp[0].minor.yy21;}
2761
-#line 2786 "pikchr.c"
2762
- yymsp[-4].minor.yy63 = yylhsminor.yy63;
2800
+#line 707 "pikchr.y"
2801
+{yylhsminor.yy187.x=yymsp[-4].minor.yy187.x+yymsp[-2].minor.yy129; yylhsminor.yy187.y=yymsp[-4].minor.yy187.y+yymsp[0].minor.yy129;}
2802
+#line 2802 "pikchr.c"
2803
+ yymsp[-4].minor.yy187 = yylhsminor.yy187;
27632804
break;
27642805
case 66: /* position ::= place MINUS expr COMMA expr */
2765
-#line 704 "pikchr.y"
2766
-{yylhsminor.yy63.x=yymsp[-4].minor.yy63.x-yymsp[-2].minor.yy21; yylhsminor.yy63.y=yymsp[-4].minor.yy63.y-yymsp[0].minor.yy21;}
2767
-#line 2792 "pikchr.c"
2768
- yymsp[-4].minor.yy63 = yylhsminor.yy63;
2806
+#line 708 "pikchr.y"
2807
+{yylhsminor.yy187.x=yymsp[-4].minor.yy187.x-yymsp[-2].minor.yy129; yylhsminor.yy187.y=yymsp[-4].minor.yy187.y-yymsp[0].minor.yy129;}
2808
+#line 2808 "pikchr.c"
2809
+ yymsp[-4].minor.yy187 = yylhsminor.yy187;
27692810
break;
27702811
case 67: /* position ::= place PLUS LP expr COMMA expr RP */
2771
-#line 706 "pikchr.y"
2772
-{yylhsminor.yy63.x=yymsp[-6].minor.yy63.x+yymsp[-3].minor.yy21; yylhsminor.yy63.y=yymsp[-6].minor.yy63.y+yymsp[-1].minor.yy21;}
2773
-#line 2798 "pikchr.c"
2774
- yymsp[-6].minor.yy63 = yylhsminor.yy63;
2812
+#line 710 "pikchr.y"
2813
+{yylhsminor.yy187.x=yymsp[-6].minor.yy187.x+yymsp[-3].minor.yy129; yylhsminor.yy187.y=yymsp[-6].minor.yy187.y+yymsp[-1].minor.yy129;}
2814
+#line 2814 "pikchr.c"
2815
+ yymsp[-6].minor.yy187 = yylhsminor.yy187;
27752816
break;
27762817
case 68: /* position ::= place MINUS LP expr COMMA expr RP */
2777
-#line 708 "pikchr.y"
2778
-{yylhsminor.yy63.x=yymsp[-6].minor.yy63.x-yymsp[-3].minor.yy21; yylhsminor.yy63.y=yymsp[-6].minor.yy63.y-yymsp[-1].minor.yy21;}
2779
-#line 2804 "pikchr.c"
2780
- yymsp[-6].minor.yy63 = yylhsminor.yy63;
2818
+#line 712 "pikchr.y"
2819
+{yylhsminor.yy187.x=yymsp[-6].minor.yy187.x-yymsp[-3].minor.yy129; yylhsminor.yy187.y=yymsp[-6].minor.yy187.y-yymsp[-1].minor.yy129;}
2820
+#line 2820 "pikchr.c"
2821
+ yymsp[-6].minor.yy187 = yylhsminor.yy187;
27812822
break;
27822823
case 69: /* position ::= LP position COMMA position RP */
2783
-#line 709 "pikchr.y"
2784
-{yymsp[-4].minor.yy63.x=yymsp[-3].minor.yy63.x; yymsp[-4].minor.yy63.y=yymsp[-1].minor.yy63.y;}
2785
-#line 2810 "pikchr.c"
2824
+#line 713 "pikchr.y"
2825
+{yymsp[-4].minor.yy187.x=yymsp[-3].minor.yy187.x; yymsp[-4].minor.yy187.y=yymsp[-1].minor.yy187.y;}
2826
+#line 2826 "pikchr.c"
27862827
break;
27872828
case 70: /* position ::= LP position RP */
2788
-#line 710 "pikchr.y"
2789
-{yymsp[-2].minor.yy63=yymsp[-1].minor.yy63;}
2790
-#line 2815 "pikchr.c"
2829
+#line 714 "pikchr.y"
2830
+{yymsp[-2].minor.yy187=yymsp[-1].minor.yy187;}
2831
+#line 2831 "pikchr.c"
27912832
break;
27922833
case 71: /* position ::= expr between position AND position */
2793
-#line 712 "pikchr.y"
2794
-{yylhsminor.yy63 = pik_position_between(yymsp[-4].minor.yy21,yymsp[-2].minor.yy63,yymsp[0].minor.yy63);}
2795
-#line 2820 "pikchr.c"
2796
- yymsp[-4].minor.yy63 = yylhsminor.yy63;
2834
+#line 716 "pikchr.y"
2835
+{yylhsminor.yy187 = pik_position_between(yymsp[-4].minor.yy129,yymsp[-2].minor.yy187,yymsp[0].minor.yy187);}
2836
+#line 2836 "pikchr.c"
2837
+ yymsp[-4].minor.yy187 = yylhsminor.yy187;
27972838
break;
27982839
case 72: /* position ::= expr LT position COMMA position GT */
2799
-#line 714 "pikchr.y"
2800
-{yylhsminor.yy63 = pik_position_between(yymsp[-5].minor.yy21,yymsp[-3].minor.yy63,yymsp[-1].minor.yy63);}
2801
-#line 2826 "pikchr.c"
2802
- yymsp[-5].minor.yy63 = yylhsminor.yy63;
2840
+#line 718 "pikchr.y"
2841
+{yylhsminor.yy187 = pik_position_between(yymsp[-5].minor.yy129,yymsp[-3].minor.yy187,yymsp[-1].minor.yy187);}
2842
+#line 2842 "pikchr.c"
2843
+ yymsp[-5].minor.yy187 = yylhsminor.yy187;
28032844
break;
28042845
case 73: /* position ::= expr ABOVE position */
2805
-#line 715 "pikchr.y"
2806
-{yylhsminor.yy63=yymsp[0].minor.yy63; yylhsminor.yy63.y += yymsp[-2].minor.yy21;}
2807
-#line 2832 "pikchr.c"
2808
- yymsp[-2].minor.yy63 = yylhsminor.yy63;
2846
+#line 719 "pikchr.y"
2847
+{yylhsminor.yy187=yymsp[0].minor.yy187; yylhsminor.yy187.y += yymsp[-2].minor.yy129;}
2848
+#line 2848 "pikchr.c"
2849
+ yymsp[-2].minor.yy187 = yylhsminor.yy187;
28092850
break;
28102851
case 74: /* position ::= expr BELOW position */
2811
-#line 716 "pikchr.y"
2812
-{yylhsminor.yy63=yymsp[0].minor.yy63; yylhsminor.yy63.y -= yymsp[-2].minor.yy21;}
2813
-#line 2838 "pikchr.c"
2814
- yymsp[-2].minor.yy63 = yylhsminor.yy63;
2852
+#line 720 "pikchr.y"
2853
+{yylhsminor.yy187=yymsp[0].minor.yy187; yylhsminor.yy187.y -= yymsp[-2].minor.yy129;}
2854
+#line 2854 "pikchr.c"
2855
+ yymsp[-2].minor.yy187 = yylhsminor.yy187;
28152856
break;
28162857
case 75: /* position ::= expr LEFT OF position */
2817
-#line 717 "pikchr.y"
2818
-{yylhsminor.yy63=yymsp[0].minor.yy63; yylhsminor.yy63.x -= yymsp[-3].minor.yy21;}
2819
-#line 2844 "pikchr.c"
2820
- yymsp[-3].minor.yy63 = yylhsminor.yy63;
2858
+#line 721 "pikchr.y"
2859
+{yylhsminor.yy187=yymsp[0].minor.yy187; yylhsminor.yy187.x -= yymsp[-3].minor.yy129;}
2860
+#line 2860 "pikchr.c"
2861
+ yymsp[-3].minor.yy187 = yylhsminor.yy187;
28212862
break;
28222863
case 76: /* position ::= expr RIGHT OF position */
2823
-#line 718 "pikchr.y"
2824
-{yylhsminor.yy63=yymsp[0].minor.yy63; yylhsminor.yy63.x += yymsp[-3].minor.yy21;}
2825
-#line 2850 "pikchr.c"
2826
- yymsp[-3].minor.yy63 = yylhsminor.yy63;
2864
+#line 722 "pikchr.y"
2865
+{yylhsminor.yy187=yymsp[0].minor.yy187; yylhsminor.yy187.x += yymsp[-3].minor.yy129;}
2866
+#line 2866 "pikchr.c"
2867
+ yymsp[-3].minor.yy187 = yylhsminor.yy187;
28272868
break;
28282869
case 77: /* position ::= expr ON HEADING EDGEPT OF position */
2829
-#line 720 "pikchr.y"
2830
-{yylhsminor.yy63 = pik_position_at_hdg(yymsp[-5].minor.yy21,&yymsp[-2].minor.yy0,yymsp[0].minor.yy63);}
2831
-#line 2856 "pikchr.c"
2832
- yymsp[-5].minor.yy63 = yylhsminor.yy63;
2870
+#line 724 "pikchr.y"
2871
+{yylhsminor.yy187 = pik_position_at_hdg(yymsp[-5].minor.yy129,&yymsp[-2].minor.yy0,yymsp[0].minor.yy187);}
2872
+#line 2872 "pikchr.c"
2873
+ yymsp[-5].minor.yy187 = yylhsminor.yy187;
28332874
break;
28342875
case 78: /* position ::= expr HEADING EDGEPT OF position */
2835
-#line 722 "pikchr.y"
2836
-{yylhsminor.yy63 = pik_position_at_hdg(yymsp[-4].minor.yy21,&yymsp[-2].minor.yy0,yymsp[0].minor.yy63);}
2837
-#line 2862 "pikchr.c"
2838
- yymsp[-4].minor.yy63 = yylhsminor.yy63;
2876
+#line 726 "pikchr.y"
2877
+{yylhsminor.yy187 = pik_position_at_hdg(yymsp[-4].minor.yy129,&yymsp[-2].minor.yy0,yymsp[0].minor.yy187);}
2878
+#line 2878 "pikchr.c"
2879
+ yymsp[-4].minor.yy187 = yylhsminor.yy187;
28392880
break;
28402881
case 79: /* position ::= expr EDGEPT OF position */
2841
-#line 724 "pikchr.y"
2842
-{yylhsminor.yy63 = pik_position_at_hdg(yymsp[-3].minor.yy21,&yymsp[-2].minor.yy0,yymsp[0].minor.yy63);}
2843
-#line 2868 "pikchr.c"
2844
- yymsp[-3].minor.yy63 = yylhsminor.yy63;
2882
+#line 728 "pikchr.y"
2883
+{yylhsminor.yy187 = pik_position_at_hdg(yymsp[-3].minor.yy129,&yymsp[-2].minor.yy0,yymsp[0].minor.yy187);}
2884
+#line 2884 "pikchr.c"
2885
+ yymsp[-3].minor.yy187 = yylhsminor.yy187;
28452886
break;
28462887
case 80: /* position ::= expr ON HEADING expr FROM position */
2847
-#line 726 "pikchr.y"
2848
-{yylhsminor.yy63 = pik_position_at_angle(yymsp[-5].minor.yy21,yymsp[-2].minor.yy21,yymsp[0].minor.yy63);}
2849
-#line 2874 "pikchr.c"
2850
- yymsp[-5].minor.yy63 = yylhsminor.yy63;
2888
+#line 730 "pikchr.y"
2889
+{yylhsminor.yy187 = pik_position_at_angle(yymsp[-5].minor.yy129,yymsp[-2].minor.yy129,yymsp[0].minor.yy187);}
2890
+#line 2890 "pikchr.c"
2891
+ yymsp[-5].minor.yy187 = yylhsminor.yy187;
28512892
break;
28522893
case 81: /* position ::= expr HEADING expr FROM position */
2853
-#line 728 "pikchr.y"
2854
-{yylhsminor.yy63 = pik_position_at_angle(yymsp[-4].minor.yy21,yymsp[-2].minor.yy21,yymsp[0].minor.yy63);}
2855
-#line 2880 "pikchr.c"
2856
- yymsp[-4].minor.yy63 = yylhsminor.yy63;
2894
+#line 732 "pikchr.y"
2895
+{yylhsminor.yy187 = pik_position_at_angle(yymsp[-4].minor.yy129,yymsp[-2].minor.yy129,yymsp[0].minor.yy187);}
2896
+#line 2896 "pikchr.c"
2897
+ yymsp[-4].minor.yy187 = yylhsminor.yy187;
28572898
break;
28582899
case 82: /* place ::= edge OF object */
2859
-#line 740 "pikchr.y"
2860
-{yylhsminor.yy63 = pik_place_of_elem(p,yymsp[0].minor.yy162,&yymsp[-2].minor.yy0);}
2861
-#line 2886 "pikchr.c"
2862
- yymsp[-2].minor.yy63 = yylhsminor.yy63;
2900
+#line 744 "pikchr.y"
2901
+{yylhsminor.yy187 = pik_place_of_elem(p,yymsp[0].minor.yy54,&yymsp[-2].minor.yy0);}
2902
+#line 2902 "pikchr.c"
2903
+ yymsp[-2].minor.yy187 = yylhsminor.yy187;
28632904
break;
28642905
case 83: /* place2 ::= object */
2865
-#line 741 "pikchr.y"
2866
-{yylhsminor.yy63 = pik_place_of_elem(p,yymsp[0].minor.yy162,0);}
2867
-#line 2892 "pikchr.c"
2868
- yymsp[0].minor.yy63 = yylhsminor.yy63;
2906
+#line 745 "pikchr.y"
2907
+{yylhsminor.yy187 = pik_place_of_elem(p,yymsp[0].minor.yy54,0);}
2908
+#line 2908 "pikchr.c"
2909
+ yymsp[0].minor.yy187 = yylhsminor.yy187;
28692910
break;
28702911
case 84: /* place2 ::= object DOT_E edge */
2871
-#line 742 "pikchr.y"
2872
-{yylhsminor.yy63 = pik_place_of_elem(p,yymsp[-2].minor.yy162,&yymsp[0].minor.yy0);}
2873
-#line 2898 "pikchr.c"
2874
- yymsp[-2].minor.yy63 = yylhsminor.yy63;
2912
+#line 746 "pikchr.y"
2913
+{yylhsminor.yy187 = pik_place_of_elem(p,yymsp[-2].minor.yy54,&yymsp[0].minor.yy0);}
2914
+#line 2914 "pikchr.c"
2915
+ yymsp[-2].minor.yy187 = yylhsminor.yy187;
28752916
break;
28762917
case 85: /* place2 ::= NTH VERTEX OF object */
2877
-#line 743 "pikchr.y"
2878
-{yylhsminor.yy63 = pik_nth_vertex(p,&yymsp[-3].minor.yy0,&yymsp[-2].minor.yy0,yymsp[0].minor.yy162);}
2879
-#line 2904 "pikchr.c"
2880
- yymsp[-3].minor.yy63 = yylhsminor.yy63;
2918
+#line 747 "pikchr.y"
2919
+{yylhsminor.yy187 = pik_nth_vertex(p,&yymsp[-3].minor.yy0,&yymsp[-2].minor.yy0,yymsp[0].minor.yy54);}
2920
+#line 2920 "pikchr.c"
2921
+ yymsp[-3].minor.yy187 = yylhsminor.yy187;
28812922
break;
28822923
case 86: /* object ::= nth */
2883
-#line 755 "pikchr.y"
2884
-{yylhsminor.yy162 = pik_find_nth(p,0,&yymsp[0].minor.yy0);}
2885
-#line 2910 "pikchr.c"
2886
- yymsp[0].minor.yy162 = yylhsminor.yy162;
2924
+#line 759 "pikchr.y"
2925
+{yylhsminor.yy54 = pik_find_nth(p,0,&yymsp[0].minor.yy0);}
2926
+#line 2926 "pikchr.c"
2927
+ yymsp[0].minor.yy54 = yylhsminor.yy54;
28872928
break;
28882929
case 87: /* object ::= nth OF|IN object */
2889
-#line 756 "pikchr.y"
2890
-{yylhsminor.yy162 = pik_find_nth(p,yymsp[0].minor.yy162,&yymsp[-2].minor.yy0);}
2891
-#line 2916 "pikchr.c"
2892
- yymsp[-2].minor.yy162 = yylhsminor.yy162;
2930
+#line 760 "pikchr.y"
2931
+{yylhsminor.yy54 = pik_find_nth(p,yymsp[0].minor.yy54,&yymsp[-2].minor.yy0);}
2932
+#line 2932 "pikchr.c"
2933
+ yymsp[-2].minor.yy54 = yylhsminor.yy54;
28932934
break;
28942935
case 88: /* objectname ::= THIS */
2895
-#line 758 "pikchr.y"
2896
-{yymsp[0].minor.yy162 = p->cur;}
2897
-#line 2922 "pikchr.c"
2936
+#line 762 "pikchr.y"
2937
+{yymsp[0].minor.yy54 = p->cur;}
2938
+#line 2938 "pikchr.c"
28982939
break;
28992940
case 89: /* objectname ::= PLACENAME */
2900
-#line 759 "pikchr.y"
2901
-{yylhsminor.yy162 = pik_find_byname(p,0,&yymsp[0].minor.yy0);}
2902
-#line 2927 "pikchr.c"
2903
- yymsp[0].minor.yy162 = yylhsminor.yy162;
2941
+#line 763 "pikchr.y"
2942
+{yylhsminor.yy54 = pik_find_byname(p,0,&yymsp[0].minor.yy0);}
2943
+#line 2943 "pikchr.c"
2944
+ yymsp[0].minor.yy54 = yylhsminor.yy54;
29042945
break;
29052946
case 90: /* objectname ::= objectname DOT_U PLACENAME */
2906
-#line 761 "pikchr.y"
2907
-{yylhsminor.yy162 = pik_find_byname(p,yymsp[-2].minor.yy162,&yymsp[0].minor.yy0);}
2908
-#line 2933 "pikchr.c"
2909
- yymsp[-2].minor.yy162 = yylhsminor.yy162;
2947
+#line 765 "pikchr.y"
2948
+{yylhsminor.yy54 = pik_find_byname(p,yymsp[-2].minor.yy54,&yymsp[0].minor.yy0);}
2949
+#line 2949 "pikchr.c"
2950
+ yymsp[-2].minor.yy54 = yylhsminor.yy54;
29102951
break;
29112952
case 91: /* nth ::= NTH CLASSNAME */
2912
-#line 763 "pikchr.y"
2953
+#line 767 "pikchr.y"
29132954
{yylhsminor.yy0=yymsp[0].minor.yy0; yylhsminor.yy0.eCode = pik_nth_value(p,&yymsp[-1].minor.yy0); }
2914
-#line 2939 "pikchr.c"
2955
+#line 2955 "pikchr.c"
29152956
yymsp[-1].minor.yy0 = yylhsminor.yy0;
29162957
break;
29172958
case 92: /* nth ::= NTH LAST CLASSNAME */
2918
-#line 764 "pikchr.y"
2959
+#line 768 "pikchr.y"
29192960
{yylhsminor.yy0=yymsp[0].minor.yy0; yylhsminor.yy0.eCode = -pik_nth_value(p,&yymsp[-2].minor.yy0); }
2920
-#line 2945 "pikchr.c"
2961
+#line 2961 "pikchr.c"
29212962
yymsp[-2].minor.yy0 = yylhsminor.yy0;
29222963
break;
29232964
case 93: /* nth ::= LAST CLASSNAME */
2924
-#line 765 "pikchr.y"
2965
+#line 769 "pikchr.y"
29252966
{yymsp[-1].minor.yy0=yymsp[0].minor.yy0; yymsp[-1].minor.yy0.eCode = -1;}
2926
-#line 2951 "pikchr.c"
2967
+#line 2967 "pikchr.c"
29272968
break;
29282969
case 94: /* nth ::= LAST */
2929
-#line 766 "pikchr.y"
2970
+#line 770 "pikchr.y"
29302971
{yylhsminor.yy0=yymsp[0].minor.yy0; yylhsminor.yy0.eCode = -1;}
2931
-#line 2956 "pikchr.c"
2972
+#line 2972 "pikchr.c"
29322973
yymsp[0].minor.yy0 = yylhsminor.yy0;
29332974
break;
29342975
case 95: /* nth ::= NTH LB RB */
2935
-#line 767 "pikchr.y"
2976
+#line 771 "pikchr.y"
29362977
{yylhsminor.yy0=yymsp[-1].minor.yy0; yylhsminor.yy0.eCode = pik_nth_value(p,&yymsp[-2].minor.yy0);}
2937
-#line 2962 "pikchr.c"
2978
+#line 2978 "pikchr.c"
29382979
yymsp[-2].minor.yy0 = yylhsminor.yy0;
29392980
break;
29402981
case 96: /* nth ::= NTH LAST LB RB */
2941
-#line 768 "pikchr.y"
2982
+#line 772 "pikchr.y"
29422983
{yylhsminor.yy0=yymsp[-1].minor.yy0; yylhsminor.yy0.eCode = -pik_nth_value(p,&yymsp[-3].minor.yy0);}
2943
-#line 2968 "pikchr.c"
2984
+#line 2984 "pikchr.c"
29442985
yymsp[-3].minor.yy0 = yylhsminor.yy0;
29452986
break;
29462987
case 97: /* nth ::= LAST LB RB */
2947
-#line 769 "pikchr.y"
2988
+#line 773 "pikchr.y"
29482989
{yymsp[-2].minor.yy0=yymsp[-1].minor.yy0; yymsp[-2].minor.yy0.eCode = -1; }
2949
-#line 2974 "pikchr.c"
2990
+#line 2990 "pikchr.c"
29502991
break;
29512992
case 98: /* expr ::= expr PLUS expr */
2952
-#line 771 "pikchr.y"
2953
-{yylhsminor.yy21=yymsp[-2].minor.yy21+yymsp[0].minor.yy21;}
2954
-#line 2979 "pikchr.c"
2955
- yymsp[-2].minor.yy21 = yylhsminor.yy21;
2993
+#line 775 "pikchr.y"
2994
+{yylhsminor.yy129=yymsp[-2].minor.yy129+yymsp[0].minor.yy129;}
2995
+#line 2995 "pikchr.c"
2996
+ yymsp[-2].minor.yy129 = yylhsminor.yy129;
29562997
break;
29572998
case 99: /* expr ::= expr MINUS expr */
2958
-#line 772 "pikchr.y"
2959
-{yylhsminor.yy21=yymsp[-2].minor.yy21-yymsp[0].minor.yy21;}
2960
-#line 2985 "pikchr.c"
2961
- yymsp[-2].minor.yy21 = yylhsminor.yy21;
2999
+#line 776 "pikchr.y"
3000
+{yylhsminor.yy129=yymsp[-2].minor.yy129-yymsp[0].minor.yy129;}
3001
+#line 3001 "pikchr.c"
3002
+ yymsp[-2].minor.yy129 = yylhsminor.yy129;
29623003
break;
29633004
case 100: /* expr ::= expr STAR expr */
2964
-#line 773 "pikchr.y"
2965
-{yylhsminor.yy21=yymsp[-2].minor.yy21*yymsp[0].minor.yy21;}
2966
-#line 2991 "pikchr.c"
2967
- yymsp[-2].minor.yy21 = yylhsminor.yy21;
3005
+#line 777 "pikchr.y"
3006
+{yylhsminor.yy129=yymsp[-2].minor.yy129*yymsp[0].minor.yy129;}
3007
+#line 3007 "pikchr.c"
3008
+ yymsp[-2].minor.yy129 = yylhsminor.yy129;
29683009
break;
29693010
case 101: /* expr ::= expr SLASH expr */
2970
-#line 774 "pikchr.y"
3011
+#line 778 "pikchr.y"
29713012
{
2972
- if( yymsp[0].minor.yy21==0.0 ){ pik_error(p, &yymsp[-1].minor.yy0, "division by zero"); yylhsminor.yy21 = 0.0; }
2973
- else{ yylhsminor.yy21 = yymsp[-2].minor.yy21/yymsp[0].minor.yy21; }
3013
+ if( yymsp[0].minor.yy129==0.0 ){ pik_error(p, &yymsp[-1].minor.yy0, "division by zero"); yylhsminor.yy129 = 0.0; }
3014
+ else{ yylhsminor.yy129 = yymsp[-2].minor.yy129/yymsp[0].minor.yy129; }
29743015
}
2975
-#line 3000 "pikchr.c"
2976
- yymsp[-2].minor.yy21 = yylhsminor.yy21;
3016
+#line 3016 "pikchr.c"
3017
+ yymsp[-2].minor.yy129 = yylhsminor.yy129;
29773018
break;
29783019
case 102: /* expr ::= MINUS expr */
2979
-#line 778 "pikchr.y"
2980
-{yymsp[-1].minor.yy21=-yymsp[0].minor.yy21;}
2981
-#line 3006 "pikchr.c"
3020
+#line 782 "pikchr.y"
3021
+{yymsp[-1].minor.yy129=-yymsp[0].minor.yy129;}
3022
+#line 3022 "pikchr.c"
29823023
break;
29833024
case 103: /* expr ::= PLUS expr */
2984
-#line 779 "pikchr.y"
2985
-{yymsp[-1].minor.yy21=yymsp[0].minor.yy21;}
2986
-#line 3011 "pikchr.c"
3025
+#line 783 "pikchr.y"
3026
+{yymsp[-1].minor.yy129=yymsp[0].minor.yy129;}
3027
+#line 3027 "pikchr.c"
29873028
break;
29883029
case 104: /* expr ::= LP expr RP */
2989
-#line 780 "pikchr.y"
2990
-{yymsp[-2].minor.yy21=yymsp[-1].minor.yy21;}
2991
-#line 3016 "pikchr.c"
3030
+#line 784 "pikchr.y"
3031
+{yymsp[-2].minor.yy129=yymsp[-1].minor.yy129;}
3032
+#line 3032 "pikchr.c"
29923033
break;
29933034
case 105: /* expr ::= LP FILL|COLOR|THICKNESS RP */
2994
-#line 781 "pikchr.y"
2995
-{yymsp[-2].minor.yy21=pik_get_var(p,&yymsp[-1].minor.yy0);}
2996
-#line 3021 "pikchr.c"
3035
+#line 785 "pikchr.y"
3036
+{yymsp[-2].minor.yy129=pik_get_var(p,&yymsp[-1].minor.yy0);}
3037
+#line 3037 "pikchr.c"
29973038
break;
29983039
case 106: /* expr ::= NUMBER */
2999
-#line 782 "pikchr.y"
3000
-{yylhsminor.yy21=pik_atof(&yymsp[0].minor.yy0);}
3001
-#line 3026 "pikchr.c"
3002
- yymsp[0].minor.yy21 = yylhsminor.yy21;
3040
+#line 786 "pikchr.y"
3041
+{yylhsminor.yy129=pik_atof(&yymsp[0].minor.yy0);}
3042
+#line 3042 "pikchr.c"
3043
+ yymsp[0].minor.yy129 = yylhsminor.yy129;
30033044
break;
30043045
case 107: /* expr ::= ID */
3005
-#line 783 "pikchr.y"
3006
-{yylhsminor.yy21=pik_get_var(p,&yymsp[0].minor.yy0);}
3007
-#line 3032 "pikchr.c"
3008
- yymsp[0].minor.yy21 = yylhsminor.yy21;
3046
+#line 787 "pikchr.y"
3047
+{yylhsminor.yy129=pik_get_var(p,&yymsp[0].minor.yy0);}
3048
+#line 3048 "pikchr.c"
3049
+ yymsp[0].minor.yy129 = yylhsminor.yy129;
30093050
break;
30103051
case 108: /* expr ::= FUNC1 LP expr RP */
3011
-#line 784 "pikchr.y"
3012
-{yylhsminor.yy21 = pik_func(p,&yymsp[-3].minor.yy0,yymsp[-1].minor.yy21,0.0);}
3013
-#line 3038 "pikchr.c"
3014
- yymsp[-3].minor.yy21 = yylhsminor.yy21;
3052
+#line 788 "pikchr.y"
3053
+{yylhsminor.yy129 = pik_func(p,&yymsp[-3].minor.yy0,yymsp[-1].minor.yy129,0.0);}
3054
+#line 3054 "pikchr.c"
3055
+ yymsp[-3].minor.yy129 = yylhsminor.yy129;
30153056
break;
30163057
case 109: /* expr ::= FUNC2 LP expr COMMA expr RP */
3017
-#line 785 "pikchr.y"
3018
-{yylhsminor.yy21 = pik_func(p,&yymsp[-5].minor.yy0,yymsp[-3].minor.yy21,yymsp[-1].minor.yy21);}
3019
-#line 3044 "pikchr.c"
3020
- yymsp[-5].minor.yy21 = yylhsminor.yy21;
3058
+#line 789 "pikchr.y"
3059
+{yylhsminor.yy129 = pik_func(p,&yymsp[-5].minor.yy0,yymsp[-3].minor.yy129,yymsp[-1].minor.yy129);}
3060
+#line 3060 "pikchr.c"
3061
+ yymsp[-5].minor.yy129 = yylhsminor.yy129;
30213062
break;
30223063
case 110: /* expr ::= DIST LP position COMMA position RP */
3023
-#line 786 "pikchr.y"
3024
-{yymsp[-5].minor.yy21 = pik_dist(&yymsp[-3].minor.yy63,&yymsp[-1].minor.yy63);}
3025
-#line 3050 "pikchr.c"
3064
+#line 790 "pikchr.y"
3065
+{yymsp[-5].minor.yy129 = pik_dist(&yymsp[-3].minor.yy187,&yymsp[-1].minor.yy187);}
3066
+#line 3066 "pikchr.c"
30263067
break;
30273068
case 111: /* expr ::= place2 DOT_XY X */
3028
-#line 787 "pikchr.y"
3029
-{yylhsminor.yy21 = yymsp[-2].minor.yy63.x;}
3030
-#line 3055 "pikchr.c"
3031
- yymsp[-2].minor.yy21 = yylhsminor.yy21;
3069
+#line 791 "pikchr.y"
3070
+{yylhsminor.yy129 = yymsp[-2].minor.yy187.x;}
3071
+#line 3071 "pikchr.c"
3072
+ yymsp[-2].minor.yy129 = yylhsminor.yy129;
30323073
break;
30333074
case 112: /* expr ::= place2 DOT_XY Y */
3034
-#line 788 "pikchr.y"
3035
-{yylhsminor.yy21 = yymsp[-2].minor.yy63.y;}
3036
-#line 3061 "pikchr.c"
3037
- yymsp[-2].minor.yy21 = yylhsminor.yy21;
3075
+#line 792 "pikchr.y"
3076
+{yylhsminor.yy129 = yymsp[-2].minor.yy187.y;}
3077
+#line 3077 "pikchr.c"
3078
+ yymsp[-2].minor.yy129 = yylhsminor.yy129;
30383079
break;
30393080
case 113: /* expr ::= object DOT_L numproperty */
30403081
case 114: /* expr ::= object DOT_L dashproperty */ yytestcase(yyruleno==114);
30413082
case 115: /* expr ::= object DOT_L colorproperty */ yytestcase(yyruleno==115);
3042
-#line 789 "pikchr.y"
3043
-{yylhsminor.yy21=pik_property_of(yymsp[-2].minor.yy162,&yymsp[0].minor.yy0);}
3044
-#line 3069 "pikchr.c"
3045
- yymsp[-2].minor.yy21 = yylhsminor.yy21;
3083
+#line 793 "pikchr.y"
3084
+{yylhsminor.yy129=pik_property_of(yymsp[-2].minor.yy54,&yymsp[0].minor.yy0);}
3085
+#line 3085 "pikchr.c"
3086
+ yymsp[-2].minor.yy129 = yylhsminor.yy129;
30463087
break;
30473088
default:
30483089
/* (116) lvalue ::= ID */ yytestcase(yyruleno==116);
30493090
/* (117) lvalue ::= FILL */ yytestcase(yyruleno==117);
30503091
/* (118) lvalue ::= COLOR */ yytestcase(yyruleno==118);
@@ -3142,19 +3183,19 @@
31423183
){
31433184
pik_parserARG_FETCH
31443185
pik_parserCTX_FETCH
31453186
#define TOKEN yyminor
31463187
/************ Begin %syntax_error code ****************************************/
3147
-#line 549 "pikchr.y"
3188
+#line 551 "pikchr.y"
31483189
31493190
if( TOKEN.z && TOKEN.z[0] ){
31503191
pik_error(p, &TOKEN, "syntax error");
31513192
}else{
31523193
pik_error(p, 0, "syntax error");
31533194
}
31543195
UNUSED_PARAMETER(yymajor);
3155
-#line 3180 "pikchr.c"
3196
+#line 3196 "pikchr.c"
31563197
/************ End %syntax_error code ******************************************/
31573198
pik_parserARG_STORE /* Suppress warning about unused %extra_argument variable */
31583199
pik_parserCTX_STORE
31593200
}
31603201
@@ -3419,11 +3460,11 @@
34193460
#else
34203461
(void)iToken;
34213462
return 0;
34223463
#endif
34233464
}
3424
-#line 794 "pikchr.y"
3465
+#line 798 "pikchr.y"
34253466
34263467
34273468
34283469
/* Chart of the 148 official CSS color names with their
34293470
** corresponding RGB values thru Color Module Level 4:
@@ -7246,11 +7287,12 @@
72467287
pik_append_num(p, " width=\"", p->wSVG);
72477288
pik_append_num(p, "\" height=\"", p->hSVG);
72487289
pik_append(p, "\"", 1);
72497290
}
72507291
pik_append_dis(p, " viewBox=\"0 0 ",w,"");
7251
- pik_append_dis(p, " ",h,"\">\n");
7292
+ pik_append_dis(p, " ",h,"\"");
7293
+ pik_append(p, " data-pikchr-date=\"" MANIFEST_ISODATE "\">\n", -1);
72527294
pik_elist_render(p, pList);
72537295
pik_append(p,"</svg>\n", -1);
72547296
}else{
72557297
p->wSVG = -1;
72567298
p->hSVG = -1;
@@ -7330,10 +7372,11 @@
73307372
{ "n", 1, T_EDGEPT, 0, CP_N },
73317373
{ "ne", 2, T_EDGEPT, 0, CP_NE },
73327374
{ "north", 5, T_EDGEPT, 0, CP_N },
73337375
{ "nw", 2, T_EDGEPT, 0, CP_NW },
73347376
{ "of", 2, T_OF, 0, 0 },
7377
+ { "pikchr_date",11, T_ISODATE, 0, 0, },
73357378
{ "previous", 8, T_LAST, 0, 0, },
73367379
{ "print", 5, T_PRINT, 0, 0 },
73377380
{ "rad", 3, T_RADIUS, 0, 0 },
73387381
{ "radius", 6, T_RADIUS, 0, 0 },
73397382
{ "right", 5, T_RIGHT, DIR_RIGHT, CP_E },
@@ -7913,15 +7956,30 @@
79137956
#endif
79147957
token.n = (unsigned short)(sz & 0xffff);
79157958
if( p->nToken++ > PIKCHR_TOKEN_LIMIT ){
79167959
pik_error(p, &token, "script is too complex");
79177960
break;
7961
+ }
7962
+ if( token.eType==T_ISODATE ){
7963
+ token.z = "\"" MANIFEST_ISODATE "\"";
7964
+ token.n = sizeof(MANIFEST_ISODATE)+1;
7965
+ token.eType = T_STRING;
79187966
}
79197967
pik_parser(pParser, token.eType, token);
79207968
}
79217969
}
79227970
}
7971
+
7972
+/*
7973
+** Return the version name.
7974
+*/
7975
+const char *pikchr_version(void)
7976
+ /* Emscripten workaround, else it chokes on the inlined version */;
7977
+
7978
+const char *pikchr_version(void){
7979
+ return RELEASE_VERSION " " MANIFEST_ISODATE;
7980
+}
79237981
79247982
/*
79257983
** Parse the PIKCHR script contained in zText[]. Return a rendering. Or
79267984
** if an error is encountered, return the error text. The error message
79277985
** is HTML formatted. So regardless of what happens, the return text
@@ -8141,10 +8199,14 @@
81418199
exit(1);
81428200
}
81438201
bSvgOnly = 1;
81448202
mFlags |= PIKCHR_PLAINTEXT_ERRORS;
81458203
}else
8204
+ if( strcmp(z,"version")==0 || strcmp(z,"v")==0 ){
8205
+ printf("pikchr %s\n", pikchr_version());
8206
+ return 0;
8207
+ }else
81468208
{
81478209
fprintf(stderr,"unknown option: \"%s\"\n", argv[i]);
81488210
usage(argv[0]);
81498211
}
81508212
continue;
@@ -8253,6 +8315,6 @@
82538315
82548316
82558317
#endif /* PIKCHR_TCL */
82568318
82578319
8258
-#line 8283 "pikchr.c"
8320
+#line 8320 "pikchr.c"
82598321
--- extsrc/pikchr.c
+++ extsrc/pikchr.c
@@ -1,8 +1,47 @@
1 /* This file is automatically generated by Lemon from input grammar
2 ** source file "pikchr.y".
3 */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4 /*
5 ** Zero-Clause BSD license:
6 **
7 ** Copyright (C) 2020-09-01 by D. Richard Hipp <[email protected]>
8 **
@@ -504,11 +543,11 @@
504 static PObj *pik_position_assert(Pik*,PPoint*,PToken*,PPoint*);
505 static PNum pik_dist(PPoint*,PPoint*);
506 static void pik_add_macro(Pik*,PToken *pId,PToken *pCode);
507
508
509 #line 535 "pikchr.c"
510 /**************** End of %include directives **********************************/
511 /* These constants specify the various numeric values for terminal symbols.
512 ***************** Begin token definitions *************************************/
513 #ifndef T_ID
514 #define T_ID 1
@@ -534,84 +573,85 @@
534 #define T_COLOR 21
535 #define T_THICKNESS 22
536 #define T_PRINT 23
537 #define T_STRING 24
538 #define T_COMMA 25
539 #define T_CLASSNAME 26
540 #define T_LB 27
541 #define T_RB 28
542 #define T_UP 29
543 #define T_DOWN 30
544 #define T_LEFT 31
545 #define T_RIGHT 32
546 #define T_CLOSE 33
547 #define T_CHOP 34
548 #define T_FROM 35
549 #define T_TO 36
550 #define T_THEN 37
551 #define T_HEADING 38
552 #define T_GO 39
553 #define T_AT 40
554 #define T_WITH 41
555 #define T_SAME 42
556 #define T_AS 43
557 #define T_FIT 44
558 #define T_BEHIND 45
559 #define T_UNTIL 46
560 #define T_EVEN 47
561 #define T_DOT_E 48
562 #define T_HEIGHT 49
563 #define T_WIDTH 50
564 #define T_RADIUS 51
565 #define T_DIAMETER 52
566 #define T_DOTTED 53
567 #define T_DASHED 54
568 #define T_CW 55
569 #define T_CCW 56
570 #define T_LARROW 57
571 #define T_RARROW 58
572 #define T_LRARROW 59
573 #define T_INVIS 60
574 #define T_THICK 61
575 #define T_THIN 62
576 #define T_SOLID 63
577 #define T_CENTER 64
578 #define T_LJUST 65
579 #define T_RJUST 66
580 #define T_ABOVE 67
581 #define T_BELOW 68
582 #define T_ITALIC 69
583 #define T_BOLD 70
584 #define T_MONO 71
585 #define T_ALIGNED 72
586 #define T_BIG 73
587 #define T_SMALL 74
588 #define T_AND 75
589 #define T_LT 76
590 #define T_GT 77
591 #define T_ON 78
592 #define T_WAY 79
593 #define T_BETWEEN 80
594 #define T_THE 81
595 #define T_NTH 82
596 #define T_VERTEX 83
597 #define T_TOP 84
598 #define T_BOTTOM 85
599 #define T_START 86
600 #define T_END 87
601 #define T_IN 88
602 #define T_THIS 89
603 #define T_DOT_U 90
604 #define T_LAST 91
605 #define T_NUMBER 92
606 #define T_FUNC1 93
607 #define T_FUNC2 94
608 #define T_DIST 95
609 #define T_DOT_XY 96
610 #define T_X 97
611 #define T_Y 98
612 #define T_DOT_L 99
 
613 #endif
614 /**************** End token definitions ***************************************/
615
616 /* The next sections is a series of control #defines.
617 ** various aspects of the generated parser.
@@ -672,22 +712,22 @@
672 #ifndef INTERFACE
673 # define INTERFACE 1
674 #endif
675 /************* Begin control #defines *****************************************/
676 #define YYCODETYPE unsigned char
677 #define YYNOCODE 136
678 #define YYACTIONTYPE unsigned short int
679 #define pik_parserTOKENTYPE PToken
680 typedef union {
681 int yyinit;
682 pik_parserTOKENTYPE yy0;
683 PNum yy21;
684 PPoint yy63;
685 PRel yy72;
686 PObj* yy162;
687 short int yy188;
688 PList* yy235;
689 } YYMINORTYPE;
690 #ifndef YYSTACKDEPTH
691 #define YYSTACKDEPTH 100
692 #endif
693 #define pik_parserARG_SDECL
@@ -705,21 +745,21 @@
705 #define pik_parserCTX_STORE yypParser->p=p;
706 #define YYFALLBACK 1
707 #define YYNSTATE 164
708 #define YYNRULE 156
709 #define YYNRULE_WITH_ACTION 116
710 #define YYNTOKEN 100
711 #define YY_MAX_SHIFT 163
712 #define YY_MIN_SHIFTREDUCE 287
713 #define YY_MAX_SHIFTREDUCE 442
714 #define YY_ERROR_ACTION 443
715 #define YY_ACCEPT_ACTION 444
716 #define YY_NO_ACTION 445
717 #define YY_MIN_REDUCE 446
718 #define YY_MAX_REDUCE 601
719 #define YY_MIN_DSTRCTR 100
720 #define YY_MAX_DSTRCTR 103
721 /************* End control #defines *******************************************/
722 #define YY_NLOOKAHEAD ((int)(sizeof(yy_lookahead)/sizeof(yy_lookahead[0])))
723
724 /* Define the yytestcase() macro to be a no-op if is not already defined
725 ** otherwise.
@@ -798,324 +838,322 @@
798 ** yy_reduce_ofst[] For each state, the offset into yy_action for
799 ** shifting non-terminals after a reduce.
800 ** yy_default[] Default action for each state.
801 **
802 *********** Begin parsing tables **********************************************/
803 #define YY_ACTTAB_COUNT (1313)
804 static const YYACTIONTYPE yy_action[] = {
805 /* 0 */ 575, 495, 161, 119, 25, 452, 29, 74, 129, 148,
806 /* 10 */ 575, 492, 161, 119, 453, 113, 120, 161, 119, 530,
807 /* 20 */ 427, 428, 339, 559, 81, 30, 560, 561, 575, 64,
808 /* 30 */ 63, 62, 61, 322, 323, 9, 8, 33, 149, 32,
809 /* 40 */ 7, 71, 127, 38, 335, 66, 48, 37, 28, 339,
810 /* 50 */ 339, 339, 339, 425, 426, 340, 341, 342, 343, 344,
811 /* 60 */ 345, 346, 347, 348, 474, 528, 161, 119, 577, 77,
812 /* 70 */ 577, 73, 306, 148, 474, 533, 161, 119, 112, 113,
813 /* 80 */ 120, 161, 119, 128, 427, 428, 339, 31, 81, 531,
814 /* 90 */ 161, 119, 474, 35, 330, 378, 158, 322, 323, 9,
815 /* 100 */ 8, 33, 149, 32, 7, 71, 127, 328, 335, 66,
816 /* 110 */ 579, 378, 158, 339, 339, 339, 339, 425, 426, 340,
817 /* 120 */ 341, 342, 343, 344, 345, 346, 347, 348, 394, 435,
818 /* 130 */ 46, 59, 60, 64, 63, 62, 61, 357, 36, 376,
819 /* 140 */ 54, 51, 2, 47, 403, 13, 297, 411, 412, 413,
820 /* 150 */ 414, 80, 162, 308, 79, 133, 310, 126, 441, 440,
821 /* 160 */ 118, 123, 83, 404, 405, 406, 408, 80, 84, 308,
822 /* 170 */ 79, 299, 411, 412, 413, 414, 118, 69, 350, 350,
823 /* 180 */ 350, 350, 350, 350, 350, 350, 350, 350, 350, 62,
824 /* 190 */ 61, 434, 64, 63, 62, 61, 313, 398, 399, 427,
825 /* 200 */ 428, 339, 380, 157, 64, 63, 62, 61, 122, 106,
826 /* 210 */ 535, 436, 437, 438, 439, 298, 375, 391, 117, 393,
827 /* 220 */ 155, 154, 153, 394, 435, 49, 59, 60, 339, 339,
828 /* 230 */ 339, 339, 425, 426, 376, 3, 4, 2, 64, 63,
829 /* 240 */ 62, 61, 156, 156, 156, 394, 379, 159, 59, 60,
830 /* 250 */ 76, 67, 535, 441, 440, 5, 102, 6, 535, 42,
831 /* 260 */ 131, 535, 69, 107, 301, 302, 303, 394, 305, 15,
832 /* 270 */ 59, 60, 120, 161, 119, 446, 463, 424, 376, 423,
833 /* 280 */ 1, 42, 397, 78, 78, 36, 434, 11, 394, 435,
834 /* 290 */ 356, 59, 60, 12, 152, 139, 432, 14, 16, 376,
835 /* 300 */ 18, 65, 2, 138, 106, 430, 436, 437, 438, 439,
836 /* 310 */ 44, 375, 19, 117, 393, 155, 154, 153, 441, 440,
837 /* 320 */ 142, 140, 64, 63, 62, 61, 106, 20, 68, 376,
838 /* 330 */ 359, 107, 23, 375, 45, 117, 393, 155, 154, 153,
839 /* 340 */ 120, 161, 119, 55, 463, 114, 26, 57, 106, 147,
840 /* 350 */ 146, 434, 569, 58, 392, 375, 43, 117, 393, 155,
841 /* 360 */ 154, 153, 152, 384, 64, 63, 62, 61, 382, 106,
842 /* 370 */ 383, 436, 437, 438, 439, 377, 375, 70, 117, 393,
843 /* 380 */ 155, 154, 153, 160, 39, 22, 21, 445, 142, 140,
844 /* 390 */ 64, 63, 62, 61, 24, 17, 145, 141, 431, 108,
845 /* 400 */ 445, 445, 445, 391, 445, 445, 375, 445, 117, 445,
846 /* 410 */ 445, 55, 74, 445, 148, 445, 445, 147, 146, 124,
847 /* 420 */ 113, 120, 161, 119, 43, 445, 445, 142, 140, 64,
848 /* 430 */ 63, 62, 61, 445, 394, 445, 445, 59, 60, 64,
849 /* 440 */ 63, 62, 61, 149, 445, 376, 445, 445, 42, 445,
850 /* 450 */ 55, 445, 391, 22, 21, 445, 147, 146, 445, 445,
851 /* 460 */ 52, 445, 24, 43, 145, 141, 431, 394, 445, 445,
852 /* 470 */ 59, 60, 64, 63, 62, 61, 445, 445, 376, 132,
853 /* 480 */ 130, 42, 445, 445, 445, 355, 156, 156, 156, 445,
854 /* 490 */ 445, 445, 22, 21, 445, 394, 473, 445, 59, 60,
855 /* 500 */ 445, 24, 445, 145, 141, 431, 376, 445, 107, 42,
856 /* 510 */ 64, 63, 62, 61, 445, 106, 445, 120, 161, 119,
857 /* 520 */ 445, 478, 375, 354, 117, 393, 155, 154, 153, 445,
858 /* 530 */ 394, 143, 473, 59, 60, 64, 63, 62, 61, 152,
859 /* 540 */ 445, 376, 445, 445, 42, 445, 445, 445, 106, 64,
860 /* 550 */ 63, 62, 61, 445, 445, 375, 50, 117, 393, 155,
861 /* 560 */ 154, 153, 445, 394, 144, 445, 59, 60, 445, 445,
862 /* 570 */ 53, 72, 445, 148, 376, 445, 106, 42, 125, 113,
863 /* 580 */ 120, 161, 119, 375, 445, 117, 393, 155, 154, 153,
864 /* 590 */ 394, 445, 445, 59, 60, 445, 445, 445, 445, 445,
865 /* 600 */ 445, 102, 149, 445, 42, 445, 74, 445, 148, 445,
866 /* 610 */ 445, 106, 445, 497, 113, 120, 161, 119, 375, 445,
867 /* 620 */ 117, 393, 155, 154, 153, 394, 445, 445, 59, 60,
868 /* 630 */ 445, 445, 88, 445, 445, 445, 376, 149, 445, 40,
869 /* 640 */ 445, 120, 161, 119, 106, 445, 445, 435, 110, 110,
870 /* 650 */ 445, 375, 445, 117, 393, 155, 154, 153, 394, 445,
871 /* 660 */ 445, 59, 60, 152, 85, 445, 445, 445, 445, 376,
872 /* 670 */ 445, 106, 41, 120, 161, 119, 441, 440, 375, 445,
873 /* 680 */ 117, 393, 155, 154, 153, 448, 454, 29, 445, 445,
874 /* 690 */ 74, 450, 148, 75, 88, 152, 445, 496, 113, 120,
875 /* 700 */ 161, 119, 163, 120, 161, 119, 106, 27, 445, 434,
876 /* 710 */ 111, 111, 445, 375, 445, 117, 393, 155, 154, 153,
877 /* 720 */ 445, 149, 445, 445, 445, 152, 74, 445, 148, 436,
878 /* 730 */ 437, 438, 439, 490, 113, 120, 161, 119, 445, 106,
879 /* 740 */ 121, 447, 454, 29, 445, 445, 375, 450, 117, 393,
880 /* 750 */ 155, 154, 153, 445, 445, 445, 445, 149, 163, 74,
881 /* 760 */ 445, 148, 444, 27, 445, 445, 484, 113, 120, 161,
882 /* 770 */ 119, 445, 445, 445, 74, 445, 148, 445, 445, 445,
883 /* 780 */ 445, 483, 113, 120, 161, 119, 74, 445, 148, 86,
884 /* 790 */ 149, 445, 445, 480, 113, 120, 161, 119, 120, 161,
885 /* 800 */ 119, 445, 74, 445, 148, 149, 445, 445, 445, 134,
886 /* 810 */ 113, 120, 161, 119, 74, 445, 148, 149, 445, 445,
887 /* 820 */ 152, 517, 113, 120, 161, 119, 88, 64, 63, 62,
888 /* 830 */ 61, 445, 445, 149, 445, 120, 161, 119, 445, 74,
889 /* 840 */ 396, 148, 475, 445, 445, 149, 137, 113, 120, 161,
890 /* 850 */ 119, 74, 445, 148, 445, 445, 445, 152, 525, 113,
891 /* 860 */ 120, 161, 119, 445, 74, 445, 148, 445, 445, 445,
892 /* 870 */ 149, 527, 113, 120, 161, 119, 445, 445, 445, 74,
893 /* 880 */ 445, 148, 149, 445, 445, 445, 524, 113, 120, 161,
894 /* 890 */ 119, 74, 445, 148, 98, 149, 445, 445, 526, 113,
895 /* 900 */ 120, 161, 119, 120, 161, 119, 445, 74, 445, 148,
896 /* 910 */ 149, 445, 445, 445, 523, 113, 120, 161, 119, 74,
897 /* 920 */ 445, 148, 149, 445, 445, 152, 522, 113, 120, 161,
898 /* 930 */ 119, 89, 64, 63, 62, 61, 445, 445, 149, 445,
899 /* 940 */ 120, 161, 119, 445, 74, 395, 148, 445, 445, 445,
900 /* 950 */ 149, 521, 113, 120, 161, 119, 74, 445, 148, 445,
901 /* 960 */ 445, 445, 152, 520, 113, 120, 161, 119, 445, 74,
902 /* 970 */ 445, 148, 445, 445, 445, 149, 519, 113, 120, 161,
903 /* 980 */ 119, 445, 445, 445, 74, 445, 148, 149, 445, 445,
904 /* 990 */ 445, 150, 113, 120, 161, 119, 74, 445, 148, 90,
905 /* 1000 */ 149, 445, 445, 151, 113, 120, 161, 119, 120, 161,
906 /* 1010 */ 119, 445, 74, 445, 148, 149, 445, 435, 445, 136,
907 /* 1020 */ 113, 120, 161, 119, 74, 445, 148, 149, 445, 445,
908 /* 1030 */ 152, 135, 113, 120, 161, 119, 64, 63, 62, 61,
909 /* 1040 */ 445, 445, 445, 149, 445, 445, 441, 440, 445, 88,
910 /* 1050 */ 445, 445, 445, 445, 445, 149, 445, 56, 120, 161,
911 /* 1060 */ 119, 88, 445, 445, 10, 479, 479, 445, 445, 445,
912 /* 1070 */ 120, 161, 119, 445, 445, 445, 445, 82, 445, 434,
913 /* 1080 */ 152, 445, 445, 445, 466, 445, 34, 109, 447, 454,
914 /* 1090 */ 29, 445, 152, 445, 450, 445, 445, 445, 107, 436,
915 /* 1100 */ 437, 438, 439, 87, 445, 163, 445, 120, 161, 119,
916 /* 1110 */ 27, 451, 120, 161, 119, 99, 445, 64, 63, 62,
917 /* 1120 */ 61, 445, 100, 445, 120, 161, 119, 101, 445, 152,
918 /* 1130 */ 391, 120, 161, 119, 152, 445, 120, 161, 119, 91,
919 /* 1140 */ 445, 445, 445, 445, 445, 445, 152, 445, 120, 161,
920 /* 1150 */ 119, 103, 445, 152, 92, 445, 445, 445, 152, 445,
921 /* 1160 */ 120, 161, 119, 120, 161, 119, 93, 445, 445, 104,
922 /* 1170 */ 152, 445, 445, 445, 445, 120, 161, 119, 120, 161,
923 /* 1180 */ 119, 445, 152, 445, 94, 152, 445, 445, 445, 445,
924 /* 1190 */ 445, 445, 105, 120, 161, 119, 445, 152, 445, 95,
925 /* 1200 */ 152, 120, 161, 119, 445, 445, 445, 96, 120, 161,
926 /* 1210 */ 119, 445, 445, 445, 445, 152, 120, 161, 119, 445,
927 /* 1220 */ 445, 445, 445, 152, 445, 445, 445, 445, 445, 445,
928 /* 1230 */ 152, 97, 445, 445, 549, 445, 445, 548, 152, 445,
929 /* 1240 */ 120, 161, 119, 120, 161, 119, 120, 161, 119, 445,
930 /* 1250 */ 445, 445, 445, 445, 445, 445, 445, 445, 445, 445,
931 /* 1260 */ 445, 445, 152, 547, 445, 152, 546, 445, 152, 115,
932 /* 1270 */ 445, 445, 120, 161, 119, 120, 161, 119, 120, 161,
933 /* 1280 */ 119, 116, 445, 445, 445, 445, 445, 445, 445, 445,
934 /* 1290 */ 120, 161, 119, 445, 152, 445, 445, 152, 445, 445,
935 /* 1300 */ 152, 445, 445, 445, 445, 445, 445, 445, 445, 445,
936 /* 1310 */ 445, 445, 152,
937 };
938 static const YYCODETYPE yy_lookahead[] = {
939 /* 0 */ 0, 113, 114, 115, 134, 102, 103, 104, 106, 106,
940 /* 10 */ 10, 113, 114, 115, 111, 112, 113, 114, 115, 106,
941 /* 20 */ 20, 21, 22, 105, 24, 126, 108, 109, 28, 4,
942 /* 30 */ 5, 6, 7, 33, 34, 35, 36, 37, 135, 39,
943 /* 40 */ 40, 41, 42, 105, 44, 45, 108, 109, 107, 49,
944 /* 50 */ 50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
945 /* 60 */ 60, 61, 62, 63, 0, 113, 114, 115, 130, 131,
946 /* 70 */ 132, 104, 25, 106, 10, 113, 114, 115, 111, 112,
947 /* 80 */ 113, 114, 115, 106, 20, 21, 22, 128, 24, 113,
948 /* 90 */ 114, 115, 28, 129, 2, 26, 27, 33, 34, 35,
949 /* 100 */ 36, 37, 135, 39, 40, 41, 42, 2, 44, 45,
950 /* 110 */ 133, 26, 27, 49, 50, 51, 52, 53, 54, 55,
951 /* 120 */ 56, 57, 58, 59, 60, 61, 62, 63, 1, 2,
952 /* 130 */ 38, 4, 5, 4, 5, 6, 7, 17, 10, 12,
953 /* 140 */ 4, 5, 15, 38, 1, 25, 17, 29, 30, 31,
954 /* 150 */ 32, 24, 83, 26, 27, 12, 28, 14, 31, 32,
955 /* 160 */ 91, 18, 116, 20, 21, 22, 23, 24, 116, 26,
956 /* 170 */ 27, 19, 29, 30, 31, 32, 91, 3, 64, 65,
957 /* 180 */ 66, 67, 68, 69, 70, 71, 72, 73, 74, 6,
958 /* 190 */ 7, 64, 4, 5, 6, 7, 8, 97, 98, 20,
959 /* 200 */ 21, 22, 26, 27, 4, 5, 6, 7, 1, 82,
960 /* 210 */ 48, 84, 85, 86, 87, 17, 89, 17, 91, 92,
961 /* 220 */ 93, 94, 95, 1, 2, 25, 4, 5, 49, 50,
962 /* 230 */ 51, 52, 53, 54, 12, 16, 15, 15, 4, 5,
963 /* 240 */ 6, 7, 20, 21, 22, 1, 26, 27, 4, 5,
964 /* 250 */ 48, 43, 90, 31, 32, 40, 12, 40, 96, 15,
965 /* 260 */ 47, 99, 88, 104, 20, 21, 22, 1, 24, 35,
966 /* 270 */ 4, 5, 113, 114, 115, 0, 117, 41, 12, 41,
967 /* 280 */ 13, 15, 17, 124, 125, 10, 64, 25, 1, 2,
968 /* 290 */ 17, 4, 5, 75, 135, 81, 80, 3, 3, 12,
969 /* 300 */ 3, 99, 15, 79, 82, 80, 84, 85, 86, 87,
970 /* 310 */ 38, 89, 3, 91, 92, 93, 94, 95, 31, 32,
971 /* 320 */ 2, 3, 4, 5, 6, 7, 82, 3, 3, 12,
972 /* 330 */ 77, 104, 25, 89, 16, 91, 92, 93, 94, 95,
973 /* 340 */ 113, 114, 115, 25, 117, 96, 15, 15, 82, 31,
974 /* 350 */ 32, 64, 125, 15, 17, 89, 38, 91, 92, 93,
975 /* 360 */ 94, 95, 135, 28, 4, 5, 6, 7, 28, 82,
976 /* 370 */ 28, 84, 85, 86, 87, 12, 89, 3, 91, 92,
977 /* 380 */ 93, 94, 95, 90, 11, 67, 68, 136, 2, 3,
978 /* 390 */ 4, 5, 6, 7, 76, 35, 78, 79, 80, 82,
979 /* 400 */ 136, 136, 136, 17, 136, 136, 89, 136, 91, 136,
980 /* 410 */ 136, 25, 104, 136, 106, 136, 136, 31, 32, 111,
981 /* 420 */ 112, 113, 114, 115, 38, 136, 136, 2, 3, 4,
982 /* 430 */ 5, 6, 7, 136, 1, 136, 136, 4, 5, 4,
983 /* 440 */ 5, 6, 7, 135, 136, 12, 136, 136, 15, 136,
984 /* 450 */ 25, 136, 17, 67, 68, 136, 31, 32, 136, 136,
985 /* 460 */ 25, 136, 76, 38, 78, 79, 80, 1, 136, 136,
986 /* 470 */ 4, 5, 4, 5, 6, 7, 136, 136, 12, 46,
987 /* 480 */ 47, 15, 136, 136, 136, 17, 20, 21, 22, 136,
988 /* 490 */ 136, 136, 67, 68, 136, 1, 2, 136, 4, 5,
989 /* 500 */ 136, 76, 136, 78, 79, 80, 12, 136, 104, 15,
990 /* 510 */ 4, 5, 6, 7, 136, 82, 136, 113, 114, 115,
991 /* 520 */ 136, 117, 89, 17, 91, 92, 93, 94, 95, 136,
992 /* 530 */ 1, 2, 38, 4, 5, 4, 5, 6, 7, 135,
993 /* 540 */ 136, 12, 136, 136, 15, 136, 136, 136, 82, 4,
994 /* 550 */ 5, 6, 7, 136, 136, 89, 25, 91, 92, 93,
995 /* 560 */ 94, 95, 136, 1, 2, 136, 4, 5, 136, 136,
996 /* 570 */ 25, 104, 136, 106, 12, 136, 82, 15, 111, 112,
997 /* 580 */ 113, 114, 115, 89, 136, 91, 92, 93, 94, 95,
998 /* 590 */ 1, 136, 136, 4, 5, 136, 136, 136, 136, 136,
999 /* 600 */ 136, 12, 135, 136, 15, 136, 104, 136, 106, 136,
1000 /* 610 */ 136, 82, 136, 111, 112, 113, 114, 115, 89, 136,
1001 /* 620 */ 91, 92, 93, 94, 95, 1, 136, 136, 4, 5,
1002 /* 630 */ 136, 136, 104, 136, 136, 136, 12, 135, 136, 15,
1003 /* 640 */ 136, 113, 114, 115, 82, 136, 136, 2, 120, 121,
1004 /* 650 */ 136, 89, 136, 91, 92, 93, 94, 95, 1, 136,
1005 /* 660 */ 136, 4, 5, 135, 104, 136, 136, 136, 136, 12,
1006 /* 670 */ 136, 82, 15, 113, 114, 115, 31, 32, 89, 136,
1007 /* 680 */ 91, 92, 93, 94, 95, 101, 102, 103, 136, 136,
1008 /* 690 */ 104, 107, 106, 48, 104, 135, 136, 111, 112, 113,
1009 /* 700 */ 114, 115, 118, 113, 114, 115, 82, 123, 136, 64,
1010 /* 710 */ 120, 121, 136, 89, 136, 91, 92, 93, 94, 95,
1011 /* 720 */ 136, 135, 136, 136, 136, 135, 104, 136, 106, 84,
1012 /* 730 */ 85, 86, 87, 111, 112, 113, 114, 115, 136, 82,
1013 /* 740 */ 100, 101, 102, 103, 136, 136, 89, 107, 91, 92,
1014 /* 750 */ 93, 94, 95, 136, 136, 136, 136, 135, 118, 104,
1015 /* 760 */ 136, 106, 122, 123, 136, 136, 111, 112, 113, 114,
1016 /* 770 */ 115, 136, 136, 136, 104, 136, 106, 136, 136, 136,
1017 /* 780 */ 136, 111, 112, 113, 114, 115, 104, 136, 106, 104,
1018 /* 790 */ 135, 136, 136, 111, 112, 113, 114, 115, 113, 114,
1019 /* 800 */ 115, 136, 104, 136, 106, 135, 136, 136, 136, 111,
1020 /* 810 */ 112, 113, 114, 115, 104, 136, 106, 135, 136, 136,
1021 /* 820 */ 135, 111, 112, 113, 114, 115, 104, 4, 5, 6,
1022 /* 830 */ 7, 136, 136, 135, 136, 113, 114, 115, 136, 104,
1023 /* 840 */ 17, 106, 120, 136, 136, 135, 111, 112, 113, 114,
1024 /* 850 */ 115, 104, 136, 106, 136, 136, 136, 135, 111, 112,
1025 /* 860 */ 113, 114, 115, 136, 104, 136, 106, 136, 136, 136,
1026 /* 870 */ 135, 111, 112, 113, 114, 115, 136, 136, 136, 104,
1027 /* 880 */ 136, 106, 135, 136, 136, 136, 111, 112, 113, 114,
1028 /* 890 */ 115, 104, 136, 106, 104, 135, 136, 136, 111, 112,
1029 /* 900 */ 113, 114, 115, 113, 114, 115, 136, 104, 136, 106,
1030 /* 910 */ 135, 136, 136, 136, 111, 112, 113, 114, 115, 104,
1031 /* 920 */ 136, 106, 135, 136, 136, 135, 111, 112, 113, 114,
1032 /* 930 */ 115, 104, 4, 5, 6, 7, 136, 136, 135, 136,
1033 /* 940 */ 113, 114, 115, 136, 104, 17, 106, 136, 136, 136,
1034 /* 950 */ 135, 111, 112, 113, 114, 115, 104, 136, 106, 136,
1035 /* 960 */ 136, 136, 135, 111, 112, 113, 114, 115, 136, 104,
1036 /* 970 */ 136, 106, 136, 136, 136, 135, 111, 112, 113, 114,
1037 /* 980 */ 115, 136, 136, 136, 104, 136, 106, 135, 136, 136,
1038 /* 990 */ 136, 111, 112, 113, 114, 115, 104, 136, 106, 104,
1039 /* 1000 */ 135, 136, 136, 111, 112, 113, 114, 115, 113, 114,
1040 /* 1010 */ 115, 136, 104, 136, 106, 135, 136, 2, 136, 111,
1041 /* 1020 */ 112, 113, 114, 115, 104, 136, 106, 135, 136, 136,
1042 /* 1030 */ 135, 111, 112, 113, 114, 115, 4, 5, 6, 7,
1043 /* 1040 */ 136, 136, 136, 135, 136, 136, 31, 32, 136, 104,
1044 /* 1050 */ 136, 136, 136, 136, 136, 135, 136, 25, 113, 114,
1045 /* 1060 */ 115, 104, 136, 136, 119, 120, 121, 136, 136, 136,
1046 /* 1070 */ 113, 114, 115, 136, 136, 136, 136, 120, 136, 64,
1047 /* 1080 */ 135, 136, 136, 136, 127, 136, 129, 100, 101, 102,
1048 /* 1090 */ 103, 136, 135, 136, 107, 136, 136, 136, 104, 84,
1049 /* 1100 */ 85, 86, 87, 104, 136, 118, 136, 113, 114, 115,
1050 /* 1110 */ 123, 117, 113, 114, 115, 104, 136, 4, 5, 6,
1051 /* 1120 */ 7, 136, 104, 136, 113, 114, 115, 104, 136, 135,
1052 /* 1130 */ 17, 113, 114, 115, 135, 136, 113, 114, 115, 104,
1053 /* 1140 */ 136, 136, 136, 136, 136, 136, 135, 136, 113, 114,
1054 /* 1150 */ 115, 104, 136, 135, 104, 136, 136, 136, 135, 136,
1055 /* 1160 */ 113, 114, 115, 113, 114, 115, 104, 136, 136, 104,
1056 /* 1170 */ 135, 136, 136, 136, 136, 113, 114, 115, 113, 114,
1057 /* 1180 */ 115, 136, 135, 136, 104, 135, 136, 136, 136, 136,
1058 /* 1190 */ 136, 136, 104, 113, 114, 115, 136, 135, 136, 104,
1059 /* 1200 */ 135, 113, 114, 115, 136, 136, 136, 104, 113, 114,
1060 /* 1210 */ 115, 136, 136, 136, 136, 135, 113, 114, 115, 136,
1061 /* 1220 */ 136, 136, 136, 135, 136, 136, 136, 136, 136, 136,
1062 /* 1230 */ 135, 104, 136, 136, 104, 136, 136, 104, 135, 136,
1063 /* 1240 */ 113, 114, 115, 113, 114, 115, 113, 114, 115, 136,
1064 /* 1250 */ 136, 136, 136, 136, 136, 136, 136, 136, 136, 136,
1065 /* 1260 */ 136, 136, 135, 104, 136, 135, 104, 136, 135, 104,
1066 /* 1270 */ 136, 136, 113, 114, 115, 113, 114, 115, 113, 114,
1067 /* 1280 */ 115, 104, 136, 136, 136, 136, 136, 136, 136, 136,
1068 /* 1290 */ 113, 114, 115, 136, 135, 136, 136, 135, 136, 136,
1069 /* 1300 */ 135, 136, 136, 136, 136, 136, 136, 136, 136, 136,
1070 /* 1310 */ 136, 136, 135, 100, 100, 100, 100, 100, 100, 100,
1071 /* 1320 */ 100, 100, 100, 100, 100, 100, 100, 100, 100, 100,
1072 /* 1330 */ 100, 100, 100, 100, 100, 100, 100, 100, 100, 100,
1073 /* 1340 */ 100, 100, 100, 100, 100, 100, 100, 100, 100, 100,
1074 /* 1350 */ 100, 100, 100, 100, 100, 100, 100, 100, 100, 100,
1075 /* 1360 */ 100, 100, 100, 100, 100, 100, 100, 100, 100, 100,
1076 /* 1370 */ 100, 100, 100, 100, 100, 100, 100, 100, 100, 100,
1077 /* 1380 */ 100, 100, 100, 100, 100, 100, 100, 100, 100, 100,
1078 /* 1390 */ 100, 100, 100, 100, 100, 100, 100, 100, 100, 100,
1079 /* 1400 */ 100, 100, 100, 100, 100, 100, 100, 100, 100, 100,
1080 /* 1410 */ 100, 100, 100,
1081 };
1082 #define YY_SHIFT_COUNT (163)
1083 #define YY_SHIFT_MIN (0)
1084 #define YY_SHIFT_MAX (1113)
1085 static const unsigned short int yy_shift_ofst[] = {
1086 /* 0 */ 143, 127, 222, 287, 287, 287, 287, 287, 287, 287,
1087 /* 10 */ 287, 287, 287, 287, 287, 287, 287, 287, 287, 287,
1088 /* 20 */ 287, 287, 287, 287, 287, 287, 287, 244, 433, 266,
1089 /* 30 */ 244, 143, 494, 494, 0, 64, 143, 589, 266, 589,
1090 /* 40 */ 466, 466, 466, 529, 562, 266, 266, 266, 266, 266,
1091 /* 50 */ 266, 624, 266, 266, 657, 266, 266, 266, 266, 266,
1092 /* 60 */ 266, 266, 266, 266, 266, 179, 317, 317, 317, 317,
1093 /* 70 */ 317, 645, 318, 386, 425, 1015, 1015, 118, 47, 1313,
1094 /* 80 */ 1313, 1313, 1313, 114, 114, 200, 435, 129, 188, 234,
1095 /* 90 */ 360, 468, 531, 506, 545, 823, 1032, 928, 1113, 25,
1096 /* 100 */ 25, 25, 162, 25, 25, 25, 69, 25, 85, 128,
1097 /* 110 */ 92, 105, 120, 136, 100, 183, 183, 176, 220, 174,
1098 /* 120 */ 202, 275, 152, 207, 198, 219, 221, 208, 215, 217,
1099 /* 130 */ 236, 238, 213, 267, 265, 262, 218, 273, 216, 224,
1100 /* 140 */ 214, 225, 294, 295, 297, 272, 309, 324, 325, 249,
1101 /* 150 */ 253, 307, 249, 331, 332, 338, 337, 335, 340, 342,
1102 /* 160 */ 363, 293, 374, 373,
1103 };
1104 #define YY_REDUCE_COUNT (82)
1105 #define YY_REDUCE_MIN (-130)
1106 #define YY_REDUCE_MAX (1177)
1107 static const short yy_reduce_ofst[] = {
1108 /* 0 */ 640, -97, -33, 308, 467, 502, 586, 622, 655, 670,
1109 /* 10 */ 682, 698, 710, 735, 747, 760, 775, 787, 803, 815,
1110 /* 20 */ 840, 852, 865, 880, 892, 908, 920, 159, 945, 957,
1111 /* 30 */ 227, 987, 528, 590, -62, -62, 584, 404, 722, 994,
1112 /* 40 */ 560, 685, 790, 827, 895, 999, 1011, 1018, 1023, 1035,
1113 /* 50 */ 1047, 1050, 1062, 1065, 1080, 1088, 1095, 1103, 1127, 1130,
1114 /* 60 */ 1133, 1159, 1162, 1165, 1177, -82, -112, -102, -48, -38,
1115 /* 70 */ -24, -23, -130, -130, -130, -98, -87, -59, -101, -41,
1116 /* 80 */ 46, 52, -36,
1117 };
1118 static const YYACTIONTYPE yy_default[] = {
1119 /* 0 */ 449, 443, 443, 443, 443, 443, 443, 443, 443, 443,
1120 /* 10 */ 443, 443, 443, 443, 443, 443, 443, 443, 443, 443,
1121 /* 20 */ 443, 443, 443, 443, 443, 443, 443, 443, 473, 576,
@@ -1176,10 +1214,11 @@
1176 0, /* COLOR => nothing */
1177 0, /* THICKNESS => nothing */
1178 0, /* PRINT => nothing */
1179 0, /* STRING => nothing */
1180 0, /* COMMA => nothing */
 
1181 0, /* CLASSNAME => nothing */
1182 0, /* LB => nothing */
1183 0, /* RB => nothing */
1184 0, /* UP => nothing */
1185 0, /* DOWN => nothing */
@@ -1359,120 +1398,122 @@
1359 /* 21 */ "COLOR",
1360 /* 22 */ "THICKNESS",
1361 /* 23 */ "PRINT",
1362 /* 24 */ "STRING",
1363 /* 25 */ "COMMA",
1364 /* 26 */ "CLASSNAME",
1365 /* 27 */ "LB",
1366 /* 28 */ "RB",
1367 /* 29 */ "UP",
1368 /* 30 */ "DOWN",
1369 /* 31 */ "LEFT",
1370 /* 32 */ "RIGHT",
1371 /* 33 */ "CLOSE",
1372 /* 34 */ "CHOP",
1373 /* 35 */ "FROM",
1374 /* 36 */ "TO",
1375 /* 37 */ "THEN",
1376 /* 38 */ "HEADING",
1377 /* 39 */ "GO",
1378 /* 40 */ "AT",
1379 /* 41 */ "WITH",
1380 /* 42 */ "SAME",
1381 /* 43 */ "AS",
1382 /* 44 */ "FIT",
1383 /* 45 */ "BEHIND",
1384 /* 46 */ "UNTIL",
1385 /* 47 */ "EVEN",
1386 /* 48 */ "DOT_E",
1387 /* 49 */ "HEIGHT",
1388 /* 50 */ "WIDTH",
1389 /* 51 */ "RADIUS",
1390 /* 52 */ "DIAMETER",
1391 /* 53 */ "DOTTED",
1392 /* 54 */ "DASHED",
1393 /* 55 */ "CW",
1394 /* 56 */ "CCW",
1395 /* 57 */ "LARROW",
1396 /* 58 */ "RARROW",
1397 /* 59 */ "LRARROW",
1398 /* 60 */ "INVIS",
1399 /* 61 */ "THICK",
1400 /* 62 */ "THIN",
1401 /* 63 */ "SOLID",
1402 /* 64 */ "CENTER",
1403 /* 65 */ "LJUST",
1404 /* 66 */ "RJUST",
1405 /* 67 */ "ABOVE",
1406 /* 68 */ "BELOW",
1407 /* 69 */ "ITALIC",
1408 /* 70 */ "BOLD",
1409 /* 71 */ "MONO",
1410 /* 72 */ "ALIGNED",
1411 /* 73 */ "BIG",
1412 /* 74 */ "SMALL",
1413 /* 75 */ "AND",
1414 /* 76 */ "LT",
1415 /* 77 */ "GT",
1416 /* 78 */ "ON",
1417 /* 79 */ "WAY",
1418 /* 80 */ "BETWEEN",
1419 /* 81 */ "THE",
1420 /* 82 */ "NTH",
1421 /* 83 */ "VERTEX",
1422 /* 84 */ "TOP",
1423 /* 85 */ "BOTTOM",
1424 /* 86 */ "START",
1425 /* 87 */ "END",
1426 /* 88 */ "IN",
1427 /* 89 */ "THIS",
1428 /* 90 */ "DOT_U",
1429 /* 91 */ "LAST",
1430 /* 92 */ "NUMBER",
1431 /* 93 */ "FUNC1",
1432 /* 94 */ "FUNC2",
1433 /* 95 */ "DIST",
1434 /* 96 */ "DOT_XY",
1435 /* 97 */ "X",
1436 /* 98 */ "Y",
1437 /* 99 */ "DOT_L",
1438 /* 100 */ "statement_list",
1439 /* 101 */ "statement",
1440 /* 102 */ "unnamed_statement",
1441 /* 103 */ "basetype",
1442 /* 104 */ "expr",
1443 /* 105 */ "numproperty",
1444 /* 106 */ "edge",
1445 /* 107 */ "direction",
1446 /* 108 */ "dashproperty",
1447 /* 109 */ "colorproperty",
1448 /* 110 */ "locproperty",
1449 /* 111 */ "position",
1450 /* 112 */ "place",
1451 /* 113 */ "object",
1452 /* 114 */ "objectname",
1453 /* 115 */ "nth",
1454 /* 116 */ "textposition",
1455 /* 117 */ "rvalue",
1456 /* 118 */ "lvalue",
1457 /* 119 */ "even",
1458 /* 120 */ "relexpr",
1459 /* 121 */ "optrelexpr",
1460 /* 122 */ "document",
1461 /* 123 */ "print",
1462 /* 124 */ "prlist",
1463 /* 125 */ "pritem",
1464 /* 126 */ "prsep",
1465 /* 127 */ "attribute_list",
1466 /* 128 */ "savelist",
1467 /* 129 */ "alist",
1468 /* 130 */ "attribute",
1469 /* 131 */ "go",
1470 /* 132 */ "boolproperty",
1471 /* 133 */ "withclause",
1472 /* 134 */ "between",
1473 /* 135 */ "place2",
 
 
1474 };
1475 #endif /* defined(YYCOVERAGE) || !defined(NDEBUG) */
1476
1477 #ifndef NDEBUG
1478 /* For tracing reduce actions, the names of all rules are required.
@@ -1755,24 +1796,24 @@
1755 ** Note: during a reduce, the only symbols destroyed are those
1756 ** which appear on the RHS of the rule, but which are *not* used
1757 ** inside the C code.
1758 */
1759 /********* Begin destructor definitions ***************************************/
1760 case 100: /* statement_list */
1761 {
1762 #line 523 "pikchr.y"
1763 pik_elist_free(p,(yypminor->yy235));
1764 #line 1789 "pikchr.c"
1765 }
1766 break;
1767 case 101: /* statement */
1768 case 102: /* unnamed_statement */
1769 case 103: /* basetype */
1770 {
1771 #line 525 "pikchr.y"
1772 pik_elem_free(p,(yypminor->yy162));
1773 #line 1798 "pikchr.c"
1774 }
1775 break;
1776 /********* End destructor definitions *****************************************/
1777 default: break; /* If no destructor action specified: do nothing */
1778 }
@@ -2003,14 +2044,14 @@
2003 #endif
2004 while( yypParser->yytos>yypParser->yystack ) yy_pop_parser_stack(yypParser);
2005 /* Here code is inserted which will execute if the parser
2006 ** stack every overflows */
2007 /******** Begin %stack_overflow code ******************************************/
2008 #line 557 "pikchr.y"
2009
2010 pik_error(p, 0, "parser stack overflow");
2011 #line 2036 "pikchr.c"
2012 /******** End %stack_overflow code ********************************************/
2013 pik_parserARG_STORE /* Suppress warning about unused %extra_argument var */
2014 pik_parserCTX_STORE
2015 }
2016
@@ -2072,166 +2113,166 @@
2072 }
2073
2074 /* For rule J, yyRuleInfoLhs[J] contains the symbol on the left-hand side
2075 ** of that rule */
2076 static const YYCODETYPE yyRuleInfoLhs[] = {
2077 122, /* (0) document ::= statement_list */
2078 100, /* (1) statement_list ::= statement */
2079 100, /* (2) statement_list ::= statement_list EOL statement */
2080 101, /* (3) statement ::= */
2081 101, /* (4) statement ::= direction */
2082 101, /* (5) statement ::= lvalue ASSIGN rvalue */
2083 101, /* (6) statement ::= PLACENAME COLON unnamed_statement */
2084 101, /* (7) statement ::= PLACENAME COLON position */
2085 101, /* (8) statement ::= unnamed_statement */
2086 101, /* (9) statement ::= print prlist */
2087 101, /* (10) statement ::= ASSERT LP expr EQ expr RP */
2088 101, /* (11) statement ::= ASSERT LP position EQ position RP */
2089 101, /* (12) statement ::= DEFINE ID CODEBLOCK */
2090 117, /* (13) rvalue ::= PLACENAME */
2091 125, /* (14) pritem ::= FILL */
2092 125, /* (15) pritem ::= COLOR */
2093 125, /* (16) pritem ::= THICKNESS */
2094 125, /* (17) pritem ::= rvalue */
2095 125, /* (18) pritem ::= STRING */
2096 126, /* (19) prsep ::= COMMA */
2097 102, /* (20) unnamed_statement ::= basetype attribute_list */
2098 103, /* (21) basetype ::= CLASSNAME */
2099 103, /* (22) basetype ::= STRING textposition */
2100 103, /* (23) basetype ::= LB savelist statement_list RB */
2101 128, /* (24) savelist ::= */
2102 120, /* (25) relexpr ::= expr */
2103 120, /* (26) relexpr ::= expr PERCENT */
2104 121, /* (27) optrelexpr ::= */
2105 127, /* (28) attribute_list ::= relexpr alist */
2106 130, /* (29) attribute ::= numproperty relexpr */
2107 130, /* (30) attribute ::= dashproperty expr */
2108 130, /* (31) attribute ::= dashproperty */
2109 130, /* (32) attribute ::= colorproperty rvalue */
2110 130, /* (33) attribute ::= go direction optrelexpr */
2111 130, /* (34) attribute ::= go direction even position */
2112 130, /* (35) attribute ::= CLOSE */
2113 130, /* (36) attribute ::= CHOP */
2114 130, /* (37) attribute ::= FROM position */
2115 130, /* (38) attribute ::= TO position */
2116 130, /* (39) attribute ::= THEN */
2117 130, /* (40) attribute ::= THEN optrelexpr HEADING expr */
2118 130, /* (41) attribute ::= THEN optrelexpr EDGEPT */
2119 130, /* (42) attribute ::= GO optrelexpr HEADING expr */
2120 130, /* (43) attribute ::= GO optrelexpr EDGEPT */
2121 130, /* (44) attribute ::= AT position */
2122 130, /* (45) attribute ::= SAME */
2123 130, /* (46) attribute ::= SAME AS object */
2124 130, /* (47) attribute ::= STRING textposition */
2125 130, /* (48) attribute ::= FIT */
2126 130, /* (49) attribute ::= BEHIND object */
2127 133, /* (50) withclause ::= DOT_E edge AT position */
2128 133, /* (51) withclause ::= edge AT position */
2129 105, /* (52) numproperty ::= HEIGHT|WIDTH|RADIUS|DIAMETER|THICKNESS */
2130 132, /* (53) boolproperty ::= CW */
2131 132, /* (54) boolproperty ::= CCW */
2132 132, /* (55) boolproperty ::= LARROW */
2133 132, /* (56) boolproperty ::= RARROW */
2134 132, /* (57) boolproperty ::= LRARROW */
2135 132, /* (58) boolproperty ::= INVIS */
2136 132, /* (59) boolproperty ::= THICK */
2137 132, /* (60) boolproperty ::= THIN */
2138 132, /* (61) boolproperty ::= SOLID */
2139 116, /* (62) textposition ::= */
2140 116, /* (63) textposition ::= textposition CENTER|LJUST|RJUST|ABOVE|BELOW|ITALIC|BOLD|MONO|ALIGNED|BIG|SMALL */
2141 111, /* (64) position ::= expr COMMA expr */
2142 111, /* (65) position ::= place PLUS expr COMMA expr */
2143 111, /* (66) position ::= place MINUS expr COMMA expr */
2144 111, /* (67) position ::= place PLUS LP expr COMMA expr RP */
2145 111, /* (68) position ::= place MINUS LP expr COMMA expr RP */
2146 111, /* (69) position ::= LP position COMMA position RP */
2147 111, /* (70) position ::= LP position RP */
2148 111, /* (71) position ::= expr between position AND position */
2149 111, /* (72) position ::= expr LT position COMMA position GT */
2150 111, /* (73) position ::= expr ABOVE position */
2151 111, /* (74) position ::= expr BELOW position */
2152 111, /* (75) position ::= expr LEFT OF position */
2153 111, /* (76) position ::= expr RIGHT OF position */
2154 111, /* (77) position ::= expr ON HEADING EDGEPT OF position */
2155 111, /* (78) position ::= expr HEADING EDGEPT OF position */
2156 111, /* (79) position ::= expr EDGEPT OF position */
2157 111, /* (80) position ::= expr ON HEADING expr FROM position */
2158 111, /* (81) position ::= expr HEADING expr FROM position */
2159 112, /* (82) place ::= edge OF object */
2160 135, /* (83) place2 ::= object */
2161 135, /* (84) place2 ::= object DOT_E edge */
2162 135, /* (85) place2 ::= NTH VERTEX OF object */
2163 113, /* (86) object ::= nth */
2164 113, /* (87) object ::= nth OF|IN object */
2165 114, /* (88) objectname ::= THIS */
2166 114, /* (89) objectname ::= PLACENAME */
2167 114, /* (90) objectname ::= objectname DOT_U PLACENAME */
2168 115, /* (91) nth ::= NTH CLASSNAME */
2169 115, /* (92) nth ::= NTH LAST CLASSNAME */
2170 115, /* (93) nth ::= LAST CLASSNAME */
2171 115, /* (94) nth ::= LAST */
2172 115, /* (95) nth ::= NTH LB RB */
2173 115, /* (96) nth ::= NTH LAST LB RB */
2174 115, /* (97) nth ::= LAST LB RB */
2175 104, /* (98) expr ::= expr PLUS expr */
2176 104, /* (99) expr ::= expr MINUS expr */
2177 104, /* (100) expr ::= expr STAR expr */
2178 104, /* (101) expr ::= expr SLASH expr */
2179 104, /* (102) expr ::= MINUS expr */
2180 104, /* (103) expr ::= PLUS expr */
2181 104, /* (104) expr ::= LP expr RP */
2182 104, /* (105) expr ::= LP FILL|COLOR|THICKNESS RP */
2183 104, /* (106) expr ::= NUMBER */
2184 104, /* (107) expr ::= ID */
2185 104, /* (108) expr ::= FUNC1 LP expr RP */
2186 104, /* (109) expr ::= FUNC2 LP expr COMMA expr RP */
2187 104, /* (110) expr ::= DIST LP position COMMA position RP */
2188 104, /* (111) expr ::= place2 DOT_XY X */
2189 104, /* (112) expr ::= place2 DOT_XY Y */
2190 104, /* (113) expr ::= object DOT_L numproperty */
2191 104, /* (114) expr ::= object DOT_L dashproperty */
2192 104, /* (115) expr ::= object DOT_L colorproperty */
2193 118, /* (116) lvalue ::= ID */
2194 118, /* (117) lvalue ::= FILL */
2195 118, /* (118) lvalue ::= COLOR */
2196 118, /* (119) lvalue ::= THICKNESS */
2197 117, /* (120) rvalue ::= expr */
2198 123, /* (121) print ::= PRINT */
2199 124, /* (122) prlist ::= pritem */
2200 124, /* (123) prlist ::= prlist prsep pritem */
2201 107, /* (124) direction ::= UP */
2202 107, /* (125) direction ::= DOWN */
2203 107, /* (126) direction ::= LEFT */
2204 107, /* (127) direction ::= RIGHT */
2205 121, /* (128) optrelexpr ::= relexpr */
2206 127, /* (129) attribute_list ::= alist */
2207 129, /* (130) alist ::= */
2208 129, /* (131) alist ::= alist attribute */
2209 130, /* (132) attribute ::= boolproperty */
2210 130, /* (133) attribute ::= WITH withclause */
2211 131, /* (134) go ::= GO */
2212 131, /* (135) go ::= */
2213 119, /* (136) even ::= UNTIL EVEN WITH */
2214 119, /* (137) even ::= EVEN WITH */
2215 108, /* (138) dashproperty ::= DOTTED */
2216 108, /* (139) dashproperty ::= DASHED */
2217 109, /* (140) colorproperty ::= FILL */
2218 109, /* (141) colorproperty ::= COLOR */
2219 111, /* (142) position ::= place */
2220 134, /* (143) between ::= WAY BETWEEN */
2221 134, /* (144) between ::= BETWEEN */
2222 134, /* (145) between ::= OF THE WAY BETWEEN */
2223 112, /* (146) place ::= place2 */
2224 106, /* (147) edge ::= CENTER */
2225 106, /* (148) edge ::= EDGEPT */
2226 106, /* (149) edge ::= TOP */
2227 106, /* (150) edge ::= BOTTOM */
2228 106, /* (151) edge ::= START */
2229 106, /* (152) edge ::= END */
2230 106, /* (153) edge ::= RIGHT */
2231 106, /* (154) edge ::= LEFT */
2232 113, /* (155) object ::= objectname */
2233 };
2234
2235 /* For rule J, yyRuleInfoNRhs[J] contains the negative of the number
2236 ** of symbols on the right-hand side of that rule. */
2237 static const signed char yyRuleInfoNRhs[] = {
@@ -2431,620 +2472,620 @@
2431 ** break;
2432 */
2433 /********** Begin reduce actions **********************************************/
2434 YYMINORTYPE yylhsminor;
2435 case 0: /* document ::= statement_list */
2436 #line 561 "pikchr.y"
2437 {pik_render(p,yymsp[0].minor.yy235);}
2438 #line 2463 "pikchr.c"
2439 break;
2440 case 1: /* statement_list ::= statement */
2441 #line 564 "pikchr.y"
2442 { yylhsminor.yy235 = pik_elist_append(p,0,yymsp[0].minor.yy162); }
2443 #line 2468 "pikchr.c"
2444 yymsp[0].minor.yy235 = yylhsminor.yy235;
2445 break;
2446 case 2: /* statement_list ::= statement_list EOL statement */
2447 #line 566 "pikchr.y"
2448 { yylhsminor.yy235 = pik_elist_append(p,yymsp[-2].minor.yy235,yymsp[0].minor.yy162); }
2449 #line 2474 "pikchr.c"
2450 yymsp[-2].minor.yy235 = yylhsminor.yy235;
2451 break;
2452 case 3: /* statement ::= */
2453 #line 569 "pikchr.y"
2454 { yymsp[1].minor.yy162 = 0; }
2455 #line 2480 "pikchr.c"
2456 break;
2457 case 4: /* statement ::= direction */
2458 #line 570 "pikchr.y"
2459 { pik_set_direction(p,yymsp[0].minor.yy0.eCode); yylhsminor.yy162=0; }
2460 #line 2485 "pikchr.c"
2461 yymsp[0].minor.yy162 = yylhsminor.yy162;
2462 break;
2463 case 5: /* statement ::= lvalue ASSIGN rvalue */
2464 #line 571 "pikchr.y"
2465 {pik_set_var(p,&yymsp[-2].minor.yy0,yymsp[0].minor.yy21,&yymsp[-1].minor.yy0); yylhsminor.yy162=0;}
2466 #line 2491 "pikchr.c"
2467 yymsp[-2].minor.yy162 = yylhsminor.yy162;
2468 break;
2469 case 6: /* statement ::= PLACENAME COLON unnamed_statement */
2470 #line 573 "pikchr.y"
2471 { yylhsminor.yy162 = yymsp[0].minor.yy162; pik_elem_setname(p,yymsp[0].minor.yy162,&yymsp[-2].minor.yy0); }
2472 #line 2497 "pikchr.c"
2473 yymsp[-2].minor.yy162 = yylhsminor.yy162;
2474 break;
2475 case 7: /* statement ::= PLACENAME COLON position */
2476 #line 575 "pikchr.y"
2477 { yylhsminor.yy162 = pik_elem_new(p,0,0,0);
2478 if(yylhsminor.yy162){ yylhsminor.yy162->ptAt = yymsp[0].minor.yy63; pik_elem_setname(p,yylhsminor.yy162,&yymsp[-2].minor.yy0); }}
2479 #line 2504 "pikchr.c"
2480 yymsp[-2].minor.yy162 = yylhsminor.yy162;
2481 break;
2482 case 8: /* statement ::= unnamed_statement */
2483 #line 577 "pikchr.y"
2484 {yylhsminor.yy162 = yymsp[0].minor.yy162;}
2485 #line 2510 "pikchr.c"
2486 yymsp[0].minor.yy162 = yylhsminor.yy162;
2487 break;
2488 case 9: /* statement ::= print prlist */
2489 #line 578 "pikchr.y"
2490 {pik_append(p,"<br>\n",5); yymsp[-1].minor.yy162=0;}
2491 #line 2516 "pikchr.c"
2492 break;
2493 case 10: /* statement ::= ASSERT LP expr EQ expr RP */
2494 #line 583 "pikchr.y"
2495 {yymsp[-5].minor.yy162=pik_assert(p,yymsp[-3].minor.yy21,&yymsp[-2].minor.yy0,yymsp[-1].minor.yy21);}
2496 #line 2521 "pikchr.c"
2497 break;
2498 case 11: /* statement ::= ASSERT LP position EQ position RP */
2499 #line 585 "pikchr.y"
2500 {yymsp[-5].minor.yy162=pik_position_assert(p,&yymsp[-3].minor.yy63,&yymsp[-2].minor.yy0,&yymsp[-1].minor.yy63);}
2501 #line 2526 "pikchr.c"
2502 break;
2503 case 12: /* statement ::= DEFINE ID CODEBLOCK */
2504 #line 586 "pikchr.y"
2505 {yymsp[-2].minor.yy162=0; pik_add_macro(p,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy0);}
2506 #line 2531 "pikchr.c"
2507 break;
2508 case 13: /* rvalue ::= PLACENAME */
2509 #line 597 "pikchr.y"
2510 {yylhsminor.yy21 = pik_lookup_color(p,&yymsp[0].minor.yy0);}
2511 #line 2536 "pikchr.c"
2512 yymsp[0].minor.yy21 = yylhsminor.yy21;
2513 break;
2514 case 14: /* pritem ::= FILL */
2515 case 15: /* pritem ::= COLOR */ yytestcase(yyruleno==15);
2516 case 16: /* pritem ::= THICKNESS */ yytestcase(yyruleno==16);
2517 #line 602 "pikchr.y"
2518 {pik_append_num(p,"",pik_value(p,yymsp[0].minor.yy0.z,yymsp[0].minor.yy0.n,0));}
2519 #line 2544 "pikchr.c"
2520 break;
2521 case 17: /* pritem ::= rvalue */
2522 #line 605 "pikchr.y"
2523 {pik_append_num(p,"",yymsp[0].minor.yy21);}
2524 #line 2549 "pikchr.c"
2525 break;
2526 case 18: /* pritem ::= STRING */
2527 #line 606 "pikchr.y"
2528 {pik_append_text(p,yymsp[0].minor.yy0.z+1,yymsp[0].minor.yy0.n-2,0);}
2529 #line 2554 "pikchr.c"
2530 break;
2531 case 19: /* prsep ::= COMMA */
2532 #line 607 "pikchr.y"
2533 {pik_append(p, " ", 1);}
2534 #line 2559 "pikchr.c"
2535 break;
2536 case 20: /* unnamed_statement ::= basetype attribute_list */
2537 #line 610 "pikchr.y"
2538 {yylhsminor.yy162 = yymsp[-1].minor.yy162; pik_after_adding_attributes(p,yylhsminor.yy162);}
2539 #line 2564 "pikchr.c"
2540 yymsp[-1].minor.yy162 = yylhsminor.yy162;
2541 break;
2542 case 21: /* basetype ::= CLASSNAME */
2543 #line 612 "pikchr.y"
2544 {yylhsminor.yy162 = pik_elem_new(p,&yymsp[0].minor.yy0,0,0); }
2545 #line 2570 "pikchr.c"
2546 yymsp[0].minor.yy162 = yylhsminor.yy162;
2547 break;
2548 case 22: /* basetype ::= STRING textposition */
2549 #line 614 "pikchr.y"
2550 {yymsp[-1].minor.yy0.eCode = yymsp[0].minor.yy188; yylhsminor.yy162 = pik_elem_new(p,0,&yymsp[-1].minor.yy0,0); }
2551 #line 2576 "pikchr.c"
2552 yymsp[-1].minor.yy162 = yylhsminor.yy162;
2553 break;
2554 case 23: /* basetype ::= LB savelist statement_list RB */
2555 #line 616 "pikchr.y"
2556 { p->list = yymsp[-2].minor.yy235; yymsp[-3].minor.yy162 = pik_elem_new(p,0,0,yymsp[-1].minor.yy235); if(yymsp[-3].minor.yy162) yymsp[-3].minor.yy162->errTok = yymsp[0].minor.yy0; }
2557 #line 2582 "pikchr.c"
2558 break;
2559 case 24: /* savelist ::= */
2560 #line 621 "pikchr.y"
2561 {yymsp[1].minor.yy235 = p->list; p->list = 0;}
2562 #line 2587 "pikchr.c"
2563 break;
2564 case 25: /* relexpr ::= expr */
2565 #line 628 "pikchr.y"
2566 {yylhsminor.yy72.rAbs = yymsp[0].minor.yy21; yylhsminor.yy72.rRel = 0;}
2567 #line 2592 "pikchr.c"
2568 yymsp[0].minor.yy72 = yylhsminor.yy72;
2569 break;
2570 case 26: /* relexpr ::= expr PERCENT */
2571 #line 629 "pikchr.y"
2572 {yylhsminor.yy72.rAbs = 0; yylhsminor.yy72.rRel = yymsp[-1].minor.yy21/100;}
2573 #line 2598 "pikchr.c"
2574 yymsp[-1].minor.yy72 = yylhsminor.yy72;
2575 break;
2576 case 27: /* optrelexpr ::= */
2577 #line 631 "pikchr.y"
2578 {yymsp[1].minor.yy72.rAbs = 0; yymsp[1].minor.yy72.rRel = 1.0;}
2579 #line 2604 "pikchr.c"
2580 break;
2581 case 28: /* attribute_list ::= relexpr alist */
2582 #line 633 "pikchr.y"
2583 {pik_add_direction(p,0,&yymsp[-1].minor.yy72);}
2584 #line 2609 "pikchr.c"
2585 break;
2586 case 29: /* attribute ::= numproperty relexpr */
2587 #line 637 "pikchr.y"
2588 { pik_set_numprop(p,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy72); }
2589 #line 2614 "pikchr.c"
2590 break;
2591 case 30: /* attribute ::= dashproperty expr */
2592 #line 638 "pikchr.y"
2593 { pik_set_dashed(p,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy21); }
2594 #line 2619 "pikchr.c"
2595 break;
2596 case 31: /* attribute ::= dashproperty */
2597 #line 639 "pikchr.y"
2598 { pik_set_dashed(p,&yymsp[0].minor.yy0,0); }
2599 #line 2624 "pikchr.c"
2600 break;
2601 case 32: /* attribute ::= colorproperty rvalue */
2602 #line 640 "pikchr.y"
2603 { pik_set_clrprop(p,&yymsp[-1].minor.yy0,yymsp[0].minor.yy21); }
2604 #line 2629 "pikchr.c"
2605 break;
2606 case 33: /* attribute ::= go direction optrelexpr */
2607 #line 641 "pikchr.y"
2608 { pik_add_direction(p,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy72);}
2609 #line 2634 "pikchr.c"
2610 break;
2611 case 34: /* attribute ::= go direction even position */
2612 #line 642 "pikchr.y"
2613 {pik_evenwith(p,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy63);}
2614 #line 2639 "pikchr.c"
2615 break;
2616 case 35: /* attribute ::= CLOSE */
2617 #line 643 "pikchr.y"
2618 { pik_close_path(p,&yymsp[0].minor.yy0); }
2619 #line 2644 "pikchr.c"
2620 break;
2621 case 36: /* attribute ::= CHOP */
2622 #line 644 "pikchr.y"
2623 { p->cur->bChop = 1; }
2624 #line 2649 "pikchr.c"
2625 break;
2626 case 37: /* attribute ::= FROM position */
2627 #line 645 "pikchr.y"
2628 { pik_set_from(p,p->cur,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy63); }
2629 #line 2654 "pikchr.c"
2630 break;
2631 case 38: /* attribute ::= TO position */
2632 #line 646 "pikchr.y"
2633 { pik_add_to(p,p->cur,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy63); }
2634 #line 2659 "pikchr.c"
2635 break;
2636 case 39: /* attribute ::= THEN */
2637 #line 647 "pikchr.y"
2638 { pik_then(p, &yymsp[0].minor.yy0, p->cur); }
2639 #line 2664 "pikchr.c"
2640 break;
2641 case 40: /* attribute ::= THEN optrelexpr HEADING expr */
2642 case 42: /* attribute ::= GO optrelexpr HEADING expr */ yytestcase(yyruleno==42);
2643 #line 649 "pikchr.y"
2644 {pik_move_hdg(p,&yymsp[-2].minor.yy72,&yymsp[-1].minor.yy0,yymsp[0].minor.yy21,0,&yymsp[-3].minor.yy0);}
2645 #line 2670 "pikchr.c"
2646 break;
2647 case 41: /* attribute ::= THEN optrelexpr EDGEPT */
2648 case 43: /* attribute ::= GO optrelexpr EDGEPT */ yytestcase(yyruleno==43);
2649 #line 650 "pikchr.y"
2650 {pik_move_hdg(p,&yymsp[-1].minor.yy72,0,0,&yymsp[0].minor.yy0,&yymsp[-2].minor.yy0);}
2651 #line 2676 "pikchr.c"
2652 break;
2653 case 44: /* attribute ::= AT position */
2654 #line 655 "pikchr.y"
2655 { pik_set_at(p,0,&yymsp[0].minor.yy63,&yymsp[-1].minor.yy0); }
2656 #line 2681 "pikchr.c"
2657 break;
2658 case 45: /* attribute ::= SAME */
2659 #line 657 "pikchr.y"
2660 {pik_same(p,0,&yymsp[0].minor.yy0);}
2661 #line 2686 "pikchr.c"
2662 break;
2663 case 46: /* attribute ::= SAME AS object */
2664 #line 658 "pikchr.y"
2665 {pik_same(p,yymsp[0].minor.yy162,&yymsp[-2].minor.yy0);}
2666 #line 2691 "pikchr.c"
2667 break;
2668 case 47: /* attribute ::= STRING textposition */
2669 #line 659 "pikchr.y"
2670 {pik_add_txt(p,&yymsp[-1].minor.yy0,yymsp[0].minor.yy188);}
2671 #line 2696 "pikchr.c"
2672 break;
2673 case 48: /* attribute ::= FIT */
2674 #line 660 "pikchr.y"
2675 {pik_size_to_fit(p,0,&yymsp[0].minor.yy0,3); }
2676 #line 2701 "pikchr.c"
2677 break;
2678 case 49: /* attribute ::= BEHIND object */
2679 #line 661 "pikchr.y"
2680 {pik_behind(p,yymsp[0].minor.yy162);}
2681 #line 2706 "pikchr.c"
2682 break;
2683 case 50: /* withclause ::= DOT_E edge AT position */
2684 case 51: /* withclause ::= edge AT position */ yytestcase(yyruleno==51);
2685 #line 669 "pikchr.y"
2686 { pik_set_at(p,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy63,&yymsp[-1].minor.yy0); }
2687 #line 2712 "pikchr.c"
2688 break;
2689 case 52: /* numproperty ::= HEIGHT|WIDTH|RADIUS|DIAMETER|THICKNESS */
2690 #line 673 "pikchr.y"
2691 {yylhsminor.yy0 = yymsp[0].minor.yy0;}
2692 #line 2717 "pikchr.c"
2693 yymsp[0].minor.yy0 = yylhsminor.yy0;
2694 break;
2695 case 53: /* boolproperty ::= CW */
2696 #line 684 "pikchr.y"
2697 {p->cur->cw = 1;}
2698 #line 2723 "pikchr.c"
2699 break;
2700 case 54: /* boolproperty ::= CCW */
2701 #line 685 "pikchr.y"
2702 {p->cur->cw = 0;}
2703 #line 2728 "pikchr.c"
2704 break;
2705 case 55: /* boolproperty ::= LARROW */
2706 #line 686 "pikchr.y"
2707 {p->cur->larrow=1; p->cur->rarrow=0; }
2708 #line 2733 "pikchr.c"
2709 break;
2710 case 56: /* boolproperty ::= RARROW */
2711 #line 687 "pikchr.y"
2712 {p->cur->larrow=0; p->cur->rarrow=1; }
2713 #line 2738 "pikchr.c"
2714 break;
2715 case 57: /* boolproperty ::= LRARROW */
2716 #line 688 "pikchr.y"
2717 {p->cur->larrow=1; p->cur->rarrow=1; }
2718 #line 2743 "pikchr.c"
2719 break;
2720 case 58: /* boolproperty ::= INVIS */
2721 #line 689 "pikchr.y"
2722 {p->cur->sw = -0.00001;}
2723 #line 2748 "pikchr.c"
2724 break;
2725 case 59: /* boolproperty ::= THICK */
2726 #line 690 "pikchr.y"
2727 {p->cur->sw *= 1.5;}
2728 #line 2753 "pikchr.c"
2729 break;
2730 case 60: /* boolproperty ::= THIN */
2731 #line 691 "pikchr.y"
2732 {p->cur->sw *= 0.67;}
2733 #line 2758 "pikchr.c"
2734 break;
2735 case 61: /* boolproperty ::= SOLID */
2736 #line 692 "pikchr.y"
2737 {p->cur->sw = pik_value(p,"thickness",9,0);
2738 p->cur->dotted = p->cur->dashed = 0.0;}
2739 #line 2764 "pikchr.c"
2740 break;
2741 case 62: /* textposition ::= */
2742 #line 695 "pikchr.y"
2743 {yymsp[1].minor.yy188 = 0;}
2744 #line 2769 "pikchr.c"
2745 break;
2746 case 63: /* textposition ::= textposition CENTER|LJUST|RJUST|ABOVE|BELOW|ITALIC|BOLD|MONO|ALIGNED|BIG|SMALL */
2747 #line 698 "pikchr.y"
2748 {yylhsminor.yy188 = (short int)pik_text_position(yymsp[-1].minor.yy188,&yymsp[0].minor.yy0);}
2749 #line 2774 "pikchr.c"
2750 yymsp[-1].minor.yy188 = yylhsminor.yy188;
2751 break;
2752 case 64: /* position ::= expr COMMA expr */
2753 #line 701 "pikchr.y"
2754 {yylhsminor.yy63.x=yymsp[-2].minor.yy21; yylhsminor.yy63.y=yymsp[0].minor.yy21;}
2755 #line 2780 "pikchr.c"
2756 yymsp[-2].minor.yy63 = yylhsminor.yy63;
2757 break;
2758 case 65: /* position ::= place PLUS expr COMMA expr */
2759 #line 703 "pikchr.y"
2760 {yylhsminor.yy63.x=yymsp[-4].minor.yy63.x+yymsp[-2].minor.yy21; yylhsminor.yy63.y=yymsp[-4].minor.yy63.y+yymsp[0].minor.yy21;}
2761 #line 2786 "pikchr.c"
2762 yymsp[-4].minor.yy63 = yylhsminor.yy63;
2763 break;
2764 case 66: /* position ::= place MINUS expr COMMA expr */
2765 #line 704 "pikchr.y"
2766 {yylhsminor.yy63.x=yymsp[-4].minor.yy63.x-yymsp[-2].minor.yy21; yylhsminor.yy63.y=yymsp[-4].minor.yy63.y-yymsp[0].minor.yy21;}
2767 #line 2792 "pikchr.c"
2768 yymsp[-4].minor.yy63 = yylhsminor.yy63;
2769 break;
2770 case 67: /* position ::= place PLUS LP expr COMMA expr RP */
2771 #line 706 "pikchr.y"
2772 {yylhsminor.yy63.x=yymsp[-6].minor.yy63.x+yymsp[-3].minor.yy21; yylhsminor.yy63.y=yymsp[-6].minor.yy63.y+yymsp[-1].minor.yy21;}
2773 #line 2798 "pikchr.c"
2774 yymsp[-6].minor.yy63 = yylhsminor.yy63;
2775 break;
2776 case 68: /* position ::= place MINUS LP expr COMMA expr RP */
2777 #line 708 "pikchr.y"
2778 {yylhsminor.yy63.x=yymsp[-6].minor.yy63.x-yymsp[-3].minor.yy21; yylhsminor.yy63.y=yymsp[-6].minor.yy63.y-yymsp[-1].minor.yy21;}
2779 #line 2804 "pikchr.c"
2780 yymsp[-6].minor.yy63 = yylhsminor.yy63;
2781 break;
2782 case 69: /* position ::= LP position COMMA position RP */
2783 #line 709 "pikchr.y"
2784 {yymsp[-4].minor.yy63.x=yymsp[-3].minor.yy63.x; yymsp[-4].minor.yy63.y=yymsp[-1].minor.yy63.y;}
2785 #line 2810 "pikchr.c"
2786 break;
2787 case 70: /* position ::= LP position RP */
2788 #line 710 "pikchr.y"
2789 {yymsp[-2].minor.yy63=yymsp[-1].minor.yy63;}
2790 #line 2815 "pikchr.c"
2791 break;
2792 case 71: /* position ::= expr between position AND position */
2793 #line 712 "pikchr.y"
2794 {yylhsminor.yy63 = pik_position_between(yymsp[-4].minor.yy21,yymsp[-2].minor.yy63,yymsp[0].minor.yy63);}
2795 #line 2820 "pikchr.c"
2796 yymsp[-4].minor.yy63 = yylhsminor.yy63;
2797 break;
2798 case 72: /* position ::= expr LT position COMMA position GT */
2799 #line 714 "pikchr.y"
2800 {yylhsminor.yy63 = pik_position_between(yymsp[-5].minor.yy21,yymsp[-3].minor.yy63,yymsp[-1].minor.yy63);}
2801 #line 2826 "pikchr.c"
2802 yymsp[-5].minor.yy63 = yylhsminor.yy63;
2803 break;
2804 case 73: /* position ::= expr ABOVE position */
2805 #line 715 "pikchr.y"
2806 {yylhsminor.yy63=yymsp[0].minor.yy63; yylhsminor.yy63.y += yymsp[-2].minor.yy21;}
2807 #line 2832 "pikchr.c"
2808 yymsp[-2].minor.yy63 = yylhsminor.yy63;
2809 break;
2810 case 74: /* position ::= expr BELOW position */
2811 #line 716 "pikchr.y"
2812 {yylhsminor.yy63=yymsp[0].minor.yy63; yylhsminor.yy63.y -= yymsp[-2].minor.yy21;}
2813 #line 2838 "pikchr.c"
2814 yymsp[-2].minor.yy63 = yylhsminor.yy63;
2815 break;
2816 case 75: /* position ::= expr LEFT OF position */
2817 #line 717 "pikchr.y"
2818 {yylhsminor.yy63=yymsp[0].minor.yy63; yylhsminor.yy63.x -= yymsp[-3].minor.yy21;}
2819 #line 2844 "pikchr.c"
2820 yymsp[-3].minor.yy63 = yylhsminor.yy63;
2821 break;
2822 case 76: /* position ::= expr RIGHT OF position */
2823 #line 718 "pikchr.y"
2824 {yylhsminor.yy63=yymsp[0].minor.yy63; yylhsminor.yy63.x += yymsp[-3].minor.yy21;}
2825 #line 2850 "pikchr.c"
2826 yymsp[-3].minor.yy63 = yylhsminor.yy63;
2827 break;
2828 case 77: /* position ::= expr ON HEADING EDGEPT OF position */
2829 #line 720 "pikchr.y"
2830 {yylhsminor.yy63 = pik_position_at_hdg(yymsp[-5].minor.yy21,&yymsp[-2].minor.yy0,yymsp[0].minor.yy63);}
2831 #line 2856 "pikchr.c"
2832 yymsp[-5].minor.yy63 = yylhsminor.yy63;
2833 break;
2834 case 78: /* position ::= expr HEADING EDGEPT OF position */
2835 #line 722 "pikchr.y"
2836 {yylhsminor.yy63 = pik_position_at_hdg(yymsp[-4].minor.yy21,&yymsp[-2].minor.yy0,yymsp[0].minor.yy63);}
2837 #line 2862 "pikchr.c"
2838 yymsp[-4].minor.yy63 = yylhsminor.yy63;
2839 break;
2840 case 79: /* position ::= expr EDGEPT OF position */
2841 #line 724 "pikchr.y"
2842 {yylhsminor.yy63 = pik_position_at_hdg(yymsp[-3].minor.yy21,&yymsp[-2].minor.yy0,yymsp[0].minor.yy63);}
2843 #line 2868 "pikchr.c"
2844 yymsp[-3].minor.yy63 = yylhsminor.yy63;
2845 break;
2846 case 80: /* position ::= expr ON HEADING expr FROM position */
2847 #line 726 "pikchr.y"
2848 {yylhsminor.yy63 = pik_position_at_angle(yymsp[-5].minor.yy21,yymsp[-2].minor.yy21,yymsp[0].minor.yy63);}
2849 #line 2874 "pikchr.c"
2850 yymsp[-5].minor.yy63 = yylhsminor.yy63;
2851 break;
2852 case 81: /* position ::= expr HEADING expr FROM position */
2853 #line 728 "pikchr.y"
2854 {yylhsminor.yy63 = pik_position_at_angle(yymsp[-4].minor.yy21,yymsp[-2].minor.yy21,yymsp[0].minor.yy63);}
2855 #line 2880 "pikchr.c"
2856 yymsp[-4].minor.yy63 = yylhsminor.yy63;
2857 break;
2858 case 82: /* place ::= edge OF object */
2859 #line 740 "pikchr.y"
2860 {yylhsminor.yy63 = pik_place_of_elem(p,yymsp[0].minor.yy162,&yymsp[-2].minor.yy0);}
2861 #line 2886 "pikchr.c"
2862 yymsp[-2].minor.yy63 = yylhsminor.yy63;
2863 break;
2864 case 83: /* place2 ::= object */
2865 #line 741 "pikchr.y"
2866 {yylhsminor.yy63 = pik_place_of_elem(p,yymsp[0].minor.yy162,0);}
2867 #line 2892 "pikchr.c"
2868 yymsp[0].minor.yy63 = yylhsminor.yy63;
2869 break;
2870 case 84: /* place2 ::= object DOT_E edge */
2871 #line 742 "pikchr.y"
2872 {yylhsminor.yy63 = pik_place_of_elem(p,yymsp[-2].minor.yy162,&yymsp[0].minor.yy0);}
2873 #line 2898 "pikchr.c"
2874 yymsp[-2].minor.yy63 = yylhsminor.yy63;
2875 break;
2876 case 85: /* place2 ::= NTH VERTEX OF object */
2877 #line 743 "pikchr.y"
2878 {yylhsminor.yy63 = pik_nth_vertex(p,&yymsp[-3].minor.yy0,&yymsp[-2].minor.yy0,yymsp[0].minor.yy162);}
2879 #line 2904 "pikchr.c"
2880 yymsp[-3].minor.yy63 = yylhsminor.yy63;
2881 break;
2882 case 86: /* object ::= nth */
2883 #line 755 "pikchr.y"
2884 {yylhsminor.yy162 = pik_find_nth(p,0,&yymsp[0].minor.yy0);}
2885 #line 2910 "pikchr.c"
2886 yymsp[0].minor.yy162 = yylhsminor.yy162;
2887 break;
2888 case 87: /* object ::= nth OF|IN object */
2889 #line 756 "pikchr.y"
2890 {yylhsminor.yy162 = pik_find_nth(p,yymsp[0].minor.yy162,&yymsp[-2].minor.yy0);}
2891 #line 2916 "pikchr.c"
2892 yymsp[-2].minor.yy162 = yylhsminor.yy162;
2893 break;
2894 case 88: /* objectname ::= THIS */
2895 #line 758 "pikchr.y"
2896 {yymsp[0].minor.yy162 = p->cur;}
2897 #line 2922 "pikchr.c"
2898 break;
2899 case 89: /* objectname ::= PLACENAME */
2900 #line 759 "pikchr.y"
2901 {yylhsminor.yy162 = pik_find_byname(p,0,&yymsp[0].minor.yy0);}
2902 #line 2927 "pikchr.c"
2903 yymsp[0].minor.yy162 = yylhsminor.yy162;
2904 break;
2905 case 90: /* objectname ::= objectname DOT_U PLACENAME */
2906 #line 761 "pikchr.y"
2907 {yylhsminor.yy162 = pik_find_byname(p,yymsp[-2].minor.yy162,&yymsp[0].minor.yy0);}
2908 #line 2933 "pikchr.c"
2909 yymsp[-2].minor.yy162 = yylhsminor.yy162;
2910 break;
2911 case 91: /* nth ::= NTH CLASSNAME */
2912 #line 763 "pikchr.y"
2913 {yylhsminor.yy0=yymsp[0].minor.yy0; yylhsminor.yy0.eCode = pik_nth_value(p,&yymsp[-1].minor.yy0); }
2914 #line 2939 "pikchr.c"
2915 yymsp[-1].minor.yy0 = yylhsminor.yy0;
2916 break;
2917 case 92: /* nth ::= NTH LAST CLASSNAME */
2918 #line 764 "pikchr.y"
2919 {yylhsminor.yy0=yymsp[0].minor.yy0; yylhsminor.yy0.eCode = -pik_nth_value(p,&yymsp[-2].minor.yy0); }
2920 #line 2945 "pikchr.c"
2921 yymsp[-2].minor.yy0 = yylhsminor.yy0;
2922 break;
2923 case 93: /* nth ::= LAST CLASSNAME */
2924 #line 765 "pikchr.y"
2925 {yymsp[-1].minor.yy0=yymsp[0].minor.yy0; yymsp[-1].minor.yy0.eCode = -1;}
2926 #line 2951 "pikchr.c"
2927 break;
2928 case 94: /* nth ::= LAST */
2929 #line 766 "pikchr.y"
2930 {yylhsminor.yy0=yymsp[0].minor.yy0; yylhsminor.yy0.eCode = -1;}
2931 #line 2956 "pikchr.c"
2932 yymsp[0].minor.yy0 = yylhsminor.yy0;
2933 break;
2934 case 95: /* nth ::= NTH LB RB */
2935 #line 767 "pikchr.y"
2936 {yylhsminor.yy0=yymsp[-1].minor.yy0; yylhsminor.yy0.eCode = pik_nth_value(p,&yymsp[-2].minor.yy0);}
2937 #line 2962 "pikchr.c"
2938 yymsp[-2].minor.yy0 = yylhsminor.yy0;
2939 break;
2940 case 96: /* nth ::= NTH LAST LB RB */
2941 #line 768 "pikchr.y"
2942 {yylhsminor.yy0=yymsp[-1].minor.yy0; yylhsminor.yy0.eCode = -pik_nth_value(p,&yymsp[-3].minor.yy0);}
2943 #line 2968 "pikchr.c"
2944 yymsp[-3].minor.yy0 = yylhsminor.yy0;
2945 break;
2946 case 97: /* nth ::= LAST LB RB */
2947 #line 769 "pikchr.y"
2948 {yymsp[-2].minor.yy0=yymsp[-1].minor.yy0; yymsp[-2].minor.yy0.eCode = -1; }
2949 #line 2974 "pikchr.c"
2950 break;
2951 case 98: /* expr ::= expr PLUS expr */
2952 #line 771 "pikchr.y"
2953 {yylhsminor.yy21=yymsp[-2].minor.yy21+yymsp[0].minor.yy21;}
2954 #line 2979 "pikchr.c"
2955 yymsp[-2].minor.yy21 = yylhsminor.yy21;
2956 break;
2957 case 99: /* expr ::= expr MINUS expr */
2958 #line 772 "pikchr.y"
2959 {yylhsminor.yy21=yymsp[-2].minor.yy21-yymsp[0].minor.yy21;}
2960 #line 2985 "pikchr.c"
2961 yymsp[-2].minor.yy21 = yylhsminor.yy21;
2962 break;
2963 case 100: /* expr ::= expr STAR expr */
2964 #line 773 "pikchr.y"
2965 {yylhsminor.yy21=yymsp[-2].minor.yy21*yymsp[0].minor.yy21;}
2966 #line 2991 "pikchr.c"
2967 yymsp[-2].minor.yy21 = yylhsminor.yy21;
2968 break;
2969 case 101: /* expr ::= expr SLASH expr */
2970 #line 774 "pikchr.y"
2971 {
2972 if( yymsp[0].minor.yy21==0.0 ){ pik_error(p, &yymsp[-1].minor.yy0, "division by zero"); yylhsminor.yy21 = 0.0; }
2973 else{ yylhsminor.yy21 = yymsp[-2].minor.yy21/yymsp[0].minor.yy21; }
2974 }
2975 #line 3000 "pikchr.c"
2976 yymsp[-2].minor.yy21 = yylhsminor.yy21;
2977 break;
2978 case 102: /* expr ::= MINUS expr */
2979 #line 778 "pikchr.y"
2980 {yymsp[-1].minor.yy21=-yymsp[0].minor.yy21;}
2981 #line 3006 "pikchr.c"
2982 break;
2983 case 103: /* expr ::= PLUS expr */
2984 #line 779 "pikchr.y"
2985 {yymsp[-1].minor.yy21=yymsp[0].minor.yy21;}
2986 #line 3011 "pikchr.c"
2987 break;
2988 case 104: /* expr ::= LP expr RP */
2989 #line 780 "pikchr.y"
2990 {yymsp[-2].minor.yy21=yymsp[-1].minor.yy21;}
2991 #line 3016 "pikchr.c"
2992 break;
2993 case 105: /* expr ::= LP FILL|COLOR|THICKNESS RP */
2994 #line 781 "pikchr.y"
2995 {yymsp[-2].minor.yy21=pik_get_var(p,&yymsp[-1].minor.yy0);}
2996 #line 3021 "pikchr.c"
2997 break;
2998 case 106: /* expr ::= NUMBER */
2999 #line 782 "pikchr.y"
3000 {yylhsminor.yy21=pik_atof(&yymsp[0].minor.yy0);}
3001 #line 3026 "pikchr.c"
3002 yymsp[0].minor.yy21 = yylhsminor.yy21;
3003 break;
3004 case 107: /* expr ::= ID */
3005 #line 783 "pikchr.y"
3006 {yylhsminor.yy21=pik_get_var(p,&yymsp[0].minor.yy0);}
3007 #line 3032 "pikchr.c"
3008 yymsp[0].minor.yy21 = yylhsminor.yy21;
3009 break;
3010 case 108: /* expr ::= FUNC1 LP expr RP */
3011 #line 784 "pikchr.y"
3012 {yylhsminor.yy21 = pik_func(p,&yymsp[-3].minor.yy0,yymsp[-1].minor.yy21,0.0);}
3013 #line 3038 "pikchr.c"
3014 yymsp[-3].minor.yy21 = yylhsminor.yy21;
3015 break;
3016 case 109: /* expr ::= FUNC2 LP expr COMMA expr RP */
3017 #line 785 "pikchr.y"
3018 {yylhsminor.yy21 = pik_func(p,&yymsp[-5].minor.yy0,yymsp[-3].minor.yy21,yymsp[-1].minor.yy21);}
3019 #line 3044 "pikchr.c"
3020 yymsp[-5].minor.yy21 = yylhsminor.yy21;
3021 break;
3022 case 110: /* expr ::= DIST LP position COMMA position RP */
3023 #line 786 "pikchr.y"
3024 {yymsp[-5].minor.yy21 = pik_dist(&yymsp[-3].minor.yy63,&yymsp[-1].minor.yy63);}
3025 #line 3050 "pikchr.c"
3026 break;
3027 case 111: /* expr ::= place2 DOT_XY X */
3028 #line 787 "pikchr.y"
3029 {yylhsminor.yy21 = yymsp[-2].minor.yy63.x;}
3030 #line 3055 "pikchr.c"
3031 yymsp[-2].minor.yy21 = yylhsminor.yy21;
3032 break;
3033 case 112: /* expr ::= place2 DOT_XY Y */
3034 #line 788 "pikchr.y"
3035 {yylhsminor.yy21 = yymsp[-2].minor.yy63.y;}
3036 #line 3061 "pikchr.c"
3037 yymsp[-2].minor.yy21 = yylhsminor.yy21;
3038 break;
3039 case 113: /* expr ::= object DOT_L numproperty */
3040 case 114: /* expr ::= object DOT_L dashproperty */ yytestcase(yyruleno==114);
3041 case 115: /* expr ::= object DOT_L colorproperty */ yytestcase(yyruleno==115);
3042 #line 789 "pikchr.y"
3043 {yylhsminor.yy21=pik_property_of(yymsp[-2].minor.yy162,&yymsp[0].minor.yy0);}
3044 #line 3069 "pikchr.c"
3045 yymsp[-2].minor.yy21 = yylhsminor.yy21;
3046 break;
3047 default:
3048 /* (116) lvalue ::= ID */ yytestcase(yyruleno==116);
3049 /* (117) lvalue ::= FILL */ yytestcase(yyruleno==117);
3050 /* (118) lvalue ::= COLOR */ yytestcase(yyruleno==118);
@@ -3142,19 +3183,19 @@
3142 ){
3143 pik_parserARG_FETCH
3144 pik_parserCTX_FETCH
3145 #define TOKEN yyminor
3146 /************ Begin %syntax_error code ****************************************/
3147 #line 549 "pikchr.y"
3148
3149 if( TOKEN.z && TOKEN.z[0] ){
3150 pik_error(p, &TOKEN, "syntax error");
3151 }else{
3152 pik_error(p, 0, "syntax error");
3153 }
3154 UNUSED_PARAMETER(yymajor);
3155 #line 3180 "pikchr.c"
3156 /************ End %syntax_error code ******************************************/
3157 pik_parserARG_STORE /* Suppress warning about unused %extra_argument variable */
3158 pik_parserCTX_STORE
3159 }
3160
@@ -3419,11 +3460,11 @@
3419 #else
3420 (void)iToken;
3421 return 0;
3422 #endif
3423 }
3424 #line 794 "pikchr.y"
3425
3426
3427
3428 /* Chart of the 148 official CSS color names with their
3429 ** corresponding RGB values thru Color Module Level 4:
@@ -7246,11 +7287,12 @@
7246 pik_append_num(p, " width=\"", p->wSVG);
7247 pik_append_num(p, "\" height=\"", p->hSVG);
7248 pik_append(p, "\"", 1);
7249 }
7250 pik_append_dis(p, " viewBox=\"0 0 ",w,"");
7251 pik_append_dis(p, " ",h,"\">\n");
 
7252 pik_elist_render(p, pList);
7253 pik_append(p,"</svg>\n", -1);
7254 }else{
7255 p->wSVG = -1;
7256 p->hSVG = -1;
@@ -7330,10 +7372,11 @@
7330 { "n", 1, T_EDGEPT, 0, CP_N },
7331 { "ne", 2, T_EDGEPT, 0, CP_NE },
7332 { "north", 5, T_EDGEPT, 0, CP_N },
7333 { "nw", 2, T_EDGEPT, 0, CP_NW },
7334 { "of", 2, T_OF, 0, 0 },
 
7335 { "previous", 8, T_LAST, 0, 0, },
7336 { "print", 5, T_PRINT, 0, 0 },
7337 { "rad", 3, T_RADIUS, 0, 0 },
7338 { "radius", 6, T_RADIUS, 0, 0 },
7339 { "right", 5, T_RIGHT, DIR_RIGHT, CP_E },
@@ -7913,15 +7956,30 @@
7913 #endif
7914 token.n = (unsigned short)(sz & 0xffff);
7915 if( p->nToken++ > PIKCHR_TOKEN_LIMIT ){
7916 pik_error(p, &token, "script is too complex");
7917 break;
 
 
 
 
 
7918 }
7919 pik_parser(pParser, token.eType, token);
7920 }
7921 }
7922 }
 
 
 
 
 
 
 
 
 
 
7923
7924 /*
7925 ** Parse the PIKCHR script contained in zText[]. Return a rendering. Or
7926 ** if an error is encountered, return the error text. The error message
7927 ** is HTML formatted. So regardless of what happens, the return text
@@ -8141,10 +8199,14 @@
8141 exit(1);
8142 }
8143 bSvgOnly = 1;
8144 mFlags |= PIKCHR_PLAINTEXT_ERRORS;
8145 }else
 
 
 
 
8146 {
8147 fprintf(stderr,"unknown option: \"%s\"\n", argv[i]);
8148 usage(argv[0]);
8149 }
8150 continue;
@@ -8253,6 +8315,6 @@
8253
8254
8255 #endif /* PIKCHR_TCL */
8256
8257
8258 #line 8283 "pikchr.c"
8259
--- extsrc/pikchr.c
+++ extsrc/pikchr.c
@@ -1,8 +1,47 @@
1 /* This file is automatically generated by Lemon from input grammar
2 ** source file "pikchr.y".
3 */
4 /*
5 ** 2000-05-29
6 **
7 ** The author disclaims copyright to this source code. In place of
8 ** a legal notice, here is a blessing:
9 **
10 ** May you do good and not evil.
11 ** May you find forgiveness for yourself and forgive others.
12 ** May you share freely, never taking more than you give.
13 **
14 *************************************************************************
15 ** Driver template for the LEMON parser generator.
16 **
17 ** The "lemon" program processes an LALR(1) input grammar file, then uses
18 ** this template to construct a parser. The "lemon" program inserts text
19 ** at each "%%" line. Also, any "P-a-r-s-e" identifier prefix (without the
20 ** interstitial "-" characters) contained in this template is changed into
21 ** the value of the %name directive from the grammar. Otherwise, the content
22 ** of this template is copied straight through into the generate parser
23 ** source file.
24 **
25 ** The following is the concatenation of all %include directives from the
26 ** input grammar file:
27 */
28 /************ Begin %include sections from the grammar ************************/
29 #line 1 "VERSION.h"
30 #define MANIFEST_UUID "052f07296e76ab2312caf2a4bf6237e574b3e533c7a36ee8f34db833baa3efb4"
31 #define MANIFEST_VERSION "[052f07296e]"
32 #define MANIFEST_DATE "2025-03-05 10:54:16"
33 #define MANIFEST_YEAR "2025"
34 #define MANIFEST_ISODATE "20250305105416"
35 #define MANIFEST_NUMERIC_DATE 20250305
36 #define MANIFEST_NUMERIC_TIME 105416
37 #define RELEASE_VERSION "1.0"
38 #define RELEASE_VERSION_NUMBER 10000
39 #define RELEASE_RESOURCE_VERSION 1,0,0,0
40 #define COMPILER "gcc-13.3.0"
41 #line 2 "pikchr.y"
42
43 /*
44 ** Zero-Clause BSD license:
45 **
46 ** Copyright (C) 2020-09-01 by D. Richard Hipp <[email protected]>
47 **
@@ -504,11 +543,11 @@
543 static PObj *pik_position_assert(Pik*,PPoint*,PToken*,PPoint*);
544 static PNum pik_dist(PPoint*,PPoint*);
545 static void pik_add_macro(Pik*,PToken *pId,PToken *pCode);
546
547
548 #line 549 "pikchr.c"
549 /**************** End of %include directives **********************************/
550 /* These constants specify the various numeric values for terminal symbols.
551 ***************** Begin token definitions *************************************/
552 #ifndef T_ID
553 #define T_ID 1
@@ -534,84 +573,85 @@
573 #define T_COLOR 21
574 #define T_THICKNESS 22
575 #define T_PRINT 23
576 #define T_STRING 24
577 #define T_COMMA 25
578 #define T_ISODATE 26
579 #define T_CLASSNAME 27
580 #define T_LB 28
581 #define T_RB 29
582 #define T_UP 30
583 #define T_DOWN 31
584 #define T_LEFT 32
585 #define T_RIGHT 33
586 #define T_CLOSE 34
587 #define T_CHOP 35
588 #define T_FROM 36
589 #define T_TO 37
590 #define T_THEN 38
591 #define T_HEADING 39
592 #define T_GO 40
593 #define T_AT 41
594 #define T_WITH 42
595 #define T_SAME 43
596 #define T_AS 44
597 #define T_FIT 45
598 #define T_BEHIND 46
599 #define T_UNTIL 47
600 #define T_EVEN 48
601 #define T_DOT_E 49
602 #define T_HEIGHT 50
603 #define T_WIDTH 51
604 #define T_RADIUS 52
605 #define T_DIAMETER 53
606 #define T_DOTTED 54
607 #define T_DASHED 55
608 #define T_CW 56
609 #define T_CCW 57
610 #define T_LARROW 58
611 #define T_RARROW 59
612 #define T_LRARROW 60
613 #define T_INVIS 61
614 #define T_THICK 62
615 #define T_THIN 63
616 #define T_SOLID 64
617 #define T_CENTER 65
618 #define T_LJUST 66
619 #define T_RJUST 67
620 #define T_ABOVE 68
621 #define T_BELOW 69
622 #define T_ITALIC 70
623 #define T_BOLD 71
624 #define T_MONO 72
625 #define T_ALIGNED 73
626 #define T_BIG 74
627 #define T_SMALL 75
628 #define T_AND 76
629 #define T_LT 77
630 #define T_GT 78
631 #define T_ON 79
632 #define T_WAY 80
633 #define T_BETWEEN 81
634 #define T_THE 82
635 #define T_NTH 83
636 #define T_VERTEX 84
637 #define T_TOP 85
638 #define T_BOTTOM 86
639 #define T_START 87
640 #define T_END 88
641 #define T_IN 89
642 #define T_THIS 90
643 #define T_DOT_U 91
644 #define T_LAST 92
645 #define T_NUMBER 93
646 #define T_FUNC1 94
647 #define T_FUNC2 95
648 #define T_DIST 96
649 #define T_DOT_XY 97
650 #define T_X 98
651 #define T_Y 99
652 #define T_DOT_L 100
653 #endif
654 /**************** End token definitions ***************************************/
655
656 /* The next sections is a series of control #defines.
657 ** various aspects of the generated parser.
@@ -672,22 +712,22 @@
712 #ifndef INTERFACE
713 # define INTERFACE 1
714 #endif
715 /************* Begin control #defines *****************************************/
716 #define YYCODETYPE unsigned char
717 #define YYNOCODE 138
718 #define YYACTIONTYPE unsigned short int
719 #define pik_parserTOKENTYPE PToken
720 typedef union {
721 int yyinit;
722 pik_parserTOKENTYPE yy0;
723 PList* yy23;
724 PRel yy28;
725 PObj* yy54;
726 PNum yy129;
727 PPoint yy187;
728 short int yy272;
729 } YYMINORTYPE;
730 #ifndef YYSTACKDEPTH
731 #define YYSTACKDEPTH 100
732 #endif
733 #define pik_parserARG_SDECL
@@ -705,21 +745,21 @@
745 #define pik_parserCTX_STORE yypParser->p=p;
746 #define YYFALLBACK 1
747 #define YYNSTATE 164
748 #define YYNRULE 156
749 #define YYNRULE_WITH_ACTION 116
750 #define YYNTOKEN 101
751 #define YY_MAX_SHIFT 163
752 #define YY_MIN_SHIFTREDUCE 287
753 #define YY_MAX_SHIFTREDUCE 442
754 #define YY_ERROR_ACTION 443
755 #define YY_ACCEPT_ACTION 444
756 #define YY_NO_ACTION 445
757 #define YY_MIN_REDUCE 446
758 #define YY_MAX_REDUCE 601
759 #define YY_MIN_DSTRCTR 101
760 #define YY_MAX_DSTRCTR 104
761 /************* End control #defines *******************************************/
762 #define YY_NLOOKAHEAD ((int)(sizeof(yy_lookahead)/sizeof(yy_lookahead[0])))
763
764 /* Define the yytestcase() macro to be a no-op if is not already defined
765 ** otherwise.
@@ -798,324 +838,322 @@
838 ** yy_reduce_ofst[] For each state, the offset into yy_action for
839 ** shifting non-terminals after a reduce.
840 ** yy_default[] Default action for each state.
841 **
842 *********** Begin parsing tables **********************************************/
843 #define YY_ACTTAB_COUNT (1305)
844 static const YYACTIONTYPE yy_action[] = {
845 /* 0 */ 575, 495, 161, 119, 25, 452, 29, 74, 129, 148,
846 /* 10 */ 575, 64, 63, 62, 61, 453, 113, 120, 161, 119,
847 /* 20 */ 427, 428, 339, 357, 81, 121, 447, 454, 29, 575,
848 /* 30 */ 530, 13, 50, 450, 322, 323, 9, 8, 33, 149,
849 /* 40 */ 32, 7, 71, 127, 163, 335, 66, 28, 444, 27,
850 /* 50 */ 339, 339, 339, 339, 425, 426, 340, 341, 342, 343,
851 /* 60 */ 344, 345, 346, 347, 348, 474, 64, 63, 62, 61,
852 /* 70 */ 54, 51, 73, 306, 148, 474, 492, 161, 119, 297,
853 /* 80 */ 112, 113, 120, 161, 119, 427, 428, 339, 30, 81,
854 /* 90 */ 109, 447, 454, 29, 474, 528, 161, 119, 450, 322,
855 /* 100 */ 323, 9, 8, 33, 149, 32, 7, 71, 127, 163,
856 /* 110 */ 335, 66, 535, 36, 27, 339, 339, 339, 339, 425,
857 /* 120 */ 426, 340, 341, 342, 343, 344, 345, 346, 347, 348,
858 /* 130 */ 394, 435, 310, 59, 60, 64, 63, 62, 61, 313,
859 /* 140 */ 74, 376, 148, 69, 2, 533, 161, 119, 124, 113,
860 /* 150 */ 120, 161, 119, 80, 535, 31, 308, 79, 83, 107,
861 /* 160 */ 535, 441, 440, 535, 394, 435, 299, 59, 60, 120,
862 /* 170 */ 161, 119, 149, 463, 376, 376, 330, 84, 2, 122,
863 /* 180 */ 78, 78, 38, 156, 156, 156, 48, 37, 559, 328,
864 /* 190 */ 128, 152, 560, 561, 434, 441, 440, 350, 350, 350,
865 /* 200 */ 350, 350, 350, 350, 350, 350, 350, 350, 577, 77,
866 /* 210 */ 577, 35, 106, 46, 436, 437, 438, 439, 579, 375,
867 /* 220 */ 298, 117, 393, 155, 154, 153, 47, 4, 434, 69,
868 /* 230 */ 394, 435, 3, 59, 60, 411, 412, 413, 414, 398,
869 /* 240 */ 399, 376, 62, 61, 2, 108, 106, 5, 436, 437,
870 /* 250 */ 438, 439, 375, 375, 117, 117, 393, 155, 154, 153,
871 /* 260 */ 76, 441, 440, 67, 6, 142, 140, 64, 63, 62,
872 /* 270 */ 61, 380, 157, 424, 427, 428, 339, 379, 159, 45,
873 /* 280 */ 423, 72, 131, 148, 531, 161, 119, 1, 55, 125,
874 /* 290 */ 113, 120, 161, 119, 434, 147, 146, 64, 63, 62,
875 /* 300 */ 61, 397, 43, 11, 339, 339, 339, 339, 425, 426,
876 /* 310 */ 355, 65, 106, 149, 436, 437, 438, 439, 74, 375,
877 /* 320 */ 148, 117, 393, 155, 154, 153, 497, 113, 120, 161,
878 /* 330 */ 119, 22, 21, 12, 142, 140, 64, 63, 62, 61,
879 /* 340 */ 24, 356, 145, 141, 431, 64, 63, 62, 61, 391,
880 /* 350 */ 149, 448, 454, 29, 378, 158, 85, 55, 450, 394,
881 /* 360 */ 432, 138, 59, 60, 147, 146, 120, 161, 119, 163,
882 /* 370 */ 102, 43, 139, 42, 27, 430, 14, 15, 301, 302,
883 /* 380 */ 303, 446, 305, 16, 44, 74, 18, 148, 152, 19,
884 /* 390 */ 20, 36, 68, 496, 113, 120, 161, 119, 114, 359,
885 /* 400 */ 22, 21, 23, 142, 140, 64, 63, 62, 61, 24,
886 /* 410 */ 107, 145, 141, 431, 26, 57, 377, 149, 58, 118,
887 /* 420 */ 120, 161, 119, 392, 463, 384, 55, 64, 63, 62,
888 /* 430 */ 61, 382, 569, 147, 146, 160, 383, 435, 39, 70,
889 /* 440 */ 43, 106, 152, 445, 445, 88, 445, 445, 375, 445,
890 /* 450 */ 117, 393, 155, 154, 153, 120, 161, 119, 445, 17,
891 /* 460 */ 445, 10, 479, 479, 445, 445, 435, 441, 440, 22,
892 /* 470 */ 21, 445, 403, 64, 63, 62, 61, 152, 24, 445,
893 /* 480 */ 145, 141, 431, 133, 75, 126, 354, 445, 445, 123,
894 /* 490 */ 445, 404, 405, 406, 408, 80, 441, 440, 308, 79,
895 /* 500 */ 434, 411, 412, 413, 414, 394, 445, 445, 59, 60,
896 /* 510 */ 64, 63, 62, 61, 445, 445, 376, 445, 445, 42,
897 /* 520 */ 436, 437, 438, 439, 156, 156, 156, 394, 445, 434,
898 /* 530 */ 59, 60, 64, 63, 62, 61, 445, 445, 376, 445,
899 /* 540 */ 445, 42, 445, 394, 473, 391, 59, 60, 445, 436,
900 /* 550 */ 437, 438, 439, 49, 376, 445, 74, 42, 148, 445,
901 /* 560 */ 88, 445, 445, 445, 490, 113, 120, 161, 119, 445,
902 /* 570 */ 120, 161, 119, 132, 130, 394, 143, 475, 59, 60,
903 /* 580 */ 445, 473, 64, 63, 62, 61, 376, 106, 149, 42,
904 /* 590 */ 445, 445, 152, 445, 375, 391, 117, 393, 155, 154,
905 /* 600 */ 153, 394, 144, 52, 59, 60, 445, 445, 445, 106,
906 /* 610 */ 445, 445, 376, 445, 445, 42, 375, 445, 117, 393,
907 /* 620 */ 155, 154, 153, 445, 445, 106, 64, 63, 62, 61,
908 /* 630 */ 445, 445, 375, 445, 117, 393, 155, 154, 153, 394,
909 /* 640 */ 445, 445, 59, 60, 88, 445, 445, 53, 445, 445,
910 /* 650 */ 376, 445, 445, 42, 120, 161, 119, 106, 445, 445,
911 /* 660 */ 445, 110, 110, 445, 375, 445, 117, 393, 155, 154,
912 /* 670 */ 153, 394, 445, 445, 59, 60, 152, 107, 445, 445,
913 /* 680 */ 445, 445, 102, 106, 445, 42, 445, 120, 161, 119,
914 /* 690 */ 375, 451, 117, 393, 155, 154, 153, 394, 445, 445,
915 /* 700 */ 59, 60, 64, 63, 62, 61, 445, 445, 376, 152,
916 /* 710 */ 445, 40, 445, 394, 445, 396, 59, 60, 445, 445,
917 /* 720 */ 445, 106, 445, 445, 376, 88, 445, 41, 375, 445,
918 /* 730 */ 117, 393, 155, 154, 153, 120, 161, 119, 74, 445,
919 /* 740 */ 148, 445, 111, 111, 107, 445, 484, 113, 120, 161,
920 /* 750 */ 119, 445, 445, 106, 120, 161, 119, 152, 478, 445,
921 /* 760 */ 375, 86, 117, 393, 155, 154, 153, 445, 445, 445,
922 /* 770 */ 149, 120, 161, 119, 445, 445, 152, 445, 445, 106,
923 /* 780 */ 445, 64, 63, 62, 61, 445, 375, 445, 117, 393,
924 /* 790 */ 155, 154, 153, 152, 395, 106, 64, 63, 62, 61,
925 /* 800 */ 98, 445, 375, 445, 117, 393, 155, 154, 153, 445,
926 /* 810 */ 120, 161, 119, 445, 74, 445, 148, 56, 445, 74,
927 /* 820 */ 445, 148, 483, 113, 120, 161, 119, 480, 113, 120,
928 /* 830 */ 161, 119, 152, 74, 445, 148, 445, 89, 445, 445,
929 /* 840 */ 445, 134, 113, 120, 161, 119, 149, 120, 161, 119,
930 /* 850 */ 445, 149, 74, 445, 148, 445, 445, 445, 378, 158,
931 /* 860 */ 517, 113, 120, 161, 119, 149, 74, 445, 148, 152,
932 /* 870 */ 445, 74, 445, 148, 137, 113, 120, 161, 119, 525,
933 /* 880 */ 113, 120, 161, 119, 149, 74, 445, 148, 64, 63,
934 /* 890 */ 62, 61, 445, 527, 113, 120, 161, 119, 149, 445,
935 /* 900 */ 445, 391, 445, 149, 445, 445, 445, 445, 445, 445,
936 /* 910 */ 74, 445, 148, 445, 445, 162, 445, 149, 524, 113,
937 /* 920 */ 120, 161, 119, 118, 445, 74, 445, 148, 445, 445,
938 /* 930 */ 445, 445, 445, 526, 113, 120, 161, 119, 445, 74,
939 /* 940 */ 445, 148, 149, 445, 445, 445, 445, 523, 113, 120,
940 /* 950 */ 161, 119, 74, 445, 148, 445, 445, 149, 445, 445,
941 /* 960 */ 522, 113, 120, 161, 119, 445, 74, 445, 148, 445,
942 /* 970 */ 445, 149, 445, 445, 521, 113, 120, 161, 119, 74,
943 /* 980 */ 445, 148, 445, 445, 149, 445, 445, 520, 113, 120,
944 /* 990 */ 161, 119, 445, 74, 445, 148, 445, 445, 149, 445,
945 /* 1000 */ 445, 519, 113, 120, 161, 119, 445, 445, 445, 445,
946 /* 1010 */ 445, 149, 445, 445, 445, 445, 445, 445, 74, 445,
947 /* 1020 */ 148, 445, 445, 445, 445, 149, 150, 113, 120, 161,
948 /* 1030 */ 119, 74, 445, 148, 445, 445, 445, 445, 445, 151,
949 /* 1040 */ 113, 120, 161, 119, 445, 74, 445, 148, 445, 445,
950 /* 1050 */ 149, 445, 445, 136, 113, 120, 161, 119, 74, 445,
951 /* 1060 */ 148, 445, 445, 149, 445, 445, 135, 113, 120, 161,
952 /* 1070 */ 119, 445, 88, 445, 445, 445, 445, 149, 445, 445,
953 /* 1080 */ 445, 90, 120, 161, 119, 445, 445, 445, 445, 82,
954 /* 1090 */ 149, 120, 161, 119, 445, 87, 466, 445, 34, 99,
955 /* 1100 */ 445, 445, 445, 445, 152, 120, 161, 119, 100, 120,
956 /* 1110 */ 161, 119, 445, 152, 445, 445, 445, 445, 120, 161,
957 /* 1120 */ 119, 445, 445, 445, 101, 445, 445, 152, 445, 445,
958 /* 1130 */ 445, 152, 91, 445, 120, 161, 119, 103, 445, 445,
959 /* 1140 */ 152, 445, 120, 161, 119, 445, 445, 120, 161, 119,
960 /* 1150 */ 445, 92, 445, 445, 445, 445, 152, 445, 445, 445,
961 /* 1160 */ 93, 120, 161, 119, 152, 445, 104, 445, 445, 152,
962 /* 1170 */ 120, 161, 119, 445, 94, 445, 120, 161, 119, 445,
963 /* 1180 */ 445, 445, 445, 152, 120, 161, 119, 445, 445, 105,
964 /* 1190 */ 445, 445, 152, 445, 445, 445, 445, 95, 152, 120,
965 /* 1200 */ 161, 119, 96, 445, 445, 97, 152, 120, 161, 119,
966 /* 1210 */ 445, 445, 120, 161, 119, 120, 161, 119, 445, 445,
967 /* 1220 */ 445, 152, 445, 445, 445, 445, 445, 445, 445, 152,
968 /* 1230 */ 549, 445, 445, 548, 152, 445, 445, 152, 547, 445,
969 /* 1240 */ 120, 161, 119, 120, 161, 119, 546, 445, 120, 161,
970 /* 1250 */ 119, 445, 445, 445, 445, 445, 120, 161, 119, 445,
971 /* 1260 */ 445, 445, 152, 445, 445, 152, 445, 445, 445, 115,
972 /* 1270 */ 152, 445, 116, 445, 445, 445, 445, 445, 152, 120,
973 /* 1280 */ 161, 119, 120, 161, 119, 445, 445, 445, 445, 445,
974 /* 1290 */ 445, 445, 445, 445, 445, 445, 445, 445, 445, 445,
975 /* 1300 */ 445, 152, 445, 445, 152,
 
976 };
977 static const YYCODETYPE yy_lookahead[] = {
978 /* 0 */ 0, 115, 116, 117, 136, 103, 104, 105, 107, 107,
979 /* 10 */ 10, 4, 5, 6, 7, 113, 114, 115, 116, 117,
980 /* 20 */ 20, 21, 22, 17, 24, 101, 102, 103, 104, 29,
981 /* 30 */ 107, 25, 25, 109, 34, 35, 36, 37, 38, 137,
982 /* 40 */ 40, 41, 42, 43, 120, 45, 46, 109, 124, 125,
983 /* 50 */ 50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
984 /* 60 */ 60, 61, 62, 63, 64, 0, 4, 5, 6, 7,
985 /* 70 */ 4, 5, 105, 25, 107, 10, 115, 116, 117, 17,
986 /* 80 */ 113, 114, 115, 116, 117, 20, 21, 22, 128, 24,
987 /* 90 */ 101, 102, 103, 104, 29, 115, 116, 117, 109, 34,
988 /* 100 */ 35, 36, 37, 38, 137, 40, 41, 42, 43, 120,
989 /* 110 */ 45, 46, 49, 10, 125, 50, 51, 52, 53, 54,
990 /* 120 */ 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
991 /* 130 */ 1, 2, 29, 4, 5, 4, 5, 6, 7, 8,
992 /* 140 */ 105, 12, 107, 3, 15, 115, 116, 117, 113, 114,
993 /* 150 */ 115, 116, 117, 24, 91, 130, 27, 28, 118, 105,
994 /* 160 */ 97, 32, 33, 100, 1, 2, 19, 4, 5, 115,
995 /* 170 */ 116, 117, 137, 119, 12, 12, 2, 118, 15, 1,
996 /* 180 */ 126, 127, 106, 20, 21, 22, 110, 111, 106, 2,
997 /* 190 */ 107, 137, 110, 111, 65, 32, 33, 65, 66, 67,
998 /* 200 */ 68, 69, 70, 71, 72, 73, 74, 75, 132, 133,
999 /* 210 */ 134, 131, 83, 39, 85, 86, 87, 88, 135, 90,
1000 /* 220 */ 17, 92, 93, 94, 95, 96, 39, 15, 65, 89,
1001 /* 230 */ 1, 2, 16, 4, 5, 30, 31, 32, 33, 98,
1002 /* 240 */ 99, 12, 6, 7, 15, 83, 83, 41, 85, 86,
1003 /* 250 */ 87, 88, 90, 90, 92, 92, 93, 94, 95, 96,
1004 /* 260 */ 49, 32, 33, 44, 41, 2, 3, 4, 5, 6,
1005 /* 270 */ 7, 27, 28, 42, 20, 21, 22, 27, 28, 16,
1006 /* 280 */ 42, 105, 48, 107, 115, 116, 117, 13, 25, 113,
1007 /* 290 */ 114, 115, 116, 117, 65, 32, 33, 4, 5, 6,
1008 /* 300 */ 7, 17, 39, 25, 50, 51, 52, 53, 54, 55,
1009 /* 310 */ 17, 100, 83, 137, 85, 86, 87, 88, 105, 90,
1010 /* 320 */ 107, 92, 93, 94, 95, 96, 113, 114, 115, 116,
1011 /* 330 */ 117, 68, 69, 76, 2, 3, 4, 5, 6, 7,
1012 /* 340 */ 77, 17, 79, 80, 81, 4, 5, 6, 7, 17,
1013 /* 350 */ 137, 102, 103, 104, 27, 28, 105, 25, 109, 1,
1014 /* 360 */ 81, 80, 4, 5, 32, 33, 115, 116, 117, 120,
1015 /* 370 */ 12, 39, 82, 15, 125, 81, 3, 36, 20, 21,
1016 /* 380 */ 22, 0, 24, 3, 39, 105, 3, 107, 137, 3,
1017 /* 390 */ 3, 10, 3, 113, 114, 115, 116, 117, 97, 78,
1018 /* 400 */ 68, 69, 25, 2, 3, 4, 5, 6, 7, 77,
1019 /* 410 */ 105, 79, 80, 81, 15, 15, 12, 137, 15, 92,
1020 /* 420 */ 115, 116, 117, 17, 119, 29, 25, 4, 5, 6,
1021 /* 430 */ 7, 29, 127, 32, 33, 91, 29, 2, 11, 3,
1022 /* 440 */ 39, 83, 137, 138, 138, 105, 138, 138, 90, 138,
1023 /* 450 */ 92, 93, 94, 95, 96, 115, 116, 117, 138, 36,
1024 /* 460 */ 138, 121, 122, 123, 138, 138, 2, 32, 33, 68,
1025 /* 470 */ 69, 138, 1, 4, 5, 6, 7, 137, 77, 138,
1026 /* 480 */ 79, 80, 81, 12, 49, 14, 17, 138, 138, 18,
1027 /* 490 */ 138, 20, 21, 22, 23, 24, 32, 33, 27, 28,
1028 /* 500 */ 65, 30, 31, 32, 33, 1, 138, 138, 4, 5,
1029 /* 510 */ 4, 5, 6, 7, 138, 138, 12, 138, 138, 15,
1030 /* 520 */ 85, 86, 87, 88, 20, 21, 22, 1, 138, 65,
1031 /* 530 */ 4, 5, 4, 5, 6, 7, 138, 138, 12, 138,
1032 /* 540 */ 138, 15, 138, 1, 2, 17, 4, 5, 138, 85,
1033 /* 550 */ 86, 87, 88, 25, 12, 138, 105, 15, 107, 138,
1034 /* 560 */ 105, 138, 138, 138, 113, 114, 115, 116, 117, 138,
1035 /* 570 */ 115, 116, 117, 47, 48, 1, 2, 122, 4, 5,
1036 /* 580 */ 138, 39, 4, 5, 6, 7, 12, 83, 137, 15,
1037 /* 590 */ 138, 138, 137, 138, 90, 17, 92, 93, 94, 95,
1038 /* 600 */ 96, 1, 2, 25, 4, 5, 138, 138, 138, 83,
1039 /* 610 */ 138, 138, 12, 138, 138, 15, 90, 138, 92, 93,
1040 /* 620 */ 94, 95, 96, 138, 138, 83, 4, 5, 6, 7,
1041 /* 630 */ 138, 138, 90, 138, 92, 93, 94, 95, 96, 1,
1042 /* 640 */ 138, 138, 4, 5, 105, 138, 138, 25, 138, 138,
1043 /* 650 */ 12, 138, 138, 15, 115, 116, 117, 83, 138, 138,
1044 /* 660 */ 138, 122, 123, 138, 90, 138, 92, 93, 94, 95,
1045 /* 670 */ 96, 1, 138, 138, 4, 5, 137, 105, 138, 138,
1046 /* 680 */ 138, 138, 12, 83, 138, 15, 138, 115, 116, 117,
1047 /* 690 */ 90, 119, 92, 93, 94, 95, 96, 1, 138, 138,
1048 /* 700 */ 4, 5, 4, 5, 6, 7, 138, 138, 12, 137,
1049 /* 710 */ 138, 15, 138, 1, 138, 17, 4, 5, 138, 138,
1050 /* 720 */ 138, 83, 138, 138, 12, 105, 138, 15, 90, 138,
1051 /* 730 */ 92, 93, 94, 95, 96, 115, 116, 117, 105, 138,
1052 /* 740 */ 107, 138, 122, 123, 105, 138, 113, 114, 115, 116,
1053 /* 750 */ 117, 138, 138, 83, 115, 116, 117, 137, 119, 138,
1054 /* 760 */ 90, 105, 92, 93, 94, 95, 96, 138, 138, 138,
1055 /* 770 */ 137, 115, 116, 117, 138, 138, 137, 138, 138, 83,
1056 /* 780 */ 138, 4, 5, 6, 7, 138, 90, 138, 92, 93,
1057 /* 790 */ 94, 95, 96, 137, 17, 83, 4, 5, 6, 7,
1058 /* 800 */ 105, 138, 90, 138, 92, 93, 94, 95, 96, 138,
1059 /* 810 */ 115, 116, 117, 138, 105, 138, 107, 25, 138, 105,
1060 /* 820 */ 138, 107, 113, 114, 115, 116, 117, 113, 114, 115,
1061 /* 830 */ 116, 117, 137, 105, 138, 107, 138, 105, 138, 138,
1062 /* 840 */ 138, 113, 114, 115, 116, 117, 137, 115, 116, 117,
1063 /* 850 */ 138, 137, 105, 138, 107, 138, 138, 138, 27, 28,
1064 /* 860 */ 113, 114, 115, 116, 117, 137, 105, 138, 107, 137,
1065 /* 870 */ 138, 105, 138, 107, 113, 114, 115, 116, 117, 113,
1066 /* 880 */ 114, 115, 116, 117, 137, 105, 138, 107, 4, 5,
1067 /* 890 */ 6, 7, 138, 113, 114, 115, 116, 117, 137, 138,
1068 /* 900 */ 138, 17, 138, 137, 138, 138, 138, 138, 138, 138,
1069 /* 910 */ 105, 138, 107, 138, 138, 84, 138, 137, 113, 114,
1070 /* 920 */ 115, 116, 117, 92, 138, 105, 138, 107, 138, 138,
1071 /* 930 */ 138, 138, 138, 113, 114, 115, 116, 117, 138, 105,
1072 /* 940 */ 138, 107, 137, 138, 138, 138, 138, 113, 114, 115,
1073 /* 950 */ 116, 117, 105, 138, 107, 138, 138, 137, 138, 138,
1074 /* 960 */ 113, 114, 115, 116, 117, 138, 105, 138, 107, 138,
1075 /* 970 */ 138, 137, 138, 138, 113, 114, 115, 116, 117, 105,
1076 /* 980 */ 138, 107, 138, 138, 137, 138, 138, 113, 114, 115,
1077 /* 990 */ 116, 117, 138, 105, 138, 107, 138, 138, 137, 138,
1078 /* 1000 */ 138, 113, 114, 115, 116, 117, 138, 138, 138, 138,
1079 /* 1010 */ 138, 137, 138, 138, 138, 138, 138, 138, 105, 138,
1080 /* 1020 */ 107, 138, 138, 138, 138, 137, 113, 114, 115, 116,
1081 /* 1030 */ 117, 105, 138, 107, 138, 138, 138, 138, 138, 113,
1082 /* 1040 */ 114, 115, 116, 117, 138, 105, 138, 107, 138, 138,
1083 /* 1050 */ 137, 138, 138, 113, 114, 115, 116, 117, 105, 138,
1084 /* 1060 */ 107, 138, 138, 137, 138, 138, 113, 114, 115, 116,
1085 /* 1070 */ 117, 138, 105, 138, 138, 138, 138, 137, 138, 138,
1086 /* 1080 */ 138, 105, 115, 116, 117, 138, 138, 138, 138, 122,
1087 /* 1090 */ 137, 115, 116, 117, 138, 105, 129, 138, 131, 105,
1088 /* 1100 */ 138, 138, 138, 138, 137, 115, 116, 117, 105, 115,
1089 /* 1110 */ 116, 117, 138, 137, 138, 138, 138, 138, 115, 116,
1090 /* 1120 */ 117, 138, 138, 138, 105, 138, 138, 137, 138, 138,
1091 /* 1130 */ 138, 137, 105, 138, 115, 116, 117, 105, 138, 138,
1092 /* 1140 */ 137, 138, 115, 116, 117, 138, 138, 115, 116, 117,
1093 /* 1150 */ 138, 105, 138, 138, 138, 138, 137, 138, 138, 138,
1094 /* 1160 */ 105, 115, 116, 117, 137, 138, 105, 138, 138, 137,
1095 /* 1170 */ 115, 116, 117, 138, 105, 138, 115, 116, 117, 138,
1096 /* 1180 */ 138, 138, 138, 137, 115, 116, 117, 138, 138, 105,
1097 /* 1190 */ 138, 138, 137, 138, 138, 138, 138, 105, 137, 115,
1098 /* 1200 */ 116, 117, 105, 138, 138, 105, 137, 115, 116, 117,
1099 /* 1210 */ 138, 138, 115, 116, 117, 115, 116, 117, 138, 138,
1100 /* 1220 */ 138, 137, 138, 138, 138, 138, 138, 138, 138, 137,
1101 /* 1230 */ 105, 138, 138, 105, 137, 138, 138, 137, 105, 138,
1102 /* 1240 */ 115, 116, 117, 115, 116, 117, 105, 138, 115, 116,
1103 /* 1250 */ 117, 138, 138, 138, 138, 138, 115, 116, 117, 138,
1104 /* 1260 */ 138, 138, 137, 138, 138, 137, 138, 138, 138, 105,
1105 /* 1270 */ 137, 138, 105, 138, 138, 138, 138, 138, 137, 115,
1106 /* 1280 */ 116, 117, 115, 116, 117, 138, 138, 138, 138, 138,
1107 /* 1290 */ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
1108 /* 1300 */ 138, 137, 138, 138, 137, 101, 101, 101, 101, 101,
1109 /* 1310 */ 101, 101, 101, 101, 101, 101, 101, 101, 101, 101,
1110 /* 1320 */ 101, 101, 101, 101, 101, 101, 101, 101, 101, 101,
1111 /* 1330 */ 101, 101, 101, 101, 101, 101, 101, 101, 101, 101,
1112 /* 1340 */ 101, 101, 101, 101, 101, 101, 101, 101, 101, 101,
1113 /* 1350 */ 101, 101, 101, 101, 101, 101, 101, 101, 101, 101,
1114 /* 1360 */ 101, 101, 101, 101, 101, 101, 101, 101, 101, 101,
1115 /* 1370 */ 101, 101, 101, 101, 101, 101, 101, 101, 101, 101,
1116 /* 1380 */ 101, 101, 101, 101, 101, 101, 101, 101, 101, 101,
1117 /* 1390 */ 101, 101, 101, 101, 101, 101, 101, 101, 101, 101,
1118 /* 1400 */ 101, 101, 101, 101, 101, 101,
 
1119 };
1120 #define YY_SHIFT_COUNT (163)
1121 #define YY_SHIFT_MIN (0)
1122 #define YY_SHIFT_MAX (884)
1123 static const unsigned short int yy_shift_ofst[] = {
1124 /* 0 */ 471, 129, 163, 229, 229, 229, 229, 229, 229, 229,
1125 /* 10 */ 229, 229, 229, 229, 229, 229, 229, 229, 229, 229,
1126 /* 20 */ 229, 229, 229, 229, 229, 229, 229, 358, 526, 638,
1127 /* 30 */ 358, 471, 542, 542, 0, 65, 471, 670, 638, 670,
1128 /* 40 */ 504, 504, 504, 574, 600, 638, 638, 638, 638, 638,
1129 /* 50 */ 638, 696, 638, 638, 712, 638, 638, 638, 638, 638,
1130 /* 60 */ 638, 638, 638, 638, 638, 254, 162, 162, 162, 162,
1131 /* 70 */ 162, 435, 263, 332, 401, 464, 464, 205, 48, 1305,
1132 /* 80 */ 1305, 1305, 1305, 132, 132, 528, 578, 62, 131, 341,
1133 /* 90 */ 423, 293, 7, 469, 622, 698, 792, 777, 884, 506,
1134 /* 100 */ 506, 506, 63, 506, 506, 506, 831, 506, 327, 103,
1135 /* 110 */ 174, 187, 6, 66, 141, 236, 236, 244, 250, 140,
1136 /* 120 */ 211, 381, 147, 178, 203, 216, 212, 219, 206, 223,
1137 /* 130 */ 231, 238, 234, 274, 284, 278, 257, 324, 279, 281,
1138 /* 140 */ 290, 294, 373, 380, 383, 345, 386, 387, 389, 301,
1139 /* 150 */ 321, 377, 301, 399, 400, 403, 406, 396, 402, 407,
1140 /* 160 */ 404, 344, 436, 427,
1141 };
1142 #define YY_REDUCE_COUNT (82)
1143 #define YY_REDUCE_MIN (-132)
1144 #define YY_REDUCE_MAX (1167)
1145 static const short yy_reduce_ofst[] = {
1146 /* 0 */ -76, -98, -33, 35, 176, 213, 280, 451, 633, 709,
1147 /* 10 */ 714, 728, 747, 761, 766, 780, 805, 820, 834, 847,
1148 /* 20 */ 861, 874, 888, 913, 926, 940, 953, 54, 340, 967,
1149 /* 30 */ 305, -11, 539, 620, 76, 76, 249, 639, 455, 572,
1150 /* 40 */ 251, 656, 695, 732, 976, 990, 994, 1003, 1019, 1027,
1151 /* 50 */ 1032, 1046, 1055, 1061, 1069, 1084, 1092, 1097, 1100, 1125,
1152 /* 60 */ 1128, 1133, 1141, 1164, 1167, 82, -114, -39, -20, 30,
1153 /* 70 */ 169, 83, -132, -132, -132, -99, -77, -62, -40, 25,
1154 /* 80 */ 40, 59, 80,
1155 };
1156 static const YYACTIONTYPE yy_default[] = {
1157 /* 0 */ 449, 443, 443, 443, 443, 443, 443, 443, 443, 443,
1158 /* 10 */ 443, 443, 443, 443, 443, 443, 443, 443, 443, 443,
1159 /* 20 */ 443, 443, 443, 443, 443, 443, 443, 443, 473, 576,
@@ -1176,10 +1214,11 @@
1214 0, /* COLOR => nothing */
1215 0, /* THICKNESS => nothing */
1216 0, /* PRINT => nothing */
1217 0, /* STRING => nothing */
1218 0, /* COMMA => nothing */
1219 0, /* ISODATE => nothing */
1220 0, /* CLASSNAME => nothing */
1221 0, /* LB => nothing */
1222 0, /* RB => nothing */
1223 0, /* UP => nothing */
1224 0, /* DOWN => nothing */
@@ -1359,120 +1398,122 @@
1398 /* 21 */ "COLOR",
1399 /* 22 */ "THICKNESS",
1400 /* 23 */ "PRINT",
1401 /* 24 */ "STRING",
1402 /* 25 */ "COMMA",
1403 /* 26 */ "ISODATE",
1404 /* 27 */ "CLASSNAME",
1405 /* 28 */ "LB",
1406 /* 29 */ "RB",
1407 /* 30 */ "UP",
1408 /* 31 */ "DOWN",
1409 /* 32 */ "LEFT",
1410 /* 33 */ "RIGHT",
1411 /* 34 */ "CLOSE",
1412 /* 35 */ "CHOP",
1413 /* 36 */ "FROM",
1414 /* 37 */ "TO",
1415 /* 38 */ "THEN",
1416 /* 39 */ "HEADING",
1417 /* 40 */ "GO",
1418 /* 41 */ "AT",
1419 /* 42 */ "WITH",
1420 /* 43 */ "SAME",
1421 /* 44 */ "AS",
1422 /* 45 */ "FIT",
1423 /* 46 */ "BEHIND",
1424 /* 47 */ "UNTIL",
1425 /* 48 */ "EVEN",
1426 /* 49 */ "DOT_E",
1427 /* 50 */ "HEIGHT",
1428 /* 51 */ "WIDTH",
1429 /* 52 */ "RADIUS",
1430 /* 53 */ "DIAMETER",
1431 /* 54 */ "DOTTED",
1432 /* 55 */ "DASHED",
1433 /* 56 */ "CW",
1434 /* 57 */ "CCW",
1435 /* 58 */ "LARROW",
1436 /* 59 */ "RARROW",
1437 /* 60 */ "LRARROW",
1438 /* 61 */ "INVIS",
1439 /* 62 */ "THICK",
1440 /* 63 */ "THIN",
1441 /* 64 */ "SOLID",
1442 /* 65 */ "CENTER",
1443 /* 66 */ "LJUST",
1444 /* 67 */ "RJUST",
1445 /* 68 */ "ABOVE",
1446 /* 69 */ "BELOW",
1447 /* 70 */ "ITALIC",
1448 /* 71 */ "BOLD",
1449 /* 72 */ "MONO",
1450 /* 73 */ "ALIGNED",
1451 /* 74 */ "BIG",
1452 /* 75 */ "SMALL",
1453 /* 76 */ "AND",
1454 /* 77 */ "LT",
1455 /* 78 */ "GT",
1456 /* 79 */ "ON",
1457 /* 80 */ "WAY",
1458 /* 81 */ "BETWEEN",
1459 /* 82 */ "THE",
1460 /* 83 */ "NTH",
1461 /* 84 */ "VERTEX",
1462 /* 85 */ "TOP",
1463 /* 86 */ "BOTTOM",
1464 /* 87 */ "START",
1465 /* 88 */ "END",
1466 /* 89 */ "IN",
1467 /* 90 */ "THIS",
1468 /* 91 */ "DOT_U",
1469 /* 92 */ "LAST",
1470 /* 93 */ "NUMBER",
1471 /* 94 */ "FUNC1",
1472 /* 95 */ "FUNC2",
1473 /* 96 */ "DIST",
1474 /* 97 */ "DOT_XY",
1475 /* 98 */ "X",
1476 /* 99 */ "Y",
1477 /* 100 */ "DOT_L",
1478 /* 101 */ "statement_list",
1479 /* 102 */ "statement",
1480 /* 103 */ "unnamed_statement",
1481 /* 104 */ "basetype",
1482 /* 105 */ "expr",
1483 /* 106 */ "numproperty",
1484 /* 107 */ "edge",
1485 /* 108 */ "isodate",
1486 /* 109 */ "direction",
1487 /* 110 */ "dashproperty",
1488 /* 111 */ "colorproperty",
1489 /* 112 */ "locproperty",
1490 /* 113 */ "position",
1491 /* 114 */ "place",
1492 /* 115 */ "object",
1493 /* 116 */ "objectname",
1494 /* 117 */ "nth",
1495 /* 118 */ "textposition",
1496 /* 119 */ "rvalue",
1497 /* 120 */ "lvalue",
1498 /* 121 */ "even",
1499 /* 122 */ "relexpr",
1500 /* 123 */ "optrelexpr",
1501 /* 124 */ "document",
1502 /* 125 */ "print",
1503 /* 126 */ "prlist",
1504 /* 127 */ "pritem",
1505 /* 128 */ "prsep",
1506 /* 129 */ "attribute_list",
1507 /* 130 */ "savelist",
1508 /* 131 */ "alist",
1509 /* 132 */ "attribute",
1510 /* 133 */ "go",
1511 /* 134 */ "boolproperty",
1512 /* 135 */ "withclause",
1513 /* 136 */ "between",
1514 /* 137 */ "place2",
1515 };
1516 #endif /* defined(YYCOVERAGE) || !defined(NDEBUG) */
1517
1518 #ifndef NDEBUG
1519 /* For tracing reduce actions, the names of all rules are required.
@@ -1755,24 +1796,24 @@
1796 ** Note: during a reduce, the only symbols destroyed are those
1797 ** which appear on the RHS of the rule, but which are *not* used
1798 ** inside the C code.
1799 */
1800 /********* Begin destructor definitions ***************************************/
1801 case 101: /* statement_list */
1802 {
1803 #line 524 "pikchr.y"
1804 pik_elist_free(p,(yypminor->yy23));
1805 #line 1805 "pikchr.c"
1806 }
1807 break;
1808 case 102: /* statement */
1809 case 103: /* unnamed_statement */
1810 case 104: /* basetype */
1811 {
1812 #line 526 "pikchr.y"
1813 pik_elem_free(p,(yypminor->yy54));
1814 #line 1814 "pikchr.c"
1815 }
1816 break;
1817 /********* End destructor definitions *****************************************/
1818 default: break; /* If no destructor action specified: do nothing */
1819 }
@@ -2003,14 +2044,14 @@
2044 #endif
2045 while( yypParser->yytos>yypParser->yystack ) yy_pop_parser_stack(yypParser);
2046 /* Here code is inserted which will execute if the parser
2047 ** stack every overflows */
2048 /******** Begin %stack_overflow code ******************************************/
2049 #line 559 "pikchr.y"
2050
2051 pik_error(p, 0, "parser stack overflow");
2052 #line 2052 "pikchr.c"
2053 /******** End %stack_overflow code ********************************************/
2054 pik_parserARG_STORE /* Suppress warning about unused %extra_argument var */
2055 pik_parserCTX_STORE
2056 }
2057
@@ -2072,166 +2113,166 @@
2113 }
2114
2115 /* For rule J, yyRuleInfoLhs[J] contains the symbol on the left-hand side
2116 ** of that rule */
2117 static const YYCODETYPE yyRuleInfoLhs[] = {
2118 124, /* (0) document ::= statement_list */
2119 101, /* (1) statement_list ::= statement */
2120 101, /* (2) statement_list ::= statement_list EOL statement */
2121 102, /* (3) statement ::= */
2122 102, /* (4) statement ::= direction */
2123 102, /* (5) statement ::= lvalue ASSIGN rvalue */
2124 102, /* (6) statement ::= PLACENAME COLON unnamed_statement */
2125 102, /* (7) statement ::= PLACENAME COLON position */
2126 102, /* (8) statement ::= unnamed_statement */
2127 102, /* (9) statement ::= print prlist */
2128 102, /* (10) statement ::= ASSERT LP expr EQ expr RP */
2129 102, /* (11) statement ::= ASSERT LP position EQ position RP */
2130 102, /* (12) statement ::= DEFINE ID CODEBLOCK */
2131 119, /* (13) rvalue ::= PLACENAME */
2132 127, /* (14) pritem ::= FILL */
2133 127, /* (15) pritem ::= COLOR */
2134 127, /* (16) pritem ::= THICKNESS */
2135 127, /* (17) pritem ::= rvalue */
2136 127, /* (18) pritem ::= STRING */
2137 128, /* (19) prsep ::= COMMA */
2138 103, /* (20) unnamed_statement ::= basetype attribute_list */
2139 104, /* (21) basetype ::= CLASSNAME */
2140 104, /* (22) basetype ::= STRING textposition */
2141 104, /* (23) basetype ::= LB savelist statement_list RB */
2142 130, /* (24) savelist ::= */
2143 122, /* (25) relexpr ::= expr */
2144 122, /* (26) relexpr ::= expr PERCENT */
2145 123, /* (27) optrelexpr ::= */
2146 129, /* (28) attribute_list ::= relexpr alist */
2147 132, /* (29) attribute ::= numproperty relexpr */
2148 132, /* (30) attribute ::= dashproperty expr */
2149 132, /* (31) attribute ::= dashproperty */
2150 132, /* (32) attribute ::= colorproperty rvalue */
2151 132, /* (33) attribute ::= go direction optrelexpr */
2152 132, /* (34) attribute ::= go direction even position */
2153 132, /* (35) attribute ::= CLOSE */
2154 132, /* (36) attribute ::= CHOP */
2155 132, /* (37) attribute ::= FROM position */
2156 132, /* (38) attribute ::= TO position */
2157 132, /* (39) attribute ::= THEN */
2158 132, /* (40) attribute ::= THEN optrelexpr HEADING expr */
2159 132, /* (41) attribute ::= THEN optrelexpr EDGEPT */
2160 132, /* (42) attribute ::= GO optrelexpr HEADING expr */
2161 132, /* (43) attribute ::= GO optrelexpr EDGEPT */
2162 132, /* (44) attribute ::= AT position */
2163 132, /* (45) attribute ::= SAME */
2164 132, /* (46) attribute ::= SAME AS object */
2165 132, /* (47) attribute ::= STRING textposition */
2166 132, /* (48) attribute ::= FIT */
2167 132, /* (49) attribute ::= BEHIND object */
2168 135, /* (50) withclause ::= DOT_E edge AT position */
2169 135, /* (51) withclause ::= edge AT position */
2170 106, /* (52) numproperty ::= HEIGHT|WIDTH|RADIUS|DIAMETER|THICKNESS */
2171 134, /* (53) boolproperty ::= CW */
2172 134, /* (54) boolproperty ::= CCW */
2173 134, /* (55) boolproperty ::= LARROW */
2174 134, /* (56) boolproperty ::= RARROW */
2175 134, /* (57) boolproperty ::= LRARROW */
2176 134, /* (58) boolproperty ::= INVIS */
2177 134, /* (59) boolproperty ::= THICK */
2178 134, /* (60) boolproperty ::= THIN */
2179 134, /* (61) boolproperty ::= SOLID */
2180 118, /* (62) textposition ::= */
2181 118, /* (63) textposition ::= textposition CENTER|LJUST|RJUST|ABOVE|BELOW|ITALIC|BOLD|MONO|ALIGNED|BIG|SMALL */
2182 113, /* (64) position ::= expr COMMA expr */
2183 113, /* (65) position ::= place PLUS expr COMMA expr */
2184 113, /* (66) position ::= place MINUS expr COMMA expr */
2185 113, /* (67) position ::= place PLUS LP expr COMMA expr RP */
2186 113, /* (68) position ::= place MINUS LP expr COMMA expr RP */
2187 113, /* (69) position ::= LP position COMMA position RP */
2188 113, /* (70) position ::= LP position RP */
2189 113, /* (71) position ::= expr between position AND position */
2190 113, /* (72) position ::= expr LT position COMMA position GT */
2191 113, /* (73) position ::= expr ABOVE position */
2192 113, /* (74) position ::= expr BELOW position */
2193 113, /* (75) position ::= expr LEFT OF position */
2194 113, /* (76) position ::= expr RIGHT OF position */
2195 113, /* (77) position ::= expr ON HEADING EDGEPT OF position */
2196 113, /* (78) position ::= expr HEADING EDGEPT OF position */
2197 113, /* (79) position ::= expr EDGEPT OF position */
2198 113, /* (80) position ::= expr ON HEADING expr FROM position */
2199 113, /* (81) position ::= expr HEADING expr FROM position */
2200 114, /* (82) place ::= edge OF object */
2201 137, /* (83) place2 ::= object */
2202 137, /* (84) place2 ::= object DOT_E edge */
2203 137, /* (85) place2 ::= NTH VERTEX OF object */
2204 115, /* (86) object ::= nth */
2205 115, /* (87) object ::= nth OF|IN object */
2206 116, /* (88) objectname ::= THIS */
2207 116, /* (89) objectname ::= PLACENAME */
2208 116, /* (90) objectname ::= objectname DOT_U PLACENAME */
2209 117, /* (91) nth ::= NTH CLASSNAME */
2210 117, /* (92) nth ::= NTH LAST CLASSNAME */
2211 117, /* (93) nth ::= LAST CLASSNAME */
2212 117, /* (94) nth ::= LAST */
2213 117, /* (95) nth ::= NTH LB RB */
2214 117, /* (96) nth ::= NTH LAST LB RB */
2215 117, /* (97) nth ::= LAST LB RB */
2216 105, /* (98) expr ::= expr PLUS expr */
2217 105, /* (99) expr ::= expr MINUS expr */
2218 105, /* (100) expr ::= expr STAR expr */
2219 105, /* (101) expr ::= expr SLASH expr */
2220 105, /* (102) expr ::= MINUS expr */
2221 105, /* (103) expr ::= PLUS expr */
2222 105, /* (104) expr ::= LP expr RP */
2223 105, /* (105) expr ::= LP FILL|COLOR|THICKNESS RP */
2224 105, /* (106) expr ::= NUMBER */
2225 105, /* (107) expr ::= ID */
2226 105, /* (108) expr ::= FUNC1 LP expr RP */
2227 105, /* (109) expr ::= FUNC2 LP expr COMMA expr RP */
2228 105, /* (110) expr ::= DIST LP position COMMA position RP */
2229 105, /* (111) expr ::= place2 DOT_XY X */
2230 105, /* (112) expr ::= place2 DOT_XY Y */
2231 105, /* (113) expr ::= object DOT_L numproperty */
2232 105, /* (114) expr ::= object DOT_L dashproperty */
2233 105, /* (115) expr ::= object DOT_L colorproperty */
2234 120, /* (116) lvalue ::= ID */
2235 120, /* (117) lvalue ::= FILL */
2236 120, /* (118) lvalue ::= COLOR */
2237 120, /* (119) lvalue ::= THICKNESS */
2238 119, /* (120) rvalue ::= expr */
2239 125, /* (121) print ::= PRINT */
2240 126, /* (122) prlist ::= pritem */
2241 126, /* (123) prlist ::= prlist prsep pritem */
2242 109, /* (124) direction ::= UP */
2243 109, /* (125) direction ::= DOWN */
2244 109, /* (126) direction ::= LEFT */
2245 109, /* (127) direction ::= RIGHT */
2246 123, /* (128) optrelexpr ::= relexpr */
2247 129, /* (129) attribute_list ::= alist */
2248 131, /* (130) alist ::= */
2249 131, /* (131) alist ::= alist attribute */
2250 132, /* (132) attribute ::= boolproperty */
2251 132, /* (133) attribute ::= WITH withclause */
2252 133, /* (134) go ::= GO */
2253 133, /* (135) go ::= */
2254 121, /* (136) even ::= UNTIL EVEN WITH */
2255 121, /* (137) even ::= EVEN WITH */
2256 110, /* (138) dashproperty ::= DOTTED */
2257 110, /* (139) dashproperty ::= DASHED */
2258 111, /* (140) colorproperty ::= FILL */
2259 111, /* (141) colorproperty ::= COLOR */
2260 113, /* (142) position ::= place */
2261 136, /* (143) between ::= WAY BETWEEN */
2262 136, /* (144) between ::= BETWEEN */
2263 136, /* (145) between ::= OF THE WAY BETWEEN */
2264 114, /* (146) place ::= place2 */
2265 107, /* (147) edge ::= CENTER */
2266 107, /* (148) edge ::= EDGEPT */
2267 107, /* (149) edge ::= TOP */
2268 107, /* (150) edge ::= BOTTOM */
2269 107, /* (151) edge ::= START */
2270 107, /* (152) edge ::= END */
2271 107, /* (153) edge ::= RIGHT */
2272 107, /* (154) edge ::= LEFT */
2273 115, /* (155) object ::= objectname */
2274 };
2275
2276 /* For rule J, yyRuleInfoNRhs[J] contains the negative of the number
2277 ** of symbols on the right-hand side of that rule. */
2278 static const signed char yyRuleInfoNRhs[] = {
@@ -2431,620 +2472,620 @@
2472 ** break;
2473 */
2474 /********** Begin reduce actions **********************************************/
2475 YYMINORTYPE yylhsminor;
2476 case 0: /* document ::= statement_list */
2477 #line 563 "pikchr.y"
2478 {pik_render(p,yymsp[0].minor.yy23);}
2479 #line 2479 "pikchr.c"
2480 break;
2481 case 1: /* statement_list ::= statement */
2482 #line 566 "pikchr.y"
2483 { yylhsminor.yy23 = pik_elist_append(p,0,yymsp[0].minor.yy54); }
2484 #line 2484 "pikchr.c"
2485 yymsp[0].minor.yy23 = yylhsminor.yy23;
2486 break;
2487 case 2: /* statement_list ::= statement_list EOL statement */
2488 #line 568 "pikchr.y"
2489 { yylhsminor.yy23 = pik_elist_append(p,yymsp[-2].minor.yy23,yymsp[0].minor.yy54); }
2490 #line 2490 "pikchr.c"
2491 yymsp[-2].minor.yy23 = yylhsminor.yy23;
2492 break;
2493 case 3: /* statement ::= */
2494 #line 571 "pikchr.y"
2495 { yymsp[1].minor.yy54 = 0; }
2496 #line 2496 "pikchr.c"
2497 break;
2498 case 4: /* statement ::= direction */
2499 #line 572 "pikchr.y"
2500 { pik_set_direction(p,yymsp[0].minor.yy0.eCode); yylhsminor.yy54=0; }
2501 #line 2501 "pikchr.c"
2502 yymsp[0].minor.yy54 = yylhsminor.yy54;
2503 break;
2504 case 5: /* statement ::= lvalue ASSIGN rvalue */
2505 #line 573 "pikchr.y"
2506 {pik_set_var(p,&yymsp[-2].minor.yy0,yymsp[0].minor.yy129,&yymsp[-1].minor.yy0); yylhsminor.yy54=0;}
2507 #line 2507 "pikchr.c"
2508 yymsp[-2].minor.yy54 = yylhsminor.yy54;
2509 break;
2510 case 6: /* statement ::= PLACENAME COLON unnamed_statement */
2511 #line 575 "pikchr.y"
2512 { yylhsminor.yy54 = yymsp[0].minor.yy54; pik_elem_setname(p,yymsp[0].minor.yy54,&yymsp[-2].minor.yy0); }
2513 #line 2513 "pikchr.c"
2514 yymsp[-2].minor.yy54 = yylhsminor.yy54;
2515 break;
2516 case 7: /* statement ::= PLACENAME COLON position */
2517 #line 577 "pikchr.y"
2518 { yylhsminor.yy54 = pik_elem_new(p,0,0,0);
2519 if(yylhsminor.yy54){ yylhsminor.yy54->ptAt = yymsp[0].minor.yy187; pik_elem_setname(p,yylhsminor.yy54,&yymsp[-2].minor.yy0); }}
2520 #line 2520 "pikchr.c"
2521 yymsp[-2].minor.yy54 = yylhsminor.yy54;
2522 break;
2523 case 8: /* statement ::= unnamed_statement */
2524 #line 579 "pikchr.y"
2525 {yylhsminor.yy54 = yymsp[0].minor.yy54;}
2526 #line 2526 "pikchr.c"
2527 yymsp[0].minor.yy54 = yylhsminor.yy54;
2528 break;
2529 case 9: /* statement ::= print prlist */
2530 #line 580 "pikchr.y"
2531 {pik_append(p,"<br>\n",5); yymsp[-1].minor.yy54=0;}
2532 #line 2532 "pikchr.c"
2533 break;
2534 case 10: /* statement ::= ASSERT LP expr EQ expr RP */
2535 #line 585 "pikchr.y"
2536 {yymsp[-5].minor.yy54=pik_assert(p,yymsp[-3].minor.yy129,&yymsp[-2].minor.yy0,yymsp[-1].minor.yy129);}
2537 #line 2537 "pikchr.c"
2538 break;
2539 case 11: /* statement ::= ASSERT LP position EQ position RP */
2540 #line 587 "pikchr.y"
2541 {yymsp[-5].minor.yy54=pik_position_assert(p,&yymsp[-3].minor.yy187,&yymsp[-2].minor.yy0,&yymsp[-1].minor.yy187);}
2542 #line 2542 "pikchr.c"
2543 break;
2544 case 12: /* statement ::= DEFINE ID CODEBLOCK */
2545 #line 588 "pikchr.y"
2546 {yymsp[-2].minor.yy54=0; pik_add_macro(p,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy0);}
2547 #line 2547 "pikchr.c"
2548 break;
2549 case 13: /* rvalue ::= PLACENAME */
2550 #line 599 "pikchr.y"
2551 {yylhsminor.yy129 = pik_lookup_color(p,&yymsp[0].minor.yy0);}
2552 #line 2552 "pikchr.c"
2553 yymsp[0].minor.yy129 = yylhsminor.yy129;
2554 break;
2555 case 14: /* pritem ::= FILL */
2556 case 15: /* pritem ::= COLOR */ yytestcase(yyruleno==15);
2557 case 16: /* pritem ::= THICKNESS */ yytestcase(yyruleno==16);
2558 #line 604 "pikchr.y"
2559 {pik_append_num(p,"",pik_value(p,yymsp[0].minor.yy0.z,yymsp[0].minor.yy0.n,0));}
2560 #line 2560 "pikchr.c"
2561 break;
2562 case 17: /* pritem ::= rvalue */
2563 #line 607 "pikchr.y"
2564 {pik_append_num(p,"",yymsp[0].minor.yy129);}
2565 #line 2565 "pikchr.c"
2566 break;
2567 case 18: /* pritem ::= STRING */
2568 #line 608 "pikchr.y"
2569 {pik_append_text(p,yymsp[0].minor.yy0.z+1,yymsp[0].minor.yy0.n-2,0);}
2570 #line 2570 "pikchr.c"
2571 break;
2572 case 19: /* prsep ::= COMMA */
2573 #line 609 "pikchr.y"
2574 {pik_append(p, " ", 1);}
2575 #line 2575 "pikchr.c"
2576 break;
2577 case 20: /* unnamed_statement ::= basetype attribute_list */
2578 #line 614 "pikchr.y"
2579 {yylhsminor.yy54 = yymsp[-1].minor.yy54; pik_after_adding_attributes(p,yylhsminor.yy54);}
2580 #line 2580 "pikchr.c"
2581 yymsp[-1].minor.yy54 = yylhsminor.yy54;
2582 break;
2583 case 21: /* basetype ::= CLASSNAME */
2584 #line 616 "pikchr.y"
2585 {yylhsminor.yy54 = pik_elem_new(p,&yymsp[0].minor.yy0,0,0); }
2586 #line 2586 "pikchr.c"
2587 yymsp[0].minor.yy54 = yylhsminor.yy54;
2588 break;
2589 case 22: /* basetype ::= STRING textposition */
2590 #line 618 "pikchr.y"
2591 {yymsp[-1].minor.yy0.eCode = yymsp[0].minor.yy272; yylhsminor.yy54 = pik_elem_new(p,0,&yymsp[-1].minor.yy0,0); }
2592 #line 2592 "pikchr.c"
2593 yymsp[-1].minor.yy54 = yylhsminor.yy54;
2594 break;
2595 case 23: /* basetype ::= LB savelist statement_list RB */
2596 #line 620 "pikchr.y"
2597 { p->list = yymsp[-2].minor.yy23; yymsp[-3].minor.yy54 = pik_elem_new(p,0,0,yymsp[-1].minor.yy23); if(yymsp[-3].minor.yy54) yymsp[-3].minor.yy54->errTok = yymsp[0].minor.yy0; }
2598 #line 2598 "pikchr.c"
2599 break;
2600 case 24: /* savelist ::= */
2601 #line 625 "pikchr.y"
2602 {yymsp[1].minor.yy23 = p->list; p->list = 0;}
2603 #line 2603 "pikchr.c"
2604 break;
2605 case 25: /* relexpr ::= expr */
2606 #line 632 "pikchr.y"
2607 {yylhsminor.yy28.rAbs = yymsp[0].minor.yy129; yylhsminor.yy28.rRel = 0;}
2608 #line 2608 "pikchr.c"
2609 yymsp[0].minor.yy28 = yylhsminor.yy28;
2610 break;
2611 case 26: /* relexpr ::= expr PERCENT */
2612 #line 633 "pikchr.y"
2613 {yylhsminor.yy28.rAbs = 0; yylhsminor.yy28.rRel = yymsp[-1].minor.yy129/100;}
2614 #line 2614 "pikchr.c"
2615 yymsp[-1].minor.yy28 = yylhsminor.yy28;
2616 break;
2617 case 27: /* optrelexpr ::= */
2618 #line 635 "pikchr.y"
2619 {yymsp[1].minor.yy28.rAbs = 0; yymsp[1].minor.yy28.rRel = 1.0;}
2620 #line 2620 "pikchr.c"
2621 break;
2622 case 28: /* attribute_list ::= relexpr alist */
2623 #line 637 "pikchr.y"
2624 {pik_add_direction(p,0,&yymsp[-1].minor.yy28);}
2625 #line 2625 "pikchr.c"
2626 break;
2627 case 29: /* attribute ::= numproperty relexpr */
2628 #line 641 "pikchr.y"
2629 { pik_set_numprop(p,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy28); }
2630 #line 2630 "pikchr.c"
2631 break;
2632 case 30: /* attribute ::= dashproperty expr */
2633 #line 642 "pikchr.y"
2634 { pik_set_dashed(p,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy129); }
2635 #line 2635 "pikchr.c"
2636 break;
2637 case 31: /* attribute ::= dashproperty */
2638 #line 643 "pikchr.y"
2639 { pik_set_dashed(p,&yymsp[0].minor.yy0,0); }
2640 #line 2640 "pikchr.c"
2641 break;
2642 case 32: /* attribute ::= colorproperty rvalue */
2643 #line 644 "pikchr.y"
2644 { pik_set_clrprop(p,&yymsp[-1].minor.yy0,yymsp[0].minor.yy129); }
2645 #line 2645 "pikchr.c"
2646 break;
2647 case 33: /* attribute ::= go direction optrelexpr */
2648 #line 645 "pikchr.y"
2649 { pik_add_direction(p,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy28);}
2650 #line 2650 "pikchr.c"
2651 break;
2652 case 34: /* attribute ::= go direction even position */
2653 #line 646 "pikchr.y"
2654 {pik_evenwith(p,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy187);}
2655 #line 2655 "pikchr.c"
2656 break;
2657 case 35: /* attribute ::= CLOSE */
2658 #line 647 "pikchr.y"
2659 { pik_close_path(p,&yymsp[0].minor.yy0); }
2660 #line 2660 "pikchr.c"
2661 break;
2662 case 36: /* attribute ::= CHOP */
2663 #line 648 "pikchr.y"
2664 { p->cur->bChop = 1; }
2665 #line 2665 "pikchr.c"
2666 break;
2667 case 37: /* attribute ::= FROM position */
2668 #line 649 "pikchr.y"
2669 { pik_set_from(p,p->cur,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy187); }
2670 #line 2670 "pikchr.c"
2671 break;
2672 case 38: /* attribute ::= TO position */
2673 #line 650 "pikchr.y"
2674 { pik_add_to(p,p->cur,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy187); }
2675 #line 2675 "pikchr.c"
2676 break;
2677 case 39: /* attribute ::= THEN */
2678 #line 651 "pikchr.y"
2679 { pik_then(p, &yymsp[0].minor.yy0, p->cur); }
2680 #line 2680 "pikchr.c"
2681 break;
2682 case 40: /* attribute ::= THEN optrelexpr HEADING expr */
2683 case 42: /* attribute ::= GO optrelexpr HEADING expr */ yytestcase(yyruleno==42);
2684 #line 653 "pikchr.y"
2685 {pik_move_hdg(p,&yymsp[-2].minor.yy28,&yymsp[-1].minor.yy0,yymsp[0].minor.yy129,0,&yymsp[-3].minor.yy0);}
2686 #line 2686 "pikchr.c"
2687 break;
2688 case 41: /* attribute ::= THEN optrelexpr EDGEPT */
2689 case 43: /* attribute ::= GO optrelexpr EDGEPT */ yytestcase(yyruleno==43);
2690 #line 654 "pikchr.y"
2691 {pik_move_hdg(p,&yymsp[-1].minor.yy28,0,0,&yymsp[0].minor.yy0,&yymsp[-2].minor.yy0);}
2692 #line 2692 "pikchr.c"
2693 break;
2694 case 44: /* attribute ::= AT position */
2695 #line 659 "pikchr.y"
2696 { pik_set_at(p,0,&yymsp[0].minor.yy187,&yymsp[-1].minor.yy0); }
2697 #line 2697 "pikchr.c"
2698 break;
2699 case 45: /* attribute ::= SAME */
2700 #line 661 "pikchr.y"
2701 {pik_same(p,0,&yymsp[0].minor.yy0);}
2702 #line 2702 "pikchr.c"
2703 break;
2704 case 46: /* attribute ::= SAME AS object */
2705 #line 662 "pikchr.y"
2706 {pik_same(p,yymsp[0].minor.yy54,&yymsp[-2].minor.yy0);}
2707 #line 2707 "pikchr.c"
2708 break;
2709 case 47: /* attribute ::= STRING textposition */
2710 #line 663 "pikchr.y"
2711 {pik_add_txt(p,&yymsp[-1].minor.yy0,yymsp[0].minor.yy272);}
2712 #line 2712 "pikchr.c"
2713 break;
2714 case 48: /* attribute ::= FIT */
2715 #line 664 "pikchr.y"
2716 {pik_size_to_fit(p,0,&yymsp[0].minor.yy0,3); }
2717 #line 2717 "pikchr.c"
2718 break;
2719 case 49: /* attribute ::= BEHIND object */
2720 #line 665 "pikchr.y"
2721 {pik_behind(p,yymsp[0].minor.yy54);}
2722 #line 2722 "pikchr.c"
2723 break;
2724 case 50: /* withclause ::= DOT_E edge AT position */
2725 case 51: /* withclause ::= edge AT position */ yytestcase(yyruleno==51);
2726 #line 673 "pikchr.y"
2727 { pik_set_at(p,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy187,&yymsp[-1].minor.yy0); }
2728 #line 2728 "pikchr.c"
2729 break;
2730 case 52: /* numproperty ::= HEIGHT|WIDTH|RADIUS|DIAMETER|THICKNESS */
2731 #line 677 "pikchr.y"
2732 {yylhsminor.yy0 = yymsp[0].minor.yy0;}
2733 #line 2733 "pikchr.c"
2734 yymsp[0].minor.yy0 = yylhsminor.yy0;
2735 break;
2736 case 53: /* boolproperty ::= CW */
2737 #line 688 "pikchr.y"
2738 {p->cur->cw = 1;}
2739 #line 2739 "pikchr.c"
2740 break;
2741 case 54: /* boolproperty ::= CCW */
2742 #line 689 "pikchr.y"
2743 {p->cur->cw = 0;}
2744 #line 2744 "pikchr.c"
2745 break;
2746 case 55: /* boolproperty ::= LARROW */
2747 #line 690 "pikchr.y"
2748 {p->cur->larrow=1; p->cur->rarrow=0; }
2749 #line 2749 "pikchr.c"
2750 break;
2751 case 56: /* boolproperty ::= RARROW */
2752 #line 691 "pikchr.y"
2753 {p->cur->larrow=0; p->cur->rarrow=1; }
2754 #line 2754 "pikchr.c"
2755 break;
2756 case 57: /* boolproperty ::= LRARROW */
2757 #line 692 "pikchr.y"
2758 {p->cur->larrow=1; p->cur->rarrow=1; }
2759 #line 2759 "pikchr.c"
2760 break;
2761 case 58: /* boolproperty ::= INVIS */
2762 #line 693 "pikchr.y"
2763 {p->cur->sw = -0.00001;}
2764 #line 2764 "pikchr.c"
2765 break;
2766 case 59: /* boolproperty ::= THICK */
2767 #line 694 "pikchr.y"
2768 {p->cur->sw *= 1.5;}
2769 #line 2769 "pikchr.c"
2770 break;
2771 case 60: /* boolproperty ::= THIN */
2772 #line 695 "pikchr.y"
2773 {p->cur->sw *= 0.67;}
2774 #line 2774 "pikchr.c"
2775 break;
2776 case 61: /* boolproperty ::= SOLID */
2777 #line 696 "pikchr.y"
2778 {p->cur->sw = pik_value(p,"thickness",9,0);
2779 p->cur->dotted = p->cur->dashed = 0.0;}
2780 #line 2780 "pikchr.c"
2781 break;
2782 case 62: /* textposition ::= */
2783 #line 699 "pikchr.y"
2784 {yymsp[1].minor.yy272 = 0;}
2785 #line 2785 "pikchr.c"
2786 break;
2787 case 63: /* textposition ::= textposition CENTER|LJUST|RJUST|ABOVE|BELOW|ITALIC|BOLD|MONO|ALIGNED|BIG|SMALL */
2788 #line 702 "pikchr.y"
2789 {yylhsminor.yy272 = (short int)pik_text_position(yymsp[-1].minor.yy272,&yymsp[0].minor.yy0);}
2790 #line 2790 "pikchr.c"
2791 yymsp[-1].minor.yy272 = yylhsminor.yy272;
2792 break;
2793 case 64: /* position ::= expr COMMA expr */
2794 #line 705 "pikchr.y"
2795 {yylhsminor.yy187.x=yymsp[-2].minor.yy129; yylhsminor.yy187.y=yymsp[0].minor.yy129;}
2796 #line 2796 "pikchr.c"
2797 yymsp[-2].minor.yy187 = yylhsminor.yy187;
2798 break;
2799 case 65: /* position ::= place PLUS expr COMMA expr */
2800 #line 707 "pikchr.y"
2801 {yylhsminor.yy187.x=yymsp[-4].minor.yy187.x+yymsp[-2].minor.yy129; yylhsminor.yy187.y=yymsp[-4].minor.yy187.y+yymsp[0].minor.yy129;}
2802 #line 2802 "pikchr.c"
2803 yymsp[-4].minor.yy187 = yylhsminor.yy187;
2804 break;
2805 case 66: /* position ::= place MINUS expr COMMA expr */
2806 #line 708 "pikchr.y"
2807 {yylhsminor.yy187.x=yymsp[-4].minor.yy187.x-yymsp[-2].minor.yy129; yylhsminor.yy187.y=yymsp[-4].minor.yy187.y-yymsp[0].minor.yy129;}
2808 #line 2808 "pikchr.c"
2809 yymsp[-4].minor.yy187 = yylhsminor.yy187;
2810 break;
2811 case 67: /* position ::= place PLUS LP expr COMMA expr RP */
2812 #line 710 "pikchr.y"
2813 {yylhsminor.yy187.x=yymsp[-6].minor.yy187.x+yymsp[-3].minor.yy129; yylhsminor.yy187.y=yymsp[-6].minor.yy187.y+yymsp[-1].minor.yy129;}
2814 #line 2814 "pikchr.c"
2815 yymsp[-6].minor.yy187 = yylhsminor.yy187;
2816 break;
2817 case 68: /* position ::= place MINUS LP expr COMMA expr RP */
2818 #line 712 "pikchr.y"
2819 {yylhsminor.yy187.x=yymsp[-6].minor.yy187.x-yymsp[-3].minor.yy129; yylhsminor.yy187.y=yymsp[-6].minor.yy187.y-yymsp[-1].minor.yy129;}
2820 #line 2820 "pikchr.c"
2821 yymsp[-6].minor.yy187 = yylhsminor.yy187;
2822 break;
2823 case 69: /* position ::= LP position COMMA position RP */
2824 #line 713 "pikchr.y"
2825 {yymsp[-4].minor.yy187.x=yymsp[-3].minor.yy187.x; yymsp[-4].minor.yy187.y=yymsp[-1].minor.yy187.y;}
2826 #line 2826 "pikchr.c"
2827 break;
2828 case 70: /* position ::= LP position RP */
2829 #line 714 "pikchr.y"
2830 {yymsp[-2].minor.yy187=yymsp[-1].minor.yy187;}
2831 #line 2831 "pikchr.c"
2832 break;
2833 case 71: /* position ::= expr between position AND position */
2834 #line 716 "pikchr.y"
2835 {yylhsminor.yy187 = pik_position_between(yymsp[-4].minor.yy129,yymsp[-2].minor.yy187,yymsp[0].minor.yy187);}
2836 #line 2836 "pikchr.c"
2837 yymsp[-4].minor.yy187 = yylhsminor.yy187;
2838 break;
2839 case 72: /* position ::= expr LT position COMMA position GT */
2840 #line 718 "pikchr.y"
2841 {yylhsminor.yy187 = pik_position_between(yymsp[-5].minor.yy129,yymsp[-3].minor.yy187,yymsp[-1].minor.yy187);}
2842 #line 2842 "pikchr.c"
2843 yymsp[-5].minor.yy187 = yylhsminor.yy187;
2844 break;
2845 case 73: /* position ::= expr ABOVE position */
2846 #line 719 "pikchr.y"
2847 {yylhsminor.yy187=yymsp[0].minor.yy187; yylhsminor.yy187.y += yymsp[-2].minor.yy129;}
2848 #line 2848 "pikchr.c"
2849 yymsp[-2].minor.yy187 = yylhsminor.yy187;
2850 break;
2851 case 74: /* position ::= expr BELOW position */
2852 #line 720 "pikchr.y"
2853 {yylhsminor.yy187=yymsp[0].minor.yy187; yylhsminor.yy187.y -= yymsp[-2].minor.yy129;}
2854 #line 2854 "pikchr.c"
2855 yymsp[-2].minor.yy187 = yylhsminor.yy187;
2856 break;
2857 case 75: /* position ::= expr LEFT OF position */
2858 #line 721 "pikchr.y"
2859 {yylhsminor.yy187=yymsp[0].minor.yy187; yylhsminor.yy187.x -= yymsp[-3].minor.yy129;}
2860 #line 2860 "pikchr.c"
2861 yymsp[-3].minor.yy187 = yylhsminor.yy187;
2862 break;
2863 case 76: /* position ::= expr RIGHT OF position */
2864 #line 722 "pikchr.y"
2865 {yylhsminor.yy187=yymsp[0].minor.yy187; yylhsminor.yy187.x += yymsp[-3].minor.yy129;}
2866 #line 2866 "pikchr.c"
2867 yymsp[-3].minor.yy187 = yylhsminor.yy187;
2868 break;
2869 case 77: /* position ::= expr ON HEADING EDGEPT OF position */
2870 #line 724 "pikchr.y"
2871 {yylhsminor.yy187 = pik_position_at_hdg(yymsp[-5].minor.yy129,&yymsp[-2].minor.yy0,yymsp[0].minor.yy187);}
2872 #line 2872 "pikchr.c"
2873 yymsp[-5].minor.yy187 = yylhsminor.yy187;
2874 break;
2875 case 78: /* position ::= expr HEADING EDGEPT OF position */
2876 #line 726 "pikchr.y"
2877 {yylhsminor.yy187 = pik_position_at_hdg(yymsp[-4].minor.yy129,&yymsp[-2].minor.yy0,yymsp[0].minor.yy187);}
2878 #line 2878 "pikchr.c"
2879 yymsp[-4].minor.yy187 = yylhsminor.yy187;
2880 break;
2881 case 79: /* position ::= expr EDGEPT OF position */
2882 #line 728 "pikchr.y"
2883 {yylhsminor.yy187 = pik_position_at_hdg(yymsp[-3].minor.yy129,&yymsp[-2].minor.yy0,yymsp[0].minor.yy187);}
2884 #line 2884 "pikchr.c"
2885 yymsp[-3].minor.yy187 = yylhsminor.yy187;
2886 break;
2887 case 80: /* position ::= expr ON HEADING expr FROM position */
2888 #line 730 "pikchr.y"
2889 {yylhsminor.yy187 = pik_position_at_angle(yymsp[-5].minor.yy129,yymsp[-2].minor.yy129,yymsp[0].minor.yy187);}
2890 #line 2890 "pikchr.c"
2891 yymsp[-5].minor.yy187 = yylhsminor.yy187;
2892 break;
2893 case 81: /* position ::= expr HEADING expr FROM position */
2894 #line 732 "pikchr.y"
2895 {yylhsminor.yy187 = pik_position_at_angle(yymsp[-4].minor.yy129,yymsp[-2].minor.yy129,yymsp[0].minor.yy187);}
2896 #line 2896 "pikchr.c"
2897 yymsp[-4].minor.yy187 = yylhsminor.yy187;
2898 break;
2899 case 82: /* place ::= edge OF object */
2900 #line 744 "pikchr.y"
2901 {yylhsminor.yy187 = pik_place_of_elem(p,yymsp[0].minor.yy54,&yymsp[-2].minor.yy0);}
2902 #line 2902 "pikchr.c"
2903 yymsp[-2].minor.yy187 = yylhsminor.yy187;
2904 break;
2905 case 83: /* place2 ::= object */
2906 #line 745 "pikchr.y"
2907 {yylhsminor.yy187 = pik_place_of_elem(p,yymsp[0].minor.yy54,0);}
2908 #line 2908 "pikchr.c"
2909 yymsp[0].minor.yy187 = yylhsminor.yy187;
2910 break;
2911 case 84: /* place2 ::= object DOT_E edge */
2912 #line 746 "pikchr.y"
2913 {yylhsminor.yy187 = pik_place_of_elem(p,yymsp[-2].minor.yy54,&yymsp[0].minor.yy0);}
2914 #line 2914 "pikchr.c"
2915 yymsp[-2].minor.yy187 = yylhsminor.yy187;
2916 break;
2917 case 85: /* place2 ::= NTH VERTEX OF object */
2918 #line 747 "pikchr.y"
2919 {yylhsminor.yy187 = pik_nth_vertex(p,&yymsp[-3].minor.yy0,&yymsp[-2].minor.yy0,yymsp[0].minor.yy54);}
2920 #line 2920 "pikchr.c"
2921 yymsp[-3].minor.yy187 = yylhsminor.yy187;
2922 break;
2923 case 86: /* object ::= nth */
2924 #line 759 "pikchr.y"
2925 {yylhsminor.yy54 = pik_find_nth(p,0,&yymsp[0].minor.yy0);}
2926 #line 2926 "pikchr.c"
2927 yymsp[0].minor.yy54 = yylhsminor.yy54;
2928 break;
2929 case 87: /* object ::= nth OF|IN object */
2930 #line 760 "pikchr.y"
2931 {yylhsminor.yy54 = pik_find_nth(p,yymsp[0].minor.yy54,&yymsp[-2].minor.yy0);}
2932 #line 2932 "pikchr.c"
2933 yymsp[-2].minor.yy54 = yylhsminor.yy54;
2934 break;
2935 case 88: /* objectname ::= THIS */
2936 #line 762 "pikchr.y"
2937 {yymsp[0].minor.yy54 = p->cur;}
2938 #line 2938 "pikchr.c"
2939 break;
2940 case 89: /* objectname ::= PLACENAME */
2941 #line 763 "pikchr.y"
2942 {yylhsminor.yy54 = pik_find_byname(p,0,&yymsp[0].minor.yy0);}
2943 #line 2943 "pikchr.c"
2944 yymsp[0].minor.yy54 = yylhsminor.yy54;
2945 break;
2946 case 90: /* objectname ::= objectname DOT_U PLACENAME */
2947 #line 765 "pikchr.y"
2948 {yylhsminor.yy54 = pik_find_byname(p,yymsp[-2].minor.yy54,&yymsp[0].minor.yy0);}
2949 #line 2949 "pikchr.c"
2950 yymsp[-2].minor.yy54 = yylhsminor.yy54;
2951 break;
2952 case 91: /* nth ::= NTH CLASSNAME */
2953 #line 767 "pikchr.y"
2954 {yylhsminor.yy0=yymsp[0].minor.yy0; yylhsminor.yy0.eCode = pik_nth_value(p,&yymsp[-1].minor.yy0); }
2955 #line 2955 "pikchr.c"
2956 yymsp[-1].minor.yy0 = yylhsminor.yy0;
2957 break;
2958 case 92: /* nth ::= NTH LAST CLASSNAME */
2959 #line 768 "pikchr.y"
2960 {yylhsminor.yy0=yymsp[0].minor.yy0; yylhsminor.yy0.eCode = -pik_nth_value(p,&yymsp[-2].minor.yy0); }
2961 #line 2961 "pikchr.c"
2962 yymsp[-2].minor.yy0 = yylhsminor.yy0;
2963 break;
2964 case 93: /* nth ::= LAST CLASSNAME */
2965 #line 769 "pikchr.y"
2966 {yymsp[-1].minor.yy0=yymsp[0].minor.yy0; yymsp[-1].minor.yy0.eCode = -1;}
2967 #line 2967 "pikchr.c"
2968 break;
2969 case 94: /* nth ::= LAST */
2970 #line 770 "pikchr.y"
2971 {yylhsminor.yy0=yymsp[0].minor.yy0; yylhsminor.yy0.eCode = -1;}
2972 #line 2972 "pikchr.c"
2973 yymsp[0].minor.yy0 = yylhsminor.yy0;
2974 break;
2975 case 95: /* nth ::= NTH LB RB */
2976 #line 771 "pikchr.y"
2977 {yylhsminor.yy0=yymsp[-1].minor.yy0; yylhsminor.yy0.eCode = pik_nth_value(p,&yymsp[-2].minor.yy0);}
2978 #line 2978 "pikchr.c"
2979 yymsp[-2].minor.yy0 = yylhsminor.yy0;
2980 break;
2981 case 96: /* nth ::= NTH LAST LB RB */
2982 #line 772 "pikchr.y"
2983 {yylhsminor.yy0=yymsp[-1].minor.yy0; yylhsminor.yy0.eCode = -pik_nth_value(p,&yymsp[-3].minor.yy0);}
2984 #line 2984 "pikchr.c"
2985 yymsp[-3].minor.yy0 = yylhsminor.yy0;
2986 break;
2987 case 97: /* nth ::= LAST LB RB */
2988 #line 773 "pikchr.y"
2989 {yymsp[-2].minor.yy0=yymsp[-1].minor.yy0; yymsp[-2].minor.yy0.eCode = -1; }
2990 #line 2990 "pikchr.c"
2991 break;
2992 case 98: /* expr ::= expr PLUS expr */
2993 #line 775 "pikchr.y"
2994 {yylhsminor.yy129=yymsp[-2].minor.yy129+yymsp[0].minor.yy129;}
2995 #line 2995 "pikchr.c"
2996 yymsp[-2].minor.yy129 = yylhsminor.yy129;
2997 break;
2998 case 99: /* expr ::= expr MINUS expr */
2999 #line 776 "pikchr.y"
3000 {yylhsminor.yy129=yymsp[-2].minor.yy129-yymsp[0].minor.yy129;}
3001 #line 3001 "pikchr.c"
3002 yymsp[-2].minor.yy129 = yylhsminor.yy129;
3003 break;
3004 case 100: /* expr ::= expr STAR expr */
3005 #line 777 "pikchr.y"
3006 {yylhsminor.yy129=yymsp[-2].minor.yy129*yymsp[0].minor.yy129;}
3007 #line 3007 "pikchr.c"
3008 yymsp[-2].minor.yy129 = yylhsminor.yy129;
3009 break;
3010 case 101: /* expr ::= expr SLASH expr */
3011 #line 778 "pikchr.y"
3012 {
3013 if( yymsp[0].minor.yy129==0.0 ){ pik_error(p, &yymsp[-1].minor.yy0, "division by zero"); yylhsminor.yy129 = 0.0; }
3014 else{ yylhsminor.yy129 = yymsp[-2].minor.yy129/yymsp[0].minor.yy129; }
3015 }
3016 #line 3016 "pikchr.c"
3017 yymsp[-2].minor.yy129 = yylhsminor.yy129;
3018 break;
3019 case 102: /* expr ::= MINUS expr */
3020 #line 782 "pikchr.y"
3021 {yymsp[-1].minor.yy129=-yymsp[0].minor.yy129;}
3022 #line 3022 "pikchr.c"
3023 break;
3024 case 103: /* expr ::= PLUS expr */
3025 #line 783 "pikchr.y"
3026 {yymsp[-1].minor.yy129=yymsp[0].minor.yy129;}
3027 #line 3027 "pikchr.c"
3028 break;
3029 case 104: /* expr ::= LP expr RP */
3030 #line 784 "pikchr.y"
3031 {yymsp[-2].minor.yy129=yymsp[-1].minor.yy129;}
3032 #line 3032 "pikchr.c"
3033 break;
3034 case 105: /* expr ::= LP FILL|COLOR|THICKNESS RP */
3035 #line 785 "pikchr.y"
3036 {yymsp[-2].minor.yy129=pik_get_var(p,&yymsp[-1].minor.yy0);}
3037 #line 3037 "pikchr.c"
3038 break;
3039 case 106: /* expr ::= NUMBER */
3040 #line 786 "pikchr.y"
3041 {yylhsminor.yy129=pik_atof(&yymsp[0].minor.yy0);}
3042 #line 3042 "pikchr.c"
3043 yymsp[0].minor.yy129 = yylhsminor.yy129;
3044 break;
3045 case 107: /* expr ::= ID */
3046 #line 787 "pikchr.y"
3047 {yylhsminor.yy129=pik_get_var(p,&yymsp[0].minor.yy0);}
3048 #line 3048 "pikchr.c"
3049 yymsp[0].minor.yy129 = yylhsminor.yy129;
3050 break;
3051 case 108: /* expr ::= FUNC1 LP expr RP */
3052 #line 788 "pikchr.y"
3053 {yylhsminor.yy129 = pik_func(p,&yymsp[-3].minor.yy0,yymsp[-1].minor.yy129,0.0);}
3054 #line 3054 "pikchr.c"
3055 yymsp[-3].minor.yy129 = yylhsminor.yy129;
3056 break;
3057 case 109: /* expr ::= FUNC2 LP expr COMMA expr RP */
3058 #line 789 "pikchr.y"
3059 {yylhsminor.yy129 = pik_func(p,&yymsp[-5].minor.yy0,yymsp[-3].minor.yy129,yymsp[-1].minor.yy129);}
3060 #line 3060 "pikchr.c"
3061 yymsp[-5].minor.yy129 = yylhsminor.yy129;
3062 break;
3063 case 110: /* expr ::= DIST LP position COMMA position RP */
3064 #line 790 "pikchr.y"
3065 {yymsp[-5].minor.yy129 = pik_dist(&yymsp[-3].minor.yy187,&yymsp[-1].minor.yy187);}
3066 #line 3066 "pikchr.c"
3067 break;
3068 case 111: /* expr ::= place2 DOT_XY X */
3069 #line 791 "pikchr.y"
3070 {yylhsminor.yy129 = yymsp[-2].minor.yy187.x;}
3071 #line 3071 "pikchr.c"
3072 yymsp[-2].minor.yy129 = yylhsminor.yy129;
3073 break;
3074 case 112: /* expr ::= place2 DOT_XY Y */
3075 #line 792 "pikchr.y"
3076 {yylhsminor.yy129 = yymsp[-2].minor.yy187.y;}
3077 #line 3077 "pikchr.c"
3078 yymsp[-2].minor.yy129 = yylhsminor.yy129;
3079 break;
3080 case 113: /* expr ::= object DOT_L numproperty */
3081 case 114: /* expr ::= object DOT_L dashproperty */ yytestcase(yyruleno==114);
3082 case 115: /* expr ::= object DOT_L colorproperty */ yytestcase(yyruleno==115);
3083 #line 793 "pikchr.y"
3084 {yylhsminor.yy129=pik_property_of(yymsp[-2].minor.yy54,&yymsp[0].minor.yy0);}
3085 #line 3085 "pikchr.c"
3086 yymsp[-2].minor.yy129 = yylhsminor.yy129;
3087 break;
3088 default:
3089 /* (116) lvalue ::= ID */ yytestcase(yyruleno==116);
3090 /* (117) lvalue ::= FILL */ yytestcase(yyruleno==117);
3091 /* (118) lvalue ::= COLOR */ yytestcase(yyruleno==118);
@@ -3142,19 +3183,19 @@
3183 ){
3184 pik_parserARG_FETCH
3185 pik_parserCTX_FETCH
3186 #define TOKEN yyminor
3187 /************ Begin %syntax_error code ****************************************/
3188 #line 551 "pikchr.y"
3189
3190 if( TOKEN.z && TOKEN.z[0] ){
3191 pik_error(p, &TOKEN, "syntax error");
3192 }else{
3193 pik_error(p, 0, "syntax error");
3194 }
3195 UNUSED_PARAMETER(yymajor);
3196 #line 3196 "pikchr.c"
3197 /************ End %syntax_error code ******************************************/
3198 pik_parserARG_STORE /* Suppress warning about unused %extra_argument variable */
3199 pik_parserCTX_STORE
3200 }
3201
@@ -3419,11 +3460,11 @@
3460 #else
3461 (void)iToken;
3462 return 0;
3463 #endif
3464 }
3465 #line 798 "pikchr.y"
3466
3467
3468
3469 /* Chart of the 148 official CSS color names with their
3470 ** corresponding RGB values thru Color Module Level 4:
@@ -7246,11 +7287,12 @@
7287 pik_append_num(p, " width=\"", p->wSVG);
7288 pik_append_num(p, "\" height=\"", p->hSVG);
7289 pik_append(p, "\"", 1);
7290 }
7291 pik_append_dis(p, " viewBox=\"0 0 ",w,"");
7292 pik_append_dis(p, " ",h,"\"");
7293 pik_append(p, " data-pikchr-date=\"" MANIFEST_ISODATE "\">\n", -1);
7294 pik_elist_render(p, pList);
7295 pik_append(p,"</svg>\n", -1);
7296 }else{
7297 p->wSVG = -1;
7298 p->hSVG = -1;
@@ -7330,10 +7372,11 @@
7372 { "n", 1, T_EDGEPT, 0, CP_N },
7373 { "ne", 2, T_EDGEPT, 0, CP_NE },
7374 { "north", 5, T_EDGEPT, 0, CP_N },
7375 { "nw", 2, T_EDGEPT, 0, CP_NW },
7376 { "of", 2, T_OF, 0, 0 },
7377 { "pikchr_date",11, T_ISODATE, 0, 0, },
7378 { "previous", 8, T_LAST, 0, 0, },
7379 { "print", 5, T_PRINT, 0, 0 },
7380 { "rad", 3, T_RADIUS, 0, 0 },
7381 { "radius", 6, T_RADIUS, 0, 0 },
7382 { "right", 5, T_RIGHT, DIR_RIGHT, CP_E },
@@ -7913,15 +7956,30 @@
7956 #endif
7957 token.n = (unsigned short)(sz & 0xffff);
7958 if( p->nToken++ > PIKCHR_TOKEN_LIMIT ){
7959 pik_error(p, &token, "script is too complex");
7960 break;
7961 }
7962 if( token.eType==T_ISODATE ){
7963 token.z = "\"" MANIFEST_ISODATE "\"";
7964 token.n = sizeof(MANIFEST_ISODATE)+1;
7965 token.eType = T_STRING;
7966 }
7967 pik_parser(pParser, token.eType, token);
7968 }
7969 }
7970 }
7971
7972 /*
7973 ** Return the version name.
7974 */
7975 const char *pikchr_version(void)
7976 /* Emscripten workaround, else it chokes on the inlined version */;
7977
7978 const char *pikchr_version(void){
7979 return RELEASE_VERSION " " MANIFEST_ISODATE;
7980 }
7981
7982 /*
7983 ** Parse the PIKCHR script contained in zText[]. Return a rendering. Or
7984 ** if an error is encountered, return the error text. The error message
7985 ** is HTML formatted. So regardless of what happens, the return text
@@ -8141,10 +8199,14 @@
8199 exit(1);
8200 }
8201 bSvgOnly = 1;
8202 mFlags |= PIKCHR_PLAINTEXT_ERRORS;
8203 }else
8204 if( strcmp(z,"version")==0 || strcmp(z,"v")==0 ){
8205 printf("pikchr %s\n", pikchr_version());
8206 return 0;
8207 }else
8208 {
8209 fprintf(stderr,"unknown option: \"%s\"\n", argv[i]);
8210 usage(argv[0]);
8211 }
8212 continue;
@@ -8253,6 +8315,6 @@
8315
8316
8317 #endif /* PIKCHR_TCL */
8318
8319
8320 #line 8320 "pikchr.c"
8321
+10 -6
--- extsrc/pikchr.js
+++ extsrc/pikchr.js
@@ -300,11 +300,11 @@
300300
301301
// end include: URIUtils.js
302302
// include: runtime_exceptions.js
303303
// end include: runtime_exceptions.js
304304
function findWasmBinary() {
305
- var f = "pikchr.wasm";
305
+ var f = "pikchr-v7583078860.wasm";
306306
if (!isDataURI(f)) {
307307
return locateFile(f);
308308
}
309309
return f;
310310
}
@@ -785,25 +785,29 @@
785785
786786
var wasmExports = createWasm();
787787
788788
var ___wasm_call_ctors = () => (___wasm_call_ctors = wasmExports["e"])();
789789
790
-var _pikchr = Module["_pikchr"] = (a0, a1, a2, a3, a4) => (_pikchr = Module["_pikchr"] = wasmExports["g"])(a0, a1, a2, a3, a4);
790
+var _pikchr_version = Module["_pikchr_version"] = () => (_pikchr_version = Module["_pikchr_version"] = wasmExports["g"])();
791
+
792
+var _pikchr = Module["_pikchr"] = (a0, a1, a2, a3, a4) => (_pikchr = Module["_pikchr"] = wasmExports["h"])(a0, a1, a2, a3, a4);
793
+
794
+var __emscripten_stack_restore = a0 => (__emscripten_stack_restore = wasmExports["i"])(a0);
791795
792
-var __emscripten_stack_restore = a0 => (__emscripten_stack_restore = wasmExports["h"])(a0);
796
+var __emscripten_stack_alloc = a0 => (__emscripten_stack_alloc = wasmExports["j"])(a0);
793797
794
-var __emscripten_stack_alloc = a0 => (__emscripten_stack_alloc = wasmExports["i"])(a0);
795
-
796
-var _emscripten_stack_get_current = () => (_emscripten_stack_get_current = wasmExports["j"])();
798
+var _emscripten_stack_get_current = () => (_emscripten_stack_get_current = wasmExports["k"])();
797799
798800
// include: postamble.js
799801
// === Auto-generated postamble setup entry stuff ===
800802
Module["stackSave"] = stackSave;
801803
802804
Module["stackRestore"] = stackRestore;
803805
804806
Module["stackAlloc"] = stackAlloc;
807
+
808
+Module["ccall"] = ccall;
805809
806810
Module["cwrap"] = cwrap;
807811
808812
Module["setValue"] = setValue;
809813
810814
--- extsrc/pikchr.js
+++ extsrc/pikchr.js
@@ -300,11 +300,11 @@
300
301 // end include: URIUtils.js
302 // include: runtime_exceptions.js
303 // end include: runtime_exceptions.js
304 function findWasmBinary() {
305 var f = "pikchr.wasm";
306 if (!isDataURI(f)) {
307 return locateFile(f);
308 }
309 return f;
310 }
@@ -785,25 +785,29 @@
785
786 var wasmExports = createWasm();
787
788 var ___wasm_call_ctors = () => (___wasm_call_ctors = wasmExports["e"])();
789
790 var _pikchr = Module["_pikchr"] = (a0, a1, a2, a3, a4) => (_pikchr = Module["_pikchr"] = wasmExports["g"])(a0, a1, a2, a3, a4);
 
 
 
 
791
792 var __emscripten_stack_restore = a0 => (__emscripten_stack_restore = wasmExports["h"])(a0);
793
794 var __emscripten_stack_alloc = a0 => (__emscripten_stack_alloc = wasmExports["i"])(a0);
795
796 var _emscripten_stack_get_current = () => (_emscripten_stack_get_current = wasmExports["j"])();
797
798 // include: postamble.js
799 // === Auto-generated postamble setup entry stuff ===
800 Module["stackSave"] = stackSave;
801
802 Module["stackRestore"] = stackRestore;
803
804 Module["stackAlloc"] = stackAlloc;
 
 
805
806 Module["cwrap"] = cwrap;
807
808 Module["setValue"] = setValue;
809
810
--- extsrc/pikchr.js
+++ extsrc/pikchr.js
@@ -300,11 +300,11 @@
300
301 // end include: URIUtils.js
302 // include: runtime_exceptions.js
303 // end include: runtime_exceptions.js
304 function findWasmBinary() {
305 var f = "pikchr-v7583078860.wasm";
306 if (!isDataURI(f)) {
307 return locateFile(f);
308 }
309 return f;
310 }
@@ -785,25 +785,29 @@
785
786 var wasmExports = createWasm();
787
788 var ___wasm_call_ctors = () => (___wasm_call_ctors = wasmExports["e"])();
789
790 var _pikchr_version = Module["_pikchr_version"] = () => (_pikchr_version = Module["_pikchr_version"] = wasmExports["g"])();
791
792 var _pikchr = Module["_pikchr"] = (a0, a1, a2, a3, a4) => (_pikchr = Module["_pikchr"] = wasmExports["h"])(a0, a1, a2, a3, a4);
793
794 var __emscripten_stack_restore = a0 => (__emscripten_stack_restore = wasmExports["i"])(a0);
795
796 var __emscripten_stack_alloc = a0 => (__emscripten_stack_alloc = wasmExports["j"])(a0);
797
798 var _emscripten_stack_get_current = () => (_emscripten_stack_get_current = wasmExports["k"])();
 
 
799
800 // include: postamble.js
801 // === Auto-generated postamble setup entry stuff ===
802 Module["stackSave"] = stackSave;
803
804 Module["stackRestore"] = stackRestore;
805
806 Module["stackAlloc"] = stackAlloc;
807
808 Module["ccall"] = ccall;
809
810 Module["cwrap"] = cwrap;
811
812 Module["setValue"] = setValue;
813
814
--- extsrc/pikchr.wasm
+++ extsrc/pikchr.wasm
cannot compute difference between binary files
11
--- extsrc/pikchr.wasm
+++ extsrc/pikchr.wasm
0 annot compute difference between binary files
1
--- extsrc/pikchr.wasm
+++ extsrc/pikchr.wasm
0 annot compute difference between binary files
1
+81 -37
--- extsrc/shell.c
+++ extsrc/shell.c
@@ -234,10 +234,12 @@
234234
235235
/* ctype macros that work with signed characters */
236236
#define IsSpace(X) isspace((unsigned char)X)
237237
#define IsDigit(X) isdigit((unsigned char)X)
238238
#define ToLower(X) (char)tolower((unsigned char)X)
239
+#define IsAlnum(X) isalnum((unsigned char)X)
240
+#define IsAlpha(X) isalpha((unsigned char)X)
239241
240242
#if defined(_WIN32) || defined(WIN32)
241243
#if SQLITE_OS_WINRT
242244
#include <intrin.h>
243245
#endif
@@ -1506,13 +1508,13 @@
15061508
** Return '"' if quoting is required. Return 0 if no quoting is required.
15071509
*/
15081510
static char quoteChar(const char *zName){
15091511
int i;
15101512
if( zName==0 ) return '"';
1511
- if( !isalpha((unsigned char)zName[0]) && zName[0]!='_' ) return '"';
1513
+ if( !IsAlpha(zName[0]) && zName[0]!='_' ) return '"';
15121514
for(i=0; zName[i]; i++){
1513
- if( !isalnum((unsigned char)zName[i]) && zName[i]!='_' ) return '"';
1515
+ if( !IsAlnum(zName[i]) && zName[i]!='_' ) return '"';
15141516
}
15151517
return sqlite3_keyword_check(zName, i) ? '"' : 0;
15161518
}
15171519
15181520
/*
@@ -2425,11 +2427,11 @@
24252427
** content in cases where the content starts
24262428
** with a digit.
24272429
**
24282430
** typeof(Y)='blob' The hash is taken over prefix "Bnnn:" followed
24292431
** by the binary content of the blob. The "nnn"
2430
-** in the prefix is the mimimum-length decimal
2432
+** in the prefix is the minimum-length decimal
24312433
** representation of the byte-length of the blob.
24322434
**
24332435
** According to the rules above, all of the following SELECT statements
24342436
** should return TRUE:
24352437
**
@@ -3646,11 +3648,11 @@
36463648
**
36473649
** UINT works like BINARY for text, except that embedded strings
36483650
** of digits compare in numeric order.
36493651
**
36503652
** * Leading zeros are handled properly, in the sense that
3651
-** they do not mess of the maginitude comparison of embedded
3653
+** they do not mess of the magnitude comparison of embedded
36523654
** strings of digits. "x00123y" is equal to "x123y".
36533655
**
36543656
** * Only unsigned integers are recognized. Plus and minus
36553657
** signs are ignored. Decimal points and exponential notation
36563658
** are ignored.
@@ -3752,10 +3754,13 @@
37523754
** warnings. */
37533755
#ifndef UNUSED_PARAMETER
37543756
# define UNUSED_PARAMETER(X) (void)(X)
37553757
#endif
37563758
3759
+#ifndef IsSpace
3760
+#define IsSpace(X) isspace((unsigned char)X)
3761
+#endif
37573762
37583763
/* A decimal object */
37593764
typedef struct Decimal Decimal;
37603765
struct Decimal {
37613766
char sign; /* 0 for positive, 1 for negative */
@@ -3801,11 +3806,11 @@
38013806
p->isNull = 0;
38023807
p->nDigit = 0;
38033808
p->nFrac = 0;
38043809
p->a = sqlite3_malloc64( n+1 );
38053810
if( p->a==0 ) goto new_from_text_failed;
3806
- for(i=0; isspace(zIn[i]); i++){}
3811
+ for(i=0; IsSpace(zIn[i]); i++){}
38073812
if( zIn[i]=='-' ){
38083813
p->sign = 1;
38093814
i++;
38103815
}else if( zIn[i]=='+' ){
38113816
i++;
@@ -4456,11 +4461,11 @@
44564461
}
44574462
decimal_free(pA);
44584463
decimal_free(pB);
44594464
}
44604465
4461
-/* Aggregate funcion: decimal_sum(X)
4466
+/* Aggregate function: decimal_sum(X)
44624467
**
44634468
** Works like sum() except that it uses decimal arithmetic for unlimited
44644469
** precision.
44654470
*/
44664471
static void decimalSumStep(
@@ -4817,11 +4822,11 @@
48174822
}
48184823
48194824
/*
48204825
** Generate an error for a percentile function.
48214826
**
4822
-** The error format string must have exactly one occurrance of "%%s()"
4827
+** The error format string must have exactly one occurrence of "%%s()"
48234828
** (with two '%' characters). That substring will be replaced by the name
48244829
** of the function.
48254830
*/
48264831
static void percentError(sqlite3_context *pCtx, const char *zFormat, ...){
48274832
PercentileFunc *pFunc = (PercentileFunc*)sqlite3_user_data(pCtx);
@@ -5957,11 +5962,11 @@
59575962
** number format:
59585963
**
59595964
** WITH c(name,bin) AS (VALUES
59605965
** ('minimum positive value', x'0000000000000001'),
59615966
** ('maximum subnormal value', x'000fffffffffffff'),
5962
-** ('mininum positive nornal value', x'0010000000000000'),
5967
+** ('minimum positive normal value', x'0010000000000000'),
59635968
** ('maximum value', x'7fefffffffffffff'))
59645969
** SELECT c.name, decimal_mul(ieee754_mantissa(c.bin),pow2.v)
59655970
** FROM pow2, c WHERE pow2.x=ieee754_exponent(c.bin);
59665971
**
59675972
*/
@@ -6344,11 +6349,11 @@
63446349
* 2 for UBSAN's satisfaction (and hypothetical 1's complement ALUs.) */
63456350
smBase += (mxI64/2) * smStep;
63466351
smBase += (mxI64 - mxI64/2) * smStep;
63476352
}
63486353
/* Under UBSAN (or on 1's complement machines), must do this last term
6349
- * in steps to avoid the dreaded (and harmless) signed multiply overlow. */
6354
+ * in steps to avoid the dreaded (and harmless) signed multiply overflow. */
63506355
if( ix>=2 ){
63516356
sqlite3_int64 ix2 = (sqlite3_int64)ix/2;
63526357
smBase += ix2*smStep;
63536358
ix -= ix2;
63546359
}
@@ -9024,10 +9029,15 @@
90249029
#include <assert.h>
90259030
#include <string.h>
90269031
#include <ctype.h>
90279032
90289033
#ifndef SQLITE_OMIT_VIRTUALTABLE
9034
+
9035
+#ifndef IsAlnum
9036
+#define IsAlnum(X) isalnum((unsigned char)X)
9037
+#endif
9038
+
90299039
90309040
/* completion_vtab is a subclass of sqlite3_vtab which will
90319041
** serve as the underlying representation of a completion virtual table
90329042
*/
90339043
typedef struct completion_vtab completion_vtab;
@@ -9361,11 +9371,11 @@
93619371
if( pCur->zLine==0 ) return SQLITE_NOMEM;
93629372
}
93639373
}
93649374
if( pCur->zLine!=0 && pCur->zPrefix==0 ){
93659375
int i = pCur->nLine;
9366
- while( i>0 && (isalnum(pCur->zLine[i-1]) || pCur->zLine[i-1]=='_') ){
9376
+ while( i>0 && (IsAlnum(pCur->zLine[i-1]) || pCur->zLine[i-1]=='_') ){
93679377
i--;
93689378
}
93699379
pCur->nPrefix = pCur->nLine - i;
93709380
if( pCur->nPrefix>0 ){
93719381
pCur->zPrefix = sqlite3_mprintf("%.*s", pCur->nPrefix, pCur->zLine + i);
@@ -14768,11 +14778,11 @@
1476814778
/* Register the auth callback with dbv */
1476914779
if( rc==SQLITE_OK ){
1477014780
sqlite3_set_authorizer(pNew->dbv, idxAuthCallback, (void*)pNew);
1477114781
}
1477214782
14773
- /* If an error has occurred, free the new object and reutrn NULL. Otherwise,
14783
+ /* If an error has occurred, free the new object and return NULL. Otherwise,
1477414784
** return the new sqlite3expert handle. */
1477514785
if( rc!=SQLITE_OK ){
1477614786
sqlite3_expert_destroy(pNew);
1477714787
pNew = 0;
1477814788
}
@@ -16290,11 +16300,11 @@
1629016300
**
1629116301
** PRAGMA vfstrace('+all');
1629216302
**
1629316303
** Individual APIs can be enabled or disabled by name, with or without
1629416304
** the initial "x" character. For example, to set up for tracing lock
16295
-** primatives only:
16305
+** primitives only:
1629616306
**
1629716307
** PRAGMA vfstrace('-all, +Lock,Unlock,ShmLock');
1629816308
**
1629916309
** The argument to the vfstrace pragma ignores capitalization and any
1630016310
** characters other than alphabetics, '+', and '-'.
@@ -21241,41 +21251,57 @@
2124121251
** function is called.
2124221252
*/
2124321253
static void recoverStep(sqlite3_recover *p){
2124421254
assert( p && p->errCode==SQLITE_OK );
2124521255
switch( p->eState ){
21246
- case RECOVER_STATE_INIT:
21256
+ case RECOVER_STATE_INIT: {
21257
+ int bUseWrapper = 1;
2124721258
/* This is the very first call to sqlite3_recover_step() on this object.
2124821259
*/
2124921260
recoverSqlCallback(p, "BEGIN");
2125021261
recoverSqlCallback(p, "PRAGMA writable_schema = on");
21262
+ recoverSqlCallback(p, "PRAGMA foreign_keys = off");
2125121263
2125221264
recoverEnterMutex();
21253
- recoverInstallWrapper(p);
2125421265
2125521266
/* Open the output database. And register required virtual tables and
2125621267
** user functions with the new handle. */
2125721268
recoverOpenOutput(p);
2125821269
21259
- /* Open transactions on both the input and output databases. */
21260
- sqlite3_file_control(p->dbIn, p->zDb, SQLITE_FCNTL_RESET_CACHE, 0);
21261
- recoverExec(p, p->dbIn, "PRAGMA writable_schema = on");
21262
- recoverExec(p, p->dbIn, "BEGIN");
21263
- if( p->errCode==SQLITE_OK ) p->bCloseTransaction = 1;
21264
- recoverExec(p, p->dbIn, "SELECT 1 FROM sqlite_schema");
21265
- recoverTransferSettings(p);
21266
- recoverOpenRecovery(p);
21267
- recoverCacheSchema(p);
21268
-
21269
- recoverUninstallWrapper(p);
21270
+ /* Attempt to open a transaction and read page 1 of the input database.
21271
+ ** Two attempts may be made - one with a wrapper installed to ensure
21272
+ ** that the database header is sane, and then if that attempt returns
21273
+ ** SQLITE_NOTADB, then again with no wrapper. The second attempt is
21274
+ ** required for encrypted databases. */
21275
+ if( p->errCode==SQLITE_OK ){
21276
+ do{
21277
+ p->errCode = SQLITE_OK;
21278
+ if( bUseWrapper ) recoverInstallWrapper(p);
21279
+
21280
+ /* Open a transaction on the input database. */
21281
+ sqlite3_file_control(p->dbIn, p->zDb, SQLITE_FCNTL_RESET_CACHE, 0);
21282
+ recoverExec(p, p->dbIn, "PRAGMA writable_schema = on");
21283
+ recoverExec(p, p->dbIn, "BEGIN");
21284
+ if( p->errCode==SQLITE_OK ) p->bCloseTransaction = 1;
21285
+ recoverExec(p, p->dbIn, "SELECT 1 FROM sqlite_schema");
21286
+ recoverTransferSettings(p);
21287
+ recoverOpenRecovery(p);
21288
+ recoverCacheSchema(p);
21289
+
21290
+ if( bUseWrapper ) recoverUninstallWrapper(p);
21291
+ }while( p->errCode==SQLITE_NOTADB
21292
+ && (bUseWrapper--)
21293
+ && SQLITE_OK==sqlite3_exec(p->dbIn, "ROLLBACK", 0, 0, 0)
21294
+ );
21295
+ }
21296
+
2127021297
recoverLeaveMutex();
21271
-
2127221298
recoverExec(p, p->dbOut, "BEGIN");
21273
-
2127421299
recoverWriteSchema1(p);
2127521300
p->eState = RECOVER_STATE_WRITING;
2127621301
break;
21302
+ }
2127721303
2127821304
case RECOVER_STATE_WRITING: {
2127921305
if( p->w1.pTbls==0 ){
2128021306
recoverWriteDataInit(p);
2128121307
}
@@ -21711,17 +21737,18 @@
2171121737
#define SHELL_PROGRESS_RESET 0x02 /* Reset the count when the progress
2171221738
** callback limit is reached, and for each
2171321739
** top-level SQL statement */
2171421740
#define SHELL_PROGRESS_ONCE 0x04 /* Cancel the --limit after firing once */
2171521741
21716
-/* Allowed values for ShellState.eEscMode
21742
+/* Allowed values for ShellState.eEscMode. The default value should
21743
+** be 0, so to change the default, reorder the names.
2171721744
*/
21718
-#define SHELL_ESC_SYMBOL 0 /* Substitute U+2400 graphics */
21719
-#define SHELL_ESC_ASCII 1 /* Substitute ^Y for X where Y=X+0x40 */
21745
+#define SHELL_ESC_ASCII 0 /* Substitute ^Y for X where Y=X+0x40 */
21746
+#define SHELL_ESC_SYMBOL 1 /* Substitute U+2400 graphics */
2172021747
#define SHELL_ESC_OFF 2 /* Send characters verbatim */
2172121748
21722
-static const char *shell_EscModeNames[] = { "symbol", "ascii", "off" };
21749
+static const char *shell_EscModeNames[] = { "ascii", "symbol", "off" };
2172321750
2172421751
/*
2172521752
** These are the allowed shellFlgs values
2172621753
*/
2172721754
#define SHFLG_Pagecache 0x00000001 /* The --pagecache option is used */
@@ -22902,18 +22929,22 @@
2290222929
int j;
2290322930
int nParen = 0;
2290422931
char cEnd = 0;
2290522932
char c;
2290622933
int nLine = 0;
22934
+ int isIndex;
22935
+ int isWhere = 0;
2290722936
assert( nArg==1 );
2290822937
if( azArg[0]==0 ) break;
2290922938
if( sqlite3_strlike("CREATE VIEW%", azArg[0], 0)==0
2291022939
|| sqlite3_strlike("CREATE TRIG%", azArg[0], 0)==0
2291122940
){
2291222941
sqlite3_fprintf(p->out, "%s;\n", azArg[0]);
2291322942
break;
2291422943
}
22944
+ isIndex = sqlite3_strlike("CREATE INDEX%", azArg[0], 0)==0
22945
+ || sqlite3_strlike("CREATE UNIQUE INDEX%", azArg[0], 0)==0;
2291522946
z = sqlite3_mprintf("%s", azArg[0]);
2291622947
shell_check_oom(z);
2291722948
j = 0;
2291822949
for(i=0; IsSpace(z[i]); i++){}
2291922950
for(; (c = z[i])!=0; i++){
@@ -22939,18 +22970,30 @@
2293922970
cEnd = '\n';
2294022971
}else if( c=='(' ){
2294122972
nParen++;
2294222973
}else if( c==')' ){
2294322974
nParen--;
22944
- if( nLine>0 && nParen==0 && j>0 ){
22975
+ if( nLine>0 && nParen==0 && j>0 && !isWhere ){
2294522976
printSchemaLineN(p->out, z, j, "\n");
2294622977
j = 0;
2294722978
}
22979
+ }else if( (c=='w' || c=='W')
22980
+ && nParen==0 && isIndex
22981
+ && sqlite3_strnicmp("WHERE",&z[i],5)==0
22982
+ && !IsAlnum(z[i+5]) && z[i+5]!='_' ){
22983
+ isWhere = 1;
22984
+ }else if( isWhere && (c=='A' || c=='a')
22985
+ && nParen==0
22986
+ && sqlite3_strnicmp("AND",&z[i],3)==0
22987
+ && !IsAlnum(z[i+3]) && z[i+3]!='_' ){
22988
+ printSchemaLineN(p->out, z, j, "\n ");
22989
+ j = 0;
2294822990
}
2294922991
z[j++] = c;
2295022992
if( nParen==1 && cEnd==0
2295122993
&& (c=='(' || c=='\n' || (c==',' && !wsToEol(z+i+1)))
22994
+ && !isWhere
2295222995
){
2295322996
if( c=='\n' ) j--;
2295422997
printSchemaLineN(p->out, z, j, "\n ");
2295522998
j = 0;
2295622999
nLine++;
@@ -24150,15 +24193,15 @@
2415024193
i++;
2415124194
}
2415224195
if( n>=mxWidth && bWordWrap ){
2415324196
/* Perhaps try to back up to a better place to break the line */
2415424197
for(k=i; k>i/2; k--){
24155
- if( isspace(z[k-1]) ) break;
24198
+ if( IsSpace(z[k-1]) ) break;
2415624199
}
2415724200
if( k<=i/2 ){
2415824201
for(k=i; k>i/2; k--){
24159
- if( isalnum(z[k-1])!=isalnum(z[k]) && (z[k]&0xc0)!=0x80 ) break;
24202
+ if( IsAlnum(z[k-1])!=IsAlnum(z[k]) && (z[k]&0xc0)!=0x80 ) break;
2416024203
}
2416124204
}
2416224205
if( k<=i/2 ){
2416324206
k = i;
2416424207
}else{
@@ -26088,11 +26131,11 @@
2608826131
#if HAVE_LINENOISE==2
2608926132
UNUSED_PARAMETER(pUserData);
2609026133
#endif
2609126134
if( nLine>(i64)sizeof(zBuf)-30 ) return;
2609226135
if( zLine[0]=='.' || zLine[0]=='#') return;
26093
- for(i=nLine-1; i>=0 && (isalnum(zLine[i]) || zLine[i]=='_'); i--){}
26136
+ for(i=nLine-1; i>=0 && (IsAlnum(zLine[i]) || zLine[i]=='_'); i--){}
2609426137
if( i==nLine-1 ) return;
2609526138
iStart = i+1;
2609626139
memcpy(zBuf, zLine, iStart);
2609726140
zSql = sqlite3_mprintf("SELECT DISTINCT candidate COLLATE nocase"
2609826141
" FROM completion(%Q,%Q) ORDER BY 1",
@@ -28328,10 +28371,11 @@
2832828371
sqlite3_recover_config(p, 789, (void*)zRecoveryDb); /* Debug use only */
2832928372
sqlite3_recover_config(p, SQLITE_RECOVER_LOST_AND_FOUND, (void*)zLAF);
2833028373
sqlite3_recover_config(p, SQLITE_RECOVER_ROWIDS, (void*)&bRowids);
2833128374
sqlite3_recover_config(p, SQLITE_RECOVER_FREELIST_CORRUPT,(void*)&bFreelist);
2833228375
28376
+ sqlite3_fprintf(pState->out, ".dbconfig defensive off\n");
2833328377
sqlite3_recover_run(p);
2833428378
if( sqlite3_recover_errcode(p)!=SQLITE_OK ){
2833528379
const char *zErr = sqlite3_recover_errmsg(p);
2833628380
int errCode = sqlite3_recover_errcode(p);
2833728381
sqlite3_fprintf(stderr,"sql error: %s (%d)\n", zErr, errCode);
@@ -32419,11 +32463,11 @@
3241932463
/*
3242032464
** The CLI needs a working sqlite3_complete() to work properly. So error
3242132465
** out of the build if compiling with SQLITE_OMIT_COMPLETE.
3242232466
*/
3242332467
#ifdef SQLITE_OMIT_COMPLETE
32424
-# error the CLI application is imcompatable with SQLITE_OMIT_COMPLETE.
32468
+# error the CLI application is incompatable with SQLITE_OMIT_COMPLETE.
3242532469
#endif
3242632470
3242732471
/*
3242832472
** Return true if zSql is a complete SQL statement. Return false if it
3242932473
** ends in the middle of a string literal or C-style comment.
@@ -32598,11 +32642,11 @@
3259832642
UNUSED_PARAMETER(in);
3259932643
UNUSED_PARAMETER(isContinuation);
3260032644
if(!z || !*z){
3260132645
return 0;
3260232646
}
32603
- while(*z && isspace(*z)) ++z;
32647
+ while(*z && IsSpace(*z)) ++z;
3260432648
zBegin = z;
3260532649
for(; *z && '\n'!=*z; ++nZ, ++z){}
3260632650
if(nZ>0 && '\r'==zBegin[nZ-1]){
3260732651
--nZ;
3260832652
}
3260932653
--- extsrc/shell.c
+++ extsrc/shell.c
@@ -234,10 +234,12 @@
234
235 /* ctype macros that work with signed characters */
236 #define IsSpace(X) isspace((unsigned char)X)
237 #define IsDigit(X) isdigit((unsigned char)X)
238 #define ToLower(X) (char)tolower((unsigned char)X)
 
 
239
240 #if defined(_WIN32) || defined(WIN32)
241 #if SQLITE_OS_WINRT
242 #include <intrin.h>
243 #endif
@@ -1506,13 +1508,13 @@
1506 ** Return '"' if quoting is required. Return 0 if no quoting is required.
1507 */
1508 static char quoteChar(const char *zName){
1509 int i;
1510 if( zName==0 ) return '"';
1511 if( !isalpha((unsigned char)zName[0]) && zName[0]!='_' ) return '"';
1512 for(i=0; zName[i]; i++){
1513 if( !isalnum((unsigned char)zName[i]) && zName[i]!='_' ) return '"';
1514 }
1515 return sqlite3_keyword_check(zName, i) ? '"' : 0;
1516 }
1517
1518 /*
@@ -2425,11 +2427,11 @@
2425 ** content in cases where the content starts
2426 ** with a digit.
2427 **
2428 ** typeof(Y)='blob' The hash is taken over prefix "Bnnn:" followed
2429 ** by the binary content of the blob. The "nnn"
2430 ** in the prefix is the mimimum-length decimal
2431 ** representation of the byte-length of the blob.
2432 **
2433 ** According to the rules above, all of the following SELECT statements
2434 ** should return TRUE:
2435 **
@@ -3646,11 +3648,11 @@
3646 **
3647 ** UINT works like BINARY for text, except that embedded strings
3648 ** of digits compare in numeric order.
3649 **
3650 ** * Leading zeros are handled properly, in the sense that
3651 ** they do not mess of the maginitude comparison of embedded
3652 ** strings of digits. "x00123y" is equal to "x123y".
3653 **
3654 ** * Only unsigned integers are recognized. Plus and minus
3655 ** signs are ignored. Decimal points and exponential notation
3656 ** are ignored.
@@ -3752,10 +3754,13 @@
3752 ** warnings. */
3753 #ifndef UNUSED_PARAMETER
3754 # define UNUSED_PARAMETER(X) (void)(X)
3755 #endif
3756
 
 
 
3757
3758 /* A decimal object */
3759 typedef struct Decimal Decimal;
3760 struct Decimal {
3761 char sign; /* 0 for positive, 1 for negative */
@@ -3801,11 +3806,11 @@
3801 p->isNull = 0;
3802 p->nDigit = 0;
3803 p->nFrac = 0;
3804 p->a = sqlite3_malloc64( n+1 );
3805 if( p->a==0 ) goto new_from_text_failed;
3806 for(i=0; isspace(zIn[i]); i++){}
3807 if( zIn[i]=='-' ){
3808 p->sign = 1;
3809 i++;
3810 }else if( zIn[i]=='+' ){
3811 i++;
@@ -4456,11 +4461,11 @@
4456 }
4457 decimal_free(pA);
4458 decimal_free(pB);
4459 }
4460
4461 /* Aggregate funcion: decimal_sum(X)
4462 **
4463 ** Works like sum() except that it uses decimal arithmetic for unlimited
4464 ** precision.
4465 */
4466 static void decimalSumStep(
@@ -4817,11 +4822,11 @@
4817 }
4818
4819 /*
4820 ** Generate an error for a percentile function.
4821 **
4822 ** The error format string must have exactly one occurrance of "%%s()"
4823 ** (with two '%' characters). That substring will be replaced by the name
4824 ** of the function.
4825 */
4826 static void percentError(sqlite3_context *pCtx, const char *zFormat, ...){
4827 PercentileFunc *pFunc = (PercentileFunc*)sqlite3_user_data(pCtx);
@@ -5957,11 +5962,11 @@
5957 ** number format:
5958 **
5959 ** WITH c(name,bin) AS (VALUES
5960 ** ('minimum positive value', x'0000000000000001'),
5961 ** ('maximum subnormal value', x'000fffffffffffff'),
5962 ** ('mininum positive nornal value', x'0010000000000000'),
5963 ** ('maximum value', x'7fefffffffffffff'))
5964 ** SELECT c.name, decimal_mul(ieee754_mantissa(c.bin),pow2.v)
5965 ** FROM pow2, c WHERE pow2.x=ieee754_exponent(c.bin);
5966 **
5967 */
@@ -6344,11 +6349,11 @@
6344 * 2 for UBSAN's satisfaction (and hypothetical 1's complement ALUs.) */
6345 smBase += (mxI64/2) * smStep;
6346 smBase += (mxI64 - mxI64/2) * smStep;
6347 }
6348 /* Under UBSAN (or on 1's complement machines), must do this last term
6349 * in steps to avoid the dreaded (and harmless) signed multiply overlow. */
6350 if( ix>=2 ){
6351 sqlite3_int64 ix2 = (sqlite3_int64)ix/2;
6352 smBase += ix2*smStep;
6353 ix -= ix2;
6354 }
@@ -9024,10 +9029,15 @@
9024 #include <assert.h>
9025 #include <string.h>
9026 #include <ctype.h>
9027
9028 #ifndef SQLITE_OMIT_VIRTUALTABLE
 
 
 
 
 
9029
9030 /* completion_vtab is a subclass of sqlite3_vtab which will
9031 ** serve as the underlying representation of a completion virtual table
9032 */
9033 typedef struct completion_vtab completion_vtab;
@@ -9361,11 +9371,11 @@
9361 if( pCur->zLine==0 ) return SQLITE_NOMEM;
9362 }
9363 }
9364 if( pCur->zLine!=0 && pCur->zPrefix==0 ){
9365 int i = pCur->nLine;
9366 while( i>0 && (isalnum(pCur->zLine[i-1]) || pCur->zLine[i-1]=='_') ){
9367 i--;
9368 }
9369 pCur->nPrefix = pCur->nLine - i;
9370 if( pCur->nPrefix>0 ){
9371 pCur->zPrefix = sqlite3_mprintf("%.*s", pCur->nPrefix, pCur->zLine + i);
@@ -14768,11 +14778,11 @@
14768 /* Register the auth callback with dbv */
14769 if( rc==SQLITE_OK ){
14770 sqlite3_set_authorizer(pNew->dbv, idxAuthCallback, (void*)pNew);
14771 }
14772
14773 /* If an error has occurred, free the new object and reutrn NULL. Otherwise,
14774 ** return the new sqlite3expert handle. */
14775 if( rc!=SQLITE_OK ){
14776 sqlite3_expert_destroy(pNew);
14777 pNew = 0;
14778 }
@@ -16290,11 +16300,11 @@
16290 **
16291 ** PRAGMA vfstrace('+all');
16292 **
16293 ** Individual APIs can be enabled or disabled by name, with or without
16294 ** the initial "x" character. For example, to set up for tracing lock
16295 ** primatives only:
16296 **
16297 ** PRAGMA vfstrace('-all, +Lock,Unlock,ShmLock');
16298 **
16299 ** The argument to the vfstrace pragma ignores capitalization and any
16300 ** characters other than alphabetics, '+', and '-'.
@@ -21241,41 +21251,57 @@
21241 ** function is called.
21242 */
21243 static void recoverStep(sqlite3_recover *p){
21244 assert( p && p->errCode==SQLITE_OK );
21245 switch( p->eState ){
21246 case RECOVER_STATE_INIT:
 
21247 /* This is the very first call to sqlite3_recover_step() on this object.
21248 */
21249 recoverSqlCallback(p, "BEGIN");
21250 recoverSqlCallback(p, "PRAGMA writable_schema = on");
 
21251
21252 recoverEnterMutex();
21253 recoverInstallWrapper(p);
21254
21255 /* Open the output database. And register required virtual tables and
21256 ** user functions with the new handle. */
21257 recoverOpenOutput(p);
21258
21259 /* Open transactions on both the input and output databases. */
21260 sqlite3_file_control(p->dbIn, p->zDb, SQLITE_FCNTL_RESET_CACHE, 0);
21261 recoverExec(p, p->dbIn, "PRAGMA writable_schema = on");
21262 recoverExec(p, p->dbIn, "BEGIN");
21263 if( p->errCode==SQLITE_OK ) p->bCloseTransaction = 1;
21264 recoverExec(p, p->dbIn, "SELECT 1 FROM sqlite_schema");
21265 recoverTransferSettings(p);
21266 recoverOpenRecovery(p);
21267 recoverCacheSchema(p);
21268
21269 recoverUninstallWrapper(p);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
21270 recoverLeaveMutex();
21271
21272 recoverExec(p, p->dbOut, "BEGIN");
21273
21274 recoverWriteSchema1(p);
21275 p->eState = RECOVER_STATE_WRITING;
21276 break;
 
21277
21278 case RECOVER_STATE_WRITING: {
21279 if( p->w1.pTbls==0 ){
21280 recoverWriteDataInit(p);
21281 }
@@ -21711,17 +21737,18 @@
21711 #define SHELL_PROGRESS_RESET 0x02 /* Reset the count when the progress
21712 ** callback limit is reached, and for each
21713 ** top-level SQL statement */
21714 #define SHELL_PROGRESS_ONCE 0x04 /* Cancel the --limit after firing once */
21715
21716 /* Allowed values for ShellState.eEscMode
 
21717 */
21718 #define SHELL_ESC_SYMBOL 0 /* Substitute U+2400 graphics */
21719 #define SHELL_ESC_ASCII 1 /* Substitute ^Y for X where Y=X+0x40 */
21720 #define SHELL_ESC_OFF 2 /* Send characters verbatim */
21721
21722 static const char *shell_EscModeNames[] = { "symbol", "ascii", "off" };
21723
21724 /*
21725 ** These are the allowed shellFlgs values
21726 */
21727 #define SHFLG_Pagecache 0x00000001 /* The --pagecache option is used */
@@ -22902,18 +22929,22 @@
22902 int j;
22903 int nParen = 0;
22904 char cEnd = 0;
22905 char c;
22906 int nLine = 0;
 
 
22907 assert( nArg==1 );
22908 if( azArg[0]==0 ) break;
22909 if( sqlite3_strlike("CREATE VIEW%", azArg[0], 0)==0
22910 || sqlite3_strlike("CREATE TRIG%", azArg[0], 0)==0
22911 ){
22912 sqlite3_fprintf(p->out, "%s;\n", azArg[0]);
22913 break;
22914 }
 
 
22915 z = sqlite3_mprintf("%s", azArg[0]);
22916 shell_check_oom(z);
22917 j = 0;
22918 for(i=0; IsSpace(z[i]); i++){}
22919 for(; (c = z[i])!=0; i++){
@@ -22939,18 +22970,30 @@
22939 cEnd = '\n';
22940 }else if( c=='(' ){
22941 nParen++;
22942 }else if( c==')' ){
22943 nParen--;
22944 if( nLine>0 && nParen==0 && j>0 ){
22945 printSchemaLineN(p->out, z, j, "\n");
22946 j = 0;
22947 }
 
 
 
 
 
 
 
 
 
 
 
22948 }
22949 z[j++] = c;
22950 if( nParen==1 && cEnd==0
22951 && (c=='(' || c=='\n' || (c==',' && !wsToEol(z+i+1)))
 
22952 ){
22953 if( c=='\n' ) j--;
22954 printSchemaLineN(p->out, z, j, "\n ");
22955 j = 0;
22956 nLine++;
@@ -24150,15 +24193,15 @@
24150 i++;
24151 }
24152 if( n>=mxWidth && bWordWrap ){
24153 /* Perhaps try to back up to a better place to break the line */
24154 for(k=i; k>i/2; k--){
24155 if( isspace(z[k-1]) ) break;
24156 }
24157 if( k<=i/2 ){
24158 for(k=i; k>i/2; k--){
24159 if( isalnum(z[k-1])!=isalnum(z[k]) && (z[k]&0xc0)!=0x80 ) break;
24160 }
24161 }
24162 if( k<=i/2 ){
24163 k = i;
24164 }else{
@@ -26088,11 +26131,11 @@
26088 #if HAVE_LINENOISE==2
26089 UNUSED_PARAMETER(pUserData);
26090 #endif
26091 if( nLine>(i64)sizeof(zBuf)-30 ) return;
26092 if( zLine[0]=='.' || zLine[0]=='#') return;
26093 for(i=nLine-1; i>=0 && (isalnum(zLine[i]) || zLine[i]=='_'); i--){}
26094 if( i==nLine-1 ) return;
26095 iStart = i+1;
26096 memcpy(zBuf, zLine, iStart);
26097 zSql = sqlite3_mprintf("SELECT DISTINCT candidate COLLATE nocase"
26098 " FROM completion(%Q,%Q) ORDER BY 1",
@@ -28328,10 +28371,11 @@
28328 sqlite3_recover_config(p, 789, (void*)zRecoveryDb); /* Debug use only */
28329 sqlite3_recover_config(p, SQLITE_RECOVER_LOST_AND_FOUND, (void*)zLAF);
28330 sqlite3_recover_config(p, SQLITE_RECOVER_ROWIDS, (void*)&bRowids);
28331 sqlite3_recover_config(p, SQLITE_RECOVER_FREELIST_CORRUPT,(void*)&bFreelist);
28332
 
28333 sqlite3_recover_run(p);
28334 if( sqlite3_recover_errcode(p)!=SQLITE_OK ){
28335 const char *zErr = sqlite3_recover_errmsg(p);
28336 int errCode = sqlite3_recover_errcode(p);
28337 sqlite3_fprintf(stderr,"sql error: %s (%d)\n", zErr, errCode);
@@ -32419,11 +32463,11 @@
32419 /*
32420 ** The CLI needs a working sqlite3_complete() to work properly. So error
32421 ** out of the build if compiling with SQLITE_OMIT_COMPLETE.
32422 */
32423 #ifdef SQLITE_OMIT_COMPLETE
32424 # error the CLI application is imcompatable with SQLITE_OMIT_COMPLETE.
32425 #endif
32426
32427 /*
32428 ** Return true if zSql is a complete SQL statement. Return false if it
32429 ** ends in the middle of a string literal or C-style comment.
@@ -32598,11 +32642,11 @@
32598 UNUSED_PARAMETER(in);
32599 UNUSED_PARAMETER(isContinuation);
32600 if(!z || !*z){
32601 return 0;
32602 }
32603 while(*z && isspace(*z)) ++z;
32604 zBegin = z;
32605 for(; *z && '\n'!=*z; ++nZ, ++z){}
32606 if(nZ>0 && '\r'==zBegin[nZ-1]){
32607 --nZ;
32608 }
32609
--- extsrc/shell.c
+++ extsrc/shell.c
@@ -234,10 +234,12 @@
234
235 /* ctype macros that work with signed characters */
236 #define IsSpace(X) isspace((unsigned char)X)
237 #define IsDigit(X) isdigit((unsigned char)X)
238 #define ToLower(X) (char)tolower((unsigned char)X)
239 #define IsAlnum(X) isalnum((unsigned char)X)
240 #define IsAlpha(X) isalpha((unsigned char)X)
241
242 #if defined(_WIN32) || defined(WIN32)
243 #if SQLITE_OS_WINRT
244 #include <intrin.h>
245 #endif
@@ -1506,13 +1508,13 @@
1508 ** Return '"' if quoting is required. Return 0 if no quoting is required.
1509 */
1510 static char quoteChar(const char *zName){
1511 int i;
1512 if( zName==0 ) return '"';
1513 if( !IsAlpha(zName[0]) && zName[0]!='_' ) return '"';
1514 for(i=0; zName[i]; i++){
1515 if( !IsAlnum(zName[i]) && zName[i]!='_' ) return '"';
1516 }
1517 return sqlite3_keyword_check(zName, i) ? '"' : 0;
1518 }
1519
1520 /*
@@ -2425,11 +2427,11 @@
2427 ** content in cases where the content starts
2428 ** with a digit.
2429 **
2430 ** typeof(Y)='blob' The hash is taken over prefix "Bnnn:" followed
2431 ** by the binary content of the blob. The "nnn"
2432 ** in the prefix is the minimum-length decimal
2433 ** representation of the byte-length of the blob.
2434 **
2435 ** According to the rules above, all of the following SELECT statements
2436 ** should return TRUE:
2437 **
@@ -3646,11 +3648,11 @@
3648 **
3649 ** UINT works like BINARY for text, except that embedded strings
3650 ** of digits compare in numeric order.
3651 **
3652 ** * Leading zeros are handled properly, in the sense that
3653 ** they do not mess of the magnitude comparison of embedded
3654 ** strings of digits. "x00123y" is equal to "x123y".
3655 **
3656 ** * Only unsigned integers are recognized. Plus and minus
3657 ** signs are ignored. Decimal points and exponential notation
3658 ** are ignored.
@@ -3752,10 +3754,13 @@
3754 ** warnings. */
3755 #ifndef UNUSED_PARAMETER
3756 # define UNUSED_PARAMETER(X) (void)(X)
3757 #endif
3758
3759 #ifndef IsSpace
3760 #define IsSpace(X) isspace((unsigned char)X)
3761 #endif
3762
3763 /* A decimal object */
3764 typedef struct Decimal Decimal;
3765 struct Decimal {
3766 char sign; /* 0 for positive, 1 for negative */
@@ -3801,11 +3806,11 @@
3806 p->isNull = 0;
3807 p->nDigit = 0;
3808 p->nFrac = 0;
3809 p->a = sqlite3_malloc64( n+1 );
3810 if( p->a==0 ) goto new_from_text_failed;
3811 for(i=0; IsSpace(zIn[i]); i++){}
3812 if( zIn[i]=='-' ){
3813 p->sign = 1;
3814 i++;
3815 }else if( zIn[i]=='+' ){
3816 i++;
@@ -4456,11 +4461,11 @@
4461 }
4462 decimal_free(pA);
4463 decimal_free(pB);
4464 }
4465
4466 /* Aggregate function: decimal_sum(X)
4467 **
4468 ** Works like sum() except that it uses decimal arithmetic for unlimited
4469 ** precision.
4470 */
4471 static void decimalSumStep(
@@ -4817,11 +4822,11 @@
4822 }
4823
4824 /*
4825 ** Generate an error for a percentile function.
4826 **
4827 ** The error format string must have exactly one occurrence of "%%s()"
4828 ** (with two '%' characters). That substring will be replaced by the name
4829 ** of the function.
4830 */
4831 static void percentError(sqlite3_context *pCtx, const char *zFormat, ...){
4832 PercentileFunc *pFunc = (PercentileFunc*)sqlite3_user_data(pCtx);
@@ -5957,11 +5962,11 @@
5962 ** number format:
5963 **
5964 ** WITH c(name,bin) AS (VALUES
5965 ** ('minimum positive value', x'0000000000000001'),
5966 ** ('maximum subnormal value', x'000fffffffffffff'),
5967 ** ('minimum positive normal value', x'0010000000000000'),
5968 ** ('maximum value', x'7fefffffffffffff'))
5969 ** SELECT c.name, decimal_mul(ieee754_mantissa(c.bin),pow2.v)
5970 ** FROM pow2, c WHERE pow2.x=ieee754_exponent(c.bin);
5971 **
5972 */
@@ -6344,11 +6349,11 @@
6349 * 2 for UBSAN's satisfaction (and hypothetical 1's complement ALUs.) */
6350 smBase += (mxI64/2) * smStep;
6351 smBase += (mxI64 - mxI64/2) * smStep;
6352 }
6353 /* Under UBSAN (or on 1's complement machines), must do this last term
6354 * in steps to avoid the dreaded (and harmless) signed multiply overflow. */
6355 if( ix>=2 ){
6356 sqlite3_int64 ix2 = (sqlite3_int64)ix/2;
6357 smBase += ix2*smStep;
6358 ix -= ix2;
6359 }
@@ -9024,10 +9029,15 @@
9029 #include <assert.h>
9030 #include <string.h>
9031 #include <ctype.h>
9032
9033 #ifndef SQLITE_OMIT_VIRTUALTABLE
9034
9035 #ifndef IsAlnum
9036 #define IsAlnum(X) isalnum((unsigned char)X)
9037 #endif
9038
9039
9040 /* completion_vtab is a subclass of sqlite3_vtab which will
9041 ** serve as the underlying representation of a completion virtual table
9042 */
9043 typedef struct completion_vtab completion_vtab;
@@ -9361,11 +9371,11 @@
9371 if( pCur->zLine==0 ) return SQLITE_NOMEM;
9372 }
9373 }
9374 if( pCur->zLine!=0 && pCur->zPrefix==0 ){
9375 int i = pCur->nLine;
9376 while( i>0 && (IsAlnum(pCur->zLine[i-1]) || pCur->zLine[i-1]=='_') ){
9377 i--;
9378 }
9379 pCur->nPrefix = pCur->nLine - i;
9380 if( pCur->nPrefix>0 ){
9381 pCur->zPrefix = sqlite3_mprintf("%.*s", pCur->nPrefix, pCur->zLine + i);
@@ -14768,11 +14778,11 @@
14778 /* Register the auth callback with dbv */
14779 if( rc==SQLITE_OK ){
14780 sqlite3_set_authorizer(pNew->dbv, idxAuthCallback, (void*)pNew);
14781 }
14782
14783 /* If an error has occurred, free the new object and return NULL. Otherwise,
14784 ** return the new sqlite3expert handle. */
14785 if( rc!=SQLITE_OK ){
14786 sqlite3_expert_destroy(pNew);
14787 pNew = 0;
14788 }
@@ -16290,11 +16300,11 @@
16300 **
16301 ** PRAGMA vfstrace('+all');
16302 **
16303 ** Individual APIs can be enabled or disabled by name, with or without
16304 ** the initial "x" character. For example, to set up for tracing lock
16305 ** primitives only:
16306 **
16307 ** PRAGMA vfstrace('-all, +Lock,Unlock,ShmLock');
16308 **
16309 ** The argument to the vfstrace pragma ignores capitalization and any
16310 ** characters other than alphabetics, '+', and '-'.
@@ -21241,41 +21251,57 @@
21251 ** function is called.
21252 */
21253 static void recoverStep(sqlite3_recover *p){
21254 assert( p && p->errCode==SQLITE_OK );
21255 switch( p->eState ){
21256 case RECOVER_STATE_INIT: {
21257 int bUseWrapper = 1;
21258 /* This is the very first call to sqlite3_recover_step() on this object.
21259 */
21260 recoverSqlCallback(p, "BEGIN");
21261 recoverSqlCallback(p, "PRAGMA writable_schema = on");
21262 recoverSqlCallback(p, "PRAGMA foreign_keys = off");
21263
21264 recoverEnterMutex();
 
21265
21266 /* Open the output database. And register required virtual tables and
21267 ** user functions with the new handle. */
21268 recoverOpenOutput(p);
21269
21270 /* Attempt to open a transaction and read page 1 of the input database.
21271 ** Two attempts may be made - one with a wrapper installed to ensure
21272 ** that the database header is sane, and then if that attempt returns
21273 ** SQLITE_NOTADB, then again with no wrapper. The second attempt is
21274 ** required for encrypted databases. */
21275 if( p->errCode==SQLITE_OK ){
21276 do{
21277 p->errCode = SQLITE_OK;
21278 if( bUseWrapper ) recoverInstallWrapper(p);
21279
21280 /* Open a transaction on the input database. */
21281 sqlite3_file_control(p->dbIn, p->zDb, SQLITE_FCNTL_RESET_CACHE, 0);
21282 recoverExec(p, p->dbIn, "PRAGMA writable_schema = on");
21283 recoverExec(p, p->dbIn, "BEGIN");
21284 if( p->errCode==SQLITE_OK ) p->bCloseTransaction = 1;
21285 recoverExec(p, p->dbIn, "SELECT 1 FROM sqlite_schema");
21286 recoverTransferSettings(p);
21287 recoverOpenRecovery(p);
21288 recoverCacheSchema(p);
21289
21290 if( bUseWrapper ) recoverUninstallWrapper(p);
21291 }while( p->errCode==SQLITE_NOTADB
21292 && (bUseWrapper--)
21293 && SQLITE_OK==sqlite3_exec(p->dbIn, "ROLLBACK", 0, 0, 0)
21294 );
21295 }
21296
21297 recoverLeaveMutex();
 
21298 recoverExec(p, p->dbOut, "BEGIN");
 
21299 recoverWriteSchema1(p);
21300 p->eState = RECOVER_STATE_WRITING;
21301 break;
21302 }
21303
21304 case RECOVER_STATE_WRITING: {
21305 if( p->w1.pTbls==0 ){
21306 recoverWriteDataInit(p);
21307 }
@@ -21711,17 +21737,18 @@
21737 #define SHELL_PROGRESS_RESET 0x02 /* Reset the count when the progress
21738 ** callback limit is reached, and for each
21739 ** top-level SQL statement */
21740 #define SHELL_PROGRESS_ONCE 0x04 /* Cancel the --limit after firing once */
21741
21742 /* Allowed values for ShellState.eEscMode. The default value should
21743 ** be 0, so to change the default, reorder the names.
21744 */
21745 #define SHELL_ESC_ASCII 0 /* Substitute ^Y for X where Y=X+0x40 */
21746 #define SHELL_ESC_SYMBOL 1 /* Substitute U+2400 graphics */
21747 #define SHELL_ESC_OFF 2 /* Send characters verbatim */
21748
21749 static const char *shell_EscModeNames[] = { "ascii", "symbol", "off" };
21750
21751 /*
21752 ** These are the allowed shellFlgs values
21753 */
21754 #define SHFLG_Pagecache 0x00000001 /* The --pagecache option is used */
@@ -22902,18 +22929,22 @@
22929 int j;
22930 int nParen = 0;
22931 char cEnd = 0;
22932 char c;
22933 int nLine = 0;
22934 int isIndex;
22935 int isWhere = 0;
22936 assert( nArg==1 );
22937 if( azArg[0]==0 ) break;
22938 if( sqlite3_strlike("CREATE VIEW%", azArg[0], 0)==0
22939 || sqlite3_strlike("CREATE TRIG%", azArg[0], 0)==0
22940 ){
22941 sqlite3_fprintf(p->out, "%s;\n", azArg[0]);
22942 break;
22943 }
22944 isIndex = sqlite3_strlike("CREATE INDEX%", azArg[0], 0)==0
22945 || sqlite3_strlike("CREATE UNIQUE INDEX%", azArg[0], 0)==0;
22946 z = sqlite3_mprintf("%s", azArg[0]);
22947 shell_check_oom(z);
22948 j = 0;
22949 for(i=0; IsSpace(z[i]); i++){}
22950 for(; (c = z[i])!=0; i++){
@@ -22939,18 +22970,30 @@
22970 cEnd = '\n';
22971 }else if( c=='(' ){
22972 nParen++;
22973 }else if( c==')' ){
22974 nParen--;
22975 if( nLine>0 && nParen==0 && j>0 && !isWhere ){
22976 printSchemaLineN(p->out, z, j, "\n");
22977 j = 0;
22978 }
22979 }else if( (c=='w' || c=='W')
22980 && nParen==0 && isIndex
22981 && sqlite3_strnicmp("WHERE",&z[i],5)==0
22982 && !IsAlnum(z[i+5]) && z[i+5]!='_' ){
22983 isWhere = 1;
22984 }else if( isWhere && (c=='A' || c=='a')
22985 && nParen==0
22986 && sqlite3_strnicmp("AND",&z[i],3)==0
22987 && !IsAlnum(z[i+3]) && z[i+3]!='_' ){
22988 printSchemaLineN(p->out, z, j, "\n ");
22989 j = 0;
22990 }
22991 z[j++] = c;
22992 if( nParen==1 && cEnd==0
22993 && (c=='(' || c=='\n' || (c==',' && !wsToEol(z+i+1)))
22994 && !isWhere
22995 ){
22996 if( c=='\n' ) j--;
22997 printSchemaLineN(p->out, z, j, "\n ");
22998 j = 0;
22999 nLine++;
@@ -24150,15 +24193,15 @@
24193 i++;
24194 }
24195 if( n>=mxWidth && bWordWrap ){
24196 /* Perhaps try to back up to a better place to break the line */
24197 for(k=i; k>i/2; k--){
24198 if( IsSpace(z[k-1]) ) break;
24199 }
24200 if( k<=i/2 ){
24201 for(k=i; k>i/2; k--){
24202 if( IsAlnum(z[k-1])!=IsAlnum(z[k]) && (z[k]&0xc0)!=0x80 ) break;
24203 }
24204 }
24205 if( k<=i/2 ){
24206 k = i;
24207 }else{
@@ -26088,11 +26131,11 @@
26131 #if HAVE_LINENOISE==2
26132 UNUSED_PARAMETER(pUserData);
26133 #endif
26134 if( nLine>(i64)sizeof(zBuf)-30 ) return;
26135 if( zLine[0]=='.' || zLine[0]=='#') return;
26136 for(i=nLine-1; i>=0 && (IsAlnum(zLine[i]) || zLine[i]=='_'); i--){}
26137 if( i==nLine-1 ) return;
26138 iStart = i+1;
26139 memcpy(zBuf, zLine, iStart);
26140 zSql = sqlite3_mprintf("SELECT DISTINCT candidate COLLATE nocase"
26141 " FROM completion(%Q,%Q) ORDER BY 1",
@@ -28328,10 +28371,11 @@
28371 sqlite3_recover_config(p, 789, (void*)zRecoveryDb); /* Debug use only */
28372 sqlite3_recover_config(p, SQLITE_RECOVER_LOST_AND_FOUND, (void*)zLAF);
28373 sqlite3_recover_config(p, SQLITE_RECOVER_ROWIDS, (void*)&bRowids);
28374 sqlite3_recover_config(p, SQLITE_RECOVER_FREELIST_CORRUPT,(void*)&bFreelist);
28375
28376 sqlite3_fprintf(pState->out, ".dbconfig defensive off\n");
28377 sqlite3_recover_run(p);
28378 if( sqlite3_recover_errcode(p)!=SQLITE_OK ){
28379 const char *zErr = sqlite3_recover_errmsg(p);
28380 int errCode = sqlite3_recover_errcode(p);
28381 sqlite3_fprintf(stderr,"sql error: %s (%d)\n", zErr, errCode);
@@ -32419,11 +32463,11 @@
32463 /*
32464 ** The CLI needs a working sqlite3_complete() to work properly. So error
32465 ** out of the build if compiling with SQLITE_OMIT_COMPLETE.
32466 */
32467 #ifdef SQLITE_OMIT_COMPLETE
32468 # error the CLI application is incompatable with SQLITE_OMIT_COMPLETE.
32469 #endif
32470
32471 /*
32472 ** Return true if zSql is a complete SQL statement. Return false if it
32473 ** ends in the middle of a string literal or C-style comment.
@@ -32598,11 +32642,11 @@
32642 UNUSED_PARAMETER(in);
32643 UNUSED_PARAMETER(isContinuation);
32644 if(!z || !*z){
32645 return 0;
32646 }
32647 while(*z && IsSpace(*z)) ++z;
32648 zBegin = z;
32649 for(; *z && '\n'!=*z; ++nZ, ++z){}
32650 if(nZ>0 && '\r'==zBegin[nZ-1]){
32651 --nZ;
32652 }
32653
--- src/builtin.c
+++ src/builtin.c
@@ -52,17 +52,33 @@
5252
return -1;
5353
}
5454
5555
/*
5656
** Return a pointer to built-in content
57
+**
58
+** If the filename contains "-vNNNNNNNN" just before the final file
59
+** suffix, where each N is a random digit, then omit that part of the
60
+** filename before doing the lookup. The extra -vNNNNNNNN was added
61
+** to defeat overly aggressive caching by web browsers. There must be
62
+** at least 8 digits in NNNNNNNN but more than 8 are allowed.
5763
*/
5864
const unsigned char *builtin_file(const char *zFilename, int *piSize){
5965
int i = builtin_file_index(zFilename);
6066
if( i>=0 ){
6167
if( piSize ) *piSize = aBuiltinFiles[i].nByte;
6268
return aBuiltinFiles[i].pData;
6369
}else{
70
+ char *zV = strstr(zFilename, "-v");
71
+ if( zV!=0 ){
72
+ for(i=0; fossil_isdigit(zV[i+2]); i++){}
73
+ if( i>=8 && zV[i+2]=='.' ){
74
+ char *zNew = mprintf("%.*s%s", (int)(zV-zFilename), zFilename, zV+i+2);
75
+ const unsigned char *pRes = builtin_file(zNew, piSize);
76
+ fossil_free(zNew);
77
+ return pRes;
78
+ }
79
+ }
6480
if( piSize ) *piSize = 0;
6581
return 0;
6682
}
6783
}
6884
const char *builtin_text(const char *zFilename){
6985
--- src/builtin.c
+++ src/builtin.c
@@ -52,17 +52,33 @@
52 return -1;
53 }
54
55 /*
56 ** Return a pointer to built-in content
 
 
 
 
 
 
57 */
58 const unsigned char *builtin_file(const char *zFilename, int *piSize){
59 int i = builtin_file_index(zFilename);
60 if( i>=0 ){
61 if( piSize ) *piSize = aBuiltinFiles[i].nByte;
62 return aBuiltinFiles[i].pData;
63 }else{
 
 
 
 
 
 
 
 
 
 
64 if( piSize ) *piSize = 0;
65 return 0;
66 }
67 }
68 const char *builtin_text(const char *zFilename){
69
--- src/builtin.c
+++ src/builtin.c
@@ -52,17 +52,33 @@
52 return -1;
53 }
54
55 /*
56 ** Return a pointer to built-in content
57 **
58 ** If the filename contains "-vNNNNNNNN" just before the final file
59 ** suffix, where each N is a random digit, then omit that part of the
60 ** filename before doing the lookup. The extra -vNNNNNNNN was added
61 ** to defeat overly aggressive caching by web browsers. There must be
62 ** at least 8 digits in NNNNNNNN but more than 8 are allowed.
63 */
64 const unsigned char *builtin_file(const char *zFilename, int *piSize){
65 int i = builtin_file_index(zFilename);
66 if( i>=0 ){
67 if( piSize ) *piSize = aBuiltinFiles[i].nByte;
68 return aBuiltinFiles[i].pData;
69 }else{
70 char *zV = strstr(zFilename, "-v");
71 if( zV!=0 ){
72 for(i=0; fossil_isdigit(zV[i+2]); i++){}
73 if( i>=8 && zV[i+2]=='.' ){
74 char *zNew = mprintf("%.*s%s", (int)(zV-zFilename), zFilename, zV+i+2);
75 const unsigned char *pRes = builtin_file(zNew, piSize);
76 fossil_free(zNew);
77 return pRes;
78 }
79 }
80 if( piSize ) *piSize = 0;
81 return 0;
82 }
83 }
84 const char *builtin_text(const char *zFilename){
85
--- src/checkin.c
+++ src/checkin.c
@@ -2376,10 +2376,11 @@
23762376
** --no-verify Do not run before-commit hooks
23772377
** --nosign Do not attempt to sign this commit with gpg
23782378
** --nosync Do not auto-sync prior to committing
23792379
** --override-lock Allow a check-in even though parent is locked
23802380
** --private Do not sync changes and their descendants
2381
+** --proxy PROXY Use PROXY as http proxy during sync operation
23812382
** --tag TAG-NAME Assign given tag TAG-NAME to the check-in
23822383
** --trace Debug tracing
23832384
** --user-override USER USER to use instead of the current default
23842385
**
23852386
** DATETIME may be "now" or "YYYY-MM-DDTHH:MM:SS.SSS". If in
23862387
--- src/checkin.c
+++ src/checkin.c
@@ -2376,10 +2376,11 @@
2376 ** --no-verify Do not run before-commit hooks
2377 ** --nosign Do not attempt to sign this commit with gpg
2378 ** --nosync Do not auto-sync prior to committing
2379 ** --override-lock Allow a check-in even though parent is locked
2380 ** --private Do not sync changes and their descendants
 
2381 ** --tag TAG-NAME Assign given tag TAG-NAME to the check-in
2382 ** --trace Debug tracing
2383 ** --user-override USER USER to use instead of the current default
2384 **
2385 ** DATETIME may be "now" or "YYYY-MM-DDTHH:MM:SS.SSS". If in
2386
--- src/checkin.c
+++ src/checkin.c
@@ -2376,10 +2376,11 @@
2376 ** --no-verify Do not run before-commit hooks
2377 ** --nosign Do not attempt to sign this commit with gpg
2378 ** --nosync Do not auto-sync prior to committing
2379 ** --override-lock Allow a check-in even though parent is locked
2380 ** --private Do not sync changes and their descendants
2381 ** --proxy PROXY Use PROXY as http proxy during sync operation
2382 ** --tag TAG-NAME Assign given tag TAG-NAME to the check-in
2383 ** --trace Debug tracing
2384 ** --user-override USER USER to use instead of the current default
2385 **
2386 ** DATETIME may be "now" or "YYYY-MM-DDTHH:MM:SS.SSS". If in
2387
--- src/clone.c
+++ src/clone.c
@@ -129,10 +129,11 @@
129129
** check-out
130130
** --nocompress Omit extra delta compression
131131
** --no-open Clone only. Do not open a check-out.
132132
** --once Don't remember the URI.
133133
** --private Also clone private branches
134
+** --proxy PROXY Use the specified HTTP proxy
134135
** --save-http-password Remember the HTTP password without asking
135136
** -c|--ssh-command SSH Use SSH as the "ssh" command
136137
** --ssl-identity FILENAME Use the SSL identity if requested by the server
137138
** --transport-command CMD Use CMD to move messages to the server and back
138139
** -u|--unversioned Also sync unversioned content
139140
--- src/clone.c
+++ src/clone.c
@@ -129,10 +129,11 @@
129 ** check-out
130 ** --nocompress Omit extra delta compression
131 ** --no-open Clone only. Do not open a check-out.
132 ** --once Don't remember the URI.
133 ** --private Also clone private branches
 
134 ** --save-http-password Remember the HTTP password without asking
135 ** -c|--ssh-command SSH Use SSH as the "ssh" command
136 ** --ssl-identity FILENAME Use the SSL identity if requested by the server
137 ** --transport-command CMD Use CMD to move messages to the server and back
138 ** -u|--unversioned Also sync unversioned content
139
--- src/clone.c
+++ src/clone.c
@@ -129,10 +129,11 @@
129 ** check-out
130 ** --nocompress Omit extra delta compression
131 ** --no-open Clone only. Do not open a check-out.
132 ** --once Don't remember the URI.
133 ** --private Also clone private branches
134 ** --proxy PROXY Use the specified HTTP proxy
135 ** --save-http-password Remember the HTTP password without asking
136 ** -c|--ssh-command SSH Use SSH as the "ssh" command
137 ** --ssl-identity FILENAME Use the SSL identity if requested by the server
138 ** --transport-command CMD Use CMD to move messages to the server and back
139 ** -u|--unversioned Also sync unversioned content
140
--- src/configure.c
+++ src/configure.c
@@ -818,10 +818,12 @@
818818
**
819819
** Synchronize configuration changes in the local repository with
820820
** the remote repository at URL.
821821
**
822822
** Options:
823
+** --proxy PROXY Use PROXY as http proxy during sync operation
824
+** (used by pull, push and sync subcommands)
823825
** -R|--repository REPO Affect repository REPO with changes
824826
**
825827
** See also: [[settings]], [[unset]]
826828
*/
827829
void configuration_cmd(void){
828830
--- src/configure.c
+++ src/configure.c
@@ -818,10 +818,12 @@
818 **
819 ** Synchronize configuration changes in the local repository with
820 ** the remote repository at URL.
821 **
822 ** Options:
 
 
823 ** -R|--repository REPO Affect repository REPO with changes
824 **
825 ** See also: [[settings]], [[unset]]
826 */
827 void configuration_cmd(void){
828
--- src/configure.c
+++ src/configure.c
@@ -818,10 +818,12 @@
818 **
819 ** Synchronize configuration changes in the local repository with
820 ** the remote repository at URL.
821 **
822 ** Options:
823 ** --proxy PROXY Use PROXY as http proxy during sync operation
824 ** (used by pull, push and sync subcommands)
825 ** -R|--repository REPO Affect repository REPO with changes
826 **
827 ** See also: [[settings]], [[unset]]
828 */
829 void configuration_cmd(void){
830
--- src/configure.c
+++ src/configure.c
@@ -818,10 +818,12 @@
818818
**
819819
** Synchronize configuration changes in the local repository with
820820
** the remote repository at URL.
821821
**
822822
** Options:
823
+** --proxy PROXY Use PROXY as http proxy during sync operation
824
+** (used by pull, push and sync subcommands)
823825
** -R|--repository REPO Affect repository REPO with changes
824826
**
825827
** See also: [[settings]], [[unset]]
826828
*/
827829
void configuration_cmd(void){
828830
--- src/configure.c
+++ src/configure.c
@@ -818,10 +818,12 @@
818 **
819 ** Synchronize configuration changes in the local repository with
820 ** the remote repository at URL.
821 **
822 ** Options:
 
 
823 ** -R|--repository REPO Affect repository REPO with changes
824 **
825 ** See also: [[settings]], [[unset]]
826 */
827 void configuration_cmd(void){
828
--- src/configure.c
+++ src/configure.c
@@ -818,10 +818,12 @@
818 **
819 ** Synchronize configuration changes in the local repository with
820 ** the remote repository at URL.
821 **
822 ** Options:
823 ** --proxy PROXY Use PROXY as http proxy during sync operation
824 ** (used by pull, push and sync subcommands)
825 ** -R|--repository REPO Affect repository REPO with changes
826 **
827 ** See also: [[settings]], [[unset]]
828 */
829 void configuration_cmd(void){
830
+1
--- src/db.c
+++ src/db.c
@@ -4181,10 +4181,11 @@
41814181
** --force-missing Force opening a repository with missing content
41824182
** -k|--keep Only modify the manifest file(s)
41834183
** --nested Allow opening a repository inside an opened check-out
41844184
** --nosync Do not auto-sync the repository prior to opening even
41854185
** if the autosync setting is on.
4186
+** --proxy PROXY Use PROXY as http proxy during sync operation
41864187
** --repodir DIR If REPOSITORY is a URI that will be cloned, store
41874188
** the clone in DIR rather than in "."
41884189
** --setmtime Set timestamps of all files to match their SCM-side
41894190
** times (the timestamp of the last check-in which modified
41904191
** them).
41914192
--- src/db.c
+++ src/db.c
@@ -4181,10 +4181,11 @@
4181 ** --force-missing Force opening a repository with missing content
4182 ** -k|--keep Only modify the manifest file(s)
4183 ** --nested Allow opening a repository inside an opened check-out
4184 ** --nosync Do not auto-sync the repository prior to opening even
4185 ** if the autosync setting is on.
 
4186 ** --repodir DIR If REPOSITORY is a URI that will be cloned, store
4187 ** the clone in DIR rather than in "."
4188 ** --setmtime Set timestamps of all files to match their SCM-side
4189 ** times (the timestamp of the last check-in which modified
4190 ** them).
4191
--- src/db.c
+++ src/db.c
@@ -4181,10 +4181,11 @@
4181 ** --force-missing Force opening a repository with missing content
4182 ** -k|--keep Only modify the manifest file(s)
4183 ** --nested Allow opening a repository inside an opened check-out
4184 ** --nosync Do not auto-sync the repository prior to opening even
4185 ** if the autosync setting is on.
4186 ** --proxy PROXY Use PROXY as http proxy during sync operation
4187 ** --repodir DIR If REPOSITORY is a URI that will be cloned, store
4188 ** the clone in DIR rather than in "."
4189 ** --setmtime Set timestamps of all files to match their SCM-side
4190 ** times (the timestamp of the last check-in which modified
4191 ** them).
4192
+14 -9
--- src/dispatch.c
+++ src/dispatch.c
@@ -838,30 +838,35 @@
838838
if( zCmd && *zCmd ){
839839
int rc;
840840
const CmdOrPage *pCmd = 0;
841841
842842
style_set_current_feature("tkt");
843
- style_header("Help: %s", zCmd);
844
-
845
- style_submenu_element("Command-List", "%R/help");
843
+ style_submenu_element("Topic-List", "%R/help");
846844
if( search_restrict(SRCH_HELP)!=0 ){
847845
style_submenu_element("Search","%R/search?y=h");
848846
}
849847
rc = dispatch_name_search(zCmd, CMDFLAG_ANY|CMDFLAG_PREFIX, &pCmd);
850
- if( *zCmd=='/' ){
848
+ if( pCmd ){
849
+ style_header("Help: %s", pCmd->zName);
850
+ }else{
851
+ style_header("Help");
852
+ }
853
+ if( pCmd==0 ){
854
+ /* No <h1> line in this case */
855
+ }else if( *zCmd=='/' ){
851856
/* Some of the webpages require query parameters in order to work.
852857
** @ <h1>The "<a href='%R%s(zCmd)'>%s(zCmd)</a>" page:</h1> */
853
- @ <h1>The "%h(zCmd)" page:</h1>
858
+ @ <h1>The "%h(pCmd->zName)" page:</h1>
854859
}else if( rc==0 && (pCmd->eCmdFlags & CMDFLAG_SETTING)!=0 ){
855860
@ <h1>The "%h(pCmd->zName)" setting:</h1>
856861
}else{
857
- @ <h1>The "%h(zCmd)" command:</h1>
862
+ @ <h1>The "%h(pCmd->zName)" command:</h1>
858863
}
859
- if( rc==1 ){
860
- @ unknown command: %h(zCmd)
864
+ if( rc==1 || (rc==2 && zCmd[0]=='/') ){
865
+ @ Unknown topic: "%h(zCmd)"
861866
}else if( rc==2 ){
862
- @ ambiguous command prefix: %h(zCmd)
867
+ @ Ambiguous prefix: "%h(zCmd)"
863868
}else{
864869
if( pCmd->zHelp[0]==0 ){
865870
@ No help available for "%h(pCmd->zName)"
866871
}else if( P("plaintext") ){
867872
Blob txt;
868873
--- src/dispatch.c
+++ src/dispatch.c
@@ -838,30 +838,35 @@
838 if( zCmd && *zCmd ){
839 int rc;
840 const CmdOrPage *pCmd = 0;
841
842 style_set_current_feature("tkt");
843 style_header("Help: %s", zCmd);
844
845 style_submenu_element("Command-List", "%R/help");
846 if( search_restrict(SRCH_HELP)!=0 ){
847 style_submenu_element("Search","%R/search?y=h");
848 }
849 rc = dispatch_name_search(zCmd, CMDFLAG_ANY|CMDFLAG_PREFIX, &pCmd);
850 if( *zCmd=='/' ){
 
 
 
 
 
 
 
851 /* Some of the webpages require query parameters in order to work.
852 ** @ <h1>The "<a href='%R%s(zCmd)'>%s(zCmd)</a>" page:</h1> */
853 @ <h1>The "%h(zCmd)" page:</h1>
854 }else if( rc==0 && (pCmd->eCmdFlags & CMDFLAG_SETTING)!=0 ){
855 @ <h1>The "%h(pCmd->zName)" setting:</h1>
856 }else{
857 @ <h1>The "%h(zCmd)" command:</h1>
858 }
859 if( rc==1 ){
860 @ unknown command: %h(zCmd)
861 }else if( rc==2 ){
862 @ ambiguous command prefix: %h(zCmd)
863 }else{
864 if( pCmd->zHelp[0]==0 ){
865 @ No help available for "%h(pCmd->zName)"
866 }else if( P("plaintext") ){
867 Blob txt;
868
--- src/dispatch.c
+++ src/dispatch.c
@@ -838,30 +838,35 @@
838 if( zCmd && *zCmd ){
839 int rc;
840 const CmdOrPage *pCmd = 0;
841
842 style_set_current_feature("tkt");
843 style_submenu_element("Topic-List", "%R/help");
 
 
844 if( search_restrict(SRCH_HELP)!=0 ){
845 style_submenu_element("Search","%R/search?y=h");
846 }
847 rc = dispatch_name_search(zCmd, CMDFLAG_ANY|CMDFLAG_PREFIX, &pCmd);
848 if( pCmd ){
849 style_header("Help: %s", pCmd->zName);
850 }else{
851 style_header("Help");
852 }
853 if( pCmd==0 ){
854 /* No <h1> line in this case */
855 }else if( *zCmd=='/' ){
856 /* Some of the webpages require query parameters in order to work.
857 ** @ <h1>The "<a href='%R%s(zCmd)'>%s(zCmd)</a>" page:</h1> */
858 @ <h1>The "%h(pCmd->zName)" page:</h1>
859 }else if( rc==0 && (pCmd->eCmdFlags & CMDFLAG_SETTING)!=0 ){
860 @ <h1>The "%h(pCmd->zName)" setting:</h1>
861 }else{
862 @ <h1>The "%h(pCmd->zName)" command:</h1>
863 }
864 if( rc==1 || (rc==2 && zCmd[0]=='/') ){
865 @ Unknown topic: "%h(zCmd)"
866 }else if( rc==2 ){
867 @ Ambiguous prefix: "%h(zCmd)"
868 }else{
869 if( pCmd->zHelp[0]==0 ){
870 @ No help available for "%h(pCmd->zName)"
871 }else if( P("plaintext") ){
872 Blob txt;
873
+1
--- src/doc.c
+++ src/doc.c
@@ -807,10 +807,11 @@
807807
}else if( fossil_strcmp(zMime, "text/x-markdown")==0 ){
808808
Blob tail = BLOB_INITIALIZER;
809809
markdown_to_html(pBody, &title, &tail);
810810
if( !isPopup ){
811811
if( blob_size(&title)>0 ){
812
+ markdown_dehtmlize_blob(&title);
812813
style_header("%s", blob_str(&title));
813814
}else{
814815
style_header("%s", zDefaultTitle);
815816
}
816817
}
817818
--- src/doc.c
+++ src/doc.c
@@ -807,10 +807,11 @@
807 }else if( fossil_strcmp(zMime, "text/x-markdown")==0 ){
808 Blob tail = BLOB_INITIALIZER;
809 markdown_to_html(pBody, &title, &tail);
810 if( !isPopup ){
811 if( blob_size(&title)>0 ){
 
812 style_header("%s", blob_str(&title));
813 }else{
814 style_header("%s", zDefaultTitle);
815 }
816 }
817
--- src/doc.c
+++ src/doc.c
@@ -807,10 +807,11 @@
807 }else if( fossil_strcmp(zMime, "text/x-markdown")==0 ){
808 Blob tail = BLOB_INITIALIZER;
809 markdown_to_html(pBody, &title, &tail);
810 if( !isPopup ){
811 if( blob_size(&title)>0 ){
812 markdown_dehtmlize_blob(&title);
813 style_header("%s", blob_str(&title));
814 }else{
815 style_header("%s", zDefaultTitle);
816 }
817 }
818
--- src/fossil.page.pikchrshowasm.js
+++ src/fossil.page.pikchrshowasm.js
@@ -120,11 +120,16 @@
120120
}
121121
});
122122
delete PS._config;
123123
}
124124
125
- PS.worker = new Worker('builtin/extsrc/pikchr-worker.js');
125
+ /* Randomize the name of the worker script so that it is never cached.
126
+ ** The Fossil /builtin method will automatically remove the "-v000000000"
127
+ ** part of the filename, resolving it to just "pikchr-worker.js". */
128
+ PS.worker = new Worker('builtin/extsrc/pikchr-worker-v'+
129
+ (Math.floor(Math.random()*10000000000) + 1000000000)+
130
+ '.js');
126131
PS.worker.onmessage = (ev)=>PS.runMsgHandlers(ev.data);
127132
PS.addMsgHandler('stdout', console.log.bind(console));
128133
PS.addMsgHandler('stderr', console.error.bind(console));
129134
130135
/** Handles status updates from the Module object. */
@@ -172,21 +177,21 @@
172177
PS.renderModeLabels[PS.renderModes[PS.renderModes.selectedIndex]];
173178
174179
/**
175180
The 'pikchr-ready' event is fired (with no payload) when the
176181
wasm module has finished loading. */
177
- PS.addMsgHandler('pikchr-ready', function(){
182
+ PS.addMsgHandler('pikchr-ready', function(event){
178183
PS.clearMsgHandlers('pikchr-ready');
179
- F.page.onPikchrshowLoaded();
184
+ F.page.onPikchrshowLoaded(event.data);
180185
});
181186
182187
/**
183188
Performs all app initialization which must wait until after the
184189
worker module is loaded. This function removes itself when it's
185190
called.
186191
*/
187
- F.page.onPikchrshowLoaded = function(){
192
+ F.page.onPikchrshowLoaded = function(pikchrVersion){
188193
delete this.onPikchrshowLoaded;
189194
// Unhide all elements which start out hidden
190195
EAll('.initially-hidden').forEach((e)=>e.classList.remove('initially-hidden'));
191196
const taInput = E('#input');
192197
const btnClearIn = E('#btn-clear');
@@ -439,10 +444,13 @@
439444
if( src && (new URL(self.location.href).searchParams).has('fromSession') ){
440445
taInput.value = src;
441446
window.sessionStorage.removeItem('pikchr-xfer');
442447
}
443448
}
449
+ D.append(E('fieldset.options > div'),
450
+ D.append(D.addClass(D.span(), 'labeled-input'),
451
+ 'pikchr v. '+pikchrVersion));
444452
445453
PS.e.btnRender.click();
446454
447455
/** Debounce handler for auto-rendering while typing. */
448456
const debounceAutoRender = F.debounce(function f(){
449457
--- src/fossil.page.pikchrshowasm.js
+++ src/fossil.page.pikchrshowasm.js
@@ -120,11 +120,16 @@
120 }
121 });
122 delete PS._config;
123 }
124
125 PS.worker = new Worker('builtin/extsrc/pikchr-worker.js');
 
 
 
 
 
126 PS.worker.onmessage = (ev)=>PS.runMsgHandlers(ev.data);
127 PS.addMsgHandler('stdout', console.log.bind(console));
128 PS.addMsgHandler('stderr', console.error.bind(console));
129
130 /** Handles status updates from the Module object. */
@@ -172,21 +177,21 @@
172 PS.renderModeLabels[PS.renderModes[PS.renderModes.selectedIndex]];
173
174 /**
175 The 'pikchr-ready' event is fired (with no payload) when the
176 wasm module has finished loading. */
177 PS.addMsgHandler('pikchr-ready', function(){
178 PS.clearMsgHandlers('pikchr-ready');
179 F.page.onPikchrshowLoaded();
180 });
181
182 /**
183 Performs all app initialization which must wait until after the
184 worker module is loaded. This function removes itself when it's
185 called.
186 */
187 F.page.onPikchrshowLoaded = function(){
188 delete this.onPikchrshowLoaded;
189 // Unhide all elements which start out hidden
190 EAll('.initially-hidden').forEach((e)=>e.classList.remove('initially-hidden'));
191 const taInput = E('#input');
192 const btnClearIn = E('#btn-clear');
@@ -439,10 +444,13 @@
439 if( src && (new URL(self.location.href).searchParams).has('fromSession') ){
440 taInput.value = src;
441 window.sessionStorage.removeItem('pikchr-xfer');
442 }
443 }
 
 
 
444
445 PS.e.btnRender.click();
446
447 /** Debounce handler for auto-rendering while typing. */
448 const debounceAutoRender = F.debounce(function f(){
449
--- src/fossil.page.pikchrshowasm.js
+++ src/fossil.page.pikchrshowasm.js
@@ -120,11 +120,16 @@
120 }
121 });
122 delete PS._config;
123 }
124
125 /* Randomize the name of the worker script so that it is never cached.
126 ** The Fossil /builtin method will automatically remove the "-v000000000"
127 ** part of the filename, resolving it to just "pikchr-worker.js". */
128 PS.worker = new Worker('builtin/extsrc/pikchr-worker-v'+
129 (Math.floor(Math.random()*10000000000) + 1000000000)+
130 '.js');
131 PS.worker.onmessage = (ev)=>PS.runMsgHandlers(ev.data);
132 PS.addMsgHandler('stdout', console.log.bind(console));
133 PS.addMsgHandler('stderr', console.error.bind(console));
134
135 /** Handles status updates from the Module object. */
@@ -172,21 +177,21 @@
177 PS.renderModeLabels[PS.renderModes[PS.renderModes.selectedIndex]];
178
179 /**
180 The 'pikchr-ready' event is fired (with no payload) when the
181 wasm module has finished loading. */
182 PS.addMsgHandler('pikchr-ready', function(event){
183 PS.clearMsgHandlers('pikchr-ready');
184 F.page.onPikchrshowLoaded(event.data);
185 });
186
187 /**
188 Performs all app initialization which must wait until after the
189 worker module is loaded. This function removes itself when it's
190 called.
191 */
192 F.page.onPikchrshowLoaded = function(pikchrVersion){
193 delete this.onPikchrshowLoaded;
194 // Unhide all elements which start out hidden
195 EAll('.initially-hidden').forEach((e)=>e.classList.remove('initially-hidden'));
196 const taInput = E('#input');
197 const btnClearIn = E('#btn-clear');
@@ -439,10 +444,13 @@
444 if( src && (new URL(self.location.href).searchParams).has('fromSession') ){
445 taInput.value = src;
446 window.sessionStorage.removeItem('pikchr-xfer');
447 }
448 }
449 D.append(E('fieldset.options > div'),
450 D.append(D.addClass(D.span(), 'labeled-input'),
451 'pikchr v. '+pikchrVersion));
452
453 PS.e.btnRender.click();
454
455 /** Debounce handler for auto-rendering while typing. */
456 const debounceAutoRender = F.debounce(function f(){
457
+14 -5
--- src/main.c
+++ src/main.c
@@ -639,17 +639,26 @@
639639
fossil_warning("%s", blob_str(&msg));
640640
blob_reset(&msg);
641641
}
642642
643643
/*
644
-** This function attempts to find command line options known to contain
645
-** bitwise flags and initializes the associated global variables. After
646
-** this function executes, all global variables (i.e. in the "g" struct)
647
-** containing option-settable bitwise flag fields must be initialized.
644
+** Initialize the g.comFmtFlags global variable.
645
+**
646
+** Global command-line options --comfmtflags or --comment-format can be
647
+** used for this. However, those command-line options are undocumented
648
+** and deprecated. They are here for backwards compatibility only.
648649
*/
649650
static void fossil_init_flags_from_options(void){
650
- g.comFmtFlags = COMMENT_PRINT_UNSET; /* Use comment-format flag */
651
+ const char *zValue = find_option("comfmtflags", 0, 1);
652
+ if( zValue==0 ){
653
+ zValue = find_option("comment-format", 0, 1);
654
+ }
655
+ if( zValue ){
656
+ g.comFmtFlags = atoi(zValue);
657
+ }else{
658
+ g.comFmtFlags = COMMENT_PRINT_UNSET; /* Command-line option not found. */
659
+ }
651660
}
652661
653662
/*
654663
** Check to see if the Fossil binary contains an appended repository
655664
** file using the appendvfs extension. If so, change command-line arguments
656665
--- src/main.c
+++ src/main.c
@@ -639,17 +639,26 @@
639 fossil_warning("%s", blob_str(&msg));
640 blob_reset(&msg);
641 }
642
643 /*
644 ** This function attempts to find command line options known to contain
645 ** bitwise flags and initializes the associated global variables. After
646 ** this function executes, all global variables (i.e. in the "g" struct)
647 ** containing option-settable bitwise flag fields must be initialized.
 
648 */
649 static void fossil_init_flags_from_options(void){
650 g.comFmtFlags = COMMENT_PRINT_UNSET; /* Use comment-format flag */
 
 
 
 
 
 
 
 
651 }
652
653 /*
654 ** Check to see if the Fossil binary contains an appended repository
655 ** file using the appendvfs extension. If so, change command-line arguments
656
--- src/main.c
+++ src/main.c
@@ -639,17 +639,26 @@
639 fossil_warning("%s", blob_str(&msg));
640 blob_reset(&msg);
641 }
642
643 /*
644 ** Initialize the g.comFmtFlags global variable.
645 **
646 ** Global command-line options --comfmtflags or --comment-format can be
647 ** used for this. However, those command-line options are undocumented
648 ** and deprecated. They are here for backwards compatibility only.
649 */
650 static void fossil_init_flags_from_options(void){
651 const char *zValue = find_option("comfmtflags", 0, 1);
652 if( zValue==0 ){
653 zValue = find_option("comment-format", 0, 1);
654 }
655 if( zValue ){
656 g.comFmtFlags = atoi(zValue);
657 }else{
658 g.comFmtFlags = COMMENT_PRINT_UNSET; /* Command-line option not found. */
659 }
660 }
661
662 /*
663 ** Check to see if the Fossil binary contains an appended repository
664 ** file using the appendvfs extension. If so, change command-line arguments
665
+4 -3
--- src/main.mk
+++ src/main.mk
@@ -2134,18 +2134,19 @@
21342134
$(XTCC) $(PIKCHR_OPTIONS) -c $(SRCDIR_extsrc)/pikchr.c -o $@
21352135
21362136
$(OBJDIR)/cson_amalgamation.o: $(SRCDIR_extsrc)/cson_amalgamation.c
21372137
$(XTCC) -c $(SRCDIR_extsrc)/cson_amalgamation.c -o $@
21382138
2139
-$(SRCDIR_extsrc)/pikchr.js: $(SRCDIR_extsrc)/pikchr.c
2139
+$(SRCDIR_extsrc)/pikchr.js: $(SRCDIR_extsrc)/pikchr.c $(MAKEFILE_LIST)
21402140
$(EMCC_WRAPPER) -o $@ $(EMCC_OPT) --no-entry \
2141
- -sEXPORTED_RUNTIME_METHODS=cwrap,setValue,getValue,stackSave,stackAlloc,stackRestore \
2142
- -sEXPORTED_FUNCTIONS=_pikchr $(SRCDIR_extsrc)/pikchr.c \
2141
+ -sEXPORTED_RUNTIME_METHODS=cwrap,ccall,setValue,getValue,stackSave,stackAlloc,stackRestore \
2142
+ -sEXPORTED_FUNCTIONS=_pikchr,_pikchr_version $(SRCDIR_extsrc)/pikchr.c \
21432143
-sENVIRONMENT=web \
21442144
-sMODULARIZE \
21452145
-sEXPORT_NAME=initPikchrModule \
21462146
--minify 0
2147
+ $(TCLSH) $(TOPDIR)/tools/randomize-js-names.tcl $(SRCDIR_extsrc)
21472148
@chmod -x $(SRCDIR_extsrc)/pikchr.wasm
21482149
wasm: $(SRCDIR_extsrc)/pikchr.js
21492150
21502151
#
21512152
# compile_commands.json support...
21522153
--- src/main.mk
+++ src/main.mk
@@ -2134,18 +2134,19 @@
2134 $(XTCC) $(PIKCHR_OPTIONS) -c $(SRCDIR_extsrc)/pikchr.c -o $@
2135
2136 $(OBJDIR)/cson_amalgamation.o: $(SRCDIR_extsrc)/cson_amalgamation.c
2137 $(XTCC) -c $(SRCDIR_extsrc)/cson_amalgamation.c -o $@
2138
2139 $(SRCDIR_extsrc)/pikchr.js: $(SRCDIR_extsrc)/pikchr.c
2140 $(EMCC_WRAPPER) -o $@ $(EMCC_OPT) --no-entry \
2141 -sEXPORTED_RUNTIME_METHODS=cwrap,setValue,getValue,stackSave,stackAlloc,stackRestore \
2142 -sEXPORTED_FUNCTIONS=_pikchr $(SRCDIR_extsrc)/pikchr.c \
2143 -sENVIRONMENT=web \
2144 -sMODULARIZE \
2145 -sEXPORT_NAME=initPikchrModule \
2146 --minify 0
 
2147 @chmod -x $(SRCDIR_extsrc)/pikchr.wasm
2148 wasm: $(SRCDIR_extsrc)/pikchr.js
2149
2150 #
2151 # compile_commands.json support...
2152
--- src/main.mk
+++ src/main.mk
@@ -2134,18 +2134,19 @@
2134 $(XTCC) $(PIKCHR_OPTIONS) -c $(SRCDIR_extsrc)/pikchr.c -o $@
2135
2136 $(OBJDIR)/cson_amalgamation.o: $(SRCDIR_extsrc)/cson_amalgamation.c
2137 $(XTCC) -c $(SRCDIR_extsrc)/cson_amalgamation.c -o $@
2138
2139 $(SRCDIR_extsrc)/pikchr.js: $(SRCDIR_extsrc)/pikchr.c $(MAKEFILE_LIST)
2140 $(EMCC_WRAPPER) -o $@ $(EMCC_OPT) --no-entry \
2141 -sEXPORTED_RUNTIME_METHODS=cwrap,ccall,setValue,getValue,stackSave,stackAlloc,stackRestore \
2142 -sEXPORTED_FUNCTIONS=_pikchr,_pikchr_version $(SRCDIR_extsrc)/pikchr.c \
2143 -sENVIRONMENT=web \
2144 -sMODULARIZE \
2145 -sEXPORT_NAME=initPikchrModule \
2146 --minify 0
2147 $(TCLSH) $(TOPDIR)/tools/randomize-js-names.tcl $(SRCDIR_extsrc)
2148 @chmod -x $(SRCDIR_extsrc)/pikchr.wasm
2149 wasm: $(SRCDIR_extsrc)/pikchr.js
2150
2151 #
2152 # compile_commands.json support...
2153
--- src/markdown_html.c
+++ src/markdown_html.c
@@ -911,5 +911,62 @@
911911
html_renderer.opaque = &context;
912912
if( output_title ) blob_reset(output_title);
913913
blob_reset(output_body);
914914
markdown(output_body, input_markdown, &html_renderer);
915915
}
916
+
917
+/*
918
+** Undo HTML escapes in Blob p. In other words convert:
919
+**
920
+** &amp; -> &
921
+** &lt; -> <
922
+** &gt; -> >
923
+** &quot; -> "
924
+** &#NNN; -> ascii character NNN
925
+*/
926
+void markdown_dehtmlize_blob(Blob *p){
927
+ char *z;
928
+ unsigned int j, k;
929
+
930
+ z = p->aData;
931
+ for(j=k=0; j<p->nUsed; j++){
932
+ char c = z[j];
933
+ if( c=='&' ){
934
+ if( z[j+1]=='#' && fossil_isdigit(z[j+2]) ){
935
+ int n = 3;
936
+ int x = z[j+2] - '0';
937
+ if( fossil_isdigit(z[j+3]) ){
938
+ x = x*10 + z[j+3] - '0';
939
+ n++;
940
+ if( fossil_isdigit(z[j+4]) ){
941
+ x = x*10 + z[j+4] - '0';
942
+ n++;
943
+ }
944
+ }
945
+ if( z[j+n]==';' ){
946
+ z[k++] = (char)x;
947
+ j += n;
948
+ }else{
949
+ z[k++] = c;
950
+ }
951
+ }else if( memcmp(&z[j],"&lt;",4)==0 ){
952
+ z[k++] = '<';
953
+ j += 3;
954
+ }else if( memcmp(&z[j],"&gt;",4)==0 ){
955
+ z[k++] = '>';
956
+ j += 3;
957
+ }else if( memcmp(&z[j],"&quot;",6)==0 ){
958
+ z[k++] = '"';
959
+ j += 5;
960
+ }else if( memcmp(&z[j],"&amp;",5)==0 ){
961
+ z[k++] = '&';
962
+ j += 4;
963
+ }else{
964
+ z[k++] = c;
965
+ }
966
+ }else{
967
+ z[k++] = c;
968
+ }
969
+ }
970
+ z[k] = 0;
971
+ p->nUsed = k;
972
+}
916973
--- src/markdown_html.c
+++ src/markdown_html.c
@@ -911,5 +911,62 @@
911 html_renderer.opaque = &context;
912 if( output_title ) blob_reset(output_title);
913 blob_reset(output_body);
914 markdown(output_body, input_markdown, &html_renderer);
915 }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
916
--- src/markdown_html.c
+++ src/markdown_html.c
@@ -911,5 +911,62 @@
911 html_renderer.opaque = &context;
912 if( output_title ) blob_reset(output_title);
913 blob_reset(output_body);
914 markdown(output_body, input_markdown, &html_renderer);
915 }
916
917 /*
918 ** Undo HTML escapes in Blob p. In other words convert:
919 **
920 ** &amp; -> &
921 ** &lt; -> <
922 ** &gt; -> >
923 ** &quot; -> "
924 ** &#NNN; -> ascii character NNN
925 */
926 void markdown_dehtmlize_blob(Blob *p){
927 char *z;
928 unsigned int j, k;
929
930 z = p->aData;
931 for(j=k=0; j<p->nUsed; j++){
932 char c = z[j];
933 if( c=='&' ){
934 if( z[j+1]=='#' && fossil_isdigit(z[j+2]) ){
935 int n = 3;
936 int x = z[j+2] - '0';
937 if( fossil_isdigit(z[j+3]) ){
938 x = x*10 + z[j+3] - '0';
939 n++;
940 if( fossil_isdigit(z[j+4]) ){
941 x = x*10 + z[j+4] - '0';
942 n++;
943 }
944 }
945 if( z[j+n]==';' ){
946 z[k++] = (char)x;
947 j += n;
948 }else{
949 z[k++] = c;
950 }
951 }else if( memcmp(&z[j],"&lt;",4)==0 ){
952 z[k++] = '<';
953 j += 3;
954 }else if( memcmp(&z[j],"&gt;",4)==0 ){
955 z[k++] = '>';
956 j += 3;
957 }else if( memcmp(&z[j],"&quot;",6)==0 ){
958 z[k++] = '"';
959 j += 5;
960 }else if( memcmp(&z[j],"&amp;",5)==0 ){
961 z[k++] = '&';
962 j += 4;
963 }else{
964 z[k++] = c;
965 }
966 }else{
967 z[k++] = c;
968 }
969 }
970 z[k] = 0;
971 p->nUsed = k;
972 }
973
--- src/markdown_html.c
+++ src/markdown_html.c
@@ -911,5 +911,62 @@
911911
html_renderer.opaque = &context;
912912
if( output_title ) blob_reset(output_title);
913913
blob_reset(output_body);
914914
markdown(output_body, input_markdown, &html_renderer);
915915
}
916
+
917
+/*
918
+** Undo HTML escapes in Blob p. In other words convert:
919
+**
920
+** &amp; -> &
921
+** &lt; -> <
922
+** &gt; -> >
923
+** &quot; -> "
924
+** &#NNN; -> ascii character NNN
925
+*/
926
+void markdown_dehtmlize_blob(Blob *p){
927
+ char *z;
928
+ unsigned int j, k;
929
+
930
+ z = p->aData;
931
+ for(j=k=0; j<p->nUsed; j++){
932
+ char c = z[j];
933
+ if( c=='&' ){
934
+ if( z[j+1]=='#' && fossil_isdigit(z[j+2]) ){
935
+ int n = 3;
936
+ int x = z[j+2] - '0';
937
+ if( fossil_isdigit(z[j+3]) ){
938
+ x = x*10 + z[j+3] - '0';
939
+ n++;
940
+ if( fossil_isdigit(z[j+4]) ){
941
+ x = x*10 + z[j+4] - '0';
942
+ n++;
943
+ }
944
+ }
945
+ if( z[j+n]==';' ){
946
+ z[k++] = (char)x;
947
+ j += n;
948
+ }else{
949
+ z[k++] = c;
950
+ }
951
+ }else if( memcmp(&z[j],"&lt;",4)==0 ){
952
+ z[k++] = '<';
953
+ j += 3;
954
+ }else if( memcmp(&z[j],"&gt;",4)==0 ){
955
+ z[k++] = '>';
956
+ j += 3;
957
+ }else if( memcmp(&z[j],"&quot;",6)==0 ){
958
+ z[k++] = '"';
959
+ j += 5;
960
+ }else if( memcmp(&z[j],"&amp;",5)==0 ){
961
+ z[k++] = '&';
962
+ j += 4;
963
+ }else{
964
+ z[k++] = c;
965
+ }
966
+ }else{
967
+ z[k++] = c;
968
+ }
969
+ }
970
+ z[k] = 0;
971
+ p->nUsed = k;
972
+}
916973
--- src/markdown_html.c
+++ src/markdown_html.c
@@ -911,5 +911,62 @@
911 html_renderer.opaque = &context;
912 if( output_title ) blob_reset(output_title);
913 blob_reset(output_body);
914 markdown(output_body, input_markdown, &html_renderer);
915 }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
916
--- src/markdown_html.c
+++ src/markdown_html.c
@@ -911,5 +911,62 @@
911 html_renderer.opaque = &context;
912 if( output_title ) blob_reset(output_title);
913 blob_reset(output_body);
914 markdown(output_body, input_markdown, &html_renderer);
915 }
916
917 /*
918 ** Undo HTML escapes in Blob p. In other words convert:
919 **
920 ** &amp; -> &
921 ** &lt; -> <
922 ** &gt; -> >
923 ** &quot; -> "
924 ** &#NNN; -> ascii character NNN
925 */
926 void markdown_dehtmlize_blob(Blob *p){
927 char *z;
928 unsigned int j, k;
929
930 z = p->aData;
931 for(j=k=0; j<p->nUsed; j++){
932 char c = z[j];
933 if( c=='&' ){
934 if( z[j+1]=='#' && fossil_isdigit(z[j+2]) ){
935 int n = 3;
936 int x = z[j+2] - '0';
937 if( fossil_isdigit(z[j+3]) ){
938 x = x*10 + z[j+3] - '0';
939 n++;
940 if( fossil_isdigit(z[j+4]) ){
941 x = x*10 + z[j+4] - '0';
942 n++;
943 }
944 }
945 if( z[j+n]==';' ){
946 z[k++] = (char)x;
947 j += n;
948 }else{
949 z[k++] = c;
950 }
951 }else if( memcmp(&z[j],"&lt;",4)==0 ){
952 z[k++] = '<';
953 j += 3;
954 }else if( memcmp(&z[j],"&gt;",4)==0 ){
955 z[k++] = '>';
956 j += 3;
957 }else if( memcmp(&z[j],"&quot;",6)==0 ){
958 z[k++] = '"';
959 j += 5;
960 }else if( memcmp(&z[j],"&amp;",5)==0 ){
961 z[k++] = '&';
962 j += 4;
963 }else{
964 z[k++] = c;
965 }
966 }else{
967 z[k++] = c;
968 }
969 }
970 z[k] = 0;
971 p->nUsed = k;
972 }
973
+33
--- src/style.c
+++ src/style.c
@@ -1340,10 +1340,43 @@
13401340
&& !login_has_capability(&c, 1, 0) ) zCap[i++] = c;
13411341
}
13421342
zCap[i] = 0;
13431343
return zCap;
13441344
}
1345
+
1346
+/*
1347
+** WEBPAGE: test-title
1348
+**
1349
+** Render a test page in which the page title is set by the "title"
1350
+** query parameter. This can be used to show that HTML or Javascript
1351
+** content in the title does not leak through into generated page, resulting
1352
+** in an XSS issue.
1353
+**
1354
+** Due to the potential for abuse, this webpage is only available to
1355
+** administrators.
1356
+*/
1357
+void page_test_title(void){
1358
+ const char *zTitle;
1359
+ login_check_credentials();
1360
+ if( !g.perm.Admin ){
1361
+ login_needed(0);
1362
+ }
1363
+ zTitle = P("title");
1364
+ if( zTitle==0 ){
1365
+ zTitle = "(No Title)";
1366
+ }
1367
+ style_header("%s", zTitle);
1368
+ @ <p>
1369
+ @ This page sets its title to the value of the "title" query parameter.
1370
+ @ The form below is a convenient way to set the title query parameter:
1371
+ @
1372
+ @ <form method="GET">
1373
+ @ Title: <input type="text" size="50" name="title" value="%h(zTitle)">
1374
+ @ <input type="submit" value="Submit">
1375
+ @ </form>
1376
+ style_finish_page();
1377
+}
13451378
13461379
/*
13471380
** WEBPAGE: test_env
13481381
**
13491382
** Display CGI-variables and other aspects of the run-time
13501383
--- src/style.c
+++ src/style.c
@@ -1340,10 +1340,43 @@
1340 && !login_has_capability(&c, 1, 0) ) zCap[i++] = c;
1341 }
1342 zCap[i] = 0;
1343 return zCap;
1344 }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1345
1346 /*
1347 ** WEBPAGE: test_env
1348 **
1349 ** Display CGI-variables and other aspects of the run-time
1350
--- src/style.c
+++ src/style.c
@@ -1340,10 +1340,43 @@
1340 && !login_has_capability(&c, 1, 0) ) zCap[i++] = c;
1341 }
1342 zCap[i] = 0;
1343 return zCap;
1344 }
1345
1346 /*
1347 ** WEBPAGE: test-title
1348 **
1349 ** Render a test page in which the page title is set by the "title"
1350 ** query parameter. This can be used to show that HTML or Javascript
1351 ** content in the title does not leak through into generated page, resulting
1352 ** in an XSS issue.
1353 **
1354 ** Due to the potential for abuse, this webpage is only available to
1355 ** administrators.
1356 */
1357 void page_test_title(void){
1358 const char *zTitle;
1359 login_check_credentials();
1360 if( !g.perm.Admin ){
1361 login_needed(0);
1362 }
1363 zTitle = P("title");
1364 if( zTitle==0 ){
1365 zTitle = "(No Title)";
1366 }
1367 style_header("%s", zTitle);
1368 @ <p>
1369 @ This page sets its title to the value of the "title" query parameter.
1370 @ The form below is a convenient way to set the title query parameter:
1371 @
1372 @ <form method="GET">
1373 @ Title: <input type="text" size="50" name="title" value="%h(zTitle)">
1374 @ <input type="submit" value="Submit">
1375 @ </form>
1376 style_finish_page();
1377 }
1378
1379 /*
1380 ** WEBPAGE: test_env
1381 **
1382 ** Display CGI-variables and other aspects of the run-time
1383
+3 -14
--- src/timeline.c
+++ src/timeline.c
@@ -205,11 +205,10 @@
205205
char zPrevDate[20];
206206
GraphContext *pGraph = 0;
207207
int prevWasDivider = 0; /* True if previous output row was <hr> */
208208
int fchngQueryInit = 0; /* True if fchngQuery is initialized */
209209
Stmt fchngQuery; /* Query for file changes on check-ins */
210
- static Stmt qbranch;
211210
int pendingEndTr = 0; /* True if a </td></tr> is needed */
212211
int vid = 0; /* Current check-out version */
213212
int dateFormat = 0; /* 0: HH:MM (default) */
214213
int bCommentGitStyle = 0; /* Only show comments through first blank line */
215214
const char *zStyle; /* Sub-name for classes for the style */
@@ -243,14 +242,10 @@
243242
zDateFmt = P("datefmt");
244243
if( zDateFmt ) dateFormat = atoi(zDateFmt);
245244
if( tmFlags & TIMELINE_GRAPH ){
246245
pGraph = graph_init();
247246
}
248
- db_static_prepare(&qbranch,
249
- "SELECT value FROM tagxref WHERE tagid=%d AND tagtype>0 AND rid=:rid",
250
- TAG_BRANCH
251
- );
252247
if( (tmFlags & TIMELINE_CHPICK)!=0
253248
&& !db_table_exists("repository","cherrypick")
254249
){
255250
tmFlags &= ~TIMELINE_CHPICK;
256251
}
@@ -266,11 +261,11 @@
266261
const char *zType = db_column_text(pQuery, 7);
267262
const char *zUser = db_column_text(pQuery, 4);
268263
const char *zTagList = db_column_text(pQuery, 8);
269264
int tagid = db_column_int(pQuery, 9);
270265
const char *zDispUser = zUser && zUser[0] ? zUser : "anonymous";
271
- const char *zBr = 0; /* Branch */
266
+ char *zBr = 0; /* Branch */
272267
int commentColumn = 3; /* Column containing comment text */
273268
int modPending; /* Pending moderation */
274269
char *zDateLink; /* URL for the link on the timestamp */
275270
int drawDetailEllipsis; /* True to show ellipsis in place of detail */
276271
int gidx = 0; /* Graph row identifier */
@@ -412,17 +407,11 @@
412407
}
413408
}
414409
if( zType[0]=='c'
415410
&& (pGraph || zBgClr==0 || (tmFlags & (TIMELINE_BRCOLOR|TIMELINE_DELTA))!=0)
416411
){
417
- db_reset(&qbranch);
418
- db_bind_int(&qbranch, ":rid", rid);
419
- if( db_step(&qbranch)==SQLITE_ROW ){
420
- zBr = db_column_text(&qbranch, 0);
421
- }else{
422
- zBr = "trunk";
423
- }
412
+ zBr = branch_of_rid(rid);
424413
if( zBgClr==0 || (tmFlags & TIMELINE_BRCOLOR)!=0 ){
425414
if( tmFlags & (TIMELINE_DELTA|TIMELINE_NOCOLOR) ){
426415
}else if( zBr==0 || strcmp(zBr,"trunk")==0 ){
427416
zBgClr = 0;
428417
}else{
@@ -459,19 +448,19 @@
459448
db_reset(&qcherrypick);
460449
}
461450
gidx = graph_add_row(pGraph, rid, nParent, nCherrypick, aParent,
462451
zBr, zBgClr, zUuid,
463452
isLeaf ? isLeaf + 2 * has_closed_tag(rid) : 0);
464
- db_reset(&qbranch);
465453
@ <div id="m%d(gidx)" class="tl-nodemark"></div>
466454
}else if( zType[0]=='e' && pGraph && zBgClr && zBgClr[0] ){
467455
/* For technotes, make a graph node with nParent==(-1). This will
468456
** not actually draw anything on the graph, but it will set the
469457
** background color of the timeline entry */
470458
gidx = graph_add_row(pGraph, rid, -1, 0, 0, zBr, zBgClr, zUuid, 0);
471459
@ <div id="m%d(gidx)" class="tl-nodemark"></div>
472460
}
461
+ fossil_free(zBr);
473462
@</td>
474463
if( !isSelectedOrCurrent ){
475464
@ <td class="timeline%s(zStyle)Cell%s(zExtraClass)" id='mc%d(gidx)'>
476465
}else{
477466
@ <td class="timeline%s(zStyle)Cell%s(zExtraClass)">
478467
--- src/timeline.c
+++ src/timeline.c
@@ -205,11 +205,10 @@
205 char zPrevDate[20];
206 GraphContext *pGraph = 0;
207 int prevWasDivider = 0; /* True if previous output row was <hr> */
208 int fchngQueryInit = 0; /* True if fchngQuery is initialized */
209 Stmt fchngQuery; /* Query for file changes on check-ins */
210 static Stmt qbranch;
211 int pendingEndTr = 0; /* True if a </td></tr> is needed */
212 int vid = 0; /* Current check-out version */
213 int dateFormat = 0; /* 0: HH:MM (default) */
214 int bCommentGitStyle = 0; /* Only show comments through first blank line */
215 const char *zStyle; /* Sub-name for classes for the style */
@@ -243,14 +242,10 @@
243 zDateFmt = P("datefmt");
244 if( zDateFmt ) dateFormat = atoi(zDateFmt);
245 if( tmFlags & TIMELINE_GRAPH ){
246 pGraph = graph_init();
247 }
248 db_static_prepare(&qbranch,
249 "SELECT value FROM tagxref WHERE tagid=%d AND tagtype>0 AND rid=:rid",
250 TAG_BRANCH
251 );
252 if( (tmFlags & TIMELINE_CHPICK)!=0
253 && !db_table_exists("repository","cherrypick")
254 ){
255 tmFlags &= ~TIMELINE_CHPICK;
256 }
@@ -266,11 +261,11 @@
266 const char *zType = db_column_text(pQuery, 7);
267 const char *zUser = db_column_text(pQuery, 4);
268 const char *zTagList = db_column_text(pQuery, 8);
269 int tagid = db_column_int(pQuery, 9);
270 const char *zDispUser = zUser && zUser[0] ? zUser : "anonymous";
271 const char *zBr = 0; /* Branch */
272 int commentColumn = 3; /* Column containing comment text */
273 int modPending; /* Pending moderation */
274 char *zDateLink; /* URL for the link on the timestamp */
275 int drawDetailEllipsis; /* True to show ellipsis in place of detail */
276 int gidx = 0; /* Graph row identifier */
@@ -412,17 +407,11 @@
412 }
413 }
414 if( zType[0]=='c'
415 && (pGraph || zBgClr==0 || (tmFlags & (TIMELINE_BRCOLOR|TIMELINE_DELTA))!=0)
416 ){
417 db_reset(&qbranch);
418 db_bind_int(&qbranch, ":rid", rid);
419 if( db_step(&qbranch)==SQLITE_ROW ){
420 zBr = db_column_text(&qbranch, 0);
421 }else{
422 zBr = "trunk";
423 }
424 if( zBgClr==0 || (tmFlags & TIMELINE_BRCOLOR)!=0 ){
425 if( tmFlags & (TIMELINE_DELTA|TIMELINE_NOCOLOR) ){
426 }else if( zBr==0 || strcmp(zBr,"trunk")==0 ){
427 zBgClr = 0;
428 }else{
@@ -459,19 +448,19 @@
459 db_reset(&qcherrypick);
460 }
461 gidx = graph_add_row(pGraph, rid, nParent, nCherrypick, aParent,
462 zBr, zBgClr, zUuid,
463 isLeaf ? isLeaf + 2 * has_closed_tag(rid) : 0);
464 db_reset(&qbranch);
465 @ <div id="m%d(gidx)" class="tl-nodemark"></div>
466 }else if( zType[0]=='e' && pGraph && zBgClr && zBgClr[0] ){
467 /* For technotes, make a graph node with nParent==(-1). This will
468 ** not actually draw anything on the graph, but it will set the
469 ** background color of the timeline entry */
470 gidx = graph_add_row(pGraph, rid, -1, 0, 0, zBr, zBgClr, zUuid, 0);
471 @ <div id="m%d(gidx)" class="tl-nodemark"></div>
472 }
 
473 @</td>
474 if( !isSelectedOrCurrent ){
475 @ <td class="timeline%s(zStyle)Cell%s(zExtraClass)" id='mc%d(gidx)'>
476 }else{
477 @ <td class="timeline%s(zStyle)Cell%s(zExtraClass)">
478
--- src/timeline.c
+++ src/timeline.c
@@ -205,11 +205,10 @@
205 char zPrevDate[20];
206 GraphContext *pGraph = 0;
207 int prevWasDivider = 0; /* True if previous output row was <hr> */
208 int fchngQueryInit = 0; /* True if fchngQuery is initialized */
209 Stmt fchngQuery; /* Query for file changes on check-ins */
 
210 int pendingEndTr = 0; /* True if a </td></tr> is needed */
211 int vid = 0; /* Current check-out version */
212 int dateFormat = 0; /* 0: HH:MM (default) */
213 int bCommentGitStyle = 0; /* Only show comments through first blank line */
214 const char *zStyle; /* Sub-name for classes for the style */
@@ -243,14 +242,10 @@
242 zDateFmt = P("datefmt");
243 if( zDateFmt ) dateFormat = atoi(zDateFmt);
244 if( tmFlags & TIMELINE_GRAPH ){
245 pGraph = graph_init();
246 }
 
 
 
 
247 if( (tmFlags & TIMELINE_CHPICK)!=0
248 && !db_table_exists("repository","cherrypick")
249 ){
250 tmFlags &= ~TIMELINE_CHPICK;
251 }
@@ -266,11 +261,11 @@
261 const char *zType = db_column_text(pQuery, 7);
262 const char *zUser = db_column_text(pQuery, 4);
263 const char *zTagList = db_column_text(pQuery, 8);
264 int tagid = db_column_int(pQuery, 9);
265 const char *zDispUser = zUser && zUser[0] ? zUser : "anonymous";
266 char *zBr = 0; /* Branch */
267 int commentColumn = 3; /* Column containing comment text */
268 int modPending; /* Pending moderation */
269 char *zDateLink; /* URL for the link on the timestamp */
270 int drawDetailEllipsis; /* True to show ellipsis in place of detail */
271 int gidx = 0; /* Graph row identifier */
@@ -412,17 +407,11 @@
407 }
408 }
409 if( zType[0]=='c'
410 && (pGraph || zBgClr==0 || (tmFlags & (TIMELINE_BRCOLOR|TIMELINE_DELTA))!=0)
411 ){
412 zBr = branch_of_rid(rid);
 
 
 
 
 
 
413 if( zBgClr==0 || (tmFlags & TIMELINE_BRCOLOR)!=0 ){
414 if( tmFlags & (TIMELINE_DELTA|TIMELINE_NOCOLOR) ){
415 }else if( zBr==0 || strcmp(zBr,"trunk")==0 ){
416 zBgClr = 0;
417 }else{
@@ -459,19 +448,19 @@
448 db_reset(&qcherrypick);
449 }
450 gidx = graph_add_row(pGraph, rid, nParent, nCherrypick, aParent,
451 zBr, zBgClr, zUuid,
452 isLeaf ? isLeaf + 2 * has_closed_tag(rid) : 0);
 
453 @ <div id="m%d(gidx)" class="tl-nodemark"></div>
454 }else if( zType[0]=='e' && pGraph && zBgClr && zBgClr[0] ){
455 /* For technotes, make a graph node with nParent==(-1). This will
456 ** not actually draw anything on the graph, but it will set the
457 ** background color of the timeline entry */
458 gidx = graph_add_row(pGraph, rid, -1, 0, 0, zBr, zBgClr, zUuid, 0);
459 @ <div id="m%d(gidx)" class="tl-nodemark"></div>
460 }
461 fossil_free(zBr);
462 @</td>
463 if( !isSelectedOrCurrent ){
464 @ <td class="timeline%s(zStyle)Cell%s(zExtraClass)" id='mc%d(gidx)'>
465 }else{
466 @ <td class="timeline%s(zStyle)Cell%s(zExtraClass)">
467
--- src/unversioned.c
+++ src/unversioned.c
@@ -266,10 +266,11 @@
266266
** URL.
267267
**
268268
** Options:
269269
** -v|--verbose Extra diagnostic output
270270
** -n|--dry-run Show what would have happened
271
+** --proxy PROXY Use the specified HTTP proxy
271272
**
272273
** remove|rm|delete FILE ...
273274
** Remove unversioned files from the local repository.
274275
** Changes are not pushed to other repositories until
275276
** the next sync.
@@ -285,10 +286,11 @@
285286
** The remote account requires the 'y' capability.
286287
**
287288
** Options:
288289
** -v|--verbose Extra diagnostic output
289290
** -n|--dry-run Show what would have happened
291
+** --proxy PROXY Use the specified HTTP proxy
290292
**
291293
** touch FILE ... Update the TIMESTAMP on all of the listed files
292294
**
293295
** Options:
294296
** --mtime TIMESTAMP Use TIMESTAMP instead of "now" for the "add",
295297
--- src/unversioned.c
+++ src/unversioned.c
@@ -266,10 +266,11 @@
266 ** URL.
267 **
268 ** Options:
269 ** -v|--verbose Extra diagnostic output
270 ** -n|--dry-run Show what would have happened
 
271 **
272 ** remove|rm|delete FILE ...
273 ** Remove unversioned files from the local repository.
274 ** Changes are not pushed to other repositories until
275 ** the next sync.
@@ -285,10 +286,11 @@
285 ** The remote account requires the 'y' capability.
286 **
287 ** Options:
288 ** -v|--verbose Extra diagnostic output
289 ** -n|--dry-run Show what would have happened
 
290 **
291 ** touch FILE ... Update the TIMESTAMP on all of the listed files
292 **
293 ** Options:
294 ** --mtime TIMESTAMP Use TIMESTAMP instead of "now" for the "add",
295
--- src/unversioned.c
+++ src/unversioned.c
@@ -266,10 +266,11 @@
266 ** URL.
267 **
268 ** Options:
269 ** -v|--verbose Extra diagnostic output
270 ** -n|--dry-run Show what would have happened
271 ** --proxy PROXY Use the specified HTTP proxy
272 **
273 ** remove|rm|delete FILE ...
274 ** Remove unversioned files from the local repository.
275 ** Changes are not pushed to other repositories until
276 ** the next sync.
@@ -285,10 +286,11 @@
286 ** The remote account requires the 'y' capability.
287 **
288 ** Options:
289 ** -v|--verbose Extra diagnostic output
290 ** -n|--dry-run Show what would have happened
291 ** --proxy PROXY Use the specified HTTP proxy
292 **
293 ** touch FILE ... Update the TIMESTAMP on all of the listed files
294 **
295 ** Options:
296 ** --mtime TIMESTAMP Use TIMESTAMP instead of "now" for the "add",
297
--- src/update.c
+++ src/update.c
@@ -101,10 +101,11 @@
101101
** used for merging, named *-baseline, *-original,
102102
** and *-merge.
103103
** --latest Acceptable in place of VERSION, update to
104104
** latest version
105105
** --nosync Do not auto-sync prior to update
106
+** --proxy PROXY Use PROXY as http proxy during sync operation
106107
** --setmtime Set timestamps of all files to match their
107108
** SCM-side times (the timestamp of the last
108109
** check-in which modified them).
109110
** -v|--verbose Print status information about all files
110111
** -W|--width WIDTH Width of lines (default is to auto-detect).
111112
112113
DELETED test/comment.test
--- src/update.c
+++ src/update.c
@@ -101,10 +101,11 @@
101 ** used for merging, named *-baseline, *-original,
102 ** and *-merge.
103 ** --latest Acceptable in place of VERSION, update to
104 ** latest version
105 ** --nosync Do not auto-sync prior to update
 
106 ** --setmtime Set timestamps of all files to match their
107 ** SCM-side times (the timestamp of the last
108 ** check-in which modified them).
109 ** -v|--verbose Print status information about all files
110 ** -W|--width WIDTH Width of lines (default is to auto-detect).
111
112 ELETED test/comment.test
--- src/update.c
+++ src/update.c
@@ -101,10 +101,11 @@
101 ** used for merging, named *-baseline, *-original,
102 ** and *-merge.
103 ** --latest Acceptable in place of VERSION, update to
104 ** latest version
105 ** --nosync Do not auto-sync prior to update
106 ** --proxy PROXY Use PROXY as http proxy during sync operation
107 ** --setmtime Set timestamps of all files to match their
108 ** SCM-side times (the timestamp of the last
109 ** check-in which modified them).
110 ** -v|--verbose Print status information about all files
111 ** -W|--width WIDTH Width of lines (default is to auto-detect).
112
113 ELETED test/comment.test
D test/comment.test
-346
--- a/test/comment.test
+++ b/test/comment.test
@@ -1,346 +0,0 @@
1
-#
2
-# Copyright (c) 2014 D. Richard Hipp
3
-#
4
-# This program is free software; you can redistribute it and/or
5
-# modify it under the terms of the Simplified BSD License (also
6
-# known as the "2-Clause License" or "FreeBSD License".)
7
-#
8
-# This program is distributed in the hope that it will be useful,
9
-# but without any warranty; without even the implied warranty of
10
-# merchantability or fitness for a particular purpose.
11
-#
12
-# Author contact information:
13
-# [email protected]
14
-# http://www.hwaci.com/drh/
15
-#
16
-############################################################################
17
-#
18
-# Test comment formatting and printing.
19
-#
20
-
21
-test_setup ""
22
-
23
-###############################################################################
24
-
25
-fossil test-comment-format "" ""
26
-test comment-1 {$RESULT eq "\n(1 lines output)"}
27
-
28
-###############################################################################
29
-
30
-fossil test-comment-format --decode "" ""
31
-test comment-2 {$RESULT eq "\n(1 lines output)"}
32
-
33
-###############################################################################
34
-
35
-fossil test-comment-format --width 26 " " "this is a short comment."
36
-test comment-3 {$RESULT eq " this is a short comment.\n(1 lines output)"}
37
-
38
-###############################################################################
39
-
40
-fossil test-comment-format --width 26 --decode " " "this is a short comment."
41
-test comment-4 {$RESULT eq " this is a short comment.\n(1 lines output)"}
42
-
43
-###############################################################################
44
-
45
-fossil test-comment-format --width 26 "*PREFIX* " "this is a short comment."
46
-test comment-5 {$RESULT eq "*PREFIX* this is a short c\n omment.\n(2 lines output)"}
47
-
48
-###############################################################################
49
-
50
-fossil test-comment-format --width 26 --decode "*PREFIX* " "this is a short comment."
51
-test comment-6 {$RESULT eq "*PREFIX* this is a short c\n omment.\n(2 lines output)"}
52
-
53
-###############################################################################
54
-
55
-fossil test-comment-format --width 26 "" "this\\sis\\sa\\sshort\\scomment."
56
-test comment-7 {$RESULT eq "this\\sis\\sa\\sshort\\scommen\nt.\n(2 lines output)"}
57
-
58
-###############################################################################
59
-
60
-fossil test-comment-format --width 26 --decode "" "this\\sis\\sa\\sshort\\scomment."
61
-test comment-8 {$RESULT eq "this is a short comment.\n(1 lines output)"}
62
-
63
-###############################################################################
64
-
65
-fossil test-comment-format --width 78 --decode --trimspace "HH:MM:SS " "this is a long comment that should span multiple lines if the test is working correctly."
66
-test comment-9 {$RESULT eq "HH:MM:SS this is a long comment that should span multiple lines if the test is\n working correctly.\n(2 lines output)"}
67
-
68
-###############################################################################
69
-
70
-fossil test-comment-format --width 78 --decode --trimspace "HH:MM:SS " "this is a long comment that should span multiple lines if the test is working correctly. more text here describing the issue.\\nanother line here..................................................................................*"
71
-test comment-10 {$RESULT eq "HH:MM:SS this is a long comment that should span multiple lines if the test is\n working correctly. more text here describing the issue.\n another line here....................................................\n ..............................*\n(4 lines output)"}
72
-
73
-###############################################################################
74
-
75
-fossil test-comment-format --width 78 "HH:MM:SS " "....................................................................................*"
76
-test comment-11 {$RESULT eq "HH:MM:SS .....................................................................\n ...............*\n(2 lines output)"}
77
-
78
-###############################################################################
79
-
80
-fossil test-comment-format --width 78 "HH:MM:SS " ".....................................................................*" 78
81
-test comment-12 {$RESULT eq "HH:MM:SS .....................................................................\n *\n(2 lines output)"}
82
-
83
-###############################################################################
84
-
85
-fossil test-comment-format --width 26 "*TEST* " "this\tis a test."
86
-test comment-13 {$RESULT eq "*TEST* this\tis a te\n st.\n(2 lines output)"}
87
-
88
-###############################################################################
89
-
90
-fossil test-comment-format --width 60 "*TEST* " "this is a test......................................................................................................................."
91
-test comment-14 {$RESULT eq "*TEST* this is a test.......................................\n .....................................................\n ...........................\n(3 lines output)"}
92
-
93
-###############################################################################
94
-
95
-fossil test-comment-format --width 60 --wordbreak "*TEST* " "this is a test......................................................................................................................."
96
-test comment-15 {$RESULT eq "*TEST* this is a\n test.................................................\n .....................................................\n .................\n(4 lines output)"}
97
-
98
-###############################################################################
99
-
100
-fossil test-comment-format --width 60 "*TEST* " "this is a test......................................................................................................................."
101
-test comment-16 {$RESULT eq "*TEST* this is a\n test.................................................\n .....................................................\n .................\n(4 lines output)"}
102
-
103
-###############################################################################
104
-
105
-fossil test-comment-format --width 60 --wordbreak "*TEST* " "this is a test......................................................................................................................."
106
-test comment-17 {$RESULT eq "*TEST* this is a\n test.................................................\n .....................................................\n .................\n(4 lines output)"}
107
-
108
-###############################################################################
109
-
110
-fossil test-comment-format --width 60 "*TEST* " "one two three four five six seven eight nine ten eleven twelve"
111
-test comment-18 {$RESULT eq "*TEST* one two three four five six seven eight nine ten elev\n en twelve\n(2 lines output)"}
112
-
113
-###############################################################################
114
-
115
-fossil test-comment-format --width 60 --wordbreak "*TEST* " "one two three four five six seven eight nine ten eleven twelve"
116
-test comment-19 {$RESULT eq "*TEST* one two three four five six seven eight nine ten\n eleven twelve\n(2 lines output)"}
117
-
118
-###############################################################################
119
-
120
-fossil test-comment-format --width 60 "*TEST* " "one two three four five six seven eight nine ten eleven twelve"
121
-test comment-20 {$RESULT eq "*TEST* one two three four five\n six seven eight nine ten\n eleven twelve\n(3 lines output)"}
122
-
123
-###############################################################################
124
-
125
-fossil test-comment-format --width 60 --wordbreak "*TEST* " "one two three four five six seven eight nine ten eleven twelve"
126
-test comment-21 {$RESULT eq "*TEST* one two three four five\n six seven eight nine ten\n eleven twelve\n(3 lines output)"}
127
-
128
-###############################################################################
129
-
130
-fossil test-comment-format --legacy "" ""
131
-test comment-22 {$RESULT eq "\n(1 lines output)"}
132
-
133
-###############################################################################
134
-
135
-fossil test-comment-format --legacy --decode "" ""
136
-test comment-23 {$RESULT eq "\n(1 lines output)"}
137
-
138
-###############################################################################
139
-
140
-fossil test-comment-format --width 26 --legacy " " "this is a short comment."
141
-test comment-24 {$RESULT eq " this is a short comment.\n(1 lines output)"}
142
-
143
-###############################################################################
144
-
145
-fossil test-comment-format --width 26 --legacy --decode " " "this is a short comment."
146
-test comment-25 {$RESULT eq " this is a short comment.\n(1 lines output)"}
147
-
148
-###############################################################################
149
-
150
-fossil test-comment-format --width 25 --legacy "*PREFIX* " "this is a short comment."
151
-test comment-26 {$RESULT eq "*PREFIX* this is a short\n comment.\n(2 lines output)"}
152
-
153
-###############################################################################
154
-
155
-fossil test-comment-format --width 25 --legacy --decode "*PREFIX* " "this is a short comment."
156
-test comment-27 {$RESULT eq "*PREFIX* this is a short\n comment.\n(2 lines output)"}
157
-
158
-###############################################################################
159
-
160
-fossil test-comment-format --width 26 --legacy "" "this\\sis\\sa\\sshort\\scomment."
161
-test comment-28 {$RESULT eq "this\\sis\\sa\\sshort\\scommen\nt.\n(2 lines output)"}
162
-
163
-###############################################################################
164
-
165
-fossil test-comment-format --width 26 --legacy --decode "" "this\\sis\\sa\\sshort\\scomment."
166
-test comment-29 {$RESULT eq "this is a short comment.\n(1 lines output)"}
167
-
168
-###############################################################################
169
-
170
-fossil test-comment-format --width 78 --legacy --decode "HH:MM:SS " "this is a long comment that should span multiple lines if the test is working correctly."
171
-test comment-30 {$RESULT eq "HH:MM:SS this is a long comment that should span multiple lines if the test\n is working correctly.\n(2 lines output)"}
172
-
173
-###############################################################################
174
-
175
-fossil test-comment-format --width 78 --legacy --decode "HH:MM:SS " "this is a long comment that should span multiple lines if the test is working correctly. more text here describing the issue.\\nanother line here..................................................................................*"
176
-test comment-31 {$RESULT eq "HH:MM:SS this is a long comment that should span multiple lines if the test\n is working correctly. more text here describing the issue. another\n line\n here.................................................................\n .................*\n(5 lines output)"}
177
-
178
-###############################################################################
179
-
180
-fossil test-comment-format --width 78 --legacy "HH:MM:SS " "....................................................................................*"
181
-test comment-32 {$RESULT eq "HH:MM:SS .....................................................................\n ...............*\n(2 lines output)"}
182
-
183
-###############################################################################
184
-
185
-fossil test-comment-format --width 78 --legacy "HH:MM:SS " ".....................................................................*"
186
-test comment-33 {$RESULT eq "HH:MM:SS .....................................................................\n *\n(2 lines output)"}
187
-
188
-###############################################################################
189
-
190
-fossil test-comment-format --width 26 --legacy "*TEST* " "this\tis a test."
191
-test comment-34 {$RESULT eq "*TEST* this is a test.\n(1 lines output)"}
192
-
193
-###############################################################################
194
-
195
-fossil test-comment-format --width 60 --legacy "*TEST* " "this is a test......................................................................................................................."
196
-test comment-35 {$RESULT eq "*TEST* this is a\n test.................................................\n .....................................................\n .................\n(4 lines output)"}
197
-
198
-###############################################################################
199
-
200
-fossil test-comment-format --width 60 --legacy --wordbreak "*TEST* " "this is a test......................................................................................................................."
201
-test comment-36 {$RESULT eq "*TEST* this is a\n test.................................................\n .....................................................\n .................\n(4 lines output)"}
202
-
203
-###############################################################################
204
-
205
-fossil test-comment-format --width 60 --legacy "*TEST* " "this is a test......................................................................................................................."
206
-test comment-37 {$RESULT eq "*TEST* this is a\n test.................................................\n .....................................................\n .................\n(4 lines output)"}
207
-
208
-###############################################################################
209
-
210
-fossil test-comment-format --width 60 --legacy --wordbreak "*TEST* " "this is a test......................................................................................................................."
211
-test comment-38 {$RESULT eq "*TEST* this is a\n test.................................................\n .....................................................\n .................\n(4 lines output)"}
212
-
213
-###############################################################################
214
-
215
-fossil test-comment-format --width 60 --legacy "*TEST* " "one two three four five six seven eight nine ten eleven twelve"
216
-test comment-39 {$RESULT eq "*TEST* one two three four five six seven eight nine ten\n eleven twelve\n(2 lines output)"}
217
-
218
-###############################################################################
219
-
220
-fossil test-comment-format --width 60 --legacy --wordbreak "*TEST* " "one two three four five six seven eight nine ten eleven twelve"
221
-test comment-40 {$RESULT eq "*TEST* one two three four five six seven eight nine ten\n eleven twelve\n(2 lines output)"}
222
-
223
-###############################################################################
224
-
225
-fossil test-comment-format --width 60 --legacy "*TEST* " "one two three four five six seven eight nine ten eleven twelve"
226
-test comment-41 {$RESULT eq "*TEST* one two three four five six seven eight nine ten\n eleven twelve\n(2 lines output)"}
227
-
228
-###############################################################################
229
-
230
-fossil test-comment-format --width 60 --legacy --wordbreak "*TEST* " "one two three four five six seven eight nine ten eleven twelve"
231
-test comment-42 {$RESULT eq "*TEST* one two three four five six seven eight nine ten\n eleven twelve\n(2 lines output)"}
232
-
233
-###############################################################################
234
-
235
-set orig "xxxx xx xxxxxxx xxxx xxxxxx xxxxxxx, xxxxxxx, x xxxx xxxxxx xx xxxx xxxx\\nxxxxxxx xxxxx xxxx xxxx xx xxxxxxx xxxxxxx (xxxxxx xxxxxxxxx x xxxxx).\\nxxx'x xxx xxx xx xxxxx xxxx xxx xxx --xxxxxxxxxxx xxxxxx xx xx xxxx. x\\nxxxxx x xxxxxx xxxx xxxx xxxx xxxx xxxx x xxxxx xx xxx x xxxxxxxx\\nxxxxxxx."
236
-fossil test-comment-format --width 73 --decode --origbreak "" $orig
237
-test comment-43 {$RESULT eq "xxxx xx xxxxxxx xxxx xxxxxx xxxxxxx, xxxxxxx, x xxxx xxxxxx xx xxxx xxxx\nxxxxxxx xxxxx xxxx xxxx xx xxxxxxx xxxxxxx (xxxxxx xxxxxxxxx x xxxxx).\nxxx'x xxx xxx xx xxxxx xxxx xxx xxx --xxxxxxxxxxx xxxxxx xx xx xxxx. x\nxxxxx x xxxxxx xxxx xxxx xxxx xxxx xxxx x xxxxx xx xxx x xxxxxxxx\nxxxxxxx.\n(5 lines output)"}
238
-
239
-###############################################################################
240
-
241
-fossil test-comment-format --width 73 --decode --origbreak "" $orig $orig
242
-test comment-44 {$RESULT eq "xxxx xx xxxxxxx xxxx xxxxxx xxxxxxx, xxxxxxx, x xxxx xxxxxx xx xxxx xxxx\nxxxxxxx xxxxx xxxx xxxx xx xxxxxxx xxxxxxx (xxxxxx xxxxxxxxx x xxxxx).\nxxx'x xxx xxx xx xxxxx xxxx xxx xxx --xxxxxxxxxxx xxxxxx xx xx xxxx. x\nxxxxx x xxxxxx xxxx xxxx xxxx xxxx xxxx x xxxxx xx xxx x xxxxxxxx\nxxxxxxx.\n(5 lines output)"}
243
-
244
-###############################################################################
245
-
246
-fossil test-comment-format --width 73 --decode --origbreak "" "00:00:00 \[0000000000\] *CURRENT* $orig" $orig
247
-test comment-45 {$RESULT eq "00:00:00 \[0000000000\] *CURRENT* \nxxxx xx xxxxxxx xxxx xxxxxx xxxxxxx, xxxxxxx, x xxxx xxxxxx xx xxxx xxxx\nxxxxxxx xxxxx xxxx xxxx xx xxxxxxx xxxxxxx (xxxxxx xxxxxxxxx x xxxxx).\nxxx'x xxx xxx xx xxxxx xxxx xxx xxx --xxxxxxxxxxx xxxxxx xx xx xxxx. x\nxxxxx x xxxxxx xxxx xxxx xxxx xxxx xxxx x xxxxx xx xxx x xxxxxxxx\nxxxxxxx.\n(6 lines output)"}
248
-
249
-###############################################################################
250
-
251
-fossil test-comment-format --width 82 --indent 9 --decode --origbreak " " $orig
252
-test comment-46 {$RESULT eq " xxxx xx xxxxxxx xxxx xxxxxx xxxxxxx, xxxxxxx, x xxxx xxxxxx xx xxxx xxxx\n xxxxxxx xxxxx xxxx xxxx xx xxxxxxx xxxxxxx (xxxxxx xxxxxxxxx x xxxxx).\n xxx'x xxx xxx xx xxxxx xxxx xxx xxx --xxxxxxxxxxx xxxxxx xx xx xxxx. x\n xxxxx x xxxxxx xxxx xxxx xxxx xxxx xxxx x xxxxx xx xxx x xxxxxxxx\n xxxxxxx.\n(5 lines output)"}
253
-
254
-###############################################################################
255
-
256
-fossil test-comment-format --width 82 --indent 9 --decode --origbreak " " $orig $orig
257
-test comment-47 {$RESULT eq " xxxx xx xxxxxxx xxxx xxxxxx xxxxxxx, xxxxxxx, x xxxx xxxxxx xx xxxx xxxx\n xxxxxxx xxxxx xxxx xxxx xx xxxxxxx xxxxxxx (xxxxxx xxxxxxxxx x xxxxx).\n xxx'x xxx xxx xx xxxxx xxxx xxx xxx --xxxxxxxxxxx xxxxxx xx xx xxxx. x\n xxxxx x xxxxxx xxxx xxxx xxxx xxxx xxxx x xxxxx xx xxx x xxxxxxxx\n xxxxxxx.\n(5 lines output)"}
258
-
259
-###############################################################################
260
-
261
-fossil test-comment-format --width 82 --indent 9 --decode --origbreak "00:00:00 " "\[0000000000\] *CURRENT* $orig" $orig
262
-test comment-48 {$RESULT eq "00:00:00 \[0000000000\] *CURRENT* \n xxxx xx xxxxxxx xxxx xxxxxx xxxxxxx, xxxxxxx, x xxxx xxxxxx xx xxxx xxxx\n xxxxxxx xxxxx xxxx xxxx xx xxxxxxx xxxxxxx (xxxxxx xxxxxxxxx x xxxxx).\n xxx'x xxx xxx xx xxxxx xxxx xxx xxx --xxxxxxxxxxx xxxxxx xx xx xxxx. x\n xxxxx x xxxxxx xxxx xxxx xxxx xxxx xxxx x xxxxx xx xxx x xxxxxxxx\n xxxxxxx.\n(6 lines output)"}
263
-
264
-###############################################################################
265
-
266
-fossil test-comment-format --width 72 --decode --trimspace --origbreak "" $orig
267
-test comment-49 {$RESULT eq "xxxx xx xxxxxxx xxxx xxxxxx xxxxxxx, xxxxxxx, x xxxx xxxxxx xx xxxx xxxx\nxxxxxxx xxxxx xxxx xxxx xx xxxxxxx xxxxxxx (xxxxxx xxxxxxxxx x xxxxx).\nxxx'x xxx xxx xx xxxxx xxxx xxx xxx --xxxxxxxxxxx xxxxxx xx xx xxxx. x\nxxxxx x xxxxxx xxxx xxxx xxxx xxxx xxxx x xxxxx xx xxx x xxxxxxxx\nxxxxxxx.\n(5 lines output)"}
268
-
269
-###############################################################################
270
-
271
-fossil test-comment-format --width 72 --decode --trimspace --origbreak "" $orig $orig
272
-test comment-50 {$RESULT eq "xxxx xx xxxxxxx xxxx xxxxxx xxxxxxx, xxxxxxx, x xxxx xxxxxx xx xxxx xxxx\nxxxxxxx xxxxx xxxx xxxx xx xxxxxxx xxxxxxx (xxxxxx xxxxxxxxx x xxxxx).\nxxx'x xxx xxx xx xxxxx xxxx xxx xxx --xxxxxxxxxxx xxxxxx xx xx xxxx. x\nxxxxx x xxxxxx xxxx xxxx xxxx xxxx xxxx x xxxxx xx xxx x xxxxxxxx\nxxxxxxx.\n(5 lines output)"}
273
-
274
-###############################################################################
275
-
276
-fossil test-comment-format --width 72 --decode --trimspace --origbreak "" "00:00:00 \[0000000000\] *CURRENT* $orig" $orig
277
-test comment-51 {$RESULT eq "00:00:00 \[0000000000\] *CURRENT* \nxxxx xx xxxxxxx xxxx xxxxxx xxxxxxx, xxxxxxx, x xxxx xxxxxx xx xxxx xxxx\nxxxxxxx xxxxx xxxx xxxx xx xxxxxxx xxxxxxx (xxxxxx xxxxxxxxx x xxxxx).\nxxx'x xxx xxx xx xxxxx xxxx xxx xxx --xxxxxxxxxxx xxxxxx xx xx xxxx. x\nxxxxx x xxxxxx xxxx xxxx xxxx xxxx xxxx x xxxxx xx xxx x xxxxxxxx\nxxxxxxx.\n(6 lines output)"}
278
-
279
-###############################################################################
280
-
281
-fossil test-comment-format --width 81 --indent 9 --decode --trimspace --origbreak " " $orig
282
-test comment-52 {$RESULT eq " xxxx xx xxxxxxx xxxx xxxxxx xxxxxxx, xxxxxxx, x xxxx xxxxxx xx xxxx xxxx\n xxxxxxx xxxxx xxxx xxxx xx xxxxxxx xxxxxxx (xxxxxx xxxxxxxxx x xxxxx).\n xxx'x xxx xxx xx xxxxx xxxx xxx xxx --xxxxxxxxxxx xxxxxx xx xx xxxx. x\n xxxxx x xxxxxx xxxx xxxx xxxx xxxx xxxx x xxxxx xx xxx x xxxxxxxx\n xxxxxxx.\n(5 lines output)"}
283
-
284
-###############################################################################
285
-
286
-fossil test-comment-format --width 81 --indent 9 --decode --trimspace --origbreak " " $orig $orig
287
-test comment-53 {$RESULT eq " xxxx xx xxxxxxx xxxx xxxxxx xxxxxxx, xxxxxxx, x xxxx xxxxxx xx xxxx xxxx\n xxxxxxx xxxxx xxxx xxxx xx xxxxxxx xxxxxxx (xxxxxx xxxxxxxxx x xxxxx).\n xxx'x xxx xxx xx xxxxx xxxx xxx xxx --xxxxxxxxxxx xxxxxx xx xx xxxx. x\n xxxxx x xxxxxx xxxx xxxx xxxx xxxx xxxx x xxxxx xx xxx x xxxxxxxx\n xxxxxxx.\n(5 lines output)"}
288
-
289
-###############################################################################
290
-
291
-fossil test-comment-format --width 81 --indent 9 --decode --trimspace --origbreak "00:00:00 " "\[0000000000\] *CURRENT* $orig" $orig
292
-test comment-54 {$RESULT eq "00:00:00 \[0000000000\] *CURRENT* \n xxxx xx xxxxxxx xxxx xxxxxx xxxxxxx, xxxxxxx, x xxxx xxxxxx xx xxxx xxxx\n xxxxxxx xxxxx xxxx xxxx xx xxxxxxx xxxxxxx (xxxxxx xxxxxxxxx x xxxxx).\n xxx'x xxx xxx xx xxxxx xxxx xxx xxx --xxxxxxxxxxx xxxxxx xx xx xxxx. x\n xxxxx x xxxxxx xxxx xxxx xxxx xxxx xxxx x xxxxx xx xxx x xxxxxxxx\n xxxxxxx.\n(6 lines output)"}
293
-
294
-###############################################################################
295
-
296
-fossil test-comment-format --width 72 --decode --trimcrlf --origbreak "" $orig
297
-test comment-55 {$RESULT eq "xxxx xx xxxxxxx xxxx xxxxxx xxxxxxx, xxxxxxx, x xxxx xxxxxx xx xxxx xxxx\nxxxxxxx xxxxx xxxx xxxx xx xxxxxxx xxxxxxx (xxxxxx xxxxxxxxx x xxxxx).\nxxx'x xxx xxx xx xxxxx xxxx xxx xxx --xxxxxxxxxxx xxxxxx xx xx xxxx. x\nxxxxx x xxxxxx xxxx xxxx xxxx xxxx xxxx x xxxxx xx xxx x xxxxxxxx\nxxxxxxx.\n(5 lines output)"}
298
-
299
-###############################################################################
300
-
301
-fossil test-comment-format --width 72 --decode --trimcrlf --origbreak "" $orig $orig
302
-test comment-56 {$RESULT eq "xxxx xx xxxxxxx xxxx xxxxxx xxxxxxx, xxxxxxx, x xxxx xxxxxx xx xxxx xxxx\nxxxxxxx xxxxx xxxx xxxx xx xxxxxxx xxxxxxx (xxxxxx xxxxxxxxx x xxxxx).\nxxx'x xxx xxx xx xxxxx xxxx xxx xxx --xxxxxxxxxxx xxxxxx xx xx xxxx. x\nxxxxx x xxxxxx xxxx xxxx xxxx xxxx xxxx x xxxxx xx xxx x xxxxxxxx\nxxxxxxx.\n(5 lines output)"}
303
-
304
-###############################################################################
305
-
306
-fossil test-comment-format --width 72 --decode --trimcrlf --origbreak "" "00:00:00 \[0000000000\] *CURRENT* $orig" $orig
307
-test comment-57 {$RESULT eq "00:00:00 \[0000000000\] *CURRENT* \nxxxx xx xxxxxxx xxxx xxxxxx xxxxxxx, xxxxxxx, x xxxx xxxxxx xx xxxx xxxx\nxxxxxxx xxxxx xxxx xxxx xx xxxxxxx xxxxxxx (xxxxxx xxxxxxxxx x xxxxx).\nxxx'x xxx xxx xx xxxxx xxxx xxx xxx --xxxxxxxxxxx xxxxxx xx xx xxxx. x\nxxxxx x xxxxxx xxxx xxxx xxxx xxxx xxxx x xxxxx xx xxx x xxxxxxxx\nxxxxxxx.\n(6 lines output)"}
308
-
309
-###############################################################################
310
-
311
-fossil test-comment-format --width 81 --indent 9 --decode --trimcrlf --origbreak " " $orig
312
-test comment-58 {$RESULT eq " xxxx xx xxxxxxx xxxx xxxxxx xxxxxxx, xxxxxxx, x xxxx xxxxxx xx xxxx xxxx\n xxxxxxx xxxxx xxxx xxxx xx xxxxxxx xxxxxxx (xxxxxx xxxxxxxxx x xxxxx).\n xxx'x xxx xxx xx xxxxx xxxx xxx xxx --xxxxxxxxxxx xxxxxx xx xx xxxx. x\n xxxxx x xxxxxx xxxx xxxx xxxx xxxx xxxx x xxxxx xx xxx x xxxxxxxx\n xxxxxxx.\n(5 lines output)"}
313
-
314
-###############################################################################
315
-
316
-fossil test-comment-format --width 81 --indent 9 --decode --trimcrlf --origbreak " " $orig $orig
317
-test comment-59 {$RESULT eq " xxxx xx xxxxxxx xxxx xxxxxx xxxxxxx, xxxxxxx, x xxxx xxxxxx xx xxxx xxxx\n xxxxxxx xxxxx xxxx xxxx xx xxxxxxx xxxxxxx (xxxxxx xxxxxxxxx x xxxxx).\n xxx'x xxx xxx xx xxxxx xxxx xxx xxx --xxxxxxxxxxx xxxxxx xx xx xxxx. x\n xxxxx x xxxxxx xxxx xxxx xxxx xxxx xxxx x xxxxx xx xxx x xxxxxxxx\n xxxxxxx.\n(5 lines output)"}
318
-
319
-###############################################################################
320
-
321
-fossil test-comment-format --width 81 --indent 9 --decode --trimcrlf --origbreak "00:00:00 " "\[0000000000\] *CURRENT* $orig" $orig
322
-test comment-60 {$RESULT eq "00:00:00 \[0000000000\] *CURRENT* \n xxxx xx xxxxxxx xxxx xxxxxx xxxxxxx, xxxxxxx, x xxxx xxxxxx xx xxxx xxxx\n xxxxxxx xxxxx xxxx xxxx xx xxxxxxx xxxxxxx (xxxxxx xxxxxxxxx x xxxxx).\n xxx'x xxx xxx xx xxxxx xxxx xxx xxx --xxxxxxxxxxx xxxxxx xx xx xxxx. x\n xxxxx x xxxxxx xxxx xxxx xxxx xxxx xxxx x xxxxx xx xxx x xxxxxxxx\n xxxxxxx.\n(6 lines output)"}
323
-
324
-###############################################################################
325
-
326
-fossil test-comment-format --width 72 --file "" [file join $testdir "utf8-comment.txt"]
327
-test comment-61 {$RESULT eq "The comment formatter handles fullwidth and multi-byte \[äöü\] an\nd symbols \[☃\] and emoji \[💾\] characters!\n(2 lines output)"}
328
-
329
-###############################################################################
330
-
331
-fossil test-comment-format --width 72 --wordbreak --file "" [file join $testdir "utf8-comment.txt"]
332
-test comment-62 {$RESULT eq "The comment formatter handles fullwidth and multi-byte \[äöü\]\nand symbols \[☃\] and emoji \[💾\] characters!\n(2 lines output)"}
333
-
334
-###############################################################################
335
-
336
-fossil test-comment-format --width 72 --legacy --file "" [file join $testdir "utf8-comment.txt"]
337
-test comment-63 {$RESULT eq "The comment formatter handles fullwidth and multi-byte \[äöü\]\nand symbols \[☃\] and emoji \[💾\] characters!\n(2 lines output)"}
338
-
339
-###############################################################################
340
-
341
-fossil test-comment-format --width 72 --legacy --wordbreak --file "" [file join $testdir "utf8-comment.txt"]
342
-test comment-64 {$RESULT eq "The comment formatter handles fullwidth and multi-byte \[äöü\]\nand symbols \[☃\] and emoji \[💾\] characters!\n(2 lines output)"}
343
-
344
-###############################################################################
345
-
346
-test_cleanup
--- a/test/comment.test
+++ b/test/comment.test
@@ -1,346 +0,0 @@
1 #
2 # Copyright (c) 2014 D. Richard Hipp
3 #
4 # This program is free software; you can redistribute it and/or
5 # modify it under the terms of the Simplified BSD License (also
6 # known as the "2-Clause License" or "FreeBSD License".)
7 #
8 # This program is distributed in the hope that it will be useful,
9 # but without any warranty; without even the implied warranty of
10 # merchantability or fitness for a particular purpose.
11 #
12 # Author contact information:
13 # [email protected]
14 # http://www.hwaci.com/drh/
15 #
16 ############################################################################
17 #
18 # Test comment formatting and printing.
19 #
20
21 test_setup ""
22
23 ###############################################################################
24
25 fossil test-comment-format "" ""
26 test comment-1 {$RESULT eq "\n(1 lines output)"}
27
28 ###############################################################################
29
30 fossil test-comment-format --decode "" ""
31 test comment-2 {$RESULT eq "\n(1 lines output)"}
32
33 ###############################################################################
34
35 fossil test-comment-format --width 26 " " "this is a short comment."
36 test comment-3 {$RESULT eq " this is a short comment.\n(1 lines output)"}
37
38 ###############################################################################
39
40 fossil test-comment-format --width 26 --decode " " "this is a short comment."
41 test comment-4 {$RESULT eq " this is a short comment.\n(1 lines output)"}
42
43 ###############################################################################
44
45 fossil test-comment-format --width 26 "*PREFIX* " "this is a short comment."
46 test comment-5 {$RESULT eq "*PREFIX* this is a short c\n omment.\n(2 lines output)"}
47
48 ###############################################################################
49
50 fossil test-comment-format --width 26 --decode "*PREFIX* " "this is a short comment."
51 test comment-6 {$RESULT eq "*PREFIX* this is a short c\n omment.\n(2 lines output)"}
52
53 ###############################################################################
54
55 fossil test-comment-format --width 26 "" "this\\sis\\sa\\sshort\\scomment."
56 test comment-7 {$RESULT eq "this\\sis\\sa\\sshort\\scommen\nt.\n(2 lines output)"}
57
58 ###############################################################################
59
60 fossil test-comment-format --width 26 --decode "" "this\\sis\\sa\\sshort\\scomment."
61 test comment-8 {$RESULT eq "this is a short comment.\n(1 lines output)"}
62
63 ###############################################################################
64
65 fossil test-comment-format --width 78 --decode --trimspace "HH:MM:SS " "this is a long comment that should span multiple lines if the test is working correctly."
66 test comment-9 {$RESULT eq "HH:MM:SS this is a long comment that should span multiple lines if the test is\n working correctly.\n(2 lines output)"}
67
68 ###############################################################################
69
70 fossil test-comment-format --width 78 --decode --trimspace "HH:MM:SS " "this is a long comment that should span multiple lines if the test is working correctly. more text here describing the issue.\\nanother line here..................................................................................*"
71 test comment-10 {$RESULT eq "HH:MM:SS this is a long comment that should span multiple lines if the test is\n working correctly. more text here describing the issue.\n another line here....................................................\n ..............................*\n(4 lines output)"}
72
73 ###############################################################################
74
75 fossil test-comment-format --width 78 "HH:MM:SS " "....................................................................................*"
76 test comment-11 {$RESULT eq "HH:MM:SS .....................................................................\n ...............*\n(2 lines output)"}
77
78 ###############################################################################
79
80 fossil test-comment-format --width 78 "HH:MM:SS " ".....................................................................*" 78
81 test comment-12 {$RESULT eq "HH:MM:SS .....................................................................\n *\n(2 lines output)"}
82
83 ###############################################################################
84
85 fossil test-comment-format --width 26 "*TEST* " "this\tis a test."
86 test comment-13 {$RESULT eq "*TEST* this\tis a te\n st.\n(2 lines output)"}
87
88 ###############################################################################
89
90 fossil test-comment-format --width 60 "*TEST* " "this is a test......................................................................................................................."
91 test comment-14 {$RESULT eq "*TEST* this is a test.......................................\n .....................................................\n ...........................\n(3 lines output)"}
92
93 ###############################################################################
94
95 fossil test-comment-format --width 60 --wordbreak "*TEST* " "this is a test......................................................................................................................."
96 test comment-15 {$RESULT eq "*TEST* this is a\n test.................................................\n .....................................................\n .................\n(4 lines output)"}
97
98 ###############################################################################
99
100 fossil test-comment-format --width 60 "*TEST* " "this is a test......................................................................................................................."
101 test comment-16 {$RESULT eq "*TEST* this is a\n test.................................................\n .....................................................\n .................\n(4 lines output)"}
102
103 ###############################################################################
104
105 fossil test-comment-format --width 60 --wordbreak "*TEST* " "this is a test......................................................................................................................."
106 test comment-17 {$RESULT eq "*TEST* this is a\n test.................................................\n .....................................................\n .................\n(4 lines output)"}
107
108 ###############################################################################
109
110 fossil test-comment-format --width 60 "*TEST* " "one two three four five six seven eight nine ten eleven twelve"
111 test comment-18 {$RESULT eq "*TEST* one two three four five six seven eight nine ten elev\n en twelve\n(2 lines output)"}
112
113 ###############################################################################
114
115 fossil test-comment-format --width 60 --wordbreak "*TEST* " "one two three four five six seven eight nine ten eleven twelve"
116 test comment-19 {$RESULT eq "*TEST* one two three four five six seven eight nine ten\n eleven twelve\n(2 lines output)"}
117
118 ###############################################################################
119
120 fossil test-comment-format --width 60 "*TEST* " "one two three four five six seven eight nine ten eleven twelve"
121 test comment-20 {$RESULT eq "*TEST* one two three four five\n six seven eight nine ten\n eleven twelve\n(3 lines output)"}
122
123 ###############################################################################
124
125 fossil test-comment-format --width 60 --wordbreak "*TEST* " "one two three four five six seven eight nine ten eleven twelve"
126 test comment-21 {$RESULT eq "*TEST* one two three four five\n six seven eight nine ten\n eleven twelve\n(3 lines output)"}
127
128 ###############################################################################
129
130 fossil test-comment-format --legacy "" ""
131 test comment-22 {$RESULT eq "\n(1 lines output)"}
132
133 ###############################################################################
134
135 fossil test-comment-format --legacy --decode "" ""
136 test comment-23 {$RESULT eq "\n(1 lines output)"}
137
138 ###############################################################################
139
140 fossil test-comment-format --width 26 --legacy " " "this is a short comment."
141 test comment-24 {$RESULT eq " this is a short comment.\n(1 lines output)"}
142
143 ###############################################################################
144
145 fossil test-comment-format --width 26 --legacy --decode " " "this is a short comment."
146 test comment-25 {$RESULT eq " this is a short comment.\n(1 lines output)"}
147
148 ###############################################################################
149
150 fossil test-comment-format --width 25 --legacy "*PREFIX* " "this is a short comment."
151 test comment-26 {$RESULT eq "*PREFIX* this is a short\n comment.\n(2 lines output)"}
152
153 ###############################################################################
154
155 fossil test-comment-format --width 25 --legacy --decode "*PREFIX* " "this is a short comment."
156 test comment-27 {$RESULT eq "*PREFIX* this is a short\n comment.\n(2 lines output)"}
157
158 ###############################################################################
159
160 fossil test-comment-format --width 26 --legacy "" "this\\sis\\sa\\sshort\\scomment."
161 test comment-28 {$RESULT eq "this\\sis\\sa\\sshort\\scommen\nt.\n(2 lines output)"}
162
163 ###############################################################################
164
165 fossil test-comment-format --width 26 --legacy --decode "" "this\\sis\\sa\\sshort\\scomment."
166 test comment-29 {$RESULT eq "this is a short comment.\n(1 lines output)"}
167
168 ###############################################################################
169
170 fossil test-comment-format --width 78 --legacy --decode "HH:MM:SS " "this is a long comment that should span multiple lines if the test is working correctly."
171 test comment-30 {$RESULT eq "HH:MM:SS this is a long comment that should span multiple lines if the test\n is working correctly.\n(2 lines output)"}
172
173 ###############################################################################
174
175 fossil test-comment-format --width 78 --legacy --decode "HH:MM:SS " "this is a long comment that should span multiple lines if the test is working correctly. more text here describing the issue.\\nanother line here..................................................................................*"
176 test comment-31 {$RESULT eq "HH:MM:SS this is a long comment that should span multiple lines if the test\n is working correctly. more text here describing the issue. another\n line\n here.................................................................\n .................*\n(5 lines output)"}
177
178 ###############################################################################
179
180 fossil test-comment-format --width 78 --legacy "HH:MM:SS " "....................................................................................*"
181 test comment-32 {$RESULT eq "HH:MM:SS .....................................................................\n ...............*\n(2 lines output)"}
182
183 ###############################################################################
184
185 fossil test-comment-format --width 78 --legacy "HH:MM:SS " ".....................................................................*"
186 test comment-33 {$RESULT eq "HH:MM:SS .....................................................................\n *\n(2 lines output)"}
187
188 ###############################################################################
189
190 fossil test-comment-format --width 26 --legacy "*TEST* " "this\tis a test."
191 test comment-34 {$RESULT eq "*TEST* this is a test.\n(1 lines output)"}
192
193 ###############################################################################
194
195 fossil test-comment-format --width 60 --legacy "*TEST* " "this is a test......................................................................................................................."
196 test comment-35 {$RESULT eq "*TEST* this is a\n test.................................................\n .....................................................\n .................\n(4 lines output)"}
197
198 ###############################################################################
199
200 fossil test-comment-format --width 60 --legacy --wordbreak "*TEST* " "this is a test......................................................................................................................."
201 test comment-36 {$RESULT eq "*TEST* this is a\n test.................................................\n .....................................................\n .................\n(4 lines output)"}
202
203 ###############################################################################
204
205 fossil test-comment-format --width 60 --legacy "*TEST* " "this is a test......................................................................................................................."
206 test comment-37 {$RESULT eq "*TEST* this is a\n test.................................................\n .....................................................\n .................\n(4 lines output)"}
207
208 ###############################################################################
209
210 fossil test-comment-format --width 60 --legacy --wordbreak "*TEST* " "this is a test......................................................................................................................."
211 test comment-38 {$RESULT eq "*TEST* this is a\n test.................................................\n .....................................................\n .................\n(4 lines output)"}
212
213 ###############################################################################
214
215 fossil test-comment-format --width 60 --legacy "*TEST* " "one two three four five six seven eight nine ten eleven twelve"
216 test comment-39 {$RESULT eq "*TEST* one two three four five six seven eight nine ten\n eleven twelve\n(2 lines output)"}
217
218 ###############################################################################
219
220 fossil test-comment-format --width 60 --legacy --wordbreak "*TEST* " "one two three four five six seven eight nine ten eleven twelve"
221 test comment-40 {$RESULT eq "*TEST* one two three four five six seven eight nine ten\n eleven twelve\n(2 lines output)"}
222
223 ###############################################################################
224
225 fossil test-comment-format --width 60 --legacy "*TEST* " "one two three four five six seven eight nine ten eleven twelve"
226 test comment-41 {$RESULT eq "*TEST* one two three four five six seven eight nine ten\n eleven twelve\n(2 lines output)"}
227
228 ###############################################################################
229
230 fossil test-comment-format --width 60 --legacy --wordbreak "*TEST* " "one two three four five six seven eight nine ten eleven twelve"
231 test comment-42 {$RESULT eq "*TEST* one two three four five six seven eight nine ten\n eleven twelve\n(2 lines output)"}
232
233 ###############################################################################
234
235 set orig "xxxx xx xxxxxxx xxxx xxxxxx xxxxxxx, xxxxxxx, x xxxx xxxxxx xx xxxx xxxx\\nxxxxxxx xxxxx xxxx xxxx xx xxxxxxx xxxxxxx (xxxxxx xxxxxxxxx x xxxxx).\\nxxx'x xxx xxx xx xxxxx xxxx xxx xxx --xxxxxxxxxxx xxxxxx xx xx xxxx. x\\nxxxxx x xxxxxx xxxx xxxx xxxx xxxx xxxx x xxxxx xx xxx x xxxxxxxx\\nxxxxxxx."
236 fossil test-comment-format --width 73 --decode --origbreak "" $orig
237 test comment-43 {$RESULT eq "xxxx xx xxxxxxx xxxx xxxxxx xxxxxxx, xxxxxxx, x xxxx xxxxxx xx xxxx xxxx\nxxxxxxx xxxxx xxxx xxxx xx xxxxxxx xxxxxxx (xxxxxx xxxxxxxxx x xxxxx).\nxxx'x xxx xxx xx xxxxx xxxx xxx xxx --xxxxxxxxxxx xxxxxx xx xx xxxx. x\nxxxxx x xxxxxx xxxx xxxx xxxx xxxx xxxx x xxxxx xx xxx x xxxxxxxx\nxxxxxxx.\n(5 lines output)"}
238
239 ###############################################################################
240
241 fossil test-comment-format --width 73 --decode --origbreak "" $orig $orig
242 test comment-44 {$RESULT eq "xxxx xx xxxxxxx xxxx xxxxxx xxxxxxx, xxxxxxx, x xxxx xxxxxx xx xxxx xxxx\nxxxxxxx xxxxx xxxx xxxx xx xxxxxxx xxxxxxx (xxxxxx xxxxxxxxx x xxxxx).\nxxx'x xxx xxx xx xxxxx xxxx xxx xxx --xxxxxxxxxxx xxxxxx xx xx xxxx. x\nxxxxx x xxxxxx xxxx xxxx xxxx xxxx xxxx x xxxxx xx xxx x xxxxxxxx\nxxxxxxx.\n(5 lines output)"}
243
244 ###############################################################################
245
246 fossil test-comment-format --width 73 --decode --origbreak "" "00:00:00 \[0000000000\] *CURRENT* $orig" $orig
247 test comment-45 {$RESULT eq "00:00:00 \[0000000000\] *CURRENT* \nxxxx xx xxxxxxx xxxx xxxxxx xxxxxxx, xxxxxxx, x xxxx xxxxxx xx xxxx xxxx\nxxxxxxx xxxxx xxxx xxxx xx xxxxxxx xxxxxxx (xxxxxx xxxxxxxxx x xxxxx).\nxxx'x xxx xxx xx xxxxx xxxx xxx xxx --xxxxxxxxxxx xxxxxx xx xx xxxx. x\nxxxxx x xxxxxx xxxx xxxx xxxx xxxx xxxx x xxxxx xx xxx x xxxxxxxx\nxxxxxxx.\n(6 lines output)"}
248
249 ###############################################################################
250
251 fossil test-comment-format --width 82 --indent 9 --decode --origbreak " " $orig
252 test comment-46 {$RESULT eq " xxxx xx xxxxxxx xxxx xxxxxx xxxxxxx, xxxxxxx, x xxxx xxxxxx xx xxxx xxxx\n xxxxxxx xxxxx xxxx xxxx xx xxxxxxx xxxxxxx (xxxxxx xxxxxxxxx x xxxxx).\n xxx'x xxx xxx xx xxxxx xxxx xxx xxx --xxxxxxxxxxx xxxxxx xx xx xxxx. x\n xxxxx x xxxxxx xxxx xxxx xxxx xxxx xxxx x xxxxx xx xxx x xxxxxxxx\n xxxxxxx.\n(5 lines output)"}
253
254 ###############################################################################
255
256 fossil test-comment-format --width 82 --indent 9 --decode --origbreak " " $orig $orig
257 test comment-47 {$RESULT eq " xxxx xx xxxxxxx xxxx xxxxxx xxxxxxx, xxxxxxx, x xxxx xxxxxx xx xxxx xxxx\n xxxxxxx xxxxx xxxx xxxx xx xxxxxxx xxxxxxx (xxxxxx xxxxxxxxx x xxxxx).\n xxx'x xxx xxx xx xxxxx xxxx xxx xxx --xxxxxxxxxxx xxxxxx xx xx xxxx. x\n xxxxx x xxxxxx xxxx xxxx xxxx xxxx xxxx x xxxxx xx xxx x xxxxxxxx\n xxxxxxx.\n(5 lines output)"}
258
259 ###############################################################################
260
261 fossil test-comment-format --width 82 --indent 9 --decode --origbreak "00:00:00 " "\[0000000000\] *CURRENT* $orig" $orig
262 test comment-48 {$RESULT eq "00:00:00 \[0000000000\] *CURRENT* \n xxxx xx xxxxxxx xxxx xxxxxx xxxxxxx, xxxxxxx, x xxxx xxxxxx xx xxxx xxxx\n xxxxxxx xxxxx xxxx xxxx xx xxxxxxx xxxxxxx (xxxxxx xxxxxxxxx x xxxxx).\n xxx'x xxx xxx xx xxxxx xxxx xxx xxx --xxxxxxxxxxx xxxxxx xx xx xxxx. x\n xxxxx x xxxxxx xxxx xxxx xxxx xxxx xxxx x xxxxx xx xxx x xxxxxxxx\n xxxxxxx.\n(6 lines output)"}
263
264 ###############################################################################
265
266 fossil test-comment-format --width 72 --decode --trimspace --origbreak "" $orig
267 test comment-49 {$RESULT eq "xxxx xx xxxxxxx xxxx xxxxxx xxxxxxx, xxxxxxx, x xxxx xxxxxx xx xxxx xxxx\nxxxxxxx xxxxx xxxx xxxx xx xxxxxxx xxxxxxx (xxxxxx xxxxxxxxx x xxxxx).\nxxx'x xxx xxx xx xxxxx xxxx xxx xxx --xxxxxxxxxxx xxxxxx xx xx xxxx. x\nxxxxx x xxxxxx xxxx xxxx xxxx xxxx xxxx x xxxxx xx xxx x xxxxxxxx\nxxxxxxx.\n(5 lines output)"}
268
269 ###############################################################################
270
271 fossil test-comment-format --width 72 --decode --trimspace --origbreak "" $orig $orig
272 test comment-50 {$RESULT eq "xxxx xx xxxxxxx xxxx xxxxxx xxxxxxx, xxxxxxx, x xxxx xxxxxx xx xxxx xxxx\nxxxxxxx xxxxx xxxx xxxx xx xxxxxxx xxxxxxx (xxxxxx xxxxxxxxx x xxxxx).\nxxx'x xxx xxx xx xxxxx xxxx xxx xxx --xxxxxxxxxxx xxxxxx xx xx xxxx. x\nxxxxx x xxxxxx xxxx xxxx xxxx xxxx xxxx x xxxxx xx xxx x xxxxxxxx\nxxxxxxx.\n(5 lines output)"}
273
274 ###############################################################################
275
276 fossil test-comment-format --width 72 --decode --trimspace --origbreak "" "00:00:00 \[0000000000\] *CURRENT* $orig" $orig
277 test comment-51 {$RESULT eq "00:00:00 \[0000000000\] *CURRENT* \nxxxx xx xxxxxxx xxxx xxxxxx xxxxxxx, xxxxxxx, x xxxx xxxxxx xx xxxx xxxx\nxxxxxxx xxxxx xxxx xxxx xx xxxxxxx xxxxxxx (xxxxxx xxxxxxxxx x xxxxx).\nxxx'x xxx xxx xx xxxxx xxxx xxx xxx --xxxxxxxxxxx xxxxxx xx xx xxxx. x\nxxxxx x xxxxxx xxxx xxxx xxxx xxxx xxxx x xxxxx xx xxx x xxxxxxxx\nxxxxxxx.\n(6 lines output)"}
278
279 ###############################################################################
280
281 fossil test-comment-format --width 81 --indent 9 --decode --trimspace --origbreak " " $orig
282 test comment-52 {$RESULT eq " xxxx xx xxxxxxx xxxx xxxxxx xxxxxxx, xxxxxxx, x xxxx xxxxxx xx xxxx xxxx\n xxxxxxx xxxxx xxxx xxxx xx xxxxxxx xxxxxxx (xxxxxx xxxxxxxxx x xxxxx).\n xxx'x xxx xxx xx xxxxx xxxx xxx xxx --xxxxxxxxxxx xxxxxx xx xx xxxx. x\n xxxxx x xxxxxx xxxx xxxx xxxx xxxx xxxx x xxxxx xx xxx x xxxxxxxx\n xxxxxxx.\n(5 lines output)"}
283
284 ###############################################################################
285
286 fossil test-comment-format --width 81 --indent 9 --decode --trimspace --origbreak " " $orig $orig
287 test comment-53 {$RESULT eq " xxxx xx xxxxxxx xxxx xxxxxx xxxxxxx, xxxxxxx, x xxxx xxxxxx xx xxxx xxxx\n xxxxxxx xxxxx xxxx xxxx xx xxxxxxx xxxxxxx (xxxxxx xxxxxxxxx x xxxxx).\n xxx'x xxx xxx xx xxxxx xxxx xxx xxx --xxxxxxxxxxx xxxxxx xx xx xxxx. x\n xxxxx x xxxxxx xxxx xxxx xxxx xxxx xxxx x xxxxx xx xxx x xxxxxxxx\n xxxxxxx.\n(5 lines output)"}
288
289 ###############################################################################
290
291 fossil test-comment-format --width 81 --indent 9 --decode --trimspace --origbreak "00:00:00 " "\[0000000000\] *CURRENT* $orig" $orig
292 test comment-54 {$RESULT eq "00:00:00 \[0000000000\] *CURRENT* \n xxxx xx xxxxxxx xxxx xxxxxx xxxxxxx, xxxxxxx, x xxxx xxxxxx xx xxxx xxxx\n xxxxxxx xxxxx xxxx xxxx xx xxxxxxx xxxxxxx (xxxxxx xxxxxxxxx x xxxxx).\n xxx'x xxx xxx xx xxxxx xxxx xxx xxx --xxxxxxxxxxx xxxxxx xx xx xxxx. x\n xxxxx x xxxxxx xxxx xxxx xxxx xxxx xxxx x xxxxx xx xxx x xxxxxxxx\n xxxxxxx.\n(6 lines output)"}
293
294 ###############################################################################
295
296 fossil test-comment-format --width 72 --decode --trimcrlf --origbreak "" $orig
297 test comment-55 {$RESULT eq "xxxx xx xxxxxxx xxxx xxxxxx xxxxxxx, xxxxxxx, x xxxx xxxxxx xx xxxx xxxx\nxxxxxxx xxxxx xxxx xxxx xx xxxxxxx xxxxxxx (xxxxxx xxxxxxxxx x xxxxx).\nxxx'x xxx xxx xx xxxxx xxxx xxx xxx --xxxxxxxxxxx xxxxxx xx xx xxxx. x\nxxxxx x xxxxxx xxxx xxxx xxxx xxxx xxxx x xxxxx xx xxx x xxxxxxxx\nxxxxxxx.\n(5 lines output)"}
298
299 ###############################################################################
300
301 fossil test-comment-format --width 72 --decode --trimcrlf --origbreak "" $orig $orig
302 test comment-56 {$RESULT eq "xxxx xx xxxxxxx xxxx xxxxxx xxxxxxx, xxxxxxx, x xxxx xxxxxx xx xxxx xxxx\nxxxxxxx xxxxx xxxx xxxx xx xxxxxxx xxxxxxx (xxxxxx xxxxxxxxx x xxxxx).\nxxx'x xxx xxx xx xxxxx xxxx xxx xxx --xxxxxxxxxxx xxxxxx xx xx xxxx. x\nxxxxx x xxxxxx xxxx xxxx xxxx xxxx xxxx x xxxxx xx xxx x xxxxxxxx\nxxxxxxx.\n(5 lines output)"}
303
304 ###############################################################################
305
306 fossil test-comment-format --width 72 --decode --trimcrlf --origbreak "" "00:00:00 \[0000000000\] *CURRENT* $orig" $orig
307 test comment-57 {$RESULT eq "00:00:00 \[0000000000\] *CURRENT* \nxxxx xx xxxxxxx xxxx xxxxxx xxxxxxx, xxxxxxx, x xxxx xxxxxx xx xxxx xxxx\nxxxxxxx xxxxx xxxx xxxx xx xxxxxxx xxxxxxx (xxxxxx xxxxxxxxx x xxxxx).\nxxx'x xxx xxx xx xxxxx xxxx xxx xxx --xxxxxxxxxxx xxxxxx xx xx xxxx. x\nxxxxx x xxxxxx xxxx xxxx xxxx xxxx xxxx x xxxxx xx xxx x xxxxxxxx\nxxxxxxx.\n(6 lines output)"}
308
309 ###############################################################################
310
311 fossil test-comment-format --width 81 --indent 9 --decode --trimcrlf --origbreak " " $orig
312 test comment-58 {$RESULT eq " xxxx xx xxxxxxx xxxx xxxxxx xxxxxxx, xxxxxxx, x xxxx xxxxxx xx xxxx xxxx\n xxxxxxx xxxxx xxxx xxxx xx xxxxxxx xxxxxxx (xxxxxx xxxxxxxxx x xxxxx).\n xxx'x xxx xxx xx xxxxx xxxx xxx xxx --xxxxxxxxxxx xxxxxx xx xx xxxx. x\n xxxxx x xxxxxx xxxx xxxx xxxx xxxx xxxx x xxxxx xx xxx x xxxxxxxx\n xxxxxxx.\n(5 lines output)"}
313
314 ###############################################################################
315
316 fossil test-comment-format --width 81 --indent 9 --decode --trimcrlf --origbreak " " $orig $orig
317 test comment-59 {$RESULT eq " xxxx xx xxxxxxx xxxx xxxxxx xxxxxxx, xxxxxxx, x xxxx xxxxxx xx xxxx xxxx\n xxxxxxx xxxxx xxxx xxxx xx xxxxxxx xxxxxxx (xxxxxx xxxxxxxxx x xxxxx).\n xxx'x xxx xxx xx xxxxx xxxx xxx xxx --xxxxxxxxxxx xxxxxx xx xx xxxx. x\n xxxxx x xxxxxx xxxx xxxx xxxx xxxx xxxx x xxxxx xx xxx x xxxxxxxx\n xxxxxxx.\n(5 lines output)"}
318
319 ###############################################################################
320
321 fossil test-comment-format --width 81 --indent 9 --decode --trimcrlf --origbreak "00:00:00 " "\[0000000000\] *CURRENT* $orig" $orig
322 test comment-60 {$RESULT eq "00:00:00 \[0000000000\] *CURRENT* \n xxxx xx xxxxxxx xxxx xxxxxx xxxxxxx, xxxxxxx, x xxxx xxxxxx xx xxxx xxxx\n xxxxxxx xxxxx xxxx xxxx xx xxxxxxx xxxxxxx (xxxxxx xxxxxxxxx x xxxxx).\n xxx'x xxx xxx xx xxxxx xxxx xxx xxx --xxxxxxxxxxx xxxxxx xx xx xxxx. x\n xxxxx x xxxxxx xxxx xxxx xxxx xxxx xxxx x xxxxx xx xxx x xxxxxxxx\n xxxxxxx.\n(6 lines output)"}
323
324 ###############################################################################
325
326 fossil test-comment-format --width 72 --file "" [file join $testdir "utf8-comment.txt"]
327 test comment-61 {$RESULT eq "The comment formatter handles fullwidth and multi-byte \[äöü\] an\nd symbols \[☃\] and emoji \[💾\] characters!\n(2 lines output)"}
328
329 ###############################################################################
330
331 fossil test-comment-format --width 72 --wordbreak --file "" [file join $testdir "utf8-comment.txt"]
332 test comment-62 {$RESULT eq "The comment formatter handles fullwidth and multi-byte \[äöü\]\nand symbols \[☃\] and emoji \[💾\] characters!\n(2 lines output)"}
333
334 ###############################################################################
335
336 fossil test-comment-format --width 72 --legacy --file "" [file join $testdir "utf8-comment.txt"]
337 test comment-63 {$RESULT eq "The comment formatter handles fullwidth and multi-byte \[äöü\]\nand symbols \[☃\] and emoji \[💾\] characters!\n(2 lines output)"}
338
339 ###############################################################################
340
341 fossil test-comment-format --width 72 --legacy --wordbreak --file "" [file join $testdir "utf8-comment.txt"]
342 test comment-64 {$RESULT eq "The comment formatter handles fullwidth and multi-byte \[äöü\]\nand symbols \[☃\] and emoji \[💾\] characters!\n(2 lines output)"}
343
344 ###############################################################################
345
346 test_cleanup
--- a/test/comment.test
+++ b/test/comment.test
@@ -1,346 +0,0 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
--- tools/makemake.tcl
+++ tools/makemake.tcl
@@ -567,18 +567,19 @@
567567
$(XTCC) $(PIKCHR_OPTIONS) -c $(SRCDIR_extsrc)/pikchr.c -o $@
568568
569569
$(OBJDIR)/cson_amalgamation.o: $(SRCDIR_extsrc)/cson_amalgamation.c
570570
$(XTCC) -c $(SRCDIR_extsrc)/cson_amalgamation.c -o $@
571571
572
-$(SRCDIR_extsrc)/pikchr.js: $(SRCDIR_extsrc)/pikchr.c
572
+$(SRCDIR_extsrc)/pikchr.js: $(SRCDIR_extsrc)/pikchr.c $(MAKEFILE_LIST)
573573
$(EMCC_WRAPPER) -o $@ $(EMCC_OPT) --no-entry <<<NEXT_LINE>>>
574
- -sEXPORTED_RUNTIME_METHODS=cwrap,setValue,getValue,stackSave,stackRestore <<<NEXT_LINE>>>
575
- -sEXPORTED_FUNCTIONS=_pikchr $(SRCDIR_extsrc)/pikchr.c <<<NEXT_LINE>>>
574
+ -sEXPORTED_RUNTIME_METHODS=cwrap,ccall,setValue,getValue,stackSave,stackAlloc,stackRestore <<<NEXT_LINE>>>
575
+ -sEXPORTED_FUNCTIONS=_pikchr,_pikchr_version $(SRCDIR_extsrc)/pikchr.c <<<NEXT_LINE>>>
576576
-sENVIRONMENT=web <<<NEXT_LINE>>>
577577
-sMODULARIZE <<<NEXT_LINE>>>
578578
-sEXPORT_NAME=initPikchrModule <<<NEXT_LINE>>>
579579
--minify 0
580
+ $(TCLSH) $(TOPDIR)/tools/randomize-js-names.tcl $(SRCDIR_extsrc)
580581
@chmod -x $(SRCDIR_extsrc)/pikchr.wasm
581582
wasm: $(SRCDIR_extsrc)/pikchr.js
582583
583584
#
584585
# compile_commands.json support...
585586
586587
ADDED tools/randomize-js-names.tcl
--- tools/makemake.tcl
+++ tools/makemake.tcl
@@ -567,18 +567,19 @@
567 $(XTCC) $(PIKCHR_OPTIONS) -c $(SRCDIR_extsrc)/pikchr.c -o $@
568
569 $(OBJDIR)/cson_amalgamation.o: $(SRCDIR_extsrc)/cson_amalgamation.c
570 $(XTCC) -c $(SRCDIR_extsrc)/cson_amalgamation.c -o $@
571
572 $(SRCDIR_extsrc)/pikchr.js: $(SRCDIR_extsrc)/pikchr.c
573 $(EMCC_WRAPPER) -o $@ $(EMCC_OPT) --no-entry <<<NEXT_LINE>>>
574 -sEXPORTED_RUNTIME_METHODS=cwrap,setValue,getValue,stackSave,stackRestore <<<NEXT_LINE>>>
575 -sEXPORTED_FUNCTIONS=_pikchr $(SRCDIR_extsrc)/pikchr.c <<<NEXT_LINE>>>
576 -sENVIRONMENT=web <<<NEXT_LINE>>>
577 -sMODULARIZE <<<NEXT_LINE>>>
578 -sEXPORT_NAME=initPikchrModule <<<NEXT_LINE>>>
579 --minify 0
 
580 @chmod -x $(SRCDIR_extsrc)/pikchr.wasm
581 wasm: $(SRCDIR_extsrc)/pikchr.js
582
583 #
584 # compile_commands.json support...
585
586 DDED tools/randomize-js-names.tcl
--- tools/makemake.tcl
+++ tools/makemake.tcl
@@ -567,18 +567,19 @@
567 $(XTCC) $(PIKCHR_OPTIONS) -c $(SRCDIR_extsrc)/pikchr.c -o $@
568
569 $(OBJDIR)/cson_amalgamation.o: $(SRCDIR_extsrc)/cson_amalgamation.c
570 $(XTCC) -c $(SRCDIR_extsrc)/cson_amalgamation.c -o $@
571
572 $(SRCDIR_extsrc)/pikchr.js: $(SRCDIR_extsrc)/pikchr.c $(MAKEFILE_LIST)
573 $(EMCC_WRAPPER) -o $@ $(EMCC_OPT) --no-entry <<<NEXT_LINE>>>
574 -sEXPORTED_RUNTIME_METHODS=cwrap,ccall,setValue,getValue,stackSave,stackAlloc,stackRestore <<<NEXT_LINE>>>
575 -sEXPORTED_FUNCTIONS=_pikchr,_pikchr_version $(SRCDIR_extsrc)/pikchr.c <<<NEXT_LINE>>>
576 -sENVIRONMENT=web <<<NEXT_LINE>>>
577 -sMODULARIZE <<<NEXT_LINE>>>
578 -sEXPORT_NAME=initPikchrModule <<<NEXT_LINE>>>
579 --minify 0
580 $(TCLSH) $(TOPDIR)/tools/randomize-js-names.tcl $(SRCDIR_extsrc)
581 @chmod -x $(SRCDIR_extsrc)/pikchr.wasm
582 wasm: $(SRCDIR_extsrc)/pikchr.js
583
584 #
585 # compile_commands.json support...
586
587 DDED tools/randomize-js-names.tcl
--- a/tools/randomize-js-names.tcl
+++ b/tools/randomize-js-names.tcl
@@ -0,0 +1,36 @@
1
+#!/usr/bin/tclsh
2
+#
3
+# This script is run as part of "make wasm". After emcc has
4
+# run to generate extsrc/pikchr.wasm and extsrc/pikchr.js from
5
+# extsrc/pikchr.c, we need to make changes to these filenames to
6
+# work around caching problems.
7
+#
8
+# (1) in extsrc/pikchr.js -> change "pikchr.wasm" into
9
+# "pikchr-vNNNNNNNN.wasm" where Ns are random digits.
10
+#
11
+# (2) in extsrc/pikchr-worker.js -> change "pikchr-vNNNNNNNN.js"
12
+# by altering the random digits N.
13
+#
14
+set DIR extsrc
15
+if {[llength $argv]>0} {
16
+ set DIR [lindex $argv 0]
17
+}
18
+
19
+set R [expr {int(rand()*10000000000)+1000000000}]
20
+set in [open $DIR/pikchr.js rb]
21
+set f1 [read $in]
22
+close $in
23
+set f1mod [regsub {\ypikchr(-v\d+)?\.wasm\y} $f1 "pikchr-v$R.wasm"]
24
+set out [open $DIR/pikchr.js wb]
25
+puts -nonewline $out $f1mod
26
+close $out
27
+puts "modified $DIR/pikchr.js to reference \"pikchr-v$R.wasm\""
28
+
29
+set in [open $DIR/pikchr-worker.js rb]
30
+set f1 [read $in]
31
+close $in
32
+set f1mod [regsub {\ypikchr(-v\d+)?\.js\y} $f1 "pikchr-v$R.js"]
33
+set out [open $DIR/pikchr-worker.js wb]
34
+puts -nonewline $out $f1mod
35
+close $out
36
+puts "modified $DIR/pikchr-worker.js to reference \"pikchr-v$R.js\""
--- a/tools/randomize-js-names.tcl
+++ b/tools/randomize-js-names.tcl
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
--- a/tools/randomize-js-names.tcl
+++ b/tools/randomize-js-names.tcl
@@ -0,0 +1,36 @@
1 #!/usr/bin/tclsh
2 #
3 # This script is run as part of "make wasm". After emcc has
4 # run to generate extsrc/pikchr.wasm and extsrc/pikchr.js from
5 # extsrc/pikchr.c, we need to make changes to these filenames to
6 # work around caching problems.
7 #
8 # (1) in extsrc/pikchr.js -> change "pikchr.wasm" into
9 # "pikchr-vNNNNNNNN.wasm" where Ns are random digits.
10 #
11 # (2) in extsrc/pikchr-worker.js -> change "pikchr-vNNNNNNNN.js"
12 # by altering the random digits N.
13 #
14 set DIR extsrc
15 if {[llength $argv]>0} {
16 set DIR [lindex $argv 0]
17 }
18
19 set R [expr {int(rand()*10000000000)+1000000000}]
20 set in [open $DIR/pikchr.js rb]
21 set f1 [read $in]
22 close $in
23 set f1mod [regsub {\ypikchr(-v\d+)?\.wasm\y} $f1 "pikchr-v$R.wasm"]
24 set out [open $DIR/pikchr.js wb]
25 puts -nonewline $out $f1mod
26 close $out
27 puts "modified $DIR/pikchr.js to reference \"pikchr-v$R.wasm\""
28
29 set in [open $DIR/pikchr-worker.js rb]
30 set f1 [read $in]
31 close $in
32 set f1mod [regsub {\ypikchr(-v\d+)?\.js\y} $f1 "pikchr-v$R.js"]
33 set out [open $DIR/pikchr-worker.js wb]
34 puts -nonewline $out $f1mod
35 close $out
36 puts "modified $DIR/pikchr-worker.js to reference \"pikchr-v$R.js\""
+3 -1
--- www/build.wiki
+++ www/build.wiki
@@ -491,11 +491,13 @@
491491
When a new version of <tt>extsrc/pikchr.c</tt> is installed, the
492492
files <tt>pikchr.{js,wasm}</tt> will need to be recompiled to account
493493
for that. Running <tt>make wasm</tt> will, if the build is set up for
494494
the emsdk, recompile those:
495495
496
-<pre><code>$ make wasm
496
+<pre><code>$ rm extsrc/pikchr.{js,wasm}
497
+# ^^^^ that rm has proven necessary in order to ensure rebuilds
498
+$ make wasm
497499
./tools/emcc.sh -o extsrc/pikchr.js ...
498500
$ ls -la extsrc/pikchr.{js,wasm}
499501
-rw-rw-r-- 1 stephan stephan 17263 Jun 8 03:59 extsrc/pikchr.js
500502
-rw-rw-r-- 1 stephan stephan 97578 Jun 8 03:59 extsrc/pikchr.wasm
501503
</code></pre>
502504
--- www/build.wiki
+++ www/build.wiki
@@ -491,11 +491,13 @@
491 When a new version of <tt>extsrc/pikchr.c</tt> is installed, the
492 files <tt>pikchr.{js,wasm}</tt> will need to be recompiled to account
493 for that. Running <tt>make wasm</tt> will, if the build is set up for
494 the emsdk, recompile those:
495
496 <pre><code>$ make wasm
 
 
497 ./tools/emcc.sh -o extsrc/pikchr.js ...
498 $ ls -la extsrc/pikchr.{js,wasm}
499 -rw-rw-r-- 1 stephan stephan 17263 Jun 8 03:59 extsrc/pikchr.js
500 -rw-rw-r-- 1 stephan stephan 97578 Jun 8 03:59 extsrc/pikchr.wasm
501 </code></pre>
502
--- www/build.wiki
+++ www/build.wiki
@@ -491,11 +491,13 @@
491 When a new version of <tt>extsrc/pikchr.c</tt> is installed, the
492 files <tt>pikchr.{js,wasm}</tt> will need to be recompiled to account
493 for that. Running <tt>make wasm</tt> will, if the build is set up for
494 the emsdk, recompile those:
495
496 <pre><code>$ rm extsrc/pikchr.{js,wasm}
497 # ^^^^ that rm has proven necessary in order to ensure rebuilds
498 $ make wasm
499 ./tools/emcc.sh -o extsrc/pikchr.js ...
500 $ ls -la extsrc/pikchr.{js,wasm}
501 -rw-rw-r-- 1 stephan stephan 17263 Jun 8 03:59 extsrc/pikchr.js
502 -rw-rw-r-- 1 stephan stephan 97578 Jun 8 03:59 extsrc/pikchr.wasm
503 </code></pre>
504
--- www/changes.wiki
+++ www/changes.wiki
@@ -19,12 +19,13 @@
1919
branch has been changed.
2020
* When a merge conflict occurs, a new section is added to the conflict
2121
text that shows Fossil's suggested resolution to the conflict.
2222
* Add the "Hide diffs/Show diffs" toggle to web-UI diff pages that show
2323
diffs of multiple files.
24
- * Remove the --comfmtflags and --comment-format global options, which
25
- as far as I can tell are never used, but do add unnecessary complexity.
24
+ * Deprecate the --comfmtflags and --comment-format global options and
25
+ no longer list them in the built-in help, but keep them working for
26
+ backwards compatibility.
2627
Alternative TTY comment formatting can still be specified using the
2728
[/help?cmd=comment-format|comment-format setting], if desired. The
2829
default comment format is now called "canonical", not "legacy".
2930
* Enhancements to the [/help?cmd=/timeline|/timeline page]:
3031
<ol type="a">
3132
--- www/changes.wiki
+++ www/changes.wiki
@@ -19,12 +19,13 @@
19 branch has been changed.
20 * When a merge conflict occurs, a new section is added to the conflict
21 text that shows Fossil's suggested resolution to the conflict.
22 * Add the "Hide diffs/Show diffs" toggle to web-UI diff pages that show
23 diffs of multiple files.
24 * Remove the --comfmtflags and --comment-format global options, which
25 as far as I can tell are never used, but do add unnecessary complexity.
 
26 Alternative TTY comment formatting can still be specified using the
27 [/help?cmd=comment-format|comment-format setting], if desired. The
28 default comment format is now called "canonical", not "legacy".
29 * Enhancements to the [/help?cmd=/timeline|/timeline page]:
30 <ol type="a">
31
--- www/changes.wiki
+++ www/changes.wiki
@@ -19,12 +19,13 @@
19 branch has been changed.
20 * When a merge conflict occurs, a new section is added to the conflict
21 text that shows Fossil's suggested resolution to the conflict.
22 * Add the "Hide diffs/Show diffs" toggle to web-UI diff pages that show
23 diffs of multiple files.
24 * Deprecate the --comfmtflags and --comment-format global options and
25 no longer list them in the built-in help, but keep them working for
26 backwards compatibility.
27 Alternative TTY comment formatting can still be specified using the
28 [/help?cmd=comment-format|comment-format setting], if desired. The
29 default comment format is now called "canonical", not "legacy".
30 * Enhancements to the [/help?cmd=/timeline|/timeline page]:
31 <ol type="a">
32
+12 -3
--- www/env-opts.md
+++ www/env-opts.md
@@ -39,11 +39,11 @@
3939
and certain other text outputs are formatted for display. The flags are
4040
individual bits in `NUMBER`, which must be specified in base 10:
4141
4242
* _0_ &mdash; Uses the revised algorithm with no special handling.
4343
44
- * _1_ &mdash; Uses the legacy algorithm, other flags are ignored.
44
+ * _1_ &mdash; Uses the canonical algorithm, other flags are ignored.
4545
4646
* _2_ &mdash; Trims leading and trailing carriage-returns and line-feeds
4747
where they do not materially impact pre-existing formatting
4848
(i.e. at the start of the comment string _and_ right before
4949
line indentation).
@@ -60,10 +60,15 @@
6060
preserving more of the pre-existing formatting.
6161
6262
6363
`--comment-format NUMBER`: Alias for `--comfmtflags NUMBER`.
6464
65
+
66
+> NOTE: As of Fossil version 2.26, use of the `--comfmtflags` and
67
+> `--comment-format` options is no longer recommended and they are
68
+> no longer documented, but retained for backwards compatibility.
69
+
6570
6671
`--errorlog ERRLOG`: Name a file to which fossil will log panics,
6772
errors, and warnings.
6873
6974
@@ -210,10 +215,14 @@
210215
used as the location of the `~/.fossil` file.
211216
212217
`LOGNAME`: Name of the logged in user on many Unix-like platforms.
213218
Used as the fossil user name if `FOSSIL_USER` is not specified. See
214219
the discussion of Fossil Username below for a lot more detail.
220
+
221
+`NO_COLOR`: If defined and not set to a `false` value (i.e. "off", "no",
222
+"false", "0"), the `fossil search` command skips colorization of console
223
+output using ANSI escape codes (VT100).
215224
216225
`PATH`: Used by most platforms to locate programs invoked without a
217226
fully qualified name. Explicitly used by `fossil ui` on certain platforms
218227
to choose the browser to launch.
219228
@@ -464,12 +473,12 @@
464473
465474
### Web browser
466475
467476
Occasionally, fossil wants to launch a web browser for the user, most
468477
obviously as part of the `fossil ui` command. In that specific case,
469
-the browser is launched pointing at the web server started by `fossil
470
-ui` listening on a private TCP port.
478
+the browser is launched pointing at the web server started by
479
+`fossil ui` listening on a private TCP port.
471480
472481
On all platforms, if the local or global settings `web-browser` is
473482
set, that is the command used to open a URL.
474483
475484
Otherwise, the specific actions vary by platform.
476485
477486
ADDED www/title-test.md
478487
ADDED www/title-test.wiki
--- www/env-opts.md
+++ www/env-opts.md
@@ -39,11 +39,11 @@
39 and certain other text outputs are formatted for display. The flags are
40 individual bits in `NUMBER`, which must be specified in base 10:
41
42 * _0_ &mdash; Uses the revised algorithm with no special handling.
43
44 * _1_ &mdash; Uses the legacy algorithm, other flags are ignored.
45
46 * _2_ &mdash; Trims leading and trailing carriage-returns and line-feeds
47 where they do not materially impact pre-existing formatting
48 (i.e. at the start of the comment string _and_ right before
49 line indentation).
@@ -60,10 +60,15 @@
60 preserving more of the pre-existing formatting.
61
62
63 `--comment-format NUMBER`: Alias for `--comfmtflags NUMBER`.
64
 
 
 
 
 
65
66 `--errorlog ERRLOG`: Name a file to which fossil will log panics,
67 errors, and warnings.
68
69
@@ -210,10 +215,14 @@
210 used as the location of the `~/.fossil` file.
211
212 `LOGNAME`: Name of the logged in user on many Unix-like platforms.
213 Used as the fossil user name if `FOSSIL_USER` is not specified. See
214 the discussion of Fossil Username below for a lot more detail.
 
 
 
 
215
216 `PATH`: Used by most platforms to locate programs invoked without a
217 fully qualified name. Explicitly used by `fossil ui` on certain platforms
218 to choose the browser to launch.
219
@@ -464,12 +473,12 @@
464
465 ### Web browser
466
467 Occasionally, fossil wants to launch a web browser for the user, most
468 obviously as part of the `fossil ui` command. In that specific case,
469 the browser is launched pointing at the web server started by `fossil
470 ui` listening on a private TCP port.
471
472 On all platforms, if the local or global settings `web-browser` is
473 set, that is the command used to open a URL.
474
475 Otherwise, the specific actions vary by platform.
476
477 DDED www/title-test.md
478 DDED www/title-test.wiki
--- www/env-opts.md
+++ www/env-opts.md
@@ -39,11 +39,11 @@
39 and certain other text outputs are formatted for display. The flags are
40 individual bits in `NUMBER`, which must be specified in base 10:
41
42 * _0_ &mdash; Uses the revised algorithm with no special handling.
43
44 * _1_ &mdash; Uses the canonical algorithm, other flags are ignored.
45
46 * _2_ &mdash; Trims leading and trailing carriage-returns and line-feeds
47 where they do not materially impact pre-existing formatting
48 (i.e. at the start of the comment string _and_ right before
49 line indentation).
@@ -60,10 +60,15 @@
60 preserving more of the pre-existing formatting.
61
62
63 `--comment-format NUMBER`: Alias for `--comfmtflags NUMBER`.
64
65
66 > NOTE: As of Fossil version 2.26, use of the `--comfmtflags` and
67 > `--comment-format` options is no longer recommended and they are
68 > no longer documented, but retained for backwards compatibility.
69
70
71 `--errorlog ERRLOG`: Name a file to which fossil will log panics,
72 errors, and warnings.
73
74
@@ -210,10 +215,14 @@
215 used as the location of the `~/.fossil` file.
216
217 `LOGNAME`: Name of the logged in user on many Unix-like platforms.
218 Used as the fossil user name if `FOSSIL_USER` is not specified. See
219 the discussion of Fossil Username below for a lot more detail.
220
221 `NO_COLOR`: If defined and not set to a `false` value (i.e. "off", "no",
222 "false", "0"), the `fossil search` command skips colorization of console
223 output using ANSI escape codes (VT100).
224
225 `PATH`: Used by most platforms to locate programs invoked without a
226 fully qualified name. Explicitly used by `fossil ui` on certain platforms
227 to choose the browser to launch.
228
@@ -464,12 +473,12 @@
473
474 ### Web browser
475
476 Occasionally, fossil wants to launch a web browser for the user, most
477 obviously as part of the `fossil ui` command. In that specific case,
478 the browser is launched pointing at the web server started by
479 `fossil ui` listening on a private TCP port.
480
481 On all platforms, if the local or global settings `web-browser` is
482 set, that is the command used to open a URL.
483
484 Otherwise, the specific actions vary by platform.
485
486 DDED www/title-test.md
487 DDED www/title-test.wiki
--- a/www/title-test.md
+++ b/www/title-test.md
@@ -0,0 +1,12 @@
1
+# Markdown Doc Title > & " ' < Test
2
+
3
+Test of unusual characters in the title of Markdown formatted documents.
4
+The title should read:
5
+
6
+> Markdown Doc Title > & " ' < Test
7
+
8
+See also:
9
+
10
+ * [](/doc/trunk/www/title-test.wiki)
11
+ * [](/wiki?name=Test+Wiki+>+%26+%22+%27+%3c+Title&p)
12
+ * [](/forumpost/481ab1f9)
--- a/www/title-test.md
+++ b/www/title-test.md
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
--- a/www/title-test.md
+++ b/www/title-test.md
@@ -0,0 +1,12 @@
1 # Markdown Doc Title > & " ' < Test
2
3 Test of unusual characters in the title of Markdown formatted documents.
4 The title should read:
5
6 > Markdown Doc Title > & " ' < Test
7
8 See also:
9
10 * [](/doc/trunk/www/title-test.wiki)
11 * [](/wiki?name=Test+Wiki+>+%26+%22+%27+%3c+Title&p)
12 * [](/forumpost/481ab1f9)
--- a/www/title-test.wiki
+++ b/www/title-test.wiki
@@ -0,0 +1,14 @@
1
+<title>Wiki Doc Title > & " ' < Test</title>
2
+
3
+Test of unusual characters in the title of Fossil-wiki formatted documents.
4
+The title should read:
5
+
6
+<big><b><verbatim>
7
+ Wiki Doc Title > & " ' < Test
8
+</verbatim></b></big>
9
+
10
+See also:
11
+
12
+ * [/doc/trunk/www/title-test.md]
13
+ * [/wiki?name=Test+Wiki+>+%26+%22+%27+%3c+Title&p]
14
+ * [/forumpost/481ab1f9]
--- a/www/title-test.wiki
+++ b/www/title-test.wiki
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
--- a/www/title-test.wiki
+++ b/www/title-test.wiki
@@ -0,0 +1,14 @@
1 <title>Wiki Doc Title > & " ' < Test</title>
2
3 Test of unusual characters in the title of Fossil-wiki formatted documents.
4 The title should read:
5
6 <big><b><verbatim>
7 Wiki Doc Title > & " ' < Test
8 </verbatim></b></big>
9
10 See also:
11
12 * [/doc/trunk/www/title-test.md]
13 * [/wiki?name=Test+Wiki+>+%26+%22+%27+%3c+Title&p]
14 * [/forumpost/481ab1f9]

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button