Fossil

Check-in [8f4a32cc]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Update the built-in Pikchr source code and WASM/JS builds.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 8f4a32ccaedf429d6db0a54b6ab3423cb0cd6cc8ce10b76c35947910bd1542b1
User & Date: drh 2022-10-26 12:46:06
Context
2022-10-26
18:28
Typo fix in the 2.20 changelog ... (check-in: c3012508 user: wyoung tags: trunk)
12:46
Update the built-in Pikchr source code and WASM/JS builds. ... (check-in: 8f4a32cc user: drh tags: trunk)
11:14
Update the built-in SQLite to the latest 3.40.0 alpha version that includes all performance enhancements and bug fixes. ... (check-in: 4aa78375 user: drh tags: trunk)
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to extsrc/pikchr.c.

1254
1255
1256
1257
1258
1259
1260

1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
#else
  yyStackEntry yystack[YYSTACKDEPTH];  /* The parser's stack */
  yyStackEntry *yystackEnd;            /* Last entry in the stack */
#endif
};
typedef struct yyParser yyParser;


#ifndef NDEBUG
#include <stdio.h>
#include <assert.h>
static FILE *yyTraceFILE = 0;
static char *yyTracePrompt = 0;
#endif /* NDEBUG */

#ifndef NDEBUG
/* 
** Turn parser tracing on by giving a stream to which to write the trace







>


<







1254
1255
1256
1257
1258
1259
1260
1261
1262
1263

1264
1265
1266
1267
1268
1269
1270
#else
  yyStackEntry yystack[YYSTACKDEPTH];  /* The parser's stack */
  yyStackEntry *yystackEnd;            /* Last entry in the stack */
#endif
};
typedef struct yyParser yyParser;

#include <assert.h>
#ifndef NDEBUG
#include <stdio.h>

static FILE *yyTraceFILE = 0;
static char *yyTracePrompt = 0;
#endif /* NDEBUG */

#ifndef NDEBUG
/* 
** Turn parser tracing on by giving a stream to which to write the trace
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
  YYACTIONTYPE yyact;             /* The next action */
  yyStackEntry *yymsp;            /* The top of the parser's stack */
  int yysize;                     /* Amount to pop the stack */
  pik_parserARG_FETCH
  (void)yyLookahead;
  (void)yyLookaheadToken;
  yymsp = yypParser->yytos;
  assert( yyruleno<(int)(sizeof(yyRuleName)/sizeof(yyRuleName[0])) );
#ifndef NDEBUG
  if( yyTraceFILE ){
    yysize = yyRuleInfoNRhs[yyruleno];
    if( yysize ){
      fprintf(yyTraceFILE, "%sReduce %d [%s]%s, pop back to state %d.\n",
        yyTracePrompt,
        yyruleno, yyRuleName[yyruleno],
        yyruleno<YYNRULE_WITH_ACTION ? "" : " without external action",
        yymsp[yysize].stateno);
    }else{
      fprintf(yyTraceFILE, "%sReduce %d [%s]%s.\n",
        yyTracePrompt, yyruleno, yyRuleName[yyruleno],
        yyruleno<YYNRULE_WITH_ACTION ? "" : " without external action");
    }
  }
#endif /* NDEBUG */

  /* Check that the stack is large enough to grow by a single entry
  ** if the RHS of the rule is empty.  This ensures that there is room
  ** enough on the stack to push the LHS value */
  if( yyRuleInfoNRhs[yyruleno]==0 ){
#ifdef YYTRACKMAXSTACKDEPTH
    if( (int)(yypParser->yytos - yypParser->yystack)>yypParser->yyhwm ){
      yypParser->yyhwm++;
      assert( yypParser->yyhwm == (int)(yypParser->yytos - yypParser->yystack));
    }
#endif
#if YYSTACKDEPTH>0 
    if( yypParser->yytos>=yypParser->yystackEnd ){
      yyStackOverflow(yypParser);
      /* The call to yyStackOverflow() above pops the stack until it is
      ** empty, causing the main parser loop to exit.  So the return value
      ** is never used and does not matter. */
      return 0;
    }
#else
    if( yypParser->yytos>=&yypParser->yystack[yypParser->yystksz-1] ){
      if( yyGrowStack(yypParser) ){
        yyStackOverflow(yypParser);
        /* The call to yyStackOverflow() above pops the stack until it is
        ** empty, causing the main parser loop to exit.  So the return value
        ** is never used and does not matter. */
        return 0;
      }
      yymsp = yypParser->yytos;
    }
#endif
  }

  switch( yyruleno ){
  /* Beginning here are the reduction cases.  A typical example
  ** follows:
  **   case 0:
  **  #line <lineno> <grammarfile>
  **     { ... }           // User supplied code
  **  #line <lineno> <thisfile>
  **     break;
  */
/********** Begin reduce actions **********************************************/
        YYMINORTYPE yylhsminor;
      case 0: /* document ::= statement_list */
#line 547 "pikchr.y"
{pik_render(p,yymsp[0].minor.yy227);}
#line 2462 "pikchr.c"
        break;
      case 1: /* statement_list ::= statement */
#line 550 "pikchr.y"
{ yylhsminor.yy227 = pik_elist_append(p,0,yymsp[0].minor.yy36); }
#line 2467 "pikchr.c"
  yymsp[0].minor.yy227 = yylhsminor.yy227;
        break;
      case 2: /* statement_list ::= statement_list EOL statement */
#line 552 "pikchr.y"
{ yylhsminor.yy227 = pik_elist_append(p,yymsp[-2].minor.yy227,yymsp[0].minor.yy36); }
#line 2473 "pikchr.c"
  yymsp[-2].minor.yy227 = yylhsminor.yy227;
        break;
      case 3: /* statement ::= */
#line 555 "pikchr.y"
{ yymsp[1].minor.yy36 = 0; }
#line 2479 "pikchr.c"
        break;
      case 4: /* statement ::= direction */
#line 556 "pikchr.y"
{ pik_set_direction(p,yymsp[0].minor.yy0.eCode);  yylhsminor.yy36=0; }
#line 2484 "pikchr.c"
  yymsp[0].minor.yy36 = yylhsminor.yy36;
        break;
      case 5: /* statement ::= lvalue ASSIGN rvalue */
#line 557 "pikchr.y"
{pik_set_var(p,&yymsp[-2].minor.yy0,yymsp[0].minor.yy153,&yymsp[-1].minor.yy0); yylhsminor.yy36=0;}
#line 2490 "pikchr.c"
  yymsp[-2].minor.yy36 = yylhsminor.yy36;
        break;
      case 6: /* statement ::= PLACENAME COLON unnamed_statement */
#line 559 "pikchr.y"
{ yylhsminor.yy36 = yymsp[0].minor.yy36;  pik_elem_setname(p,yymsp[0].minor.yy36,&yymsp[-2].minor.yy0); }
#line 2496 "pikchr.c"
  yymsp[-2].minor.yy36 = yylhsminor.yy36;
        break;
      case 7: /* statement ::= PLACENAME COLON position */
#line 561 "pikchr.y"
{ yylhsminor.yy36 = pik_elem_new(p,0,0,0);
                 if(yylhsminor.yy36){ yylhsminor.yy36->ptAt = yymsp[0].minor.yy79; pik_elem_setname(p,yylhsminor.yy36,&yymsp[-2].minor.yy0); }}
#line 2503 "pikchr.c"
  yymsp[-2].minor.yy36 = yylhsminor.yy36;
        break;
      case 8: /* statement ::= unnamed_statement */
#line 563 "pikchr.y"
{yylhsminor.yy36 = yymsp[0].minor.yy36;}
#line 2509 "pikchr.c"
  yymsp[0].minor.yy36 = yylhsminor.yy36;
        break;
      case 9: /* statement ::= print prlist */
#line 564 "pikchr.y"
{pik_append(p,"<br>\n",5); yymsp[-1].minor.yy36=0;}
#line 2515 "pikchr.c"
        break;
      case 10: /* statement ::= ASSERT LP expr EQ expr RP */
#line 569 "pikchr.y"
{yymsp[-5].minor.yy36=pik_assert(p,yymsp[-3].minor.yy153,&yymsp[-2].minor.yy0,yymsp[-1].minor.yy153);}
#line 2520 "pikchr.c"
        break;
      case 11: /* statement ::= ASSERT LP position EQ position RP */
#line 571 "pikchr.y"
{yymsp[-5].minor.yy36=pik_position_assert(p,&yymsp[-3].minor.yy79,&yymsp[-2].minor.yy0,&yymsp[-1].minor.yy79);}
#line 2525 "pikchr.c"
        break;
      case 12: /* statement ::= DEFINE ID CODEBLOCK */
#line 572 "pikchr.y"
{yymsp[-2].minor.yy36=0; pik_add_macro(p,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy0);}
#line 2530 "pikchr.c"
        break;
      case 13: /* rvalue ::= PLACENAME */
#line 583 "pikchr.y"
{yylhsminor.yy153 = pik_lookup_color(p,&yymsp[0].minor.yy0);}
#line 2535 "pikchr.c"
  yymsp[0].minor.yy153 = yylhsminor.yy153;
        break;
      case 14: /* pritem ::= FILL */
      case 15: /* pritem ::= COLOR */ yytestcase(yyruleno==15);
      case 16: /* pritem ::= THICKNESS */ yytestcase(yyruleno==16);
#line 588 "pikchr.y"
{pik_append_num(p,"",pik_value(p,yymsp[0].minor.yy0.z,yymsp[0].minor.yy0.n,0));}
#line 2543 "pikchr.c"
        break;
      case 17: /* pritem ::= rvalue */
#line 591 "pikchr.y"
{pik_append_num(p,"",yymsp[0].minor.yy153);}
#line 2548 "pikchr.c"
        break;
      case 18: /* pritem ::= STRING */
#line 592 "pikchr.y"
{pik_append_text(p,yymsp[0].minor.yy0.z+1,yymsp[0].minor.yy0.n-2,0);}
#line 2553 "pikchr.c"
        break;
      case 19: /* prsep ::= COMMA */
#line 593 "pikchr.y"
{pik_append(p, " ", 1);}
#line 2558 "pikchr.c"
        break;
      case 20: /* unnamed_statement ::= basetype attribute_list */
#line 596 "pikchr.y"
{yylhsminor.yy36 = yymsp[-1].minor.yy36; pik_after_adding_attributes(p,yylhsminor.yy36);}
#line 2563 "pikchr.c"
  yymsp[-1].minor.yy36 = yylhsminor.yy36;
        break;
      case 21: /* basetype ::= CLASSNAME */
#line 598 "pikchr.y"
{yylhsminor.yy36 = pik_elem_new(p,&yymsp[0].minor.yy0,0,0); }
#line 2569 "pikchr.c"
  yymsp[0].minor.yy36 = yylhsminor.yy36;
        break;
      case 22: /* basetype ::= STRING textposition */
#line 600 "pikchr.y"
{yymsp[-1].minor.yy0.eCode = yymsp[0].minor.yy164; yylhsminor.yy36 = pik_elem_new(p,0,&yymsp[-1].minor.yy0,0); }
#line 2575 "pikchr.c"
  yymsp[-1].minor.yy36 = yylhsminor.yy36;
        break;
      case 23: /* basetype ::= LB savelist statement_list RB */
#line 602 "pikchr.y"
{ p->list = yymsp[-2].minor.yy227; yymsp[-3].minor.yy36 = pik_elem_new(p,0,0,yymsp[-1].minor.yy227); if(yymsp[-3].minor.yy36) yymsp[-3].minor.yy36->errTok = yymsp[0].minor.yy0; }
#line 2581 "pikchr.c"
        break;
      case 24: /* savelist ::= */
#line 607 "pikchr.y"
{yymsp[1].minor.yy227 = p->list; p->list = 0;}
#line 2586 "pikchr.c"
        break;
      case 25: /* relexpr ::= expr */
#line 614 "pikchr.y"
{yylhsminor.yy10.rAbs = yymsp[0].minor.yy153; yylhsminor.yy10.rRel = 0;}
#line 2591 "pikchr.c"
  yymsp[0].minor.yy10 = yylhsminor.yy10;
        break;
      case 26: /* relexpr ::= expr PERCENT */
#line 615 "pikchr.y"
{yylhsminor.yy10.rAbs = 0; yylhsminor.yy10.rRel = yymsp[-1].minor.yy153/100;}
#line 2597 "pikchr.c"
  yymsp[-1].minor.yy10 = yylhsminor.yy10;
        break;
      case 27: /* optrelexpr ::= */
#line 617 "pikchr.y"
{yymsp[1].minor.yy10.rAbs = 0; yymsp[1].minor.yy10.rRel = 1.0;}
#line 2603 "pikchr.c"
        break;
      case 28: /* attribute_list ::= relexpr alist */
#line 619 "pikchr.y"
{pik_add_direction(p,0,&yymsp[-1].minor.yy10);}
#line 2608 "pikchr.c"
        break;
      case 29: /* attribute ::= numproperty relexpr */
#line 623 "pikchr.y"
{ pik_set_numprop(p,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy10); }
#line 2613 "pikchr.c"
        break;
      case 30: /* attribute ::= dashproperty expr */
#line 624 "pikchr.y"
{ pik_set_dashed(p,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy153); }
#line 2618 "pikchr.c"
        break;
      case 31: /* attribute ::= dashproperty */
#line 625 "pikchr.y"
{ pik_set_dashed(p,&yymsp[0].minor.yy0,0);  }
#line 2623 "pikchr.c"
        break;
      case 32: /* attribute ::= colorproperty rvalue */
#line 626 "pikchr.y"
{ pik_set_clrprop(p,&yymsp[-1].minor.yy0,yymsp[0].minor.yy153); }
#line 2628 "pikchr.c"
        break;
      case 33: /* attribute ::= go direction optrelexpr */
#line 627 "pikchr.y"
{ pik_add_direction(p,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy10);}
#line 2633 "pikchr.c"
        break;
      case 34: /* attribute ::= go direction even position */
#line 628 "pikchr.y"
{pik_evenwith(p,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy79);}
#line 2638 "pikchr.c"
        break;
      case 35: /* attribute ::= CLOSE */
#line 629 "pikchr.y"
{ pik_close_path(p,&yymsp[0].minor.yy0); }
#line 2643 "pikchr.c"
        break;
      case 36: /* attribute ::= CHOP */
#line 630 "pikchr.y"
{ p->cur->bChop = 1; }
#line 2648 "pikchr.c"
        break;
      case 37: /* attribute ::= FROM position */
#line 631 "pikchr.y"
{ pik_set_from(p,p->cur,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy79); }
#line 2653 "pikchr.c"
        break;
      case 38: /* attribute ::= TO position */
#line 632 "pikchr.y"
{ pik_add_to(p,p->cur,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy79); }
#line 2658 "pikchr.c"
        break;
      case 39: /* attribute ::= THEN */
#line 633 "pikchr.y"
{ pik_then(p, &yymsp[0].minor.yy0, p->cur); }
#line 2663 "pikchr.c"
        break;
      case 40: /* attribute ::= THEN optrelexpr HEADING expr */
      case 42: /* attribute ::= GO optrelexpr HEADING expr */ yytestcase(yyruleno==42);
#line 635 "pikchr.y"
{pik_move_hdg(p,&yymsp[-2].minor.yy10,&yymsp[-1].minor.yy0,yymsp[0].minor.yy153,0,&yymsp[-3].minor.yy0);}
#line 2669 "pikchr.c"
        break;
      case 41: /* attribute ::= THEN optrelexpr EDGEPT */
      case 43: /* attribute ::= GO optrelexpr EDGEPT */ yytestcase(yyruleno==43);
#line 636 "pikchr.y"
{pik_move_hdg(p,&yymsp[-1].minor.yy10,0,0,&yymsp[0].minor.yy0,&yymsp[-2].minor.yy0);}
#line 2675 "pikchr.c"
        break;
      case 44: /* attribute ::= AT position */
#line 641 "pikchr.y"
{ pik_set_at(p,0,&yymsp[0].minor.yy79,&yymsp[-1].minor.yy0); }
#line 2680 "pikchr.c"
        break;
      case 45: /* attribute ::= SAME */
#line 643 "pikchr.y"
{pik_same(p,0,&yymsp[0].minor.yy0);}
#line 2685 "pikchr.c"
        break;
      case 46: /* attribute ::= SAME AS object */
#line 644 "pikchr.y"
{pik_same(p,yymsp[0].minor.yy36,&yymsp[-2].minor.yy0);}
#line 2690 "pikchr.c"
        break;
      case 47: /* attribute ::= STRING textposition */
#line 645 "pikchr.y"
{pik_add_txt(p,&yymsp[-1].minor.yy0,yymsp[0].minor.yy164);}
#line 2695 "pikchr.c"
        break;
      case 48: /* attribute ::= FIT */
#line 646 "pikchr.y"
{pik_size_to_fit(p,&yymsp[0].minor.yy0,3); }
#line 2700 "pikchr.c"
        break;
      case 49: /* attribute ::= BEHIND object */
#line 647 "pikchr.y"
{pik_behind(p,yymsp[0].minor.yy36);}
#line 2705 "pikchr.c"
        break;
      case 50: /* withclause ::= DOT_E edge AT position */
      case 51: /* withclause ::= edge AT position */ yytestcase(yyruleno==51);
#line 655 "pikchr.y"
{ pik_set_at(p,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy79,&yymsp[-1].minor.yy0); }
#line 2711 "pikchr.c"
        break;
      case 52: /* numproperty ::= HEIGHT|WIDTH|RADIUS|DIAMETER|THICKNESS */
#line 659 "pikchr.y"
{yylhsminor.yy0 = yymsp[0].minor.yy0;}
#line 2716 "pikchr.c"
  yymsp[0].minor.yy0 = yylhsminor.yy0;
        break;
      case 53: /* boolproperty ::= CW */
#line 670 "pikchr.y"
{p->cur->cw = 1;}
#line 2722 "pikchr.c"
        break;
      case 54: /* boolproperty ::= CCW */
#line 671 "pikchr.y"
{p->cur->cw = 0;}
#line 2727 "pikchr.c"
        break;
      case 55: /* boolproperty ::= LARROW */
#line 672 "pikchr.y"
{p->cur->larrow=1; p->cur->rarrow=0; }
#line 2732 "pikchr.c"
        break;
      case 56: /* boolproperty ::= RARROW */
#line 673 "pikchr.y"
{p->cur->larrow=0; p->cur->rarrow=1; }
#line 2737 "pikchr.c"
        break;
      case 57: /* boolproperty ::= LRARROW */
#line 674 "pikchr.y"
{p->cur->larrow=1; p->cur->rarrow=1; }
#line 2742 "pikchr.c"
        break;
      case 58: /* boolproperty ::= INVIS */
#line 675 "pikchr.y"
{p->cur->sw = 0.0;}
#line 2747 "pikchr.c"
        break;
      case 59: /* boolproperty ::= THICK */
#line 676 "pikchr.y"
{p->cur->sw *= 1.5;}
#line 2752 "pikchr.c"
        break;
      case 60: /* boolproperty ::= THIN */
#line 677 "pikchr.y"
{p->cur->sw *= 0.67;}
#line 2757 "pikchr.c"
        break;
      case 61: /* boolproperty ::= SOLID */
#line 678 "pikchr.y"
{p->cur->sw = pik_value(p,"thickness",9,0);
                               p->cur->dotted = p->cur->dashed = 0.0;}
#line 2763 "pikchr.c"
        break;
      case 62: /* textposition ::= */
#line 681 "pikchr.y"
{yymsp[1].minor.yy164 = 0;}
#line 2768 "pikchr.c"
        break;
      case 63: /* textposition ::= textposition CENTER|LJUST|RJUST|ABOVE|BELOW|ITALIC|BOLD|ALIGNED|BIG|SMALL */
#line 684 "pikchr.y"
{yylhsminor.yy164 = (short int)pik_text_position(yymsp[-1].minor.yy164,&yymsp[0].minor.yy0);}
#line 2773 "pikchr.c"
  yymsp[-1].minor.yy164 = yylhsminor.yy164;
        break;
      case 64: /* position ::= expr COMMA expr */
#line 687 "pikchr.y"
{yylhsminor.yy79.x=yymsp[-2].minor.yy153; yylhsminor.yy79.y=yymsp[0].minor.yy153;}
#line 2779 "pikchr.c"
  yymsp[-2].minor.yy79 = yylhsminor.yy79;
        break;
      case 65: /* position ::= place PLUS expr COMMA expr */
#line 689 "pikchr.y"
{yylhsminor.yy79.x=yymsp[-4].minor.yy79.x+yymsp[-2].minor.yy153; yylhsminor.yy79.y=yymsp[-4].minor.yy79.y+yymsp[0].minor.yy153;}
#line 2785 "pikchr.c"
  yymsp[-4].minor.yy79 = yylhsminor.yy79;
        break;
      case 66: /* position ::= place MINUS expr COMMA expr */
#line 690 "pikchr.y"
{yylhsminor.yy79.x=yymsp[-4].minor.yy79.x-yymsp[-2].minor.yy153; yylhsminor.yy79.y=yymsp[-4].minor.yy79.y-yymsp[0].minor.yy153;}
#line 2791 "pikchr.c"
  yymsp[-4].minor.yy79 = yylhsminor.yy79;
        break;
      case 67: /* position ::= place PLUS LP expr COMMA expr RP */
#line 692 "pikchr.y"
{yylhsminor.yy79.x=yymsp[-6].minor.yy79.x+yymsp[-3].minor.yy153; yylhsminor.yy79.y=yymsp[-6].minor.yy79.y+yymsp[-1].minor.yy153;}
#line 2797 "pikchr.c"
  yymsp[-6].minor.yy79 = yylhsminor.yy79;
        break;
      case 68: /* position ::= place MINUS LP expr COMMA expr RP */
#line 694 "pikchr.y"
{yylhsminor.yy79.x=yymsp[-6].minor.yy79.x-yymsp[-3].minor.yy153; yylhsminor.yy79.y=yymsp[-6].minor.yy79.y-yymsp[-1].minor.yy153;}
#line 2803 "pikchr.c"
  yymsp[-6].minor.yy79 = yylhsminor.yy79;
        break;
      case 69: /* position ::= LP position COMMA position RP */
#line 695 "pikchr.y"
{yymsp[-4].minor.yy79.x=yymsp[-3].minor.yy79.x; yymsp[-4].minor.yy79.y=yymsp[-1].minor.yy79.y;}
#line 2809 "pikchr.c"
        break;
      case 70: /* position ::= LP position RP */
#line 696 "pikchr.y"
{yymsp[-2].minor.yy79=yymsp[-1].minor.yy79;}
#line 2814 "pikchr.c"
        break;
      case 71: /* position ::= expr between position AND position */
#line 698 "pikchr.y"
{yylhsminor.yy79 = pik_position_between(yymsp[-4].minor.yy153,yymsp[-2].minor.yy79,yymsp[0].minor.yy79);}
#line 2819 "pikchr.c"
  yymsp[-4].minor.yy79 = yylhsminor.yy79;
        break;
      case 72: /* position ::= expr LT position COMMA position GT */
#line 700 "pikchr.y"
{yylhsminor.yy79 = pik_position_between(yymsp[-5].minor.yy153,yymsp[-3].minor.yy79,yymsp[-1].minor.yy79);}
#line 2825 "pikchr.c"
  yymsp[-5].minor.yy79 = yylhsminor.yy79;
        break;
      case 73: /* position ::= expr ABOVE position */
#line 701 "pikchr.y"
{yylhsminor.yy79=yymsp[0].minor.yy79; yylhsminor.yy79.y += yymsp[-2].minor.yy153;}
#line 2831 "pikchr.c"
  yymsp[-2].minor.yy79 = yylhsminor.yy79;
        break;
      case 74: /* position ::= expr BELOW position */
#line 702 "pikchr.y"
{yylhsminor.yy79=yymsp[0].minor.yy79; yylhsminor.yy79.y -= yymsp[-2].minor.yy153;}
#line 2837 "pikchr.c"
  yymsp[-2].minor.yy79 = yylhsminor.yy79;
        break;
      case 75: /* position ::= expr LEFT OF position */
#line 703 "pikchr.y"
{yylhsminor.yy79=yymsp[0].minor.yy79; yylhsminor.yy79.x -= yymsp[-3].minor.yy153;}
#line 2843 "pikchr.c"
  yymsp[-3].minor.yy79 = yylhsminor.yy79;
        break;
      case 76: /* position ::= expr RIGHT OF position */
#line 704 "pikchr.y"
{yylhsminor.yy79=yymsp[0].minor.yy79; yylhsminor.yy79.x += yymsp[-3].minor.yy153;}
#line 2849 "pikchr.c"
  yymsp[-3].minor.yy79 = yylhsminor.yy79;
        break;
      case 77: /* position ::= expr ON HEADING EDGEPT OF position */
#line 706 "pikchr.y"
{yylhsminor.yy79 = pik_position_at_hdg(yymsp[-5].minor.yy153,&yymsp[-2].minor.yy0,yymsp[0].minor.yy79);}
#line 2855 "pikchr.c"
  yymsp[-5].minor.yy79 = yylhsminor.yy79;
        break;
      case 78: /* position ::= expr HEADING EDGEPT OF position */
#line 708 "pikchr.y"
{yylhsminor.yy79 = pik_position_at_hdg(yymsp[-4].minor.yy153,&yymsp[-2].minor.yy0,yymsp[0].minor.yy79);}
#line 2861 "pikchr.c"
  yymsp[-4].minor.yy79 = yylhsminor.yy79;
        break;
      case 79: /* position ::= expr EDGEPT OF position */
#line 710 "pikchr.y"
{yylhsminor.yy79 = pik_position_at_hdg(yymsp[-3].minor.yy153,&yymsp[-2].minor.yy0,yymsp[0].minor.yy79);}
#line 2867 "pikchr.c"
  yymsp[-3].minor.yy79 = yylhsminor.yy79;
        break;
      case 80: /* position ::= expr ON HEADING expr FROM position */
#line 712 "pikchr.y"
{yylhsminor.yy79 = pik_position_at_angle(yymsp[-5].minor.yy153,yymsp[-2].minor.yy153,yymsp[0].minor.yy79);}
#line 2873 "pikchr.c"
  yymsp[-5].minor.yy79 = yylhsminor.yy79;
        break;
      case 81: /* position ::= expr HEADING expr FROM position */
#line 714 "pikchr.y"
{yylhsminor.yy79 = pik_position_at_angle(yymsp[-4].minor.yy153,yymsp[-2].minor.yy153,yymsp[0].minor.yy79);}
#line 2879 "pikchr.c"
  yymsp[-4].minor.yy79 = yylhsminor.yy79;
        break;
      case 82: /* place ::= edge OF object */
#line 726 "pikchr.y"
{yylhsminor.yy79 = pik_place_of_elem(p,yymsp[0].minor.yy36,&yymsp[-2].minor.yy0);}
#line 2885 "pikchr.c"
  yymsp[-2].minor.yy79 = yylhsminor.yy79;
        break;
      case 83: /* place2 ::= object */
#line 727 "pikchr.y"
{yylhsminor.yy79 = pik_place_of_elem(p,yymsp[0].minor.yy36,0);}
#line 2891 "pikchr.c"
  yymsp[0].minor.yy79 = yylhsminor.yy79;
        break;
      case 84: /* place2 ::= object DOT_E edge */
#line 728 "pikchr.y"
{yylhsminor.yy79 = pik_place_of_elem(p,yymsp[-2].minor.yy36,&yymsp[0].minor.yy0);}
#line 2897 "pikchr.c"
  yymsp[-2].minor.yy79 = yylhsminor.yy79;
        break;
      case 85: /* place2 ::= NTH VERTEX OF object */
#line 729 "pikchr.y"
{yylhsminor.yy79 = pik_nth_vertex(p,&yymsp[-3].minor.yy0,&yymsp[-2].minor.yy0,yymsp[0].minor.yy36);}
#line 2903 "pikchr.c"
  yymsp[-3].minor.yy79 = yylhsminor.yy79;
        break;
      case 86: /* object ::= nth */
#line 741 "pikchr.y"
{yylhsminor.yy36 = pik_find_nth(p,0,&yymsp[0].minor.yy0);}
#line 2909 "pikchr.c"
  yymsp[0].minor.yy36 = yylhsminor.yy36;
        break;
      case 87: /* object ::= nth OF|IN object */
#line 742 "pikchr.y"
{yylhsminor.yy36 = pik_find_nth(p,yymsp[0].minor.yy36,&yymsp[-2].minor.yy0);}
#line 2915 "pikchr.c"
  yymsp[-2].minor.yy36 = yylhsminor.yy36;
        break;
      case 88: /* objectname ::= THIS */
#line 744 "pikchr.y"
{yymsp[0].minor.yy36 = p->cur;}
#line 2921 "pikchr.c"
        break;
      case 89: /* objectname ::= PLACENAME */
#line 745 "pikchr.y"
{yylhsminor.yy36 = pik_find_byname(p,0,&yymsp[0].minor.yy0);}
#line 2926 "pikchr.c"
  yymsp[0].minor.yy36 = yylhsminor.yy36;
        break;
      case 90: /* objectname ::= objectname DOT_U PLACENAME */
#line 747 "pikchr.y"
{yylhsminor.yy36 = pik_find_byname(p,yymsp[-2].minor.yy36,&yymsp[0].minor.yy0);}
#line 2932 "pikchr.c"
  yymsp[-2].minor.yy36 = yylhsminor.yy36;
        break;
      case 91: /* nth ::= NTH CLASSNAME */
#line 749 "pikchr.y"
{yylhsminor.yy0=yymsp[0].minor.yy0; yylhsminor.yy0.eCode = pik_nth_value(p,&yymsp[-1].minor.yy0); }
#line 2938 "pikchr.c"
  yymsp[-1].minor.yy0 = yylhsminor.yy0;
        break;
      case 92: /* nth ::= NTH LAST CLASSNAME */
#line 750 "pikchr.y"
{yylhsminor.yy0=yymsp[0].minor.yy0; yylhsminor.yy0.eCode = -pik_nth_value(p,&yymsp[-2].minor.yy0); }
#line 2944 "pikchr.c"
  yymsp[-2].minor.yy0 = yylhsminor.yy0;
        break;
      case 93: /* nth ::= LAST CLASSNAME */
#line 751 "pikchr.y"
{yymsp[-1].minor.yy0=yymsp[0].minor.yy0; yymsp[-1].minor.yy0.eCode = -1;}
#line 2950 "pikchr.c"
        break;
      case 94: /* nth ::= LAST */
#line 752 "pikchr.y"
{yylhsminor.yy0=yymsp[0].minor.yy0; yylhsminor.yy0.eCode = -1;}
#line 2955 "pikchr.c"
  yymsp[0].minor.yy0 = yylhsminor.yy0;
        break;
      case 95: /* nth ::= NTH LB RB */
#line 753 "pikchr.y"
{yylhsminor.yy0=yymsp[-1].minor.yy0; yylhsminor.yy0.eCode = pik_nth_value(p,&yymsp[-2].minor.yy0);}
#line 2961 "pikchr.c"
  yymsp[-2].minor.yy0 = yylhsminor.yy0;
        break;
      case 96: /* nth ::= NTH LAST LB RB */
#line 754 "pikchr.y"
{yylhsminor.yy0=yymsp[-1].minor.yy0; yylhsminor.yy0.eCode = -pik_nth_value(p,&yymsp[-3].minor.yy0);}
#line 2967 "pikchr.c"
  yymsp[-3].minor.yy0 = yylhsminor.yy0;
        break;
      case 97: /* nth ::= LAST LB RB */
#line 755 "pikchr.y"
{yymsp[-2].minor.yy0=yymsp[-1].minor.yy0; yymsp[-2].minor.yy0.eCode = -1; }
#line 2973 "pikchr.c"
        break;
      case 98: /* expr ::= expr PLUS expr */
#line 757 "pikchr.y"
{yylhsminor.yy153=yymsp[-2].minor.yy153+yymsp[0].minor.yy153;}
#line 2978 "pikchr.c"
  yymsp[-2].minor.yy153 = yylhsminor.yy153;
        break;
      case 99: /* expr ::= expr MINUS expr */
#line 758 "pikchr.y"
{yylhsminor.yy153=yymsp[-2].minor.yy153-yymsp[0].minor.yy153;}
#line 2984 "pikchr.c"
  yymsp[-2].minor.yy153 = yylhsminor.yy153;
        break;
      case 100: /* expr ::= expr STAR expr */
#line 759 "pikchr.y"
{yylhsminor.yy153=yymsp[-2].minor.yy153*yymsp[0].minor.yy153;}
#line 2990 "pikchr.c"
  yymsp[-2].minor.yy153 = yylhsminor.yy153;
        break;
      case 101: /* expr ::= expr SLASH expr */
#line 760 "pikchr.y"
{
  if( yymsp[0].minor.yy153==0.0 ){ pik_error(p, &yymsp[-1].minor.yy0, "division by zero"); yylhsminor.yy153 = 0.0; }
  else{ yylhsminor.yy153 = yymsp[-2].minor.yy153/yymsp[0].minor.yy153; }
}
#line 2999 "pikchr.c"
  yymsp[-2].minor.yy153 = yylhsminor.yy153;
        break;
      case 102: /* expr ::= MINUS expr */
#line 764 "pikchr.y"
{yymsp[-1].minor.yy153=-yymsp[0].minor.yy153;}
#line 3005 "pikchr.c"
        break;
      case 103: /* expr ::= PLUS expr */
#line 765 "pikchr.y"
{yymsp[-1].minor.yy153=yymsp[0].minor.yy153;}
#line 3010 "pikchr.c"
        break;
      case 104: /* expr ::= LP expr RP */
#line 766 "pikchr.y"
{yymsp[-2].minor.yy153=yymsp[-1].minor.yy153;}
#line 3015 "pikchr.c"
        break;
      case 105: /* expr ::= LP FILL|COLOR|THICKNESS RP */
#line 767 "pikchr.y"
{yymsp[-2].minor.yy153=pik_get_var(p,&yymsp[-1].minor.yy0);}
#line 3020 "pikchr.c"
        break;
      case 106: /* expr ::= NUMBER */
#line 768 "pikchr.y"
{yylhsminor.yy153=pik_atof(&yymsp[0].minor.yy0);}
#line 3025 "pikchr.c"
  yymsp[0].minor.yy153 = yylhsminor.yy153;
        break;
      case 107: /* expr ::= ID */
#line 769 "pikchr.y"
{yylhsminor.yy153=pik_get_var(p,&yymsp[0].minor.yy0);}
#line 3031 "pikchr.c"
  yymsp[0].minor.yy153 = yylhsminor.yy153;
        break;
      case 108: /* expr ::= FUNC1 LP expr RP */
#line 770 "pikchr.y"
{yylhsminor.yy153 = pik_func(p,&yymsp[-3].minor.yy0,yymsp[-1].minor.yy153,0.0);}
#line 3037 "pikchr.c"
  yymsp[-3].minor.yy153 = yylhsminor.yy153;
        break;
      case 109: /* expr ::= FUNC2 LP expr COMMA expr RP */
#line 771 "pikchr.y"
{yylhsminor.yy153 = pik_func(p,&yymsp[-5].minor.yy0,yymsp[-3].minor.yy153,yymsp[-1].minor.yy153);}
#line 3043 "pikchr.c"
  yymsp[-5].minor.yy153 = yylhsminor.yy153;
        break;
      case 110: /* expr ::= DIST LP position COMMA position RP */
#line 772 "pikchr.y"
{yymsp[-5].minor.yy153 = pik_dist(&yymsp[-3].minor.yy79,&yymsp[-1].minor.yy79);}
#line 3049 "pikchr.c"
        break;
      case 111: /* expr ::= place2 DOT_XY X */
#line 773 "pikchr.y"
{yylhsminor.yy153 = yymsp[-2].minor.yy79.x;}
#line 3054 "pikchr.c"
  yymsp[-2].minor.yy153 = yylhsminor.yy153;
        break;
      case 112: /* expr ::= place2 DOT_XY Y */
#line 774 "pikchr.y"
{yylhsminor.yy153 = yymsp[-2].minor.yy79.y;}
#line 3060 "pikchr.c"
  yymsp[-2].minor.yy153 = yylhsminor.yy153;
        break;
      case 113: /* expr ::= object DOT_L numproperty */
      case 114: /* expr ::= object DOT_L dashproperty */ yytestcase(yyruleno==114);
      case 115: /* expr ::= object DOT_L colorproperty */ yytestcase(yyruleno==115);
#line 775 "pikchr.y"
{yylhsminor.yy153=pik_property_of(yymsp[-2].minor.yy36,&yymsp[0].minor.yy0);}
#line 3068 "pikchr.c"
  yymsp[-2].minor.yy153 = yylhsminor.yy153;
        break;
      default:
      /* (116) lvalue ::= ID */ yytestcase(yyruleno==116);
      /* (117) lvalue ::= FILL */ yytestcase(yyruleno==117);
      /* (118) lvalue ::= COLOR */ yytestcase(yyruleno==118);
      /* (119) lvalue ::= THICKNESS */ yytestcase(yyruleno==119);







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<















|




|





|





|




|





|





|






|





|





|




|




|




|




|







|




|




|




|




|





|





|





|




|




|





|





|




|




|




|




|




|




|




|




|




|




|




|




|





|





|




|




|




|




|




|




|





|




|





|




|




|




|




|




|




|




|





|




|




|





|





|





|





|





|





|




|




|





|





|





|





|





|





|





|





|





|





|





|





|





|





|





|





|





|




|





|





|





|





|




|





|





|





|




|





|





|








|





|




|




|




|




|





|





|





|





|




|





|







|







2366
2367
2368
2369
2370
2371
2372

















































2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
  YYACTIONTYPE yyact;             /* The next action */
  yyStackEntry *yymsp;            /* The top of the parser's stack */
  int yysize;                     /* Amount to pop the stack */
  pik_parserARG_FETCH
  (void)yyLookahead;
  (void)yyLookaheadToken;
  yymsp = yypParser->yytos;


















































  switch( yyruleno ){
  /* Beginning here are the reduction cases.  A typical example
  ** follows:
  **   case 0:
  **  #line <lineno> <grammarfile>
  **     { ... }           // User supplied code
  **  #line <lineno> <thisfile>
  **     break;
  */
/********** Begin reduce actions **********************************************/
        YYMINORTYPE yylhsminor;
      case 0: /* document ::= statement_list */
#line 547 "pikchr.y"
{pik_render(p,yymsp[0].minor.yy227);}
#line 2413 "pikchr.c"
        break;
      case 1: /* statement_list ::= statement */
#line 550 "pikchr.y"
{ yylhsminor.yy227 = pik_elist_append(p,0,yymsp[0].minor.yy36); }
#line 2418 "pikchr.c"
  yymsp[0].minor.yy227 = yylhsminor.yy227;
        break;
      case 2: /* statement_list ::= statement_list EOL statement */
#line 552 "pikchr.y"
{ yylhsminor.yy227 = pik_elist_append(p,yymsp[-2].minor.yy227,yymsp[0].minor.yy36); }
#line 2424 "pikchr.c"
  yymsp[-2].minor.yy227 = yylhsminor.yy227;
        break;
      case 3: /* statement ::= */
#line 555 "pikchr.y"
{ yymsp[1].minor.yy36 = 0; }
#line 2430 "pikchr.c"
        break;
      case 4: /* statement ::= direction */
#line 556 "pikchr.y"
{ pik_set_direction(p,yymsp[0].minor.yy0.eCode);  yylhsminor.yy36=0; }
#line 2435 "pikchr.c"
  yymsp[0].minor.yy36 = yylhsminor.yy36;
        break;
      case 5: /* statement ::= lvalue ASSIGN rvalue */
#line 557 "pikchr.y"
{pik_set_var(p,&yymsp[-2].minor.yy0,yymsp[0].minor.yy153,&yymsp[-1].minor.yy0); yylhsminor.yy36=0;}
#line 2441 "pikchr.c"
  yymsp[-2].minor.yy36 = yylhsminor.yy36;
        break;
      case 6: /* statement ::= PLACENAME COLON unnamed_statement */
#line 559 "pikchr.y"
{ yylhsminor.yy36 = yymsp[0].minor.yy36;  pik_elem_setname(p,yymsp[0].minor.yy36,&yymsp[-2].minor.yy0); }
#line 2447 "pikchr.c"
  yymsp[-2].minor.yy36 = yylhsminor.yy36;
        break;
      case 7: /* statement ::= PLACENAME COLON position */
#line 561 "pikchr.y"
{ yylhsminor.yy36 = pik_elem_new(p,0,0,0);
                 if(yylhsminor.yy36){ yylhsminor.yy36->ptAt = yymsp[0].minor.yy79; pik_elem_setname(p,yylhsminor.yy36,&yymsp[-2].minor.yy0); }}
#line 2454 "pikchr.c"
  yymsp[-2].minor.yy36 = yylhsminor.yy36;
        break;
      case 8: /* statement ::= unnamed_statement */
#line 563 "pikchr.y"
{yylhsminor.yy36 = yymsp[0].minor.yy36;}
#line 2460 "pikchr.c"
  yymsp[0].minor.yy36 = yylhsminor.yy36;
        break;
      case 9: /* statement ::= print prlist */
#line 564 "pikchr.y"
{pik_append(p,"<br>\n",5); yymsp[-1].minor.yy36=0;}
#line 2466 "pikchr.c"
        break;
      case 10: /* statement ::= ASSERT LP expr EQ expr RP */
#line 569 "pikchr.y"
{yymsp[-5].minor.yy36=pik_assert(p,yymsp[-3].minor.yy153,&yymsp[-2].minor.yy0,yymsp[-1].minor.yy153);}
#line 2471 "pikchr.c"
        break;
      case 11: /* statement ::= ASSERT LP position EQ position RP */
#line 571 "pikchr.y"
{yymsp[-5].minor.yy36=pik_position_assert(p,&yymsp[-3].minor.yy79,&yymsp[-2].minor.yy0,&yymsp[-1].minor.yy79);}
#line 2476 "pikchr.c"
        break;
      case 12: /* statement ::= DEFINE ID CODEBLOCK */
#line 572 "pikchr.y"
{yymsp[-2].minor.yy36=0; pik_add_macro(p,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy0);}
#line 2481 "pikchr.c"
        break;
      case 13: /* rvalue ::= PLACENAME */
#line 583 "pikchr.y"
{yylhsminor.yy153 = pik_lookup_color(p,&yymsp[0].minor.yy0);}
#line 2486 "pikchr.c"
  yymsp[0].minor.yy153 = yylhsminor.yy153;
        break;
      case 14: /* pritem ::= FILL */
      case 15: /* pritem ::= COLOR */ yytestcase(yyruleno==15);
      case 16: /* pritem ::= THICKNESS */ yytestcase(yyruleno==16);
#line 588 "pikchr.y"
{pik_append_num(p,"",pik_value(p,yymsp[0].minor.yy0.z,yymsp[0].minor.yy0.n,0));}
#line 2494 "pikchr.c"
        break;
      case 17: /* pritem ::= rvalue */
#line 591 "pikchr.y"
{pik_append_num(p,"",yymsp[0].minor.yy153);}
#line 2499 "pikchr.c"
        break;
      case 18: /* pritem ::= STRING */
#line 592 "pikchr.y"
{pik_append_text(p,yymsp[0].minor.yy0.z+1,yymsp[0].minor.yy0.n-2,0);}
#line 2504 "pikchr.c"
        break;
      case 19: /* prsep ::= COMMA */
#line 593 "pikchr.y"
{pik_append(p, " ", 1);}
#line 2509 "pikchr.c"
        break;
      case 20: /* unnamed_statement ::= basetype attribute_list */
#line 596 "pikchr.y"
{yylhsminor.yy36 = yymsp[-1].minor.yy36; pik_after_adding_attributes(p,yylhsminor.yy36);}
#line 2514 "pikchr.c"
  yymsp[-1].minor.yy36 = yylhsminor.yy36;
        break;
      case 21: /* basetype ::= CLASSNAME */
#line 598 "pikchr.y"
{yylhsminor.yy36 = pik_elem_new(p,&yymsp[0].minor.yy0,0,0); }
#line 2520 "pikchr.c"
  yymsp[0].minor.yy36 = yylhsminor.yy36;
        break;
      case 22: /* basetype ::= STRING textposition */
#line 600 "pikchr.y"
{yymsp[-1].minor.yy0.eCode = yymsp[0].minor.yy164; yylhsminor.yy36 = pik_elem_new(p,0,&yymsp[-1].minor.yy0,0); }
#line 2526 "pikchr.c"
  yymsp[-1].minor.yy36 = yylhsminor.yy36;
        break;
      case 23: /* basetype ::= LB savelist statement_list RB */
#line 602 "pikchr.y"
{ p->list = yymsp[-2].minor.yy227; yymsp[-3].minor.yy36 = pik_elem_new(p,0,0,yymsp[-1].minor.yy227); if(yymsp[-3].minor.yy36) yymsp[-3].minor.yy36->errTok = yymsp[0].minor.yy0; }
#line 2532 "pikchr.c"
        break;
      case 24: /* savelist ::= */
#line 607 "pikchr.y"
{yymsp[1].minor.yy227 = p->list; p->list = 0;}
#line 2537 "pikchr.c"
        break;
      case 25: /* relexpr ::= expr */
#line 614 "pikchr.y"
{yylhsminor.yy10.rAbs = yymsp[0].minor.yy153; yylhsminor.yy10.rRel = 0;}
#line 2542 "pikchr.c"
  yymsp[0].minor.yy10 = yylhsminor.yy10;
        break;
      case 26: /* relexpr ::= expr PERCENT */
#line 615 "pikchr.y"
{yylhsminor.yy10.rAbs = 0; yylhsminor.yy10.rRel = yymsp[-1].minor.yy153/100;}
#line 2548 "pikchr.c"
  yymsp[-1].minor.yy10 = yylhsminor.yy10;
        break;
      case 27: /* optrelexpr ::= */
#line 617 "pikchr.y"
{yymsp[1].minor.yy10.rAbs = 0; yymsp[1].minor.yy10.rRel = 1.0;}
#line 2554 "pikchr.c"
        break;
      case 28: /* attribute_list ::= relexpr alist */
#line 619 "pikchr.y"
{pik_add_direction(p,0,&yymsp[-1].minor.yy10);}
#line 2559 "pikchr.c"
        break;
      case 29: /* attribute ::= numproperty relexpr */
#line 623 "pikchr.y"
{ pik_set_numprop(p,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy10); }
#line 2564 "pikchr.c"
        break;
      case 30: /* attribute ::= dashproperty expr */
#line 624 "pikchr.y"
{ pik_set_dashed(p,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy153); }
#line 2569 "pikchr.c"
        break;
      case 31: /* attribute ::= dashproperty */
#line 625 "pikchr.y"
{ pik_set_dashed(p,&yymsp[0].minor.yy0,0);  }
#line 2574 "pikchr.c"
        break;
      case 32: /* attribute ::= colorproperty rvalue */
#line 626 "pikchr.y"
{ pik_set_clrprop(p,&yymsp[-1].minor.yy0,yymsp[0].minor.yy153); }
#line 2579 "pikchr.c"
        break;
      case 33: /* attribute ::= go direction optrelexpr */
#line 627 "pikchr.y"
{ pik_add_direction(p,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy10);}
#line 2584 "pikchr.c"
        break;
      case 34: /* attribute ::= go direction even position */
#line 628 "pikchr.y"
{pik_evenwith(p,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy79);}
#line 2589 "pikchr.c"
        break;
      case 35: /* attribute ::= CLOSE */
#line 629 "pikchr.y"
{ pik_close_path(p,&yymsp[0].minor.yy0); }
#line 2594 "pikchr.c"
        break;
      case 36: /* attribute ::= CHOP */
#line 630 "pikchr.y"
{ p->cur->bChop = 1; }
#line 2599 "pikchr.c"
        break;
      case 37: /* attribute ::= FROM position */
#line 631 "pikchr.y"
{ pik_set_from(p,p->cur,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy79); }
#line 2604 "pikchr.c"
        break;
      case 38: /* attribute ::= TO position */
#line 632 "pikchr.y"
{ pik_add_to(p,p->cur,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy79); }
#line 2609 "pikchr.c"
        break;
      case 39: /* attribute ::= THEN */
#line 633 "pikchr.y"
{ pik_then(p, &yymsp[0].minor.yy0, p->cur); }
#line 2614 "pikchr.c"
        break;
      case 40: /* attribute ::= THEN optrelexpr HEADING expr */
      case 42: /* attribute ::= GO optrelexpr HEADING expr */ yytestcase(yyruleno==42);
#line 635 "pikchr.y"
{pik_move_hdg(p,&yymsp[-2].minor.yy10,&yymsp[-1].minor.yy0,yymsp[0].minor.yy153,0,&yymsp[-3].minor.yy0);}
#line 2620 "pikchr.c"
        break;
      case 41: /* attribute ::= THEN optrelexpr EDGEPT */
      case 43: /* attribute ::= GO optrelexpr EDGEPT */ yytestcase(yyruleno==43);
#line 636 "pikchr.y"
{pik_move_hdg(p,&yymsp[-1].minor.yy10,0,0,&yymsp[0].minor.yy0,&yymsp[-2].minor.yy0);}
#line 2626 "pikchr.c"
        break;
      case 44: /* attribute ::= AT position */
#line 641 "pikchr.y"
{ pik_set_at(p,0,&yymsp[0].minor.yy79,&yymsp[-1].minor.yy0); }
#line 2631 "pikchr.c"
        break;
      case 45: /* attribute ::= SAME */
#line 643 "pikchr.y"
{pik_same(p,0,&yymsp[0].minor.yy0);}
#line 2636 "pikchr.c"
        break;
      case 46: /* attribute ::= SAME AS object */
#line 644 "pikchr.y"
{pik_same(p,yymsp[0].minor.yy36,&yymsp[-2].minor.yy0);}
#line 2641 "pikchr.c"
        break;
      case 47: /* attribute ::= STRING textposition */
#line 645 "pikchr.y"
{pik_add_txt(p,&yymsp[-1].minor.yy0,yymsp[0].minor.yy164);}
#line 2646 "pikchr.c"
        break;
      case 48: /* attribute ::= FIT */
#line 646 "pikchr.y"
{pik_size_to_fit(p,&yymsp[0].minor.yy0,3); }
#line 2651 "pikchr.c"
        break;
      case 49: /* attribute ::= BEHIND object */
#line 647 "pikchr.y"
{pik_behind(p,yymsp[0].minor.yy36);}
#line 2656 "pikchr.c"
        break;
      case 50: /* withclause ::= DOT_E edge AT position */
      case 51: /* withclause ::= edge AT position */ yytestcase(yyruleno==51);
#line 655 "pikchr.y"
{ pik_set_at(p,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy79,&yymsp[-1].minor.yy0); }
#line 2662 "pikchr.c"
        break;
      case 52: /* numproperty ::= HEIGHT|WIDTH|RADIUS|DIAMETER|THICKNESS */
#line 659 "pikchr.y"
{yylhsminor.yy0 = yymsp[0].minor.yy0;}
#line 2667 "pikchr.c"
  yymsp[0].minor.yy0 = yylhsminor.yy0;
        break;
      case 53: /* boolproperty ::= CW */
#line 670 "pikchr.y"
{p->cur->cw = 1;}
#line 2673 "pikchr.c"
        break;
      case 54: /* boolproperty ::= CCW */
#line 671 "pikchr.y"
{p->cur->cw = 0;}
#line 2678 "pikchr.c"
        break;
      case 55: /* boolproperty ::= LARROW */
#line 672 "pikchr.y"
{p->cur->larrow=1; p->cur->rarrow=0; }
#line 2683 "pikchr.c"
        break;
      case 56: /* boolproperty ::= RARROW */
#line 673 "pikchr.y"
{p->cur->larrow=0; p->cur->rarrow=1; }
#line 2688 "pikchr.c"
        break;
      case 57: /* boolproperty ::= LRARROW */
#line 674 "pikchr.y"
{p->cur->larrow=1; p->cur->rarrow=1; }
#line 2693 "pikchr.c"
        break;
      case 58: /* boolproperty ::= INVIS */
#line 675 "pikchr.y"
{p->cur->sw = 0.0;}
#line 2698 "pikchr.c"
        break;
      case 59: /* boolproperty ::= THICK */
#line 676 "pikchr.y"
{p->cur->sw *= 1.5;}
#line 2703 "pikchr.c"
        break;
      case 60: /* boolproperty ::= THIN */
#line 677 "pikchr.y"
{p->cur->sw *= 0.67;}
#line 2708 "pikchr.c"
        break;
      case 61: /* boolproperty ::= SOLID */
#line 678 "pikchr.y"
{p->cur->sw = pik_value(p,"thickness",9,0);
                               p->cur->dotted = p->cur->dashed = 0.0;}
#line 2714 "pikchr.c"
        break;
      case 62: /* textposition ::= */
#line 681 "pikchr.y"
{yymsp[1].minor.yy164 = 0;}
#line 2719 "pikchr.c"
        break;
      case 63: /* textposition ::= textposition CENTER|LJUST|RJUST|ABOVE|BELOW|ITALIC|BOLD|ALIGNED|BIG|SMALL */
#line 684 "pikchr.y"
{yylhsminor.yy164 = (short int)pik_text_position(yymsp[-1].minor.yy164,&yymsp[0].minor.yy0);}
#line 2724 "pikchr.c"
  yymsp[-1].minor.yy164 = yylhsminor.yy164;
        break;
      case 64: /* position ::= expr COMMA expr */
#line 687 "pikchr.y"
{yylhsminor.yy79.x=yymsp[-2].minor.yy153; yylhsminor.yy79.y=yymsp[0].minor.yy153;}
#line 2730 "pikchr.c"
  yymsp[-2].minor.yy79 = yylhsminor.yy79;
        break;
      case 65: /* position ::= place PLUS expr COMMA expr */
#line 689 "pikchr.y"
{yylhsminor.yy79.x=yymsp[-4].minor.yy79.x+yymsp[-2].minor.yy153; yylhsminor.yy79.y=yymsp[-4].minor.yy79.y+yymsp[0].minor.yy153;}
#line 2736 "pikchr.c"
  yymsp[-4].minor.yy79 = yylhsminor.yy79;
        break;
      case 66: /* position ::= place MINUS expr COMMA expr */
#line 690 "pikchr.y"
{yylhsminor.yy79.x=yymsp[-4].minor.yy79.x-yymsp[-2].minor.yy153; yylhsminor.yy79.y=yymsp[-4].minor.yy79.y-yymsp[0].minor.yy153;}
#line 2742 "pikchr.c"
  yymsp[-4].minor.yy79 = yylhsminor.yy79;
        break;
      case 67: /* position ::= place PLUS LP expr COMMA expr RP */
#line 692 "pikchr.y"
{yylhsminor.yy79.x=yymsp[-6].minor.yy79.x+yymsp[-3].minor.yy153; yylhsminor.yy79.y=yymsp[-6].minor.yy79.y+yymsp[-1].minor.yy153;}
#line 2748 "pikchr.c"
  yymsp[-6].minor.yy79 = yylhsminor.yy79;
        break;
      case 68: /* position ::= place MINUS LP expr COMMA expr RP */
#line 694 "pikchr.y"
{yylhsminor.yy79.x=yymsp[-6].minor.yy79.x-yymsp[-3].minor.yy153; yylhsminor.yy79.y=yymsp[-6].minor.yy79.y-yymsp[-1].minor.yy153;}
#line 2754 "pikchr.c"
  yymsp[-6].minor.yy79 = yylhsminor.yy79;
        break;
      case 69: /* position ::= LP position COMMA position RP */
#line 695 "pikchr.y"
{yymsp[-4].minor.yy79.x=yymsp[-3].minor.yy79.x; yymsp[-4].minor.yy79.y=yymsp[-1].minor.yy79.y;}
#line 2760 "pikchr.c"
        break;
      case 70: /* position ::= LP position RP */
#line 696 "pikchr.y"
{yymsp[-2].minor.yy79=yymsp[-1].minor.yy79;}
#line 2765 "pikchr.c"
        break;
      case 71: /* position ::= expr between position AND position */
#line 698 "pikchr.y"
{yylhsminor.yy79 = pik_position_between(yymsp[-4].minor.yy153,yymsp[-2].minor.yy79,yymsp[0].minor.yy79);}
#line 2770 "pikchr.c"
  yymsp[-4].minor.yy79 = yylhsminor.yy79;
        break;
      case 72: /* position ::= expr LT position COMMA position GT */
#line 700 "pikchr.y"
{yylhsminor.yy79 = pik_position_between(yymsp[-5].minor.yy153,yymsp[-3].minor.yy79,yymsp[-1].minor.yy79);}
#line 2776 "pikchr.c"
  yymsp[-5].minor.yy79 = yylhsminor.yy79;
        break;
      case 73: /* position ::= expr ABOVE position */
#line 701 "pikchr.y"
{yylhsminor.yy79=yymsp[0].minor.yy79; yylhsminor.yy79.y += yymsp[-2].minor.yy153;}
#line 2782 "pikchr.c"
  yymsp[-2].minor.yy79 = yylhsminor.yy79;
        break;
      case 74: /* position ::= expr BELOW position */
#line 702 "pikchr.y"
{yylhsminor.yy79=yymsp[0].minor.yy79; yylhsminor.yy79.y -= yymsp[-2].minor.yy153;}
#line 2788 "pikchr.c"
  yymsp[-2].minor.yy79 = yylhsminor.yy79;
        break;
      case 75: /* position ::= expr LEFT OF position */
#line 703 "pikchr.y"
{yylhsminor.yy79=yymsp[0].minor.yy79; yylhsminor.yy79.x -= yymsp[-3].minor.yy153;}
#line 2794 "pikchr.c"
  yymsp[-3].minor.yy79 = yylhsminor.yy79;
        break;
      case 76: /* position ::= expr RIGHT OF position */
#line 704 "pikchr.y"
{yylhsminor.yy79=yymsp[0].minor.yy79; yylhsminor.yy79.x += yymsp[-3].minor.yy153;}
#line 2800 "pikchr.c"
  yymsp[-3].minor.yy79 = yylhsminor.yy79;
        break;
      case 77: /* position ::= expr ON HEADING EDGEPT OF position */
#line 706 "pikchr.y"
{yylhsminor.yy79 = pik_position_at_hdg(yymsp[-5].minor.yy153,&yymsp[-2].minor.yy0,yymsp[0].minor.yy79);}
#line 2806 "pikchr.c"
  yymsp[-5].minor.yy79 = yylhsminor.yy79;
        break;
      case 78: /* position ::= expr HEADING EDGEPT OF position */
#line 708 "pikchr.y"
{yylhsminor.yy79 = pik_position_at_hdg(yymsp[-4].minor.yy153,&yymsp[-2].minor.yy0,yymsp[0].minor.yy79);}
#line 2812 "pikchr.c"
  yymsp[-4].minor.yy79 = yylhsminor.yy79;
        break;
      case 79: /* position ::= expr EDGEPT OF position */
#line 710 "pikchr.y"
{yylhsminor.yy79 = pik_position_at_hdg(yymsp[-3].minor.yy153,&yymsp[-2].minor.yy0,yymsp[0].minor.yy79);}
#line 2818 "pikchr.c"
  yymsp[-3].minor.yy79 = yylhsminor.yy79;
        break;
      case 80: /* position ::= expr ON HEADING expr FROM position */
#line 712 "pikchr.y"
{yylhsminor.yy79 = pik_position_at_angle(yymsp[-5].minor.yy153,yymsp[-2].minor.yy153,yymsp[0].minor.yy79);}
#line 2824 "pikchr.c"
  yymsp[-5].minor.yy79 = yylhsminor.yy79;
        break;
      case 81: /* position ::= expr HEADING expr FROM position */
#line 714 "pikchr.y"
{yylhsminor.yy79 = pik_position_at_angle(yymsp[-4].minor.yy153,yymsp[-2].minor.yy153,yymsp[0].minor.yy79);}
#line 2830 "pikchr.c"
  yymsp[-4].minor.yy79 = yylhsminor.yy79;
        break;
      case 82: /* place ::= edge OF object */
#line 726 "pikchr.y"
{yylhsminor.yy79 = pik_place_of_elem(p,yymsp[0].minor.yy36,&yymsp[-2].minor.yy0);}
#line 2836 "pikchr.c"
  yymsp[-2].minor.yy79 = yylhsminor.yy79;
        break;
      case 83: /* place2 ::= object */
#line 727 "pikchr.y"
{yylhsminor.yy79 = pik_place_of_elem(p,yymsp[0].minor.yy36,0);}
#line 2842 "pikchr.c"
  yymsp[0].minor.yy79 = yylhsminor.yy79;
        break;
      case 84: /* place2 ::= object DOT_E edge */
#line 728 "pikchr.y"
{yylhsminor.yy79 = pik_place_of_elem(p,yymsp[-2].minor.yy36,&yymsp[0].minor.yy0);}
#line 2848 "pikchr.c"
  yymsp[-2].minor.yy79 = yylhsminor.yy79;
        break;
      case 85: /* place2 ::= NTH VERTEX OF object */
#line 729 "pikchr.y"
{yylhsminor.yy79 = pik_nth_vertex(p,&yymsp[-3].minor.yy0,&yymsp[-2].minor.yy0,yymsp[0].minor.yy36);}
#line 2854 "pikchr.c"
  yymsp[-3].minor.yy79 = yylhsminor.yy79;
        break;
      case 86: /* object ::= nth */
#line 741 "pikchr.y"
{yylhsminor.yy36 = pik_find_nth(p,0,&yymsp[0].minor.yy0);}
#line 2860 "pikchr.c"
  yymsp[0].minor.yy36 = yylhsminor.yy36;
        break;
      case 87: /* object ::= nth OF|IN object */
#line 742 "pikchr.y"
{yylhsminor.yy36 = pik_find_nth(p,yymsp[0].minor.yy36,&yymsp[-2].minor.yy0);}
#line 2866 "pikchr.c"
  yymsp[-2].minor.yy36 = yylhsminor.yy36;
        break;
      case 88: /* objectname ::= THIS */
#line 744 "pikchr.y"
{yymsp[0].minor.yy36 = p->cur;}
#line 2872 "pikchr.c"
        break;
      case 89: /* objectname ::= PLACENAME */
#line 745 "pikchr.y"
{yylhsminor.yy36 = pik_find_byname(p,0,&yymsp[0].minor.yy0);}
#line 2877 "pikchr.c"
  yymsp[0].minor.yy36 = yylhsminor.yy36;
        break;
      case 90: /* objectname ::= objectname DOT_U PLACENAME */
#line 747 "pikchr.y"
{yylhsminor.yy36 = pik_find_byname(p,yymsp[-2].minor.yy36,&yymsp[0].minor.yy0);}
#line 2883 "pikchr.c"
  yymsp[-2].minor.yy36 = yylhsminor.yy36;
        break;
      case 91: /* nth ::= NTH CLASSNAME */
#line 749 "pikchr.y"
{yylhsminor.yy0=yymsp[0].minor.yy0; yylhsminor.yy0.eCode = pik_nth_value(p,&yymsp[-1].minor.yy0); }
#line 2889 "pikchr.c"
  yymsp[-1].minor.yy0 = yylhsminor.yy0;
        break;
      case 92: /* nth ::= NTH LAST CLASSNAME */
#line 750 "pikchr.y"
{yylhsminor.yy0=yymsp[0].minor.yy0; yylhsminor.yy0.eCode = -pik_nth_value(p,&yymsp[-2].minor.yy0); }
#line 2895 "pikchr.c"
  yymsp[-2].minor.yy0 = yylhsminor.yy0;
        break;
      case 93: /* nth ::= LAST CLASSNAME */
#line 751 "pikchr.y"
{yymsp[-1].minor.yy0=yymsp[0].minor.yy0; yymsp[-1].minor.yy0.eCode = -1;}
#line 2901 "pikchr.c"
        break;
      case 94: /* nth ::= LAST */
#line 752 "pikchr.y"
{yylhsminor.yy0=yymsp[0].minor.yy0; yylhsminor.yy0.eCode = -1;}
#line 2906 "pikchr.c"
  yymsp[0].minor.yy0 = yylhsminor.yy0;
        break;
      case 95: /* nth ::= NTH LB RB */
#line 753 "pikchr.y"
{yylhsminor.yy0=yymsp[-1].minor.yy0; yylhsminor.yy0.eCode = pik_nth_value(p,&yymsp[-2].minor.yy0);}
#line 2912 "pikchr.c"
  yymsp[-2].minor.yy0 = yylhsminor.yy0;
        break;
      case 96: /* nth ::= NTH LAST LB RB */
#line 754 "pikchr.y"
{yylhsminor.yy0=yymsp[-1].minor.yy0; yylhsminor.yy0.eCode = -pik_nth_value(p,&yymsp[-3].minor.yy0);}
#line 2918 "pikchr.c"
  yymsp[-3].minor.yy0 = yylhsminor.yy0;
        break;
      case 97: /* nth ::= LAST LB RB */
#line 755 "pikchr.y"
{yymsp[-2].minor.yy0=yymsp[-1].minor.yy0; yymsp[-2].minor.yy0.eCode = -1; }
#line 2924 "pikchr.c"
        break;
      case 98: /* expr ::= expr PLUS expr */
#line 757 "pikchr.y"
{yylhsminor.yy153=yymsp[-2].minor.yy153+yymsp[0].minor.yy153;}
#line 2929 "pikchr.c"
  yymsp[-2].minor.yy153 = yylhsminor.yy153;
        break;
      case 99: /* expr ::= expr MINUS expr */
#line 758 "pikchr.y"
{yylhsminor.yy153=yymsp[-2].minor.yy153-yymsp[0].minor.yy153;}
#line 2935 "pikchr.c"
  yymsp[-2].minor.yy153 = yylhsminor.yy153;
        break;
      case 100: /* expr ::= expr STAR expr */
#line 759 "pikchr.y"
{yylhsminor.yy153=yymsp[-2].minor.yy153*yymsp[0].minor.yy153;}
#line 2941 "pikchr.c"
  yymsp[-2].minor.yy153 = yylhsminor.yy153;
        break;
      case 101: /* expr ::= expr SLASH expr */
#line 760 "pikchr.y"
{
  if( yymsp[0].minor.yy153==0.0 ){ pik_error(p, &yymsp[-1].minor.yy0, "division by zero"); yylhsminor.yy153 = 0.0; }
  else{ yylhsminor.yy153 = yymsp[-2].minor.yy153/yymsp[0].minor.yy153; }
}
#line 2950 "pikchr.c"
  yymsp[-2].minor.yy153 = yylhsminor.yy153;
        break;
      case 102: /* expr ::= MINUS expr */
#line 764 "pikchr.y"
{yymsp[-1].minor.yy153=-yymsp[0].minor.yy153;}
#line 2956 "pikchr.c"
        break;
      case 103: /* expr ::= PLUS expr */
#line 765 "pikchr.y"
{yymsp[-1].minor.yy153=yymsp[0].minor.yy153;}
#line 2961 "pikchr.c"
        break;
      case 104: /* expr ::= LP expr RP */
#line 766 "pikchr.y"
{yymsp[-2].minor.yy153=yymsp[-1].minor.yy153;}
#line 2966 "pikchr.c"
        break;
      case 105: /* expr ::= LP FILL|COLOR|THICKNESS RP */
#line 767 "pikchr.y"
{yymsp[-2].minor.yy153=pik_get_var(p,&yymsp[-1].minor.yy0);}
#line 2971 "pikchr.c"
        break;
      case 106: /* expr ::= NUMBER */
#line 768 "pikchr.y"
{yylhsminor.yy153=pik_atof(&yymsp[0].minor.yy0);}
#line 2976 "pikchr.c"
  yymsp[0].minor.yy153 = yylhsminor.yy153;
        break;
      case 107: /* expr ::= ID */
#line 769 "pikchr.y"
{yylhsminor.yy153=pik_get_var(p,&yymsp[0].minor.yy0);}
#line 2982 "pikchr.c"
  yymsp[0].minor.yy153 = yylhsminor.yy153;
        break;
      case 108: /* expr ::= FUNC1 LP expr RP */
#line 770 "pikchr.y"
{yylhsminor.yy153 = pik_func(p,&yymsp[-3].minor.yy0,yymsp[-1].minor.yy153,0.0);}
#line 2988 "pikchr.c"
  yymsp[-3].minor.yy153 = yylhsminor.yy153;
        break;
      case 109: /* expr ::= FUNC2 LP expr COMMA expr RP */
#line 771 "pikchr.y"
{yylhsminor.yy153 = pik_func(p,&yymsp[-5].minor.yy0,yymsp[-3].minor.yy153,yymsp[-1].minor.yy153);}
#line 2994 "pikchr.c"
  yymsp[-5].minor.yy153 = yylhsminor.yy153;
        break;
      case 110: /* expr ::= DIST LP position COMMA position RP */
#line 772 "pikchr.y"
{yymsp[-5].minor.yy153 = pik_dist(&yymsp[-3].minor.yy79,&yymsp[-1].minor.yy79);}
#line 3000 "pikchr.c"
        break;
      case 111: /* expr ::= place2 DOT_XY X */
#line 773 "pikchr.y"
{yylhsminor.yy153 = yymsp[-2].minor.yy79.x;}
#line 3005 "pikchr.c"
  yymsp[-2].minor.yy153 = yylhsminor.yy153;
        break;
      case 112: /* expr ::= place2 DOT_XY Y */
#line 774 "pikchr.y"
{yylhsminor.yy153 = yymsp[-2].minor.yy79.y;}
#line 3011 "pikchr.c"
  yymsp[-2].minor.yy153 = yylhsminor.yy153;
        break;
      case 113: /* expr ::= object DOT_L numproperty */
      case 114: /* expr ::= object DOT_L dashproperty */ yytestcase(yyruleno==114);
      case 115: /* expr ::= object DOT_L colorproperty */ yytestcase(yyruleno==115);
#line 775 "pikchr.y"
{yylhsminor.yy153=pik_property_of(yymsp[-2].minor.yy36,&yymsp[0].minor.yy0);}
#line 3019 "pikchr.c"
  yymsp[-2].minor.yy153 = yylhsminor.yy153;
        break;
      default:
      /* (116) lvalue ::= ID */ yytestcase(yyruleno==116);
      /* (117) lvalue ::= FILL */ yytestcase(yyruleno==117);
      /* (118) lvalue ::= COLOR */ yytestcase(yyruleno==118);
      /* (119) lvalue ::= THICKNESS */ yytestcase(yyruleno==119);
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161

  if( TOKEN.z && TOKEN.z[0] ){
    pik_error(p, &TOKEN, "syntax error");
  }else{
    pik_error(p, 0, "syntax error");
  }
  UNUSED_PARAMETER(yymajor);
#line 3179 "pikchr.c"
/************ End %syntax_error code ******************************************/
  pik_parserARG_STORE /* Suppress warning about unused %extra_argument variable */
  pik_parserCTX_STORE
}

/*
** The following is executed when the parser accepts







|







3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112

  if( TOKEN.z && TOKEN.z[0] ){
    pik_error(p, &TOKEN, "syntax error");
  }else{
    pik_error(p, 0, "syntax error");
  }
  UNUSED_PARAMETER(yymajor);
#line 3130 "pikchr.c"
/************ End %syntax_error code ******************************************/
  pik_parserARG_STORE /* Suppress warning about unused %extra_argument variable */
  pik_parserCTX_STORE
}

/*
** The following is executed when the parser accepts
3233
3234
3235
3236
3237
3238
3239
3240

3241
3242
3243


















3244

























3245
3246
3247
3248
3249
3250
3251
3252
    }else{
      fprintf(yyTraceFILE,"%sInput '%s' with pending reduce %d\n",
              yyTracePrompt,yyTokenName[yymajor],yyact-YY_MIN_REDUCE);
    }
  }
#endif

  do{

    assert( yyact==yypParser->yytos->stateno );
    yyact = yy_find_shift_action((YYCODETYPE)yymajor,yyact);
    if( yyact >= YY_MIN_REDUCE ){


















      yyact = yy_reduce(yypParser,yyact-YY_MIN_REDUCE,yymajor,

























                        yyminor pik_parserCTX_PARAM);
    }else if( yyact <= YY_MAX_SHIFTREDUCE ){
      yy_shift(yypParser,yyact,(YYCODETYPE)yymajor,yyminor);
#ifndef YYNOERRORRECOVERY
      yypParser->yyerrcnt--;
#endif
      break;
    }else if( yyact==YY_ACCEPT_ACTION ){







|
>



>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|







3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
    }else{
      fprintf(yyTraceFILE,"%sInput '%s' with pending reduce %d\n",
              yyTracePrompt,yyTokenName[yymajor],yyact-YY_MIN_REDUCE);
    }
  }
#endif

  while(1){ /* Exit by "break" */
    assert( yypParser->yytos>=yypParser->yystack );
    assert( yyact==yypParser->yytos->stateno );
    yyact = yy_find_shift_action((YYCODETYPE)yymajor,yyact);
    if( yyact >= YY_MIN_REDUCE ){
      unsigned int yyruleno = yyact - YY_MIN_REDUCE; /* Reduce by this rule */
#ifndef NDEBUG
      assert( yyruleno<(int)(sizeof(yyRuleName)/sizeof(yyRuleName[0])) );
      if( yyTraceFILE ){
        int yysize = yyRuleInfoNRhs[yyruleno];
        if( yysize ){
          fprintf(yyTraceFILE, "%sReduce %d [%s]%s, pop back to state %d.\n",
            yyTracePrompt,
            yyruleno, yyRuleName[yyruleno],
            yyruleno<YYNRULE_WITH_ACTION ? "" : " without external action",
            yypParser->yytos[yysize].stateno);
        }else{
          fprintf(yyTraceFILE, "%sReduce %d [%s]%s.\n",
            yyTracePrompt, yyruleno, yyRuleName[yyruleno],
            yyruleno<YYNRULE_WITH_ACTION ? "" : " without external action");
        }
      }
#endif /* NDEBUG */

      /* Check that the stack is large enough to grow by a single entry
      ** if the RHS of the rule is empty.  This ensures that there is room
      ** enough on the stack to push the LHS value */
      if( yyRuleInfoNRhs[yyruleno]==0 ){
#ifdef YYTRACKMAXSTACKDEPTH
        if( (int)(yypParser->yytos - yypParser->yystack)>yypParser->yyhwm ){
          yypParser->yyhwm++;
          assert( yypParser->yyhwm ==
                  (int)(yypParser->yytos - yypParser->yystack));
        }
#endif
#if YYSTACKDEPTH>0 
        if( yypParser->yytos>=yypParser->yystackEnd ){
          yyStackOverflow(yypParser);
          break;
        }
#else
        if( yypParser->yytos>=&yypParser->yystack[yypParser->yystksz-1] ){
          if( yyGrowStack(yypParser) ){
            yyStackOverflow(yypParser);
            break;
          }
        }
#endif
      }
      yyact = yy_reduce(yypParser,yyruleno,yymajor,yyminor pik_parserCTX_PARAM);
    }else if( yyact <= YY_MAX_SHIFTREDUCE ){
      yy_shift(yypParser,yyact,(YYCODETYPE)yymajor,yyminor);
#ifndef YYNOERRORRECOVERY
      yypParser->yyerrcnt--;
#endif
      break;
    }else if( yyact==YY_ACCEPT_ACTION ){
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305

3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
          fprintf(yyTraceFILE,"%sDiscard input token %s\n",
             yyTracePrompt,yyTokenName[yymajor]);
        }
#endif
        yy_destructor(yypParser, (YYCODETYPE)yymajor, &yyminorunion);
        yymajor = YYNOCODE;
      }else{
        while( yypParser->yytos >= yypParser->yystack
            && (yyact = yy_find_reduce_action(
                        yypParser->yytos->stateno,
                        YYERRORSYMBOL)) > YY_MAX_SHIFTREDUCE
        ){

          yy_pop_parser_stack(yypParser);
        }
        if( yypParser->yytos < yypParser->yystack || yymajor==0 ){
          yy_destructor(yypParser,(YYCODETYPE)yymajor,&yyminorunion);
          yy_parse_failed(yypParser);
#ifndef YYNOERRORRECOVERY
          yypParser->yyerrcnt = -1;
#endif
          yymajor = YYNOCODE;
        }else if( yymx!=YYERRORSYMBOL ){







|
|
<
|
<
>


|







3289
3290
3291
3292
3293
3294
3295
3296
3297

3298

3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
          fprintf(yyTraceFILE,"%sDiscard input token %s\n",
             yyTracePrompt,yyTokenName[yymajor]);
        }
#endif
        yy_destructor(yypParser, (YYCODETYPE)yymajor, &yyminorunion);
        yymajor = YYNOCODE;
      }else{
        while( yypParser->yytos > yypParser->yystack ){
          yyact = yy_find_reduce_action(yypParser->yytos->stateno,

                                        YYERRORSYMBOL);

          if( yyact<=YY_MAX_SHIFTREDUCE ) break;
          yy_pop_parser_stack(yypParser);
        }
        if( yypParser->yytos <= yypParser->yystack || yymajor==0 ){
          yy_destructor(yypParser,(YYCODETYPE)yymajor,&yyminorunion);
          yy_parse_failed(yypParser);
#ifndef YYNOERRORRECOVERY
          yypParser->yyerrcnt = -1;
#endif
          yymajor = YYNOCODE;
        }else if( yymx!=YYERRORSYMBOL ){
3351
3352
3353
3354
3355
3356
3357
3358

3359
3360
3361
3362
3363
3364
3365
#ifndef YYNOERRORRECOVERY
        yypParser->yyerrcnt = -1;
#endif
      }
      break;
#endif
    }
  }while( yypParser->yytos>yypParser->yystack );

#ifndef NDEBUG
  if( yyTraceFILE ){
    yyStackEntry *i;
    char cDiv = '[';
    fprintf(yyTraceFILE,"%sReturn. Stack=",yyTracePrompt);
    for(i=&yypParser->yystack[1]; i<=yypParser->yytos; i++){
      fprintf(yyTraceFILE,"%c%s", cDiv, yyTokenName[i->major]);







<
>







3345
3346
3347
3348
3349
3350
3351

3352
3353
3354
3355
3356
3357
3358
3359
#ifndef YYNOERRORRECOVERY
        yypParser->yyerrcnt = -1;
#endif
      }
      break;
#endif
    }

  }
#ifndef NDEBUG
  if( yyTraceFILE ){
    yyStackEntry *i;
    char cDiv = '[';
    fprintf(yyTraceFILE,"%sReturn. Stack=",yyTracePrompt);
    for(i=&yypParser->yystack[1]; i<=yypParser->yytos; i++){
      fprintf(yyTraceFILE,"%c%s", cDiv, yyTokenName[i->major]);
8127
8128
8129
8130
8131
8132
8133
8134
  return TCL_OK;
}


#endif /* PIKCHR_TCL */


#line 8159 "pikchr.c"







|
8121
8122
8123
8124
8125
8126
8127
8128
  return TCL_OK;
}


#endif /* PIKCHR_TCL */


#line 8153 "pikchr.c"

Changes to extsrc/pikchr.js.

114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
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

var wasmMemory;

var ABORT = false;

var EXITSTATUS;

function getCFunc(ident) {
 var func = Module["_" + ident];
 return func;
}

function ccall(ident, returnType, argTypes, args, opts) {
 var toC = {
  "string": function(str) {
   var ret = 0;
   if (str !== null && str !== undefined && str !== 0) {
    var len = (str.length << 2) + 1;
    ret = stackAlloc(len);
    stringToUTF8(str, ret, len);
   }
   return ret;
  },
  "array": function(arr) {
   var ret = stackAlloc(arr.length);
   writeArrayToMemory(arr, ret);
   return ret;
  }
 };
 function convertReturnValue(ret) {
  if (returnType === "string") {
   return UTF8ToString(ret);
  }
  if (returnType === "boolean") return Boolean(ret);
  return ret;
 }
 var func = getCFunc(ident);
 var cArgs = [];
 var stack = 0;
 if (args) {
  for (var i = 0; i < args.length; i++) {
   var converter = toC[argTypes[i]];
   if (converter) {
    if (stack === 0) stack = stackSave();
    cArgs[i] = converter(args[i]);
   } else {
    cArgs[i] = args[i];
   }
  }
 }
 var ret = func.apply(null, cArgs);
 function onDone(ret) {
  if (stack !== 0) stackRestore(stack);
  return convertReturnValue(ret);
 }
 ret = onDone(ret);
 return ret;
}

function cwrap(ident, returnType, argTypes, opts) {
 argTypes = argTypes || [];
 var numericArgs = argTypes.every(function(type) {
  return type === "number";
 });
 var numericRet = returnType !== "string";
 if (numericRet && numericArgs && !opts) {
  return getCFunc(ident);
 }
 return function() {
  return ccall(ident, returnType, argTypes, arguments, opts);
 };
}

var UTF8Decoder = typeof TextDecoder != "undefined" ? new TextDecoder("utf8") : undefined;

function UTF8ArrayToString(heapOrArray, idx, maxBytesToRead) {
 var endIdx = idx + maxBytesToRead;
 var endPtr = idx;
 while (heapOrArray[endPtr] && !(endPtr >= endIdx)) ++endPtr;
 if (endPtr - idx > 16 && heapOrArray.buffer && UTF8Decoder) {
  return UTF8Decoder.decode(heapOrArray.subarray(idx, endPtr));
 } else {

  var str = "";
  while (idx < endPtr) {
   var u0 = heapOrArray[idx++];
   if (!(u0 & 128)) {
    str += String.fromCharCode(u0);
    continue;
   }
   var u1 = heapOrArray[idx++] & 63;
   if ((u0 & 224) == 192) {
    str += String.fromCharCode((u0 & 31) << 6 | u1);
    continue;
   }
   var u2 = heapOrArray[idx++] & 63;
   if ((u0 & 240) == 224) {
    u0 = (u0 & 15) << 12 | u1 << 6 | u2;
   } else {
    u0 = (u0 & 7) << 18 | u1 << 12 | u2 << 6 | heapOrArray[idx++] & 63;
   }
   if (u0 < 65536) {
    str += String.fromCharCode(u0);
   } else {
    var ch = u0 - 65536;
    str += String.fromCharCode(55296 | ch >> 10, 56320 | ch & 1023);
   }
  }
 }
 return str;
}

function UTF8ToString(ptr, maxBytesToRead) {
 return ptr ? UTF8ArrayToString(HEAPU8, ptr, maxBytesToRead) : "";







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<








<
>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<







114
115
116
117
118
119
120


































































121
122
123
124
125
126
127
128

129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152

153
154
155
156
157
158
159

var wasmMemory;

var ABORT = false;

var EXITSTATUS;



































































var UTF8Decoder = typeof TextDecoder != "undefined" ? new TextDecoder("utf8") : undefined;

function UTF8ArrayToString(heapOrArray, idx, maxBytesToRead) {
 var endIdx = idx + maxBytesToRead;
 var endPtr = idx;
 while (heapOrArray[endPtr] && !(endPtr >= endIdx)) ++endPtr;
 if (endPtr - idx > 16 && heapOrArray.buffer && UTF8Decoder) {
  return UTF8Decoder.decode(heapOrArray.subarray(idx, endPtr));

 }
 var str = "";
 while (idx < endPtr) {
  var u0 = heapOrArray[idx++];
  if (!(u0 & 128)) {
   str += String.fromCharCode(u0);
   continue;
  }
  var u1 = heapOrArray[idx++] & 63;
  if ((u0 & 224) == 192) {
   str += String.fromCharCode((u0 & 31) << 6 | u1);
   continue;
  }
  var u2 = heapOrArray[idx++] & 63;
  if ((u0 & 240) == 224) {
   u0 = (u0 & 15) << 12 | u1 << 6 | u2;
  } else {
   u0 = (u0 & 7) << 18 | u1 << 12 | u2 << 6 | heapOrArray[idx++] & 63;
  }
  if (u0 < 65536) {
   str += String.fromCharCode(u0);
  } else {
   var ch = u0 - 65536;
   str += String.fromCharCode(55296 | ch >> 10, 56320 | ch & 1023);

  }
 }
 return str;
}

function UTF8ToString(ptr, maxBytesToRead) {
 return ptr ? UTF8ArrayToString(HEAPU8, ptr, maxBytesToRead) : "";
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
 return outIdx - startIdx;
}

function stringToUTF8(str, outPtr, maxBytesToWrite) {
 return stringToUTF8Array(str, HEAPU8, outPtr, maxBytesToWrite);
}

function writeArrayToMemory(array, buffer) {
 HEAP8.set(array, buffer);
}

var buffer, HEAP8, HEAPU8, HEAP16, HEAPU16, HEAP32, HEAPU32, HEAPF32, HEAPF64;

function updateGlobalBufferAndViews(buf) {
 buffer = buf;
 Module["HEAP8"] = HEAP8 = new Int8Array(buf);
 Module["HEAP16"] = HEAP16 = new Int16Array(buf);
 Module["HEAP32"] = HEAP32 = new Int32Array(buf);







<
<
<
<







193
194
195
196
197
198
199




200
201
202
203
204
205
206
 return outIdx - startIdx;
}

function stringToUTF8(str, outPtr, maxBytesToWrite) {
 return stringToUTF8Array(str, HEAPU8, outPtr, maxBytesToWrite);
}





var buffer, HEAP8, HEAPU8, HEAP16, HEAPU16, HEAP32, HEAPU32, HEAPF32, HEAPF64;

function updateGlobalBufferAndViews(buf) {
 buffer = buf;
 Module["HEAP8"] = HEAP8 = new Int8Array(buf);
 Module["HEAP16"] = HEAP16 = new Int16Array(buf);
 Module["HEAP32"] = HEAP32 = new Int32Array(buf);
399
400
401
402
403
404
405
406
407
408

409
410
411
412
413
414
415
function getBinary(file) {
 try {
  if (file == wasmBinaryFile && wasmBinary) {
   return new Uint8Array(wasmBinary);
  }
  if (readBinary) {
   return readBinary(file);
  } else {
   throw "both async and sync fetching of the wasm failed";
  }

 } catch (err) {
  abort(err);
 }
}

function getBinaryPromise() {
 if (!wasmBinary && (ENVIRONMENT_IS_WEB || ENVIRONMENT_IS_WORKER)) {







<
<

>







328
329
330
331
332
333
334


335
336
337
338
339
340
341
342
343
function getBinary(file) {
 try {
  if (file == wasmBinaryFile && wasmBinary) {
   return new Uint8Array(wasmBinary);
  }
  if (readBinary) {
   return readBinary(file);


  }
  throw "both async and sync fetching of the wasm failed";
 } catch (err) {
  abort(err);
 }
}

function getBinaryPromise() {
 if (!wasmBinary && (ENVIRONMENT_IS_WEB || ENVIRONMENT_IS_WORKER)) {
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
 instantiateAsync().catch(readyPromiseReject);
 return {};
}

var tempDouble;

var tempI64;







function callRuntimeCallbacks(callbacks) {
 while (callbacks.length > 0) {
  var callback = callbacks.shift();
  if (typeof callback == "function") {
   callback(Module);
   continue;
  }
  var func = callback.func;
  if (typeof func == "number") {
   if (callback.arg === undefined) {
    getWasmTableEntry(func)();
   } else {
    getWasmTableEntry(func)(callback.arg);
   }
  } else {
   func(callback.arg === undefined ? null : callback.arg);
  }
 }
}

function getValue(ptr, type = "i8") {
 if (type.endsWith("*")) type = "i32";
 switch (type) {
 case "i1":
  return HEAP8[ptr >> 0];

 case "i8":
  return HEAP8[ptr >> 0];

 case "i16":
  return HEAP16[ptr >> 1];

 case "i32":
  return HEAP32[ptr >> 2];

 case "i64":
  return HEAP32[ptr >> 2];

 case "float":
  return HEAPF32[ptr >> 2];

 case "double":
  return Number(HEAPF64[ptr >> 3]);




 default:
  abort("invalid type for getValue: " + type);
 }
 return null;
}

function getWasmTableEntry(funcPtr) {
 return wasmTable.get(funcPtr);
}

function setValue(ptr, value, type = "i8") {
 if (type.endsWith("*")) type = "i32";
 switch (type) {
 case "i1":
  HEAP8[ptr >> 0] = value;
  break;

 case "i8":
  HEAP8[ptr >> 0] = value;







>
>
>
>
>
>



|
<
<
<
<
<
<
<
<
<
<
<
<
<
<




|




















|
>
>
>







<
<
<
<

|







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
 instantiateAsync().catch(readyPromiseReject);
 return {};
}

var tempDouble;

var tempI64;

function ExitStatus(status) {
 this.name = "ExitStatus";
 this.message = "Program terminated with exit(" + status + ")";
 this.status = status;
}

function callRuntimeCallbacks(callbacks) {
 while (callbacks.length > 0) {
  callbacks.shift()(Module);














 }
}

function getValue(ptr, type = "i8") {
 if (type.endsWith("*")) type = "*";
 switch (type) {
 case "i1":
  return HEAP8[ptr >> 0];

 case "i8":
  return HEAP8[ptr >> 0];

 case "i16":
  return HEAP16[ptr >> 1];

 case "i32":
  return HEAP32[ptr >> 2];

 case "i64":
  return HEAP32[ptr >> 2];

 case "float":
  return HEAPF32[ptr >> 2];

 case "double":
  return HEAPF64[ptr >> 3];

 case "*":
  return HEAPU32[ptr >> 2];

 default:
  abort("invalid type for getValue: " + type);
 }
 return null;
}





function setValue(ptr, value, type = "i8") {
 if (type.endsWith("*")) type = "*";
 switch (type) {
 case "i1":
  HEAP8[ptr >> 0] = value;
  break;

 case "i8":
  HEAP8[ptr >> 0] = value;
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
 case "float":
  HEAPF32[ptr >> 2] = value;
  break;

 case "double":
  HEAPF64[ptr >> 3] = value;
  break;





 default:
  abort("invalid type for setValue: " + type);
 }
}





function ___assert_fail(condition, filename, line, func) {
 abort("Assertion failed: " + UTF8ToString(condition) + ", at: " + [ filename ? UTF8ToString(filename) : "unknown filename", line, func ? UTF8ToString(func) : "unknown function" ]);
}

function abortOnCannotGrowMemory(requestedSize) {
 abort("OOM");
}

function _emscripten_resize_heap(requestedSize) {
 var oldSize = HEAPU8.length;
 requestedSize = requestedSize >>> 0;
 abortOnCannotGrowMemory(requestedSize);
}



function _exit(status) {





















 exit(status);


































































}

var asmLibraryArg = {
 "a": ___assert_fail,
 "b": _emscripten_resize_heap,
 "c": _exit
};







>
>
>
>





>
>
>
>















>
>
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







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
 case "float":
  HEAPF32[ptr >> 2] = value;
  break;

 case "double":
  HEAPF64[ptr >> 3] = value;
  break;

 case "*":
  HEAPU32[ptr >> 2] = value;
  break;

 default:
  abort("invalid type for setValue: " + type);
 }
}

function writeArrayToMemory(array, buffer) {
 HEAP8.set(array, buffer);
}

function ___assert_fail(condition, filename, line, func) {
 abort("Assertion failed: " + UTF8ToString(condition) + ", at: " + [ filename ? UTF8ToString(filename) : "unknown filename", line, func ? UTF8ToString(func) : "unknown function" ]);
}

function abortOnCannotGrowMemory(requestedSize) {
 abort("OOM");
}

function _emscripten_resize_heap(requestedSize) {
 var oldSize = HEAPU8.length;
 requestedSize = requestedSize >>> 0;
 abortOnCannotGrowMemory(requestedSize);
}

var SYSCALLS = {
 varargs: undefined,
 get: function() {
  SYSCALLS.varargs += 4;
  var ret = HEAP32[SYSCALLS.varargs - 4 >> 2];
  return ret;
 },
 getStr: function(ptr) {
  var ret = UTF8ToString(ptr);
  return ret;
 }
};

function _proc_exit(code) {
 EXITSTATUS = code;
 if (!keepRuntimeAlive()) {
  if (Module["onExit"]) Module["onExit"](code);
  ABORT = true;
 }
 quit_(code, new ExitStatus(code));
}

function exitJS(status, implicit) {
 EXITSTATUS = status;
 _proc_exit(status);
}

var _exit = exitJS;

function getCFunc(ident) {
 var func = Module["_" + ident];
 return func;
}

function ccall(ident, returnType, argTypes, args, opts) {
 var toC = {
  "string": str => {
   var ret = 0;
   if (str !== null && str !== undefined && str !== 0) {
    var len = (str.length << 2) + 1;
    ret = stackAlloc(len);
    stringToUTF8(str, ret, len);
   }
   return ret;
  },
  "array": arr => {
   var ret = stackAlloc(arr.length);
   writeArrayToMemory(arr, ret);
   return ret;
  }
 };
 function convertReturnValue(ret) {
  if (returnType === "string") {
   return UTF8ToString(ret);
  }
  if (returnType === "boolean") return Boolean(ret);
  return ret;
 }
 var func = getCFunc(ident);
 var cArgs = [];
 var stack = 0;
 if (args) {
  for (var i = 0; i < args.length; i++) {
   var converter = toC[argTypes[i]];
   if (converter) {
    if (stack === 0) stack = stackSave();
    cArgs[i] = converter(args[i]);
   } else {
    cArgs[i] = args[i];
   }
  }
 }
 var ret = func.apply(null, cArgs);
 function onDone(ret) {
  if (stack !== 0) stackRestore(stack);
  return convertReturnValue(ret);
 }
 ret = onDone(ret);
 return ret;
}

function cwrap(ident, returnType, argTypes, opts) {
 argTypes = argTypes || [];
 var numericArgs = argTypes.every(type => type === "number" || type === "boolean");
 var numericRet = returnType !== "string";
 if (numericRet && numericArgs && !opts) {
  return getCFunc(ident);
 }
 return function() {
  return ccall(ident, returnType, argTypes, arguments, opts);
 };
}

var asmLibraryArg = {
 "a": ___assert_fail,
 "b": _emscripten_resize_heap,
 "c": _exit
};
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
 return (stackRestore = Module["stackRestore"] = Module["asm"]["i"]).apply(null, arguments);
};

var stackAlloc = Module["stackAlloc"] = function() {
 return (stackAlloc = Module["stackAlloc"] = Module["asm"]["j"]).apply(null, arguments);
};

Module["cwrap"] = cwrap;

Module["stackSave"] = stackSave;

Module["stackRestore"] = stackRestore;



Module["setValue"] = setValue;

Module["getValue"] = getValue;

var calledRun;

function ExitStatus(status) {
 this.name = "ExitStatus";
 this.message = "Program terminated with exit(" + status + ")";
 this.status = status;
}

dependenciesFulfilled = function runCaller() {
 if (!calledRun) run();
 if (!calledRun) dependenciesFulfilled = runCaller;
};

function run(args) {
 args = args || arguments_;







<
<



>
>







<
<
<
<
<
<







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
 return (stackRestore = Module["stackRestore"] = Module["asm"]["i"]).apply(null, arguments);
};

var stackAlloc = Module["stackAlloc"] = function() {
 return (stackAlloc = Module["stackAlloc"] = Module["asm"]["j"]).apply(null, arguments);
};



Module["stackSave"] = stackSave;

Module["stackRestore"] = stackRestore;

Module["cwrap"] = cwrap;

Module["setValue"] = setValue;

Module["getValue"] = getValue;

var calledRun;







dependenciesFulfilled = function runCaller() {
 if (!calledRun) run();
 if (!calledRun) dependenciesFulfilled = runCaller;
};

function run(args) {
 args = args || arguments_;
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
   doRun();
  }, 1);
 } else {
  doRun();
 }
}

Module["run"] = run;

function exit(status, implicit) {
 EXITSTATUS = status;
 procExit(status);
}

function procExit(code) {
 EXITSTATUS = code;
 if (!keepRuntimeAlive()) {
  if (Module["onExit"]) Module["onExit"](code);
  ABORT = true;
 }
 quit_(code, new ExitStatus(code));
}

if (Module["preInit"]) {
 if (typeof Module["preInit"] == "function") Module["preInit"] = [ Module["preInit"] ];
 while (Module["preInit"].length > 0) {
  Module["preInit"].pop()();
 }
}








<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







689
690
691
692
693
694
695
















696
697
698
699
700
701
702
   doRun();
  }, 1);
 } else {
  doRun();
 }
}

















if (Module["preInit"]) {
 if (typeof Module["preInit"] == "function") Module["preInit"] = [ Module["preInit"] ];
 while (Module["preInit"].length > 0) {
  Module["preInit"].pop()();
 }
}

Changes to extsrc/pikchr.wasm.

cannot compute difference between binary files