@scinorandex/sparse 0.0.2 → 0.0.3

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.
Files changed (62) hide show
  1. package/README.md +2 -2
  2. package/dist/cli.js +2 -2
  3. package/dist/cli.js.map +1 -1
  4. package/dist/generator.d.ts +4 -1
  5. package/dist/generator.js +47 -32
  6. package/dist/generator.js.map +1 -1
  7. package/dist/index.d.ts +3 -2
  8. package/dist/index.js +5 -5
  9. package/dist/index.js.map +1 -1
  10. package/dist/meta/common.d.ts +57 -0
  11. package/dist/meta/common.js +62 -0
  12. package/dist/meta/common.js.map +1 -0
  13. package/dist/meta/handwritten.d.ts +12 -0
  14. package/dist/{grammarParser.js → meta/handwritten.js} +24 -24
  15. package/dist/meta/handwritten.js.map +1 -0
  16. package/dist/meta/selfhosted.d.ts +23 -0
  17. package/dist/meta/selfhosted.js +206 -0
  18. package/dist/meta/selfhosted.js.map +1 -0
  19. package/dist/meta/states.d.ts +1580 -0
  20. package/dist/meta/states.js +1493 -0
  21. package/dist/meta/states.js.map +1 -0
  22. package/dist/parser.d.ts +16 -5
  23. package/dist/parser.js +25 -7
  24. package/dist/parser.js.map +1 -1
  25. package/dist/{tableParser.d.ts → table/handwritten.d.ts} +1 -1
  26. package/dist/{tableParser.js → table/handwritten.js} +2 -2
  27. package/dist/table/handwritten.js.map +1 -0
  28. package/dist/table/selfhosted.d.ts +2 -0
  29. package/dist/table/selfhosted.js +65 -0
  30. package/dist/table/selfhosted.js.map +1 -0
  31. package/dist/table/states.d.ts +592 -0
  32. package/dist/table/states.js +593 -0
  33. package/dist/table/states.js.map +1 -0
  34. package/dist/utils/Result.d.ts +1 -1
  35. package/dist/utils/errorWindowBuilder.d.ts +1 -1
  36. package/example/LoLang/example.ts +14 -7
  37. package/example/complicated/grammar.txt +37 -0
  38. package/example/math/example.ts +1 -1
  39. package/example/selfhosted/01-meta-grammar.txt +10 -0
  40. package/example/selfhosted/02-table-grammar.txt +6 -0
  41. package/example/selfhosted/codegen-meta.ts +1489 -0
  42. package/example/selfhosted/codegen-table.ts +589 -0
  43. package/example/selfhosted/example.ts +39 -0
  44. package/package.json +3 -3
  45. package/src/cli.ts +1 -1
  46. package/src/generator.ts +52 -34
  47. package/src/index.ts +3 -2
  48. package/src/meta/common.ts +74 -0
  49. package/src/{grammarParser.ts → meta/handwritten.ts} +17 -21
  50. package/src/meta/selfhosted.ts +272 -0
  51. package/src/meta/states.ts +1489 -0
  52. package/src/parser.ts +53 -19
  53. package/src/{tableParser.ts → table/handwritten.ts} +5 -5
  54. package/src/table/selfhosted.ts +67 -0
  55. package/src/table/states.ts +589 -0
  56. package/src/utils/Result.ts +1 -1
  57. package/src/utils/errorWindowBuilder.ts +1 -1
  58. package/tsconfig.build.json +30 -0
  59. package/tsconfig.json +6 -6
  60. package/dist/grammarParser.d.ts +0 -27
  61. package/dist/grammarParser.js.map +0 -1
  62. package/dist/tableParser.js.map +0 -1
@@ -0,0 +1,1493 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.selfhosted = exports.productions = exports.states = void 0;
4
+ exports.states = [
5
+ {
6
+ "[EOF]": {
7
+ "type": "shift",
8
+ "value": 4
9
+ },
10
+ "[L_ANGLE]": {
11
+ "type": "shift",
12
+ "value": 5
13
+ },
14
+ "<PROGRAM>": {
15
+ "type": "goto",
16
+ "value": 1
17
+ },
18
+ "<PRODUCTIONS>": {
19
+ "type": "goto",
20
+ "value": 2
21
+ },
22
+ "<PRODUCTION>": {
23
+ "type": "goto",
24
+ "value": 3
25
+ }
26
+ },
27
+ {
28
+ "[EOF]": {
29
+ "type": "reduce",
30
+ "value": 0
31
+ }
32
+ },
33
+ {
34
+ "[EOF]": {
35
+ "type": "shift",
36
+ "value": 6
37
+ }
38
+ },
39
+ {
40
+ "[EOF]": {
41
+ "type": "reduce",
42
+ "value": 3
43
+ },
44
+ "[L_ANGLE]": {
45
+ "type": "shift",
46
+ "value": 5
47
+ },
48
+ "<PRODUCTIONS>": {
49
+ "type": "goto",
50
+ "value": 7
51
+ },
52
+ "<PRODUCTION>": {
53
+ "type": "goto",
54
+ "value": 3
55
+ }
56
+ },
57
+ {
58
+ "[EOF]": {
59
+ "type": "reduce",
60
+ "value": 1
61
+ }
62
+ },
63
+ {
64
+ "[IDENTIFIER]": {
65
+ "type": "shift",
66
+ "value": 8
67
+ }
68
+ },
69
+ {
70
+ "[EOF]": {
71
+ "type": "reduce",
72
+ "value": 2
73
+ }
74
+ },
75
+ {
76
+ "[EOF]": {
77
+ "type": "reduce",
78
+ "value": 4
79
+ }
80
+ },
81
+ {
82
+ "[R_ANGLE]": {
83
+ "type": "shift",
84
+ "value": 9
85
+ },
86
+ "[COLON]": {
87
+ "type": "shift",
88
+ "value": 10
89
+ }
90
+ },
91
+ {
92
+ "[COLON]": {
93
+ "type": "shift",
94
+ "value": 11
95
+ }
96
+ },
97
+ {
98
+ "[IDENTIFIER]": {
99
+ "type": "shift",
100
+ "value": 12
101
+ }
102
+ },
103
+ {
104
+ "[L_PAREN]": {
105
+ "type": "shift",
106
+ "value": 17
107
+ },
108
+ "[L_ANGLE]": {
109
+ "type": "shift",
110
+ "value": 18
111
+ },
112
+ "[L_BRACKET]": {
113
+ "type": "shift",
114
+ "value": 19
115
+ },
116
+ "<TOKENS>": {
117
+ "type": "goto",
118
+ "value": 13
119
+ },
120
+ "<TOKEN>": {
121
+ "type": "goto",
122
+ "value": 14
123
+ },
124
+ "<VARIABLE>": {
125
+ "type": "goto",
126
+ "value": 15
127
+ },
128
+ "<TERMINAL>": {
129
+ "type": "goto",
130
+ "value": 16
131
+ }
132
+ },
133
+ {
134
+ "[R_ANGLE]": {
135
+ "type": "shift",
136
+ "value": 20
137
+ }
138
+ },
139
+ {
140
+ "[SEMICOLON]": {
141
+ "type": "shift",
142
+ "value": 21
143
+ }
144
+ },
145
+ {
146
+ "[SEMICOLON]": {
147
+ "type": "reduce",
148
+ "value": 7
149
+ },
150
+ "[L_PAREN]": {
151
+ "type": "shift",
152
+ "value": 17
153
+ },
154
+ "[L_ANGLE]": {
155
+ "type": "shift",
156
+ "value": 18
157
+ },
158
+ "[L_BRACKET]": {
159
+ "type": "shift",
160
+ "value": 19
161
+ },
162
+ "<TOKENS>": {
163
+ "type": "goto",
164
+ "value": 22
165
+ },
166
+ "<TOKEN>": {
167
+ "type": "goto",
168
+ "value": 23
169
+ },
170
+ "<VARIABLE>": {
171
+ "type": "goto",
172
+ "value": 15
173
+ },
174
+ "<TERMINAL>": {
175
+ "type": "goto",
176
+ "value": 16
177
+ }
178
+ },
179
+ {
180
+ "[SEMICOLON]": {
181
+ "type": "reduce",
182
+ "value": 9
183
+ },
184
+ "[R_PAREN]": {
185
+ "type": "reduce",
186
+ "value": 9
187
+ },
188
+ "[L_PAREN]": {
189
+ "type": "reduce",
190
+ "value": 9
191
+ },
192
+ "[L_ANGLE]": {
193
+ "type": "reduce",
194
+ "value": 9
195
+ },
196
+ "[L_BRACKET]": {
197
+ "type": "reduce",
198
+ "value": 9
199
+ }
200
+ },
201
+ {
202
+ "[SEMICOLON]": {
203
+ "type": "reduce",
204
+ "value": 10
205
+ },
206
+ "[R_PAREN]": {
207
+ "type": "reduce",
208
+ "value": 10
209
+ },
210
+ "[L_PAREN]": {
211
+ "type": "reduce",
212
+ "value": 10
213
+ },
214
+ "[L_ANGLE]": {
215
+ "type": "reduce",
216
+ "value": 10
217
+ },
218
+ "[L_BRACKET]": {
219
+ "type": "reduce",
220
+ "value": 10
221
+ }
222
+ },
223
+ {
224
+ "[L_PAREN]": {
225
+ "type": "shift",
226
+ "value": 17
227
+ },
228
+ "[L_ANGLE]": {
229
+ "type": "shift",
230
+ "value": 18
231
+ },
232
+ "[L_BRACKET]": {
233
+ "type": "shift",
234
+ "value": 19
235
+ },
236
+ "<TOKENS>": {
237
+ "type": "goto",
238
+ "value": 24
239
+ },
240
+ "<TOKEN>": {
241
+ "type": "goto",
242
+ "value": 25
243
+ },
244
+ "<VARIABLE>": {
245
+ "type": "goto",
246
+ "value": 15
247
+ },
248
+ "<TERMINAL>": {
249
+ "type": "goto",
250
+ "value": 16
251
+ }
252
+ },
253
+ {
254
+ "[IDENTIFIER]": {
255
+ "type": "shift",
256
+ "value": 27
257
+ },
258
+ "<INSIDE>": {
259
+ "type": "goto",
260
+ "value": 26
261
+ }
262
+ },
263
+ {
264
+ "[IDENTIFIER]": {
265
+ "type": "shift",
266
+ "value": 29
267
+ },
268
+ "<INSIDE>": {
269
+ "type": "goto",
270
+ "value": 28
271
+ }
272
+ },
273
+ {
274
+ "[COLON]": {
275
+ "type": "shift",
276
+ "value": 30
277
+ }
278
+ },
279
+ {
280
+ "[EOF]": {
281
+ "type": "reduce",
282
+ "value": 5
283
+ },
284
+ "[L_ANGLE]": {
285
+ "type": "reduce",
286
+ "value": 5
287
+ }
288
+ },
289
+ {
290
+ "[SEMICOLON]": {
291
+ "type": "reduce",
292
+ "value": 8
293
+ }
294
+ },
295
+ {
296
+ "[SEMICOLON]": {
297
+ "type": "reduce",
298
+ "value": 7
299
+ },
300
+ "[R_PAREN]": {
301
+ "type": "reduce",
302
+ "value": 7
303
+ },
304
+ "[L_PAREN]": {
305
+ "type": "shift",
306
+ "value": 17
307
+ },
308
+ "[L_ANGLE]": {
309
+ "type": "shift",
310
+ "value": 18
311
+ },
312
+ "[L_BRACKET]": {
313
+ "type": "shift",
314
+ "value": 19
315
+ },
316
+ "<TOKENS>": {
317
+ "type": "goto",
318
+ "value": 31
319
+ },
320
+ "<TOKEN>": {
321
+ "type": "goto",
322
+ "value": 23
323
+ },
324
+ "<VARIABLE>": {
325
+ "type": "goto",
326
+ "value": 15
327
+ },
328
+ "<TERMINAL>": {
329
+ "type": "goto",
330
+ "value": 16
331
+ }
332
+ },
333
+ {
334
+ "[R_PAREN]": {
335
+ "type": "shift",
336
+ "value": 32
337
+ }
338
+ },
339
+ {
340
+ "[R_PAREN]": {
341
+ "type": "reduce",
342
+ "value": 7
343
+ },
344
+ "[L_PAREN]": {
345
+ "type": "shift",
346
+ "value": 17
347
+ },
348
+ "[L_ANGLE]": {
349
+ "type": "shift",
350
+ "value": 18
351
+ },
352
+ "[L_BRACKET]": {
353
+ "type": "shift",
354
+ "value": 19
355
+ },
356
+ "<TOKENS>": {
357
+ "type": "goto",
358
+ "value": 33
359
+ },
360
+ "<TOKEN>": {
361
+ "type": "goto",
362
+ "value": 23
363
+ },
364
+ "<VARIABLE>": {
365
+ "type": "goto",
366
+ "value": 15
367
+ },
368
+ "<TERMINAL>": {
369
+ "type": "goto",
370
+ "value": 16
371
+ }
372
+ },
373
+ {
374
+ "[R_ANGLE]": {
375
+ "type": "shift",
376
+ "value": 34
377
+ },
378
+ "[COLON]": {
379
+ "type": "shift",
380
+ "value": 35
381
+ }
382
+ },
383
+ {
384
+ "[R_ANGLE]": {
385
+ "type": "reduce",
386
+ "value": 16
387
+ },
388
+ "[COLON]": {
389
+ "type": "reduce",
390
+ "value": 16
391
+ },
392
+ "[PIPE]": {
393
+ "type": "shift",
394
+ "value": 36
395
+ }
396
+ },
397
+ {
398
+ "[R_BRACKET]": {
399
+ "type": "shift",
400
+ "value": 37
401
+ },
402
+ "[COLON]": {
403
+ "type": "shift",
404
+ "value": 38
405
+ }
406
+ },
407
+ {
408
+ "[R_BRACKET]": {
409
+ "type": "reduce",
410
+ "value": 16
411
+ },
412
+ "[COLON]": {
413
+ "type": "reduce",
414
+ "value": 16
415
+ },
416
+ "[PIPE]": {
417
+ "type": "shift",
418
+ "value": 39
419
+ }
420
+ },
421
+ {
422
+ "[L_PAREN]": {
423
+ "type": "shift",
424
+ "value": 17
425
+ },
426
+ "[L_ANGLE]": {
427
+ "type": "shift",
428
+ "value": 18
429
+ },
430
+ "[L_BRACKET]": {
431
+ "type": "shift",
432
+ "value": 19
433
+ },
434
+ "<TOKENS>": {
435
+ "type": "goto",
436
+ "value": 40
437
+ },
438
+ "<TOKEN>": {
439
+ "type": "goto",
440
+ "value": 14
441
+ },
442
+ "<VARIABLE>": {
443
+ "type": "goto",
444
+ "value": 15
445
+ },
446
+ "<TERMINAL>": {
447
+ "type": "goto",
448
+ "value": 16
449
+ }
450
+ },
451
+ {
452
+ "[SEMICOLON]": {
453
+ "type": "reduce",
454
+ "value": 8
455
+ },
456
+ "[R_PAREN]": {
457
+ "type": "reduce",
458
+ "value": 8
459
+ }
460
+ },
461
+ {
462
+ "[QUESTION_MARK]": {
463
+ "type": "shift",
464
+ "value": 41
465
+ }
466
+ },
467
+ {
468
+ "[R_PAREN]": {
469
+ "type": "reduce",
470
+ "value": 8
471
+ }
472
+ },
473
+ {
474
+ "[SEMICOLON]": {
475
+ "type": "reduce",
476
+ "value": 12
477
+ },
478
+ "[R_PAREN]": {
479
+ "type": "reduce",
480
+ "value": 12
481
+ },
482
+ "[L_PAREN]": {
483
+ "type": "reduce",
484
+ "value": 12
485
+ },
486
+ "[L_ANGLE]": {
487
+ "type": "reduce",
488
+ "value": 12
489
+ },
490
+ "[L_BRACKET]": {
491
+ "type": "reduce",
492
+ "value": 12
493
+ }
494
+ },
495
+ {
496
+ "[IDENTIFIER]": {
497
+ "type": "shift",
498
+ "value": 42
499
+ }
500
+ },
501
+ {
502
+ "[IDENTIFIER]": {
503
+ "type": "shift",
504
+ "value": 44
505
+ },
506
+ "<INSIDE>": {
507
+ "type": "goto",
508
+ "value": 43
509
+ }
510
+ },
511
+ {
512
+ "[SEMICOLON]": {
513
+ "type": "reduce",
514
+ "value": 14
515
+ },
516
+ "[R_PAREN]": {
517
+ "type": "reduce",
518
+ "value": 14
519
+ },
520
+ "[L_PAREN]": {
521
+ "type": "reduce",
522
+ "value": 14
523
+ },
524
+ "[L_ANGLE]": {
525
+ "type": "reduce",
526
+ "value": 14
527
+ },
528
+ "[L_BRACKET]": {
529
+ "type": "reduce",
530
+ "value": 14
531
+ }
532
+ },
533
+ {
534
+ "[IDENTIFIER]": {
535
+ "type": "shift",
536
+ "value": 45
537
+ }
538
+ },
539
+ {
540
+ "[IDENTIFIER]": {
541
+ "type": "shift",
542
+ "value": 44
543
+ },
544
+ "<INSIDE>": {
545
+ "type": "goto",
546
+ "value": 46
547
+ }
548
+ },
549
+ {
550
+ "[SEMICOLON]": {
551
+ "type": "shift",
552
+ "value": 47
553
+ }
554
+ },
555
+ {
556
+ "[SEMICOLON]": {
557
+ "type": "reduce",
558
+ "value": 11
559
+ },
560
+ "[R_PAREN]": {
561
+ "type": "reduce",
562
+ "value": 11
563
+ },
564
+ "[L_PAREN]": {
565
+ "type": "reduce",
566
+ "value": 11
567
+ },
568
+ "[L_ANGLE]": {
569
+ "type": "reduce",
570
+ "value": 11
571
+ },
572
+ "[L_BRACKET]": {
573
+ "type": "reduce",
574
+ "value": 11
575
+ }
576
+ },
577
+ {
578
+ "[R_ANGLE]": {
579
+ "type": "shift",
580
+ "value": 48
581
+ }
582
+ },
583
+ {
584
+ "[R_ANGLE]": {
585
+ "type": "reduce",
586
+ "value": 17
587
+ },
588
+ "[COLON]": {
589
+ "type": "reduce",
590
+ "value": 17
591
+ }
592
+ },
593
+ {
594
+ "[R_ANGLE]": {
595
+ "type": "reduce",
596
+ "value": 16
597
+ },
598
+ "[COLON]": {
599
+ "type": "reduce",
600
+ "value": 16
601
+ },
602
+ "[R_BRACKET]": {
603
+ "type": "reduce",
604
+ "value": 16
605
+ },
606
+ "[PIPE]": {
607
+ "type": "shift",
608
+ "value": 49
609
+ }
610
+ },
611
+ {
612
+ "[R_BRACKET]": {
613
+ "type": "shift",
614
+ "value": 50
615
+ }
616
+ },
617
+ {
618
+ "[R_BRACKET]": {
619
+ "type": "reduce",
620
+ "value": 17
621
+ },
622
+ "[COLON]": {
623
+ "type": "reduce",
624
+ "value": 17
625
+ }
626
+ },
627
+ {
628
+ "[EOF]": {
629
+ "type": "reduce",
630
+ "value": 6
631
+ },
632
+ "[L_ANGLE]": {
633
+ "type": "reduce",
634
+ "value": 6
635
+ }
636
+ },
637
+ {
638
+ "[SEMICOLON]": {
639
+ "type": "reduce",
640
+ "value": 13
641
+ },
642
+ "[R_PAREN]": {
643
+ "type": "reduce",
644
+ "value": 13
645
+ },
646
+ "[L_PAREN]": {
647
+ "type": "reduce",
648
+ "value": 13
649
+ },
650
+ "[L_ANGLE]": {
651
+ "type": "reduce",
652
+ "value": 13
653
+ },
654
+ "[L_BRACKET]": {
655
+ "type": "reduce",
656
+ "value": 13
657
+ }
658
+ },
659
+ {
660
+ "[IDENTIFIER]": {
661
+ "type": "shift",
662
+ "value": 44
663
+ },
664
+ "<INSIDE>": {
665
+ "type": "goto",
666
+ "value": 51
667
+ }
668
+ },
669
+ {
670
+ "[SEMICOLON]": {
671
+ "type": "reduce",
672
+ "value": 15
673
+ },
674
+ "[R_PAREN]": {
675
+ "type": "reduce",
676
+ "value": 15
677
+ },
678
+ "[L_PAREN]": {
679
+ "type": "reduce",
680
+ "value": 15
681
+ },
682
+ "[L_ANGLE]": {
683
+ "type": "reduce",
684
+ "value": 15
685
+ },
686
+ "[L_BRACKET]": {
687
+ "type": "reduce",
688
+ "value": 15
689
+ }
690
+ },
691
+ {
692
+ "[R_ANGLE]": {
693
+ "type": "reduce",
694
+ "value": 17
695
+ },
696
+ "[COLON]": {
697
+ "type": "reduce",
698
+ "value": 17
699
+ },
700
+ "[R_BRACKET]": {
701
+ "type": "reduce",
702
+ "value": 17
703
+ }
704
+ }
705
+ ];
706
+ exports.productions = [
707
+ {
708
+ "lhs": {
709
+ "column": 1,
710
+ "lexeme": "S",
711
+ "line": 1,
712
+ "type": 0
713
+ },
714
+ "identifier": "<S>",
715
+ "name": null,
716
+ "originalProductionIndex": 0,
717
+ "rhs": [
718
+ {
719
+ "type": "variable",
720
+ "token": {
721
+ "column": 6,
722
+ "lexeme": "PROGRAM",
723
+ "line": 1,
724
+ "type": 0
725
+ },
726
+ "identifier": "<PROGRAM>",
727
+ "name": null
728
+ }
729
+ ]
730
+ },
731
+ {
732
+ "lhs": {
733
+ "column": 1,
734
+ "lexeme": "PROGRAM",
735
+ "line": 2,
736
+ "type": 0
737
+ },
738
+ "identifier": "<PROGRAM>",
739
+ "name": "program",
740
+ "originalProductionIndex": 1,
741
+ "rhs": [
742
+ {
743
+ "type": "terminal",
744
+ "token": {
745
+ "column": 51,
746
+ "lexeme": "EOF",
747
+ "line": 2,
748
+ "type": 0
749
+ },
750
+ "identifier": "[EOF]",
751
+ "name": null
752
+ }
753
+ ]
754
+ },
755
+ {
756
+ "lhs": {
757
+ "column": 1,
758
+ "lexeme": "PROGRAM",
759
+ "line": 2,
760
+ "type": 0
761
+ },
762
+ "identifier": "<PROGRAM>",
763
+ "name": "program",
764
+ "originalProductionIndex": 1,
765
+ "rhs": [
766
+ {
767
+ "type": "variable",
768
+ "token": {
769
+ "column": 22,
770
+ "lexeme": "PRODUCTIONS",
771
+ "line": 2,
772
+ "type": 0
773
+ },
774
+ "identifier": "<PRODUCTIONS>",
775
+ "name": "productions"
776
+ },
777
+ {
778
+ "type": "terminal",
779
+ "token": {
780
+ "column": 51,
781
+ "lexeme": "EOF",
782
+ "line": 2,
783
+ "type": 0
784
+ },
785
+ "identifier": "[EOF]",
786
+ "name": null
787
+ }
788
+ ]
789
+ },
790
+ {
791
+ "lhs": {
792
+ "column": 1,
793
+ "lexeme": "PRODUCTIONS",
794
+ "line": 3,
795
+ "type": 0
796
+ },
797
+ "identifier": "<PRODUCTIONS>",
798
+ "name": "productions",
799
+ "originalProductionIndex": 2,
800
+ "rhs": [
801
+ {
802
+ "type": "variable",
803
+ "token": {
804
+ "column": 29,
805
+ "lexeme": "PRODUCTION",
806
+ "line": 3,
807
+ "type": 0
808
+ },
809
+ "identifier": "<PRODUCTION>",
810
+ "name": "production"
811
+ }
812
+ ]
813
+ },
814
+ {
815
+ "lhs": {
816
+ "column": 1,
817
+ "lexeme": "PRODUCTIONS",
818
+ "line": 3,
819
+ "type": 0
820
+ },
821
+ "identifier": "<PRODUCTIONS>",
822
+ "name": "productions",
823
+ "originalProductionIndex": 2,
824
+ "rhs": [
825
+ {
826
+ "type": "variable",
827
+ "token": {
828
+ "column": 29,
829
+ "lexeme": "PRODUCTION",
830
+ "line": 3,
831
+ "type": 0
832
+ },
833
+ "identifier": "<PRODUCTION>",
834
+ "name": "production"
835
+ },
836
+ {
837
+ "type": "variable",
838
+ "token": {
839
+ "column": 55,
840
+ "lexeme": "PRODUCTIONS",
841
+ "line": 3,
842
+ "type": 0
843
+ },
844
+ "identifier": "<PRODUCTIONS>",
845
+ "name": "rest"
846
+ }
847
+ ]
848
+ },
849
+ {
850
+ "lhs": {
851
+ "column": 1,
852
+ "lexeme": "PRODUCTION",
853
+ "line": 4,
854
+ "type": 0
855
+ },
856
+ "identifier": "<PRODUCTION>",
857
+ "name": "production",
858
+ "originalProductionIndex": 3,
859
+ "rhs": [
860
+ {
861
+ "type": "terminal",
862
+ "token": {
863
+ "column": 27,
864
+ "lexeme": "L_ANGLE",
865
+ "line": 4,
866
+ "type": 0
867
+ },
868
+ "identifier": "[L_ANGLE]",
869
+ "name": null
870
+ },
871
+ {
872
+ "type": "terminal",
873
+ "token": {
874
+ "column": 37,
875
+ "lexeme": "IDENTIFIER",
876
+ "line": 4,
877
+ "type": 0
878
+ },
879
+ "identifier": "[IDENTIFIER]",
880
+ "name": "production_name"
881
+ },
882
+ {
883
+ "type": "terminal",
884
+ "token": {
885
+ "column": 97,
886
+ "lexeme": "R_ANGLE",
887
+ "line": 4,
888
+ "type": 0
889
+ },
890
+ "identifier": "[R_ANGLE]",
891
+ "name": null
892
+ },
893
+ {
894
+ "type": "terminal",
895
+ "token": {
896
+ "column": 107,
897
+ "lexeme": "COLON",
898
+ "line": 4,
899
+ "type": 0
900
+ },
901
+ "identifier": "[COLON]",
902
+ "name": null
903
+ },
904
+ {
905
+ "type": "variable",
906
+ "token": {
907
+ "column": 115,
908
+ "lexeme": "TOKENS",
909
+ "line": 4,
910
+ "type": 0
911
+ },
912
+ "identifier": "<TOKENS>",
913
+ "name": "tokens"
914
+ },
915
+ {
916
+ "type": "terminal",
917
+ "token": {
918
+ "column": 132,
919
+ "lexeme": "SEMICOLON",
920
+ "line": 4,
921
+ "type": 0
922
+ },
923
+ "identifier": "[SEMICOLON]",
924
+ "name": null
925
+ }
926
+ ]
927
+ },
928
+ {
929
+ "lhs": {
930
+ "column": 1,
931
+ "lexeme": "PRODUCTION",
932
+ "line": 4,
933
+ "type": 0
934
+ },
935
+ "identifier": "<PRODUCTION>",
936
+ "name": "production",
937
+ "originalProductionIndex": 3,
938
+ "rhs": [
939
+ {
940
+ "type": "terminal",
941
+ "token": {
942
+ "column": 27,
943
+ "lexeme": "L_ANGLE",
944
+ "line": 4,
945
+ "type": 0
946
+ },
947
+ "identifier": "[L_ANGLE]",
948
+ "name": null
949
+ },
950
+ {
951
+ "type": "terminal",
952
+ "token": {
953
+ "column": 37,
954
+ "lexeme": "IDENTIFIER",
955
+ "line": 4,
956
+ "type": 0
957
+ },
958
+ "identifier": "[IDENTIFIER]",
959
+ "name": "production_name"
960
+ },
961
+ {
962
+ "type": "terminal",
963
+ "token": {
964
+ "column": 68,
965
+ "lexeme": "COLON",
966
+ "line": 4,
967
+ "type": 0
968
+ },
969
+ "identifier": "[COLON]",
970
+ "name": null
971
+ },
972
+ {
973
+ "type": "terminal",
974
+ "token": {
975
+ "column": 76,
976
+ "lexeme": "IDENTIFIER",
977
+ "line": 4,
978
+ "type": 0
979
+ },
980
+ "identifier": "[IDENTIFIER]",
981
+ "name": "uuid"
982
+ },
983
+ {
984
+ "type": "terminal",
985
+ "token": {
986
+ "column": 97,
987
+ "lexeme": "R_ANGLE",
988
+ "line": 4,
989
+ "type": 0
990
+ },
991
+ "identifier": "[R_ANGLE]",
992
+ "name": null
993
+ },
994
+ {
995
+ "type": "terminal",
996
+ "token": {
997
+ "column": 107,
998
+ "lexeme": "COLON",
999
+ "line": 4,
1000
+ "type": 0
1001
+ },
1002
+ "identifier": "[COLON]",
1003
+ "name": null
1004
+ },
1005
+ {
1006
+ "type": "variable",
1007
+ "token": {
1008
+ "column": 115,
1009
+ "lexeme": "TOKENS",
1010
+ "line": 4,
1011
+ "type": 0
1012
+ },
1013
+ "identifier": "<TOKENS>",
1014
+ "name": "tokens"
1015
+ },
1016
+ {
1017
+ "type": "terminal",
1018
+ "token": {
1019
+ "column": 132,
1020
+ "lexeme": "SEMICOLON",
1021
+ "line": 4,
1022
+ "type": 0
1023
+ },
1024
+ "identifier": "[SEMICOLON]",
1025
+ "name": null
1026
+ }
1027
+ ]
1028
+ },
1029
+ {
1030
+ "lhs": {
1031
+ "column": 1,
1032
+ "lexeme": "TOKENS",
1033
+ "line": 5,
1034
+ "type": 0
1035
+ },
1036
+ "identifier": "<TOKENS>",
1037
+ "name": "tokens",
1038
+ "originalProductionIndex": 4,
1039
+ "rhs": [
1040
+ {
1041
+ "type": "variable",
1042
+ "token": {
1043
+ "column": 19,
1044
+ "lexeme": "TOKEN",
1045
+ "line": 5,
1046
+ "type": 0
1047
+ },
1048
+ "identifier": "<TOKEN>",
1049
+ "name": "token"
1050
+ }
1051
+ ]
1052
+ },
1053
+ {
1054
+ "lhs": {
1055
+ "column": 1,
1056
+ "lexeme": "TOKENS",
1057
+ "line": 5,
1058
+ "type": 0
1059
+ },
1060
+ "identifier": "<TOKENS>",
1061
+ "name": "tokens",
1062
+ "originalProductionIndex": 4,
1063
+ "rhs": [
1064
+ {
1065
+ "type": "variable",
1066
+ "token": {
1067
+ "column": 19,
1068
+ "lexeme": "TOKEN",
1069
+ "line": 5,
1070
+ "type": 0
1071
+ },
1072
+ "identifier": "<TOKEN>",
1073
+ "name": "token"
1074
+ },
1075
+ {
1076
+ "type": "variable",
1077
+ "token": {
1078
+ "column": 35,
1079
+ "lexeme": "TOKENS",
1080
+ "line": 5,
1081
+ "type": 0
1082
+ },
1083
+ "identifier": "<TOKENS>",
1084
+ "name": "rest"
1085
+ }
1086
+ ]
1087
+ },
1088
+ {
1089
+ "lhs": {
1090
+ "column": 1,
1091
+ "lexeme": "TOKEN",
1092
+ "line": 6,
1093
+ "type": 0
1094
+ },
1095
+ "identifier": "<TOKEN>",
1096
+ "name": "token",
1097
+ "originalProductionIndex": 5,
1098
+ "rhs": [
1099
+ {
1100
+ "type": "variable",
1101
+ "token": {
1102
+ "column": 17,
1103
+ "lexeme": "VARIABLE",
1104
+ "line": 6,
1105
+ "type": 0
1106
+ },
1107
+ "identifier": "<VARIABLE>",
1108
+ "name": "token"
1109
+ }
1110
+ ]
1111
+ },
1112
+ {
1113
+ "lhs": {
1114
+ "column": 1,
1115
+ "lexeme": "TOKEN",
1116
+ "line": 6,
1117
+ "type": 0
1118
+ },
1119
+ "identifier": "<TOKEN>",
1120
+ "name": "token",
1121
+ "originalProductionIndex": 5,
1122
+ "rhs": [
1123
+ {
1124
+ "type": "variable",
1125
+ "token": {
1126
+ "column": 28,
1127
+ "lexeme": "TERMINAL",
1128
+ "line": 6,
1129
+ "type": 0
1130
+ },
1131
+ "identifier": "<TERMINAL>",
1132
+ "name": "token"
1133
+ }
1134
+ ]
1135
+ },
1136
+ {
1137
+ "lhs": {
1138
+ "column": 1,
1139
+ "lexeme": "TOKEN",
1140
+ "line": 7,
1141
+ "type": 0
1142
+ },
1143
+ "identifier": "<TOKEN>",
1144
+ "name": "grouped_token",
1145
+ "originalProductionIndex": 6,
1146
+ "rhs": [
1147
+ {
1148
+ "type": "terminal",
1149
+ "token": {
1150
+ "column": 25,
1151
+ "lexeme": "L_PAREN",
1152
+ "line": 7,
1153
+ "type": 0
1154
+ },
1155
+ "identifier": "[L_PAREN]",
1156
+ "name": null
1157
+ },
1158
+ {
1159
+ "type": "variable",
1160
+ "token": {
1161
+ "column": 35,
1162
+ "lexeme": "TOKENS",
1163
+ "line": 7,
1164
+ "type": 0
1165
+ },
1166
+ "identifier": "<TOKENS>",
1167
+ "name": "tokens"
1168
+ },
1169
+ {
1170
+ "type": "terminal",
1171
+ "token": {
1172
+ "column": 52,
1173
+ "lexeme": "R_PAREN",
1174
+ "line": 7,
1175
+ "type": 0
1176
+ },
1177
+ "identifier": "[R_PAREN]",
1178
+ "name": null
1179
+ },
1180
+ {
1181
+ "type": "terminal",
1182
+ "token": {
1183
+ "column": 62,
1184
+ "lexeme": "QUESTION_MARK",
1185
+ "line": 7,
1186
+ "type": 0
1187
+ },
1188
+ "identifier": "[QUESTION_MARK]",
1189
+ "name": "question_mark"
1190
+ }
1191
+ ]
1192
+ },
1193
+ {
1194
+ "lhs": {
1195
+ "column": 1,
1196
+ "lexeme": "VARIABLE",
1197
+ "line": 8,
1198
+ "type": 0
1199
+ },
1200
+ "identifier": "<VARIABLE>",
1201
+ "name": "variable",
1202
+ "originalProductionIndex": 7,
1203
+ "rhs": [
1204
+ {
1205
+ "type": "terminal",
1206
+ "token": {
1207
+ "column": 23,
1208
+ "lexeme": "L_ANGLE",
1209
+ "line": 8,
1210
+ "type": 0
1211
+ },
1212
+ "identifier": "[L_ANGLE]",
1213
+ "name": null
1214
+ },
1215
+ {
1216
+ "type": "variable",
1217
+ "token": {
1218
+ "column": 33,
1219
+ "lexeme": "INSIDE",
1220
+ "line": 8,
1221
+ "type": 0
1222
+ },
1223
+ "identifier": "<INSIDE>",
1224
+ "name": "inside"
1225
+ },
1226
+ {
1227
+ "type": "terminal",
1228
+ "token": {
1229
+ "column": 86,
1230
+ "lexeme": "R_ANGLE",
1231
+ "line": 8,
1232
+ "type": 0
1233
+ },
1234
+ "identifier": "[R_ANGLE]",
1235
+ "name": null
1236
+ }
1237
+ ]
1238
+ },
1239
+ {
1240
+ "lhs": {
1241
+ "column": 1,
1242
+ "lexeme": "VARIABLE",
1243
+ "line": 8,
1244
+ "type": 0
1245
+ },
1246
+ "identifier": "<VARIABLE>",
1247
+ "name": "variable",
1248
+ "originalProductionIndex": 7,
1249
+ "rhs": [
1250
+ {
1251
+ "type": "terminal",
1252
+ "token": {
1253
+ "column": 23,
1254
+ "lexeme": "L_ANGLE",
1255
+ "line": 8,
1256
+ "type": 0
1257
+ },
1258
+ "identifier": "[L_ANGLE]",
1259
+ "name": null
1260
+ },
1261
+ {
1262
+ "type": "variable",
1263
+ "token": {
1264
+ "column": 33,
1265
+ "lexeme": "INSIDE",
1266
+ "line": 8,
1267
+ "type": 0
1268
+ },
1269
+ "identifier": "<INSIDE>",
1270
+ "name": "inside"
1271
+ },
1272
+ {
1273
+ "type": "terminal",
1274
+ "token": {
1275
+ "column": 51,
1276
+ "lexeme": "COLON",
1277
+ "line": 8,
1278
+ "type": 0
1279
+ },
1280
+ "identifier": "[COLON]",
1281
+ "name": null
1282
+ },
1283
+ {
1284
+ "type": "terminal",
1285
+ "token": {
1286
+ "column": 59,
1287
+ "lexeme": "IDENTIFIER",
1288
+ "line": 8,
1289
+ "type": 0
1290
+ },
1291
+ "identifier": "[IDENTIFIER]",
1292
+ "name": "token_name"
1293
+ },
1294
+ {
1295
+ "type": "terminal",
1296
+ "token": {
1297
+ "column": 86,
1298
+ "lexeme": "R_ANGLE",
1299
+ "line": 8,
1300
+ "type": 0
1301
+ },
1302
+ "identifier": "[R_ANGLE]",
1303
+ "name": null
1304
+ }
1305
+ ]
1306
+ },
1307
+ {
1308
+ "lhs": {
1309
+ "column": 1,
1310
+ "lexeme": "TERMINAL",
1311
+ "line": 9,
1312
+ "type": 0
1313
+ },
1314
+ "identifier": "<TERMINAL>",
1315
+ "name": "terminal",
1316
+ "originalProductionIndex": 8,
1317
+ "rhs": [
1318
+ {
1319
+ "type": "terminal",
1320
+ "token": {
1321
+ "column": 23,
1322
+ "lexeme": "L_BRACKET",
1323
+ "line": 9,
1324
+ "type": 0
1325
+ },
1326
+ "identifier": "[L_BRACKET]",
1327
+ "name": null
1328
+ },
1329
+ {
1330
+ "type": "variable",
1331
+ "token": {
1332
+ "column": 35,
1333
+ "lexeme": "INSIDE",
1334
+ "line": 9,
1335
+ "type": 0
1336
+ },
1337
+ "identifier": "<INSIDE>",
1338
+ "name": "inside"
1339
+ },
1340
+ {
1341
+ "type": "terminal",
1342
+ "token": {
1343
+ "column": 88,
1344
+ "lexeme": "R_BRACKET",
1345
+ "line": 9,
1346
+ "type": 0
1347
+ },
1348
+ "identifier": "[R_BRACKET]",
1349
+ "name": null
1350
+ }
1351
+ ]
1352
+ },
1353
+ {
1354
+ "lhs": {
1355
+ "column": 1,
1356
+ "lexeme": "TERMINAL",
1357
+ "line": 9,
1358
+ "type": 0
1359
+ },
1360
+ "identifier": "<TERMINAL>",
1361
+ "name": "terminal",
1362
+ "originalProductionIndex": 8,
1363
+ "rhs": [
1364
+ {
1365
+ "type": "terminal",
1366
+ "token": {
1367
+ "column": 23,
1368
+ "lexeme": "L_BRACKET",
1369
+ "line": 9,
1370
+ "type": 0
1371
+ },
1372
+ "identifier": "[L_BRACKET]",
1373
+ "name": null
1374
+ },
1375
+ {
1376
+ "type": "variable",
1377
+ "token": {
1378
+ "column": 35,
1379
+ "lexeme": "INSIDE",
1380
+ "line": 9,
1381
+ "type": 0
1382
+ },
1383
+ "identifier": "<INSIDE>",
1384
+ "name": "inside"
1385
+ },
1386
+ {
1387
+ "type": "terminal",
1388
+ "token": {
1389
+ "column": 53,
1390
+ "lexeme": "COLON",
1391
+ "line": 9,
1392
+ "type": 0
1393
+ },
1394
+ "identifier": "[COLON]",
1395
+ "name": null
1396
+ },
1397
+ {
1398
+ "type": "terminal",
1399
+ "token": {
1400
+ "column": 61,
1401
+ "lexeme": "IDENTIFIER",
1402
+ "line": 9,
1403
+ "type": 0
1404
+ },
1405
+ "identifier": "[IDENTIFIER]",
1406
+ "name": "token_name"
1407
+ },
1408
+ {
1409
+ "type": "terminal",
1410
+ "token": {
1411
+ "column": 88,
1412
+ "lexeme": "R_BRACKET",
1413
+ "line": 9,
1414
+ "type": 0
1415
+ },
1416
+ "identifier": "[R_BRACKET]",
1417
+ "name": null
1418
+ }
1419
+ ]
1420
+ },
1421
+ {
1422
+ "lhs": {
1423
+ "column": 1,
1424
+ "lexeme": "INSIDE",
1425
+ "line": 10,
1426
+ "type": 0
1427
+ },
1428
+ "identifier": "<INSIDE>",
1429
+ "name": "inside",
1430
+ "originalProductionIndex": 9,
1431
+ "rhs": [
1432
+ {
1433
+ "type": "terminal",
1434
+ "token": {
1435
+ "column": 19,
1436
+ "lexeme": "IDENTIFIER",
1437
+ "line": 10,
1438
+ "type": 0
1439
+ },
1440
+ "identifier": "[IDENTIFIER]",
1441
+ "name": "identifier"
1442
+ }
1443
+ ]
1444
+ },
1445
+ {
1446
+ "lhs": {
1447
+ "column": 1,
1448
+ "lexeme": "INSIDE",
1449
+ "line": 10,
1450
+ "type": 0
1451
+ },
1452
+ "identifier": "<INSIDE>",
1453
+ "name": "inside",
1454
+ "originalProductionIndex": 9,
1455
+ "rhs": [
1456
+ {
1457
+ "type": "terminal",
1458
+ "token": {
1459
+ "column": 19,
1460
+ "lexeme": "IDENTIFIER",
1461
+ "line": 10,
1462
+ "type": 0
1463
+ },
1464
+ "identifier": "[IDENTIFIER]",
1465
+ "name": "identifier"
1466
+ },
1467
+ {
1468
+ "type": "terminal",
1469
+ "token": {
1470
+ "column": 45,
1471
+ "lexeme": "PIPE",
1472
+ "line": 10,
1473
+ "type": 0
1474
+ },
1475
+ "identifier": "[PIPE]",
1476
+ "name": null
1477
+ },
1478
+ {
1479
+ "type": "variable",
1480
+ "token": {
1481
+ "column": 52,
1482
+ "lexeme": "INSIDE",
1483
+ "line": 10,
1484
+ "type": 0
1485
+ },
1486
+ "identifier": "<INSIDE>",
1487
+ "name": "rest"
1488
+ }
1489
+ ]
1490
+ }
1491
+ ];
1492
+ exports.selfhosted = { states: exports.states, productions: exports.productions };
1493
+ //# sourceMappingURL=states.js.map