circuitscript 0.1.9 → 0.1.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3201,8 +3201,22 @@ class CircuitScriptParser extends antlr.Parser {
3201
3201
  {
3202
3202
  this.state = 630;
3203
3203
  this.match(CircuitScriptParser.Point);
3204
- this.state = 631;
3205
- this.match(CircuitScriptParser.ID);
3204
+ this.state = 633;
3205
+ this.errorHandler.sync(this);
3206
+ switch (this.interpreter.adaptivePredict(this.tokenStream, 69, this.context)) {
3207
+ case 1:
3208
+ {
3209
+ this.state = 631;
3210
+ this.match(CircuitScriptParser.ID);
3211
+ }
3212
+ break;
3213
+ case 2:
3214
+ {
3215
+ this.state = 632;
3216
+ this.data_expr(0);
3217
+ }
3218
+ break;
3219
+ }
3206
3220
  }
3207
3221
  }
3208
3222
  catch (re) {
@@ -3225,9 +3239,9 @@ class CircuitScriptParser extends antlr.Parser {
3225
3239
  try {
3226
3240
  this.enterOuterAlt(localContext, 1);
3227
3241
  {
3228
- this.state = 633;
3242
+ this.state = 635;
3229
3243
  this.match(CircuitScriptParser.Import);
3230
- this.state = 634;
3244
+ this.state = 636;
3231
3245
  this.match(CircuitScriptParser.ID);
3232
3246
  }
3233
3247
  }
@@ -3252,7 +3266,7 @@ class CircuitScriptParser extends antlr.Parser {
3252
3266
  try {
3253
3267
  this.enterOuterAlt(localContext, 1);
3254
3268
  {
3255
- this.state = 636;
3269
+ this.state = 638;
3256
3270
  _la = this.tokenStream.LA(1);
3257
3271
  if (!(_la === 32 || _la === 33)) {
3258
3272
  this.errorHandler.recoverInline(this);
@@ -3261,9 +3275,9 @@ class CircuitScriptParser extends antlr.Parser {
3261
3275
  this.errorHandler.reportMatch(this);
3262
3276
  this.consume();
3263
3277
  }
3264
- this.state = 637;
3278
+ this.state = 639;
3265
3279
  this.match(CircuitScriptParser.T__0);
3266
- this.state = 638;
3280
+ this.state = 640;
3267
3281
  this.expressions_block();
3268
3282
  }
3269
3283
  }
@@ -3289,36 +3303,36 @@ class CircuitScriptParser extends antlr.Parser {
3289
3303
  let alternative;
3290
3304
  this.enterOuterAlt(localContext, 1);
3291
3305
  {
3292
- this.state = 640;
3306
+ this.state = 642;
3293
3307
  this.match(CircuitScriptParser.If);
3294
- this.state = 641;
3308
+ this.state = 643;
3295
3309
  this.data_expr(0);
3296
- this.state = 642;
3310
+ this.state = 644;
3297
3311
  this.match(CircuitScriptParser.T__0);
3298
- this.state = 643;
3312
+ this.state = 645;
3299
3313
  this.expressions_block();
3300
- this.state = 647;
3314
+ this.state = 649;
3301
3315
  this.errorHandler.sync(this);
3302
- alternative = this.interpreter.adaptivePredict(this.tokenStream, 69, this.context);
3316
+ alternative = this.interpreter.adaptivePredict(this.tokenStream, 70, this.context);
3303
3317
  while (alternative !== 2 && alternative !== antlr.ATN.INVALID_ALT_NUMBER) {
3304
3318
  if (alternative === 1) {
3305
3319
  {
3306
3320
  {
3307
- this.state = 644;
3321
+ this.state = 646;
3308
3322
  this.if_inner_expr();
3309
3323
  }
3310
3324
  }
3311
3325
  }
3312
- this.state = 649;
3326
+ this.state = 651;
3313
3327
  this.errorHandler.sync(this);
3314
- alternative = this.interpreter.adaptivePredict(this.tokenStream, 69, this.context);
3328
+ alternative = this.interpreter.adaptivePredict(this.tokenStream, 70, this.context);
3315
3329
  }
3316
- this.state = 651;
3330
+ this.state = 653;
3317
3331
  this.errorHandler.sync(this);
3318
3332
  _la = this.tokenStream.LA(1);
3319
3333
  if (_la === 30) {
3320
3334
  {
3321
- this.state = 650;
3335
+ this.state = 652;
3322
3336
  this.else_expr();
3323
3337
  }
3324
3338
  }
@@ -3344,15 +3358,15 @@ class CircuitScriptParser extends antlr.Parser {
3344
3358
  try {
3345
3359
  this.enterOuterAlt(localContext, 1);
3346
3360
  {
3347
- this.state = 653;
3361
+ this.state = 655;
3348
3362
  this.match(CircuitScriptParser.Else);
3349
- this.state = 654;
3363
+ this.state = 656;
3350
3364
  this.match(CircuitScriptParser.If);
3351
- this.state = 655;
3365
+ this.state = 657;
3352
3366
  this.data_expr(0);
3353
- this.state = 656;
3367
+ this.state = 658;
3354
3368
  this.match(CircuitScriptParser.T__0);
3355
- this.state = 657;
3369
+ this.state = 659;
3356
3370
  this.expressions_block();
3357
3371
  }
3358
3372
  }
@@ -3376,11 +3390,11 @@ class CircuitScriptParser extends antlr.Parser {
3376
3390
  try {
3377
3391
  this.enterOuterAlt(localContext, 1);
3378
3392
  {
3379
- this.state = 659;
3393
+ this.state = 661;
3380
3394
  this.match(CircuitScriptParser.Else);
3381
- this.state = 660;
3395
+ this.state = 662;
3382
3396
  this.match(CircuitScriptParser.T__0);
3383
- this.state = 661;
3397
+ this.state = 663;
3384
3398
  this.expressions_block();
3385
3399
  }
3386
3400
  }
@@ -3404,13 +3418,13 @@ class CircuitScriptParser extends antlr.Parser {
3404
3418
  try {
3405
3419
  this.enterOuterAlt(localContext, 1);
3406
3420
  {
3407
- this.state = 663;
3421
+ this.state = 665;
3408
3422
  this.match(CircuitScriptParser.While);
3409
- this.state = 664;
3423
+ this.state = 666;
3410
3424
  this.data_expr(0);
3411
- this.state = 665;
3425
+ this.state = 667;
3412
3426
  this.match(CircuitScriptParser.T__0);
3413
- this.state = 666;
3427
+ this.state = 668;
3414
3428
  this.expressions_block();
3415
3429
  }
3416
3430
  }
@@ -3435,33 +3449,33 @@ class CircuitScriptParser extends antlr.Parser {
3435
3449
  try {
3436
3450
  this.enterOuterAlt(localContext, 1);
3437
3451
  {
3438
- this.state = 668;
3452
+ this.state = 670;
3439
3453
  this.match(CircuitScriptParser.For);
3440
- this.state = 669;
3454
+ this.state = 671;
3441
3455
  this.match(CircuitScriptParser.ID);
3442
- this.state = 674;
3456
+ this.state = 676;
3443
3457
  this.errorHandler.sync(this);
3444
3458
  _la = this.tokenStream.LA(1);
3445
3459
  while (_la === 2) {
3446
3460
  {
3447
3461
  {
3448
- this.state = 670;
3462
+ this.state = 672;
3449
3463
  this.match(CircuitScriptParser.T__1);
3450
- this.state = 671;
3464
+ this.state = 673;
3451
3465
  this.match(CircuitScriptParser.ID);
3452
3466
  }
3453
3467
  }
3454
- this.state = 676;
3468
+ this.state = 678;
3455
3469
  this.errorHandler.sync(this);
3456
3470
  _la = this.tokenStream.LA(1);
3457
3471
  }
3458
- this.state = 677;
3472
+ this.state = 679;
3459
3473
  this.match(CircuitScriptParser.In);
3460
- this.state = 678;
3474
+ this.state = 680;
3461
3475
  this.data_expr(0);
3462
- this.state = 679;
3476
+ this.state = 681;
3463
3477
  this.match(CircuitScriptParser.T__0);
3464
- this.state = 680;
3478
+ this.state = 682;
3465
3479
  this.expressions_block();
3466
3480
  }
3467
3481
  }
@@ -3685,7 +3699,7 @@ CircuitScriptParser.ruleNames = [
3685
3699
  "for_expr",
3686
3700
  ];
3687
3701
  CircuitScriptParser._serializedATN = [
3688
- 4, 1, 67, 683, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7,
3702
+ 4, 1, 67, 685, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7,
3689
3703
  6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13,
3690
3704
  2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20,
3691
3705
  7, 20, 2, 21, 7, 21, 2, 22, 7, 22, 2, 23, 7, 23, 2, 24, 7, 24, 2, 25, 7, 25, 2, 26, 7, 26,
@@ -3738,69 +3752,69 @@ CircuitScriptParser._serializedATN = [
3738
3752
  52, 596, 9, 52, 3, 52, 598, 8, 52, 1, 53, 1, 53, 1, 53, 3, 53, 603, 8, 53, 1, 53, 3, 53,
3739
3753
  606, 8, 53, 1, 54, 1, 54, 5, 54, 610, 8, 54, 10, 54, 12, 54, 613, 9, 54, 1, 55, 1, 55,
3740
3754
  1, 55, 1, 55, 5, 55, 619, 8, 55, 10, 55, 12, 55, 622, 9, 55, 5, 55, 624, 8, 55, 10, 55,
3741
- 12, 55, 627, 9, 55, 1, 55, 1, 55, 1, 56, 1, 56, 1, 56, 1, 57, 1, 57, 1, 57, 1, 58, 1, 58,
3742
- 1, 58, 1, 58, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 5, 59, 646, 8, 59, 10, 59, 12, 59, 649,
3743
- 9, 59, 1, 59, 3, 59, 652, 8, 59, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 61, 1, 61,
3744
- 1, 61, 1, 61, 1, 62, 1, 62, 1, 62, 1, 62, 1, 62, 1, 63, 1, 63, 1, 63, 1, 63, 5, 63, 673,
3745
- 8, 63, 10, 63, 12, 63, 676, 9, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 0, 1, 62, 64,
3746
- 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44,
3747
- 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88,
3748
- 90, 92, 94, 96, 98, 100, 102, 104, 106, 108, 110, 112, 114, 116, 118, 120, 122, 124,
3749
- 126, 0, 14, 2, 0, 9, 9, 19, 21, 1, 0, 56, 57, 2, 0, 57, 57, 60, 60, 2, 0, 54, 54, 57, 57,
3750
- 1, 0, 47, 51, 1, 0, 44, 46, 1, 0, 42, 43, 1, 0, 40, 41, 1, 0, 34, 39, 2, 0, 31, 31, 43, 43,
3751
- 2, 0, 55, 55, 57, 61, 2, 0, 15, 15, 56, 56, 2, 0, 56, 57, 60, 60, 1, 0, 32, 33, 721, 0,
3752
- 132, 1, 0, 0, 0, 2, 165, 1, 0, 0, 0, 4, 167, 1, 0, 0, 0, 6, 178, 1, 0, 0, 0, 8, 182, 1, 0,
3753
- 0, 0, 10, 186, 1, 0, 0, 0, 12, 198, 1, 0, 0, 0, 14, 202, 1, 0, 0, 0, 16, 205, 1, 0, 0, 0,
3754
- 18, 213, 1, 0, 0, 0, 20, 224, 1, 0, 0, 0, 22, 230, 1, 0, 0, 0, 24, 232, 1, 0, 0, 0, 26, 234,
3755
- 1, 0, 0, 0, 28, 237, 1, 0, 0, 0, 30, 246, 1, 0, 0, 0, 32, 268, 1, 0, 0, 0, 34, 278, 1, 0,
3756
- 0, 0, 36, 280, 1, 0, 0, 0, 38, 294, 1, 0, 0, 0, 40, 296, 1, 0, 0, 0, 42, 304, 1, 0, 0, 0,
3757
- 44, 306, 1, 0, 0, 0, 46, 308, 1, 0, 0, 0, 48, 310, 1, 0, 0, 0, 50, 312, 1, 0, 0, 0, 52, 316,
3758
- 1, 0, 0, 0, 54, 320, 1, 0, 0, 0, 56, 347, 1, 0, 0, 0, 58, 349, 1, 0, 0, 0, 60, 353, 1, 0,
3759
- 0, 0, 62, 375, 1, 0, 0, 0, 64, 395, 1, 0, 0, 0, 66, 397, 1, 0, 0, 0, 68, 400, 1, 0, 0, 0,
3760
- 70, 404, 1, 0, 0, 0, 72, 424, 1, 0, 0, 0, 74, 455, 1, 0, 0, 0, 76, 457, 1, 0, 0, 0, 78, 472,
3761
- 1, 0, 0, 0, 80, 475, 1, 0, 0, 0, 82, 484, 1, 0, 0, 0, 84, 490, 1, 0, 0, 0, 86, 493, 1, 0,
3762
- 0, 0, 88, 497, 1, 0, 0, 0, 90, 510, 1, 0, 0, 0, 92, 520, 1, 0, 0, 0, 94, 530, 1, 0, 0, 0,
3763
- 96, 544, 1, 0, 0, 0, 98, 580, 1, 0, 0, 0, 100, 582, 1, 0, 0, 0, 102, 586, 1, 0, 0, 0, 104,
3764
- 597, 1, 0, 0, 0, 106, 605, 1, 0, 0, 0, 108, 607, 1, 0, 0, 0, 110, 614, 1, 0, 0, 0, 112,
3765
- 630, 1, 0, 0, 0, 114, 633, 1, 0, 0, 0, 116, 636, 1, 0, 0, 0, 118, 640, 1, 0, 0, 0, 120,
3766
- 653, 1, 0, 0, 0, 122, 659, 1, 0, 0, 0, 124, 663, 1, 0, 0, 0, 126, 668, 1, 0, 0, 0, 128,
3767
- 131, 3, 114, 57, 0, 129, 131, 5, 64, 0, 0, 130, 128, 1, 0, 0, 0, 130, 129, 1, 0, 0, 0,
3768
- 131, 134, 1, 0, 0, 0, 132, 130, 1, 0, 0, 0, 132, 133, 1, 0, 0, 0, 133, 137, 1, 0, 0, 0,
3769
- 134, 132, 1, 0, 0, 0, 135, 138, 3, 2, 1, 0, 136, 138, 5, 64, 0, 0, 137, 135, 1, 0, 0, 0,
3770
- 137, 136, 1, 0, 0, 0, 138, 139, 1, 0, 0, 0, 139, 137, 1, 0, 0, 0, 139, 140, 1, 0, 0, 0,
3771
- 140, 141, 1, 0, 0, 0, 141, 142, 5, 0, 0, 1, 142, 1, 1, 0, 0, 0, 143, 166, 3, 20, 10, 0,
3772
- 144, 166, 3, 28, 14, 0, 145, 166, 3, 26, 13, 0, 146, 166, 3, 50, 25, 0, 147, 166, 3,
3773
- 52, 26, 0, 148, 166, 3, 58, 29, 0, 149, 166, 3, 10, 5, 0, 150, 166, 3, 60, 30, 0, 151,
3774
- 166, 3, 46, 23, 0, 152, 166, 3, 48, 24, 0, 153, 166, 3, 70, 35, 0, 154, 166, 3, 80, 40,
3775
- 0, 155, 166, 3, 108, 54, 0, 156, 166, 3, 114, 57, 0, 157, 166, 3, 116, 58, 0, 158, 166,
3776
- 3, 76, 38, 0, 159, 166, 3, 36, 18, 0, 160, 166, 3, 6, 3, 0, 161, 166, 3, 112, 56, 0, 162,
3777
- 166, 3, 118, 59, 0, 163, 166, 3, 124, 62, 0, 164, 166, 3, 126, 63, 0, 165, 143, 1, 0,
3778
- 0, 0, 165, 144, 1, 0, 0, 0, 165, 145, 1, 0, 0, 0, 165, 146, 1, 0, 0, 0, 165, 147, 1, 0,
3779
- 0, 0, 165, 148, 1, 0, 0, 0, 165, 149, 1, 0, 0, 0, 165, 150, 1, 0, 0, 0, 165, 151, 1, 0,
3780
- 0, 0, 165, 152, 1, 0, 0, 0, 165, 153, 1, 0, 0, 0, 165, 154, 1, 0, 0, 0, 165, 155, 1, 0,
3781
- 0, 0, 165, 156, 1, 0, 0, 0, 165, 157, 1, 0, 0, 0, 165, 158, 1, 0, 0, 0, 165, 159, 1, 0,
3782
- 0, 0, 165, 160, 1, 0, 0, 0, 165, 161, 1, 0, 0, 0, 165, 162, 1, 0, 0, 0, 165, 163, 1, 0,
3783
- 0, 0, 165, 164, 1, 0, 0, 0, 166, 3, 1, 0, 0, 0, 167, 168, 5, 64, 0, 0, 168, 171, 5, 66,
3784
- 0, 0, 169, 172, 5, 64, 0, 0, 170, 172, 3, 2, 1, 0, 171, 169, 1, 0, 0, 0, 171, 170, 1, 0,
3785
- 0, 0, 172, 173, 1, 0, 0, 0, 173, 171, 1, 0, 0, 0, 173, 174, 1, 0, 0, 0, 174, 175, 1, 0,
3786
- 0, 0, 175, 176, 5, 67, 0, 0, 176, 5, 1, 0, 0, 0, 177, 179, 3, 8, 4, 0, 178, 177, 1, 0, 0,
3787
- 0, 179, 180, 1, 0, 0, 0, 180, 178, 1, 0, 0, 0, 180, 181, 1, 0, 0, 0, 181, 7, 1, 0, 0, 0,
3788
- 182, 183, 7, 0, 0, 0, 183, 184, 5, 1, 0, 0, 184, 185, 3, 4, 2, 0, 185, 9, 1, 0, 0, 0, 186,
3789
- 187, 3, 76, 38, 0, 187, 188, 5, 1, 0, 0, 188, 189, 5, 64, 0, 0, 189, 192, 5, 66, 0, 0,
3790
- 190, 193, 5, 64, 0, 0, 191, 193, 3, 12, 6, 0, 192, 190, 1, 0, 0, 0, 192, 191, 1, 0, 0,
3791
- 0, 193, 194, 1, 0, 0, 0, 194, 192, 1, 0, 0, 0, 194, 195, 1, 0, 0, 0, 195, 196, 1, 0, 0,
3792
- 0, 196, 197, 5, 67, 0, 0, 197, 11, 1, 0, 0, 0, 198, 199, 7, 1, 0, 0, 199, 200, 5, 1, 0,
3793
- 0, 200, 201, 3, 68, 34, 0, 201, 13, 1, 0, 0, 0, 202, 203, 5, 15, 0, 0, 203, 204, 7, 2,
3794
- 0, 0, 204, 15, 1, 0, 0, 0, 205, 206, 5, 56, 0, 0, 206, 209, 5, 1, 0, 0, 207, 210, 3, 68,
3795
- 34, 0, 208, 210, 5, 56, 0, 0, 209, 207, 1, 0, 0, 0, 209, 208, 1, 0, 0, 0, 210, 17, 1, 0,
3796
- 0, 0, 211, 214, 3, 62, 31, 0, 212, 214, 3, 50, 25, 0, 213, 211, 1, 0, 0, 0, 213, 212,
3797
- 1, 0, 0, 0, 214, 218, 1, 0, 0, 0, 215, 217, 3, 16, 8, 0, 216, 215, 1, 0, 0, 0, 217, 220,
3798
- 1, 0, 0, 0, 218, 216, 1, 0, 0, 0, 218, 219, 1, 0, 0, 0, 219, 222, 1, 0, 0, 0, 220, 218,
3799
- 1, 0, 0, 0, 221, 223, 3, 14, 7, 0, 222, 221, 1, 0, 0, 0, 222, 223, 1, 0, 0, 0, 223, 19,
3800
- 1, 0, 0, 0, 224, 225, 5, 16, 0, 0, 225, 226, 3, 18, 9, 0, 226, 21, 1, 0, 0, 0, 227, 231,
3801
- 3, 18, 9, 0, 228, 231, 3, 14, 7, 0, 229, 231, 5, 19, 0, 0, 230, 227, 1, 0, 0, 0, 230, 228,
3802
- 1, 0, 0, 0, 230, 229, 1, 0, 0, 0, 231, 23, 1, 0, 0, 0, 232, 233, 7, 2, 0, 0, 233, 25, 1,
3803
- 0, 0, 0, 234, 235, 5, 17, 0, 0, 235, 236, 3, 22, 11, 0, 236, 27, 1, 0, 0, 0, 237, 238,
3755
+ 12, 55, 627, 9, 55, 1, 55, 1, 55, 1, 56, 1, 56, 1, 56, 3, 56, 634, 8, 56, 1, 57, 1, 57,
3756
+ 1, 57, 1, 58, 1, 58, 1, 58, 1, 58, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 5, 59, 648, 8, 59,
3757
+ 10, 59, 12, 59, 651, 9, 59, 1, 59, 3, 59, 654, 8, 59, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60,
3758
+ 1, 60, 1, 61, 1, 61, 1, 61, 1, 61, 1, 62, 1, 62, 1, 62, 1, 62, 1, 62, 1, 63, 1, 63, 1, 63,
3759
+ 1, 63, 5, 63, 675, 8, 63, 10, 63, 12, 63, 678, 9, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63,
3760
+ 1, 63, 0, 1, 62, 64, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34,
3761
+ 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78,
3762
+ 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100, 102, 104, 106, 108, 110, 112, 114, 116,
3763
+ 118, 120, 122, 124, 126, 0, 14, 2, 0, 9, 9, 19, 21, 1, 0, 56, 57, 2, 0, 57, 57, 60, 60,
3764
+ 2, 0, 54, 54, 57, 57, 1, 0, 47, 51, 1, 0, 44, 46, 1, 0, 42, 43, 1, 0, 40, 41, 1, 0, 34, 39,
3765
+ 2, 0, 31, 31, 43, 43, 2, 0, 55, 55, 57, 61, 2, 0, 15, 15, 56, 56, 2, 0, 56, 57, 60, 60,
3766
+ 1, 0, 32, 33, 724, 0, 132, 1, 0, 0, 0, 2, 165, 1, 0, 0, 0, 4, 167, 1, 0, 0, 0, 6, 178, 1,
3767
+ 0, 0, 0, 8, 182, 1, 0, 0, 0, 10, 186, 1, 0, 0, 0, 12, 198, 1, 0, 0, 0, 14, 202, 1, 0, 0, 0,
3768
+ 16, 205, 1, 0, 0, 0, 18, 213, 1, 0, 0, 0, 20, 224, 1, 0, 0, 0, 22, 230, 1, 0, 0, 0, 24, 232,
3769
+ 1, 0, 0, 0, 26, 234, 1, 0, 0, 0, 28, 237, 1, 0, 0, 0, 30, 246, 1, 0, 0, 0, 32, 268, 1, 0,
3770
+ 0, 0, 34, 278, 1, 0, 0, 0, 36, 280, 1, 0, 0, 0, 38, 294, 1, 0, 0, 0, 40, 296, 1, 0, 0, 0,
3771
+ 42, 304, 1, 0, 0, 0, 44, 306, 1, 0, 0, 0, 46, 308, 1, 0, 0, 0, 48, 310, 1, 0, 0, 0, 50, 312,
3772
+ 1, 0, 0, 0, 52, 316, 1, 0, 0, 0, 54, 320, 1, 0, 0, 0, 56, 347, 1, 0, 0, 0, 58, 349, 1, 0,
3773
+ 0, 0, 60, 353, 1, 0, 0, 0, 62, 375, 1, 0, 0, 0, 64, 395, 1, 0, 0, 0, 66, 397, 1, 0, 0, 0,
3774
+ 68, 400, 1, 0, 0, 0, 70, 404, 1, 0, 0, 0, 72, 424, 1, 0, 0, 0, 74, 455, 1, 0, 0, 0, 76, 457,
3775
+ 1, 0, 0, 0, 78, 472, 1, 0, 0, 0, 80, 475, 1, 0, 0, 0, 82, 484, 1, 0, 0, 0, 84, 490, 1, 0,
3776
+ 0, 0, 86, 493, 1, 0, 0, 0, 88, 497, 1, 0, 0, 0, 90, 510, 1, 0, 0, 0, 92, 520, 1, 0, 0, 0,
3777
+ 94, 530, 1, 0, 0, 0, 96, 544, 1, 0, 0, 0, 98, 580, 1, 0, 0, 0, 100, 582, 1, 0, 0, 0, 102,
3778
+ 586, 1, 0, 0, 0, 104, 597, 1, 0, 0, 0, 106, 605, 1, 0, 0, 0, 108, 607, 1, 0, 0, 0, 110,
3779
+ 614, 1, 0, 0, 0, 112, 630, 1, 0, 0, 0, 114, 635, 1, 0, 0, 0, 116, 638, 1, 0, 0, 0, 118,
3780
+ 642, 1, 0, 0, 0, 120, 655, 1, 0, 0, 0, 122, 661, 1, 0, 0, 0, 124, 665, 1, 0, 0, 0, 126,
3781
+ 670, 1, 0, 0, 0, 128, 131, 3, 114, 57, 0, 129, 131, 5, 64, 0, 0, 130, 128, 1, 0, 0, 0,
3782
+ 130, 129, 1, 0, 0, 0, 131, 134, 1, 0, 0, 0, 132, 130, 1, 0, 0, 0, 132, 133, 1, 0, 0, 0,
3783
+ 133, 137, 1, 0, 0, 0, 134, 132, 1, 0, 0, 0, 135, 138, 3, 2, 1, 0, 136, 138, 5, 64, 0, 0,
3784
+ 137, 135, 1, 0, 0, 0, 137, 136, 1, 0, 0, 0, 138, 139, 1, 0, 0, 0, 139, 137, 1, 0, 0, 0,
3785
+ 139, 140, 1, 0, 0, 0, 140, 141, 1, 0, 0, 0, 141, 142, 5, 0, 0, 1, 142, 1, 1, 0, 0, 0, 143,
3786
+ 166, 3, 20, 10, 0, 144, 166, 3, 28, 14, 0, 145, 166, 3, 26, 13, 0, 146, 166, 3, 50, 25,
3787
+ 0, 147, 166, 3, 52, 26, 0, 148, 166, 3, 58, 29, 0, 149, 166, 3, 10, 5, 0, 150, 166, 3,
3788
+ 60, 30, 0, 151, 166, 3, 46, 23, 0, 152, 166, 3, 48, 24, 0, 153, 166, 3, 70, 35, 0, 154,
3789
+ 166, 3, 80, 40, 0, 155, 166, 3, 108, 54, 0, 156, 166, 3, 114, 57, 0, 157, 166, 3, 116,
3790
+ 58, 0, 158, 166, 3, 76, 38, 0, 159, 166, 3, 36, 18, 0, 160, 166, 3, 6, 3, 0, 161, 166,
3791
+ 3, 112, 56, 0, 162, 166, 3, 118, 59, 0, 163, 166, 3, 124, 62, 0, 164, 166, 3, 126, 63,
3792
+ 0, 165, 143, 1, 0, 0, 0, 165, 144, 1, 0, 0, 0, 165, 145, 1, 0, 0, 0, 165, 146, 1, 0, 0,
3793
+ 0, 165, 147, 1, 0, 0, 0, 165, 148, 1, 0, 0, 0, 165, 149, 1, 0, 0, 0, 165, 150, 1, 0, 0,
3794
+ 0, 165, 151, 1, 0, 0, 0, 165, 152, 1, 0, 0, 0, 165, 153, 1, 0, 0, 0, 165, 154, 1, 0, 0,
3795
+ 0, 165, 155, 1, 0, 0, 0, 165, 156, 1, 0, 0, 0, 165, 157, 1, 0, 0, 0, 165, 158, 1, 0, 0,
3796
+ 0, 165, 159, 1, 0, 0, 0, 165, 160, 1, 0, 0, 0, 165, 161, 1, 0, 0, 0, 165, 162, 1, 0, 0,
3797
+ 0, 165, 163, 1, 0, 0, 0, 165, 164, 1, 0, 0, 0, 166, 3, 1, 0, 0, 0, 167, 168, 5, 64, 0, 0,
3798
+ 168, 171, 5, 66, 0, 0, 169, 172, 5, 64, 0, 0, 170, 172, 3, 2, 1, 0, 171, 169, 1, 0, 0,
3799
+ 0, 171, 170, 1, 0, 0, 0, 172, 173, 1, 0, 0, 0, 173, 171, 1, 0, 0, 0, 173, 174, 1, 0, 0,
3800
+ 0, 174, 175, 1, 0, 0, 0, 175, 176, 5, 67, 0, 0, 176, 5, 1, 0, 0, 0, 177, 179, 3, 8, 4, 0,
3801
+ 178, 177, 1, 0, 0, 0, 179, 180, 1, 0, 0, 0, 180, 178, 1, 0, 0, 0, 180, 181, 1, 0, 0, 0,
3802
+ 181, 7, 1, 0, 0, 0, 182, 183, 7, 0, 0, 0, 183, 184, 5, 1, 0, 0, 184, 185, 3, 4, 2, 0, 185,
3803
+ 9, 1, 0, 0, 0, 186, 187, 3, 76, 38, 0, 187, 188, 5, 1, 0, 0, 188, 189, 5, 64, 0, 0, 189,
3804
+ 192, 5, 66, 0, 0, 190, 193, 5, 64, 0, 0, 191, 193, 3, 12, 6, 0, 192, 190, 1, 0, 0, 0, 192,
3805
+ 191, 1, 0, 0, 0, 193, 194, 1, 0, 0, 0, 194, 192, 1, 0, 0, 0, 194, 195, 1, 0, 0, 0, 195,
3806
+ 196, 1, 0, 0, 0, 196, 197, 5, 67, 0, 0, 197, 11, 1, 0, 0, 0, 198, 199, 7, 1, 0, 0, 199,
3807
+ 200, 5, 1, 0, 0, 200, 201, 3, 68, 34, 0, 201, 13, 1, 0, 0, 0, 202, 203, 5, 15, 0, 0, 203,
3808
+ 204, 7, 2, 0, 0, 204, 15, 1, 0, 0, 0, 205, 206, 5, 56, 0, 0, 206, 209, 5, 1, 0, 0, 207,
3809
+ 210, 3, 68, 34, 0, 208, 210, 5, 56, 0, 0, 209, 207, 1, 0, 0, 0, 209, 208, 1, 0, 0, 0, 210,
3810
+ 17, 1, 0, 0, 0, 211, 214, 3, 62, 31, 0, 212, 214, 3, 50, 25, 0, 213, 211, 1, 0, 0, 0, 213,
3811
+ 212, 1, 0, 0, 0, 214, 218, 1, 0, 0, 0, 215, 217, 3, 16, 8, 0, 216, 215, 1, 0, 0, 0, 217,
3812
+ 220, 1, 0, 0, 0, 218, 216, 1, 0, 0, 0, 218, 219, 1, 0, 0, 0, 219, 222, 1, 0, 0, 0, 220,
3813
+ 218, 1, 0, 0, 0, 221, 223, 3, 14, 7, 0, 222, 221, 1, 0, 0, 0, 222, 223, 1, 0, 0, 0, 223,
3814
+ 19, 1, 0, 0, 0, 224, 225, 5, 16, 0, 0, 225, 226, 3, 18, 9, 0, 226, 21, 1, 0, 0, 0, 227,
3815
+ 231, 3, 18, 9, 0, 228, 231, 3, 14, 7, 0, 229, 231, 5, 19, 0, 0, 230, 227, 1, 0, 0, 0, 230,
3816
+ 228, 1, 0, 0, 0, 230, 229, 1, 0, 0, 0, 231, 23, 1, 0, 0, 0, 232, 233, 7, 2, 0, 0, 233, 25,
3817
+ 1, 0, 0, 0, 234, 235, 5, 17, 0, 0, 235, 236, 3, 22, 11, 0, 236, 27, 1, 0, 0, 0, 237, 238,
3804
3818
  5, 18, 0, 0, 238, 243, 3, 22, 11, 0, 239, 240, 5, 2, 0, 0, 240, 242, 3, 22, 11, 0, 241,
3805
3819
  239, 1, 0, 0, 0, 242, 245, 1, 0, 0, 0, 243, 241, 1, 0, 0, 0, 243, 244, 1, 0, 0, 0, 244,
3806
3820
  29, 1, 0, 0, 0, 245, 243, 1, 0, 0, 0, 246, 247, 5, 17, 0, 0, 247, 248, 3, 22, 11, 0, 248,
@@ -3916,25 +3930,26 @@ CircuitScriptParser._serializedATN = [
3916
3930
  3, 62, 31, 0, 618, 616, 1, 0, 0, 0, 619, 622, 1, 0, 0, 0, 620, 618, 1, 0, 0, 0, 620, 621,
3917
3931
  1, 0, 0, 0, 621, 624, 1, 0, 0, 0, 622, 620, 1, 0, 0, 0, 623, 615, 1, 0, 0, 0, 624, 627,
3918
3932
  1, 0, 0, 0, 625, 623, 1, 0, 0, 0, 625, 626, 1, 0, 0, 0, 626, 628, 1, 0, 0, 0, 627, 625,
3919
- 1, 0, 0, 0, 628, 629, 5, 7, 0, 0, 629, 111, 1, 0, 0, 0, 630, 631, 5, 19, 0, 0, 631, 632,
3920
- 5, 56, 0, 0, 632, 113, 1, 0, 0, 0, 633, 634, 5, 24, 0, 0, 634, 635, 5, 56, 0, 0, 635, 115,
3921
- 1, 0, 0, 0, 636, 637, 7, 13, 0, 0, 637, 638, 5, 1, 0, 0, 638, 639, 3, 4, 2, 0, 639, 117,
3922
- 1, 0, 0, 0, 640, 641, 5, 29, 0, 0, 641, 642, 3, 62, 31, 0, 642, 643, 5, 1, 0, 0, 643, 647,
3923
- 3, 4, 2, 0, 644, 646, 3, 120, 60, 0, 645, 644, 1, 0, 0, 0, 646, 649, 1, 0, 0, 0, 647, 645,
3924
- 1, 0, 0, 0, 647, 648, 1, 0, 0, 0, 648, 651, 1, 0, 0, 0, 649, 647, 1, 0, 0, 0, 650, 652,
3925
- 3, 122, 61, 0, 651, 650, 1, 0, 0, 0, 651, 652, 1, 0, 0, 0, 652, 119, 1, 0, 0, 0, 653, 654,
3926
- 5, 30, 0, 0, 654, 655, 5, 29, 0, 0, 655, 656, 3, 62, 31, 0, 656, 657, 5, 1, 0, 0, 657,
3927
- 658, 3, 4, 2, 0, 658, 121, 1, 0, 0, 0, 659, 660, 5, 30, 0, 0, 660, 661, 5, 1, 0, 0, 661,
3928
- 662, 3, 4, 2, 0, 662, 123, 1, 0, 0, 0, 663, 664, 5, 27, 0, 0, 664, 665, 3, 62, 31, 0, 665,
3929
- 666, 5, 1, 0, 0, 666, 667, 3, 4, 2, 0, 667, 125, 1, 0, 0, 0, 668, 669, 5, 25, 0, 0, 669,
3930
- 674, 5, 56, 0, 0, 670, 671, 5, 2, 0, 0, 671, 673, 5, 56, 0, 0, 672, 670, 1, 0, 0, 0, 673,
3931
- 676, 1, 0, 0, 0, 674, 672, 1, 0, 0, 0, 674, 675, 1, 0, 0, 0, 675, 677, 1, 0, 0, 0, 676,
3932
- 674, 1, 0, 0, 0, 677, 678, 5, 26, 0, 0, 678, 679, 3, 62, 31, 0, 679, 680, 5, 1, 0, 0, 680,
3933
- 681, 3, 4, 2, 0, 681, 127, 1, 0, 0, 0, 72, 130, 132, 137, 139, 165, 171, 173, 180, 192,
3934
- 194, 209, 213, 218, 222, 230, 243, 254, 262, 264, 275, 286, 288, 294, 300, 304,
3935
- 329, 336, 344, 347, 365, 375, 390, 392, 400, 408, 416, 418, 424, 431, 440, 452,
3936
- 455, 462, 467, 472, 475, 481, 484, 488, 504, 506, 514, 516, 525, 538, 540, 548,
3937
- 550, 556, 564, 572, 580, 594, 597, 602, 605, 611, 620, 625, 647, 651, 674
3933
+ 1, 0, 0, 0, 628, 629, 5, 7, 0, 0, 629, 111, 1, 0, 0, 0, 630, 633, 5, 19, 0, 0, 631, 634,
3934
+ 5, 56, 0, 0, 632, 634, 3, 62, 31, 0, 633, 631, 1, 0, 0, 0, 633, 632, 1, 0, 0, 0, 634, 113,
3935
+ 1, 0, 0, 0, 635, 636, 5, 24, 0, 0, 636, 637, 5, 56, 0, 0, 637, 115, 1, 0, 0, 0, 638, 639,
3936
+ 7, 13, 0, 0, 639, 640, 5, 1, 0, 0, 640, 641, 3, 4, 2, 0, 641, 117, 1, 0, 0, 0, 642, 643,
3937
+ 5, 29, 0, 0, 643, 644, 3, 62, 31, 0, 644, 645, 5, 1, 0, 0, 645, 649, 3, 4, 2, 0, 646, 648,
3938
+ 3, 120, 60, 0, 647, 646, 1, 0, 0, 0, 648, 651, 1, 0, 0, 0, 649, 647, 1, 0, 0, 0, 649, 650,
3939
+ 1, 0, 0, 0, 650, 653, 1, 0, 0, 0, 651, 649, 1, 0, 0, 0, 652, 654, 3, 122, 61, 0, 653, 652,
3940
+ 1, 0, 0, 0, 653, 654, 1, 0, 0, 0, 654, 119, 1, 0, 0, 0, 655, 656, 5, 30, 0, 0, 656, 657,
3941
+ 5, 29, 0, 0, 657, 658, 3, 62, 31, 0, 658, 659, 5, 1, 0, 0, 659, 660, 3, 4, 2, 0, 660, 121,
3942
+ 1, 0, 0, 0, 661, 662, 5, 30, 0, 0, 662, 663, 5, 1, 0, 0, 663, 664, 3, 4, 2, 0, 664, 123,
3943
+ 1, 0, 0, 0, 665, 666, 5, 27, 0, 0, 666, 667, 3, 62, 31, 0, 667, 668, 5, 1, 0, 0, 668, 669,
3944
+ 3, 4, 2, 0, 669, 125, 1, 0, 0, 0, 670, 671, 5, 25, 0, 0, 671, 676, 5, 56, 0, 0, 672, 673,
3945
+ 5, 2, 0, 0, 673, 675, 5, 56, 0, 0, 674, 672, 1, 0, 0, 0, 675, 678, 1, 0, 0, 0, 676, 674,
3946
+ 1, 0, 0, 0, 676, 677, 1, 0, 0, 0, 677, 679, 1, 0, 0, 0, 678, 676, 1, 0, 0, 0, 679, 680,
3947
+ 5, 26, 0, 0, 680, 681, 3, 62, 31, 0, 681, 682, 5, 1, 0, 0, 682, 683, 3, 4, 2, 0, 683, 127,
3948
+ 1, 0, 0, 0, 73, 130, 132, 137, 139, 165, 171, 173, 180, 192, 194, 209, 213, 218, 222,
3949
+ 230, 243, 254, 262, 264, 275, 286, 288, 294, 300, 304, 329, 336, 344, 347, 365,
3950
+ 375, 390, 392, 400, 408, 416, 418, 424, 431, 440, 452, 455, 462, 467, 472, 475,
3951
+ 481, 484, 488, 504, 506, 514, 516, 525, 538, 540, 548, 550, 556, 564, 572, 580,
3952
+ 594, 597, 602, 605, 611, 620, 625, 633, 649, 653, 676
3938
3953
  ];
3939
3954
  CircuitScriptParser.vocabulary = new antlr.Vocabulary(CircuitScriptParser.literalNames, CircuitScriptParser.symbolicNames, []);
3940
3955
  CircuitScriptParser.decisionsToDFA = CircuitScriptParser._ATN.decisionToState.map((ds, index) => new antlr.DFA(ds, index));
@@ -5952,6 +5967,9 @@ class Point_exprContext extends antlr.ParserRuleContext {
5952
5967
  ID() {
5953
5968
  return this.getToken(CircuitScriptParser.ID, 0);
5954
5969
  }
5970
+ data_expr() {
5971
+ return this.getRuleContext(0, Data_exprContext);
5972
+ }
5955
5973
  get ruleIndex() {
5956
5974
  return CircuitScriptParser.RULE_point_expr;
5957
5975
  }
@@ -14,6 +14,7 @@ const builtInMethods = [
14
14
  ['len', objectLength],
15
15
  ['arrayPush', arrayPush],
16
16
  ['arrayGet', arrayGet],
17
+ ['arraySet', arraySet],
17
18
  ['print', null],
18
19
  ];
19
20
  exports.buildInMethodNamesList = builtInMethods.map(item => item[0]);
@@ -113,6 +114,20 @@ function arrayGet(arrayObject, index) {
113
114
  }
114
115
  return arrayObject[useValue];
115
116
  }
117
+ function arraySet(arrayObject, index, setValue) {
118
+ if (!Array.isArray(arrayObject)) {
119
+ throw "Invalid array object";
120
+ }
121
+ let useValue;
122
+ if (index instanceof ParamDefinition_js_1.NumericValue) {
123
+ useValue = index.toNumber();
124
+ }
125
+ else {
126
+ useValue = index;
127
+ }
128
+ arrayObject[useValue] = setValue;
129
+ return arrayObject;
130
+ }
116
131
  function getPositionParams(params) {
117
132
  return params.map(([, , value]) => value);
118
133
  }
@@ -882,7 +882,21 @@ class ParserVisitor extends BaseVisitor_js_1.BaseVisitor {
882
882
  };
883
883
  this.visitPoint_expr = (ctx) => {
884
884
  const ID = ctx.ID();
885
- return this.getExecutor().addPoint(ID.getText());
885
+ const ctxData = ctx.data_expr();
886
+ let pointValue;
887
+ if (ctxData) {
888
+ const resultValue = this.visitResult(ctxData);
889
+ if (typeof resultValue === 'string') {
890
+ pointValue = resultValue;
891
+ }
892
+ else {
893
+ throw new utils_js_1.RuntimeExecutionError('Invalid value for point');
894
+ }
895
+ }
896
+ else if (ID) {
897
+ pointValue = ID.getText();
898
+ }
899
+ return this.getExecutor().addPoint(pointValue);
886
900
  };
887
901
  this.visitProperty_set_expr = (ctx) => {
888
902
  const result = this.visitResult(ctx.data_expr());
@@ -3348,8 +3348,22 @@ export class CircuitScriptParser extends antlr.Parser {
3348
3348
  {
3349
3349
  this.state = 630;
3350
3350
  this.match(CircuitScriptParser.Point);
3351
- this.state = 631;
3352
- this.match(CircuitScriptParser.ID);
3351
+ this.state = 633;
3352
+ this.errorHandler.sync(this);
3353
+ switch (this.interpreter.adaptivePredict(this.tokenStream, 69, this.context)) {
3354
+ case 1:
3355
+ {
3356
+ this.state = 631;
3357
+ this.match(CircuitScriptParser.ID);
3358
+ }
3359
+ break;
3360
+ case 2:
3361
+ {
3362
+ this.state = 632;
3363
+ this.data_expr(0);
3364
+ }
3365
+ break;
3366
+ }
3353
3367
  }
3354
3368
  }
3355
3369
  catch (re) {
@@ -3372,9 +3386,9 @@ export class CircuitScriptParser extends antlr.Parser {
3372
3386
  try {
3373
3387
  this.enterOuterAlt(localContext, 1);
3374
3388
  {
3375
- this.state = 633;
3389
+ this.state = 635;
3376
3390
  this.match(CircuitScriptParser.Import);
3377
- this.state = 634;
3391
+ this.state = 636;
3378
3392
  this.match(CircuitScriptParser.ID);
3379
3393
  }
3380
3394
  }
@@ -3399,7 +3413,7 @@ export class CircuitScriptParser extends antlr.Parser {
3399
3413
  try {
3400
3414
  this.enterOuterAlt(localContext, 1);
3401
3415
  {
3402
- this.state = 636;
3416
+ this.state = 638;
3403
3417
  _la = this.tokenStream.LA(1);
3404
3418
  if (!(_la === 32 || _la === 33)) {
3405
3419
  this.errorHandler.recoverInline(this);
@@ -3408,9 +3422,9 @@ export class CircuitScriptParser extends antlr.Parser {
3408
3422
  this.errorHandler.reportMatch(this);
3409
3423
  this.consume();
3410
3424
  }
3411
- this.state = 637;
3425
+ this.state = 639;
3412
3426
  this.match(CircuitScriptParser.T__0);
3413
- this.state = 638;
3427
+ this.state = 640;
3414
3428
  this.expressions_block();
3415
3429
  }
3416
3430
  }
@@ -3436,36 +3450,36 @@ export class CircuitScriptParser extends antlr.Parser {
3436
3450
  let alternative;
3437
3451
  this.enterOuterAlt(localContext, 1);
3438
3452
  {
3439
- this.state = 640;
3453
+ this.state = 642;
3440
3454
  this.match(CircuitScriptParser.If);
3441
- this.state = 641;
3455
+ this.state = 643;
3442
3456
  this.data_expr(0);
3443
- this.state = 642;
3457
+ this.state = 644;
3444
3458
  this.match(CircuitScriptParser.T__0);
3445
- this.state = 643;
3459
+ this.state = 645;
3446
3460
  this.expressions_block();
3447
- this.state = 647;
3461
+ this.state = 649;
3448
3462
  this.errorHandler.sync(this);
3449
- alternative = this.interpreter.adaptivePredict(this.tokenStream, 69, this.context);
3463
+ alternative = this.interpreter.adaptivePredict(this.tokenStream, 70, this.context);
3450
3464
  while (alternative !== 2 && alternative !== antlr.ATN.INVALID_ALT_NUMBER) {
3451
3465
  if (alternative === 1) {
3452
3466
  {
3453
3467
  {
3454
- this.state = 644;
3468
+ this.state = 646;
3455
3469
  this.if_inner_expr();
3456
3470
  }
3457
3471
  }
3458
3472
  }
3459
- this.state = 649;
3473
+ this.state = 651;
3460
3474
  this.errorHandler.sync(this);
3461
- alternative = this.interpreter.adaptivePredict(this.tokenStream, 69, this.context);
3475
+ alternative = this.interpreter.adaptivePredict(this.tokenStream, 70, this.context);
3462
3476
  }
3463
- this.state = 651;
3477
+ this.state = 653;
3464
3478
  this.errorHandler.sync(this);
3465
3479
  _la = this.tokenStream.LA(1);
3466
3480
  if (_la === 30) {
3467
3481
  {
3468
- this.state = 650;
3482
+ this.state = 652;
3469
3483
  this.else_expr();
3470
3484
  }
3471
3485
  }
@@ -3491,15 +3505,15 @@ export class CircuitScriptParser extends antlr.Parser {
3491
3505
  try {
3492
3506
  this.enterOuterAlt(localContext, 1);
3493
3507
  {
3494
- this.state = 653;
3508
+ this.state = 655;
3495
3509
  this.match(CircuitScriptParser.Else);
3496
- this.state = 654;
3510
+ this.state = 656;
3497
3511
  this.match(CircuitScriptParser.If);
3498
- this.state = 655;
3512
+ this.state = 657;
3499
3513
  this.data_expr(0);
3500
- this.state = 656;
3514
+ this.state = 658;
3501
3515
  this.match(CircuitScriptParser.T__0);
3502
- this.state = 657;
3516
+ this.state = 659;
3503
3517
  this.expressions_block();
3504
3518
  }
3505
3519
  }
@@ -3523,11 +3537,11 @@ export class CircuitScriptParser extends antlr.Parser {
3523
3537
  try {
3524
3538
  this.enterOuterAlt(localContext, 1);
3525
3539
  {
3526
- this.state = 659;
3540
+ this.state = 661;
3527
3541
  this.match(CircuitScriptParser.Else);
3528
- this.state = 660;
3542
+ this.state = 662;
3529
3543
  this.match(CircuitScriptParser.T__0);
3530
- this.state = 661;
3544
+ this.state = 663;
3531
3545
  this.expressions_block();
3532
3546
  }
3533
3547
  }
@@ -3551,13 +3565,13 @@ export class CircuitScriptParser extends antlr.Parser {
3551
3565
  try {
3552
3566
  this.enterOuterAlt(localContext, 1);
3553
3567
  {
3554
- this.state = 663;
3568
+ this.state = 665;
3555
3569
  this.match(CircuitScriptParser.While);
3556
- this.state = 664;
3570
+ this.state = 666;
3557
3571
  this.data_expr(0);
3558
- this.state = 665;
3572
+ this.state = 667;
3559
3573
  this.match(CircuitScriptParser.T__0);
3560
- this.state = 666;
3574
+ this.state = 668;
3561
3575
  this.expressions_block();
3562
3576
  }
3563
3577
  }
@@ -3582,33 +3596,33 @@ export class CircuitScriptParser extends antlr.Parser {
3582
3596
  try {
3583
3597
  this.enterOuterAlt(localContext, 1);
3584
3598
  {
3585
- this.state = 668;
3599
+ this.state = 670;
3586
3600
  this.match(CircuitScriptParser.For);
3587
- this.state = 669;
3601
+ this.state = 671;
3588
3602
  this.match(CircuitScriptParser.ID);
3589
- this.state = 674;
3603
+ this.state = 676;
3590
3604
  this.errorHandler.sync(this);
3591
3605
  _la = this.tokenStream.LA(1);
3592
3606
  while (_la === 2) {
3593
3607
  {
3594
3608
  {
3595
- this.state = 670;
3609
+ this.state = 672;
3596
3610
  this.match(CircuitScriptParser.T__1);
3597
- this.state = 671;
3611
+ this.state = 673;
3598
3612
  this.match(CircuitScriptParser.ID);
3599
3613
  }
3600
3614
  }
3601
- this.state = 676;
3615
+ this.state = 678;
3602
3616
  this.errorHandler.sync(this);
3603
3617
  _la = this.tokenStream.LA(1);
3604
3618
  }
3605
- this.state = 677;
3619
+ this.state = 679;
3606
3620
  this.match(CircuitScriptParser.In);
3607
- this.state = 678;
3621
+ this.state = 680;
3608
3622
  this.data_expr(0);
3609
- this.state = 679;
3623
+ this.state = 681;
3610
3624
  this.match(CircuitScriptParser.T__0);
3611
- this.state = 680;
3625
+ this.state = 682;
3612
3626
  this.expressions_block();
3613
3627
  }
3614
3628
  }
@@ -3647,7 +3661,7 @@ export class CircuitScriptParser extends antlr.Parser {
3647
3661
  return true;
3648
3662
  }
3649
3663
  static _serializedATN = [
3650
- 4, 1, 67, 683, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7,
3664
+ 4, 1, 67, 685, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7,
3651
3665
  6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13,
3652
3666
  2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20,
3653
3667
  7, 20, 2, 21, 7, 21, 2, 22, 7, 22, 2, 23, 7, 23, 2, 24, 7, 24, 2, 25, 7, 25, 2, 26, 7, 26,
@@ -3700,69 +3714,69 @@ export class CircuitScriptParser extends antlr.Parser {
3700
3714
  52, 596, 9, 52, 3, 52, 598, 8, 52, 1, 53, 1, 53, 1, 53, 3, 53, 603, 8, 53, 1, 53, 3, 53,
3701
3715
  606, 8, 53, 1, 54, 1, 54, 5, 54, 610, 8, 54, 10, 54, 12, 54, 613, 9, 54, 1, 55, 1, 55,
3702
3716
  1, 55, 1, 55, 5, 55, 619, 8, 55, 10, 55, 12, 55, 622, 9, 55, 5, 55, 624, 8, 55, 10, 55,
3703
- 12, 55, 627, 9, 55, 1, 55, 1, 55, 1, 56, 1, 56, 1, 56, 1, 57, 1, 57, 1, 57, 1, 58, 1, 58,
3704
- 1, 58, 1, 58, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 5, 59, 646, 8, 59, 10, 59, 12, 59, 649,
3705
- 9, 59, 1, 59, 3, 59, 652, 8, 59, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 61, 1, 61,
3706
- 1, 61, 1, 61, 1, 62, 1, 62, 1, 62, 1, 62, 1, 62, 1, 63, 1, 63, 1, 63, 1, 63, 5, 63, 673,
3707
- 8, 63, 10, 63, 12, 63, 676, 9, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 0, 1, 62, 64,
3708
- 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44,
3709
- 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88,
3710
- 90, 92, 94, 96, 98, 100, 102, 104, 106, 108, 110, 112, 114, 116, 118, 120, 122, 124,
3711
- 126, 0, 14, 2, 0, 9, 9, 19, 21, 1, 0, 56, 57, 2, 0, 57, 57, 60, 60, 2, 0, 54, 54, 57, 57,
3712
- 1, 0, 47, 51, 1, 0, 44, 46, 1, 0, 42, 43, 1, 0, 40, 41, 1, 0, 34, 39, 2, 0, 31, 31, 43, 43,
3713
- 2, 0, 55, 55, 57, 61, 2, 0, 15, 15, 56, 56, 2, 0, 56, 57, 60, 60, 1, 0, 32, 33, 721, 0,
3714
- 132, 1, 0, 0, 0, 2, 165, 1, 0, 0, 0, 4, 167, 1, 0, 0, 0, 6, 178, 1, 0, 0, 0, 8, 182, 1, 0,
3715
- 0, 0, 10, 186, 1, 0, 0, 0, 12, 198, 1, 0, 0, 0, 14, 202, 1, 0, 0, 0, 16, 205, 1, 0, 0, 0,
3716
- 18, 213, 1, 0, 0, 0, 20, 224, 1, 0, 0, 0, 22, 230, 1, 0, 0, 0, 24, 232, 1, 0, 0, 0, 26, 234,
3717
- 1, 0, 0, 0, 28, 237, 1, 0, 0, 0, 30, 246, 1, 0, 0, 0, 32, 268, 1, 0, 0, 0, 34, 278, 1, 0,
3718
- 0, 0, 36, 280, 1, 0, 0, 0, 38, 294, 1, 0, 0, 0, 40, 296, 1, 0, 0, 0, 42, 304, 1, 0, 0, 0,
3719
- 44, 306, 1, 0, 0, 0, 46, 308, 1, 0, 0, 0, 48, 310, 1, 0, 0, 0, 50, 312, 1, 0, 0, 0, 52, 316,
3720
- 1, 0, 0, 0, 54, 320, 1, 0, 0, 0, 56, 347, 1, 0, 0, 0, 58, 349, 1, 0, 0, 0, 60, 353, 1, 0,
3721
- 0, 0, 62, 375, 1, 0, 0, 0, 64, 395, 1, 0, 0, 0, 66, 397, 1, 0, 0, 0, 68, 400, 1, 0, 0, 0,
3722
- 70, 404, 1, 0, 0, 0, 72, 424, 1, 0, 0, 0, 74, 455, 1, 0, 0, 0, 76, 457, 1, 0, 0, 0, 78, 472,
3723
- 1, 0, 0, 0, 80, 475, 1, 0, 0, 0, 82, 484, 1, 0, 0, 0, 84, 490, 1, 0, 0, 0, 86, 493, 1, 0,
3724
- 0, 0, 88, 497, 1, 0, 0, 0, 90, 510, 1, 0, 0, 0, 92, 520, 1, 0, 0, 0, 94, 530, 1, 0, 0, 0,
3725
- 96, 544, 1, 0, 0, 0, 98, 580, 1, 0, 0, 0, 100, 582, 1, 0, 0, 0, 102, 586, 1, 0, 0, 0, 104,
3726
- 597, 1, 0, 0, 0, 106, 605, 1, 0, 0, 0, 108, 607, 1, 0, 0, 0, 110, 614, 1, 0, 0, 0, 112,
3727
- 630, 1, 0, 0, 0, 114, 633, 1, 0, 0, 0, 116, 636, 1, 0, 0, 0, 118, 640, 1, 0, 0, 0, 120,
3728
- 653, 1, 0, 0, 0, 122, 659, 1, 0, 0, 0, 124, 663, 1, 0, 0, 0, 126, 668, 1, 0, 0, 0, 128,
3729
- 131, 3, 114, 57, 0, 129, 131, 5, 64, 0, 0, 130, 128, 1, 0, 0, 0, 130, 129, 1, 0, 0, 0,
3730
- 131, 134, 1, 0, 0, 0, 132, 130, 1, 0, 0, 0, 132, 133, 1, 0, 0, 0, 133, 137, 1, 0, 0, 0,
3731
- 134, 132, 1, 0, 0, 0, 135, 138, 3, 2, 1, 0, 136, 138, 5, 64, 0, 0, 137, 135, 1, 0, 0, 0,
3732
- 137, 136, 1, 0, 0, 0, 138, 139, 1, 0, 0, 0, 139, 137, 1, 0, 0, 0, 139, 140, 1, 0, 0, 0,
3733
- 140, 141, 1, 0, 0, 0, 141, 142, 5, 0, 0, 1, 142, 1, 1, 0, 0, 0, 143, 166, 3, 20, 10, 0,
3734
- 144, 166, 3, 28, 14, 0, 145, 166, 3, 26, 13, 0, 146, 166, 3, 50, 25, 0, 147, 166, 3,
3735
- 52, 26, 0, 148, 166, 3, 58, 29, 0, 149, 166, 3, 10, 5, 0, 150, 166, 3, 60, 30, 0, 151,
3736
- 166, 3, 46, 23, 0, 152, 166, 3, 48, 24, 0, 153, 166, 3, 70, 35, 0, 154, 166, 3, 80, 40,
3737
- 0, 155, 166, 3, 108, 54, 0, 156, 166, 3, 114, 57, 0, 157, 166, 3, 116, 58, 0, 158, 166,
3738
- 3, 76, 38, 0, 159, 166, 3, 36, 18, 0, 160, 166, 3, 6, 3, 0, 161, 166, 3, 112, 56, 0, 162,
3739
- 166, 3, 118, 59, 0, 163, 166, 3, 124, 62, 0, 164, 166, 3, 126, 63, 0, 165, 143, 1, 0,
3740
- 0, 0, 165, 144, 1, 0, 0, 0, 165, 145, 1, 0, 0, 0, 165, 146, 1, 0, 0, 0, 165, 147, 1, 0,
3741
- 0, 0, 165, 148, 1, 0, 0, 0, 165, 149, 1, 0, 0, 0, 165, 150, 1, 0, 0, 0, 165, 151, 1, 0,
3742
- 0, 0, 165, 152, 1, 0, 0, 0, 165, 153, 1, 0, 0, 0, 165, 154, 1, 0, 0, 0, 165, 155, 1, 0,
3743
- 0, 0, 165, 156, 1, 0, 0, 0, 165, 157, 1, 0, 0, 0, 165, 158, 1, 0, 0, 0, 165, 159, 1, 0,
3744
- 0, 0, 165, 160, 1, 0, 0, 0, 165, 161, 1, 0, 0, 0, 165, 162, 1, 0, 0, 0, 165, 163, 1, 0,
3745
- 0, 0, 165, 164, 1, 0, 0, 0, 166, 3, 1, 0, 0, 0, 167, 168, 5, 64, 0, 0, 168, 171, 5, 66,
3746
- 0, 0, 169, 172, 5, 64, 0, 0, 170, 172, 3, 2, 1, 0, 171, 169, 1, 0, 0, 0, 171, 170, 1, 0,
3747
- 0, 0, 172, 173, 1, 0, 0, 0, 173, 171, 1, 0, 0, 0, 173, 174, 1, 0, 0, 0, 174, 175, 1, 0,
3748
- 0, 0, 175, 176, 5, 67, 0, 0, 176, 5, 1, 0, 0, 0, 177, 179, 3, 8, 4, 0, 178, 177, 1, 0, 0,
3749
- 0, 179, 180, 1, 0, 0, 0, 180, 178, 1, 0, 0, 0, 180, 181, 1, 0, 0, 0, 181, 7, 1, 0, 0, 0,
3750
- 182, 183, 7, 0, 0, 0, 183, 184, 5, 1, 0, 0, 184, 185, 3, 4, 2, 0, 185, 9, 1, 0, 0, 0, 186,
3751
- 187, 3, 76, 38, 0, 187, 188, 5, 1, 0, 0, 188, 189, 5, 64, 0, 0, 189, 192, 5, 66, 0, 0,
3752
- 190, 193, 5, 64, 0, 0, 191, 193, 3, 12, 6, 0, 192, 190, 1, 0, 0, 0, 192, 191, 1, 0, 0,
3753
- 0, 193, 194, 1, 0, 0, 0, 194, 192, 1, 0, 0, 0, 194, 195, 1, 0, 0, 0, 195, 196, 1, 0, 0,
3754
- 0, 196, 197, 5, 67, 0, 0, 197, 11, 1, 0, 0, 0, 198, 199, 7, 1, 0, 0, 199, 200, 5, 1, 0,
3755
- 0, 200, 201, 3, 68, 34, 0, 201, 13, 1, 0, 0, 0, 202, 203, 5, 15, 0, 0, 203, 204, 7, 2,
3756
- 0, 0, 204, 15, 1, 0, 0, 0, 205, 206, 5, 56, 0, 0, 206, 209, 5, 1, 0, 0, 207, 210, 3, 68,
3757
- 34, 0, 208, 210, 5, 56, 0, 0, 209, 207, 1, 0, 0, 0, 209, 208, 1, 0, 0, 0, 210, 17, 1, 0,
3758
- 0, 0, 211, 214, 3, 62, 31, 0, 212, 214, 3, 50, 25, 0, 213, 211, 1, 0, 0, 0, 213, 212,
3759
- 1, 0, 0, 0, 214, 218, 1, 0, 0, 0, 215, 217, 3, 16, 8, 0, 216, 215, 1, 0, 0, 0, 217, 220,
3760
- 1, 0, 0, 0, 218, 216, 1, 0, 0, 0, 218, 219, 1, 0, 0, 0, 219, 222, 1, 0, 0, 0, 220, 218,
3761
- 1, 0, 0, 0, 221, 223, 3, 14, 7, 0, 222, 221, 1, 0, 0, 0, 222, 223, 1, 0, 0, 0, 223, 19,
3762
- 1, 0, 0, 0, 224, 225, 5, 16, 0, 0, 225, 226, 3, 18, 9, 0, 226, 21, 1, 0, 0, 0, 227, 231,
3763
- 3, 18, 9, 0, 228, 231, 3, 14, 7, 0, 229, 231, 5, 19, 0, 0, 230, 227, 1, 0, 0, 0, 230, 228,
3764
- 1, 0, 0, 0, 230, 229, 1, 0, 0, 0, 231, 23, 1, 0, 0, 0, 232, 233, 7, 2, 0, 0, 233, 25, 1,
3765
- 0, 0, 0, 234, 235, 5, 17, 0, 0, 235, 236, 3, 22, 11, 0, 236, 27, 1, 0, 0, 0, 237, 238,
3717
+ 12, 55, 627, 9, 55, 1, 55, 1, 55, 1, 56, 1, 56, 1, 56, 3, 56, 634, 8, 56, 1, 57, 1, 57,
3718
+ 1, 57, 1, 58, 1, 58, 1, 58, 1, 58, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 5, 59, 648, 8, 59,
3719
+ 10, 59, 12, 59, 651, 9, 59, 1, 59, 3, 59, 654, 8, 59, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60,
3720
+ 1, 60, 1, 61, 1, 61, 1, 61, 1, 61, 1, 62, 1, 62, 1, 62, 1, 62, 1, 62, 1, 63, 1, 63, 1, 63,
3721
+ 1, 63, 5, 63, 675, 8, 63, 10, 63, 12, 63, 678, 9, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63,
3722
+ 1, 63, 0, 1, 62, 64, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34,
3723
+ 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78,
3724
+ 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100, 102, 104, 106, 108, 110, 112, 114, 116,
3725
+ 118, 120, 122, 124, 126, 0, 14, 2, 0, 9, 9, 19, 21, 1, 0, 56, 57, 2, 0, 57, 57, 60, 60,
3726
+ 2, 0, 54, 54, 57, 57, 1, 0, 47, 51, 1, 0, 44, 46, 1, 0, 42, 43, 1, 0, 40, 41, 1, 0, 34, 39,
3727
+ 2, 0, 31, 31, 43, 43, 2, 0, 55, 55, 57, 61, 2, 0, 15, 15, 56, 56, 2, 0, 56, 57, 60, 60,
3728
+ 1, 0, 32, 33, 724, 0, 132, 1, 0, 0, 0, 2, 165, 1, 0, 0, 0, 4, 167, 1, 0, 0, 0, 6, 178, 1,
3729
+ 0, 0, 0, 8, 182, 1, 0, 0, 0, 10, 186, 1, 0, 0, 0, 12, 198, 1, 0, 0, 0, 14, 202, 1, 0, 0, 0,
3730
+ 16, 205, 1, 0, 0, 0, 18, 213, 1, 0, 0, 0, 20, 224, 1, 0, 0, 0, 22, 230, 1, 0, 0, 0, 24, 232,
3731
+ 1, 0, 0, 0, 26, 234, 1, 0, 0, 0, 28, 237, 1, 0, 0, 0, 30, 246, 1, 0, 0, 0, 32, 268, 1, 0,
3732
+ 0, 0, 34, 278, 1, 0, 0, 0, 36, 280, 1, 0, 0, 0, 38, 294, 1, 0, 0, 0, 40, 296, 1, 0, 0, 0,
3733
+ 42, 304, 1, 0, 0, 0, 44, 306, 1, 0, 0, 0, 46, 308, 1, 0, 0, 0, 48, 310, 1, 0, 0, 0, 50, 312,
3734
+ 1, 0, 0, 0, 52, 316, 1, 0, 0, 0, 54, 320, 1, 0, 0, 0, 56, 347, 1, 0, 0, 0, 58, 349, 1, 0,
3735
+ 0, 0, 60, 353, 1, 0, 0, 0, 62, 375, 1, 0, 0, 0, 64, 395, 1, 0, 0, 0, 66, 397, 1, 0, 0, 0,
3736
+ 68, 400, 1, 0, 0, 0, 70, 404, 1, 0, 0, 0, 72, 424, 1, 0, 0, 0, 74, 455, 1, 0, 0, 0, 76, 457,
3737
+ 1, 0, 0, 0, 78, 472, 1, 0, 0, 0, 80, 475, 1, 0, 0, 0, 82, 484, 1, 0, 0, 0, 84, 490, 1, 0,
3738
+ 0, 0, 86, 493, 1, 0, 0, 0, 88, 497, 1, 0, 0, 0, 90, 510, 1, 0, 0, 0, 92, 520, 1, 0, 0, 0,
3739
+ 94, 530, 1, 0, 0, 0, 96, 544, 1, 0, 0, 0, 98, 580, 1, 0, 0, 0, 100, 582, 1, 0, 0, 0, 102,
3740
+ 586, 1, 0, 0, 0, 104, 597, 1, 0, 0, 0, 106, 605, 1, 0, 0, 0, 108, 607, 1, 0, 0, 0, 110,
3741
+ 614, 1, 0, 0, 0, 112, 630, 1, 0, 0, 0, 114, 635, 1, 0, 0, 0, 116, 638, 1, 0, 0, 0, 118,
3742
+ 642, 1, 0, 0, 0, 120, 655, 1, 0, 0, 0, 122, 661, 1, 0, 0, 0, 124, 665, 1, 0, 0, 0, 126,
3743
+ 670, 1, 0, 0, 0, 128, 131, 3, 114, 57, 0, 129, 131, 5, 64, 0, 0, 130, 128, 1, 0, 0, 0,
3744
+ 130, 129, 1, 0, 0, 0, 131, 134, 1, 0, 0, 0, 132, 130, 1, 0, 0, 0, 132, 133, 1, 0, 0, 0,
3745
+ 133, 137, 1, 0, 0, 0, 134, 132, 1, 0, 0, 0, 135, 138, 3, 2, 1, 0, 136, 138, 5, 64, 0, 0,
3746
+ 137, 135, 1, 0, 0, 0, 137, 136, 1, 0, 0, 0, 138, 139, 1, 0, 0, 0, 139, 137, 1, 0, 0, 0,
3747
+ 139, 140, 1, 0, 0, 0, 140, 141, 1, 0, 0, 0, 141, 142, 5, 0, 0, 1, 142, 1, 1, 0, 0, 0, 143,
3748
+ 166, 3, 20, 10, 0, 144, 166, 3, 28, 14, 0, 145, 166, 3, 26, 13, 0, 146, 166, 3, 50, 25,
3749
+ 0, 147, 166, 3, 52, 26, 0, 148, 166, 3, 58, 29, 0, 149, 166, 3, 10, 5, 0, 150, 166, 3,
3750
+ 60, 30, 0, 151, 166, 3, 46, 23, 0, 152, 166, 3, 48, 24, 0, 153, 166, 3, 70, 35, 0, 154,
3751
+ 166, 3, 80, 40, 0, 155, 166, 3, 108, 54, 0, 156, 166, 3, 114, 57, 0, 157, 166, 3, 116,
3752
+ 58, 0, 158, 166, 3, 76, 38, 0, 159, 166, 3, 36, 18, 0, 160, 166, 3, 6, 3, 0, 161, 166,
3753
+ 3, 112, 56, 0, 162, 166, 3, 118, 59, 0, 163, 166, 3, 124, 62, 0, 164, 166, 3, 126, 63,
3754
+ 0, 165, 143, 1, 0, 0, 0, 165, 144, 1, 0, 0, 0, 165, 145, 1, 0, 0, 0, 165, 146, 1, 0, 0,
3755
+ 0, 165, 147, 1, 0, 0, 0, 165, 148, 1, 0, 0, 0, 165, 149, 1, 0, 0, 0, 165, 150, 1, 0, 0,
3756
+ 0, 165, 151, 1, 0, 0, 0, 165, 152, 1, 0, 0, 0, 165, 153, 1, 0, 0, 0, 165, 154, 1, 0, 0,
3757
+ 0, 165, 155, 1, 0, 0, 0, 165, 156, 1, 0, 0, 0, 165, 157, 1, 0, 0, 0, 165, 158, 1, 0, 0,
3758
+ 0, 165, 159, 1, 0, 0, 0, 165, 160, 1, 0, 0, 0, 165, 161, 1, 0, 0, 0, 165, 162, 1, 0, 0,
3759
+ 0, 165, 163, 1, 0, 0, 0, 165, 164, 1, 0, 0, 0, 166, 3, 1, 0, 0, 0, 167, 168, 5, 64, 0, 0,
3760
+ 168, 171, 5, 66, 0, 0, 169, 172, 5, 64, 0, 0, 170, 172, 3, 2, 1, 0, 171, 169, 1, 0, 0,
3761
+ 0, 171, 170, 1, 0, 0, 0, 172, 173, 1, 0, 0, 0, 173, 171, 1, 0, 0, 0, 173, 174, 1, 0, 0,
3762
+ 0, 174, 175, 1, 0, 0, 0, 175, 176, 5, 67, 0, 0, 176, 5, 1, 0, 0, 0, 177, 179, 3, 8, 4, 0,
3763
+ 178, 177, 1, 0, 0, 0, 179, 180, 1, 0, 0, 0, 180, 178, 1, 0, 0, 0, 180, 181, 1, 0, 0, 0,
3764
+ 181, 7, 1, 0, 0, 0, 182, 183, 7, 0, 0, 0, 183, 184, 5, 1, 0, 0, 184, 185, 3, 4, 2, 0, 185,
3765
+ 9, 1, 0, 0, 0, 186, 187, 3, 76, 38, 0, 187, 188, 5, 1, 0, 0, 188, 189, 5, 64, 0, 0, 189,
3766
+ 192, 5, 66, 0, 0, 190, 193, 5, 64, 0, 0, 191, 193, 3, 12, 6, 0, 192, 190, 1, 0, 0, 0, 192,
3767
+ 191, 1, 0, 0, 0, 193, 194, 1, 0, 0, 0, 194, 192, 1, 0, 0, 0, 194, 195, 1, 0, 0, 0, 195,
3768
+ 196, 1, 0, 0, 0, 196, 197, 5, 67, 0, 0, 197, 11, 1, 0, 0, 0, 198, 199, 7, 1, 0, 0, 199,
3769
+ 200, 5, 1, 0, 0, 200, 201, 3, 68, 34, 0, 201, 13, 1, 0, 0, 0, 202, 203, 5, 15, 0, 0, 203,
3770
+ 204, 7, 2, 0, 0, 204, 15, 1, 0, 0, 0, 205, 206, 5, 56, 0, 0, 206, 209, 5, 1, 0, 0, 207,
3771
+ 210, 3, 68, 34, 0, 208, 210, 5, 56, 0, 0, 209, 207, 1, 0, 0, 0, 209, 208, 1, 0, 0, 0, 210,
3772
+ 17, 1, 0, 0, 0, 211, 214, 3, 62, 31, 0, 212, 214, 3, 50, 25, 0, 213, 211, 1, 0, 0, 0, 213,
3773
+ 212, 1, 0, 0, 0, 214, 218, 1, 0, 0, 0, 215, 217, 3, 16, 8, 0, 216, 215, 1, 0, 0, 0, 217,
3774
+ 220, 1, 0, 0, 0, 218, 216, 1, 0, 0, 0, 218, 219, 1, 0, 0, 0, 219, 222, 1, 0, 0, 0, 220,
3775
+ 218, 1, 0, 0, 0, 221, 223, 3, 14, 7, 0, 222, 221, 1, 0, 0, 0, 222, 223, 1, 0, 0, 0, 223,
3776
+ 19, 1, 0, 0, 0, 224, 225, 5, 16, 0, 0, 225, 226, 3, 18, 9, 0, 226, 21, 1, 0, 0, 0, 227,
3777
+ 231, 3, 18, 9, 0, 228, 231, 3, 14, 7, 0, 229, 231, 5, 19, 0, 0, 230, 227, 1, 0, 0, 0, 230,
3778
+ 228, 1, 0, 0, 0, 230, 229, 1, 0, 0, 0, 231, 23, 1, 0, 0, 0, 232, 233, 7, 2, 0, 0, 233, 25,
3779
+ 1, 0, 0, 0, 234, 235, 5, 17, 0, 0, 235, 236, 3, 22, 11, 0, 236, 27, 1, 0, 0, 0, 237, 238,
3766
3780
  5, 18, 0, 0, 238, 243, 3, 22, 11, 0, 239, 240, 5, 2, 0, 0, 240, 242, 3, 22, 11, 0, 241,
3767
3781
  239, 1, 0, 0, 0, 242, 245, 1, 0, 0, 0, 243, 241, 1, 0, 0, 0, 243, 244, 1, 0, 0, 0, 244,
3768
3782
  29, 1, 0, 0, 0, 245, 243, 1, 0, 0, 0, 246, 247, 5, 17, 0, 0, 247, 248, 3, 22, 11, 0, 248,
@@ -3878,25 +3892,26 @@ export class CircuitScriptParser extends antlr.Parser {
3878
3892
  3, 62, 31, 0, 618, 616, 1, 0, 0, 0, 619, 622, 1, 0, 0, 0, 620, 618, 1, 0, 0, 0, 620, 621,
3879
3893
  1, 0, 0, 0, 621, 624, 1, 0, 0, 0, 622, 620, 1, 0, 0, 0, 623, 615, 1, 0, 0, 0, 624, 627,
3880
3894
  1, 0, 0, 0, 625, 623, 1, 0, 0, 0, 625, 626, 1, 0, 0, 0, 626, 628, 1, 0, 0, 0, 627, 625,
3881
- 1, 0, 0, 0, 628, 629, 5, 7, 0, 0, 629, 111, 1, 0, 0, 0, 630, 631, 5, 19, 0, 0, 631, 632,
3882
- 5, 56, 0, 0, 632, 113, 1, 0, 0, 0, 633, 634, 5, 24, 0, 0, 634, 635, 5, 56, 0, 0, 635, 115,
3883
- 1, 0, 0, 0, 636, 637, 7, 13, 0, 0, 637, 638, 5, 1, 0, 0, 638, 639, 3, 4, 2, 0, 639, 117,
3884
- 1, 0, 0, 0, 640, 641, 5, 29, 0, 0, 641, 642, 3, 62, 31, 0, 642, 643, 5, 1, 0, 0, 643, 647,
3885
- 3, 4, 2, 0, 644, 646, 3, 120, 60, 0, 645, 644, 1, 0, 0, 0, 646, 649, 1, 0, 0, 0, 647, 645,
3886
- 1, 0, 0, 0, 647, 648, 1, 0, 0, 0, 648, 651, 1, 0, 0, 0, 649, 647, 1, 0, 0, 0, 650, 652,
3887
- 3, 122, 61, 0, 651, 650, 1, 0, 0, 0, 651, 652, 1, 0, 0, 0, 652, 119, 1, 0, 0, 0, 653, 654,
3888
- 5, 30, 0, 0, 654, 655, 5, 29, 0, 0, 655, 656, 3, 62, 31, 0, 656, 657, 5, 1, 0, 0, 657,
3889
- 658, 3, 4, 2, 0, 658, 121, 1, 0, 0, 0, 659, 660, 5, 30, 0, 0, 660, 661, 5, 1, 0, 0, 661,
3890
- 662, 3, 4, 2, 0, 662, 123, 1, 0, 0, 0, 663, 664, 5, 27, 0, 0, 664, 665, 3, 62, 31, 0, 665,
3891
- 666, 5, 1, 0, 0, 666, 667, 3, 4, 2, 0, 667, 125, 1, 0, 0, 0, 668, 669, 5, 25, 0, 0, 669,
3892
- 674, 5, 56, 0, 0, 670, 671, 5, 2, 0, 0, 671, 673, 5, 56, 0, 0, 672, 670, 1, 0, 0, 0, 673,
3893
- 676, 1, 0, 0, 0, 674, 672, 1, 0, 0, 0, 674, 675, 1, 0, 0, 0, 675, 677, 1, 0, 0, 0, 676,
3894
- 674, 1, 0, 0, 0, 677, 678, 5, 26, 0, 0, 678, 679, 3, 62, 31, 0, 679, 680, 5, 1, 0, 0, 680,
3895
- 681, 3, 4, 2, 0, 681, 127, 1, 0, 0, 0, 72, 130, 132, 137, 139, 165, 171, 173, 180, 192,
3896
- 194, 209, 213, 218, 222, 230, 243, 254, 262, 264, 275, 286, 288, 294, 300, 304,
3897
- 329, 336, 344, 347, 365, 375, 390, 392, 400, 408, 416, 418, 424, 431, 440, 452,
3898
- 455, 462, 467, 472, 475, 481, 484, 488, 504, 506, 514, 516, 525, 538, 540, 548,
3899
- 550, 556, 564, 572, 580, 594, 597, 602, 605, 611, 620, 625, 647, 651, 674
3895
+ 1, 0, 0, 0, 628, 629, 5, 7, 0, 0, 629, 111, 1, 0, 0, 0, 630, 633, 5, 19, 0, 0, 631, 634,
3896
+ 5, 56, 0, 0, 632, 634, 3, 62, 31, 0, 633, 631, 1, 0, 0, 0, 633, 632, 1, 0, 0, 0, 634, 113,
3897
+ 1, 0, 0, 0, 635, 636, 5, 24, 0, 0, 636, 637, 5, 56, 0, 0, 637, 115, 1, 0, 0, 0, 638, 639,
3898
+ 7, 13, 0, 0, 639, 640, 5, 1, 0, 0, 640, 641, 3, 4, 2, 0, 641, 117, 1, 0, 0, 0, 642, 643,
3899
+ 5, 29, 0, 0, 643, 644, 3, 62, 31, 0, 644, 645, 5, 1, 0, 0, 645, 649, 3, 4, 2, 0, 646, 648,
3900
+ 3, 120, 60, 0, 647, 646, 1, 0, 0, 0, 648, 651, 1, 0, 0, 0, 649, 647, 1, 0, 0, 0, 649, 650,
3901
+ 1, 0, 0, 0, 650, 653, 1, 0, 0, 0, 651, 649, 1, 0, 0, 0, 652, 654, 3, 122, 61, 0, 653, 652,
3902
+ 1, 0, 0, 0, 653, 654, 1, 0, 0, 0, 654, 119, 1, 0, 0, 0, 655, 656, 5, 30, 0, 0, 656, 657,
3903
+ 5, 29, 0, 0, 657, 658, 3, 62, 31, 0, 658, 659, 5, 1, 0, 0, 659, 660, 3, 4, 2, 0, 660, 121,
3904
+ 1, 0, 0, 0, 661, 662, 5, 30, 0, 0, 662, 663, 5, 1, 0, 0, 663, 664, 3, 4, 2, 0, 664, 123,
3905
+ 1, 0, 0, 0, 665, 666, 5, 27, 0, 0, 666, 667, 3, 62, 31, 0, 667, 668, 5, 1, 0, 0, 668, 669,
3906
+ 3, 4, 2, 0, 669, 125, 1, 0, 0, 0, 670, 671, 5, 25, 0, 0, 671, 676, 5, 56, 0, 0, 672, 673,
3907
+ 5, 2, 0, 0, 673, 675, 5, 56, 0, 0, 674, 672, 1, 0, 0, 0, 675, 678, 1, 0, 0, 0, 676, 674,
3908
+ 1, 0, 0, 0, 676, 677, 1, 0, 0, 0, 677, 679, 1, 0, 0, 0, 678, 676, 1, 0, 0, 0, 679, 680,
3909
+ 5, 26, 0, 0, 680, 681, 3, 62, 31, 0, 681, 682, 5, 1, 0, 0, 682, 683, 3, 4, 2, 0, 683, 127,
3910
+ 1, 0, 0, 0, 73, 130, 132, 137, 139, 165, 171, 173, 180, 192, 194, 209, 213, 218, 222,
3911
+ 230, 243, 254, 262, 264, 275, 286, 288, 294, 300, 304, 329, 336, 344, 347, 365,
3912
+ 375, 390, 392, 400, 408, 416, 418, 424, 431, 440, 452, 455, 462, 467, 472, 475,
3913
+ 481, 484, 488, 504, 506, 514, 516, 525, 538, 540, 548, 550, 556, 564, 572, 580,
3914
+ 594, 597, 602, 605, 611, 620, 625, 633, 649, 653, 676
3900
3915
  ];
3901
3916
  static __ATN;
3902
3917
  static get _ATN() {
@@ -5854,6 +5869,9 @@ export class Point_exprContext extends antlr.ParserRuleContext {
5854
5869
  ID() {
5855
5870
  return this.getToken(CircuitScriptParser.ID, 0);
5856
5871
  }
5872
+ data_expr() {
5873
+ return this.getRuleContext(0, Data_exprContext);
5874
+ }
5857
5875
  get ruleIndex() {
5858
5876
  return CircuitScriptParser.RULE_point_expr;
5859
5877
  }
@@ -8,6 +8,7 @@ const builtInMethods = [
8
8
  ['len', objectLength],
9
9
  ['arrayPush', arrayPush],
10
10
  ['arrayGet', arrayGet],
11
+ ['arraySet', arraySet],
11
12
  ['print', null],
12
13
  ];
13
14
  export const buildInMethodNamesList = builtInMethods.map(item => item[0]);
@@ -106,6 +107,20 @@ function arrayGet(arrayObject, index) {
106
107
  }
107
108
  return arrayObject[useValue];
108
109
  }
110
+ function arraySet(arrayObject, index, setValue) {
111
+ if (!Array.isArray(arrayObject)) {
112
+ throw "Invalid array object";
113
+ }
114
+ let useValue;
115
+ if (index instanceof NumericValue) {
116
+ useValue = index.toNumber();
117
+ }
118
+ else {
119
+ useValue = index;
120
+ }
121
+ arrayObject[useValue] = setValue;
122
+ return arrayObject;
123
+ }
109
124
  function getPositionParams(params) {
110
125
  return params.map(([, , value]) => value);
111
126
  }
@@ -927,7 +927,21 @@ export class ParserVisitor extends BaseVisitor {
927
927
  };
928
928
  visitPoint_expr = (ctx) => {
929
929
  const ID = ctx.ID();
930
- return this.getExecutor().addPoint(ID.getText());
930
+ const ctxData = ctx.data_expr();
931
+ let pointValue;
932
+ if (ctxData) {
933
+ const resultValue = this.visitResult(ctxData);
934
+ if (typeof resultValue === 'string') {
935
+ pointValue = resultValue;
936
+ }
937
+ else {
938
+ throw new RuntimeExecutionError('Invalid value for point');
939
+ }
940
+ }
941
+ else if (ID) {
942
+ pointValue = ID.getText();
943
+ }
944
+ return this.getExecutor().addPoint(pointValue);
931
945
  };
932
946
  visitProperty_set_expr = (ctx) => {
933
947
  const result = this.visitResult(ctx.data_expr());
@@ -833,7 +833,8 @@ export declare class Array_exprContext extends antlr.ParserRuleContext {
833
833
  export declare class Point_exprContext extends antlr.ParserRuleContext {
834
834
  constructor(parent: antlr.ParserRuleContext | null, invokingState: number);
835
835
  Point(): antlr.TerminalNode;
836
- ID(): antlr.TerminalNode;
836
+ ID(): antlr.TerminalNode | null;
837
+ data_expr(): Data_exprContext | null;
837
838
  get ruleIndex(): number;
838
839
  accept<Result>(visitor: CircuitScriptVisitor<Result>): Result | null;
839
840
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "circuitscript",
3
- "version": "0.1.9",
3
+ "version": "0.1.10",
4
4
  "description": "Interpreter for the circuitscript language",
5
5
  "homepage": "https://circuitscript.net",
6
6
  "engines": {