Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Symbol usage reporting to stderr |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
d3e21eafae2346fa8f9c88fc41f029d6 |
User & Date: | alaric 2013-07-13 09:38:26 |
Context
2013-07-13
| ||
12:55 | Report on symbols defined and used, but only once. check-in: 4e9baf7538 user: alaric tags: trunk | |
09:38 | Symbol usage reporting to stderr check-in: d3e21eafae user: alaric tags: trunk | |
2013-07-10
| ||
13:59 | Fixed homepage links check-in: 200f8a6c40 user: alaric tags: trunk | |
Changes
Changes to METADATA.rdf.
1 2 | <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns="http://usefulinc.com/ns/doap#" xmlns:foaf="http://xmlns.com/foaf/0.1/" xmlns:admin="http://webns.net/mvcb/"> <Project rdf:about="http://www.kitten-technologies.co.uk/project/banterpixra"> | | | | 1 2 3 4 5 6 7 8 9 10 11 | <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns="http://usefulinc.com/ns/doap#" xmlns:foaf="http://xmlns.com/foaf/0.1/" xmlns:admin="http://webns.net/mvcb/"> <Project rdf:about="http://www.kitten-technologies.co.uk/project/banterpixra"> <name>banterpixra</name> <description>banterpixra is a tool for generating "railroad" syntax diagrams.</description> <homepage rdf:resource="http://www.kitten-technologies.co.uk/project/banterpixra" /> <download-page rdf:resource="http://www.kitten-technologies.co.uk/project/banterpixra/doc/trunk/DOWNLOAD.wiki" /> <bug-database rdf:resource="http://www.kitten-technologies.co.uk/project/banterpixra/reportlist" /> <programming-language>scheme</programming-language> <license rdf:resource="http://usefulinc.com/doap/licenses/bsd" /> <maintainer> <foaf:Person> |
︙ | ︙ |
Changes to README.wiki.
︙ | ︙ | |||
15 16 17 18 19 20 21 | The resulting diagram is [./banterpixra.svg] The name "banterpixra" is [http://www.lojban.org|Lojban] for "language artist", and is pronounce something like "ban-tare-pihra". The name was chosen due to my intention to use banterpixra to produce syntax diagrams for the Lojban langauge. By Lojban contention, banterpixra should never be written with a capital first letter. | > > > > > | 15 16 17 18 19 20 21 22 23 24 25 26 | The resulting diagram is [./banterpixra.svg] The name "banterpixra" is [http://www.lojban.org|Lojban] for "language artist", and is pronounce something like "ban-tare-pihra". The name was chosen due to my intention to use banterpixra to produce syntax diagrams for the Lojban langauge. By Lojban contention, banterpixra should never be written with a capital first letter. <h1>Version history</h1> * 0.2: Symbol usage report * 0.1: Initial release |
Changes to banterpixra.scm.
︙ | ︙ | |||
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 | ;; * alternate boxes, which have a set of embedded diagram objects, and render them in a vertical stack with fanning arrows. (use sxpath-lolevel) (use matchable) (use extras) (use data-structures) (use srfi-1) ;; GRAPHICS FORMATTING STUFF (define *debug-mode* #f) (define *text-cell-height* 20) (define *text-cell-width* 10) (define (text-width string) (+ *text-cell-width* (* *text-cell-width* (fold | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | | | | | 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 | ;; * alternate boxes, which have a set of embedded diagram objects, and render them in a vertical stack with fanning arrows. (use sxpath-lolevel) (use matchable) (use extras) (use data-structures) (use srfi-69) (use srfi-1) ;; KEEPING TRACK OF SYMBOLS (define-record-type symbol-stats (make-symbol-stats defined? uses) symbol-stats? (defined? symbol-defined? (setter symbol-defined?)) (uses symbol-uses (setter symbol-uses))) (define *symbols* (make-hash-table)) (define (note-symbol-defined! sym) (if (hash-table-exists? *symbols* sym) (set! (symbol-defined? (hash-table-ref *symbols* sym)) #t) (set! (hash-table-ref *symbols* sym) (make-symbol-stats #t 0)))) (define (note-symbol-used! sym) (if (hash-table-exists? *symbols* sym) (let ((stats (hash-table-ref *symbols* sym))) (set! (symbol-uses stats) (+ 1 (symbol-uses stats)))) (set! (hash-table-ref *symbols* sym) (make-symbol-stats #f 1)))) (define (report-on-symbols port) (let ((stats (hash-table-fold *symbols* (lambda (sym ss acc) (let ((defined-used (vector-ref acc 0)) (defined-unused (vector-ref acc 1)) (undefined-used (vector-ref acc 2))) (if (symbol-defined? ss) (if (> (symbol-uses ss) 0) (vector (cons sym defined-used) defined-unused undefined-used) (vector defined-used (cons sym defined-unused) undefined-used)) (vector defined-used defined-unused (cons sym undefined-used))))) (vector '() '() '())))) (let ((defined-used (vector-ref stats 0)) (defined-unused (vector-ref stats 1)) (undefined-used (vector-ref stats 2))) (fprintf port "Defined and used: ~A\n" defined-used) (fprintf port "Defined but not used: ~A\n" defined-unused) (fprintf port "Undefined, but used: ~A\n" undefined-used)))) ;; GRAPHICS FORMATTING STUFF (define *debug-mode* #f) (define *text-cell-height* 20) (define *text-cell-width* 10) (define (text-width string) (+ *text-cell-width* (* *text-cell-width* (fold (lambda (a b) (max (string-length a) b)) 0 (string-split string "\n" #t))))) ;; FIXME: Learn how to work out real text widths (define (text-height string) (+ (/ *text-cell-height* 2) (* *text-cell-height* (length (string-split string "\n" #t))))) (define *literal-width* 10) (define *literal-height* 10) |
︙ | ︙ | |||
136 137 138 139 140 141 142 | (+ (diagram-width diagram) (diagram-x diagram))) (define (diagram-outy diagram) (+ (diagram-y diagram) (diagram-outheight diagram))) (define (diagram->list diagram) (list 'x: (diagram-x diagram) | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | > | 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 | (+ (diagram-width diagram) (diagram-x diagram))) (define (diagram-outy diagram) (+ (diagram-y diagram) (diagram-outheight diagram))) (define (diagram->list diagram) (list 'x: (diagram-x diagram) 'y: (diagram-y diagram) 'width: (diagram-width diagram) 'height: (diagram-height diagram) 'inheight: (diagram-inheight diagram) 'outheight: (diagram-outheight diagram) 'type: (diagram-type diagram) 'content: (diagram-content diagram) 'elidable?: (diagram-elidable? diagram) 'children: (map diagram->list (diagram-children diagram)))) ;; Move a diagram (and its subdiagrams) by the indicated vector (define (relocate-diagram diagram dx dy) (make-diagram (+ (diagram-x diagram) dx) (+ (diagram-y diagram) dy) (diagram-width diagram) (diagram-height diagram) (diagram-inheight diagram) (diagram-outheight diagram) (diagram-type diagram) (diagram-content diagram) (diagram-elidable? diagram) (map (lambda (subdiagram) (relocate-diagram subdiagram dx dy)) (diagram-children diagram)))) ;; Type-specific constructors. ;; Each should construct its diagram with x and y equal to 0 ;; as parent container constructors will relocate them into the correct ;; positions. (define (make-terminal type content elidable?) (let ((width (+ *literal-width* (text-width content))) (height (+ *literal-height* (text-height content)))) (make-diagram 0 0 width height (/ height 2) (/ height 2) type content elidable? '()))) (define (make-literal content elidable?) (make-terminal 'literal content elidable?)) (define (make-rule content) (make-terminal 'rule (symbol->string content) #f)) (define (make-single-embed type diagram dx dy dw dh) (let ((width (+ dw (diagram-width diagram))) (height (+ dh (diagram-height diagram)))) (make-diagram 0 0 width height (+ dy (diagram-inheight diagram)) (+ dy (diagram-outheight diagram)) type #f #f (list (relocate-diagram diagram dx dy))))) (define (make-optional diagram) (make-single-embed 'optional diagram *optional-dx* *optional-dy* *optional-dw* *optional-dh*)) (define (make-one-or-more diagram) (make-single-embed 'one-or-more diagram *one-or-more-dx* *one-or-more-dy* *one-or-more-dw* *one-or-more-dh*)) (define (make-zero-or-more diagram) (make-single-embed 'zero-or-more diagram *zero-or-more-dx* *zero-or-more-dy* *zero-or-more-dw* *zero-or-more-dh*)) (define (make-comment text diagram) (let ((tw (text-width text)) (th (text-height text))) (make-diagram 0 0 (+ *comment-dw* (max (diagram-width diagram) tw)) (+ (diagram-height diagram) th *comment-dh* *comment-sep*) (+ (diagram-inheight diagram) *comment-dy*) (+ (diagram-outheight diagram) *comment-dy*) 'comment text #f (list (relocate-diagram diagram (+ *comment-dx* ;; Horizontally center the subdiagram if needed (if (> tw (diagram-width diagram)) (/ (- tw (diagram-width diagram)) 2) 0)) *comment-dy*))))) (define (make-sequence diagrams) (cond ((= (length diagrams) 0) (error "Zero-length sequences make no sense!")) ((= (length diagrams) 1) (car diagrams)) (else (let loop ((x-offset *sequence-left-margin*) (subdiagrams-so-far '()) (diagrams-to-do diagrams) (min-y 0) (max-y 0) (inheight #f) (last-outheight #f) (vertical-alignment-offset 0)) (if (null? diagrams-to-do) (make-diagram 0 0 (+ *sequence-right-margin* x-offset) (- max-y min-y) (- min-y) (- vertical-alignment-offset min-y) 'sequence #f #f (reverse (map (cut relocate-diagram <> 0 (- min-y)) subdiagrams-so-far))) (let* ((diagram (car diagrams-to-do)) (vertical-relocation (- vertical-alignment-offset (diagram-inheight diagram))) (diagram* (relocate-diagram diagram (+ x-offset *sequence-sep*) vertical-relocation))) (loop (+ x-offset *sequence-sep* (diagram-width diagram)) (cons diagram* subdiagrams-so-far) (cdr diagrams-to-do) (min min-y vertical-relocation) (max max-y (+ (diagram-height diagram) vertical-relocation)) (if inheight inheight (diagram-inheight diagram)) (diagram-outheight diagram) (+ (diagram-outheight diagram) vertical-relocation)))))))) (define (make-choice diagrams elidable?) (cond ((= (length diagrams) 0) (error "Zero-length choices make no sense!")) ((= (length diagrams) 1) (car diagrams)) (else (let loop ((y-offset (if elidable? (+ *choice-top-margin* *choice-bypass-height*) *choice-top-margin*)) (subdiagrams-so-far '()) (diagrams-to-do diagrams) (width 0)) (if (null? diagrams-to-do) (make-diagram 0 0 (+ *choice-left-margin* *choice-right-margin* width) (+ *choice-bottom-margin* y-offset) (/ (+ *choice-bottom-margin* y-offset) 2) (/ (+ *choice-bottom-margin* y-offset) 2) 'choice #f elidable? (reverse subdiagrams-so-far)) (let* ((diagram (car diagrams-to-do)) (diagram* (relocate-diagram diagram *choice-left-margin* (+ y-offset *choice-sep*)))) (loop (+ y-offset *choice-sep* (diagram-height diagram)) (cons diagram* subdiagrams-so-far) (cdr diagrams-to-do) (max width (diagram-width diagram))))))))) ;; Rule -> diagram ;; Dispatch on the syntax of rules to create the correct diagram object (define (rule->diagram rule) (cond ((string? rule) (make-literal rule #f)) ((symbol? rule) (note-symbol-used! rule) (make-rule rule)) ((pair? rule) (cond ((eq? 'elidable (car rule)) (if (not (null? (cddr rule))) (error "Too many arguments to (elidable \"literal\"): ~S" rule)) (make-literal (cadr rule) #t)) ((eq? 'optional (car rule)) |
︙ | ︙ | |||
348 349 350 351 352 353 354 | ;; (s (choice ..(optional-choice X)..)) -> (s (optional-choice ..X..)) ;; (s (choice ..(optional X)..)) -> (s (optional-choice ..X..)) ;; (s (optional-choice ..(optional X)..)) -> (s (optional-choice ..X..)) ;; else (s X) -> X (define (simplify-rule rule) (match rule | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | > | | | > | | | | | | | | | | 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 | ;; (s (choice ..(optional-choice X)..)) -> (s (optional-choice ..X..)) ;; (s (choice ..(optional X)..)) -> (s (optional-choice ..X..)) ;; (s (optional-choice ..(optional X)..)) -> (s (optional-choice ..X..)) ;; else (s X) -> X (define (simplify-rule rule) (match rule (('optional ('optional BODY)) (simplify-rule `(optional ,BODY))) (('optional ('one-or-more BODY)) (simplify-rule `(zero-or-more ,BODY))) (('zero-or-more ('optional BODY)) (simplify-rule `(zero-or-more ,BODY))) (('one-or-more ('optional BODY)) (simplify-rule `(zero-or-more ,BODY))) (('optional ('choice . BODY)) (simplify-rule `(optional-choice ,@BODY))) (('seq . BODY) (simplify-seq BODY)) (('choice . BODY) (simplify-choice BODY #f)) (('optional-choice . BODY) (simplify-choice BODY #t)) (else rule))) (define (simplify-seq rules) (cond ((= (length rules) 1) ; (seq X) -> (simplify X) (simplify-rule (car rules))) (else (let loop ((rules-to-do rules) ; (seq ...(seq X)...) -> (seq (map simplify ...X...)) (result '())) (if (null? rules-to-do) (cons 'seq (reverse result)) (let ((rule (simplify-rule (car rules-to-do)))) (if (pair? rule) (if (eq? (car rule) 'seq) (loop (append (cdr rule) (cdr rules-to-do)) ; Nested seq result) (loop (cdr rules-to-do) ; Non-seq nested rule (cons rule result))) (loop (cdr rules-to-do) ; Non-pair rule (cons rule result))))))))) (define (simplify-choice rules elidable?) (cond ((= (length rules) 1) ; (choice X) -> (simplify X) (if elidable? (simplify-rule (cons 'optional rules)) (simplify-rule (car rules)))) (else (let loop ((rules-to-do rules) ; (choice ...(choice X)...) -> (choice (map simplify ...X...)) (result '()) (final-elidable? elidable?)) (if (null? rules-to-do) (cons (if final-elidable? 'optional-choice 'choice) (reverse result)) (let ((rule (simplify-rule (car rules-to-do)))) (if (pair? rule) (cond ((eq? (car rule) 'choice) ; Nested choice (loop (append (cdr rule) (cdr rules-to-do)) result final-elidable?)) ((eq? (car rule) 'optional) ; Nested optional (loop (cons (cadr rule) (cdr rules-to-do)) result #t)) ; Result is always elidable ((eq? (car rule) 'optional-choice) ; Nested optional-choice (loop (append (cdr rule) (cdr rules-to-do)) result #t)) ; Result is always elidable (else (loop (cdr rules-to-do) ; Non-choice nested rule (cons rule result) final-elidable?))) (loop (cdr rules-to-do) ; Non-pair rule (cons rule result) final-elidable?)))))))) ;; diagram -> svg fragment rendering logic ;; This is done once the diagram tree has been constructed ;; So the final positions of things are known (define (make-rect x y w h style) `(rect (@ (x ,(number->string x)) (y ,(number->string y)) (fill "none") (stroke-width "1") ,@style (width ,(number->string w)) (height ,(number->string h))))) (define (make-rounded-blob x y w h style) `(rect (@ (x ,(number->string x)) (y ,(number->string y)) (rx ,(number->string (/ h 2))) (ry ,(number->string (/ h 2))) (fill "none") (stroke-width "1") ,@style (width ,(number->string w)) (height ,(number->string h))))) ;; (x,y) is midpoint of the text (define (make-text x y* text style) (let ((all-lines (string-split text "\n" #t))) (let loop ((lines all-lines) (y (- y* (- (/ *text-cell-height* 2)) (* *text-cell-height* (/ (length all-lines) 2)))) ;; Vertical centering (hacky) (result '())) (if (null? lines) (cons 'g result) ; Wrap result in an SVG group for neatness (loop (cdr lines) (+ y *text-cell-height*) (cons `(text (@ (x ,(number->string x)) (y ,(number->string y)) (text-anchor "middle") ,@style) ,(car lines)) result)))))) ;; coords is a list of things to turn into strings, and append with spaces between (define (coords-to-path coords) (string-join (map ->string coords) " ")) (define (make-line . coords) `(path (@ (d ,(coords-to-path coords)) (stroke-width "1") (stroke "black") (fill "none")))) ;; (bx,by) is the base of the arrowhead ;; (dx,dy) is the vector from there to the tip of the arrowhead ;; w is the ratio of one half the width of the arrowhead to the length; eg, w = 0.5 for ;; a square bounding box, and smaller for a sharper arrow. (define (make-arrow bx by dx dy w) (let* ((pdx (* w (- dy))) (pdy (* w dx)) (qdx (* w dy)) (qdy (* w (- dx))) (px (+ bx pdx)) (py (+ by pdy)) (qx (+ bx qdx)) (qy (+ by qdy)) (tx (+ bx dx)) (ty (+ by dy))) `(path (@ (d ,(coords-to-path (list 'M tx ty 'L px py 'L qx qy 'z))) (fill "black"))))) (define (make-group . paths) (list (cons 'g (append paths)))) (define (literal->svg* diagram) (make-group (make-rect (diagram-x diagram) (diagram-y diagram) (diagram-width diagram) (diagram-height diagram) (if (diagram-elidable? diagram) '((stroke "grey") (stroke-dasharray "5,5")) '((stroke "black")))) (make-text (+ (diagram-x diagram) (/ (diagram-width diagram) 2)) (+ (diagram-y diagram) (/ (diagram-height diagram) 2)) (diagram-content diagram) '((font-weight "bold") (font-family "monospace") (font-size "16"))))) (define (rule->svg* diagram) (make-group (make-rounded-blob (diagram-x diagram) (diagram-y diagram) (diagram-width diagram) (diagram-height diagram) '((stroke "black"))) (make-text (+ (diagram-x diagram) (/ (diagram-width diagram) 2)) (+ (diagram-y diagram) (/ (diagram-height diagram) 2)) (diagram-content diagram) '((font-style "italic"))))) ;; This function is highly useful in laying out graphics... (define (mid a b) (/ (+ a b) 2)) ;; Standard template for diagrams that embed a single diagram ;; with some kind of bordering (define (single->svg* diagram extra-paths) (let* ((child (car (diagram-children diagram))) ;; Calculate useful points around the border between the ;; child and the parent. ;; All these points are halfway between child and parent, in ;; different places. ; Midpoint of in connector line (ix (mid (diagram-inx diagram) (diagram-inx child))) (iy (mid (diagram-iny diagram) (diagram-iny child))) ; Point to left of top left of child (p1x ix) (p1y (diagram-y child)) ; Point above top left of child (p2x (diagram-x child)) (p2y (mid (diagram-y diagram) (diagram-y child))) ; Point above top right of child (p3x (diagram-outx child)) (p3y p2y) ; Point to right of top right of child (p4x (mid (diagram-outx child) (diagram-outx diagram))) (p4y (diagram-y child)) ; Midpoint of out connector line (ox p4x) (oy (mid (diagram-outy child) (diagram-outy diagram))) ; Point to right of bottom right of child (p5x p4x) (p5y (+ (diagram-y child) (diagram-height child))) (bottom-y (+ (diagram-y diagram) (diagram-height diagram))) ; Point below bottom right of child (p6x p3x) (p6y (mid p5y bottom-y)) ; Point below bottom left of child (p7x (diagram-inx child)) (p7y p6y) ; Point to left of bottom left of child (p8x ix) (p8y p5y)) (make-group (list ; In connector line (make-line 'M (diagram-inx diagram) (diagram-iny diagram) 'L (diagram-inx child) (diagram-iny child)) ; Out connector line (make-line 'M (diagram-outx child) (diagram-outy child) 'L (diagram-outx diagram) (diagram-outy diagram))) ; Type-specific paths (extra-paths ix iy p1x p1y p2x p2y p3x p3y p4x p4y ox oy p5x p5y p6x p6y p7x p7y p8x p8y) (diagram->svg* child)))) (define (optional->svg* diagram) (single->svg* diagram (lambda (ix iy p1x p1y p2x p2y p3x p3y p4x p4y ox oy p5x p5y p6x p6y p7x p7y p8x p8y) (list ; Bypass path (make-line 'M (diagram-inx diagram) (diagram-iny diagram) 'Q ix iy p1x p1y 'Q p1x p2y p2x p2y 'L p3x p3y 'Q p4x p3y p4x p4y 'Q ox oy (diagram-outx diagram) (diagram-outy diagram)) ;; Bypass arrow (make-arrow (mid p2x p3x) p3y (+ (/ *optional-dy* 2)) 0 0.5))))) (define (one-or-more->svg* diagram) (let* ((child (car (diagram-children diagram)))) (single->svg* diagram (lambda (ix iy p1x p1y p2x p2y p3x p3y p4x p4y ox oy p5x p5y p6x p6y p7x p7y p8x p8y) (list ; Loopback path (make-line 'M (diagram-inx child) (diagram-iny child) 'Q ix iy p8x p8y 'Q p8x p7y p7x p7y 'L p6x p6y 'Q p5x p6y p5x p5y 'Q ox oy (diagram-outx child) (diagram-outy child)) ; Loopback arrow (make-arrow (mid p7x p6x) p7y (- (/ *zero-or-more-dy* 2)) 0 0.5)))))) (define (zero-or-more->svg* diagram) (let* ((child (car (diagram-children diagram)))) (single->svg* diagram (lambda (ix iy p1x p1y p2x p2y p3x p3y p4x p4y ox oy p5x p5y p6x p6y p7x p7y p8x p8y) (list ; Bypass path (make-line 'M (diagram-inx diagram) (diagram-iny diagram) 'Q ix iy p1x p1y 'Q p1x p2y p2x p2y 'L p3x p3y 'Q p4x p3y p4x p4y 'Q ox oy (diagram-outx diagram) (diagram-outy diagram)) ; Bypass arrow (make-arrow (mid p2x p3x) p3y (+ (/ *optional-dy* 2)) 0 0.5) ; Loopback path (make-line 'M (diagram-inx child) (diagram-iny child) 'Q ix iy p8x p8y 'Q p8x p7y p7x p7y 'L p6x p6y 'Q p5x p6y p5x p5y 'Q ox oy (diagram-outx child) (diagram-outy child)) ; Loopback arrow (make-arrow (mid p7x p6x) p7y (- (/ *zero-or-more-dy* 2)) 0 0.5)))))) (define (sequence->svg* diagram) (let loop ((lx (diagram-inx diagram)) (ly (diagram-iny diagram)) (children (diagram-children diagram)) (paths-so-far '())) (if (null? children) (make-group (cons (make-line 'M lx ly 'L (diagram-outx diagram) (diagram-outy diagram)) paths-so-far)) (let* ((child (car children))) (loop (diagram-outx child) (diagram-outy child) (cdr children) (append (cons (make-line 'M lx ly 'L (diagram-inx child) (diagram-iny child)) (diagram->svg* child)) paths-so-far)))))) (define (choice->svg* diagram) (let loop ((children (diagram-children diagram)) (paths-so-far (if (diagram-elidable? diagram) (let* ((bypass-inx (+ (diagram-x diagram) *choice-left-margin*)) (bypass-iny (+ (diagram-y diagram) *choice-top-margin* (/ *choice-bypass-height* 2))) (bypass-outx (+ (diagram-x diagram) (diagram-width diagram) (- *choice-right-margin*))) (bypass-outy bypass-iny) (midix (mid (diagram-inx diagram) bypass-inx)) (midiy (mid (diagram-iny diagram) bypass-iny)) (midox (mid bypass-outx (diagram-outx diagram))) (midoy (mid bypass-outy (diagram-outy diagram)))) (make-group ; Bypass line (make-line 'M (diagram-inx diagram) (diagram-iny diagram) 'Q midix (diagram-iny diagram) midix midiy 'Q midix bypass-iny bypass-inx bypass-iny 'L bypass-outx bypass-outy 'Q midox bypass-outy midox midoy 'Q midox (diagram-outy diagram) (diagram-outx diagram) (diagram-outy diagram)) (make-arrow (mid bypass-inx bypass-outx) bypass-iny (/ *choice-bypass-height* 2) 0 0.5))) '()))) (if (null? children) (make-group paths-so-far) (let* ((child (car children)) (midix (mid (diagram-inx diagram) (diagram-inx child))) (midiy (mid (diagram-iny diagram) (diagram-iny child))) (joinox (+ (diagram-x diagram) (diagram-width diagram) (- *choice-right-margin*))) (joinoy (diagram-outy child)) (midox (mid joinox (diagram-outx diagram))) (midoy (mid joinoy (diagram-outy diagram)))) (loop (cdr children) (append (list ; Input line (make-line 'M (diagram-inx diagram) (diagram-iny diagram) 'Q midix (diagram-iny diagram) midix midiy 'Q midix (diagram-iny child) (diagram-inx child) (diagram-iny child)) ; Output line (make-line 'M (diagram-outx child) (diagram-outy child) 'L joinox joinoy 'Q midox joinoy midox midoy 'Q midox (diagram-outy diagram) (diagram-outx diagram) (diagram-outy diagram))) (diagram->svg* child) paths-so-far)))))) (define (comment->svg* diagram) (single->svg* diagram (lambda (ix iy p1x p1y p2x p2y p3x p3y p4x p4y ox oy p5x p5y p6x p6y p7x p7y p8x p8y) (list ; Dotted box (make-rect (+ (diagram-x diagram) *comment-margin*) (+ (diagram-y diagram) *comment-margin*) (- (diagram-width diagram)(* *comment-margin* 2) ) (- (diagram-height diagram) (* *comment-margin* 2)) '((stroke-dasharray "1,3") (stroke "black"))) ; Text (make-text (+ (diagram-x diagram) (/ (diagram-width diagram) 2)) (+ p8y *comment-sep* (/ (text-height (diagram-content diagram)) 2)) (diagram-content diagram) '()))))) (define (diagram->svg* diagram) (append (list (if *debug-mode* (make-rect (diagram-x diagram) (diagram-y diagram) (diagram-width diagram) (diagram-height diagram) '((stroke "pink"))) '())) (case (diagram-type diagram) ;; Eargh what was I THINKING? Too much C programming. ((literal) (literal->svg* diagram)) ;; Dude, seriously, just put a ->svg* closure in the diagram record... ((rule) (rule->svg* diagram)) ((optional) (optional->svg* diagram)) ((one-or-more) (one-or-more->svg* diagram)) ((zero-or-more) (zero-or-more->svg* diagram)) ((sequence) (sequence->svg* diagram)) ((choice) (choice->svg* diagram)) ((comment) (comment->svg* diagram)) (else (error "Unknown diagram node type ~S in ~S" (diagram-type diagram) (diagram->list diagram)))))) ;; Wrap an SVG fragment into a complete document (define (wrap-svg width height paths) `(svg (@ (xmlns "http://www.w3.org/2000/svg") (version "1.2") (baseProfile "tiny") (viewBox ,(sprintf "0 0 ~S ~S" width height))) ,@paths)) ;; Render a ruleset (define (diagrams->svg diagrams) ;; diagrams is an alist mapping rule names to diagrams ;; We render them in a vertical stack, with labels to the left (let loop ((y-offset 0) (diagrams-to-do diagrams) (paths-so-far '()) (max-width 0)) (if (null? diagrams-to-do) (wrap-svg (+ *label-width* max-width *label-arrow*) (- y-offset *label-sep*) paths-so-far) (let* ((diagram-pair (car diagrams-to-do)) (diagram-name (car diagram-pair)) (diagram (cdr diagram-pair))) (loop (+ y-offset (diagram-height diagram) *label-sep*) (cdr diagrams-to-do) (append (make-group (list ; Label (make-text *label-indent* (+ y-offset (/ (diagram-height diagram) 2)) (symbol->string diagram-name) '((font-style "italic"))) ; Input (make-arrow (- *label-width* *label-arrow*) (+ y-offset (diagram-iny diagram)) *label-arrow* 0 0.5) ; Output (make-arrow (+ *label-width* (diagram-outx diagram)) (+ y-offset (diagram-outy diagram)) *label-arrow* 0 0.5)) (diagram->svg* (relocate-diagram diagram *label-width* y-offset))) paths-so-far) (max max-width (diagram-width diagram))))))) ;; Render a single rule (define (diagram->svg diagram) (wrap-svg (diagram-width diagram) (diagram-height diagram) (diagram->svg* diagram))) ;; Test the rule simplifier (define simplification-examples '((rule . rule) ("literal" . "literal") ((elidable "literal") . (elidable "literal")) ((optional "literal") . (optional "literal")) ((optional (optional "literal")) . (optional "literal")) ((optional (optional (optional "literal"))) . (optional "literal")) ((optional (one-or-more "literal")) . (zero-or-more "literal")) ((choice a (choice b c (choice (optional d))) (choice e)) . (optional-choice a b c d e)) )) (define (test-simplifier) (map (lambda (example) (let* ((input (car example)) (expected-output (cdr example)) (output (simplify-rule input))) (if (not (equal? output expected-output)) (error (printf "Simplifer failure: ~S -> ~S (wanted ~S)\n" input output expected-output))))) simplification-examples)) ;; Rendering Driver (define (render-single-rule rule) (let* ((simplified-rule (simplify-rule rule)) (diagram (rule->diagram simplified-rule)) (svg (diagram->svg diagram))) (map display (flatten (sxml:sxml->xml svg))))) (define (render-ruleset rules) (let* ((diagrams (map (lambda (rule-binding) (let ((rule-name (car rule-binding)) (rule-body (cdr rule-binding))) (note-symbol-defined! rule-name) (cons rule-name (rule->diagram (simplify-rule rule-body))))) rules)) (svg (diagrams->svg diagrams))) (map display (flatten (sxml:sxml->xml svg)))) (report-on-symbols (current-error-port))) ;; Command line interface (define (main args) (match args (("-d" . rest) (set! *debug-mode* #t) (main rest)) (("rule") (render-single-rule (read))) (("ruleset") (render-ruleset (read-file))) (else (fprintf (current-error-port) "Usage: banterpixra [-d] {rule|ruleset} < input > output.svg\n \t-d: Enable debug mode (adds pink boxes showing the layout model)\n \trule: Render a single rule\n \truleset: Render a set of rules\n \n Rule syntax:\n \t\"literal\" \tsymbol |
︙ | ︙ |
Changes to banterpixra.svg.
|
| > > > > > > > > > > > > > > > > > > > > > > > > > > | > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | ABS TEST: DEFINED banterpixra-command-line ABS TEST: USED ruleset-filename ABS TEST: USED rule-filename ABS TEST: USED output-svg-filename ABS TEST: DEFINED ruleset ABS TEST: USED rule-label ABS TEST: USED rule ABS TEST: DEFINED rule ABS TEST: USED rule-label ABS TEST: USED literal ABS TEST: USED literal ABS TEST: USED rule ABS TEST: USED rule ABS TEST: USED rule ABS TEST: USED rule ABS TEST: USED rule ABS TEST: USED rule ABS TEST: USED literal ABS TEST: USED rule ABS TEST: DEFINED rule-label ABS TEST: USED label-start-character ABS TEST: USED label-subsequent-character ABS TEST: DEFINED literal ABS TEST: DEFINED label-start-character ABS TEST: DEFINED label-subsequent-character ABS TEST: USED label-start-character <svg xmlns='http://www.w3.org/2000/svg' version='1.2' baseProfile='tiny' viewBox='0 0 1460 1275'><g><g><text x='100' y='1220.0' text-anchor='middle' font-style='italic'>label-subsequent-character</text></g><path d='M 200 1220 L 190.0 1225.0 L 190.0 1215.0 z' fill='black'/><path d='M 480 1220 L 470.0 1225.0 L 470.0 1215.0 z' fill='black'/><g><path d='M 200 1220 Q 210 1220 210 1232.5 Q 210 1245 220 1245' stroke-width='1' stroke='black' fill='none'/><path d='M 330 1245 L 450 1245 Q 460 1245 460 1232.5 Q 460 1220 470 1220' stroke-width='1' stroke='black' fill='none'/><g><rect x='220' y='1225' fill='none' stroke-width='1' stroke='black' width='110' height='40'/><g><text x='275' y='1245.0' text-anchor='middle' font-weight='bold' font-family='monospace' font-size='16'>[0-9+-.@]</text></g></g><path d='M 200 1220 Q 210 1220 210 1207.5 Q 210 1195 220 1195' stroke-width='1' stroke='black' fill='none'/><path d='M 450 1195 L 450 1195 Q 460 1195 460 1207.5 Q 460 1220 470 1220' stroke-width='1' stroke='black' fill='none'/><g><rect x='220' y='1175' rx='20' ry='20' fill='none' stroke-width='1' stroke='black' width='230' height='40'/><g><text x='335' y='1195.0' text-anchor='middle' font-style='italic'>label-start-character</text></g></g></g></g><g><g><text x='100' y='1135.0' text-anchor='middle' font-style='italic'>label-start-character</text></g><path d='M 200 1135 L 190.0 1140.0 L 190.0 1130.0 z' fill='black'/><path d='M 440 1135 L 430.0 1140.0 L 430.0 1130.0 z' fill='black'/><g><rect x='200' y='1115' fill='none' stroke-width='1' stroke='black' width='230' height='40'/><g><text x='315' y='1135.0' text-anchor='middle' font-weight='bold' font-family='monospace' font-size='16'>[a-zA-Z!$%&*/:<=>^?_]</text></g></g></g><g><g><text x='100' y='1040.0' text-anchor='middle' font-style='italic'>literal</text></g><path d='M 200 1040 L 190.0 1045.0 L 190.0 1035.0 z' fill='black'/><path d='M 540 1040 L 530.0 1045.0 L 530.0 1035.0 z' fill='black'/><g><path d='M 520 1040 L 530 1040' stroke-width='1' stroke='black' fill='none'/><path d='M 480 1040 L 490 1040' stroke-width='1' stroke='black' fill='none'/><g><rect x='490' y='1020' fill='none' stroke-width='1' stroke='black' width='30' height='40'/><g><text x='505' y='1040.0' text-anchor='middle' font-weight='bold' font-family='monospace' font-size='16'>"</text></g></g><path d='M 250 1040 L 260 1040' stroke-width='1' stroke='black' fill='none'/><g><path d='M 260 1040 L 280 1040' stroke-width='1' stroke='black' fill='none'/><path d='M 460 1040 L 480 1040' stroke-width='1' stroke='black' fill='none'/><path d='M 260 1040 Q 270 1040 270 985 Q 270 980 280 980 L 460 980 Q 470 980 470 985 Q 470 1040 480 1040' stroke-width='1' stroke='black' fill='none'/><path d='M 375 980 L 370.0 982.5 L 370.0 977.5 z' fill='black'/><path d='M 280 1040 Q 270 1040 270 1095 Q 270 1100 280 1100 L 460 1100 Q 470 1100 470 1095 Q 470 1040 460 1040' stroke-width='1' stroke='black' fill='none'/><path d='M 365 1100 L 370.0 1097.5 L 370.0 1102.5 z' fill='black'/><g><path d='M 280 1040 Q 290 1040 290 1052.5 Q 290 1065 300 1065' stroke-width='1' stroke='black' fill='none'/><path d='M 440 1065 L 440 1065 Q 450 1065 450 1052.5 Q 450 1040 460 1040' stroke-width='1' stroke='black' fill='none'/><g><path d='M 430 1065 L 440 1065' stroke-width='1' stroke='black' fill='none'/><path d='M 350 1065 L 360 1065' stroke-width='1' stroke='black' fill='none'/><g><rect x='360' y='1045' fill='none' stroke-width='1' stroke='black' width='70' height='40'/><g><text x='395' y='1065.0' text-anchor='middle' font-weight='bold' font-family='monospace' font-size='16'>["\n]</text></g></g><path d='M 300 1065 L 320 1065' stroke-width='1' stroke='black' fill='none'/><g><rect x='320' y='1045' fill='none' stroke-width='1' stroke='black' width='30' height='40'/><g><text x='335' y='1065.0' text-anchor='middle' font-weight='bold' font-family='monospace' font-size='16'>\</text></g></g></g><path d='M 280 1040 Q 290 1040 290 1027.5 Q 290 1015 300 1015' stroke-width='1' stroke='black' fill='none'/><path d='M 360 1015 L 440 1015 Q 450 1015 450 1027.5 Q 450 1040 460 1040' stroke-width='1' stroke='black' fill='none'/><g><rect x='300' y='995' fill='none' stroke-width='1' stroke='black' width='60' height='40'/><g><text x='330' y='1015.0' text-anchor='middle' font-weight='bold' font-family='monospace' font-size='16'>[^"]</text></g></g></g></g><path d='M 200 1040 L 220 1040' stroke-width='1' stroke='black' fill='none'/><g><rect x='220' y='1020' fill='none' stroke-width='1' stroke='black' width='30' height='40'/><g><text x='235' y='1040.0' text-anchor='middle' font-weight='bold' font-family='monospace' font-size='16'>"</text></g></g></g></g><g><g><text x='100' y='870.0' text-anchor='middle' font-style='italic'>rule-label</text></g><path d='M 200 870 L 190.0 875.0 L 190.0 865.0 z' fill='black'/><path d='M 840 870 L 830.0 875.0 L 830.0 865.0 z' fill='black'/><g><path d='M 200 870 Q 210 870 210 902.5 Q 210 935 220 935' stroke-width='1' stroke='black' fill='none'/><path d='M 310 935 L 810 935 Q 820 935 820 902.5 Q 820 870 830 870' stroke-width='1' stroke='black' fill='none'/><g><rect x='220' y='915' fill='none' stroke-width='1' stroke='black' width='90' height='40'/><g><text x='265' y='935.0' text-anchor='middle' font-weight='bold' font-family='monospace' font-size='16'>+|-|...</text></g></g><path d='M 200 870 Q 210 870 210 872.5 Q 210 875 220 875' stroke-width='1' stroke='black' fill='none'/><path d='M 810 875 L 810 875 Q 820 875 820 872.5 Q 820 870 830 870' stroke-width='1' stroke='black' fill='none'/><g><path d='M 800 875 L 810 875' stroke-width='1' stroke='black' fill='none'/><path d='M 470 875 L 480 875' stroke-width='1' stroke='black' fill='none'/><g><path d='M 480 875 L 500 875' stroke-width='1' stroke='black' fill='none'/><path d='M 780 875 L 800 875' stroke-width='1' stroke='black' fill='none'/><path d='M 480 875 Q 490 875 490 855 Q 490 850 500 850 L 780 850 Q 790 850 790 855 Q 790 875 800 875' stroke-width='1' stroke='black' fill='none'/><path d='M 645 850 L 640.0 852.5 L 640.0 847.5 z' fill='black'/><path d='M 500 875 Q 490 875 490 895 Q 490 900 500 900 L 780 900 Q 790 900 790 895 Q 790 875 780 875' stroke-width='1' stroke='black' fill='none'/><path d='M 635 900 L 640.0 897.5 L 640.0 902.5 z' fill='black'/><g><rect x='500' y='855' rx='20' ry='20' fill='none' stroke-width='1' stroke='black' width='280' height='40'/><g><text x='640' y='875.0' text-anchor='middle' font-style='italic'>label-subsequent-character</text></g></g></g><path d='M 220 875 L 240 875' stroke-width='1' stroke='black' fill='none'/><g><rect x='240' y='855' rx='20' ry='20' fill='none' stroke-width='1' stroke='black' width='230' height='40'/><g><text x='355' y='875.0' text-anchor='middle' font-style='italic'>label-start-character</text></g></g></g><path d='M 200 870 Q 210 870 210 837.5 Q 210 805 220 805' stroke-width='1' stroke='black' fill='none'/><path d='M 430 805 L 810 805 Q 820 805 820 837.5 Q 820 870 830 870' stroke-width='1' stroke='black' fill='none'/><g><path d='M 420 805 L 430 805' stroke-width='1' stroke='black' fill='none'/><path d='M 380 805 L 390 805' stroke-width='1' stroke='black' fill='none'/><g><rect x='390' y='785' fill='none' stroke-width='1' stroke='black' width='30' height='40'/><g><text x='405' y='805.0' text-anchor='middle' font-weight='bold' font-family='monospace' font-size='16'>|</text></g></g><path d='M 270 805 L 280 805' stroke-width='1' stroke='black' fill='none'/><g><path d='M 280 805 L 300 805' stroke-width='1' stroke='black' fill='none'/><path d='M 360 805 L 380 805' stroke-width='1' stroke='black' fill='none'/><path d='M 300 805 Q 290 805 290 825 Q 290 830 300 830 L 360 830 Q 370 830 370 825 Q 370 805 360 805' stroke-width='1' stroke='black' fill='none'/><path d='M 325 830 L 330.0 827.5 L 330.0 832.5 z' fill='black'/><g><rect x='300' y='785' fill='none' stroke-width='1' stroke='black' width='60' height='40'/><g><text x='330' y='805.0' text-anchor='middle' font-weight='bold' font-family='monospace' font-size='16'>[^|]</text></g></g></g><path d='M 220 805 L 240 805' stroke-width='1' stroke='black' fill='none'/><g><rect x='240' y='785' fill='none' stroke-width='1' stroke='black' width='30' height='40'/><g><text x='255' y='805.0' text-anchor='middle' font-weight='bold' font-family='monospace' font-size='16'>|</text></g></g></g></g></g><g><g><text x='100' y='495.0' text-anchor='middle' font-style='italic'>rule</text></g><path d='M 200 495 L 190.0 500.0 L 190.0 490.0 z' fill='black'/><path d='M 680 495 L 670.0 500.0 L 670.0 490.0 z' fill='black'/><g><path d='M 200 495 Q 210 495 210 615 Q 210 735 220 735' stroke-width='1' stroke='black' fill='none'/><path d='M 640 735 L 650 735 Q 660 735 660 615 Q 660 495 670 495' stroke-width='1' stroke='black' fill='none'/><g><path d='M 630 735 L 640 735' stroke-width='1' stroke='black' fill='none'/><path d='M 590 735 L 600 735' stroke-width='1' stroke='black' fill='none'/><g><rect x='600' y='715' fill='none' stroke-width='1' stroke='black' width='30' height='40'/><g><text x='615' y='735.0' text-anchor='middle' font-weight='bold' font-family='monospace' font-size='16'>)</text></g></g><path d='M 520 735 L 530 735' stroke-width='1' stroke='black' fill='none'/><g><rect x='530' y='715' rx='20' ry='20' fill='none' stroke-width='1' stroke='black' width='60' height='40'/><g><text x='560' y='735.0' text-anchor='middle' font-style='italic'>rule</text></g></g><path d='M 480 735 L 490 735' stroke-width='1' stroke='black' fill='none'/><g><rect x='490' y='715' fill='none' stroke-width='1' stroke='black' width='30' height='40'/><g><text x='505' y='735.0' text-anchor='middle' font-weight='bold' font-family='monospace' font-size='16'> </text></g></g><path d='M 380 735 L 390 735' stroke-width='1' stroke='black' fill='none'/><g><rect x='390' y='715' rx='20' ry='20' fill='none' stroke-width='1' stroke='black' width='90' height='40'/><g><text x='435' y='735.0' text-anchor='middle' font-style='italic'>literal</text></g></g><path d='M 340 735 L 350 735' stroke-width='1' stroke='black' fill='none'/><g><rect x='350' y='715' fill='none' stroke-width='1' stroke='black' width='30' height='40'/><g><text x='365' y='735.0' text-anchor='middle' font-weight='bold' font-family='monospace' font-size='16'> </text></g></g><path d='M 220 735 L 240 735' stroke-width='1' stroke='black' fill='none'/><g><rect x='240' y='715' fill='none' stroke-width='1' stroke='black' width='100' height='40'/><g><text x='290' y='735.0' text-anchor='middle' font-weight='bold' font-family='monospace' font-size='16'>(comment</text></g></g></g><path d='M 200 495 Q 210 495 210 585 Q 210 675 220 675' stroke-width='1' stroke='black' fill='none'/><path d='M 650 675 L 650 675 Q 660 675 660 585 Q 660 495 670 495' stroke-width='1' stroke='black' fill='none'/><g><path d='M 640 675 L 650 675' stroke-width='1' stroke='black' fill='none'/><path d='M 600 675 L 610 675' stroke-width='1' stroke='black' fill='none'/><g><rect x='610' y='655' fill='none' stroke-width='1' stroke='black' width='30' height='40'/><g><text x='625' y='675.0' text-anchor='middle' font-weight='bold' font-family='monospace' font-size='16'>)</text></g></g><path d='M 420 675 L 430 675' stroke-width='1' stroke='black' fill='none'/><g><path d='M 430 675 L 450 675' stroke-width='1' stroke='black' fill='none'/><path d='M 580 675 L 600 675' stroke-width='1' stroke='black' fill='none'/><path d='M 450 675 Q 440 675 440 695 Q 440 700 450 700 L 580 700 Q 590 700 590 695 Q 590 675 580 675' stroke-width='1' stroke='black' fill='none'/><path d='M 510 700 L 515.0 697.5 L 515.0 702.5 z' fill='black'/><g><path d='M 570 675 L 580 675' stroke-width='1' stroke='black' fill='none'/><path d='M 500 675 L 510 675' stroke-width='1' stroke='black' fill='none'/><g><rect x='510' y='655' rx='20' ry='20' fill='none' stroke-width='1' stroke='black' width='60' height='40'/><g><text x='540' y='675.0' text-anchor='middle' font-style='italic'>rule</text></g></g><path d='M 450 675 L 470 675' stroke-width='1' stroke='black' fill='none'/><g><rect x='470' y='655' fill='none' stroke-width='1' stroke='black' width='30' height='40'/><g><text x='485' y='675.0' text-anchor='middle' font-weight='bold' font-family='monospace' font-size='16'> </text></g></g></g></g><path d='M 220 675 L 240 675' stroke-width='1' stroke='black' fill='none'/><g><rect x='240' y='655' fill='none' stroke-width='1' stroke='black' width='180' height='40'/><g><text x='330' y='675.0' text-anchor='middle' font-weight='bold' font-family='monospace' font-size='16'>(optional-choice</text></g></g></g><path d='M 200 495 Q 210 495 210 555 Q 210 615 220 615' stroke-width='1' stroke='black' fill='none'/><path d='M 560 615 L 650 615 Q 660 615 660 555 Q 660 495 670 495' stroke-width='1' stroke='black' fill='none'/><g><path d='M 550 615 L 560 615' stroke-width='1' stroke='black' fill='none'/><path d='M 510 615 L 520 615' stroke-width='1' stroke='black' fill='none'/><g><rect x='520' y='595' fill='none' stroke-width='1' stroke='black' width='30' height='40'/><g><text x='535' y='615.0' text-anchor='middle' font-weight='bold' font-family='monospace' font-size='16'>)</text></g></g><path d='M 330 615 L 340 615' stroke-width='1' stroke='black' fill='none'/><g><path d='M 340 615 L 360 615' stroke-width='1' stroke='black' fill='none'/><path d='M 490 615 L 510 615' stroke-width='1' stroke='black' fill='none'/><path d='M 360 615 Q 350 615 350 635 Q 350 640 360 640 L 490 640 Q 500 640 500 635 Q 500 615 490 615' stroke-width='1' stroke='black' fill='none'/><path d='M 420 640 L 425.0 637.5 L 425.0 642.5 z' fill='black'/><g><path d='M 480 615 L 490 615' stroke-width='1' stroke='black' fill='none'/><path d='M 410 615 L 420 615' stroke-width='1' stroke='black' fill='none'/><g><rect x='420' y='595' rx='20' ry='20' fill='none' stroke-width='1' stroke='black' width='60' height='40'/><g><text x='450' y='615.0' text-anchor='middle' font-style='italic'>rule</text></g></g><path d='M 360 615 L 380 615' stroke-width='1' stroke='black' fill='none'/><g><rect x='380' y='595' fill='none' stroke-width='1' stroke='black' width='30' height='40'/><g><text x='395' y='615.0' text-anchor='middle' font-weight='bold' font-family='monospace' font-size='16'> </text></g></g></g></g><path d='M 220 615 L 240 615' stroke-width='1' stroke='black' fill='none'/><g><rect x='240' y='595' fill='none' stroke-width='1' stroke='black' width='90' height='40'/><g><text x='285' y='615.0' text-anchor='middle' font-weight='bold' font-family='monospace' font-size='16'>(choice</text></g></g></g><path d='M 200 495 Q 210 495 210 525 Q 210 555 220 555' stroke-width='1' stroke='black' fill='none'/><path d='M 530 555 L 650 555 Q 660 555 660 525 Q 660 495 670 495' stroke-width='1' stroke='black' fill='none'/><g><path d='M 520 555 L 530 555' stroke-width='1' stroke='black' fill='none'/><path d='M 480 555 L 490 555' stroke-width='1' stroke='black' fill='none'/><g><rect x='490' y='535' fill='none' stroke-width='1' stroke='black' width='30' height='40'/><g><text x='505' y='555.0' text-anchor='middle' font-weight='bold' font-family='monospace' font-size='16'>)</text></g></g><path d='M 300 555 L 310 555' stroke-width='1' stroke='black' fill='none'/><g><path d='M 310 555 L 330 555' stroke-width='1' stroke='black' fill='none'/><path d='M 460 555 L 480 555' stroke-width='1' stroke='black' fill='none'/><path d='M 330 555 Q 320 555 320 575 Q 320 580 330 580 L 460 580 Q 470 580 470 575 Q 470 555 460 555' stroke-width='1' stroke='black' fill='none'/><path d='M 390 580 L 395.0 577.5 L 395.0 582.5 z' fill='black'/><g><path d='M 450 555 L 460 555' stroke-width='1' stroke='black' fill='none'/><path d='M 380 555 L 390 555' stroke-width='1' stroke='black' fill='none'/><g><rect x='390' y='535' rx='20' ry='20' fill='none' stroke-width='1' stroke='black' width='60' height='40'/><g><text x='420' y='555.0' text-anchor='middle' font-style='italic'>rule</text></g></g><path d='M 330 555 L 350 555' stroke-width='1' stroke='black' fill='none'/><g><rect x='350' y='535' fill='none' stroke-width='1' stroke='black' width='30' height='40'/><g><text x='365' y='555.0' text-anchor='middle' font-weight='bold' font-family='monospace' font-size='16'> </text></g></g></g></g><path d='M 220 555 L 240 555' stroke-width='1' stroke='black' fill='none'/><g><rect x='240' y='535' fill='none' stroke-width='1' stroke='black' width='60' height='40'/><g><text x='270' y='555.0' text-anchor='middle' font-weight='bold' font-family='monospace' font-size='16'>(seq</text></g></g></g><path d='M 200 495 Q 210 495 210 500 Q 210 505 220 505' stroke-width='1' stroke='black' fill='none'/><path d='M 540 505 L 650 505 Q 660 505 660 500 Q 660 495 670 495' stroke-width='1' stroke='black' fill='none'/><g><path d='M 530 505 L 540 505' stroke-width='1' stroke='black' fill='none'/><path d='M 490 505 L 500 505' stroke-width='1' stroke='black' fill='none'/><g><rect x='500' y='485' fill='none' stroke-width='1' stroke='black' width='30' height='40'/><g><text x='515' y='505.0' text-anchor='middle' font-weight='bold' font-family='monospace' font-size='16'>)</text></g></g><path d='M 420 505 L 430 505' stroke-width='1' stroke='black' fill='none'/><g><rect x='430' y='485' rx='20' ry='20' fill='none' stroke-width='1' stroke='black' width='60' height='40'/><g><text x='460' y='505.0' text-anchor='middle' font-style='italic'>rule</text></g></g><path d='M 380 505 L 390 505' stroke-width='1' stroke='black' fill='none'/><g><rect x='390' y='485' fill='none' stroke-width='1' stroke='black' width='30' height='40'/><g><text x='405' y='505.0' text-anchor='middle' font-weight='bold' font-family='monospace' font-size='16'> </text></g></g><path d='M 220 505 L 240 505' stroke-width='1' stroke='black' fill='none'/><g><rect x='240' y='485' fill='none' stroke-width='1' stroke='black' width='140' height='40'/><g><text x='310' y='505.0' text-anchor='middle' font-weight='bold' font-family='monospace' font-size='16'>(one-or-more</text></g></g></g><path d='M 200 495 Q 210 495 210 475 Q 210 455 220 455' stroke-width='1' stroke='black' fill='none'/><path d='M 550 455 L 650 455 Q 660 455 660 475 Q 660 495 670 495' stroke-width='1' stroke='black' fill='none'/><g><path d='M 540 455 L 550 455' stroke-width='1' stroke='black' fill='none'/><path d='M 500 455 L 510 455' stroke-width='1' stroke='black' fill='none'/><g><rect x='510' y='435' fill='none' stroke-width='1' stroke='black' width='30' height='40'/><g><text x='525' y='455.0' text-anchor='middle' font-weight='bold' font-family='monospace' font-size='16'>)</text></g></g><path d='M 430 455 L 440 455' stroke-width='1' stroke='black' fill='none'/><g><rect x='440' y='435' rx='20' ry='20' fill='none' stroke-width='1' stroke='black' width='60' height='40'/><g><text x='470' y='455.0' text-anchor='middle' font-style='italic'>rule</text></g></g><path d='M 390 455 L 400 455' stroke-width='1' stroke='black' fill='none'/><g><rect x='400' y='435' fill='none' stroke-width='1' stroke='black' width='30' height='40'/><g><text x='415' y='455.0' text-anchor='middle' font-weight='bold' font-family='monospace' font-size='16'> </text></g></g><path d='M 220 455 L 240 455' stroke-width='1' stroke='black' fill='none'/><g><rect x='240' y='435' fill='none' stroke-width='1' stroke='black' width='150' height='40'/><g><text x='315' y='455.0' text-anchor='middle' font-weight='bold' font-family='monospace' font-size='16'>(zero-or-more</text></g></g></g><path d='M 200 495 Q 210 495 210 450 Q 210 405 220 405' stroke-width='1' stroke='black' fill='none'/><path d='M 510 405 L 650 405 Q 660 405 660 450 Q 660 495 670 495' stroke-width='1' stroke='black' fill='none'/><g><path d='M 500 405 L 510 405' stroke-width='1' stroke='black' fill='none'/><path d='M 460 405 L 470 405' stroke-width='1' stroke='black' fill='none'/><g><rect x='470' y='385' fill='none' stroke-width='1' stroke='black' width='30' height='40'/><g><text x='485' y='405.0' text-anchor='middle' font-weight='bold' font-family='monospace' font-size='16'>)</text></g></g><path d='M 390 405 L 400 405' stroke-width='1' stroke='black' fill='none'/><g><rect x='400' y='385' rx='20' ry='20' fill='none' stroke-width='1' stroke='black' width='60' height='40'/><g><text x='430' y='405.0' text-anchor='middle' font-style='italic'>rule</text></g></g><path d='M 350 405 L 360 405' stroke-width='1' stroke='black' fill='none'/><g><rect x='360' y='385' fill='none' stroke-width='1' stroke='black' width='30' height='40'/><g><text x='375' y='405.0' text-anchor='middle' font-weight='bold' font-family='monospace' font-size='16'> </text></g></g><path d='M 220 405 L 240 405' stroke-width='1' stroke='black' fill='none'/><g><rect x='240' y='385' fill='none' stroke-width='1' stroke='black' width='110' height='40'/><g><text x='295' y='405.0' text-anchor='middle' font-weight='bold' font-family='monospace' font-size='16'>(optional</text></g></g></g><path d='M 200 495 Q 210 495 210 425 Q 210 355 220 355' stroke-width='1' stroke='black' fill='none'/><path d='M 540 355 L 650 355 Q 660 355 660 425 Q 660 495 670 495' stroke-width='1' stroke='black' fill='none'/><g><path d='M 530 355 L 540 355' stroke-width='1' stroke='black' fill='none'/><path d='M 490 355 L 500 355' stroke-width='1' stroke='black' fill='none'/><g><rect x='500' y='335' fill='none' stroke-width='1' stroke='black' width='30' height='40'/><g><text x='515' y='355.0' text-anchor='middle' font-weight='bold' font-family='monospace' font-size='16'>)</text></g></g><path d='M 390 355 L 400 355' stroke-width='1' stroke='black' fill='none'/><g><rect x='400' y='335' rx='20' ry='20' fill='none' stroke-width='1' stroke='black' width='90' height='40'/><g><text x='445' y='355.0' text-anchor='middle' font-style='italic'>literal</text></g></g><path d='M 350 355 L 360 355' stroke-width='1' stroke='black' fill='none'/><g><rect x='360' y='335' fill='none' stroke-width='1' stroke='black' width='30' height='40'/><g><text x='375' y='355.0' text-anchor='middle' font-weight='bold' font-family='monospace' font-size='16'> </text></g></g><path d='M 220 355 L 240 355' stroke-width='1' stroke='black' fill='none'/><g><rect x='240' y='335' fill='none' stroke-width='1' stroke='black' width='110' height='40'/><g><text x='295' y='355.0' text-anchor='middle' font-weight='bold' font-family='monospace' font-size='16'>(elidable</text></g></g></g><path d='M 200 495 Q 210 495 210 400 Q 210 305 220 305' stroke-width='1' stroke='black' fill='none'/><path d='M 310 305 L 650 305 Q 660 305 660 400 Q 660 495 670 495' stroke-width='1' stroke='black' fill='none'/><g><rect x='220' y='285' rx='20' ry='20' fill='none' stroke-width='1' stroke='black' width='90' height='40'/><g><text x='265' y='305.0' text-anchor='middle' font-style='italic'>literal</text></g></g><path d='M 200 495 Q 210 495 210 375 Q 210 255 220 255' stroke-width='1' stroke='black' fill='none'/><path d='M 340 255 L 650 255 Q 660 255 660 375 Q 660 495 670 495' stroke-width='1' stroke='black' fill='none'/><g><rect x='220' y='235' rx='20' ry='20' fill='none' stroke-width='1' stroke='black' width='120' height='40'/><g><text x='280' y='255.0' text-anchor='middle' font-style='italic'>rule-label</text></g></g></g></g><g><g><text x='100' y='190.0' text-anchor='middle' font-style='italic'>ruleset</text></g><path d='M 200 185 L 190.0 190.0 L 190.0 180.0 z' fill='black'/><path d='M 670 185 L 660.0 190.0 L 660.0 180.0 z' fill='black'/><g><path d='M 200 185 L 220 185' stroke-width='1' stroke='black' fill='none'/><path d='M 640 185 L 660 185' stroke-width='1' stroke='black' fill='none'/><path d='M 220 185 Q 210 185 210 205 Q 210 210 220 210 L 640 210 Q 650 210 650 205 Q 650 185 640 185' stroke-width='1' stroke='black' fill='none'/><path d='M 425 210 L 430.0 207.5 L 430.0 212.5 z' fill='black'/><g><path d='M 630 185 L 640 185' stroke-width='1' stroke='black' fill='none'/><path d='M 590 185 L 600 185' stroke-width='1' stroke='black' fill='none'/><g><rect x='600' y='165' fill='none' stroke-width='1' stroke='black' width='30' height='40'/><g><text x='615' y='185.0' text-anchor='middle' font-weight='bold' font-family='monospace' font-size='16'>)</text></g></g><path d='M 520 185 L 530 185' stroke-width='1' stroke='black' fill='none'/><g><rect x='530' y='165' rx='20' ry='20' fill='none' stroke-width='1' stroke='black' width='60' height='40'/><g><text x='560' y='185.0' text-anchor='middle' font-style='italic'>rule</text></g></g><path d='M 480 185 L 490 185' stroke-width='1' stroke='black' fill='none'/><g><rect x='490' y='165' fill='none' stroke-width='1' stroke='black' width='30' height='40'/><g><text x='505' y='185.0' text-anchor='middle' font-weight='bold' font-family='monospace' font-size='16'> </text></g></g><path d='M 440 185 L 450 185' stroke-width='1' stroke='black' fill='none'/><g><rect x='450' y='165' fill='none' stroke-width='1' stroke='black' width='30' height='40'/><g><text x='465' y='185.0' text-anchor='middle' font-weight='bold' font-family='monospace' font-size='16'>.</text></g></g><path d='M 400 185 L 410 185' stroke-width='1' stroke='black' fill='none'/><g><rect x='410' y='165' fill='none' stroke-width='1' stroke='black' width='30' height='40'/><g><text x='425' y='185.0' text-anchor='middle' font-weight='bold' font-family='monospace' font-size='16'> </text></g></g><path d='M 270 185 L 280 185' stroke-width='1' stroke='black' fill='none'/><g><rect x='280' y='165' rx='20' ry='20' fill='none' stroke-width='1' stroke='black' width='120' height='40'/><g><text x='340' y='185.0' text-anchor='middle' font-style='italic'>rule-label</text></g></g><path d='M 220 185 L 240 185' stroke-width='1' stroke='black' fill='none'/><g><rect x='240' y='165' fill='none' stroke-width='1' stroke='black' width='30' height='40'/><g><text x='255' y='185.0' text-anchor='middle' font-weight='bold' font-family='monospace' font-size='16'>(</text></g></g></g></g></g><g><g><text x='100' y='77.5' text-anchor='middle' font-style='italic'>banterpixra-command-line</text></g><path d='M 200 55 L 190.0 60.0 L 190.0 50.0 z' fill='black'/><path d='M 1460 55 L 1450.0 60.0 L 1450.0 50.0 z' fill='black'/><g><path d='M 1440 55 L 1450 55' stroke-width='1' stroke='black' fill='none'/><path d='M 1220 55 L 1230 55' stroke-width='1' stroke='black' fill='none'/><g><rect x='1230' y='35' rx='20' ry='20' fill='none' stroke-width='1' stroke='black' width='210' height='40'/><g><text x='1335' y='55.0' text-anchor='middle' font-style='italic'>output-svg-filename</text></g></g><path d='M 1180 55 L 1190 55' stroke-width='1' stroke='black' fill='none'/><g><rect x='1190' y='35' fill='none' stroke-width='1' stroke='black' width='30' height='40'/><g><text x='1205' y='55.0' text-anchor='middle' font-weight='bold' font-family='monospace' font-size='16'> </text></g></g><path d='M 1140 55 L 1150 55' stroke-width='1' stroke='black' fill='none'/><g><rect x='1150' y='35' fill='none' stroke-width='1' stroke='black' width='30' height='40'/><g><text x='1165' y='55.0' text-anchor='middle' font-weight='bold' font-family='monospace' font-size='16'>></text></g></g><path d='M 1100 55 L 1110 55' stroke-width='1' stroke='black' fill='none'/><g><rect x='1110' y='35' fill='none' stroke-width='1' stroke='black' width='30' height='40'/><g><text x='1125' y='55.0' text-anchor='middle' font-weight='bold' font-family='monospace' font-size='16'> </text></g></g><path d='M 620 55 L 630 55' stroke-width='1' stroke='black' fill='none'/><g><path d='M 630 55 Q 640 55 640 67.5 Q 640 80 650 80' stroke-width='1' stroke='black' fill='none'/><path d='M 1020 80 L 1080 80 Q 1090 80 1090 67.5 Q 1090 55 1100 55' stroke-width='1' stroke='black' fill='none'/><g><path d='M 1010 80 L 1020 80' stroke-width='1' stroke='black' fill='none'/><path d='M 850 80 L 860 80' stroke-width='1' stroke='black' fill='none'/><g><rect x='860' y='60' rx='20' ry='20' fill='none' stroke-width='1' stroke='black' width='150' height='40'/><g><text x='935' y='80.0' text-anchor='middle' font-style='italic'>rule-filename</text></g></g><path d='M 810 80 L 820 80' stroke-width='1' stroke='black' fill='none'/><g><rect x='820' y='60' fill='none' stroke-width='1' stroke='black' width='30' height='40'/><g><text x='835' y='80.0' text-anchor='middle' font-weight='bold' font-family='monospace' font-size='16'> </text></g></g><path d='M 770 80 L 780 80' stroke-width='1' stroke='black' fill='none'/><g><rect x='780' y='60' fill='none' stroke-width='1' stroke='black' width='30' height='40'/><g><text x='795' y='80.0' text-anchor='middle' font-weight='bold' font-family='monospace' font-size='16'><</text></g></g><path d='M 730 80 L 740 80' stroke-width='1' stroke='black' fill='none'/><g><rect x='740' y='60' fill='none' stroke-width='1' stroke='black' width='30' height='40'/><g><text x='755' y='80.0' text-anchor='middle' font-weight='bold' font-family='monospace' font-size='16'> </text></g></g><path d='M 650 80 L 670 80' stroke-width='1' stroke='black' fill='none'/><g><rect x='670' y='60' fill='none' stroke-width='1' stroke='black' width='60' height='40'/><g><text x='700' y='80.0' text-anchor='middle' font-weight='bold' font-family='monospace' font-size='16'>rule</text></g></g></g><path d='M 630 55 Q 640 55 640 42.5 Q 640 30 650 30' stroke-width='1' stroke='black' fill='none'/><path d='M 1080 30 L 1080 30 Q 1090 30 1090 42.5 Q 1090 55 1100 55' stroke-width='1' stroke='black' fill='none'/><g><path d='M 1070 30 L 1080 30' stroke-width='1' stroke='black' fill='none'/><path d='M 880 30 L 890 30' stroke-width='1' stroke='black' fill='none'/><g><rect x='890' y='10' rx='20' ry='20' fill='none' stroke-width='1' stroke='black' width='180' height='40'/><g><text x='980' y='30.0' text-anchor='middle' font-style='italic'>ruleset-filename</text></g></g><path d='M 840 30 L 850 30' stroke-width='1' stroke='black' fill='none'/><g><rect x='850' y='10' fill='none' stroke-width='1' stroke='black' width='30' height='40'/><g><text x='865' y='30.0' text-anchor='middle' font-weight='bold' font-family='monospace' font-size='16'> </text></g></g><path d='M 800 30 L 810 30' stroke-width='1' stroke='black' fill='none'/><g><rect x='810' y='10' fill='none' stroke-width='1' stroke='black' width='30' height='40'/><g><text x='825' y='30.0' text-anchor='middle' font-weight='bold' font-family='monospace' font-size='16'><</text></g></g><path d='M 760 30 L 770 30' stroke-width='1' stroke='black' fill='none'/><g><rect x='770' y='10' fill='none' stroke-width='1' stroke='black' width='30' height='40'/><g><text x='785' y='30.0' text-anchor='middle' font-weight='bold' font-family='monospace' font-size='16'> </text></g></g><path d='M 650 30 L 670 30' stroke-width='1' stroke='black' fill='none'/><g><rect x='670' y='10' fill='none' stroke-width='1' stroke='black' width='90' height='40'/><g><text x='715' y='30.0' text-anchor='middle' font-weight='bold' font-family='monospace' font-size='16'>ruleset</text></g></g></g></g><path d='M 390 55 L 400 55' stroke-width='1' stroke='black' fill='none'/><g><path d='M 400 55 L 410 55' stroke-width='1' stroke='black' fill='none'/><path d='M 610 55 L 620 55' stroke-width='1' stroke='black' fill='none'/><path d='M 400 55 Q 405 55 405 30 Q 405 25 410 25 L 610 25 Q 615 25 615 30 Q 615 55 620 55' stroke-width='1' stroke='black' fill='none'/><path d='M 515 25 L 510.0 27.5 L 510.0 22.5 z' fill='black'/><g><path d='M 410 55 L 490 55' stroke-width='1' stroke='black' fill='none'/><path d='M 530 55 L 610 55' stroke-width='1' stroke='black' fill='none'/><rect x='410' y='30' fill='none' stroke-width='1' stroke-dasharray='1,3' stroke='black' width='200' height='125'/><g><text x='510' y='135.0' text-anchor='middle'>showing the layout</text><text x='510' y='115.0' text-anchor='middle'>Adds pink boxes</text><text x='510' y='95.0' text-anchor='middle'>Debug mode:</text></g><g><rect x='490' y='35' fill='none' stroke-width='1' stroke='black' width='40' height='40'/><g><text x='510' y='55.0' text-anchor='middle' font-weight='bold' font-family='monospace' font-size='16'>-d</text></g></g></g></g><path d='M 350 55 L 360 55' stroke-width='1' stroke='black' fill='none'/><g><rect x='360' y='35' fill='none' stroke-width='1' stroke='black' width='30' height='40'/><g><text x='375' y='55.0' text-anchor='middle' font-weight='bold' font-family='monospace' font-size='16'> </text></g></g><path d='M 200 55 L 220 55' stroke-width='1' stroke='black' fill='none'/><g><rect x='220' y='35' fill='none' stroke-width='1' stroke='black' width='130' height='40'/><g><text x='285' y='55.0' text-anchor='middle' font-weight='bold' font-family='monospace' font-size='16'>banterpixra</text></g></g></g></g></svg>ABS TEST: rule-label > #t/2 ABS TEST: literal > #t/3 ABS TEST: rule > #t/8 ABS TEST: output-svg-filename > #f/1 ABS TEST: rule-filename > #f/1 ABS TEST: ruleset-filename > #f/1 ABS TEST: label-subsequent-character > #t/1 ABS TEST: label-start-character > #t/2 ABS TEST: banterpixra-command-line > #t/0 ABS TEST: ruleset > #t/0 |