@malloydata/malloy 0.0.56-dev230710162623 → 0.0.56-dev230710183220

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. package/dist/lang/ast/index.d.ts +1 -0
  2. package/dist/lang/ast/index.js +1 -0
  3. package/dist/lang/ast/query-elements/existing-query.d.ts +3 -3
  4. package/dist/lang/ast/query-elements/existing-query.js +27 -25
  5. package/dist/lang/ast/query-elements/full-query.js +12 -0
  6. package/dist/lang/ast/query-elements/run-query.d.ts +3 -12
  7. package/dist/lang/ast/query-elements/run-query.js +3 -29
  8. package/dist/lang/ast/sources/named-source-or-query.d.ts +10 -0
  9. package/dist/lang/ast/sources/named-source-or-query.js +68 -0
  10. package/dist/lang/ast/sources/named-source.js +4 -4
  11. package/dist/lang/ast/types/malloy-element.d.ts +2 -0
  12. package/dist/lang/ast/types/malloy-element.js +13 -0
  13. package/dist/lang/lib/Malloy/MalloyLexer.d.ts +100 -98
  14. package/dist/lang/lib/Malloy/MalloyLexer.js +1125 -1112
  15. package/dist/lang/lib/Malloy/MalloyParser.d.ts +361 -273
  16. package/dist/lang/lib/Malloy/MalloyParser.js +3400 -2852
  17. package/dist/lang/lib/Malloy/MalloyParserListener.d.ts +218 -100
  18. package/dist/lang/lib/Malloy/MalloyParserVisitor.d.ts +135 -61
  19. package/dist/lang/malloy-to-ast.d.ts +17 -8
  20. package/dist/lang/malloy-to-ast.js +117 -61
  21. package/dist/lang/parse-malloy.d.ts +2 -0
  22. package/dist/lang/parse-malloy.js +2 -0
  23. package/dist/lang/parse-tree-walkers/document-symbol-walker.js +1 -10
  24. package/dist/lang/test/document-symbol-walker.spec.js +1 -1
  25. package/dist/lang/test/parse.spec.js +267 -18
  26. package/dist/lang/test/sql-block.spec.js +52 -2
  27. package/dist/lang/test/strings.spec.js +1 -1
  28. package/dist/tags.d.ts +1 -0
  29. package/dist/tags.js +10 -3
  30. package/package.json +1 -1
@@ -58,104 +58,106 @@ export declare class MalloyParser extends Parser {
58
58
  static readonly ELSE = 47;
59
59
  static readonly END = 48;
60
60
  static readonly EXCLUDE = 49;
61
- static readonly FALSE = 50;
62
- static readonly FOR = 51;
63
- static readonly FROM = 52;
64
- static readonly FROM_SQL = 53;
65
- static readonly HAS = 54;
66
- static readonly HOUR = 55;
67
- static readonly IMPORT = 56;
68
- static readonly IS = 57;
69
- static readonly JSON = 58;
70
- static readonly LAST = 59;
71
- static readonly MAX = 60;
72
- static readonly MIN = 61;
73
- static readonly MINUTE = 62;
74
- static readonly MONTH = 63;
75
- static readonly NOT = 64;
76
- static readonly NOW = 65;
77
- static readonly NULL = 66;
78
- static readonly NUMBER = 67;
79
- static readonly ON = 68;
80
- static readonly OR = 69;
81
- static readonly PICK = 70;
82
- static readonly QUARTER = 71;
83
- static readonly SECOND = 72;
84
- static readonly STRING = 73;
85
- static readonly SUM = 74;
86
- static readonly SQL = 75;
87
- static readonly TABLE = 76;
88
- static readonly THEN = 77;
89
- static readonly THIS = 78;
90
- static readonly TIMESTAMP = 79;
91
- static readonly TO = 80;
92
- static readonly TRUE = 81;
93
- static readonly TURTLE = 82;
94
- static readonly WEEK = 83;
95
- static readonly WHEN = 84;
96
- static readonly WITH = 85;
97
- static readonly YEAR = 86;
98
- static readonly UNGROUPED = 87;
99
- static readonly STRING_ESCAPE = 88;
100
- static readonly HACKY_REGEX = 89;
101
- static readonly SQ_STRING = 90;
102
- static readonly DQ_STRING = 91;
103
- static readonly BQ_STRING = 92;
104
- static readonly DOC_ANNOTATION = 93;
105
- static readonly ANNOTATION = 94;
106
- static readonly AMPER = 95;
107
- static readonly ARROW = 96;
108
- static readonly FAT_ARROW = 97;
109
- static readonly OPAREN = 98;
110
- static readonly CPAREN = 99;
111
- static readonly OBRACK = 100;
112
- static readonly CBRACK = 101;
113
- static readonly OCURLY = 102;
114
- static readonly CCURLY = 103;
115
- static readonly DOUBLECOLON = 104;
116
- static readonly TRIPLECOLON = 105;
117
- static readonly EXCLAM = 106;
118
- static readonly COLON = 107;
119
- static readonly COMMA = 108;
120
- static readonly DOT = 109;
121
- static readonly LT = 110;
122
- static readonly GT = 111;
123
- static readonly EQ = 112;
124
- static readonly NE = 113;
125
- static readonly LTE = 114;
126
- static readonly GTE = 115;
127
- static readonly PLUS = 116;
128
- static readonly MINUS = 117;
129
- static readonly STAR = 118;
130
- static readonly STARSTAR = 119;
131
- static readonly SLASH = 120;
132
- static readonly BAR = 121;
133
- static readonly SEMI = 122;
134
- static readonly NOT_MATCH = 123;
135
- static readonly MATCH = 124;
136
- static readonly PERCENT = 125;
137
- static readonly DOUBLE_QMARK = 126;
138
- static readonly QMARK = 127;
139
- static readonly LITERAL_TIMESTAMP = 128;
140
- static readonly LITERAL_HOUR = 129;
141
- static readonly LITERAL_DAY = 130;
142
- static readonly LITERAL_QUARTER = 131;
143
- static readonly LITERAL_MONTH = 132;
144
- static readonly LITERAL_WEEK = 133;
145
- static readonly LITERAL_YEAR = 134;
146
- static readonly IDENTIFIER = 135;
147
- static readonly PERCENT_LITERAL = 136;
148
- static readonly INTEGER_LITERAL = 137;
149
- static readonly NUMERIC_LITERAL = 138;
150
- static readonly BLOCK_COMMENT = 139;
151
- static readonly COMMENT_TO_EOL = 140;
152
- static readonly WHITE_SPACE = 141;
153
- static readonly SQL_BEGIN = 142;
154
- static readonly CLOSE_CODE = 143;
155
- static readonly UNWATED_CHARS_TRAILING_NUMBERS = 144;
156
- static readonly UNEXPECTED_CHAR = 145;
157
- static readonly OPEN_CODE = 146;
158
- static readonly SQL_END = 147;
61
+ static readonly EXTEND = 50;
62
+ static readonly FALSE = 51;
63
+ static readonly FOR = 52;
64
+ static readonly FROM = 53;
65
+ static readonly FROM_SQL = 54;
66
+ static readonly HAS = 55;
67
+ static readonly HOUR = 56;
68
+ static readonly IMPORT = 57;
69
+ static readonly IS = 58;
70
+ static readonly JSON = 59;
71
+ static readonly LAST = 60;
72
+ static readonly MAX = 61;
73
+ static readonly MIN = 62;
74
+ static readonly MINUTE = 63;
75
+ static readonly MONTH = 64;
76
+ static readonly NOT = 65;
77
+ static readonly NOW = 66;
78
+ static readonly NULL = 67;
79
+ static readonly NUMBER = 68;
80
+ static readonly ON = 69;
81
+ static readonly OR = 70;
82
+ static readonly PICK = 71;
83
+ static readonly QUARTER = 72;
84
+ static readonly REFINE = 73;
85
+ static readonly SECOND = 74;
86
+ static readonly STRING = 75;
87
+ static readonly SUM = 76;
88
+ static readonly SQL = 77;
89
+ static readonly TABLE = 78;
90
+ static readonly THEN = 79;
91
+ static readonly THIS = 80;
92
+ static readonly TIMESTAMP = 81;
93
+ static readonly TO = 82;
94
+ static readonly TRUE = 83;
95
+ static readonly TURTLE = 84;
96
+ static readonly WEEK = 85;
97
+ static readonly WHEN = 86;
98
+ static readonly WITH = 87;
99
+ static readonly YEAR = 88;
100
+ static readonly UNGROUPED = 89;
101
+ static readonly STRING_ESCAPE = 90;
102
+ static readonly HACKY_REGEX = 91;
103
+ static readonly SQ_STRING = 92;
104
+ static readonly DQ_STRING = 93;
105
+ static readonly BQ_STRING = 94;
106
+ static readonly DOC_ANNOTATION = 95;
107
+ static readonly ANNOTATION = 96;
108
+ static readonly AMPER = 97;
109
+ static readonly ARROW = 98;
110
+ static readonly FAT_ARROW = 99;
111
+ static readonly OPAREN = 100;
112
+ static readonly CPAREN = 101;
113
+ static readonly OBRACK = 102;
114
+ static readonly CBRACK = 103;
115
+ static readonly OCURLY = 104;
116
+ static readonly CCURLY = 105;
117
+ static readonly DOUBLECOLON = 106;
118
+ static readonly TRIPLECOLON = 107;
119
+ static readonly EXCLAM = 108;
120
+ static readonly COLON = 109;
121
+ static readonly COMMA = 110;
122
+ static readonly DOT = 111;
123
+ static readonly LT = 112;
124
+ static readonly GT = 113;
125
+ static readonly EQ = 114;
126
+ static readonly NE = 115;
127
+ static readonly LTE = 116;
128
+ static readonly GTE = 117;
129
+ static readonly PLUS = 118;
130
+ static readonly MINUS = 119;
131
+ static readonly STAR = 120;
132
+ static readonly STARSTAR = 121;
133
+ static readonly SLASH = 122;
134
+ static readonly BAR = 123;
135
+ static readonly SEMI = 124;
136
+ static readonly NOT_MATCH = 125;
137
+ static readonly MATCH = 126;
138
+ static readonly PERCENT = 127;
139
+ static readonly DOUBLE_QMARK = 128;
140
+ static readonly QMARK = 129;
141
+ static readonly LITERAL_TIMESTAMP = 130;
142
+ static readonly LITERAL_HOUR = 131;
143
+ static readonly LITERAL_DAY = 132;
144
+ static readonly LITERAL_QUARTER = 133;
145
+ static readonly LITERAL_MONTH = 134;
146
+ static readonly LITERAL_WEEK = 135;
147
+ static readonly LITERAL_YEAR = 136;
148
+ static readonly IDENTIFIER = 137;
149
+ static readonly PERCENT_LITERAL = 138;
150
+ static readonly INTEGER_LITERAL = 139;
151
+ static readonly NUMERIC_LITERAL = 140;
152
+ static readonly BLOCK_COMMENT = 141;
153
+ static readonly COMMENT_TO_EOL = 142;
154
+ static readonly WHITE_SPACE = 143;
155
+ static readonly SQL_BEGIN = 144;
156
+ static readonly CLOSE_CODE = 145;
157
+ static readonly UNWATED_CHARS_TRAILING_NUMBERS = 146;
158
+ static readonly UNEXPECTED_CHAR = 147;
159
+ static readonly OPEN_CODE = 148;
160
+ static readonly SQL_END = 149;
159
161
  static readonly RULE_malloyDocument = 0;
160
162
  static readonly RULE_malloyStatement = 1;
161
163
  static readonly RULE_defineSourceStatement = 2;
@@ -177,103 +179,109 @@ export declare class MalloyParser extends Parser {
177
179
  static readonly RULE_topLevelQueryDefs = 18;
178
180
  static readonly RULE_topLevelQueryDef = 19;
179
181
  static readonly RULE_refineOperator = 20;
180
- static readonly RULE_query = 21;
181
- static readonly RULE_pipelineFromName = 22;
182
- static readonly RULE_firstSegment = 23;
183
- static readonly RULE_pipeElement = 24;
184
- static readonly RULE_exploreTable = 25;
185
- static readonly RULE_connectionId = 26;
186
- static readonly RULE_queryProperties = 27;
187
- static readonly RULE_filterShortcut = 28;
188
- static readonly RULE_exploreQueryName = 29;
189
- static readonly RULE_queryName = 30;
190
- static readonly RULE_sourcePropertyList = 31;
191
- static readonly RULE_sourceDefinition = 32;
192
- static readonly RULE_explore = 33;
193
- static readonly RULE_exploreSource = 34;
194
- static readonly RULE_sourceNameDef = 35;
195
- static readonly RULE_sourceID = 36;
196
- static readonly RULE_exploreProperties = 37;
197
- static readonly RULE_exploreStatement = 38;
198
- static readonly RULE_defMeasures = 39;
199
- static readonly RULE_defDimensions = 40;
200
- static readonly RULE_renameList = 41;
201
- static readonly RULE_exploreRenameDef = 42;
202
- static readonly RULE_defList = 43;
203
- static readonly RULE_fieldDef = 44;
204
- static readonly RULE_fieldNameDef = 45;
205
- static readonly RULE_joinNameDef = 46;
206
- static readonly RULE_declareStatement = 47;
207
- static readonly RULE_joinStatement = 48;
208
- static readonly RULE_queryExtend = 49;
209
- static readonly RULE_queryExtendStatement = 50;
210
- static readonly RULE_queryExtendStatementList = 51;
211
- static readonly RULE_joinList = 52;
212
- static readonly RULE_isExplore = 53;
213
- static readonly RULE_joinDef = 54;
214
- static readonly RULE_joinExpression = 55;
215
- static readonly RULE_filterStatement = 56;
216
- static readonly RULE_filteredBy = 57;
217
- static readonly RULE_filterClauseList = 58;
218
- static readonly RULE_whereStatement = 59;
219
- static readonly RULE_havingStatement = 60;
220
- static readonly RULE_subQueryDefList = 61;
221
- static readonly RULE_exploreQueryNameDef = 62;
222
- static readonly RULE_exploreQueryDef = 63;
223
- static readonly RULE_queryStatement = 64;
224
- static readonly RULE_queryJoinStatement = 65;
225
- static readonly RULE_groupByStatement = 66;
226
- static readonly RULE_queryFieldList = 67;
227
- static readonly RULE_queryFieldEntry = 68;
228
- static readonly RULE_nestStatement = 69;
229
- static readonly RULE_nestedQueryList = 70;
230
- static readonly RULE_nestEntry = 71;
231
- static readonly RULE_aggregateStatement = 72;
232
- static readonly RULE_calculateStatement = 73;
233
- static readonly RULE_projectStatement = 74;
234
- static readonly RULE_orderByStatement = 75;
235
- static readonly RULE_ordering = 76;
236
- static readonly RULE_orderBySpec = 77;
237
- static readonly RULE_limitStatement = 78;
238
- static readonly RULE_bySpec = 79;
239
- static readonly RULE_topStatement = 80;
240
- static readonly RULE_indexElement = 81;
241
- static readonly RULE_indexFields = 82;
242
- static readonly RULE_indexStatement = 83;
243
- static readonly RULE_sampleStatement = 84;
244
- static readonly RULE_timezoneStatement = 85;
245
- static readonly RULE_queryAnnotation = 86;
246
- static readonly RULE_sampleSpec = 87;
247
- static readonly RULE_aggregate = 88;
248
- static readonly RULE_malloyType = 89;
249
- static readonly RULE_compareOp = 90;
250
- static readonly RULE_string = 91;
251
- static readonly RULE_shortString = 92;
252
- static readonly RULE_numericLiteral = 93;
253
- static readonly RULE_literal = 94;
254
- static readonly RULE_dateLiteral = 95;
255
- static readonly RULE_tablePath = 96;
256
- static readonly RULE_tableURI = 97;
257
- static readonly RULE_id = 98;
258
- static readonly RULE_timeframe = 99;
259
- static readonly RULE_ungroup = 100;
260
- static readonly RULE_fieldExpr = 101;
261
- static readonly RULE_partialAllowedFieldExpr = 102;
262
- static readonly RULE_pickStatement = 103;
263
- static readonly RULE_pick = 104;
264
- static readonly RULE_argumentList = 105;
265
- static readonly RULE_fieldNameList = 106;
266
- static readonly RULE_fieldCollection = 107;
267
- static readonly RULE_collectionWildCard = 108;
268
- static readonly RULE_taggedRef = 109;
269
- static readonly RULE_collectionMember = 110;
270
- static readonly RULE_fieldPath = 111;
271
- static readonly RULE_joinName = 112;
272
- static readonly RULE_fieldName = 113;
273
- static readonly RULE_justExpr = 114;
274
- static readonly RULE_sqlExploreNameRef = 115;
275
- static readonly RULE_nameSQLBlock = 116;
276
- static readonly RULE_connectionName = 117;
182
+ static readonly RULE_queryRefinement = 21;
183
+ static readonly RULE_sourceExtension = 22;
184
+ static readonly RULE_query = 23;
185
+ static readonly RULE_unrefinableQuery = 24;
186
+ static readonly RULE_refinableQuery = 25;
187
+ static readonly RULE_unextendableSource = 26;
188
+ static readonly RULE_extendableSource = 27;
189
+ static readonly RULE_sqlSource = 28;
190
+ static readonly RULE_pipelineFromName = 29;
191
+ static readonly RULE_firstSegment = 30;
192
+ static readonly RULE_pipeElement = 31;
193
+ static readonly RULE_exploreTable = 32;
194
+ static readonly RULE_connectionId = 33;
195
+ static readonly RULE_queryProperties = 34;
196
+ static readonly RULE_filterShortcut = 35;
197
+ static readonly RULE_exploreQueryName = 36;
198
+ static readonly RULE_queryName = 37;
199
+ static readonly RULE_sourcePropertyList = 38;
200
+ static readonly RULE_sourceDefinition = 39;
201
+ static readonly RULE_explore = 40;
202
+ static readonly RULE_sourceNameDef = 41;
203
+ static readonly RULE_sourceID = 42;
204
+ static readonly RULE_exploreProperties = 43;
205
+ static readonly RULE_exploreStatement = 44;
206
+ static readonly RULE_defMeasures = 45;
207
+ static readonly RULE_defDimensions = 46;
208
+ static readonly RULE_renameList = 47;
209
+ static readonly RULE_exploreRenameDef = 48;
210
+ static readonly RULE_defList = 49;
211
+ static readonly RULE_fieldDef = 50;
212
+ static readonly RULE_fieldNameDef = 51;
213
+ static readonly RULE_joinNameDef = 52;
214
+ static readonly RULE_declareStatement = 53;
215
+ static readonly RULE_joinStatement = 54;
216
+ static readonly RULE_queryExtend = 55;
217
+ static readonly RULE_queryExtendStatement = 56;
218
+ static readonly RULE_queryExtendStatementList = 57;
219
+ static readonly RULE_joinList = 58;
220
+ static readonly RULE_isExplore = 59;
221
+ static readonly RULE_joinDef = 60;
222
+ static readonly RULE_joinExpression = 61;
223
+ static readonly RULE_filterStatement = 62;
224
+ static readonly RULE_filteredBy = 63;
225
+ static readonly RULE_filterClauseList = 64;
226
+ static readonly RULE_whereStatement = 65;
227
+ static readonly RULE_havingStatement = 66;
228
+ static readonly RULE_subQueryDefList = 67;
229
+ static readonly RULE_exploreQueryNameDef = 68;
230
+ static readonly RULE_exploreQueryDef = 69;
231
+ static readonly RULE_queryStatement = 70;
232
+ static readonly RULE_queryJoinStatement = 71;
233
+ static readonly RULE_groupByStatement = 72;
234
+ static readonly RULE_queryFieldList = 73;
235
+ static readonly RULE_queryFieldEntry = 74;
236
+ static readonly RULE_nestStatement = 75;
237
+ static readonly RULE_nestedQueryList = 76;
238
+ static readonly RULE_nestEntry = 77;
239
+ static readonly RULE_aggregateStatement = 78;
240
+ static readonly RULE_calculateStatement = 79;
241
+ static readonly RULE_projectStatement = 80;
242
+ static readonly RULE_orderByStatement = 81;
243
+ static readonly RULE_ordering = 82;
244
+ static readonly RULE_orderBySpec = 83;
245
+ static readonly RULE_limitStatement = 84;
246
+ static readonly RULE_bySpec = 85;
247
+ static readonly RULE_topStatement = 86;
248
+ static readonly RULE_indexElement = 87;
249
+ static readonly RULE_indexFields = 88;
250
+ static readonly RULE_indexStatement = 89;
251
+ static readonly RULE_sampleStatement = 90;
252
+ static readonly RULE_timezoneStatement = 91;
253
+ static readonly RULE_queryAnnotation = 92;
254
+ static readonly RULE_sampleSpec = 93;
255
+ static readonly RULE_aggregate = 94;
256
+ static readonly RULE_malloyType = 95;
257
+ static readonly RULE_compareOp = 96;
258
+ static readonly RULE_string = 97;
259
+ static readonly RULE_shortString = 98;
260
+ static readonly RULE_numericLiteral = 99;
261
+ static readonly RULE_literal = 100;
262
+ static readonly RULE_dateLiteral = 101;
263
+ static readonly RULE_tablePath = 102;
264
+ static readonly RULE_tableURI = 103;
265
+ static readonly RULE_id = 104;
266
+ static readonly RULE_timeframe = 105;
267
+ static readonly RULE_ungroup = 106;
268
+ static readonly RULE_fieldExpr = 107;
269
+ static readonly RULE_partialAllowedFieldExpr = 108;
270
+ static readonly RULE_pickStatement = 109;
271
+ static readonly RULE_pick = 110;
272
+ static readonly RULE_argumentList = 111;
273
+ static readonly RULE_fieldNameList = 112;
274
+ static readonly RULE_fieldCollection = 113;
275
+ static readonly RULE_collectionWildCard = 114;
276
+ static readonly RULE_taggedRef = 115;
277
+ static readonly RULE_collectionMember = 116;
278
+ static readonly RULE_fieldPath = 117;
279
+ static readonly RULE_joinName = 118;
280
+ static readonly RULE_fieldName = 119;
281
+ static readonly RULE_justExpr = 120;
282
+ static readonly RULE_sqlExploreNameRef = 121;
283
+ static readonly RULE_nameSQLBlock = 122;
284
+ static readonly RULE_connectionName = 123;
277
285
  static readonly ruleNames: string[];
278
286
  private static readonly _LITERAL_NAMES;
279
287
  private static readonly _SYMBOLIC_NAMES;
@@ -305,7 +313,14 @@ export declare class MalloyParser extends Parser {
305
313
  topLevelQueryDefs(): TopLevelQueryDefsContext;
306
314
  topLevelQueryDef(): TopLevelQueryDefContext;
307
315
  refineOperator(): RefineOperatorContext;
316
+ queryRefinement(): QueryRefinementContext;
317
+ sourceExtension(): SourceExtensionContext;
308
318
  query(): QueryContext;
319
+ unrefinableQuery(): UnrefinableQueryContext;
320
+ refinableQuery(): RefinableQueryContext;
321
+ unextendableSource(): UnextendableSourceContext;
322
+ extendableSource(): ExtendableSourceContext;
323
+ sqlSource(): SqlSourceContext;
309
324
  pipelineFromName(): PipelineFromNameContext;
310
325
  firstSegment(): FirstSegmentContext;
311
326
  pipeElement(): PipeElementContext;
@@ -318,7 +333,6 @@ export declare class MalloyParser extends Parser {
318
333
  sourcePropertyList(): SourcePropertyListContext;
319
334
  sourceDefinition(): SourceDefinitionContext;
320
335
  explore(): ExploreContext;
321
- exploreSource(): ExploreSourceContext;
322
336
  sourceNameDef(): SourceNameDefContext;
323
337
  sourceID(): SourceIDContext;
324
338
  exploreProperties(): ExplorePropertiesContext;
@@ -501,26 +515,14 @@ export declare class IsDefineContext extends ParserRuleContext {
501
515
  accept<Result>(visitor: MalloyParserVisitor<Result>): Result;
502
516
  }
503
517
  export declare class RunStatementContext extends ParserRuleContext {
504
- constructor(parent: ParserRuleContext | undefined, invokingState: number);
505
- get ruleIndex(): number;
506
- copyFrom(ctx: RunStatementContext): void;
507
- }
508
- export declare class RunStatementDefContext extends RunStatementContext {
509
518
  _blockTags: TagsContext;
510
519
  _noteTags: TagsContext;
511
520
  RUN(): TerminalNode;
512
521
  topLevelAnonQueryDef(): TopLevelAnonQueryDefContext;
513
522
  tags(): TagsContext[];
514
523
  tags(i: number): TagsContext;
515
- constructor(ctx: RunStatementContext);
516
- enterRule(listener: MalloyParserListener): void;
517
- exitRule(listener: MalloyParserListener): void;
518
- accept<Result>(visitor: MalloyParserVisitor<Result>): Result;
519
- }
520
- export declare class RunStatementRefContext extends RunStatementContext {
521
- RUN(): TerminalNode;
522
- queryName(): QueryNameContext;
523
- constructor(ctx: RunStatementContext);
524
+ constructor(parent: ParserRuleContext | undefined, invokingState: number);
525
+ get ruleIndex(): number;
524
526
  enterRule(listener: MalloyParserListener): void;
525
527
  exitRule(listener: MalloyParserListener): void;
526
528
  accept<Result>(visitor: MalloyParserVisitor<Result>): Result;
@@ -572,7 +574,8 @@ export declare class SqlStringContext extends ParserRuleContext {
572
574
  export declare class SqlInterpolationContext extends ParserRuleContext {
573
575
  OPEN_CODE(): TerminalNode;
574
576
  query(): QueryContext;
575
- CLOSE_CODE(): TerminalNode;
577
+ CCURLY(): TerminalNode | undefined;
578
+ CLOSE_CODE(): TerminalNode | undefined;
576
579
  constructor(parent: ParserRuleContext | undefined, invokingState: number);
577
580
  get ruleIndex(): number;
578
581
  enterRule(listener: MalloyParserListener): void;
@@ -655,28 +658,156 @@ export declare class RefineOperatorContext extends ParserRuleContext {
655
658
  exitRule(listener: MalloyParserListener): void;
656
659
  accept<Result>(visitor: MalloyParserVisitor<Result>): Result;
657
660
  }
661
+ export declare class QueryRefinementContext extends ParserRuleContext {
662
+ queryProperties(): QueryPropertiesContext;
663
+ refineOperator(): RefineOperatorContext | undefined;
664
+ REFINE(): TerminalNode | undefined;
665
+ constructor(parent: ParserRuleContext | undefined, invokingState: number);
666
+ get ruleIndex(): number;
667
+ enterRule(listener: MalloyParserListener): void;
668
+ exitRule(listener: MalloyParserListener): void;
669
+ accept<Result>(visitor: MalloyParserVisitor<Result>): Result;
670
+ }
671
+ export declare class SourceExtensionContext extends ParserRuleContext {
672
+ exploreProperties(): ExplorePropertiesContext;
673
+ refineOperator(): RefineOperatorContext | undefined;
674
+ EXTEND(): TerminalNode | undefined;
675
+ constructor(parent: ParserRuleContext | undefined, invokingState: number);
676
+ get ruleIndex(): number;
677
+ enterRule(listener: MalloyParserListener): void;
678
+ exitRule(listener: MalloyParserListener): void;
679
+ accept<Result>(visitor: MalloyParserVisitor<Result>): Result;
680
+ }
658
681
  export declare class QueryContext extends ParserRuleContext {
659
682
  constructor(parent: ParserRuleContext | undefined, invokingState: number);
660
683
  get ruleIndex(): number;
661
684
  copyFrom(ctx: QueryContext): void;
662
685
  }
663
- export declare class ExploreArrowQueryContext extends QueryContext {
664
- explore(): ExploreContext;
665
- ARROW(): TerminalNode;
666
- pipelineFromName(): PipelineFromNameContext;
686
+ export declare class NormalQueryContext extends QueryContext {
687
+ unrefinableQuery(): UnrefinableQueryContext;
688
+ pipeElement(): PipeElementContext[];
689
+ pipeElement(i: number): PipeElementContext;
667
690
  constructor(ctx: QueryContext);
668
691
  enterRule(listener: MalloyParserListener): void;
669
692
  exitRule(listener: MalloyParserListener): void;
670
693
  accept<Result>(visitor: MalloyParserVisitor<Result>): Result;
671
694
  }
672
- export declare class ArrowQueryContext extends QueryContext {
673
- ARROW(): TerminalNode;
674
- queryName(): QueryNameContext;
675
- queryProperties(): QueryPropertiesContext | undefined;
695
+ export declare class QueryFromSQLSourceContext extends QueryContext {
696
+ sqlSource(): SqlSourceContext;
697
+ constructor(ctx: QueryContext);
698
+ enterRule(listener: MalloyParserListener): void;
699
+ exitRule(listener: MalloyParserListener): void;
700
+ accept<Result>(visitor: MalloyParserVisitor<Result>): Result;
701
+ }
702
+ export declare class UnrefinableQueryContext extends ParserRuleContext {
703
+ constructor(parent: ParserRuleContext | undefined, invokingState: number);
704
+ get ruleIndex(): number;
705
+ copyFrom(ctx: UnrefinableQueryContext): void;
706
+ }
707
+ export declare class QueryFromSourceContext extends UnrefinableQueryContext {
708
+ unextendableSource(): UnextendableSourceContext;
676
709
  pipeElement(): PipeElementContext[];
677
710
  pipeElement(i: number): PipeElementContext;
678
- refineOperator(): RefineOperatorContext | undefined;
679
- constructor(ctx: QueryContext);
711
+ constructor(ctx: UnrefinableQueryContext);
712
+ enterRule(listener: MalloyParserListener): void;
713
+ exitRule(listener: MalloyParserListener): void;
714
+ accept<Result>(visitor: MalloyParserVisitor<Result>): Result;
715
+ }
716
+ export declare class RefinedQueryContext extends UnrefinableQueryContext {
717
+ refinableQuery(): RefinableQueryContext;
718
+ queryRefinement(): QueryRefinementContext | undefined;
719
+ constructor(ctx: UnrefinableQueryContext);
720
+ enterRule(listener: MalloyParserListener): void;
721
+ exitRule(listener: MalloyParserListener): void;
722
+ accept<Result>(visitor: MalloyParserVisitor<Result>): Result;
723
+ }
724
+ export declare class RefinableQueryContext extends ParserRuleContext {
725
+ constructor(parent: ParserRuleContext | undefined, invokingState: number);
726
+ get ruleIndex(): number;
727
+ copyFrom(ctx: RefinableQueryContext): void;
728
+ }
729
+ export declare class QueryByNameContext extends RefinableQueryContext {
730
+ id(): IdContext;
731
+ ARROW(): TerminalNode | undefined;
732
+ constructor(ctx: RefinableQueryContext);
733
+ enterRule(listener: MalloyParserListener): void;
734
+ exitRule(listener: MalloyParserListener): void;
735
+ accept<Result>(visitor: MalloyParserVisitor<Result>): Result;
736
+ }
737
+ export declare class QueryByTurtleNameContext extends RefinableQueryContext {
738
+ unextendableSource(): UnextendableSourceContext;
739
+ ARROW(): TerminalNode;
740
+ id(): IdContext;
741
+ constructor(ctx: RefinableQueryContext);
742
+ enterRule(listener: MalloyParserListener): void;
743
+ exitRule(listener: MalloyParserListener): void;
744
+ accept<Result>(visitor: MalloyParserVisitor<Result>): Result;
745
+ }
746
+ export declare class UnextendableSourceContext extends ParserRuleContext {
747
+ extendableSource(): ExtendableSourceContext;
748
+ sourceExtension(): SourceExtensionContext | undefined;
749
+ constructor(parent: ParserRuleContext | undefined, invokingState: number);
750
+ get ruleIndex(): number;
751
+ enterRule(listener: MalloyParserListener): void;
752
+ exitRule(listener: MalloyParserListener): void;
753
+ accept<Result>(visitor: MalloyParserVisitor<Result>): Result;
754
+ }
755
+ export declare class ExtendableSourceContext extends ParserRuleContext {
756
+ constructor(parent: ParserRuleContext | undefined, invokingState: number);
757
+ get ruleIndex(): number;
758
+ copyFrom(ctx: ExtendableSourceContext): void;
759
+ }
760
+ export declare class SourceFromNamedModelEntryContext extends ExtendableSourceContext {
761
+ sourceID(): SourceIDContext;
762
+ constructor(ctx: ExtendableSourceContext);
763
+ enterRule(listener: MalloyParserListener): void;
764
+ exitRule(listener: MalloyParserListener): void;
765
+ accept<Result>(visitor: MalloyParserVisitor<Result>): Result;
766
+ }
767
+ export declare class TableSourceContext extends ExtendableSourceContext {
768
+ exploreTable(): ExploreTableContext;
769
+ constructor(ctx: ExtendableSourceContext);
770
+ enterRule(listener: MalloyParserListener): void;
771
+ exitRule(listener: MalloyParserListener): void;
772
+ accept<Result>(visitor: MalloyParserVisitor<Result>): Result;
773
+ }
774
+ export declare class QuerySourceContext extends ExtendableSourceContext {
775
+ FROM(): TerminalNode;
776
+ OPAREN(): TerminalNode;
777
+ query(): QueryContext;
778
+ CPAREN(): TerminalNode;
779
+ constructor(ctx: ExtendableSourceContext);
780
+ enterRule(listener: MalloyParserListener): void;
781
+ exitRule(listener: MalloyParserListener): void;
782
+ accept<Result>(visitor: MalloyParserVisitor<Result>): Result;
783
+ }
784
+ export declare class SQLSourceNameContext extends ExtendableSourceContext {
785
+ FROM_SQL(): TerminalNode;
786
+ OPAREN(): TerminalNode;
787
+ sqlExploreNameRef(): SqlExploreNameRefContext;
788
+ CPAREN(): TerminalNode;
789
+ constructor(ctx: ExtendableSourceContext);
790
+ enterRule(listener: MalloyParserListener): void;
791
+ exitRule(listener: MalloyParserListener): void;
792
+ accept<Result>(visitor: MalloyParserVisitor<Result>): Result;
793
+ }
794
+ export declare class SQLSource_stubContext extends ExtendableSourceContext {
795
+ sqlSource(): SqlSourceContext;
796
+ constructor(ctx: ExtendableSourceContext);
797
+ enterRule(listener: MalloyParserListener): void;
798
+ exitRule(listener: MalloyParserListener): void;
799
+ accept<Result>(visitor: MalloyParserVisitor<Result>): Result;
800
+ }
801
+ export declare class SqlSourceContext extends ParserRuleContext {
802
+ connectionId(): ConnectionIdContext;
803
+ DOT(): TerminalNode;
804
+ SQL(): TerminalNode;
805
+ OPAREN(): TerminalNode;
806
+ CPAREN(): TerminalNode;
807
+ sqlString(): SqlStringContext | undefined;
808
+ shortString(): ShortStringContext | undefined;
809
+ constructor(parent: ParserRuleContext | undefined, invokingState: number);
810
+ get ruleIndex(): number;
680
811
  enterRule(listener: MalloyParserListener): void;
681
812
  exitRule(listener: MalloyParserListener): void;
682
813
  accept<Result>(visitor: MalloyParserVisitor<Result>): Result;
@@ -694,7 +825,7 @@ export declare class PipelineFromNameContext extends ParserRuleContext {
694
825
  export declare class FirstSegmentContext extends ParserRuleContext {
695
826
  queryProperties(): QueryPropertiesContext | undefined;
696
827
  exploreQueryName(): ExploreQueryNameContext | undefined;
697
- refineOperator(): RefineOperatorContext | undefined;
828
+ queryRefinement(): QueryRefinementContext | undefined;
698
829
  constructor(parent: ParserRuleContext | undefined, invokingState: number);
699
830
  get ruleIndex(): number;
700
831
  enterRule(listener: MalloyParserListener): void;
@@ -809,63 +940,21 @@ export declare class SourceDefinitionContext extends ParserRuleContext {
809
940
  accept<Result>(visitor: MalloyParserVisitor<Result>): Result;
810
941
  }
811
942
  export declare class ExploreContext extends ParserRuleContext {
812
- exploreSource(): ExploreSourceContext;
813
- exploreProperties(): ExplorePropertiesContext | undefined;
814
- refineOperator(): RefineOperatorContext | undefined;
815
- constructor(parent: ParserRuleContext | undefined, invokingState: number);
816
- get ruleIndex(): number;
817
- enterRule(listener: MalloyParserListener): void;
818
- exitRule(listener: MalloyParserListener): void;
819
- accept<Result>(visitor: MalloyParserVisitor<Result>): Result;
820
- }
821
- export declare class ExploreSourceContext extends ParserRuleContext {
822
943
  constructor(parent: ParserRuleContext | undefined, invokingState: number);
823
944
  get ruleIndex(): number;
824
- copyFrom(ctx: ExploreSourceContext): void;
945
+ copyFrom(ctx: ExploreContext): void;
825
946
  }
826
- export declare class NamedSourceContext extends ExploreSourceContext {
827
- sourceID(): SourceIDContext;
828
- constructor(ctx: ExploreSourceContext);
947
+ export declare class BareExtendedSource_stubContext extends ExploreContext {
948
+ unextendableSource(): UnextendableSourceContext;
949
+ constructor(ctx: ExploreContext);
829
950
  enterRule(listener: MalloyParserListener): void;
830
951
  exitRule(listener: MalloyParserListener): void;
831
952
  accept<Result>(visitor: MalloyParserVisitor<Result>): Result;
832
953
  }
833
- export declare class TableSourceContext extends ExploreSourceContext {
834
- exploreTable(): ExploreTableContext;
835
- constructor(ctx: ExploreSourceContext);
836
- enterRule(listener: MalloyParserListener): void;
837
- exitRule(listener: MalloyParserListener): void;
838
- accept<Result>(visitor: MalloyParserVisitor<Result>): Result;
839
- }
840
- export declare class QuerySourceContext extends ExploreSourceContext {
841
- FROM(): TerminalNode;
842
- OPAREN(): TerminalNode;
954
+ export declare class ExtendedQueryContext extends ExploreContext {
843
955
  query(): QueryContext;
844
- CPAREN(): TerminalNode;
845
- constructor(ctx: ExploreSourceContext);
846
- enterRule(listener: MalloyParserListener): void;
847
- exitRule(listener: MalloyParserListener): void;
848
- accept<Result>(visitor: MalloyParserVisitor<Result>): Result;
849
- }
850
- export declare class SQLSourceNameContext extends ExploreSourceContext {
851
- FROM_SQL(): TerminalNode;
852
- OPAREN(): TerminalNode;
853
- sqlExploreNameRef(): SqlExploreNameRefContext;
854
- CPAREN(): TerminalNode;
855
- constructor(ctx: ExploreSourceContext);
856
- enterRule(listener: MalloyParserListener): void;
857
- exitRule(listener: MalloyParserListener): void;
858
- accept<Result>(visitor: MalloyParserVisitor<Result>): Result;
859
- }
860
- export declare class SQLSourceContext extends ExploreSourceContext {
861
- connectionId(): ConnectionIdContext;
862
- DOT(): TerminalNode;
863
- SQL(): TerminalNode;
864
- OPAREN(): TerminalNode;
865
- CPAREN(): TerminalNode;
866
- sqlString(): SqlStringContext | undefined;
867
- shortString(): ShortStringContext | undefined;
868
- constructor(ctx: ExploreSourceContext);
956
+ sourceExtension(): SourceExtensionContext;
957
+ constructor(ctx: ExploreContext);
869
958
  enterRule(listener: MalloyParserListener): void;
870
959
  exitRule(listener: MalloyParserListener): void;
871
960
  accept<Result>(visitor: MalloyParserVisitor<Result>): Result;
@@ -1390,8 +1479,7 @@ export declare class NestEntryContext extends ParserRuleContext {
1390
1479
  export declare class NestExistingContext extends NestEntryContext {
1391
1480
  tags(): TagsContext;
1392
1481
  queryName(): QueryNameContext;
1393
- queryProperties(): QueryPropertiesContext | undefined;
1394
- refineOperator(): RefineOperatorContext | undefined;
1482
+ queryRefinement(): QueryRefinementContext | undefined;
1395
1483
  constructor(ctx: NestEntryContext);
1396
1484
  enterRule(listener: MalloyParserListener): void;
1397
1485
  exitRule(listener: MalloyParserListener): void;