cariboujs 2.0.6 → 2.0.7
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.
- package/README.md +2 -1
- package/abnf/AbnfLexer.js +51 -50
- package/miniscript/MiniscriptLexer.js +199 -0
- package/miniscript/MiniscriptListener.js +180 -0
- package/miniscript/MiniscriptParser.js +2620 -0
- package/miniscript/MiniscriptVisitor.js +124 -0
- package/package.json +1 -1
- package/sql/plsql/PlSqlParser.js +6414 -6373
package/README.md
CHANGED
|
@@ -184,6 +184,7 @@ For instructions on how to use this library with JavaScript, please refer to the
|
|
|
184
184
|
| khubla.com Metamath grammar | `metamath` | `metamathLexer.js` | `metamathParser.js` | `metamathVisitor.js` | `metamathListener.js`|
|
|
185
185
|
| khubla.com metric grammar | `metric` | `metricLexer.js` | `metricParser.js` | `metricVisitor.js` | `metricListener.js`|
|
|
186
186
|
| khubla.com MicroC grammar | `microc` | `microcLexer.js` | `microcParser.js` | `microcVisitor.js` | `microcListener.js`|
|
|
187
|
+
| ANTLR Miniscript grammar | `miniscript` | `MiniscriptLexer.js` | `MiniscriptParser.js` | `MiniscriptVisitor.js` | `MiniscriptListener.js`|
|
|
187
188
|
| Modelica grammar | `modelica` | `modelicaLexer.js` | `modelicaParser.js` | `modelicaVisitor.js` | `modelicaListener.js`|
|
|
188
189
|
| Modula2 PIM4 grammar | `modula2pim4` | `m2pim4Lexer.js` | `m2pim4Parser.js` | `m2pim4Visitor.js` | `m2pim4Listener.js`|
|
|
189
190
|
| khubla.com Molecule grammar | `molecule` | `moleculeLexer.js` | `moleculeParser.js` | `moleculeVisitor.js` | `moleculeListener.js`|
|
|
@@ -342,4 +343,4 @@ For instructions on how to use this library with JavaScript, please refer to the
|
|
|
342
343
|
| yini grammar | `yini` | `YiniLexer.js` | `YiniParser.js` | `YiniParserVisitor.js` | `YiniParserListener.js`|
|
|
343
344
|
| Zig grammar | `zig` | `ZigLexer.js` | `ZigParser.js` | `ZigParserVisitor.js` | `ZigParserListener.js`|
|
|
344
345
|
|
|
345
|
-
Generated at: 2026-
|
|
346
|
+
Generated at: 2026-08-01T02:53:08.066Z
|
package/abnf/AbnfLexer.js
CHANGED
|
@@ -19,56 +19,57 @@ const serializedATN = [4,0,14,199,6,-1,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,
|
|
|
19
19
|
8,14,1,14,1,14,1,14,1,14,1,15,1,15,1,15,1,15,1,16,1,16,1,16,1,16,3,16,181,
|
|
20
20
|
8,16,1,16,1,16,5,16,185,8,16,10,16,12,16,188,9,16,1,16,1,16,1,17,1,17,1,
|
|
21
21
|
18,1,18,1,19,1,19,1,20,1,20,0,0,21,1,1,3,2,5,3,7,4,9,5,11,6,13,7,15,8,17,
|
|
22
|
-
0,19,0,21,0,23,9,25,10,27,11,29,12,31,13,33,14,35,0,37,0,39,0,41,0,1,0,
|
|
23
|
-
1,0,62,62,2,0,10,10,13,13,3,0,9,10,13,13,32,32,1,0,34,34,
|
|
24
|
-
3,0,48,57,65,70,97,102,221,0,1,1,0,0,0,0,3,1,0,0,0,0,5,
|
|
25
|
-
0,0,
|
|
26
|
-
0,0,0,0,
|
|
27
|
-
|
|
28
|
-
0,0,0,
|
|
29
|
-
0,0,0,
|
|
30
|
-
1,0,0,0,
|
|
31
|
-
5,61,0,0,44,2,1,0,0,0,45,46,5,47,0,0,46,4,1,0,0,0,47,48,5,
|
|
32
|
-
0,0,0,49,50,5,40,0,0,50,8,1,0,0,0,51,52,5,41,0,0,52,10,1,0,
|
|
33
|
-
0,0,54,12,1,0,0,0,55,56,5,93,0,0,56,14,1,0,0,0,57,61,5,37,
|
|
34
|
-
8,0,59,62,3,19,9,0,60,62,3,21,10,0,61,58,1,0,0,0,61,59,1,
|
|
35
|
-
0,0,62,16,1,0,0,0,63,65,5,98,0,0,64,66,3,37,18,0,65,64,1,
|
|
36
|
-
0,0,67,65,1,0,0,0,67,68,1,0,0,0,68,85,1,0,0,0,69,71,5,46,
|
|
37
|
-
18,0,71,70,1,0,0,0,72,73,1,0,0,0,73,71,1,0,0,0,73,74,1,0,
|
|
38
|
-
0,
|
|
39
|
-
79,81,5,45,0,0,80,82,3,37,18,0,81,80,1,0,0,0,82,83,1,0,0,
|
|
40
|
-
83,
|
|
41
|
-
18,1,0,0,0,87,89,5,100,0,0,88,90,3,39,19,0,89,88,1,0,0,
|
|
42
|
-
89,1,0,0,0,91,92,1,0,0,0,92,109,1,0,0,0,93,95,5,46,0,
|
|
43
|
-
94,
|
|
44
|
-
|
|
45
|
-
105,5,45,0,0,104,106,3,39,19,0,105,104,1,0,0,0,
|
|
46
|
-
|
|
47
|
-
110,1,0,0,0,110,20,1,0,0,0,111,113,5,120,0,0,112,
|
|
48
|
-
|
|
49
|
-
119,5,46,0,0,118,120,3,41,20,0,119,118,1,0,0,0,
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
1,0,0,0,
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
0,0,
|
|
59
|
-
|
|
60
|
-
0,
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
0,0,180,
|
|
67
|
-
|
|
68
|
-
0,0,
|
|
69
|
-
|
|
70
|
-
0,0,
|
|
71
|
-
109,115,121,125,131,133,139,148,150,156,
|
|
22
|
+
0,19,0,21,0,23,9,25,10,27,11,29,12,31,13,33,14,35,0,37,0,39,0,41,0,1,0,7,
|
|
23
|
+
1,0,62,62,2,0,45,45,95,95,2,0,10,10,13,13,3,0,9,10,13,13,32,32,1,0,34,34,
|
|
24
|
+
2,0,65,90,97,122,3,0,48,57,65,70,97,102,221,0,1,1,0,0,0,0,3,1,0,0,0,0,5,
|
|
25
|
+
1,0,0,0,0,7,1,0,0,0,0,9,1,0,0,0,0,11,1,0,0,0,0,13,1,0,0,0,0,15,1,0,0,0,0,
|
|
26
|
+
23,1,0,0,0,0,25,1,0,0,0,0,27,1,0,0,0,0,29,1,0,0,0,0,31,1,0,0,0,0,33,1,0,
|
|
27
|
+
0,0,1,43,1,0,0,0,3,45,1,0,0,0,5,47,1,0,0,0,7,49,1,0,0,0,9,51,1,0,0,0,11,
|
|
28
|
+
53,1,0,0,0,13,55,1,0,0,0,15,57,1,0,0,0,17,63,1,0,0,0,19,87,1,0,0,0,21,111,
|
|
29
|
+
1,0,0,0,23,135,1,0,0,0,25,144,1,0,0,0,27,154,1,0,0,0,29,158,1,0,0,0,31,172,
|
|
30
|
+
1,0,0,0,33,180,1,0,0,0,35,191,1,0,0,0,37,193,1,0,0,0,39,195,1,0,0,0,41,197,
|
|
31
|
+
1,0,0,0,43,44,5,61,0,0,44,2,1,0,0,0,45,46,5,47,0,0,46,4,1,0,0,0,47,48,5,
|
|
32
|
+
42,0,0,48,6,1,0,0,0,49,50,5,40,0,0,50,8,1,0,0,0,51,52,5,41,0,0,52,10,1,0,
|
|
33
|
+
0,0,53,54,5,91,0,0,54,12,1,0,0,0,55,56,5,93,0,0,56,14,1,0,0,0,57,61,5,37,
|
|
34
|
+
0,0,58,62,3,17,8,0,59,62,3,19,9,0,60,62,3,21,10,0,61,58,1,0,0,0,61,59,1,
|
|
35
|
+
0,0,0,61,60,1,0,0,0,62,16,1,0,0,0,63,65,5,98,0,0,64,66,3,37,18,0,65,64,1,
|
|
36
|
+
0,0,0,66,67,1,0,0,0,67,65,1,0,0,0,67,68,1,0,0,0,68,85,1,0,0,0,69,71,5,46,
|
|
37
|
+
0,0,70,72,3,37,18,0,71,70,1,0,0,0,72,73,1,0,0,0,73,71,1,0,0,0,73,74,1,0,
|
|
38
|
+
0,0,74,76,1,0,0,0,75,69,1,0,0,0,76,77,1,0,0,0,77,75,1,0,0,0,77,78,1,0,0,
|
|
39
|
+
0,78,86,1,0,0,0,79,81,5,45,0,0,80,82,3,37,18,0,81,80,1,0,0,0,82,83,1,0,0,
|
|
40
|
+
0,83,81,1,0,0,0,83,84,1,0,0,0,84,86,1,0,0,0,85,75,1,0,0,0,85,79,1,0,0,0,
|
|
41
|
+
85,86,1,0,0,0,86,18,1,0,0,0,87,89,5,100,0,0,88,90,3,39,19,0,89,88,1,0,0,
|
|
42
|
+
0,90,91,1,0,0,0,91,89,1,0,0,0,91,92,1,0,0,0,92,109,1,0,0,0,93,95,5,46,0,
|
|
43
|
+
0,94,96,3,39,19,0,95,94,1,0,0,0,96,97,1,0,0,0,97,95,1,0,0,0,97,98,1,0,0,
|
|
44
|
+
0,98,100,1,0,0,0,99,93,1,0,0,0,100,101,1,0,0,0,101,99,1,0,0,0,101,102,1,
|
|
45
|
+
0,0,0,102,110,1,0,0,0,103,105,5,45,0,0,104,106,3,39,19,0,105,104,1,0,0,0,
|
|
46
|
+
106,107,1,0,0,0,107,105,1,0,0,0,107,108,1,0,0,0,108,110,1,0,0,0,109,99,1,
|
|
47
|
+
0,0,0,109,103,1,0,0,0,109,110,1,0,0,0,110,20,1,0,0,0,111,113,5,120,0,0,112,
|
|
48
|
+
114,3,41,20,0,113,112,1,0,0,0,114,115,1,0,0,0,115,113,1,0,0,0,115,116,1,
|
|
49
|
+
0,0,0,116,133,1,0,0,0,117,119,5,46,0,0,118,120,3,41,20,0,119,118,1,0,0,0,
|
|
50
|
+
120,121,1,0,0,0,121,119,1,0,0,0,121,122,1,0,0,0,122,124,1,0,0,0,123,117,
|
|
51
|
+
1,0,0,0,124,125,1,0,0,0,125,123,1,0,0,0,125,126,1,0,0,0,126,134,1,0,0,0,
|
|
52
|
+
127,129,5,45,0,0,128,130,3,41,20,0,129,128,1,0,0,0,130,131,1,0,0,0,131,129,
|
|
53
|
+
1,0,0,0,131,132,1,0,0,0,132,134,1,0,0,0,133,123,1,0,0,0,133,127,1,0,0,0,
|
|
54
|
+
133,134,1,0,0,0,134,22,1,0,0,0,135,139,5,60,0,0,136,138,8,0,0,0,137,136,
|
|
55
|
+
1,0,0,0,138,141,1,0,0,0,139,137,1,0,0,0,139,140,1,0,0,0,140,142,1,0,0,0,
|
|
56
|
+
141,139,1,0,0,0,142,143,5,62,0,0,143,24,1,0,0,0,144,150,3,35,17,0,145,149,
|
|
57
|
+
3,35,17,0,146,149,3,39,19,0,147,149,7,1,0,0,148,145,1,0,0,0,148,146,1,0,
|
|
58
|
+
0,0,148,147,1,0,0,0,149,152,1,0,0,0,150,148,1,0,0,0,150,151,1,0,0,0,151,
|
|
59
|
+
26,1,0,0,0,152,150,1,0,0,0,153,155,2,48,57,0,154,153,1,0,0,0,155,156,1,0,
|
|
60
|
+
0,0,156,154,1,0,0,0,156,157,1,0,0,0,157,28,1,0,0,0,158,162,5,59,0,0,159,
|
|
61
|
+
161,8,2,0,0,160,159,1,0,0,0,161,164,1,0,0,0,162,160,1,0,0,0,162,163,1,0,
|
|
62
|
+
0,0,163,166,1,0,0,0,164,162,1,0,0,0,165,167,5,13,0,0,166,165,1,0,0,0,166,
|
|
63
|
+
167,1,0,0,0,167,168,1,0,0,0,168,169,5,10,0,0,169,170,1,0,0,0,170,171,6,14,
|
|
64
|
+
0,0,171,30,1,0,0,0,172,173,7,3,0,0,173,174,1,0,0,0,174,175,6,15,0,0,175,
|
|
65
|
+
32,1,0,0,0,176,177,5,37,0,0,177,181,5,115,0,0,178,179,5,37,0,0,179,181,5,
|
|
66
|
+
105,0,0,180,176,1,0,0,0,180,178,1,0,0,0,180,181,1,0,0,0,181,182,1,0,0,0,
|
|
67
|
+
182,186,5,34,0,0,183,185,8,4,0,0,184,183,1,0,0,0,185,188,1,0,0,0,186,184,
|
|
68
|
+
1,0,0,0,186,187,1,0,0,0,187,189,1,0,0,0,188,186,1,0,0,0,189,190,5,34,0,0,
|
|
69
|
+
190,34,1,0,0,0,191,192,7,5,0,0,192,36,1,0,0,0,193,194,2,48,49,0,194,38,1,
|
|
70
|
+
0,0,0,195,196,2,48,57,0,196,40,1,0,0,0,197,198,7,6,0,0,198,42,1,0,0,0,25,
|
|
71
|
+
0,61,67,73,77,83,85,91,97,101,107,109,115,121,125,131,133,139,148,150,156,
|
|
72
|
+
162,166,180,186,1,0,1,0];
|
|
72
73
|
|
|
73
74
|
|
|
74
75
|
const atn = new antlr4.atn.ATNDeserializer().deserialize(serializedATN);
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
// Generated from Miniscript.g4 by ANTLR 4.13.2
|
|
2
|
+
// jshint ignore: start
|
|
3
|
+
import antlr4 from 'antlr4';
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
const serializedATN = [4,0,35,365,6,-1,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,
|
|
7
|
+
4,7,4,2,5,7,5,2,6,7,6,2,7,7,7,2,8,7,8,2,9,7,9,2,10,7,10,2,11,7,11,2,12,7,
|
|
8
|
+
12,2,13,7,13,2,14,7,14,2,15,7,15,2,16,7,16,2,17,7,17,2,18,7,18,2,19,7,19,
|
|
9
|
+
2,20,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,2,
|
|
10
|
+
27,7,27,2,28,7,28,2,29,7,29,2,30,7,30,2,31,7,31,2,32,7,32,2,33,7,33,2,34,
|
|
11
|
+
7,34,2,35,7,35,2,36,7,36,2,37,7,37,2,38,7,38,2,39,7,39,2,40,7,40,2,41,7,
|
|
12
|
+
41,2,42,7,42,2,43,7,43,2,44,7,44,1,0,1,0,1,0,1,1,1,1,1,1,1,1,1,2,1,2,1,2,
|
|
13
|
+
1,2,1,2,1,3,1,3,1,3,1,3,1,3,1,4,1,4,1,4,1,4,1,4,1,4,1,5,1,5,1,5,1,5,1,5,
|
|
14
|
+
1,5,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,8,1,8,
|
|
15
|
+
1,8,1,8,1,8,1,8,1,8,1,8,1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,10,1,10,
|
|
16
|
+
1,10,1,10,1,10,1,10,1,11,1,11,1,11,1,11,1,11,1,11,1,11,1,11,1,12,1,12,1,
|
|
17
|
+
12,1,12,1,12,1,12,1,13,1,13,1,13,1,13,1,13,1,13,1,14,1,14,1,14,1,14,1,14,
|
|
18
|
+
1,14,1,15,1,15,1,15,1,15,1,15,1,16,1,16,1,16,1,16,1,16,1,17,1,17,1,17,1,
|
|
19
|
+
17,1,17,1,18,1,18,1,18,1,18,1,18,1,19,1,19,1,19,1,19,1,19,1,19,1,20,1,20,
|
|
20
|
+
1,20,1,20,1,20,1,20,1,20,1,21,1,21,1,22,1,22,1,23,1,23,1,24,4,24,226,8,24,
|
|
21
|
+
11,24,12,24,227,1,24,1,24,1,25,1,25,1,25,1,25,3,25,236,8,25,1,25,1,25,1,
|
|
22
|
+
26,1,26,1,26,1,26,1,26,1,26,1,26,1,26,1,26,1,26,1,26,1,26,1,27,1,27,1,27,
|
|
23
|
+
1,27,1,27,1,27,1,27,1,27,1,27,1,27,1,28,1,28,1,29,1,29,1,30,1,30,1,31,1,
|
|
24
|
+
31,1,32,1,32,5,32,272,8,32,10,32,12,32,275,9,32,1,32,1,32,4,32,279,8,32,
|
|
25
|
+
11,32,12,32,280,3,32,283,8,32,1,33,4,33,286,8,33,11,33,12,33,287,1,34,1,
|
|
26
|
+
34,1,34,1,35,1,35,1,35,1,35,1,35,1,35,1,35,1,35,1,35,1,35,1,36,1,36,1,36,
|
|
27
|
+
1,36,1,36,1,36,1,36,1,36,1,36,1,36,1,36,1,36,1,36,1,36,1,36,1,36,1,36,1,
|
|
28
|
+
36,1,36,1,36,1,36,1,36,1,36,1,36,1,36,1,36,1,36,1,36,1,36,1,36,1,36,1,36,
|
|
29
|
+
1,36,1,37,1,37,1,38,1,38,1,38,1,39,1,39,1,39,1,40,1,40,1,40,1,40,1,40,1,
|
|
30
|
+
40,1,40,1,40,1,40,1,41,1,41,1,42,1,42,1,43,1,43,1,44,4,44,360,8,44,11,44,
|
|
31
|
+
12,44,361,1,44,1,44,0,0,45,1,1,3,2,5,3,7,4,9,5,11,6,13,7,15,8,17,9,19,10,
|
|
32
|
+
21,11,23,12,25,13,27,14,29,15,31,16,33,17,35,18,37,19,39,20,41,21,43,22,
|
|
33
|
+
45,23,47,24,49,25,51,26,53,27,55,28,57,29,59,30,61,31,63,32,65,33,67,34,
|
|
34
|
+
69,0,71,0,73,0,75,0,77,0,79,0,81,0,83,0,85,0,87,0,89,35,1,0,7,6,0,97,97,
|
|
35
|
+
99,100,106,106,108,108,110,110,115,118,1,0,50,57,3,0,48,57,65,70,97,102,
|
|
36
|
+
1,0,48,57,1,0,49,57,9,0,39,39,42,42,45,57,59,60,62,62,65,91,93,93,95,95,
|
|
37
|
+
97,122,3,0,9,10,13,13,32,32,361,0,1,1,0,0,0,0,3,1,0,0,0,0,5,1,0,0,0,0,7,
|
|
38
|
+
1,0,0,0,0,9,1,0,0,0,0,11,1,0,0,0,0,13,1,0,0,0,0,15,1,0,0,0,0,17,1,0,0,0,
|
|
39
|
+
0,19,1,0,0,0,0,21,1,0,0,0,0,23,1,0,0,0,0,25,1,0,0,0,0,27,1,0,0,0,0,29,1,
|
|
40
|
+
0,0,0,0,31,1,0,0,0,0,33,1,0,0,0,0,35,1,0,0,0,0,37,1,0,0,0,0,39,1,0,0,0,0,
|
|
41
|
+
41,1,0,0,0,0,43,1,0,0,0,0,45,1,0,0,0,0,47,1,0,0,0,0,49,1,0,0,0,0,51,1,0,
|
|
42
|
+
0,0,0,53,1,0,0,0,0,55,1,0,0,0,0,57,1,0,0,0,0,59,1,0,0,0,0,61,1,0,0,0,0,63,
|
|
43
|
+
1,0,0,0,0,65,1,0,0,0,0,67,1,0,0,0,0,89,1,0,0,0,1,91,1,0,0,0,3,94,1,0,0,0,
|
|
44
|
+
5,98,1,0,0,0,7,103,1,0,0,0,9,108,1,0,0,0,11,114,1,0,0,0,13,120,1,0,0,0,15,
|
|
45
|
+
127,1,0,0,0,17,135,1,0,0,0,19,143,1,0,0,0,21,153,1,0,0,0,23,159,1,0,0,0,
|
|
46
|
+
25,167,1,0,0,0,27,173,1,0,0,0,29,179,1,0,0,0,31,185,1,0,0,0,33,190,1,0,0,
|
|
47
|
+
0,35,195,1,0,0,0,37,200,1,0,0,0,39,205,1,0,0,0,41,211,1,0,0,0,43,218,1,0,
|
|
48
|
+
0,0,45,220,1,0,0,0,47,222,1,0,0,0,49,225,1,0,0,0,51,235,1,0,0,0,53,239,1,
|
|
49
|
+
0,0,0,55,251,1,0,0,0,57,261,1,0,0,0,59,263,1,0,0,0,61,265,1,0,0,0,63,267,
|
|
50
|
+
1,0,0,0,65,282,1,0,0,0,67,285,1,0,0,0,69,289,1,0,0,0,71,292,1,0,0,0,73,302,
|
|
51
|
+
1,0,0,0,75,335,1,0,0,0,77,337,1,0,0,0,79,340,1,0,0,0,81,343,1,0,0,0,83,352,
|
|
52
|
+
1,0,0,0,85,354,1,0,0,0,87,356,1,0,0,0,89,359,1,0,0,0,91,92,5,112,0,0,92,
|
|
53
|
+
93,5,107,0,0,93,2,1,0,0,0,94,95,5,112,0,0,95,96,5,107,0,0,96,97,5,104,0,
|
|
54
|
+
0,97,4,1,0,0,0,98,99,5,112,0,0,99,100,5,107,0,0,100,101,5,95,0,0,101,102,
|
|
55
|
+
5,107,0,0,102,6,1,0,0,0,103,104,5,112,0,0,104,105,5,107,0,0,105,106,5,95,
|
|
56
|
+
0,0,106,107,5,104,0,0,107,8,1,0,0,0,108,109,5,111,0,0,109,110,5,108,0,0,
|
|
57
|
+
110,111,5,100,0,0,111,112,5,101,0,0,112,113,5,114,0,0,113,10,1,0,0,0,114,
|
|
58
|
+
115,5,97,0,0,115,116,5,102,0,0,116,117,5,116,0,0,117,118,5,101,0,0,118,119,
|
|
59
|
+
5,114,0,0,119,12,1,0,0,0,120,121,5,115,0,0,121,122,5,104,0,0,122,123,5,97,
|
|
60
|
+
0,0,123,124,5,50,0,0,124,125,5,53,0,0,125,126,5,54,0,0,126,14,1,0,0,0,127,
|
|
61
|
+
128,5,104,0,0,128,129,5,97,0,0,129,130,5,115,0,0,130,131,5,104,0,0,131,132,
|
|
62
|
+
5,50,0,0,132,133,5,53,0,0,133,134,5,54,0,0,134,16,1,0,0,0,135,136,5,104,
|
|
63
|
+
0,0,136,137,5,97,0,0,137,138,5,115,0,0,138,139,5,104,0,0,139,140,5,49,0,
|
|
64
|
+
0,140,141,5,54,0,0,141,142,5,48,0,0,142,18,1,0,0,0,143,144,5,114,0,0,144,
|
|
65
|
+
145,5,105,0,0,145,146,5,112,0,0,146,147,5,101,0,0,147,148,5,109,0,0,148,
|
|
66
|
+
149,5,100,0,0,149,150,5,49,0,0,150,151,5,54,0,0,151,152,5,48,0,0,152,20,
|
|
67
|
+
1,0,0,0,153,154,5,109,0,0,154,155,5,117,0,0,155,156,5,108,0,0,156,157,5,
|
|
68
|
+
116,0,0,157,158,5,105,0,0,158,22,1,0,0,0,159,160,5,109,0,0,160,161,5,117,
|
|
69
|
+
0,0,161,162,5,108,0,0,162,163,5,116,0,0,163,164,5,105,0,0,164,165,5,95,0,
|
|
70
|
+
0,165,166,5,97,0,0,166,24,1,0,0,0,167,168,5,97,0,0,168,169,5,110,0,0,169,
|
|
71
|
+
170,5,100,0,0,170,171,5,95,0,0,171,172,5,118,0,0,172,26,1,0,0,0,173,174,
|
|
72
|
+
5,97,0,0,174,175,5,110,0,0,175,176,5,100,0,0,176,177,5,95,0,0,177,178,5,
|
|
73
|
+
98,0,0,178,28,1,0,0,0,179,180,5,97,0,0,180,181,5,110,0,0,181,182,5,100,0,
|
|
74
|
+
0,182,183,5,95,0,0,183,184,5,110,0,0,184,30,1,0,0,0,185,186,5,111,0,0,186,
|
|
75
|
+
187,5,114,0,0,187,188,5,95,0,0,188,189,5,98,0,0,189,32,1,0,0,0,190,191,5,
|
|
76
|
+
111,0,0,191,192,5,114,0,0,192,193,5,95,0,0,193,194,5,99,0,0,194,34,1,0,0,
|
|
77
|
+
0,195,196,5,111,0,0,196,197,5,114,0,0,197,198,5,95,0,0,198,199,5,100,0,0,
|
|
78
|
+
199,36,1,0,0,0,200,201,5,111,0,0,201,202,5,114,0,0,202,203,5,95,0,0,203,
|
|
79
|
+
204,5,105,0,0,204,38,1,0,0,0,205,206,5,97,0,0,206,207,5,110,0,0,207,208,
|
|
80
|
+
5,100,0,0,208,209,5,111,0,0,209,210,5,114,0,0,210,40,1,0,0,0,211,212,5,116,
|
|
81
|
+
0,0,212,213,5,104,0,0,213,214,5,114,0,0,214,215,5,101,0,0,215,216,5,115,
|
|
82
|
+
0,0,216,217,5,104,0,0,217,42,1,0,0,0,218,219,5,40,0,0,219,44,1,0,0,0,220,
|
|
83
|
+
221,5,41,0,0,221,46,1,0,0,0,222,223,5,44,0,0,223,48,1,0,0,0,224,226,7,0,
|
|
84
|
+
0,0,225,224,1,0,0,0,226,227,1,0,0,0,227,225,1,0,0,0,227,228,1,0,0,0,228,
|
|
85
|
+
229,1,0,0,0,229,230,5,58,0,0,230,50,1,0,0,0,231,232,5,48,0,0,232,236,5,50,
|
|
86
|
+
0,0,233,234,5,48,0,0,234,236,5,51,0,0,235,231,1,0,0,0,235,233,1,0,0,0,236,
|
|
87
|
+
237,1,0,0,0,237,238,3,69,34,0,238,52,1,0,0,0,239,240,3,85,42,0,240,241,3,
|
|
88
|
+
77,38,0,241,242,3,79,39,0,242,243,3,81,40,0,243,244,3,83,41,0,244,245,3,
|
|
89
|
+
83,41,0,245,246,3,83,41,0,246,247,3,83,41,0,247,248,3,83,41,0,248,249,3,
|
|
90
|
+
83,41,0,249,250,3,83,41,0,250,54,1,0,0,0,251,252,3,85,42,0,252,253,3,77,
|
|
91
|
+
38,0,253,254,3,83,41,0,254,255,3,83,41,0,255,256,3,83,41,0,256,257,3,83,
|
|
92
|
+
41,0,257,258,3,83,41,0,258,259,3,83,41,0,259,260,3,83,41,0,260,56,1,0,0,
|
|
93
|
+
0,261,262,3,69,34,0,262,58,1,0,0,0,263,264,3,71,35,0,264,60,1,0,0,0,265,
|
|
94
|
+
266,5,48,0,0,266,62,1,0,0,0,267,268,5,49,0,0,268,64,1,0,0,0,269,273,7,1,
|
|
95
|
+
0,0,270,272,3,83,41,0,271,270,1,0,0,0,272,275,1,0,0,0,273,271,1,0,0,0,273,
|
|
96
|
+
274,1,0,0,0,274,283,1,0,0,0,275,273,1,0,0,0,276,278,5,49,0,0,277,279,3,83,
|
|
97
|
+
41,0,278,277,1,0,0,0,279,280,1,0,0,0,280,278,1,0,0,0,280,281,1,0,0,0,281,
|
|
98
|
+
283,1,0,0,0,282,269,1,0,0,0,282,276,1,0,0,0,283,66,1,0,0,0,284,286,3,87,
|
|
99
|
+
43,0,285,284,1,0,0,0,286,287,1,0,0,0,287,285,1,0,0,0,287,288,1,0,0,0,288,
|
|
100
|
+
68,1,0,0,0,289,290,3,73,36,0,290,291,3,73,36,0,291,70,1,0,0,0,292,293,3,
|
|
101
|
+
73,36,0,293,294,3,75,37,0,294,295,3,75,37,0,295,296,3,75,37,0,296,297,3,
|
|
102
|
+
75,37,0,297,298,3,75,37,0,298,299,3,75,37,0,299,300,3,75,37,0,300,301,3,
|
|
103
|
+
75,37,0,301,72,1,0,0,0,302,303,3,75,37,0,303,304,3,75,37,0,304,305,3,75,
|
|
104
|
+
37,0,305,306,3,75,37,0,306,307,3,75,37,0,307,308,3,75,37,0,308,309,3,75,
|
|
105
|
+
37,0,309,310,3,75,37,0,310,311,3,75,37,0,311,312,3,75,37,0,312,313,3,75,
|
|
106
|
+
37,0,313,314,3,75,37,0,314,315,3,75,37,0,315,316,3,75,37,0,316,317,3,75,
|
|
107
|
+
37,0,317,318,3,75,37,0,318,319,3,75,37,0,319,320,3,75,37,0,320,321,3,75,
|
|
108
|
+
37,0,321,322,3,75,37,0,322,323,3,75,37,0,323,324,3,75,37,0,324,325,3,75,
|
|
109
|
+
37,0,325,326,3,75,37,0,326,327,3,75,37,0,327,328,3,75,37,0,328,329,3,75,
|
|
110
|
+
37,0,329,330,3,75,37,0,330,331,3,75,37,0,331,332,3,75,37,0,332,333,3,75,
|
|
111
|
+
37,0,333,334,3,75,37,0,334,74,1,0,0,0,335,336,7,2,0,0,336,76,1,0,0,0,337,
|
|
112
|
+
338,3,79,39,0,338,339,3,79,39,0,339,78,1,0,0,0,340,341,3,81,40,0,341,342,
|
|
113
|
+
3,81,40,0,342,80,1,0,0,0,343,344,3,83,41,0,344,345,3,83,41,0,345,346,3,83,
|
|
114
|
+
41,0,346,347,3,83,41,0,347,348,3,83,41,0,348,349,3,83,41,0,349,350,3,83,
|
|
115
|
+
41,0,350,351,3,83,41,0,351,82,1,0,0,0,352,353,7,3,0,0,353,84,1,0,0,0,354,
|
|
116
|
+
355,7,4,0,0,355,86,1,0,0,0,356,357,7,5,0,0,357,88,1,0,0,0,358,360,7,6,0,
|
|
117
|
+
0,359,358,1,0,0,0,360,361,1,0,0,0,361,359,1,0,0,0,361,362,1,0,0,0,362,363,
|
|
118
|
+
1,0,0,0,363,364,6,44,0,0,364,90,1,0,0,0,8,0,227,235,273,280,282,287,361,
|
|
119
|
+
1,6,0,0];
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
const atn = new antlr4.atn.ATNDeserializer().deserialize(serializedATN);
|
|
123
|
+
|
|
124
|
+
const decisionsToDFA = atn.decisionToState.map( (ds, index) => new antlr4.dfa.DFA(ds, index) );
|
|
125
|
+
|
|
126
|
+
export default class MiniscriptLexer extends antlr4.Lexer {
|
|
127
|
+
|
|
128
|
+
static grammarFileName = "Miniscript.g4";
|
|
129
|
+
static channelNames = [ "DEFAULT_TOKEN_CHANNEL", "HIDDEN" ];
|
|
130
|
+
static modeNames = [ "DEFAULT_MODE" ];
|
|
131
|
+
static literalNames = [ null, "'pk'", "'pkh'", "'pk_k'", "'pk_h'", "'older'",
|
|
132
|
+
"'after'", "'sha256'", "'hash256'", "'hash160'",
|
|
133
|
+
"'ripemd160'", "'multi'", "'multi_a'", "'and_v'",
|
|
134
|
+
"'and_b'", "'and_n'", "'or_b'", "'or_c'", "'or_d'",
|
|
135
|
+
"'or_i'", "'andor'", "'thresh'", "'('", "')'",
|
|
136
|
+
"','", null, null, null, null, null, null, "'0'",
|
|
137
|
+
"'1'" ];
|
|
138
|
+
static symbolicNames = [ null, "PK", "PKH", "PK_K", "PK_H", "OLDER", "AFTER",
|
|
139
|
+
"SHA256", "HASH256", "HASH160", "RIPEMD160", "MULTI",
|
|
140
|
+
"MULTI_A", "AND_V", "AND_B", "AND_N", "OR_B",
|
|
141
|
+
"OR_C", "OR_D", "OR_I", "ANDOR", "THRESH", "LPAREN",
|
|
142
|
+
"RPAREN", "COMMA", "WRAPPER_SEQUENCE", "COMPRESSED_PUBLIC_KEY",
|
|
143
|
+
"DIGITS_64", "DIGITS_40", "HEX32_BYTES", "HEX20_BYTES",
|
|
144
|
+
"ZERO", "ONE", "POSITIVE_INTEGER", "KEY", "WS" ];
|
|
145
|
+
static ruleNames = [ "PK", "PKH", "PK_K", "PK_H", "OLDER", "AFTER", "SHA256",
|
|
146
|
+
"HASH256", "HASH160", "RIPEMD160", "MULTI", "MULTI_A",
|
|
147
|
+
"AND_V", "AND_B", "AND_N", "OR_B", "OR_C", "OR_D",
|
|
148
|
+
"OR_I", "ANDOR", "THRESH", "LPAREN", "RPAREN", "COMMA",
|
|
149
|
+
"WRAPPER_SEQUENCE", "COMPRESSED_PUBLIC_KEY", "DIGITS_64",
|
|
150
|
+
"DIGITS_40", "HEX32_BYTES", "HEX20_BYTES", "ZERO",
|
|
151
|
+
"ONE", "POSITIVE_INTEGER", "KEY", "HEX64", "HEX40",
|
|
152
|
+
"HEX32", "HEX", "DIGIT32", "DIGIT16", "DIGIT8", "DIGIT",
|
|
153
|
+
"NON_ZERO_DIGIT", "KEY_CHAR", "WS" ];
|
|
154
|
+
|
|
155
|
+
constructor(input) {
|
|
156
|
+
super(input)
|
|
157
|
+
this._interp = new antlr4.atn.LexerATNSimulator(this, atn, decisionsToDFA, new antlr4.atn.PredictionContextCache());
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
MiniscriptLexer.EOF = antlr4.Token.EOF;
|
|
162
|
+
MiniscriptLexer.PK = 1;
|
|
163
|
+
MiniscriptLexer.PKH = 2;
|
|
164
|
+
MiniscriptLexer.PK_K = 3;
|
|
165
|
+
MiniscriptLexer.PK_H = 4;
|
|
166
|
+
MiniscriptLexer.OLDER = 5;
|
|
167
|
+
MiniscriptLexer.AFTER = 6;
|
|
168
|
+
MiniscriptLexer.SHA256 = 7;
|
|
169
|
+
MiniscriptLexer.HASH256 = 8;
|
|
170
|
+
MiniscriptLexer.HASH160 = 9;
|
|
171
|
+
MiniscriptLexer.RIPEMD160 = 10;
|
|
172
|
+
MiniscriptLexer.MULTI = 11;
|
|
173
|
+
MiniscriptLexer.MULTI_A = 12;
|
|
174
|
+
MiniscriptLexer.AND_V = 13;
|
|
175
|
+
MiniscriptLexer.AND_B = 14;
|
|
176
|
+
MiniscriptLexer.AND_N = 15;
|
|
177
|
+
MiniscriptLexer.OR_B = 16;
|
|
178
|
+
MiniscriptLexer.OR_C = 17;
|
|
179
|
+
MiniscriptLexer.OR_D = 18;
|
|
180
|
+
MiniscriptLexer.OR_I = 19;
|
|
181
|
+
MiniscriptLexer.ANDOR = 20;
|
|
182
|
+
MiniscriptLexer.THRESH = 21;
|
|
183
|
+
MiniscriptLexer.LPAREN = 22;
|
|
184
|
+
MiniscriptLexer.RPAREN = 23;
|
|
185
|
+
MiniscriptLexer.COMMA = 24;
|
|
186
|
+
MiniscriptLexer.WRAPPER_SEQUENCE = 25;
|
|
187
|
+
MiniscriptLexer.COMPRESSED_PUBLIC_KEY = 26;
|
|
188
|
+
MiniscriptLexer.DIGITS_64 = 27;
|
|
189
|
+
MiniscriptLexer.DIGITS_40 = 28;
|
|
190
|
+
MiniscriptLexer.HEX32_BYTES = 29;
|
|
191
|
+
MiniscriptLexer.HEX20_BYTES = 30;
|
|
192
|
+
MiniscriptLexer.ZERO = 31;
|
|
193
|
+
MiniscriptLexer.ONE = 32;
|
|
194
|
+
MiniscriptLexer.POSITIVE_INTEGER = 33;
|
|
195
|
+
MiniscriptLexer.KEY = 34;
|
|
196
|
+
MiniscriptLexer.WS = 35;
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
// Generated from Miniscript.g4 by ANTLR 4.13.2
|
|
2
|
+
// jshint ignore: start
|
|
3
|
+
import antlr4 from 'antlr4';
|
|
4
|
+
|
|
5
|
+
// This class defines a complete listener for a parse tree produced by MiniscriptParser.
|
|
6
|
+
export default class MiniscriptListener extends antlr4.tree.ParseTreeListener {
|
|
7
|
+
|
|
8
|
+
// Enter a parse tree produced by MiniscriptParser#miniscript.
|
|
9
|
+
enterMiniscript(ctx) {
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
// Exit a parse tree produced by MiniscriptParser#miniscript.
|
|
13
|
+
exitMiniscript(ctx) {
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
// Enter a parse tree produced by MiniscriptParser#expression.
|
|
18
|
+
enterExpression(ctx) {
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
// Exit a parse tree produced by MiniscriptParser#expression.
|
|
22
|
+
exitExpression(ctx) {
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
// Enter a parse tree produced by MiniscriptParser#baseExpression.
|
|
27
|
+
enterBaseExpression(ctx) {
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
// Exit a parse tree produced by MiniscriptParser#baseExpression.
|
|
31
|
+
exitBaseExpression(ctx) {
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
// Enter a parse tree produced by MiniscriptParser#constant.
|
|
36
|
+
enterConstant(ctx) {
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
// Exit a parse tree produced by MiniscriptParser#constant.
|
|
40
|
+
exitConstant(ctx) {
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
// Enter a parse tree produced by MiniscriptParser#keyExpression.
|
|
45
|
+
enterKeyExpression(ctx) {
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
// Exit a parse tree produced by MiniscriptParser#keyExpression.
|
|
49
|
+
exitKeyExpression(ctx) {
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
// Enter a parse tree produced by MiniscriptParser#timeExpression.
|
|
54
|
+
enterTimeExpression(ctx) {
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
// Exit a parse tree produced by MiniscriptParser#timeExpression.
|
|
58
|
+
exitTimeExpression(ctx) {
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
// Enter a parse tree produced by MiniscriptParser#hashExpression.
|
|
63
|
+
enterHashExpression(ctx) {
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
// Exit a parse tree produced by MiniscriptParser#hashExpression.
|
|
67
|
+
exitHashExpression(ctx) {
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
// Enter a parse tree produced by MiniscriptParser#multisigExpression.
|
|
72
|
+
enterMultisigExpression(ctx) {
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
// Exit a parse tree produced by MiniscriptParser#multisigExpression.
|
|
76
|
+
exitMultisigExpression(ctx) {
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
// Enter a parse tree produced by MiniscriptParser#binaryExpression.
|
|
81
|
+
enterBinaryExpression(ctx) {
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
// Exit a parse tree produced by MiniscriptParser#binaryExpression.
|
|
85
|
+
exitBinaryExpression(ctx) {
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
// Enter a parse tree produced by MiniscriptParser#ternaryExpression.
|
|
90
|
+
enterTernaryExpression(ctx) {
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
// Exit a parse tree produced by MiniscriptParser#ternaryExpression.
|
|
94
|
+
exitTernaryExpression(ctx) {
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
// Enter a parse tree produced by MiniscriptParser#thresholdExpression.
|
|
99
|
+
enterThresholdExpression(ctx) {
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
// Exit a parse tree produced by MiniscriptParser#thresholdExpression.
|
|
103
|
+
exitThresholdExpression(ctx) {
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
// Enter a parse tree produced by MiniscriptParser#wrappedExpression.
|
|
108
|
+
enterWrappedExpression(ctx) {
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
// Exit a parse tree produced by MiniscriptParser#wrappedExpression.
|
|
112
|
+
exitWrappedExpression(ctx) {
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
// Enter a parse tree produced by MiniscriptParser#hash32.
|
|
117
|
+
enterHash32(ctx) {
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
// Exit a parse tree produced by MiniscriptParser#hash32.
|
|
121
|
+
exitHash32(ctx) {
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
// Enter a parse tree produced by MiniscriptParser#hash20.
|
|
126
|
+
enterHash20(ctx) {
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
// Exit a parse tree produced by MiniscriptParser#hash20.
|
|
130
|
+
exitHash20(ctx) {
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
// Enter a parse tree produced by MiniscriptParser#keyList.
|
|
135
|
+
enterKeyList(ctx) {
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
// Exit a parse tree produced by MiniscriptParser#keyList.
|
|
139
|
+
exitKeyList(ctx) {
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
// Enter a parse tree produced by MiniscriptParser#keyList1To20.
|
|
144
|
+
enterKeyList1To20(ctx) {
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
// Exit a parse tree produced by MiniscriptParser#keyList1To20.
|
|
148
|
+
exitKeyList1To20(ctx) {
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
// Enter a parse tree produced by MiniscriptParser#key.
|
|
153
|
+
enterKey(ctx) {
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
// Exit a parse tree produced by MiniscriptParser#key.
|
|
157
|
+
exitKey(ctx) {
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
// Enter a parse tree produced by MiniscriptParser#reservedKeyWord.
|
|
162
|
+
enterReservedKeyWord(ctx) {
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
// Exit a parse tree produced by MiniscriptParser#reservedKeyWord.
|
|
166
|
+
exitReservedKeyWord(ctx) {
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
// Enter a parse tree produced by MiniscriptParser#positiveInteger.
|
|
171
|
+
enterPositiveInteger(ctx) {
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
// Exit a parse tree produced by MiniscriptParser#positiveInteger.
|
|
175
|
+
exitPositiveInteger(ctx) {
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
}
|