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.
@@ -0,0 +1,2620 @@
1
+ // Generated from Miniscript.g4 by ANTLR 4.13.2
2
+ // jshint ignore: start
3
+ import antlr4 from 'antlr4';
4
+ import MiniscriptListener from './MiniscriptListener.js';
5
+ import MiniscriptVisitor from './MiniscriptVisitor.js';
6
+
7
+ const serializedATN = [4,1,35,312,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,
8
+ 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,12,
9
+ 2,13,7,13,2,14,7,14,2,15,7,15,2,16,7,16,2,17,7,17,2,18,7,18,1,0,1,0,1,0,
10
+ 1,1,1,1,3,1,44,8,1,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,3,2,54,8,2,1,3,1,3,1,
11
+ 4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,
12
+ 4,1,4,3,4,78,8,4,1,5,1,5,1,5,1,5,1,5,1,5,1,5,1,5,1,5,1,5,3,5,90,8,5,1,6,
13
+ 1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,
14
+ 1,6,3,6,112,8,6,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,
15
+ 3,7,128,8,7,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,
16
+ 1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,
17
+ 1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,3,8,179,
18
+ 8,8,1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,10,1,10,1,10,1,10,1,10,1,10,1,
19
+ 10,5,10,197,8,10,10,10,12,10,200,9,10,1,10,1,10,1,11,1,11,1,11,1,12,1,12,
20
+ 1,13,1,13,1,14,1,14,1,14,5,14,214,8,14,10,14,12,14,217,9,14,1,15,1,15,1,
21
+ 15,1,15,1,15,1,15,1,15,1,15,1,15,1,15,1,15,1,15,1,15,1,15,1,15,1,15,1,15,
22
+ 1,15,1,15,1,15,1,15,1,15,1,15,1,15,1,15,1,15,1,15,1,15,1,15,1,15,1,15,1,
23
+ 15,1,15,1,15,1,15,1,15,1,15,1,15,1,15,3,15,258,8,15,3,15,260,8,15,3,15,262,
24
+ 8,15,3,15,264,8,15,3,15,266,8,15,3,15,268,8,15,3,15,270,8,15,3,15,272,8,
25
+ 15,3,15,274,8,15,3,15,276,8,15,3,15,278,8,15,3,15,280,8,15,3,15,282,8,15,
26
+ 3,15,284,8,15,3,15,286,8,15,3,15,288,8,15,3,15,290,8,15,3,15,292,8,15,3,
27
+ 15,294,8,15,1,16,1,16,1,16,1,16,1,16,1,16,1,16,1,16,1,16,1,16,3,16,306,8,
28
+ 16,1,17,1,17,1,18,1,18,1,18,0,0,19,0,2,4,6,8,10,12,14,16,18,20,22,24,26,
29
+ 28,30,32,34,36,0,5,1,0,31,32,2,0,27,27,29,29,2,0,28,28,30,30,1,0,1,21,2,
30
+ 0,27,28,32,33,344,0,38,1,0,0,0,2,43,1,0,0,0,4,53,1,0,0,0,6,55,1,0,0,0,8,
31
+ 77,1,0,0,0,10,89,1,0,0,0,12,111,1,0,0,0,14,127,1,0,0,0,16,178,1,0,0,0,18,
32
+ 180,1,0,0,0,20,189,1,0,0,0,22,203,1,0,0,0,24,206,1,0,0,0,26,208,1,0,0,0,
33
+ 28,210,1,0,0,0,30,218,1,0,0,0,32,305,1,0,0,0,34,307,1,0,0,0,36,309,1,0,0,
34
+ 0,38,39,3,2,1,0,39,40,5,0,0,1,40,1,1,0,0,0,41,44,3,22,11,0,42,44,3,4,2,0,
35
+ 43,41,1,0,0,0,43,42,1,0,0,0,44,3,1,0,0,0,45,54,3,6,3,0,46,54,3,8,4,0,47,
36
+ 54,3,10,5,0,48,54,3,12,6,0,49,54,3,14,7,0,50,54,3,16,8,0,51,54,3,18,9,0,
37
+ 52,54,3,20,10,0,53,45,1,0,0,0,53,46,1,0,0,0,53,47,1,0,0,0,53,48,1,0,0,0,
38
+ 53,49,1,0,0,0,53,50,1,0,0,0,53,51,1,0,0,0,53,52,1,0,0,0,54,5,1,0,0,0,55,
39
+ 56,7,0,0,0,56,7,1,0,0,0,57,58,5,1,0,0,58,59,5,22,0,0,59,60,3,32,16,0,60,
40
+ 61,5,23,0,0,61,78,1,0,0,0,62,63,5,2,0,0,63,64,5,22,0,0,64,65,3,32,16,0,65,
41
+ 66,5,23,0,0,66,78,1,0,0,0,67,68,5,3,0,0,68,69,5,22,0,0,69,70,3,32,16,0,70,
42
+ 71,5,23,0,0,71,78,1,0,0,0,72,73,5,4,0,0,73,74,5,22,0,0,74,75,3,32,16,0,75,
43
+ 76,5,23,0,0,76,78,1,0,0,0,77,57,1,0,0,0,77,62,1,0,0,0,77,67,1,0,0,0,77,72,
44
+ 1,0,0,0,78,9,1,0,0,0,79,80,5,5,0,0,80,81,5,22,0,0,81,82,3,36,18,0,82,83,
45
+ 5,23,0,0,83,90,1,0,0,0,84,85,5,6,0,0,85,86,5,22,0,0,86,87,3,36,18,0,87,88,
46
+ 5,23,0,0,88,90,1,0,0,0,89,79,1,0,0,0,89,84,1,0,0,0,90,11,1,0,0,0,91,92,5,
47
+ 7,0,0,92,93,5,22,0,0,93,94,3,24,12,0,94,95,5,23,0,0,95,112,1,0,0,0,96,97,
48
+ 5,8,0,0,97,98,5,22,0,0,98,99,3,24,12,0,99,100,5,23,0,0,100,112,1,0,0,0,101,
49
+ 102,5,9,0,0,102,103,5,22,0,0,103,104,3,26,13,0,104,105,5,23,0,0,105,112,
50
+ 1,0,0,0,106,107,5,10,0,0,107,108,5,22,0,0,108,109,3,26,13,0,109,110,5,23,
51
+ 0,0,110,112,1,0,0,0,111,91,1,0,0,0,111,96,1,0,0,0,111,101,1,0,0,0,111,106,
52
+ 1,0,0,0,112,13,1,0,0,0,113,114,5,11,0,0,114,115,5,22,0,0,115,116,3,36,18,
53
+ 0,116,117,5,24,0,0,117,118,3,30,15,0,118,119,5,23,0,0,119,128,1,0,0,0,120,
54
+ 121,5,12,0,0,121,122,5,22,0,0,122,123,3,36,18,0,123,124,5,24,0,0,124,125,
55
+ 3,28,14,0,125,126,5,23,0,0,126,128,1,0,0,0,127,113,1,0,0,0,127,120,1,0,0,
56
+ 0,128,15,1,0,0,0,129,130,5,13,0,0,130,131,5,22,0,0,131,132,3,2,1,0,132,133,
57
+ 5,24,0,0,133,134,3,2,1,0,134,135,5,23,0,0,135,179,1,0,0,0,136,137,5,14,0,
58
+ 0,137,138,5,22,0,0,138,139,3,2,1,0,139,140,5,24,0,0,140,141,3,2,1,0,141,
59
+ 142,5,23,0,0,142,179,1,0,0,0,143,144,5,15,0,0,144,145,5,22,0,0,145,146,3,
60
+ 2,1,0,146,147,5,24,0,0,147,148,3,2,1,0,148,149,5,23,0,0,149,179,1,0,0,0,
61
+ 150,151,5,16,0,0,151,152,5,22,0,0,152,153,3,2,1,0,153,154,5,24,0,0,154,155,
62
+ 3,2,1,0,155,156,5,23,0,0,156,179,1,0,0,0,157,158,5,17,0,0,158,159,5,22,0,
63
+ 0,159,160,3,2,1,0,160,161,5,24,0,0,161,162,3,2,1,0,162,163,5,23,0,0,163,
64
+ 179,1,0,0,0,164,165,5,18,0,0,165,166,5,22,0,0,166,167,3,2,1,0,167,168,5,
65
+ 24,0,0,168,169,3,2,1,0,169,170,5,23,0,0,170,179,1,0,0,0,171,172,5,19,0,0,
66
+ 172,173,5,22,0,0,173,174,3,2,1,0,174,175,5,24,0,0,175,176,3,2,1,0,176,177,
67
+ 5,23,0,0,177,179,1,0,0,0,178,129,1,0,0,0,178,136,1,0,0,0,178,143,1,0,0,0,
68
+ 178,150,1,0,0,0,178,157,1,0,0,0,178,164,1,0,0,0,178,171,1,0,0,0,179,17,1,
69
+ 0,0,0,180,181,5,20,0,0,181,182,5,22,0,0,182,183,3,2,1,0,183,184,5,24,0,0,
70
+ 184,185,3,2,1,0,185,186,5,24,0,0,186,187,3,2,1,0,187,188,5,23,0,0,188,19,
71
+ 1,0,0,0,189,190,5,21,0,0,190,191,5,22,0,0,191,192,3,36,18,0,192,193,5,24,
72
+ 0,0,193,198,3,2,1,0,194,195,5,24,0,0,195,197,3,2,1,0,196,194,1,0,0,0,197,
73
+ 200,1,0,0,0,198,196,1,0,0,0,198,199,1,0,0,0,199,201,1,0,0,0,200,198,1,0,
74
+ 0,0,201,202,5,23,0,0,202,21,1,0,0,0,203,204,5,25,0,0,204,205,3,4,2,0,205,
75
+ 23,1,0,0,0,206,207,7,1,0,0,207,25,1,0,0,0,208,209,7,2,0,0,209,27,1,0,0,0,
76
+ 210,215,3,32,16,0,211,212,5,24,0,0,212,214,3,32,16,0,213,211,1,0,0,0,214,
77
+ 217,1,0,0,0,215,213,1,0,0,0,215,216,1,0,0,0,216,29,1,0,0,0,217,215,1,0,0,
78
+ 0,218,293,3,32,16,0,219,220,5,24,0,0,220,291,3,32,16,0,221,222,5,24,0,0,
79
+ 222,289,3,32,16,0,223,224,5,24,0,0,224,287,3,32,16,0,225,226,5,24,0,0,226,
80
+ 285,3,32,16,0,227,228,5,24,0,0,228,283,3,32,16,0,229,230,5,24,0,0,230,281,
81
+ 3,32,16,0,231,232,5,24,0,0,232,279,3,32,16,0,233,234,5,24,0,0,234,277,3,
82
+ 32,16,0,235,236,5,24,0,0,236,275,3,32,16,0,237,238,5,24,0,0,238,273,3,32,
83
+ 16,0,239,240,5,24,0,0,240,271,3,32,16,0,241,242,5,24,0,0,242,269,3,32,16,
84
+ 0,243,244,5,24,0,0,244,267,3,32,16,0,245,246,5,24,0,0,246,265,3,32,16,0,
85
+ 247,248,5,24,0,0,248,263,3,32,16,0,249,250,5,24,0,0,250,261,3,32,16,0,251,
86
+ 252,5,24,0,0,252,259,3,32,16,0,253,254,5,24,0,0,254,257,3,32,16,0,255,256,
87
+ 5,24,0,0,256,258,3,32,16,0,257,255,1,0,0,0,257,258,1,0,0,0,258,260,1,0,0,
88
+ 0,259,253,1,0,0,0,259,260,1,0,0,0,260,262,1,0,0,0,261,251,1,0,0,0,261,262,
89
+ 1,0,0,0,262,264,1,0,0,0,263,249,1,0,0,0,263,264,1,0,0,0,264,266,1,0,0,0,
90
+ 265,247,1,0,0,0,265,266,1,0,0,0,266,268,1,0,0,0,267,245,1,0,0,0,267,268,
91
+ 1,0,0,0,268,270,1,0,0,0,269,243,1,0,0,0,269,270,1,0,0,0,270,272,1,0,0,0,
92
+ 271,241,1,0,0,0,271,272,1,0,0,0,272,274,1,0,0,0,273,239,1,0,0,0,273,274,
93
+ 1,0,0,0,274,276,1,0,0,0,275,237,1,0,0,0,275,276,1,0,0,0,276,278,1,0,0,0,
94
+ 277,235,1,0,0,0,277,278,1,0,0,0,278,280,1,0,0,0,279,233,1,0,0,0,279,280,
95
+ 1,0,0,0,280,282,1,0,0,0,281,231,1,0,0,0,281,282,1,0,0,0,282,284,1,0,0,0,
96
+ 283,229,1,0,0,0,283,284,1,0,0,0,284,286,1,0,0,0,285,227,1,0,0,0,285,286,
97
+ 1,0,0,0,286,288,1,0,0,0,287,225,1,0,0,0,287,288,1,0,0,0,288,290,1,0,0,0,
98
+ 289,223,1,0,0,0,289,290,1,0,0,0,290,292,1,0,0,0,291,221,1,0,0,0,291,292,
99
+ 1,0,0,0,292,294,1,0,0,0,293,219,1,0,0,0,293,294,1,0,0,0,294,31,1,0,0,0,295,
100
+ 306,5,26,0,0,296,306,5,29,0,0,297,306,5,30,0,0,298,306,5,27,0,0,299,306,
101
+ 5,28,0,0,300,306,5,34,0,0,301,306,5,31,0,0,302,306,5,32,0,0,303,306,5,33,
102
+ 0,0,304,306,3,34,17,0,305,295,1,0,0,0,305,296,1,0,0,0,305,297,1,0,0,0,305,
103
+ 298,1,0,0,0,305,299,1,0,0,0,305,300,1,0,0,0,305,301,1,0,0,0,305,302,1,0,
104
+ 0,0,305,303,1,0,0,0,305,304,1,0,0,0,306,33,1,0,0,0,307,308,7,3,0,0,308,35,
105
+ 1,0,0,0,309,310,7,4,0,0,310,37,1,0,0,0,29,43,53,77,89,111,127,178,198,215,
106
+ 257,259,261,263,265,267,269,271,273,275,277,279,281,283,285,287,289,291,
107
+ 293,305];
108
+
109
+
110
+ const atn = new antlr4.atn.ATNDeserializer().deserialize(serializedATN);
111
+
112
+ const decisionsToDFA = atn.decisionToState.map( (ds, index) => new antlr4.dfa.DFA(ds, index) );
113
+
114
+ const sharedContextCache = new antlr4.atn.PredictionContextCache();
115
+
116
+ export default class MiniscriptParser extends antlr4.Parser {
117
+
118
+ static grammarFileName = "Miniscript.g4";
119
+ static literalNames = [ null, "'pk'", "'pkh'", "'pk_k'", "'pk_h'", "'older'",
120
+ "'after'", "'sha256'", "'hash256'", "'hash160'",
121
+ "'ripemd160'", "'multi'", "'multi_a'", "'and_v'",
122
+ "'and_b'", "'and_n'", "'or_b'", "'or_c'", "'or_d'",
123
+ "'or_i'", "'andor'", "'thresh'", "'('", "')'",
124
+ "','", null, null, null, null, null, null, "'0'",
125
+ "'1'" ];
126
+ static symbolicNames = [ null, "PK", "PKH", "PK_K", "PK_H", "OLDER",
127
+ "AFTER", "SHA256", "HASH256", "HASH160", "RIPEMD160",
128
+ "MULTI", "MULTI_A", "AND_V", "AND_B", "AND_N",
129
+ "OR_B", "OR_C", "OR_D", "OR_I", "ANDOR", "THRESH",
130
+ "LPAREN", "RPAREN", "COMMA", "WRAPPER_SEQUENCE",
131
+ "COMPRESSED_PUBLIC_KEY", "DIGITS_64", "DIGITS_40",
132
+ "HEX32_BYTES", "HEX20_BYTES", "ZERO", "ONE",
133
+ "POSITIVE_INTEGER", "KEY", "WS" ];
134
+ static ruleNames = [ "miniscript", "expression", "baseExpression", "constant",
135
+ "keyExpression", "timeExpression", "hashExpression",
136
+ "multisigExpression", "binaryExpression", "ternaryExpression",
137
+ "thresholdExpression", "wrappedExpression", "hash32",
138
+ "hash20", "keyList", "keyList1To20", "key", "reservedKeyWord",
139
+ "positiveInteger" ];
140
+
141
+ constructor(input) {
142
+ super(input);
143
+ this._interp = new antlr4.atn.ParserATNSimulator(this, atn, decisionsToDFA, sharedContextCache);
144
+ this.ruleNames = MiniscriptParser.ruleNames;
145
+ this.literalNames = MiniscriptParser.literalNames;
146
+ this.symbolicNames = MiniscriptParser.symbolicNames;
147
+ }
148
+
149
+
150
+
151
+ miniscript() {
152
+ let localctx = new MiniscriptContext(this, this._ctx, this.state);
153
+ this.enterRule(localctx, 0, MiniscriptParser.RULE_miniscript);
154
+ try {
155
+ this.enterOuterAlt(localctx, 1);
156
+ this.state = 38;
157
+ this.expression();
158
+ this.state = 39;
159
+ this.match(MiniscriptParser.EOF);
160
+ } catch (re) {
161
+ if(re instanceof antlr4.error.RecognitionException) {
162
+ localctx.exception = re;
163
+ this._errHandler.reportError(this, re);
164
+ this._errHandler.recover(this, re);
165
+ } else {
166
+ throw re;
167
+ }
168
+ } finally {
169
+ this.exitRule();
170
+ }
171
+ return localctx;
172
+ }
173
+
174
+
175
+
176
+ expression() {
177
+ let localctx = new ExpressionContext(this, this._ctx, this.state);
178
+ this.enterRule(localctx, 2, MiniscriptParser.RULE_expression);
179
+ try {
180
+ this.state = 43;
181
+ this._errHandler.sync(this);
182
+ switch(this._input.LA(1)) {
183
+ case 25:
184
+ this.enterOuterAlt(localctx, 1);
185
+ this.state = 41;
186
+ this.wrappedExpression();
187
+ break;
188
+ case 1:
189
+ case 2:
190
+ case 3:
191
+ case 4:
192
+ case 5:
193
+ case 6:
194
+ case 7:
195
+ case 8:
196
+ case 9:
197
+ case 10:
198
+ case 11:
199
+ case 12:
200
+ case 13:
201
+ case 14:
202
+ case 15:
203
+ case 16:
204
+ case 17:
205
+ case 18:
206
+ case 19:
207
+ case 20:
208
+ case 21:
209
+ case 31:
210
+ case 32:
211
+ this.enterOuterAlt(localctx, 2);
212
+ this.state = 42;
213
+ this.baseExpression();
214
+ break;
215
+ default:
216
+ throw new antlr4.error.NoViableAltException(this);
217
+ }
218
+ } catch (re) {
219
+ if(re instanceof antlr4.error.RecognitionException) {
220
+ localctx.exception = re;
221
+ this._errHandler.reportError(this, re);
222
+ this._errHandler.recover(this, re);
223
+ } else {
224
+ throw re;
225
+ }
226
+ } finally {
227
+ this.exitRule();
228
+ }
229
+ return localctx;
230
+ }
231
+
232
+
233
+
234
+ baseExpression() {
235
+ let localctx = new BaseExpressionContext(this, this._ctx, this.state);
236
+ this.enterRule(localctx, 4, MiniscriptParser.RULE_baseExpression);
237
+ try {
238
+ this.state = 53;
239
+ this._errHandler.sync(this);
240
+ switch(this._input.LA(1)) {
241
+ case 31:
242
+ case 32:
243
+ this.enterOuterAlt(localctx, 1);
244
+ this.state = 45;
245
+ this.constant();
246
+ break;
247
+ case 1:
248
+ case 2:
249
+ case 3:
250
+ case 4:
251
+ this.enterOuterAlt(localctx, 2);
252
+ this.state = 46;
253
+ this.keyExpression();
254
+ break;
255
+ case 5:
256
+ case 6:
257
+ this.enterOuterAlt(localctx, 3);
258
+ this.state = 47;
259
+ this.timeExpression();
260
+ break;
261
+ case 7:
262
+ case 8:
263
+ case 9:
264
+ case 10:
265
+ this.enterOuterAlt(localctx, 4);
266
+ this.state = 48;
267
+ this.hashExpression();
268
+ break;
269
+ case 11:
270
+ case 12:
271
+ this.enterOuterAlt(localctx, 5);
272
+ this.state = 49;
273
+ this.multisigExpression();
274
+ break;
275
+ case 13:
276
+ case 14:
277
+ case 15:
278
+ case 16:
279
+ case 17:
280
+ case 18:
281
+ case 19:
282
+ this.enterOuterAlt(localctx, 6);
283
+ this.state = 50;
284
+ this.binaryExpression();
285
+ break;
286
+ case 20:
287
+ this.enterOuterAlt(localctx, 7);
288
+ this.state = 51;
289
+ this.ternaryExpression();
290
+ break;
291
+ case 21:
292
+ this.enterOuterAlt(localctx, 8);
293
+ this.state = 52;
294
+ this.thresholdExpression();
295
+ break;
296
+ default:
297
+ throw new antlr4.error.NoViableAltException(this);
298
+ }
299
+ } catch (re) {
300
+ if(re instanceof antlr4.error.RecognitionException) {
301
+ localctx.exception = re;
302
+ this._errHandler.reportError(this, re);
303
+ this._errHandler.recover(this, re);
304
+ } else {
305
+ throw re;
306
+ }
307
+ } finally {
308
+ this.exitRule();
309
+ }
310
+ return localctx;
311
+ }
312
+
313
+
314
+
315
+ constant() {
316
+ let localctx = new ConstantContext(this, this._ctx, this.state);
317
+ this.enterRule(localctx, 6, MiniscriptParser.RULE_constant);
318
+ var _la = 0;
319
+ try {
320
+ this.enterOuterAlt(localctx, 1);
321
+ this.state = 55;
322
+ _la = this._input.LA(1);
323
+ if(!(_la===31 || _la===32)) {
324
+ this._errHandler.recoverInline(this);
325
+ }
326
+ else {
327
+ this._errHandler.reportMatch(this);
328
+ this.consume();
329
+ }
330
+ } catch (re) {
331
+ if(re instanceof antlr4.error.RecognitionException) {
332
+ localctx.exception = re;
333
+ this._errHandler.reportError(this, re);
334
+ this._errHandler.recover(this, re);
335
+ } else {
336
+ throw re;
337
+ }
338
+ } finally {
339
+ this.exitRule();
340
+ }
341
+ return localctx;
342
+ }
343
+
344
+
345
+
346
+ keyExpression() {
347
+ let localctx = new KeyExpressionContext(this, this._ctx, this.state);
348
+ this.enterRule(localctx, 8, MiniscriptParser.RULE_keyExpression);
349
+ try {
350
+ this.state = 77;
351
+ this._errHandler.sync(this);
352
+ switch(this._input.LA(1)) {
353
+ case 1:
354
+ this.enterOuterAlt(localctx, 1);
355
+ this.state = 57;
356
+ this.match(MiniscriptParser.PK);
357
+ this.state = 58;
358
+ this.match(MiniscriptParser.LPAREN);
359
+ this.state = 59;
360
+ this.key();
361
+ this.state = 60;
362
+ this.match(MiniscriptParser.RPAREN);
363
+ break;
364
+ case 2:
365
+ this.enterOuterAlt(localctx, 2);
366
+ this.state = 62;
367
+ this.match(MiniscriptParser.PKH);
368
+ this.state = 63;
369
+ this.match(MiniscriptParser.LPAREN);
370
+ this.state = 64;
371
+ this.key();
372
+ this.state = 65;
373
+ this.match(MiniscriptParser.RPAREN);
374
+ break;
375
+ case 3:
376
+ this.enterOuterAlt(localctx, 3);
377
+ this.state = 67;
378
+ this.match(MiniscriptParser.PK_K);
379
+ this.state = 68;
380
+ this.match(MiniscriptParser.LPAREN);
381
+ this.state = 69;
382
+ this.key();
383
+ this.state = 70;
384
+ this.match(MiniscriptParser.RPAREN);
385
+ break;
386
+ case 4:
387
+ this.enterOuterAlt(localctx, 4);
388
+ this.state = 72;
389
+ this.match(MiniscriptParser.PK_H);
390
+ this.state = 73;
391
+ this.match(MiniscriptParser.LPAREN);
392
+ this.state = 74;
393
+ this.key();
394
+ this.state = 75;
395
+ this.match(MiniscriptParser.RPAREN);
396
+ break;
397
+ default:
398
+ throw new antlr4.error.NoViableAltException(this);
399
+ }
400
+ } catch (re) {
401
+ if(re instanceof antlr4.error.RecognitionException) {
402
+ localctx.exception = re;
403
+ this._errHandler.reportError(this, re);
404
+ this._errHandler.recover(this, re);
405
+ } else {
406
+ throw re;
407
+ }
408
+ } finally {
409
+ this.exitRule();
410
+ }
411
+ return localctx;
412
+ }
413
+
414
+
415
+
416
+ timeExpression() {
417
+ let localctx = new TimeExpressionContext(this, this._ctx, this.state);
418
+ this.enterRule(localctx, 10, MiniscriptParser.RULE_timeExpression);
419
+ try {
420
+ this.state = 89;
421
+ this._errHandler.sync(this);
422
+ switch(this._input.LA(1)) {
423
+ case 5:
424
+ this.enterOuterAlt(localctx, 1);
425
+ this.state = 79;
426
+ this.match(MiniscriptParser.OLDER);
427
+ this.state = 80;
428
+ this.match(MiniscriptParser.LPAREN);
429
+ this.state = 81;
430
+ this.positiveInteger();
431
+ this.state = 82;
432
+ this.match(MiniscriptParser.RPAREN);
433
+ break;
434
+ case 6:
435
+ this.enterOuterAlt(localctx, 2);
436
+ this.state = 84;
437
+ this.match(MiniscriptParser.AFTER);
438
+ this.state = 85;
439
+ this.match(MiniscriptParser.LPAREN);
440
+ this.state = 86;
441
+ this.positiveInteger();
442
+ this.state = 87;
443
+ this.match(MiniscriptParser.RPAREN);
444
+ break;
445
+ default:
446
+ throw new antlr4.error.NoViableAltException(this);
447
+ }
448
+ } catch (re) {
449
+ if(re instanceof antlr4.error.RecognitionException) {
450
+ localctx.exception = re;
451
+ this._errHandler.reportError(this, re);
452
+ this._errHandler.recover(this, re);
453
+ } else {
454
+ throw re;
455
+ }
456
+ } finally {
457
+ this.exitRule();
458
+ }
459
+ return localctx;
460
+ }
461
+
462
+
463
+
464
+ hashExpression() {
465
+ let localctx = new HashExpressionContext(this, this._ctx, this.state);
466
+ this.enterRule(localctx, 12, MiniscriptParser.RULE_hashExpression);
467
+ try {
468
+ this.state = 111;
469
+ this._errHandler.sync(this);
470
+ switch(this._input.LA(1)) {
471
+ case 7:
472
+ this.enterOuterAlt(localctx, 1);
473
+ this.state = 91;
474
+ this.match(MiniscriptParser.SHA256);
475
+ this.state = 92;
476
+ this.match(MiniscriptParser.LPAREN);
477
+ this.state = 93;
478
+ this.hash32();
479
+ this.state = 94;
480
+ this.match(MiniscriptParser.RPAREN);
481
+ break;
482
+ case 8:
483
+ this.enterOuterAlt(localctx, 2);
484
+ this.state = 96;
485
+ this.match(MiniscriptParser.HASH256);
486
+ this.state = 97;
487
+ this.match(MiniscriptParser.LPAREN);
488
+ this.state = 98;
489
+ this.hash32();
490
+ this.state = 99;
491
+ this.match(MiniscriptParser.RPAREN);
492
+ break;
493
+ case 9:
494
+ this.enterOuterAlt(localctx, 3);
495
+ this.state = 101;
496
+ this.match(MiniscriptParser.HASH160);
497
+ this.state = 102;
498
+ this.match(MiniscriptParser.LPAREN);
499
+ this.state = 103;
500
+ this.hash20();
501
+ this.state = 104;
502
+ this.match(MiniscriptParser.RPAREN);
503
+ break;
504
+ case 10:
505
+ this.enterOuterAlt(localctx, 4);
506
+ this.state = 106;
507
+ this.match(MiniscriptParser.RIPEMD160);
508
+ this.state = 107;
509
+ this.match(MiniscriptParser.LPAREN);
510
+ this.state = 108;
511
+ this.hash20();
512
+ this.state = 109;
513
+ this.match(MiniscriptParser.RPAREN);
514
+ break;
515
+ default:
516
+ throw new antlr4.error.NoViableAltException(this);
517
+ }
518
+ } catch (re) {
519
+ if(re instanceof antlr4.error.RecognitionException) {
520
+ localctx.exception = re;
521
+ this._errHandler.reportError(this, re);
522
+ this._errHandler.recover(this, re);
523
+ } else {
524
+ throw re;
525
+ }
526
+ } finally {
527
+ this.exitRule();
528
+ }
529
+ return localctx;
530
+ }
531
+
532
+
533
+
534
+ multisigExpression() {
535
+ let localctx = new MultisigExpressionContext(this, this._ctx, this.state);
536
+ this.enterRule(localctx, 14, MiniscriptParser.RULE_multisigExpression);
537
+ try {
538
+ this.state = 127;
539
+ this._errHandler.sync(this);
540
+ switch(this._input.LA(1)) {
541
+ case 11:
542
+ this.enterOuterAlt(localctx, 1);
543
+ this.state = 113;
544
+ this.match(MiniscriptParser.MULTI);
545
+ this.state = 114;
546
+ this.match(MiniscriptParser.LPAREN);
547
+ this.state = 115;
548
+ this.positiveInteger();
549
+ this.state = 116;
550
+ this.match(MiniscriptParser.COMMA);
551
+ this.state = 117;
552
+ this.keyList1To20();
553
+ this.state = 118;
554
+ this.match(MiniscriptParser.RPAREN);
555
+ break;
556
+ case 12:
557
+ this.enterOuterAlt(localctx, 2);
558
+ this.state = 120;
559
+ this.match(MiniscriptParser.MULTI_A);
560
+ this.state = 121;
561
+ this.match(MiniscriptParser.LPAREN);
562
+ this.state = 122;
563
+ this.positiveInteger();
564
+ this.state = 123;
565
+ this.match(MiniscriptParser.COMMA);
566
+ this.state = 124;
567
+ this.keyList();
568
+ this.state = 125;
569
+ this.match(MiniscriptParser.RPAREN);
570
+ break;
571
+ default:
572
+ throw new antlr4.error.NoViableAltException(this);
573
+ }
574
+ } catch (re) {
575
+ if(re instanceof antlr4.error.RecognitionException) {
576
+ localctx.exception = re;
577
+ this._errHandler.reportError(this, re);
578
+ this._errHandler.recover(this, re);
579
+ } else {
580
+ throw re;
581
+ }
582
+ } finally {
583
+ this.exitRule();
584
+ }
585
+ return localctx;
586
+ }
587
+
588
+
589
+
590
+ binaryExpression() {
591
+ let localctx = new BinaryExpressionContext(this, this._ctx, this.state);
592
+ this.enterRule(localctx, 16, MiniscriptParser.RULE_binaryExpression);
593
+ try {
594
+ this.state = 178;
595
+ this._errHandler.sync(this);
596
+ switch(this._input.LA(1)) {
597
+ case 13:
598
+ this.enterOuterAlt(localctx, 1);
599
+ this.state = 129;
600
+ this.match(MiniscriptParser.AND_V);
601
+ this.state = 130;
602
+ this.match(MiniscriptParser.LPAREN);
603
+ this.state = 131;
604
+ this.expression();
605
+ this.state = 132;
606
+ this.match(MiniscriptParser.COMMA);
607
+ this.state = 133;
608
+ this.expression();
609
+ this.state = 134;
610
+ this.match(MiniscriptParser.RPAREN);
611
+ break;
612
+ case 14:
613
+ this.enterOuterAlt(localctx, 2);
614
+ this.state = 136;
615
+ this.match(MiniscriptParser.AND_B);
616
+ this.state = 137;
617
+ this.match(MiniscriptParser.LPAREN);
618
+ this.state = 138;
619
+ this.expression();
620
+ this.state = 139;
621
+ this.match(MiniscriptParser.COMMA);
622
+ this.state = 140;
623
+ this.expression();
624
+ this.state = 141;
625
+ this.match(MiniscriptParser.RPAREN);
626
+ break;
627
+ case 15:
628
+ this.enterOuterAlt(localctx, 3);
629
+ this.state = 143;
630
+ this.match(MiniscriptParser.AND_N);
631
+ this.state = 144;
632
+ this.match(MiniscriptParser.LPAREN);
633
+ this.state = 145;
634
+ this.expression();
635
+ this.state = 146;
636
+ this.match(MiniscriptParser.COMMA);
637
+ this.state = 147;
638
+ this.expression();
639
+ this.state = 148;
640
+ this.match(MiniscriptParser.RPAREN);
641
+ break;
642
+ case 16:
643
+ this.enterOuterAlt(localctx, 4);
644
+ this.state = 150;
645
+ this.match(MiniscriptParser.OR_B);
646
+ this.state = 151;
647
+ this.match(MiniscriptParser.LPAREN);
648
+ this.state = 152;
649
+ this.expression();
650
+ this.state = 153;
651
+ this.match(MiniscriptParser.COMMA);
652
+ this.state = 154;
653
+ this.expression();
654
+ this.state = 155;
655
+ this.match(MiniscriptParser.RPAREN);
656
+ break;
657
+ case 17:
658
+ this.enterOuterAlt(localctx, 5);
659
+ this.state = 157;
660
+ this.match(MiniscriptParser.OR_C);
661
+ this.state = 158;
662
+ this.match(MiniscriptParser.LPAREN);
663
+ this.state = 159;
664
+ this.expression();
665
+ this.state = 160;
666
+ this.match(MiniscriptParser.COMMA);
667
+ this.state = 161;
668
+ this.expression();
669
+ this.state = 162;
670
+ this.match(MiniscriptParser.RPAREN);
671
+ break;
672
+ case 18:
673
+ this.enterOuterAlt(localctx, 6);
674
+ this.state = 164;
675
+ this.match(MiniscriptParser.OR_D);
676
+ this.state = 165;
677
+ this.match(MiniscriptParser.LPAREN);
678
+ this.state = 166;
679
+ this.expression();
680
+ this.state = 167;
681
+ this.match(MiniscriptParser.COMMA);
682
+ this.state = 168;
683
+ this.expression();
684
+ this.state = 169;
685
+ this.match(MiniscriptParser.RPAREN);
686
+ break;
687
+ case 19:
688
+ this.enterOuterAlt(localctx, 7);
689
+ this.state = 171;
690
+ this.match(MiniscriptParser.OR_I);
691
+ this.state = 172;
692
+ this.match(MiniscriptParser.LPAREN);
693
+ this.state = 173;
694
+ this.expression();
695
+ this.state = 174;
696
+ this.match(MiniscriptParser.COMMA);
697
+ this.state = 175;
698
+ this.expression();
699
+ this.state = 176;
700
+ this.match(MiniscriptParser.RPAREN);
701
+ break;
702
+ default:
703
+ throw new antlr4.error.NoViableAltException(this);
704
+ }
705
+ } catch (re) {
706
+ if(re instanceof antlr4.error.RecognitionException) {
707
+ localctx.exception = re;
708
+ this._errHandler.reportError(this, re);
709
+ this._errHandler.recover(this, re);
710
+ } else {
711
+ throw re;
712
+ }
713
+ } finally {
714
+ this.exitRule();
715
+ }
716
+ return localctx;
717
+ }
718
+
719
+
720
+
721
+ ternaryExpression() {
722
+ let localctx = new TernaryExpressionContext(this, this._ctx, this.state);
723
+ this.enterRule(localctx, 18, MiniscriptParser.RULE_ternaryExpression);
724
+ try {
725
+ this.enterOuterAlt(localctx, 1);
726
+ this.state = 180;
727
+ this.match(MiniscriptParser.ANDOR);
728
+ this.state = 181;
729
+ this.match(MiniscriptParser.LPAREN);
730
+ this.state = 182;
731
+ this.expression();
732
+ this.state = 183;
733
+ this.match(MiniscriptParser.COMMA);
734
+ this.state = 184;
735
+ this.expression();
736
+ this.state = 185;
737
+ this.match(MiniscriptParser.COMMA);
738
+ this.state = 186;
739
+ this.expression();
740
+ this.state = 187;
741
+ this.match(MiniscriptParser.RPAREN);
742
+ } catch (re) {
743
+ if(re instanceof antlr4.error.RecognitionException) {
744
+ localctx.exception = re;
745
+ this._errHandler.reportError(this, re);
746
+ this._errHandler.recover(this, re);
747
+ } else {
748
+ throw re;
749
+ }
750
+ } finally {
751
+ this.exitRule();
752
+ }
753
+ return localctx;
754
+ }
755
+
756
+
757
+
758
+ thresholdExpression() {
759
+ let localctx = new ThresholdExpressionContext(this, this._ctx, this.state);
760
+ this.enterRule(localctx, 20, MiniscriptParser.RULE_thresholdExpression);
761
+ var _la = 0;
762
+ try {
763
+ this.enterOuterAlt(localctx, 1);
764
+ this.state = 189;
765
+ this.match(MiniscriptParser.THRESH);
766
+ this.state = 190;
767
+ this.match(MiniscriptParser.LPAREN);
768
+ this.state = 191;
769
+ this.positiveInteger();
770
+ this.state = 192;
771
+ this.match(MiniscriptParser.COMMA);
772
+ this.state = 193;
773
+ this.expression();
774
+ this.state = 198;
775
+ this._errHandler.sync(this);
776
+ _la = this._input.LA(1);
777
+ while(_la===24) {
778
+ this.state = 194;
779
+ this.match(MiniscriptParser.COMMA);
780
+ this.state = 195;
781
+ this.expression();
782
+ this.state = 200;
783
+ this._errHandler.sync(this);
784
+ _la = this._input.LA(1);
785
+ }
786
+ this.state = 201;
787
+ this.match(MiniscriptParser.RPAREN);
788
+ } catch (re) {
789
+ if(re instanceof antlr4.error.RecognitionException) {
790
+ localctx.exception = re;
791
+ this._errHandler.reportError(this, re);
792
+ this._errHandler.recover(this, re);
793
+ } else {
794
+ throw re;
795
+ }
796
+ } finally {
797
+ this.exitRule();
798
+ }
799
+ return localctx;
800
+ }
801
+
802
+
803
+
804
+ wrappedExpression() {
805
+ let localctx = new WrappedExpressionContext(this, this._ctx, this.state);
806
+ this.enterRule(localctx, 22, MiniscriptParser.RULE_wrappedExpression);
807
+ try {
808
+ this.enterOuterAlt(localctx, 1);
809
+ this.state = 203;
810
+ this.match(MiniscriptParser.WRAPPER_SEQUENCE);
811
+ this.state = 204;
812
+ this.baseExpression();
813
+ } catch (re) {
814
+ if(re instanceof antlr4.error.RecognitionException) {
815
+ localctx.exception = re;
816
+ this._errHandler.reportError(this, re);
817
+ this._errHandler.recover(this, re);
818
+ } else {
819
+ throw re;
820
+ }
821
+ } finally {
822
+ this.exitRule();
823
+ }
824
+ return localctx;
825
+ }
826
+
827
+
828
+
829
+ hash32() {
830
+ let localctx = new Hash32Context(this, this._ctx, this.state);
831
+ this.enterRule(localctx, 24, MiniscriptParser.RULE_hash32);
832
+ var _la = 0;
833
+ try {
834
+ this.enterOuterAlt(localctx, 1);
835
+ this.state = 206;
836
+ _la = this._input.LA(1);
837
+ if(!(_la===27 || _la===29)) {
838
+ this._errHandler.recoverInline(this);
839
+ }
840
+ else {
841
+ this._errHandler.reportMatch(this);
842
+ this.consume();
843
+ }
844
+ } catch (re) {
845
+ if(re instanceof antlr4.error.RecognitionException) {
846
+ localctx.exception = re;
847
+ this._errHandler.reportError(this, re);
848
+ this._errHandler.recover(this, re);
849
+ } else {
850
+ throw re;
851
+ }
852
+ } finally {
853
+ this.exitRule();
854
+ }
855
+ return localctx;
856
+ }
857
+
858
+
859
+
860
+ hash20() {
861
+ let localctx = new Hash20Context(this, this._ctx, this.state);
862
+ this.enterRule(localctx, 26, MiniscriptParser.RULE_hash20);
863
+ var _la = 0;
864
+ try {
865
+ this.enterOuterAlt(localctx, 1);
866
+ this.state = 208;
867
+ _la = this._input.LA(1);
868
+ if(!(_la===28 || _la===30)) {
869
+ this._errHandler.recoverInline(this);
870
+ }
871
+ else {
872
+ this._errHandler.reportMatch(this);
873
+ this.consume();
874
+ }
875
+ } catch (re) {
876
+ if(re instanceof antlr4.error.RecognitionException) {
877
+ localctx.exception = re;
878
+ this._errHandler.reportError(this, re);
879
+ this._errHandler.recover(this, re);
880
+ } else {
881
+ throw re;
882
+ }
883
+ } finally {
884
+ this.exitRule();
885
+ }
886
+ return localctx;
887
+ }
888
+
889
+
890
+
891
+ keyList() {
892
+ let localctx = new KeyListContext(this, this._ctx, this.state);
893
+ this.enterRule(localctx, 28, MiniscriptParser.RULE_keyList);
894
+ var _la = 0;
895
+ try {
896
+ this.enterOuterAlt(localctx, 1);
897
+ this.state = 210;
898
+ this.key();
899
+ this.state = 215;
900
+ this._errHandler.sync(this);
901
+ _la = this._input.LA(1);
902
+ while(_la===24) {
903
+ this.state = 211;
904
+ this.match(MiniscriptParser.COMMA);
905
+ this.state = 212;
906
+ this.key();
907
+ this.state = 217;
908
+ this._errHandler.sync(this);
909
+ _la = this._input.LA(1);
910
+ }
911
+ } catch (re) {
912
+ if(re instanceof antlr4.error.RecognitionException) {
913
+ localctx.exception = re;
914
+ this._errHandler.reportError(this, re);
915
+ this._errHandler.recover(this, re);
916
+ } else {
917
+ throw re;
918
+ }
919
+ } finally {
920
+ this.exitRule();
921
+ }
922
+ return localctx;
923
+ }
924
+
925
+
926
+
927
+ keyList1To20() {
928
+ let localctx = new KeyList1To20Context(this, this._ctx, this.state);
929
+ this.enterRule(localctx, 30, MiniscriptParser.RULE_keyList1To20);
930
+ var _la = 0;
931
+ try {
932
+ this.enterOuterAlt(localctx, 1);
933
+ this.state = 218;
934
+ this.key();
935
+ this.state = 293;
936
+ this._errHandler.sync(this);
937
+ _la = this._input.LA(1);
938
+ if(_la===24) {
939
+ this.state = 219;
940
+ this.match(MiniscriptParser.COMMA);
941
+ this.state = 220;
942
+ this.key();
943
+ this.state = 291;
944
+ this._errHandler.sync(this);
945
+ _la = this._input.LA(1);
946
+ if(_la===24) {
947
+ this.state = 221;
948
+ this.match(MiniscriptParser.COMMA);
949
+ this.state = 222;
950
+ this.key();
951
+ this.state = 289;
952
+ this._errHandler.sync(this);
953
+ _la = this._input.LA(1);
954
+ if(_la===24) {
955
+ this.state = 223;
956
+ this.match(MiniscriptParser.COMMA);
957
+ this.state = 224;
958
+ this.key();
959
+ this.state = 287;
960
+ this._errHandler.sync(this);
961
+ _la = this._input.LA(1);
962
+ if(_la===24) {
963
+ this.state = 225;
964
+ this.match(MiniscriptParser.COMMA);
965
+ this.state = 226;
966
+ this.key();
967
+ this.state = 285;
968
+ this._errHandler.sync(this);
969
+ _la = this._input.LA(1);
970
+ if(_la===24) {
971
+ this.state = 227;
972
+ this.match(MiniscriptParser.COMMA);
973
+ this.state = 228;
974
+ this.key();
975
+ this.state = 283;
976
+ this._errHandler.sync(this);
977
+ _la = this._input.LA(1);
978
+ if(_la===24) {
979
+ this.state = 229;
980
+ this.match(MiniscriptParser.COMMA);
981
+ this.state = 230;
982
+ this.key();
983
+ this.state = 281;
984
+ this._errHandler.sync(this);
985
+ _la = this._input.LA(1);
986
+ if(_la===24) {
987
+ this.state = 231;
988
+ this.match(MiniscriptParser.COMMA);
989
+ this.state = 232;
990
+ this.key();
991
+ this.state = 279;
992
+ this._errHandler.sync(this);
993
+ _la = this._input.LA(1);
994
+ if(_la===24) {
995
+ this.state = 233;
996
+ this.match(MiniscriptParser.COMMA);
997
+ this.state = 234;
998
+ this.key();
999
+ this.state = 277;
1000
+ this._errHandler.sync(this);
1001
+ _la = this._input.LA(1);
1002
+ if(_la===24) {
1003
+ this.state = 235;
1004
+ this.match(MiniscriptParser.COMMA);
1005
+ this.state = 236;
1006
+ this.key();
1007
+ this.state = 275;
1008
+ this._errHandler.sync(this);
1009
+ _la = this._input.LA(1);
1010
+ if(_la===24) {
1011
+ this.state = 237;
1012
+ this.match(MiniscriptParser.COMMA);
1013
+ this.state = 238;
1014
+ this.key();
1015
+ this.state = 273;
1016
+ this._errHandler.sync(this);
1017
+ _la = this._input.LA(1);
1018
+ if(_la===24) {
1019
+ this.state = 239;
1020
+ this.match(MiniscriptParser.COMMA);
1021
+ this.state = 240;
1022
+ this.key();
1023
+ this.state = 271;
1024
+ this._errHandler.sync(this);
1025
+ _la = this._input.LA(1);
1026
+ if(_la===24) {
1027
+ this.state = 241;
1028
+ this.match(MiniscriptParser.COMMA);
1029
+ this.state = 242;
1030
+ this.key();
1031
+ this.state = 269;
1032
+ this._errHandler.sync(this);
1033
+ _la = this._input.LA(1);
1034
+ if(_la===24) {
1035
+ this.state = 243;
1036
+ this.match(MiniscriptParser.COMMA);
1037
+ this.state = 244;
1038
+ this.key();
1039
+ this.state = 267;
1040
+ this._errHandler.sync(this);
1041
+ _la = this._input.LA(1);
1042
+ if(_la===24) {
1043
+ this.state = 245;
1044
+ this.match(MiniscriptParser.COMMA);
1045
+ this.state = 246;
1046
+ this.key();
1047
+ this.state = 265;
1048
+ this._errHandler.sync(this);
1049
+ _la = this._input.LA(1);
1050
+ if(_la===24) {
1051
+ this.state = 247;
1052
+ this.match(MiniscriptParser.COMMA);
1053
+ this.state = 248;
1054
+ this.key();
1055
+ this.state = 263;
1056
+ this._errHandler.sync(this);
1057
+ _la = this._input.LA(1);
1058
+ if(_la===24) {
1059
+ this.state = 249;
1060
+ this.match(MiniscriptParser.COMMA);
1061
+ this.state = 250;
1062
+ this.key();
1063
+ this.state = 261;
1064
+ this._errHandler.sync(this);
1065
+ _la = this._input.LA(1);
1066
+ if(_la===24) {
1067
+ this.state = 251;
1068
+ this.match(MiniscriptParser.COMMA);
1069
+ this.state = 252;
1070
+ this.key();
1071
+ this.state = 259;
1072
+ this._errHandler.sync(this);
1073
+ _la = this._input.LA(1);
1074
+ if(_la===24) {
1075
+ this.state = 253;
1076
+ this.match(MiniscriptParser.COMMA);
1077
+ this.state = 254;
1078
+ this.key();
1079
+ this.state = 257;
1080
+ this._errHandler.sync(this);
1081
+ _la = this._input.LA(1);
1082
+ if(_la===24) {
1083
+ this.state = 255;
1084
+ this.match(MiniscriptParser.COMMA);
1085
+ this.state = 256;
1086
+ this.key();
1087
+ }
1088
+
1089
+ }
1090
+
1091
+ }
1092
+
1093
+ }
1094
+
1095
+ }
1096
+
1097
+ }
1098
+
1099
+ }
1100
+
1101
+ }
1102
+
1103
+ }
1104
+
1105
+ }
1106
+
1107
+ }
1108
+
1109
+ }
1110
+
1111
+ }
1112
+
1113
+ }
1114
+
1115
+ }
1116
+
1117
+ }
1118
+
1119
+ }
1120
+
1121
+ }
1122
+
1123
+ }
1124
+
1125
+ } catch (re) {
1126
+ if(re instanceof antlr4.error.RecognitionException) {
1127
+ localctx.exception = re;
1128
+ this._errHandler.reportError(this, re);
1129
+ this._errHandler.recover(this, re);
1130
+ } else {
1131
+ throw re;
1132
+ }
1133
+ } finally {
1134
+ this.exitRule();
1135
+ }
1136
+ return localctx;
1137
+ }
1138
+
1139
+
1140
+
1141
+ key() {
1142
+ let localctx = new KeyContext(this, this._ctx, this.state);
1143
+ this.enterRule(localctx, 32, MiniscriptParser.RULE_key);
1144
+ try {
1145
+ this.state = 305;
1146
+ this._errHandler.sync(this);
1147
+ switch(this._input.LA(1)) {
1148
+ case 26:
1149
+ this.enterOuterAlt(localctx, 1);
1150
+ this.state = 295;
1151
+ this.match(MiniscriptParser.COMPRESSED_PUBLIC_KEY);
1152
+ break;
1153
+ case 29:
1154
+ this.enterOuterAlt(localctx, 2);
1155
+ this.state = 296;
1156
+ this.match(MiniscriptParser.HEX32_BYTES);
1157
+ break;
1158
+ case 30:
1159
+ this.enterOuterAlt(localctx, 3);
1160
+ this.state = 297;
1161
+ this.match(MiniscriptParser.HEX20_BYTES);
1162
+ break;
1163
+ case 27:
1164
+ this.enterOuterAlt(localctx, 4);
1165
+ this.state = 298;
1166
+ this.match(MiniscriptParser.DIGITS_64);
1167
+ break;
1168
+ case 28:
1169
+ this.enterOuterAlt(localctx, 5);
1170
+ this.state = 299;
1171
+ this.match(MiniscriptParser.DIGITS_40);
1172
+ break;
1173
+ case 34:
1174
+ this.enterOuterAlt(localctx, 6);
1175
+ this.state = 300;
1176
+ this.match(MiniscriptParser.KEY);
1177
+ break;
1178
+ case 31:
1179
+ this.enterOuterAlt(localctx, 7);
1180
+ this.state = 301;
1181
+ this.match(MiniscriptParser.ZERO);
1182
+ break;
1183
+ case 32:
1184
+ this.enterOuterAlt(localctx, 8);
1185
+ this.state = 302;
1186
+ this.match(MiniscriptParser.ONE);
1187
+ break;
1188
+ case 33:
1189
+ this.enterOuterAlt(localctx, 9);
1190
+ this.state = 303;
1191
+ this.match(MiniscriptParser.POSITIVE_INTEGER);
1192
+ break;
1193
+ case 1:
1194
+ case 2:
1195
+ case 3:
1196
+ case 4:
1197
+ case 5:
1198
+ case 6:
1199
+ case 7:
1200
+ case 8:
1201
+ case 9:
1202
+ case 10:
1203
+ case 11:
1204
+ case 12:
1205
+ case 13:
1206
+ case 14:
1207
+ case 15:
1208
+ case 16:
1209
+ case 17:
1210
+ case 18:
1211
+ case 19:
1212
+ case 20:
1213
+ case 21:
1214
+ this.enterOuterAlt(localctx, 10);
1215
+ this.state = 304;
1216
+ this.reservedKeyWord();
1217
+ break;
1218
+ default:
1219
+ throw new antlr4.error.NoViableAltException(this);
1220
+ }
1221
+ } catch (re) {
1222
+ if(re instanceof antlr4.error.RecognitionException) {
1223
+ localctx.exception = re;
1224
+ this._errHandler.reportError(this, re);
1225
+ this._errHandler.recover(this, re);
1226
+ } else {
1227
+ throw re;
1228
+ }
1229
+ } finally {
1230
+ this.exitRule();
1231
+ }
1232
+ return localctx;
1233
+ }
1234
+
1235
+
1236
+
1237
+ reservedKeyWord() {
1238
+ let localctx = new ReservedKeyWordContext(this, this._ctx, this.state);
1239
+ this.enterRule(localctx, 34, MiniscriptParser.RULE_reservedKeyWord);
1240
+ var _la = 0;
1241
+ try {
1242
+ this.enterOuterAlt(localctx, 1);
1243
+ this.state = 307;
1244
+ _la = this._input.LA(1);
1245
+ if(!((((_la) & ~0x1f) === 0 && ((1 << _la) & 4194302) !== 0))) {
1246
+ this._errHandler.recoverInline(this);
1247
+ }
1248
+ else {
1249
+ this._errHandler.reportMatch(this);
1250
+ this.consume();
1251
+ }
1252
+ } catch (re) {
1253
+ if(re instanceof antlr4.error.RecognitionException) {
1254
+ localctx.exception = re;
1255
+ this._errHandler.reportError(this, re);
1256
+ this._errHandler.recover(this, re);
1257
+ } else {
1258
+ throw re;
1259
+ }
1260
+ } finally {
1261
+ this.exitRule();
1262
+ }
1263
+ return localctx;
1264
+ }
1265
+
1266
+
1267
+
1268
+ positiveInteger() {
1269
+ let localctx = new PositiveIntegerContext(this, this._ctx, this.state);
1270
+ this.enterRule(localctx, 36, MiniscriptParser.RULE_positiveInteger);
1271
+ var _la = 0;
1272
+ try {
1273
+ this.enterOuterAlt(localctx, 1);
1274
+ this.state = 309;
1275
+ _la = this._input.LA(1);
1276
+ if(!(((((_la - 27)) & ~0x1f) === 0 && ((1 << (_la - 27)) & 99) !== 0))) {
1277
+ this._errHandler.recoverInline(this);
1278
+ }
1279
+ else {
1280
+ this._errHandler.reportMatch(this);
1281
+ this.consume();
1282
+ }
1283
+ } catch (re) {
1284
+ if(re instanceof antlr4.error.RecognitionException) {
1285
+ localctx.exception = re;
1286
+ this._errHandler.reportError(this, re);
1287
+ this._errHandler.recover(this, re);
1288
+ } else {
1289
+ throw re;
1290
+ }
1291
+ } finally {
1292
+ this.exitRule();
1293
+ }
1294
+ return localctx;
1295
+ }
1296
+
1297
+
1298
+ }
1299
+
1300
+ MiniscriptParser.EOF = antlr4.Token.EOF;
1301
+ MiniscriptParser.PK = 1;
1302
+ MiniscriptParser.PKH = 2;
1303
+ MiniscriptParser.PK_K = 3;
1304
+ MiniscriptParser.PK_H = 4;
1305
+ MiniscriptParser.OLDER = 5;
1306
+ MiniscriptParser.AFTER = 6;
1307
+ MiniscriptParser.SHA256 = 7;
1308
+ MiniscriptParser.HASH256 = 8;
1309
+ MiniscriptParser.HASH160 = 9;
1310
+ MiniscriptParser.RIPEMD160 = 10;
1311
+ MiniscriptParser.MULTI = 11;
1312
+ MiniscriptParser.MULTI_A = 12;
1313
+ MiniscriptParser.AND_V = 13;
1314
+ MiniscriptParser.AND_B = 14;
1315
+ MiniscriptParser.AND_N = 15;
1316
+ MiniscriptParser.OR_B = 16;
1317
+ MiniscriptParser.OR_C = 17;
1318
+ MiniscriptParser.OR_D = 18;
1319
+ MiniscriptParser.OR_I = 19;
1320
+ MiniscriptParser.ANDOR = 20;
1321
+ MiniscriptParser.THRESH = 21;
1322
+ MiniscriptParser.LPAREN = 22;
1323
+ MiniscriptParser.RPAREN = 23;
1324
+ MiniscriptParser.COMMA = 24;
1325
+ MiniscriptParser.WRAPPER_SEQUENCE = 25;
1326
+ MiniscriptParser.COMPRESSED_PUBLIC_KEY = 26;
1327
+ MiniscriptParser.DIGITS_64 = 27;
1328
+ MiniscriptParser.DIGITS_40 = 28;
1329
+ MiniscriptParser.HEX32_BYTES = 29;
1330
+ MiniscriptParser.HEX20_BYTES = 30;
1331
+ MiniscriptParser.ZERO = 31;
1332
+ MiniscriptParser.ONE = 32;
1333
+ MiniscriptParser.POSITIVE_INTEGER = 33;
1334
+ MiniscriptParser.KEY = 34;
1335
+ MiniscriptParser.WS = 35;
1336
+
1337
+ MiniscriptParser.RULE_miniscript = 0;
1338
+ MiniscriptParser.RULE_expression = 1;
1339
+ MiniscriptParser.RULE_baseExpression = 2;
1340
+ MiniscriptParser.RULE_constant = 3;
1341
+ MiniscriptParser.RULE_keyExpression = 4;
1342
+ MiniscriptParser.RULE_timeExpression = 5;
1343
+ MiniscriptParser.RULE_hashExpression = 6;
1344
+ MiniscriptParser.RULE_multisigExpression = 7;
1345
+ MiniscriptParser.RULE_binaryExpression = 8;
1346
+ MiniscriptParser.RULE_ternaryExpression = 9;
1347
+ MiniscriptParser.RULE_thresholdExpression = 10;
1348
+ MiniscriptParser.RULE_wrappedExpression = 11;
1349
+ MiniscriptParser.RULE_hash32 = 12;
1350
+ MiniscriptParser.RULE_hash20 = 13;
1351
+ MiniscriptParser.RULE_keyList = 14;
1352
+ MiniscriptParser.RULE_keyList1To20 = 15;
1353
+ MiniscriptParser.RULE_key = 16;
1354
+ MiniscriptParser.RULE_reservedKeyWord = 17;
1355
+ MiniscriptParser.RULE_positiveInteger = 18;
1356
+
1357
+ class MiniscriptContext extends antlr4.ParserRuleContext {
1358
+
1359
+ constructor(parser, parent, invokingState) {
1360
+ if(parent===undefined) {
1361
+ parent = null;
1362
+ }
1363
+ if(invokingState===undefined || invokingState===null) {
1364
+ invokingState = -1;
1365
+ }
1366
+ super(parent, invokingState);
1367
+ this.parser = parser;
1368
+ this.ruleIndex = MiniscriptParser.RULE_miniscript;
1369
+ }
1370
+
1371
+ expression() {
1372
+ return this.getTypedRuleContext(ExpressionContext,0);
1373
+ };
1374
+
1375
+ EOF() {
1376
+ return this.getToken(MiniscriptParser.EOF, 0);
1377
+ };
1378
+
1379
+ enterRule(listener) {
1380
+ if(listener instanceof MiniscriptListener ) {
1381
+ listener.enterMiniscript(this);
1382
+ }
1383
+ }
1384
+
1385
+ exitRule(listener) {
1386
+ if(listener instanceof MiniscriptListener ) {
1387
+ listener.exitMiniscript(this);
1388
+ }
1389
+ }
1390
+
1391
+ accept(visitor) {
1392
+ if ( visitor instanceof MiniscriptVisitor ) {
1393
+ return visitor.visitMiniscript(this);
1394
+ } else {
1395
+ return visitor.visitChildren(this);
1396
+ }
1397
+ }
1398
+
1399
+
1400
+ }
1401
+
1402
+
1403
+
1404
+ class ExpressionContext extends antlr4.ParserRuleContext {
1405
+
1406
+ constructor(parser, parent, invokingState) {
1407
+ if(parent===undefined) {
1408
+ parent = null;
1409
+ }
1410
+ if(invokingState===undefined || invokingState===null) {
1411
+ invokingState = -1;
1412
+ }
1413
+ super(parent, invokingState);
1414
+ this.parser = parser;
1415
+ this.ruleIndex = MiniscriptParser.RULE_expression;
1416
+ }
1417
+
1418
+ wrappedExpression() {
1419
+ return this.getTypedRuleContext(WrappedExpressionContext,0);
1420
+ };
1421
+
1422
+ baseExpression() {
1423
+ return this.getTypedRuleContext(BaseExpressionContext,0);
1424
+ };
1425
+
1426
+ enterRule(listener) {
1427
+ if(listener instanceof MiniscriptListener ) {
1428
+ listener.enterExpression(this);
1429
+ }
1430
+ }
1431
+
1432
+ exitRule(listener) {
1433
+ if(listener instanceof MiniscriptListener ) {
1434
+ listener.exitExpression(this);
1435
+ }
1436
+ }
1437
+
1438
+ accept(visitor) {
1439
+ if ( visitor instanceof MiniscriptVisitor ) {
1440
+ return visitor.visitExpression(this);
1441
+ } else {
1442
+ return visitor.visitChildren(this);
1443
+ }
1444
+ }
1445
+
1446
+
1447
+ }
1448
+
1449
+
1450
+
1451
+ class BaseExpressionContext extends antlr4.ParserRuleContext {
1452
+
1453
+ constructor(parser, parent, invokingState) {
1454
+ if(parent===undefined) {
1455
+ parent = null;
1456
+ }
1457
+ if(invokingState===undefined || invokingState===null) {
1458
+ invokingState = -1;
1459
+ }
1460
+ super(parent, invokingState);
1461
+ this.parser = parser;
1462
+ this.ruleIndex = MiniscriptParser.RULE_baseExpression;
1463
+ }
1464
+
1465
+ constant() {
1466
+ return this.getTypedRuleContext(ConstantContext,0);
1467
+ };
1468
+
1469
+ keyExpression() {
1470
+ return this.getTypedRuleContext(KeyExpressionContext,0);
1471
+ };
1472
+
1473
+ timeExpression() {
1474
+ return this.getTypedRuleContext(TimeExpressionContext,0);
1475
+ };
1476
+
1477
+ hashExpression() {
1478
+ return this.getTypedRuleContext(HashExpressionContext,0);
1479
+ };
1480
+
1481
+ multisigExpression() {
1482
+ return this.getTypedRuleContext(MultisigExpressionContext,0);
1483
+ };
1484
+
1485
+ binaryExpression() {
1486
+ return this.getTypedRuleContext(BinaryExpressionContext,0);
1487
+ };
1488
+
1489
+ ternaryExpression() {
1490
+ return this.getTypedRuleContext(TernaryExpressionContext,0);
1491
+ };
1492
+
1493
+ thresholdExpression() {
1494
+ return this.getTypedRuleContext(ThresholdExpressionContext,0);
1495
+ };
1496
+
1497
+ enterRule(listener) {
1498
+ if(listener instanceof MiniscriptListener ) {
1499
+ listener.enterBaseExpression(this);
1500
+ }
1501
+ }
1502
+
1503
+ exitRule(listener) {
1504
+ if(listener instanceof MiniscriptListener ) {
1505
+ listener.exitBaseExpression(this);
1506
+ }
1507
+ }
1508
+
1509
+ accept(visitor) {
1510
+ if ( visitor instanceof MiniscriptVisitor ) {
1511
+ return visitor.visitBaseExpression(this);
1512
+ } else {
1513
+ return visitor.visitChildren(this);
1514
+ }
1515
+ }
1516
+
1517
+
1518
+ }
1519
+
1520
+
1521
+
1522
+ class ConstantContext extends antlr4.ParserRuleContext {
1523
+
1524
+ constructor(parser, parent, invokingState) {
1525
+ if(parent===undefined) {
1526
+ parent = null;
1527
+ }
1528
+ if(invokingState===undefined || invokingState===null) {
1529
+ invokingState = -1;
1530
+ }
1531
+ super(parent, invokingState);
1532
+ this.parser = parser;
1533
+ this.ruleIndex = MiniscriptParser.RULE_constant;
1534
+ }
1535
+
1536
+ ZERO() {
1537
+ return this.getToken(MiniscriptParser.ZERO, 0);
1538
+ };
1539
+
1540
+ ONE() {
1541
+ return this.getToken(MiniscriptParser.ONE, 0);
1542
+ };
1543
+
1544
+ enterRule(listener) {
1545
+ if(listener instanceof MiniscriptListener ) {
1546
+ listener.enterConstant(this);
1547
+ }
1548
+ }
1549
+
1550
+ exitRule(listener) {
1551
+ if(listener instanceof MiniscriptListener ) {
1552
+ listener.exitConstant(this);
1553
+ }
1554
+ }
1555
+
1556
+ accept(visitor) {
1557
+ if ( visitor instanceof MiniscriptVisitor ) {
1558
+ return visitor.visitConstant(this);
1559
+ } else {
1560
+ return visitor.visitChildren(this);
1561
+ }
1562
+ }
1563
+
1564
+
1565
+ }
1566
+
1567
+
1568
+
1569
+ class KeyExpressionContext extends antlr4.ParserRuleContext {
1570
+
1571
+ constructor(parser, parent, invokingState) {
1572
+ if(parent===undefined) {
1573
+ parent = null;
1574
+ }
1575
+ if(invokingState===undefined || invokingState===null) {
1576
+ invokingState = -1;
1577
+ }
1578
+ super(parent, invokingState);
1579
+ this.parser = parser;
1580
+ this.ruleIndex = MiniscriptParser.RULE_keyExpression;
1581
+ }
1582
+
1583
+ PK() {
1584
+ return this.getToken(MiniscriptParser.PK, 0);
1585
+ };
1586
+
1587
+ LPAREN() {
1588
+ return this.getToken(MiniscriptParser.LPAREN, 0);
1589
+ };
1590
+
1591
+ key() {
1592
+ return this.getTypedRuleContext(KeyContext,0);
1593
+ };
1594
+
1595
+ RPAREN() {
1596
+ return this.getToken(MiniscriptParser.RPAREN, 0);
1597
+ };
1598
+
1599
+ PKH() {
1600
+ return this.getToken(MiniscriptParser.PKH, 0);
1601
+ };
1602
+
1603
+ PK_K() {
1604
+ return this.getToken(MiniscriptParser.PK_K, 0);
1605
+ };
1606
+
1607
+ PK_H() {
1608
+ return this.getToken(MiniscriptParser.PK_H, 0);
1609
+ };
1610
+
1611
+ enterRule(listener) {
1612
+ if(listener instanceof MiniscriptListener ) {
1613
+ listener.enterKeyExpression(this);
1614
+ }
1615
+ }
1616
+
1617
+ exitRule(listener) {
1618
+ if(listener instanceof MiniscriptListener ) {
1619
+ listener.exitKeyExpression(this);
1620
+ }
1621
+ }
1622
+
1623
+ accept(visitor) {
1624
+ if ( visitor instanceof MiniscriptVisitor ) {
1625
+ return visitor.visitKeyExpression(this);
1626
+ } else {
1627
+ return visitor.visitChildren(this);
1628
+ }
1629
+ }
1630
+
1631
+
1632
+ }
1633
+
1634
+
1635
+
1636
+ class TimeExpressionContext extends antlr4.ParserRuleContext {
1637
+
1638
+ constructor(parser, parent, invokingState) {
1639
+ if(parent===undefined) {
1640
+ parent = null;
1641
+ }
1642
+ if(invokingState===undefined || invokingState===null) {
1643
+ invokingState = -1;
1644
+ }
1645
+ super(parent, invokingState);
1646
+ this.parser = parser;
1647
+ this.ruleIndex = MiniscriptParser.RULE_timeExpression;
1648
+ }
1649
+
1650
+ OLDER() {
1651
+ return this.getToken(MiniscriptParser.OLDER, 0);
1652
+ };
1653
+
1654
+ LPAREN() {
1655
+ return this.getToken(MiniscriptParser.LPAREN, 0);
1656
+ };
1657
+
1658
+ positiveInteger() {
1659
+ return this.getTypedRuleContext(PositiveIntegerContext,0);
1660
+ };
1661
+
1662
+ RPAREN() {
1663
+ return this.getToken(MiniscriptParser.RPAREN, 0);
1664
+ };
1665
+
1666
+ AFTER() {
1667
+ return this.getToken(MiniscriptParser.AFTER, 0);
1668
+ };
1669
+
1670
+ enterRule(listener) {
1671
+ if(listener instanceof MiniscriptListener ) {
1672
+ listener.enterTimeExpression(this);
1673
+ }
1674
+ }
1675
+
1676
+ exitRule(listener) {
1677
+ if(listener instanceof MiniscriptListener ) {
1678
+ listener.exitTimeExpression(this);
1679
+ }
1680
+ }
1681
+
1682
+ accept(visitor) {
1683
+ if ( visitor instanceof MiniscriptVisitor ) {
1684
+ return visitor.visitTimeExpression(this);
1685
+ } else {
1686
+ return visitor.visitChildren(this);
1687
+ }
1688
+ }
1689
+
1690
+
1691
+ }
1692
+
1693
+
1694
+
1695
+ class HashExpressionContext extends antlr4.ParserRuleContext {
1696
+
1697
+ constructor(parser, parent, invokingState) {
1698
+ if(parent===undefined) {
1699
+ parent = null;
1700
+ }
1701
+ if(invokingState===undefined || invokingState===null) {
1702
+ invokingState = -1;
1703
+ }
1704
+ super(parent, invokingState);
1705
+ this.parser = parser;
1706
+ this.ruleIndex = MiniscriptParser.RULE_hashExpression;
1707
+ }
1708
+
1709
+ SHA256() {
1710
+ return this.getToken(MiniscriptParser.SHA256, 0);
1711
+ };
1712
+
1713
+ LPAREN() {
1714
+ return this.getToken(MiniscriptParser.LPAREN, 0);
1715
+ };
1716
+
1717
+ hash32() {
1718
+ return this.getTypedRuleContext(Hash32Context,0);
1719
+ };
1720
+
1721
+ RPAREN() {
1722
+ return this.getToken(MiniscriptParser.RPAREN, 0);
1723
+ };
1724
+
1725
+ HASH256() {
1726
+ return this.getToken(MiniscriptParser.HASH256, 0);
1727
+ };
1728
+
1729
+ HASH160() {
1730
+ return this.getToken(MiniscriptParser.HASH160, 0);
1731
+ };
1732
+
1733
+ hash20() {
1734
+ return this.getTypedRuleContext(Hash20Context,0);
1735
+ };
1736
+
1737
+ RIPEMD160() {
1738
+ return this.getToken(MiniscriptParser.RIPEMD160, 0);
1739
+ };
1740
+
1741
+ enterRule(listener) {
1742
+ if(listener instanceof MiniscriptListener ) {
1743
+ listener.enterHashExpression(this);
1744
+ }
1745
+ }
1746
+
1747
+ exitRule(listener) {
1748
+ if(listener instanceof MiniscriptListener ) {
1749
+ listener.exitHashExpression(this);
1750
+ }
1751
+ }
1752
+
1753
+ accept(visitor) {
1754
+ if ( visitor instanceof MiniscriptVisitor ) {
1755
+ return visitor.visitHashExpression(this);
1756
+ } else {
1757
+ return visitor.visitChildren(this);
1758
+ }
1759
+ }
1760
+
1761
+
1762
+ }
1763
+
1764
+
1765
+
1766
+ class MultisigExpressionContext extends antlr4.ParserRuleContext {
1767
+
1768
+ constructor(parser, parent, invokingState) {
1769
+ if(parent===undefined) {
1770
+ parent = null;
1771
+ }
1772
+ if(invokingState===undefined || invokingState===null) {
1773
+ invokingState = -1;
1774
+ }
1775
+ super(parent, invokingState);
1776
+ this.parser = parser;
1777
+ this.ruleIndex = MiniscriptParser.RULE_multisigExpression;
1778
+ }
1779
+
1780
+ MULTI() {
1781
+ return this.getToken(MiniscriptParser.MULTI, 0);
1782
+ };
1783
+
1784
+ LPAREN() {
1785
+ return this.getToken(MiniscriptParser.LPAREN, 0);
1786
+ };
1787
+
1788
+ positiveInteger() {
1789
+ return this.getTypedRuleContext(PositiveIntegerContext,0);
1790
+ };
1791
+
1792
+ COMMA() {
1793
+ return this.getToken(MiniscriptParser.COMMA, 0);
1794
+ };
1795
+
1796
+ keyList1To20() {
1797
+ return this.getTypedRuleContext(KeyList1To20Context,0);
1798
+ };
1799
+
1800
+ RPAREN() {
1801
+ return this.getToken(MiniscriptParser.RPAREN, 0);
1802
+ };
1803
+
1804
+ MULTI_A() {
1805
+ return this.getToken(MiniscriptParser.MULTI_A, 0);
1806
+ };
1807
+
1808
+ keyList() {
1809
+ return this.getTypedRuleContext(KeyListContext,0);
1810
+ };
1811
+
1812
+ enterRule(listener) {
1813
+ if(listener instanceof MiniscriptListener ) {
1814
+ listener.enterMultisigExpression(this);
1815
+ }
1816
+ }
1817
+
1818
+ exitRule(listener) {
1819
+ if(listener instanceof MiniscriptListener ) {
1820
+ listener.exitMultisigExpression(this);
1821
+ }
1822
+ }
1823
+
1824
+ accept(visitor) {
1825
+ if ( visitor instanceof MiniscriptVisitor ) {
1826
+ return visitor.visitMultisigExpression(this);
1827
+ } else {
1828
+ return visitor.visitChildren(this);
1829
+ }
1830
+ }
1831
+
1832
+
1833
+ }
1834
+
1835
+
1836
+
1837
+ class BinaryExpressionContext extends antlr4.ParserRuleContext {
1838
+
1839
+ constructor(parser, parent, invokingState) {
1840
+ if(parent===undefined) {
1841
+ parent = null;
1842
+ }
1843
+ if(invokingState===undefined || invokingState===null) {
1844
+ invokingState = -1;
1845
+ }
1846
+ super(parent, invokingState);
1847
+ this.parser = parser;
1848
+ this.ruleIndex = MiniscriptParser.RULE_binaryExpression;
1849
+ }
1850
+
1851
+ AND_V() {
1852
+ return this.getToken(MiniscriptParser.AND_V, 0);
1853
+ };
1854
+
1855
+ LPAREN() {
1856
+ return this.getToken(MiniscriptParser.LPAREN, 0);
1857
+ };
1858
+
1859
+ expression = function(i) {
1860
+ if(i===undefined) {
1861
+ i = null;
1862
+ }
1863
+ if(i===null) {
1864
+ return this.getTypedRuleContexts(ExpressionContext);
1865
+ } else {
1866
+ return this.getTypedRuleContext(ExpressionContext,i);
1867
+ }
1868
+ };
1869
+
1870
+ COMMA() {
1871
+ return this.getToken(MiniscriptParser.COMMA, 0);
1872
+ };
1873
+
1874
+ RPAREN() {
1875
+ return this.getToken(MiniscriptParser.RPAREN, 0);
1876
+ };
1877
+
1878
+ AND_B() {
1879
+ return this.getToken(MiniscriptParser.AND_B, 0);
1880
+ };
1881
+
1882
+ AND_N() {
1883
+ return this.getToken(MiniscriptParser.AND_N, 0);
1884
+ };
1885
+
1886
+ OR_B() {
1887
+ return this.getToken(MiniscriptParser.OR_B, 0);
1888
+ };
1889
+
1890
+ OR_C() {
1891
+ return this.getToken(MiniscriptParser.OR_C, 0);
1892
+ };
1893
+
1894
+ OR_D() {
1895
+ return this.getToken(MiniscriptParser.OR_D, 0);
1896
+ };
1897
+
1898
+ OR_I() {
1899
+ return this.getToken(MiniscriptParser.OR_I, 0);
1900
+ };
1901
+
1902
+ enterRule(listener) {
1903
+ if(listener instanceof MiniscriptListener ) {
1904
+ listener.enterBinaryExpression(this);
1905
+ }
1906
+ }
1907
+
1908
+ exitRule(listener) {
1909
+ if(listener instanceof MiniscriptListener ) {
1910
+ listener.exitBinaryExpression(this);
1911
+ }
1912
+ }
1913
+
1914
+ accept(visitor) {
1915
+ if ( visitor instanceof MiniscriptVisitor ) {
1916
+ return visitor.visitBinaryExpression(this);
1917
+ } else {
1918
+ return visitor.visitChildren(this);
1919
+ }
1920
+ }
1921
+
1922
+
1923
+ }
1924
+
1925
+
1926
+
1927
+ class TernaryExpressionContext extends antlr4.ParserRuleContext {
1928
+
1929
+ constructor(parser, parent, invokingState) {
1930
+ if(parent===undefined) {
1931
+ parent = null;
1932
+ }
1933
+ if(invokingState===undefined || invokingState===null) {
1934
+ invokingState = -1;
1935
+ }
1936
+ super(parent, invokingState);
1937
+ this.parser = parser;
1938
+ this.ruleIndex = MiniscriptParser.RULE_ternaryExpression;
1939
+ }
1940
+
1941
+ ANDOR() {
1942
+ return this.getToken(MiniscriptParser.ANDOR, 0);
1943
+ };
1944
+
1945
+ LPAREN() {
1946
+ return this.getToken(MiniscriptParser.LPAREN, 0);
1947
+ };
1948
+
1949
+ expression = function(i) {
1950
+ if(i===undefined) {
1951
+ i = null;
1952
+ }
1953
+ if(i===null) {
1954
+ return this.getTypedRuleContexts(ExpressionContext);
1955
+ } else {
1956
+ return this.getTypedRuleContext(ExpressionContext,i);
1957
+ }
1958
+ };
1959
+
1960
+ COMMA = function(i) {
1961
+ if(i===undefined) {
1962
+ i = null;
1963
+ }
1964
+ if(i===null) {
1965
+ return this.getTokens(MiniscriptParser.COMMA);
1966
+ } else {
1967
+ return this.getToken(MiniscriptParser.COMMA, i);
1968
+ }
1969
+ };
1970
+
1971
+
1972
+ RPAREN() {
1973
+ return this.getToken(MiniscriptParser.RPAREN, 0);
1974
+ };
1975
+
1976
+ enterRule(listener) {
1977
+ if(listener instanceof MiniscriptListener ) {
1978
+ listener.enterTernaryExpression(this);
1979
+ }
1980
+ }
1981
+
1982
+ exitRule(listener) {
1983
+ if(listener instanceof MiniscriptListener ) {
1984
+ listener.exitTernaryExpression(this);
1985
+ }
1986
+ }
1987
+
1988
+ accept(visitor) {
1989
+ if ( visitor instanceof MiniscriptVisitor ) {
1990
+ return visitor.visitTernaryExpression(this);
1991
+ } else {
1992
+ return visitor.visitChildren(this);
1993
+ }
1994
+ }
1995
+
1996
+
1997
+ }
1998
+
1999
+
2000
+
2001
+ class ThresholdExpressionContext extends antlr4.ParserRuleContext {
2002
+
2003
+ constructor(parser, parent, invokingState) {
2004
+ if(parent===undefined) {
2005
+ parent = null;
2006
+ }
2007
+ if(invokingState===undefined || invokingState===null) {
2008
+ invokingState = -1;
2009
+ }
2010
+ super(parent, invokingState);
2011
+ this.parser = parser;
2012
+ this.ruleIndex = MiniscriptParser.RULE_thresholdExpression;
2013
+ }
2014
+
2015
+ THRESH() {
2016
+ return this.getToken(MiniscriptParser.THRESH, 0);
2017
+ };
2018
+
2019
+ LPAREN() {
2020
+ return this.getToken(MiniscriptParser.LPAREN, 0);
2021
+ };
2022
+
2023
+ positiveInteger() {
2024
+ return this.getTypedRuleContext(PositiveIntegerContext,0);
2025
+ };
2026
+
2027
+ COMMA = function(i) {
2028
+ if(i===undefined) {
2029
+ i = null;
2030
+ }
2031
+ if(i===null) {
2032
+ return this.getTokens(MiniscriptParser.COMMA);
2033
+ } else {
2034
+ return this.getToken(MiniscriptParser.COMMA, i);
2035
+ }
2036
+ };
2037
+
2038
+
2039
+ expression = function(i) {
2040
+ if(i===undefined) {
2041
+ i = null;
2042
+ }
2043
+ if(i===null) {
2044
+ return this.getTypedRuleContexts(ExpressionContext);
2045
+ } else {
2046
+ return this.getTypedRuleContext(ExpressionContext,i);
2047
+ }
2048
+ };
2049
+
2050
+ RPAREN() {
2051
+ return this.getToken(MiniscriptParser.RPAREN, 0);
2052
+ };
2053
+
2054
+ enterRule(listener) {
2055
+ if(listener instanceof MiniscriptListener ) {
2056
+ listener.enterThresholdExpression(this);
2057
+ }
2058
+ }
2059
+
2060
+ exitRule(listener) {
2061
+ if(listener instanceof MiniscriptListener ) {
2062
+ listener.exitThresholdExpression(this);
2063
+ }
2064
+ }
2065
+
2066
+ accept(visitor) {
2067
+ if ( visitor instanceof MiniscriptVisitor ) {
2068
+ return visitor.visitThresholdExpression(this);
2069
+ } else {
2070
+ return visitor.visitChildren(this);
2071
+ }
2072
+ }
2073
+
2074
+
2075
+ }
2076
+
2077
+
2078
+
2079
+ class WrappedExpressionContext extends antlr4.ParserRuleContext {
2080
+
2081
+ constructor(parser, parent, invokingState) {
2082
+ if(parent===undefined) {
2083
+ parent = null;
2084
+ }
2085
+ if(invokingState===undefined || invokingState===null) {
2086
+ invokingState = -1;
2087
+ }
2088
+ super(parent, invokingState);
2089
+ this.parser = parser;
2090
+ this.ruleIndex = MiniscriptParser.RULE_wrappedExpression;
2091
+ }
2092
+
2093
+ WRAPPER_SEQUENCE() {
2094
+ return this.getToken(MiniscriptParser.WRAPPER_SEQUENCE, 0);
2095
+ };
2096
+
2097
+ baseExpression() {
2098
+ return this.getTypedRuleContext(BaseExpressionContext,0);
2099
+ };
2100
+
2101
+ enterRule(listener) {
2102
+ if(listener instanceof MiniscriptListener ) {
2103
+ listener.enterWrappedExpression(this);
2104
+ }
2105
+ }
2106
+
2107
+ exitRule(listener) {
2108
+ if(listener instanceof MiniscriptListener ) {
2109
+ listener.exitWrappedExpression(this);
2110
+ }
2111
+ }
2112
+
2113
+ accept(visitor) {
2114
+ if ( visitor instanceof MiniscriptVisitor ) {
2115
+ return visitor.visitWrappedExpression(this);
2116
+ } else {
2117
+ return visitor.visitChildren(this);
2118
+ }
2119
+ }
2120
+
2121
+
2122
+ }
2123
+
2124
+
2125
+
2126
+ class Hash32Context extends antlr4.ParserRuleContext {
2127
+
2128
+ constructor(parser, parent, invokingState) {
2129
+ if(parent===undefined) {
2130
+ parent = null;
2131
+ }
2132
+ if(invokingState===undefined || invokingState===null) {
2133
+ invokingState = -1;
2134
+ }
2135
+ super(parent, invokingState);
2136
+ this.parser = parser;
2137
+ this.ruleIndex = MiniscriptParser.RULE_hash32;
2138
+ }
2139
+
2140
+ HEX32_BYTES() {
2141
+ return this.getToken(MiniscriptParser.HEX32_BYTES, 0);
2142
+ };
2143
+
2144
+ DIGITS_64() {
2145
+ return this.getToken(MiniscriptParser.DIGITS_64, 0);
2146
+ };
2147
+
2148
+ enterRule(listener) {
2149
+ if(listener instanceof MiniscriptListener ) {
2150
+ listener.enterHash32(this);
2151
+ }
2152
+ }
2153
+
2154
+ exitRule(listener) {
2155
+ if(listener instanceof MiniscriptListener ) {
2156
+ listener.exitHash32(this);
2157
+ }
2158
+ }
2159
+
2160
+ accept(visitor) {
2161
+ if ( visitor instanceof MiniscriptVisitor ) {
2162
+ return visitor.visitHash32(this);
2163
+ } else {
2164
+ return visitor.visitChildren(this);
2165
+ }
2166
+ }
2167
+
2168
+
2169
+ }
2170
+
2171
+
2172
+
2173
+ class Hash20Context extends antlr4.ParserRuleContext {
2174
+
2175
+ constructor(parser, parent, invokingState) {
2176
+ if(parent===undefined) {
2177
+ parent = null;
2178
+ }
2179
+ if(invokingState===undefined || invokingState===null) {
2180
+ invokingState = -1;
2181
+ }
2182
+ super(parent, invokingState);
2183
+ this.parser = parser;
2184
+ this.ruleIndex = MiniscriptParser.RULE_hash20;
2185
+ }
2186
+
2187
+ HEX20_BYTES() {
2188
+ return this.getToken(MiniscriptParser.HEX20_BYTES, 0);
2189
+ };
2190
+
2191
+ DIGITS_40() {
2192
+ return this.getToken(MiniscriptParser.DIGITS_40, 0);
2193
+ };
2194
+
2195
+ enterRule(listener) {
2196
+ if(listener instanceof MiniscriptListener ) {
2197
+ listener.enterHash20(this);
2198
+ }
2199
+ }
2200
+
2201
+ exitRule(listener) {
2202
+ if(listener instanceof MiniscriptListener ) {
2203
+ listener.exitHash20(this);
2204
+ }
2205
+ }
2206
+
2207
+ accept(visitor) {
2208
+ if ( visitor instanceof MiniscriptVisitor ) {
2209
+ return visitor.visitHash20(this);
2210
+ } else {
2211
+ return visitor.visitChildren(this);
2212
+ }
2213
+ }
2214
+
2215
+
2216
+ }
2217
+
2218
+
2219
+
2220
+ class KeyListContext extends antlr4.ParserRuleContext {
2221
+
2222
+ constructor(parser, parent, invokingState) {
2223
+ if(parent===undefined) {
2224
+ parent = null;
2225
+ }
2226
+ if(invokingState===undefined || invokingState===null) {
2227
+ invokingState = -1;
2228
+ }
2229
+ super(parent, invokingState);
2230
+ this.parser = parser;
2231
+ this.ruleIndex = MiniscriptParser.RULE_keyList;
2232
+ }
2233
+
2234
+ key = function(i) {
2235
+ if(i===undefined) {
2236
+ i = null;
2237
+ }
2238
+ if(i===null) {
2239
+ return this.getTypedRuleContexts(KeyContext);
2240
+ } else {
2241
+ return this.getTypedRuleContext(KeyContext,i);
2242
+ }
2243
+ };
2244
+
2245
+ COMMA = function(i) {
2246
+ if(i===undefined) {
2247
+ i = null;
2248
+ }
2249
+ if(i===null) {
2250
+ return this.getTokens(MiniscriptParser.COMMA);
2251
+ } else {
2252
+ return this.getToken(MiniscriptParser.COMMA, i);
2253
+ }
2254
+ };
2255
+
2256
+
2257
+ enterRule(listener) {
2258
+ if(listener instanceof MiniscriptListener ) {
2259
+ listener.enterKeyList(this);
2260
+ }
2261
+ }
2262
+
2263
+ exitRule(listener) {
2264
+ if(listener instanceof MiniscriptListener ) {
2265
+ listener.exitKeyList(this);
2266
+ }
2267
+ }
2268
+
2269
+ accept(visitor) {
2270
+ if ( visitor instanceof MiniscriptVisitor ) {
2271
+ return visitor.visitKeyList(this);
2272
+ } else {
2273
+ return visitor.visitChildren(this);
2274
+ }
2275
+ }
2276
+
2277
+
2278
+ }
2279
+
2280
+
2281
+
2282
+ class KeyList1To20Context extends antlr4.ParserRuleContext {
2283
+
2284
+ constructor(parser, parent, invokingState) {
2285
+ if(parent===undefined) {
2286
+ parent = null;
2287
+ }
2288
+ if(invokingState===undefined || invokingState===null) {
2289
+ invokingState = -1;
2290
+ }
2291
+ super(parent, invokingState);
2292
+ this.parser = parser;
2293
+ this.ruleIndex = MiniscriptParser.RULE_keyList1To20;
2294
+ }
2295
+
2296
+ key = function(i) {
2297
+ if(i===undefined) {
2298
+ i = null;
2299
+ }
2300
+ if(i===null) {
2301
+ return this.getTypedRuleContexts(KeyContext);
2302
+ } else {
2303
+ return this.getTypedRuleContext(KeyContext,i);
2304
+ }
2305
+ };
2306
+
2307
+ COMMA = function(i) {
2308
+ if(i===undefined) {
2309
+ i = null;
2310
+ }
2311
+ if(i===null) {
2312
+ return this.getTokens(MiniscriptParser.COMMA);
2313
+ } else {
2314
+ return this.getToken(MiniscriptParser.COMMA, i);
2315
+ }
2316
+ };
2317
+
2318
+
2319
+ enterRule(listener) {
2320
+ if(listener instanceof MiniscriptListener ) {
2321
+ listener.enterKeyList1To20(this);
2322
+ }
2323
+ }
2324
+
2325
+ exitRule(listener) {
2326
+ if(listener instanceof MiniscriptListener ) {
2327
+ listener.exitKeyList1To20(this);
2328
+ }
2329
+ }
2330
+
2331
+ accept(visitor) {
2332
+ if ( visitor instanceof MiniscriptVisitor ) {
2333
+ return visitor.visitKeyList1To20(this);
2334
+ } else {
2335
+ return visitor.visitChildren(this);
2336
+ }
2337
+ }
2338
+
2339
+
2340
+ }
2341
+
2342
+
2343
+
2344
+ class KeyContext extends antlr4.ParserRuleContext {
2345
+
2346
+ constructor(parser, parent, invokingState) {
2347
+ if(parent===undefined) {
2348
+ parent = null;
2349
+ }
2350
+ if(invokingState===undefined || invokingState===null) {
2351
+ invokingState = -1;
2352
+ }
2353
+ super(parent, invokingState);
2354
+ this.parser = parser;
2355
+ this.ruleIndex = MiniscriptParser.RULE_key;
2356
+ }
2357
+
2358
+ COMPRESSED_PUBLIC_KEY() {
2359
+ return this.getToken(MiniscriptParser.COMPRESSED_PUBLIC_KEY, 0);
2360
+ };
2361
+
2362
+ HEX32_BYTES() {
2363
+ return this.getToken(MiniscriptParser.HEX32_BYTES, 0);
2364
+ };
2365
+
2366
+ HEX20_BYTES() {
2367
+ return this.getToken(MiniscriptParser.HEX20_BYTES, 0);
2368
+ };
2369
+
2370
+ DIGITS_64() {
2371
+ return this.getToken(MiniscriptParser.DIGITS_64, 0);
2372
+ };
2373
+
2374
+ DIGITS_40() {
2375
+ return this.getToken(MiniscriptParser.DIGITS_40, 0);
2376
+ };
2377
+
2378
+ KEY() {
2379
+ return this.getToken(MiniscriptParser.KEY, 0);
2380
+ };
2381
+
2382
+ ZERO() {
2383
+ return this.getToken(MiniscriptParser.ZERO, 0);
2384
+ };
2385
+
2386
+ ONE() {
2387
+ return this.getToken(MiniscriptParser.ONE, 0);
2388
+ };
2389
+
2390
+ POSITIVE_INTEGER() {
2391
+ return this.getToken(MiniscriptParser.POSITIVE_INTEGER, 0);
2392
+ };
2393
+
2394
+ reservedKeyWord() {
2395
+ return this.getTypedRuleContext(ReservedKeyWordContext,0);
2396
+ };
2397
+
2398
+ enterRule(listener) {
2399
+ if(listener instanceof MiniscriptListener ) {
2400
+ listener.enterKey(this);
2401
+ }
2402
+ }
2403
+
2404
+ exitRule(listener) {
2405
+ if(listener instanceof MiniscriptListener ) {
2406
+ listener.exitKey(this);
2407
+ }
2408
+ }
2409
+
2410
+ accept(visitor) {
2411
+ if ( visitor instanceof MiniscriptVisitor ) {
2412
+ return visitor.visitKey(this);
2413
+ } else {
2414
+ return visitor.visitChildren(this);
2415
+ }
2416
+ }
2417
+
2418
+
2419
+ }
2420
+
2421
+
2422
+
2423
+ class ReservedKeyWordContext extends antlr4.ParserRuleContext {
2424
+
2425
+ constructor(parser, parent, invokingState) {
2426
+ if(parent===undefined) {
2427
+ parent = null;
2428
+ }
2429
+ if(invokingState===undefined || invokingState===null) {
2430
+ invokingState = -1;
2431
+ }
2432
+ super(parent, invokingState);
2433
+ this.parser = parser;
2434
+ this.ruleIndex = MiniscriptParser.RULE_reservedKeyWord;
2435
+ }
2436
+
2437
+ PK() {
2438
+ return this.getToken(MiniscriptParser.PK, 0);
2439
+ };
2440
+
2441
+ PKH() {
2442
+ return this.getToken(MiniscriptParser.PKH, 0);
2443
+ };
2444
+
2445
+ PK_K() {
2446
+ return this.getToken(MiniscriptParser.PK_K, 0);
2447
+ };
2448
+
2449
+ PK_H() {
2450
+ return this.getToken(MiniscriptParser.PK_H, 0);
2451
+ };
2452
+
2453
+ OLDER() {
2454
+ return this.getToken(MiniscriptParser.OLDER, 0);
2455
+ };
2456
+
2457
+ AFTER() {
2458
+ return this.getToken(MiniscriptParser.AFTER, 0);
2459
+ };
2460
+
2461
+ SHA256() {
2462
+ return this.getToken(MiniscriptParser.SHA256, 0);
2463
+ };
2464
+
2465
+ HASH256() {
2466
+ return this.getToken(MiniscriptParser.HASH256, 0);
2467
+ };
2468
+
2469
+ HASH160() {
2470
+ return this.getToken(MiniscriptParser.HASH160, 0);
2471
+ };
2472
+
2473
+ RIPEMD160() {
2474
+ return this.getToken(MiniscriptParser.RIPEMD160, 0);
2475
+ };
2476
+
2477
+ MULTI() {
2478
+ return this.getToken(MiniscriptParser.MULTI, 0);
2479
+ };
2480
+
2481
+ MULTI_A() {
2482
+ return this.getToken(MiniscriptParser.MULTI_A, 0);
2483
+ };
2484
+
2485
+ AND_V() {
2486
+ return this.getToken(MiniscriptParser.AND_V, 0);
2487
+ };
2488
+
2489
+ AND_B() {
2490
+ return this.getToken(MiniscriptParser.AND_B, 0);
2491
+ };
2492
+
2493
+ AND_N() {
2494
+ return this.getToken(MiniscriptParser.AND_N, 0);
2495
+ };
2496
+
2497
+ OR_B() {
2498
+ return this.getToken(MiniscriptParser.OR_B, 0);
2499
+ };
2500
+
2501
+ OR_C() {
2502
+ return this.getToken(MiniscriptParser.OR_C, 0);
2503
+ };
2504
+
2505
+ OR_D() {
2506
+ return this.getToken(MiniscriptParser.OR_D, 0);
2507
+ };
2508
+
2509
+ OR_I() {
2510
+ return this.getToken(MiniscriptParser.OR_I, 0);
2511
+ };
2512
+
2513
+ ANDOR() {
2514
+ return this.getToken(MiniscriptParser.ANDOR, 0);
2515
+ };
2516
+
2517
+ THRESH() {
2518
+ return this.getToken(MiniscriptParser.THRESH, 0);
2519
+ };
2520
+
2521
+ enterRule(listener) {
2522
+ if(listener instanceof MiniscriptListener ) {
2523
+ listener.enterReservedKeyWord(this);
2524
+ }
2525
+ }
2526
+
2527
+ exitRule(listener) {
2528
+ if(listener instanceof MiniscriptListener ) {
2529
+ listener.exitReservedKeyWord(this);
2530
+ }
2531
+ }
2532
+
2533
+ accept(visitor) {
2534
+ if ( visitor instanceof MiniscriptVisitor ) {
2535
+ return visitor.visitReservedKeyWord(this);
2536
+ } else {
2537
+ return visitor.visitChildren(this);
2538
+ }
2539
+ }
2540
+
2541
+
2542
+ }
2543
+
2544
+
2545
+
2546
+ class PositiveIntegerContext extends antlr4.ParserRuleContext {
2547
+
2548
+ constructor(parser, parent, invokingState) {
2549
+ if(parent===undefined) {
2550
+ parent = null;
2551
+ }
2552
+ if(invokingState===undefined || invokingState===null) {
2553
+ invokingState = -1;
2554
+ }
2555
+ super(parent, invokingState);
2556
+ this.parser = parser;
2557
+ this.ruleIndex = MiniscriptParser.RULE_positiveInteger;
2558
+ }
2559
+
2560
+ ONE() {
2561
+ return this.getToken(MiniscriptParser.ONE, 0);
2562
+ };
2563
+
2564
+ DIGITS_64() {
2565
+ return this.getToken(MiniscriptParser.DIGITS_64, 0);
2566
+ };
2567
+
2568
+ DIGITS_40() {
2569
+ return this.getToken(MiniscriptParser.DIGITS_40, 0);
2570
+ };
2571
+
2572
+ POSITIVE_INTEGER() {
2573
+ return this.getToken(MiniscriptParser.POSITIVE_INTEGER, 0);
2574
+ };
2575
+
2576
+ enterRule(listener) {
2577
+ if(listener instanceof MiniscriptListener ) {
2578
+ listener.enterPositiveInteger(this);
2579
+ }
2580
+ }
2581
+
2582
+ exitRule(listener) {
2583
+ if(listener instanceof MiniscriptListener ) {
2584
+ listener.exitPositiveInteger(this);
2585
+ }
2586
+ }
2587
+
2588
+ accept(visitor) {
2589
+ if ( visitor instanceof MiniscriptVisitor ) {
2590
+ return visitor.visitPositiveInteger(this);
2591
+ } else {
2592
+ return visitor.visitChildren(this);
2593
+ }
2594
+ }
2595
+
2596
+
2597
+ }
2598
+
2599
+
2600
+
2601
+
2602
+ MiniscriptParser.MiniscriptContext = MiniscriptContext;
2603
+ MiniscriptParser.ExpressionContext = ExpressionContext;
2604
+ MiniscriptParser.BaseExpressionContext = BaseExpressionContext;
2605
+ MiniscriptParser.ConstantContext = ConstantContext;
2606
+ MiniscriptParser.KeyExpressionContext = KeyExpressionContext;
2607
+ MiniscriptParser.TimeExpressionContext = TimeExpressionContext;
2608
+ MiniscriptParser.HashExpressionContext = HashExpressionContext;
2609
+ MiniscriptParser.MultisigExpressionContext = MultisigExpressionContext;
2610
+ MiniscriptParser.BinaryExpressionContext = BinaryExpressionContext;
2611
+ MiniscriptParser.TernaryExpressionContext = TernaryExpressionContext;
2612
+ MiniscriptParser.ThresholdExpressionContext = ThresholdExpressionContext;
2613
+ MiniscriptParser.WrappedExpressionContext = WrappedExpressionContext;
2614
+ MiniscriptParser.Hash32Context = Hash32Context;
2615
+ MiniscriptParser.Hash20Context = Hash20Context;
2616
+ MiniscriptParser.KeyListContext = KeyListContext;
2617
+ MiniscriptParser.KeyList1To20Context = KeyList1To20Context;
2618
+ MiniscriptParser.KeyContext = KeyContext;
2619
+ MiniscriptParser.ReservedKeyWordContext = ReservedKeyWordContext;
2620
+ MiniscriptParser.PositiveIntegerContext = PositiveIntegerContext;