@malloydata/render 0.0.122 → 0.0.123-dev240205152128

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.
@@ -226,6 +226,7 @@
226
226
  between: options === null || options === void 0 ? void 0 : options.between,
227
227
  isSymmetric: options === null || options === void 0 ? void 0 : options.isSymmetric,
228
228
  supportsOrderBy: options === null || options === void 0 ? void 0 : options.supportsOrderBy,
229
+ defaultOrderByArgIndex: options === null || options === void 0 ? void 0 : options.defaultOrderByArgIndex,
229
230
  supportsLimit: options === null || options === void 0 ? void 0 : options.supportsLimit
230
231
  };
231
232
  }
@@ -2461,8 +2462,8 @@
2461
2462
  const separator = (0, util_1.makeParam)("separator", (0, util_1.literal)((0, util_1.maxScalar)("string")));
2462
2463
  const orderBy = { type: "aggregate_order_by" };
2463
2464
  return [
2464
- (0, util_1.overload)((0, util_1.minAggregate)("string"), [value3.param], (0, util_1.sql)`STRING_AGG(${value3.arg}${orderBy})`, { supportsOrderBy: true }),
2465
- (0, util_1.overload)((0, util_1.minAggregate)("string"), [value3.param, separator.param], (0, util_1.sql)`STRING_AGG(${value3.arg}, ${separator.arg}${orderBy})`, { supportsOrderBy: true })
2465
+ (0, util_1.overload)((0, util_1.minAggregate)("string"), [value3.param], (0, util_1.sql)`STRING_AGG(${value3.arg}${orderBy})`, { supportsOrderBy: true, defaultOrderByArgIndex: 0 }),
2466
+ (0, util_1.overload)((0, util_1.minAggregate)("string"), [value3.param, separator.param], (0, util_1.sql)`STRING_AGG(${value3.arg}, ${separator.arg}${orderBy})`, { supportsOrderBy: true, defaultOrderByArgIndex: 0 })
2466
2467
  ];
2467
2468
  }
2468
2469
  exports.fnStringAgg = fnStringAgg;
@@ -2471,8 +2472,16 @@
2471
2472
  const separator = (0, util_1.makeParam)("separator", (0, util_1.literal)((0, util_1.maxScalar)("string")));
2472
2473
  const orderBy = { type: "aggregate_order_by" };
2473
2474
  return [
2474
- (0, util_1.overload)((0, util_1.minAggregate)("string"), [value3.param], (0, util_1.sql)`STRING_AGG(DISTINCT ${value3.arg}${orderBy})`, { isSymmetric: true, supportsOrderBy: true }),
2475
- (0, util_1.overload)((0, util_1.minAggregate)("string"), [value3.param, separator.param], (0, util_1.sql)`STRING_AGG(DISTINCT ${value3.arg}, ${separator.arg}${orderBy})`, { isSymmetric: true, supportsOrderBy: true })
2475
+ (0, util_1.overload)((0, util_1.minAggregate)("string"), [value3.param], (0, util_1.sql)`STRING_AGG(DISTINCT ${value3.arg}${orderBy})`, {
2476
+ isSymmetric: true,
2477
+ supportsOrderBy: "only_default",
2478
+ defaultOrderByArgIndex: 0
2479
+ }),
2480
+ (0, util_1.overload)((0, util_1.minAggregate)("string"), [value3.param, separator.param], (0, util_1.sql)`STRING_AGG(DISTINCT ${value3.arg}, ${separator.arg}${orderBy})`, {
2481
+ isSymmetric: true,
2482
+ supportsOrderBy: "only_default",
2483
+ defaultOrderByArgIndex: 0
2484
+ })
2476
2485
  ];
2477
2486
  }
2478
2487
  exports.fnStringAggDistinct = fnStringAggDistinct;
@@ -2668,8 +2677,8 @@
2668
2677
  const orderBy = { type: "aggregate_order_by" };
2669
2678
  const limit = { type: "aggregate_limit" };
2670
2679
  return [
2671
- (0, util_1.overload)((0, util_1.minAggregate)("string"), [value3.param], (0, util_1.sql)`STRING_AGG(${value3.arg}${orderBy}${limit})`, { supportsOrderBy: true, supportsLimit: true }),
2672
- (0, util_1.overload)((0, util_1.minAggregate)("string"), [value3.param, separator.param], (0, util_1.sql)`STRING_AGG(${value3.arg}, ${separator.arg}${orderBy}${limit})`, { supportsOrderBy: true, supportsLimit: true })
2680
+ (0, util_1.overload)((0, util_1.minAggregate)("string"), [value3.param], (0, util_1.sql)`STRING_AGG(${value3.arg}${orderBy}${limit})`, { supportsOrderBy: true, supportsLimit: true, defaultOrderByArgIndex: 0 }),
2681
+ (0, util_1.overload)((0, util_1.minAggregate)("string"), [value3.param, separator.param], (0, util_1.sql)`STRING_AGG(${value3.arg}, ${separator.arg}${orderBy}${limit})`, { supportsOrderBy: true, supportsLimit: true, defaultOrderByArgIndex: 0 })
2673
2682
  ];
2674
2683
  }
2675
2684
  exports.fnStringAgg = fnStringAgg;
@@ -2679,8 +2688,18 @@
2679
2688
  const orderBy = { type: "aggregate_order_by" };
2680
2689
  const limit = { type: "aggregate_limit" };
2681
2690
  return [
2682
- (0, util_1.overload)((0, util_1.minAggregate)("string"), [value3.param], (0, util_1.sql)`STRING_AGG(DISTINCT ${value3.arg}${orderBy}${limit})`, { isSymmetric: true, supportsOrderBy: true, supportsLimit: true }),
2683
- (0, util_1.overload)((0, util_1.minAggregate)("string"), [value3.param, separator.param], (0, util_1.sql)`STRING_AGG(DISTINCT ${value3.arg}, ${separator.arg}${orderBy}${limit})`, { isSymmetric: true, supportsOrderBy: true, supportsLimit: true })
2691
+ (0, util_1.overload)((0, util_1.minAggregate)("string"), [value3.param], (0, util_1.sql)`STRING_AGG(DISTINCT ${value3.arg}${orderBy}${limit})`, {
2692
+ isSymmetric: true,
2693
+ supportsOrderBy: "only_default",
2694
+ supportsLimit: true,
2695
+ defaultOrderByArgIndex: 0
2696
+ }),
2697
+ (0, util_1.overload)((0, util_1.minAggregate)("string"), [value3.param, separator.param], (0, util_1.sql)`STRING_AGG(DISTINCT ${value3.arg}, ${separator.arg}${orderBy}${limit})`, {
2698
+ isSymmetric: true,
2699
+ supportsOrderBy: "only_default",
2700
+ supportsLimit: true,
2701
+ defaultOrderByArgIndex: 0
2702
+ })
2684
2703
  ];
2685
2704
  }
2686
2705
  exports.fnStringAggDistinct = fnStringAggDistinct;
@@ -3234,8 +3253,16 @@ ${(0, utils_1.indent)(sql)}
3234
3253
  const separator = (0, util_1.makeParam)("separator", (0, util_1.literal)((0, util_1.maxScalar)("string")));
3235
3254
  const orderBy = { type: "aggregate_order_by" };
3236
3255
  return [
3237
- (0, util_1.overload)((0, util_1.minAggregate)("string"), [value3.param], (0, util_1.sql)`STRING_AGG(DISTINCT ${value3.arg}, ','${orderBy})`, { isSymmetric: true, supportsOrderBy: true }),
3238
- (0, util_1.overload)((0, util_1.minAggregate)("string"), [value3.param, separator.param], (0, util_1.sql)`STRING_AGG(DISTINCT ${value3.arg}, ${separator.arg}${orderBy})`, { isSymmetric: true, supportsOrderBy: true })
3256
+ (0, util_1.overload)((0, util_1.minAggregate)("string"), [value3.param], (0, util_1.sql)`STRING_AGG(DISTINCT ${value3.arg}, ','${orderBy})`, {
3257
+ isSymmetric: true,
3258
+ supportsOrderBy: "only_default",
3259
+ defaultOrderByArgIndex: 0
3260
+ }),
3261
+ (0, util_1.overload)((0, util_1.minAggregate)("string"), [value3.param, separator.param], (0, util_1.sql)`STRING_AGG(DISTINCT ${value3.arg}, ${separator.arg}${orderBy})`, {
3262
+ isSymmetric: true,
3263
+ supportsOrderBy: "only_default",
3264
+ defaultOrderByArgIndex: 0
3265
+ })
3239
3266
  ];
3240
3267
  }
3241
3268
  exports.fnStringAggDistinct = fnStringAggDistinct;
@@ -4734,6 +4761,7 @@ ${hackSplitComment}
4734
4761
  existingOverload.dialect[dialect.name] = {
4735
4762
  e: overload.e,
4736
4763
  supportsOrderBy: overload.supportsOrderBy,
4764
+ defaultOrderByArgIndex: overload.defaultOrderByArgIndex,
4737
4765
  supportsLimit: overload.supportsLimit
4738
4766
  };
4739
4767
  handled = true;
@@ -4746,6 +4774,7 @@ ${hackSplitComment}
4746
4774
  [dialect.name]: {
4747
4775
  e: overload.e,
4748
4776
  supportsOrderBy: overload.supportsOrderBy,
4777
+ defaultOrderByArgIndex: overload.defaultOrderByArgIndex,
4749
4778
  supportsLimit: overload.supportsLimit
4750
4779
  }
4751
4780
  },
@@ -4872,7 +4901,7 @@ ${hackSplitComment}
4872
4901
  }
4873
4902
  }
4874
4903
  hasAsymetricFunctions() {
4875
- return this.has("sum") || this.has("avg") || this.has("count");
4904
+ return this.has("sum") || this.has("avg") || this.has("count") || this.has("generic_asymmetric_aggregate");
4876
4905
  }
4877
4906
  };
4878
4907
  var StageWriter = class {
@@ -5091,40 +5120,91 @@ ${(0, utils_1.indent)(sql)})
5091
5120
  return [fragment];
5092
5121
  });
5093
5122
  }
5123
+ getFunctionOrderBy(resultSet, context3, state, orderBy, args, overload) {
5124
+ if (orderBy.length === 0)
5125
+ return void 0;
5126
+ return "ORDER BY " + orderBy.map((ob) => {
5127
+ var _a, _b;
5128
+ const defaultOrderByArgIndex = (_a = overload.dialect[context3.dialect.name].defaultOrderByArgIndex) !== null && _a !== void 0 ? _a : 0;
5129
+ const expr2 = (_b = ob.e) !== null && _b !== void 0 ? _b : args[defaultOrderByArgIndex];
5130
+ const osql = this.generateDimFragment(resultSet, context3, expr2, state);
5131
+ const dirsql = ob.dir === "asc" ? " ASC" : ob.dir === "desc" ? " DESC" : "";
5132
+ return `${osql}${dirsql}`;
5133
+ }).join(", ");
5134
+ }
5135
+ generateAsymmetricStringAggExpression(resultSet, context3, value3, separator, distinctKey, orderBy, dialectName, state) {
5136
+ if (orderBy) {
5137
+ throw new Error(`Function \`string_agg\` does not support fanning out with an order by in ${dialectName}`);
5138
+ }
5139
+ const valueSQL = this.generateDimFragment(resultSet, context3, value3, state);
5140
+ const separatorSQL = separator ? " ," + this.generateDimFragment(resultSet, context3, separator, state) : "";
5141
+ const keyStart = "__STRING_AGG_KS__";
5142
+ const keyEnd = "__STRING_AGG_KE__";
5143
+ const distinctValueSQL = `concat('${keyStart}', ${distinctKey}, '${keyEnd}', ${valueSQL})`;
5144
+ return `REGEXP_REPLACE(
5145
+ STRING_AGG(DISTINCT ${distinctValueSQL}${separatorSQL}),
5146
+ '${keyStart}.*?${keyEnd}',
5147
+ ''
5148
+ )`;
5149
+ }
5150
+ getParamForArgIndex(params2, argIndex) {
5151
+ const prevVariadic = params2.slice(0, argIndex).find((p3) => p3.isVariadic);
5152
+ return prevVariadic !== null && prevVariadic !== void 0 ? prevVariadic : params2[argIndex];
5153
+ }
5094
5154
  generateFunctionCallExpression(resultSet, context3, frag, state) {
5095
- var _a, _b;
5155
+ var _a, _b, _c2;
5096
5156
  const overload = frag.overload;
5097
5157
  const args = frag.args;
5098
5158
  const isSymmetric = (_a = frag.overload.isSymmetric) !== null && _a !== void 0 ? _a : false;
5099
5159
  const distinctKey = (0, malloy_types_1.expressionIsAggregate)(overload.returnType.expressionType) && !isSymmetric && this.generateDistinctKeyIfNecessary(resultSet, context3, frag.structPath);
5100
- const aggregateOrderBy = frag.orderBy ? "ORDER BY " + frag.orderBy.map((ob) => {
5101
- const osql = this.generateDimFragment(resultSet, context3, ob.e, state);
5102
- const dirsql = ob.dir === "asc" ? " ASC" : ob.dir === "desc" ? " DESC" : "";
5103
- return `${osql}${dirsql}`;
5104
- }).join(", ") : void 0;
5105
5160
  const aggregateLimit = frag.limit ? `LIMIT ${frag.limit}` : void 0;
5161
+ if (frag.name === "string_agg" && distinctKey && !context3.dialect.supportsAggDistinct) {
5162
+ return this.generateAsymmetricStringAggExpression(resultSet, context3, args[0], args[1], distinctKey, frag.orderBy, context3.dialect.name, state);
5163
+ }
5106
5164
  if (distinctKey) {
5107
5165
  if (!context3.dialect.supportsAggDistinct) {
5108
- throw new Error(`Asymmetric aggregates are not supported for custom functions in ${context3.dialect.name}.`);
5166
+ throw new Error(`Function \`${frag.name}\` does not support fanning out in ${context3.dialect.name}`);
5109
5167
  }
5110
5168
  const argsExpressions = args.map((arg) => {
5111
5169
  return this.generateDimFragment(resultSet, context3, arg, state);
5112
5170
  });
5113
- return context3.dialect.sqlAggDistinct(distinctKey, argsExpressions, (valNames) => {
5114
- const funcCall = this.expandFunctionCall(context3.dialect.name, overload, valNames.map((v6) => [v6]), aggregateOrderBy, aggregateLimit);
5171
+ const orderBys = (_b = frag.orderBy) !== null && _b !== void 0 ? _b : [];
5172
+ const orderByExpressions = orderBys.map((ob) => {
5173
+ var _a2, _b2;
5174
+ const defaultOrderByArgIndex = (_a2 = overload.dialect[context3.dialect.name].defaultOrderByArgIndex) !== null && _a2 !== void 0 ? _a2 : 0;
5175
+ const expr2 = (_b2 = ob.e) !== null && _b2 !== void 0 ? _b2 : args[defaultOrderByArgIndex];
5176
+ return this.generateDimFragment(resultSet, context3, expr2, state);
5177
+ });
5178
+ return context3.dialect.sqlAggDistinct(distinctKey, [...argsExpressions, ...orderByExpressions], (valNames) => {
5179
+ const vals2 = valNames.map((v6, i6) => {
5180
+ if (i6 < args.length) {
5181
+ const param2 = this.getParamForArgIndex(overload.params, i6);
5182
+ if (param2.allowedTypes.every((t9) => (0, malloy_types_1.isLiteral)(t9.evalSpace))) {
5183
+ return args[i6];
5184
+ }
5185
+ }
5186
+ return [v6];
5187
+ });
5188
+ const newArgs = vals2.slice(0, argsExpressions.length);
5189
+ const orderBy = vals2.slice(argsExpressions.length).map((e12, i6) => {
5190
+ return { e: e12, dir: orderBys[i6].dir };
5191
+ });
5192
+ const orderBySQL = this.getFunctionOrderBy(resultSet, context3, state, orderBy, newArgs, overload);
5193
+ const funcCall = this.expandFunctionCall(context3.dialect.name, overload, newArgs, orderBySQL, aggregateLimit);
5115
5194
  return this.generateExpressionFromExpr(resultSet, context3, funcCall, state);
5116
5195
  });
5117
5196
  } else {
5118
5197
  const mappedArgs = (0, malloy_types_1.expressionIsAggregate)(overload.returnType.expressionType) ? args.map((arg, index3) => {
5119
- const param2 = overload.params[index3];
5198
+ const param2 = this.getParamForArgIndex(overload.params, index3);
5120
5199
  return param2.allowedTypes.every((t9) => (0, malloy_types_1.isLiteral)(t9.evalSpace)) ? arg : [this.generateDimFragment(resultSet, context3, arg, state)];
5121
5200
  }) : args;
5122
- const funcCall = this.expandFunctionCall(context3.dialect.name, overload, mappedArgs, aggregateOrderBy, aggregateLimit);
5201
+ const orderBySql = frag.orderBy ? this.getFunctionOrderBy(resultSet, context3, state, frag.orderBy, args, overload) : "";
5202
+ const funcCall = this.expandFunctionCall(context3.dialect.name, overload, mappedArgs, orderBySql, aggregateLimit);
5123
5203
  if ((0, malloy_types_1.expressionIsAnalytic)(overload.returnType.expressionType)) {
5124
- const extraPartitions = ((_b = frag.partitionBy) !== null && _b !== void 0 ? _b : []).map((outputName) => {
5204
+ const extraPartitions = ((_c2 = frag.partitionBy) !== null && _c2 !== void 0 ? _c2 : []).map((outputName) => {
5125
5205
  return `(${resultSet.getField(outputName).getAnalyticalSQL(false)})`;
5126
5206
  });
5127
- return this.generateAnalyticFragment(resultSet, context3, funcCall, overload, state, args, extraPartitions, aggregateOrderBy);
5207
+ return this.generateAnalyticFragment(resultSet, context3, funcCall, overload, state, args, extraPartitions, orderBySql);
5128
5208
  }
5129
5209
  return this.generateExpressionFromExpr(resultSet, context3, funcCall, state);
5130
5210
  }
@@ -6071,6 +6151,7 @@ ${(0, utils_1.indent)(sql)})
6071
6151
  resultStruct.root().addStructToJoin(struct.getJoinableParent(), this, uniqueKeyPossibleUse, joinStack);
6072
6152
  }
6073
6153
  addDependantExpr(resultStruct, context3, e12, joinStack) {
6154
+ var _a;
6074
6155
  for (const expr2 of e12) {
6075
6156
  if ((0, malloy_types_1.isFunctionCallFragment)(expr2) && (0, malloy_types_1.expressionIsAnalytic)(expr2.overload.returnType.expressionType) && this.parent.dialect.cantPartitionWindowFunctionsOnExpressions) {
6076
6157
  resultStruct.root().isComplexQuery = true;
@@ -6148,8 +6229,14 @@ ${(0, utils_1.indent)(sql)})
6148
6229
  }
6149
6230
  this.addDependantExpr(resultStruct, context3, expr2.e, joinStack);
6150
6231
  } else if ((0, malloy_types_1.isFunctionCallFragment)(expr2)) {
6232
+ const isSymmetric = (_a = expr2.overload.isSymmetric) !== null && _a !== void 0 ? _a : false;
6233
+ const isAggregate3 = (0, malloy_types_1.expressionIsAggregate)(expr2.overload.returnType.expressionType);
6234
+ const isAsymmetricAggregate = isAggregate3 && !isSymmetric;
6235
+ const uniqueKeyPossibleUse = isAsymmetricAggregate ? "generic_asymmetric_aggregate" : void 0;
6151
6236
  if (expr2.structPath) {
6152
- this.addDependantPath(resultStruct, context3, expr2.structPath, "generic_aggregate", joinStack);
6237
+ this.addDependantPath(resultStruct, context3, expr2.structPath, uniqueKeyPossibleUse, joinStack);
6238
+ } else if (isAsymmetricAggregate) {
6239
+ resultStruct.addStructToJoin(context3, this, uniqueKeyPossibleUse, joinStack);
6153
6240
  }
6154
6241
  for (const e13 of expr2.args) {
6155
6242
  this.addDependantExpr(resultStruct, context3, e13, joinStack);
@@ -6159,7 +6246,9 @@ ${(0, utils_1.indent)(sql)})
6159
6246
  }
6160
6247
  if (expr2.orderBy) {
6161
6248
  for (const ob of expr2.orderBy) {
6162
- this.addDependantExpr(resultStruct, context3, ob.e, joinStack);
6249
+ if (ob.e) {
6250
+ this.addDependantExpr(resultStruct, context3, ob.e, joinStack);
6251
+ }
6163
6252
  }
6164
6253
  }
6165
6254
  }
@@ -36381,28 +36470,89 @@ ${struct.dialect.sqlFinalStage("__stage0", [
36381
36470
  this.enterRule(_localctx, 124, _MalloyParser.RULE_aggregateOrderBySpec);
36382
36471
  let _la;
36383
36472
  try {
36384
- this.enterOuterAlt(_localctx, 1);
36385
- {
36386
- this.state = 727;
36387
- this.fieldExpr(0);
36388
- this.state = 729;
36389
- this._errHandler.sync(this);
36390
- _la = this._input.LA(1);
36391
- if (_la === _MalloyParser.ASC || _la === _MalloyParser.DESC) {
36473
+ this.state = 733;
36474
+ this._errHandler.sync(this);
36475
+ switch (this._input.LA(1)) {
36476
+ case _MalloyParser.ALL:
36477
+ case _MalloyParser.AVG:
36478
+ case _MalloyParser.CAST:
36479
+ case _MalloyParser.COUNT:
36480
+ case _MalloyParser.DAY:
36481
+ case _MalloyParser.EXCLUDE:
36482
+ case _MalloyParser.FALSE:
36483
+ case _MalloyParser.HOUR:
36484
+ case _MalloyParser.MAX:
36485
+ case _MalloyParser.MIN:
36486
+ case _MalloyParser.MINUTE:
36487
+ case _MalloyParser.MONTH:
36488
+ case _MalloyParser.NOT:
36489
+ case _MalloyParser.NOW:
36490
+ case _MalloyParser.NULL:
36491
+ case _MalloyParser.PICK:
36492
+ case _MalloyParser.QUARTER:
36493
+ case _MalloyParser.SECOND:
36494
+ case _MalloyParser.SOURCE_KW:
36495
+ case _MalloyParser.SUM:
36496
+ case _MalloyParser.TRUE:
36497
+ case _MalloyParser.WEEK:
36498
+ case _MalloyParser.YEAR:
36499
+ case _MalloyParser.HACKY_REGEX:
36500
+ case _MalloyParser.SQ_STRING:
36501
+ case _MalloyParser.DQ_STRING:
36502
+ case _MalloyParser.BQ_STRING:
36503
+ case _MalloyParser.OPAREN:
36504
+ case _MalloyParser.MINUS:
36505
+ case _MalloyParser.LITERAL_TIMESTAMP:
36506
+ case _MalloyParser.LITERAL_HOUR:
36507
+ case _MalloyParser.LITERAL_DAY:
36508
+ case _MalloyParser.LITERAL_QUARTER:
36509
+ case _MalloyParser.LITERAL_MONTH:
36510
+ case _MalloyParser.LITERAL_WEEK:
36511
+ case _MalloyParser.LITERAL_YEAR:
36512
+ case _MalloyParser.IDENTIFIER:
36513
+ case _MalloyParser.NUMERIC_LITERAL:
36514
+ case _MalloyParser.INTEGER_LITERAL:
36515
+ case _MalloyParser.SQL_BEGIN:
36516
+ this.enterOuterAlt(_localctx, 1);
36392
36517
  {
36393
- this.state = 728;
36518
+ this.state = 727;
36519
+ this.fieldExpr(0);
36520
+ this.state = 729;
36521
+ this._errHandler.sync(this);
36394
36522
  _la = this._input.LA(1);
36395
- if (!(_la === _MalloyParser.ASC || _la === _MalloyParser.DESC)) {
36396
- this._errHandler.recoverInline(this);
36397
- } else {
36398
- if (this._input.LA(1) === Token_1.Token.EOF) {
36399
- this.matchedEOF = true;
36523
+ if (_la === _MalloyParser.ASC || _la === _MalloyParser.DESC) {
36524
+ {
36525
+ this.state = 728;
36526
+ _la = this._input.LA(1);
36527
+ if (!(_la === _MalloyParser.ASC || _la === _MalloyParser.DESC)) {
36528
+ this._errHandler.recoverInline(this);
36529
+ } else {
36530
+ if (this._input.LA(1) === Token_1.Token.EOF) {
36531
+ this.matchedEOF = true;
36532
+ }
36533
+ this._errHandler.reportMatch(this);
36534
+ this.consume();
36535
+ }
36400
36536
  }
36401
- this._errHandler.reportMatch(this);
36402
- this.consume();
36403
36537
  }
36404
36538
  }
36405
- }
36539
+ break;
36540
+ case _MalloyParser.ASC:
36541
+ this.enterOuterAlt(_localctx, 2);
36542
+ {
36543
+ this.state = 731;
36544
+ this.match(_MalloyParser.ASC);
36545
+ }
36546
+ break;
36547
+ case _MalloyParser.DESC:
36548
+ this.enterOuterAlt(_localctx, 3);
36549
+ {
36550
+ this.state = 732;
36551
+ this.match(_MalloyParser.DESC);
36552
+ }
36553
+ break;
36554
+ default:
36555
+ throw new NoViableAltException_1.NoViableAltException(this);
36406
36556
  }
36407
36557
  } catch (re2) {
36408
36558
  if (re2 instanceof RecognitionException_1.RecognitionException) {
@@ -36424,9 +36574,9 @@ ${struct.dialect.sqlFinalStage("__stage0", [
36424
36574
  try {
36425
36575
  this.enterOuterAlt(_localctx, 1);
36426
36576
  {
36427
- this.state = 731;
36577
+ this.state = 735;
36428
36578
  this.match(_MalloyParser.ORDER_BY);
36429
- this.state = 732;
36579
+ this.state = 736;
36430
36580
  this.aggregateOrdering();
36431
36581
  }
36432
36582
  } catch (re2) {
@@ -36449,7 +36599,7 @@ ${struct.dialect.sqlFinalStage("__stage0", [
36449
36599
  try {
36450
36600
  this.enterOuterAlt(_localctx, 1);
36451
36601
  {
36452
- this.state = 734;
36602
+ this.state = 738;
36453
36603
  this.limitStatement();
36454
36604
  }
36455
36605
  } catch (re2) {
@@ -36470,34 +36620,34 @@ ${struct.dialect.sqlFinalStage("__stage0", [
36470
36620
  let _localctx = new FieldPropertyStatementContext(this._ctx, this.state);
36471
36621
  this.enterRule(_localctx, 130, _MalloyParser.RULE_fieldPropertyStatement);
36472
36622
  try {
36473
- this.state = 740;
36623
+ this.state = 744;
36474
36624
  this._errHandler.sync(this);
36475
36625
  switch (this._input.LA(1)) {
36476
36626
  case _MalloyParser.WHERE:
36477
36627
  this.enterOuterAlt(_localctx, 1);
36478
36628
  {
36479
- this.state = 736;
36629
+ this.state = 740;
36480
36630
  this.whereStatement();
36481
36631
  }
36482
36632
  break;
36483
36633
  case _MalloyParser.PARTITION_BY:
36484
36634
  this.enterOuterAlt(_localctx, 2);
36485
36635
  {
36486
- this.state = 737;
36636
+ this.state = 741;
36487
36637
  this.partitionByStatement();
36488
36638
  }
36489
36639
  break;
36490
36640
  case _MalloyParser.ORDER_BY:
36491
36641
  this.enterOuterAlt(_localctx, 3);
36492
36642
  {
36493
- this.state = 738;
36643
+ this.state = 742;
36494
36644
  this.aggregateOrderByStatement();
36495
36645
  }
36496
36646
  break;
36497
36647
  case _MalloyParser.LIMIT:
36498
36648
  this.enterOuterAlt(_localctx, 4);
36499
36649
  {
36500
- this.state = 739;
36650
+ this.state = 743;
36501
36651
  this.fieldPropertyLimitStatement();
36502
36652
  }
36503
36653
  break;
@@ -36526,32 +36676,32 @@ ${struct.dialect.sqlFinalStage("__stage0", [
36526
36676
  let _alt;
36527
36677
  this.enterOuterAlt(_localctx, 1);
36528
36678
  {
36529
- this.state = 742;
36679
+ this.state = 746;
36530
36680
  this.fieldExpr(0);
36531
- this.state = 747;
36681
+ this.state = 751;
36532
36682
  this._errHandler.sync(this);
36533
- _alt = this.interpreter.adaptivePredict(this._input, 65, this._ctx);
36683
+ _alt = this.interpreter.adaptivePredict(this._input, 66, this._ctx);
36534
36684
  while (_alt !== 2 && _alt !== ATN_1.ATN.INVALID_ALT_NUMBER) {
36535
36685
  if (_alt === 1) {
36536
36686
  {
36537
36687
  {
36538
- this.state = 743;
36688
+ this.state = 747;
36539
36689
  this.match(_MalloyParser.COMMA);
36540
- this.state = 744;
36690
+ this.state = 748;
36541
36691
  this.fieldExpr(0);
36542
36692
  }
36543
36693
  }
36544
36694
  }
36545
- this.state = 749;
36695
+ this.state = 753;
36546
36696
  this._errHandler.sync(this);
36547
- _alt = this.interpreter.adaptivePredict(this._input, 65, this._ctx);
36697
+ _alt = this.interpreter.adaptivePredict(this._input, 66, this._ctx);
36548
36698
  }
36549
- this.state = 751;
36699
+ this.state = 755;
36550
36700
  this._errHandler.sync(this);
36551
36701
  _la = this._input.LA(1);
36552
36702
  if (_la === _MalloyParser.COMMA) {
36553
36703
  {
36554
- this.state = 750;
36704
+ this.state = 754;
36555
36705
  this.match(_MalloyParser.COMMA);
36556
36706
  }
36557
36707
  }
@@ -36576,9 +36726,9 @@ ${struct.dialect.sqlFinalStage("__stage0", [
36576
36726
  try {
36577
36727
  this.enterOuterAlt(_localctx, 1);
36578
36728
  {
36579
- this.state = 753;
36729
+ this.state = 757;
36580
36730
  this.match(_MalloyParser.WHERE);
36581
- this.state = 754;
36731
+ this.state = 758;
36582
36732
  this.filterClauseList();
36583
36733
  }
36584
36734
  } catch (re2) {
@@ -36601,9 +36751,9 @@ ${struct.dialect.sqlFinalStage("__stage0", [
36601
36751
  try {
36602
36752
  this.enterOuterAlt(_localctx, 1);
36603
36753
  {
36604
- this.state = 756;
36754
+ this.state = 760;
36605
36755
  this.match(_MalloyParser.HAVING);
36606
- this.state = 757;
36756
+ this.state = 761;
36607
36757
  this.filterClauseList();
36608
36758
  }
36609
36759
  } catch (re2) {
@@ -36628,39 +36778,39 @@ ${struct.dialect.sqlFinalStage("__stage0", [
36628
36778
  let _alt;
36629
36779
  this.enterOuterAlt(_localctx, 1);
36630
36780
  {
36631
- this.state = 759;
36781
+ this.state = 763;
36632
36782
  this.exploreQueryDef();
36633
- this.state = 766;
36783
+ this.state = 770;
36634
36784
  this._errHandler.sync(this);
36635
- _alt = this.interpreter.adaptivePredict(this._input, 68, this._ctx);
36785
+ _alt = this.interpreter.adaptivePredict(this._input, 69, this._ctx);
36636
36786
  while (_alt !== 2 && _alt !== ATN_1.ATN.INVALID_ALT_NUMBER) {
36637
36787
  if (_alt === 1) {
36638
36788
  {
36639
36789
  {
36640
- this.state = 761;
36790
+ this.state = 765;
36641
36791
  this._errHandler.sync(this);
36642
36792
  _la = this._input.LA(1);
36643
36793
  if (_la === _MalloyParser.COMMA) {
36644
36794
  {
36645
- this.state = 760;
36795
+ this.state = 764;
36646
36796
  this.match(_MalloyParser.COMMA);
36647
36797
  }
36648
36798
  }
36649
- this.state = 763;
36799
+ this.state = 767;
36650
36800
  this.exploreQueryDef();
36651
36801
  }
36652
36802
  }
36653
36803
  }
36654
- this.state = 768;
36804
+ this.state = 772;
36655
36805
  this._errHandler.sync(this);
36656
- _alt = this.interpreter.adaptivePredict(this._input, 68, this._ctx);
36806
+ _alt = this.interpreter.adaptivePredict(this._input, 69, this._ctx);
36657
36807
  }
36658
- this.state = 770;
36808
+ this.state = 774;
36659
36809
  this._errHandler.sync(this);
36660
36810
  _la = this._input.LA(1);
36661
36811
  if (_la === _MalloyParser.COMMA) {
36662
36812
  {
36663
- this.state = 769;
36813
+ this.state = 773;
36664
36814
  this.match(_MalloyParser.COMMA);
36665
36815
  }
36666
36816
  }
@@ -36685,7 +36835,7 @@ ${struct.dialect.sqlFinalStage("__stage0", [
36685
36835
  try {
36686
36836
  this.enterOuterAlt(_localctx, 1);
36687
36837
  {
36688
- this.state = 772;
36838
+ this.state = 776;
36689
36839
  this.id();
36690
36840
  }
36691
36841
  } catch (re2) {
@@ -36709,25 +36859,25 @@ ${struct.dialect.sqlFinalStage("__stage0", [
36709
36859
  try {
36710
36860
  this.enterOuterAlt(_localctx, 1);
36711
36861
  {
36712
- this.state = 777;
36862
+ this.state = 781;
36713
36863
  this._errHandler.sync(this);
36714
36864
  _la = this._input.LA(1);
36715
36865
  while (_la === _MalloyParser.ANNOTATION) {
36716
36866
  {
36717
36867
  {
36718
- this.state = 774;
36868
+ this.state = 778;
36719
36869
  this.match(_MalloyParser.ANNOTATION);
36720
36870
  }
36721
36871
  }
36722
- this.state = 779;
36872
+ this.state = 783;
36723
36873
  this._errHandler.sync(this);
36724
36874
  _la = this._input.LA(1);
36725
36875
  }
36726
- this.state = 780;
36876
+ this.state = 784;
36727
36877
  this.exploreQueryNameDef();
36728
- this.state = 781;
36878
+ this.state = 785;
36729
36879
  this.isDefine();
36730
- this.state = 782;
36880
+ this.state = 786;
36731
36881
  this.vExpr();
36732
36882
  }
36733
36883
  } catch (re2) {
@@ -36748,132 +36898,132 @@ ${struct.dialect.sqlFinalStage("__stage0", [
36748
36898
  let _localctx = new QueryStatementContext(this._ctx, this.state);
36749
36899
  this.enterRule(_localctx, 144, _MalloyParser.RULE_queryStatement);
36750
36900
  try {
36751
- this.state = 802;
36901
+ this.state = 806;
36752
36902
  this._errHandler.sync(this);
36753
- switch (this.interpreter.adaptivePredict(this._input, 71, this._ctx)) {
36903
+ switch (this.interpreter.adaptivePredict(this._input, 72, this._ctx)) {
36754
36904
  case 1:
36755
36905
  this.enterOuterAlt(_localctx, 1);
36756
36906
  {
36757
- this.state = 784;
36907
+ this.state = 788;
36758
36908
  this.groupByStatement();
36759
36909
  }
36760
36910
  break;
36761
36911
  case 2:
36762
36912
  this.enterOuterAlt(_localctx, 2);
36763
36913
  {
36764
- this.state = 785;
36914
+ this.state = 789;
36765
36915
  this.declareStatement();
36766
36916
  }
36767
36917
  break;
36768
36918
  case 3:
36769
36919
  this.enterOuterAlt(_localctx, 3);
36770
36920
  {
36771
- this.state = 786;
36921
+ this.state = 790;
36772
36922
  this.queryJoinStatement();
36773
36923
  }
36774
36924
  break;
36775
36925
  case 4:
36776
36926
  this.enterOuterAlt(_localctx, 4);
36777
36927
  {
36778
- this.state = 787;
36928
+ this.state = 791;
36779
36929
  this.queryExtend();
36780
36930
  }
36781
36931
  break;
36782
36932
  case 5:
36783
36933
  this.enterOuterAlt(_localctx, 5);
36784
36934
  {
36785
- this.state = 788;
36935
+ this.state = 792;
36786
36936
  this.projectStatement();
36787
36937
  }
36788
36938
  break;
36789
36939
  case 6:
36790
36940
  this.enterOuterAlt(_localctx, 6);
36791
36941
  {
36792
- this.state = 789;
36942
+ this.state = 793;
36793
36943
  this.indexStatement();
36794
36944
  }
36795
36945
  break;
36796
36946
  case 7:
36797
36947
  this.enterOuterAlt(_localctx, 7);
36798
36948
  {
36799
- this.state = 790;
36949
+ this.state = 794;
36800
36950
  this.aggregateStatement();
36801
36951
  }
36802
36952
  break;
36803
36953
  case 8:
36804
36954
  this.enterOuterAlt(_localctx, 8);
36805
36955
  {
36806
- this.state = 791;
36956
+ this.state = 795;
36807
36957
  this.calculateStatement();
36808
36958
  }
36809
36959
  break;
36810
36960
  case 9:
36811
36961
  this.enterOuterAlt(_localctx, 9);
36812
36962
  {
36813
- this.state = 792;
36963
+ this.state = 796;
36814
36964
  this.topStatement();
36815
36965
  }
36816
36966
  break;
36817
36967
  case 10:
36818
36968
  this.enterOuterAlt(_localctx, 10);
36819
36969
  {
36820
- this.state = 793;
36970
+ this.state = 797;
36821
36971
  this.limitStatement();
36822
36972
  }
36823
36973
  break;
36824
36974
  case 11:
36825
36975
  this.enterOuterAlt(_localctx, 11);
36826
36976
  {
36827
- this.state = 794;
36977
+ this.state = 798;
36828
36978
  this.orderByStatement();
36829
36979
  }
36830
36980
  break;
36831
36981
  case 12:
36832
36982
  this.enterOuterAlt(_localctx, 12);
36833
36983
  {
36834
- this.state = 795;
36984
+ this.state = 799;
36835
36985
  this.whereStatement();
36836
36986
  }
36837
36987
  break;
36838
36988
  case 13:
36839
36989
  this.enterOuterAlt(_localctx, 13);
36840
36990
  {
36841
- this.state = 796;
36991
+ this.state = 800;
36842
36992
  this.havingStatement();
36843
36993
  }
36844
36994
  break;
36845
36995
  case 14:
36846
36996
  this.enterOuterAlt(_localctx, 14);
36847
36997
  {
36848
- this.state = 797;
36998
+ this.state = 801;
36849
36999
  this.nestStatement();
36850
37000
  }
36851
37001
  break;
36852
37002
  case 15:
36853
37003
  this.enterOuterAlt(_localctx, 15);
36854
37004
  {
36855
- this.state = 798;
37005
+ this.state = 802;
36856
37006
  this.sampleStatement();
36857
37007
  }
36858
37008
  break;
36859
37009
  case 16:
36860
37010
  this.enterOuterAlt(_localctx, 16);
36861
37011
  {
36862
- this.state = 799;
37012
+ this.state = 803;
36863
37013
  this.timezoneStatement();
36864
37014
  }
36865
37015
  break;
36866
37016
  case 17:
36867
37017
  this.enterOuterAlt(_localctx, 17);
36868
37018
  {
36869
- this.state = 800;
37019
+ this.state = 804;
36870
37020
  this.queryAnnotation();
36871
37021
  }
36872
37022
  break;
36873
37023
  case 18:
36874
37024
  this.enterOuterAlt(_localctx, 18);
36875
37025
  {
36876
- this.state = 801;
37026
+ this.state = 805;
36877
37027
  this.ignoredModelAnnotations();
36878
37028
  }
36879
37029
  break;
@@ -36898,7 +37048,7 @@ ${struct.dialect.sqlFinalStage("__stage0", [
36898
37048
  try {
36899
37049
  this.enterOuterAlt(_localctx, 1);
36900
37050
  {
36901
- this.state = 804;
37051
+ this.state = 808;
36902
37052
  this.joinStatement();
36903
37053
  }
36904
37054
  } catch (re2) {
@@ -36921,11 +37071,11 @@ ${struct.dialect.sqlFinalStage("__stage0", [
36921
37071
  try {
36922
37072
  this.enterOuterAlt(_localctx, 1);
36923
37073
  {
36924
- this.state = 806;
37074
+ this.state = 810;
36925
37075
  this.tags();
36926
- this.state = 807;
37076
+ this.state = 811;
36927
37077
  this.match(_MalloyParser.GROUP_BY);
36928
- this.state = 808;
37078
+ this.state = 812;
36929
37079
  this.queryFieldList();
36930
37080
  }
36931
37081
  } catch (re2) {
@@ -36950,39 +37100,39 @@ ${struct.dialect.sqlFinalStage("__stage0", [
36950
37100
  let _alt;
36951
37101
  this.enterOuterAlt(_localctx, 1);
36952
37102
  {
36953
- this.state = 810;
37103
+ this.state = 814;
36954
37104
  this.queryFieldEntry();
36955
- this.state = 817;
37105
+ this.state = 821;
36956
37106
  this._errHandler.sync(this);
36957
- _alt = this.interpreter.adaptivePredict(this._input, 73, this._ctx);
37107
+ _alt = this.interpreter.adaptivePredict(this._input, 74, this._ctx);
36958
37108
  while (_alt !== 2 && _alt !== ATN_1.ATN.INVALID_ALT_NUMBER) {
36959
37109
  if (_alt === 1) {
36960
37110
  {
36961
37111
  {
36962
- this.state = 812;
37112
+ this.state = 816;
36963
37113
  this._errHandler.sync(this);
36964
37114
  _la = this._input.LA(1);
36965
37115
  if (_la === _MalloyParser.COMMA) {
36966
37116
  {
36967
- this.state = 811;
37117
+ this.state = 815;
36968
37118
  this.match(_MalloyParser.COMMA);
36969
37119
  }
36970
37120
  }
36971
- this.state = 814;
37121
+ this.state = 818;
36972
37122
  this.queryFieldEntry();
36973
37123
  }
36974
37124
  }
36975
37125
  }
36976
- this.state = 819;
37126
+ this.state = 823;
36977
37127
  this._errHandler.sync(this);
36978
- _alt = this.interpreter.adaptivePredict(this._input, 73, this._ctx);
37128
+ _alt = this.interpreter.adaptivePredict(this._input, 74, this._ctx);
36979
37129
  }
36980
- this.state = 821;
37130
+ this.state = 825;
36981
37131
  this._errHandler.sync(this);
36982
37132
  _la = this._input.LA(1);
36983
37133
  if (_la === _MalloyParser.COMMA) {
36984
37134
  {
36985
- this.state = 820;
37135
+ this.state = 824;
36986
37136
  this.match(_MalloyParser.COMMA);
36987
37137
  }
36988
37138
  }
@@ -37005,20 +37155,20 @@ ${struct.dialect.sqlFinalStage("__stage0", [
37005
37155
  let _localctx = new QueryFieldEntryContext(this._ctx, this.state);
37006
37156
  this.enterRule(_localctx, 152, _MalloyParser.RULE_queryFieldEntry);
37007
37157
  try {
37008
- this.state = 825;
37158
+ this.state = 829;
37009
37159
  this._errHandler.sync(this);
37010
- switch (this.interpreter.adaptivePredict(this._input, 75, this._ctx)) {
37160
+ switch (this.interpreter.adaptivePredict(this._input, 76, this._ctx)) {
37011
37161
  case 1:
37012
37162
  this.enterOuterAlt(_localctx, 1);
37013
37163
  {
37014
- this.state = 823;
37164
+ this.state = 827;
37015
37165
  this.taggedRef();
37016
37166
  }
37017
37167
  break;
37018
37168
  case 2:
37019
37169
  this.enterOuterAlt(_localctx, 2);
37020
37170
  {
37021
- this.state = 824;
37171
+ this.state = 828;
37022
37172
  this.fieldDef();
37023
37173
  }
37024
37174
  break;
@@ -37043,11 +37193,11 @@ ${struct.dialect.sqlFinalStage("__stage0", [
37043
37193
  try {
37044
37194
  this.enterOuterAlt(_localctx, 1);
37045
37195
  {
37046
- this.state = 827;
37196
+ this.state = 831;
37047
37197
  this.tags();
37048
- this.state = 828;
37198
+ this.state = 832;
37049
37199
  this.match(_MalloyParser.NEST);
37050
- this.state = 829;
37200
+ this.state = 833;
37051
37201
  this.nestedQueryList();
37052
37202
  }
37053
37203
  } catch (re2) {
@@ -37072,39 +37222,39 @@ ${struct.dialect.sqlFinalStage("__stage0", [
37072
37222
  let _alt;
37073
37223
  this.enterOuterAlt(_localctx, 1);
37074
37224
  {
37075
- this.state = 831;
37225
+ this.state = 835;
37076
37226
  this.nestEntry();
37077
- this.state = 838;
37227
+ this.state = 842;
37078
37228
  this._errHandler.sync(this);
37079
- _alt = this.interpreter.adaptivePredict(this._input, 77, this._ctx);
37229
+ _alt = this.interpreter.adaptivePredict(this._input, 78, this._ctx);
37080
37230
  while (_alt !== 2 && _alt !== ATN_1.ATN.INVALID_ALT_NUMBER) {
37081
37231
  if (_alt === 1) {
37082
37232
  {
37083
37233
  {
37084
- this.state = 833;
37234
+ this.state = 837;
37085
37235
  this._errHandler.sync(this);
37086
37236
  _la = this._input.LA(1);
37087
37237
  if (_la === _MalloyParser.COMMA) {
37088
37238
  {
37089
- this.state = 832;
37239
+ this.state = 836;
37090
37240
  this.match(_MalloyParser.COMMA);
37091
37241
  }
37092
37242
  }
37093
- this.state = 835;
37243
+ this.state = 839;
37094
37244
  this.nestEntry();
37095
37245
  }
37096
37246
  }
37097
37247
  }
37098
- this.state = 840;
37248
+ this.state = 844;
37099
37249
  this._errHandler.sync(this);
37100
- _alt = this.interpreter.adaptivePredict(this._input, 77, this._ctx);
37250
+ _alt = this.interpreter.adaptivePredict(this._input, 78, this._ctx);
37101
37251
  }
37102
- this.state = 842;
37252
+ this.state = 846;
37103
37253
  this._errHandler.sync(this);
37104
37254
  _la = this._input.LA(1);
37105
37255
  if (_la === _MalloyParser.COMMA) {
37106
37256
  {
37107
- this.state = 841;
37257
+ this.state = 845;
37108
37258
  this.match(_MalloyParser.COMMA);
37109
37259
  }
37110
37260
  }
@@ -37128,25 +37278,25 @@ ${struct.dialect.sqlFinalStage("__stage0", [
37128
37278
  this.enterRule(_localctx, 158, _MalloyParser.RULE_nestEntry);
37129
37279
  let _la;
37130
37280
  try {
37131
- this.state = 855;
37281
+ this.state = 859;
37132
37282
  this._errHandler.sync(this);
37133
- switch (this.interpreter.adaptivePredict(this._input, 80, this._ctx)) {
37283
+ switch (this.interpreter.adaptivePredict(this._input, 81, this._ctx)) {
37134
37284
  case 1:
37135
37285
  _localctx = new NestExistingContext(_localctx);
37136
37286
  this.enterOuterAlt(_localctx, 1);
37137
37287
  {
37138
- this.state = 844;
37288
+ this.state = 848;
37139
37289
  this.tags();
37140
- this.state = 845;
37290
+ this.state = 849;
37141
37291
  this.fieldPath();
37142
- this.state = 848;
37292
+ this.state = 852;
37143
37293
  this._errHandler.sync(this);
37144
37294
  _la = this._input.LA(1);
37145
37295
  if (_la === _MalloyParser.PLUS) {
37146
37296
  {
37147
- this.state = 846;
37297
+ this.state = 850;
37148
37298
  this.match(_MalloyParser.PLUS);
37149
- this.state = 847;
37299
+ this.state = 851;
37150
37300
  this.vExpr();
37151
37301
  }
37152
37302
  }
@@ -37156,13 +37306,13 @@ ${struct.dialect.sqlFinalStage("__stage0", [
37156
37306
  _localctx = new NestDefContext(_localctx);
37157
37307
  this.enterOuterAlt(_localctx, 2);
37158
37308
  {
37159
- this.state = 850;
37309
+ this.state = 854;
37160
37310
  this.tags();
37161
- this.state = 851;
37311
+ this.state = 855;
37162
37312
  this.queryName();
37163
- this.state = 852;
37313
+ this.state = 856;
37164
37314
  this.isDefine();
37165
- this.state = 853;
37315
+ this.state = 857;
37166
37316
  this.vExpr();
37167
37317
  }
37168
37318
  break;
@@ -37187,11 +37337,11 @@ ${struct.dialect.sqlFinalStage("__stage0", [
37187
37337
  try {
37188
37338
  this.enterOuterAlt(_localctx, 1);
37189
37339
  {
37190
- this.state = 857;
37340
+ this.state = 861;
37191
37341
  this.tags();
37192
- this.state = 858;
37342
+ this.state = 862;
37193
37343
  this.match(_MalloyParser.AGGREGATE);
37194
- this.state = 859;
37344
+ this.state = 863;
37195
37345
  this.queryFieldList();
37196
37346
  }
37197
37347
  } catch (re2) {
@@ -37214,11 +37364,11 @@ ${struct.dialect.sqlFinalStage("__stage0", [
37214
37364
  try {
37215
37365
  this.enterOuterAlt(_localctx, 1);
37216
37366
  {
37217
- this.state = 861;
37367
+ this.state = 865;
37218
37368
  this.tags();
37219
- this.state = 862;
37369
+ this.state = 866;
37220
37370
  this.match(_MalloyParser.CALCULATE);
37221
- this.state = 863;
37371
+ this.state = 867;
37222
37372
  this.queryFieldList();
37223
37373
  }
37224
37374
  } catch (re2) {
@@ -37242,9 +37392,9 @@ ${struct.dialect.sqlFinalStage("__stage0", [
37242
37392
  try {
37243
37393
  this.enterOuterAlt(_localctx, 1);
37244
37394
  {
37245
- this.state = 865;
37395
+ this.state = 869;
37246
37396
  this.tags();
37247
- this.state = 866;
37397
+ this.state = 870;
37248
37398
  _la = this._input.LA(1);
37249
37399
  if (!(_la === _MalloyParser.PROJECT || _la === _MalloyParser.SELECT)) {
37250
37400
  this._errHandler.recoverInline(this);
@@ -37255,7 +37405,7 @@ ${struct.dialect.sqlFinalStage("__stage0", [
37255
37405
  this._errHandler.reportMatch(this);
37256
37406
  this.consume();
37257
37407
  }
37258
- this.state = 867;
37408
+ this.state = 871;
37259
37409
  this.fieldCollection();
37260
37410
  }
37261
37411
  } catch (re2) {
@@ -37280,34 +37430,34 @@ ${struct.dialect.sqlFinalStage("__stage0", [
37280
37430
  let _alt;
37281
37431
  this.enterOuterAlt(_localctx, 1);
37282
37432
  {
37283
- this.state = 869;
37433
+ this.state = 873;
37284
37434
  this.match(_MalloyParser.PARTITION_BY);
37285
- this.state = 870;
37435
+ this.state = 874;
37286
37436
  this.id();
37287
- this.state = 875;
37437
+ this.state = 879;
37288
37438
  this._errHandler.sync(this);
37289
- _alt = this.interpreter.adaptivePredict(this._input, 81, this._ctx);
37439
+ _alt = this.interpreter.adaptivePredict(this._input, 82, this._ctx);
37290
37440
  while (_alt !== 2 && _alt !== ATN_1.ATN.INVALID_ALT_NUMBER) {
37291
37441
  if (_alt === 1) {
37292
37442
  {
37293
37443
  {
37294
- this.state = 871;
37444
+ this.state = 875;
37295
37445
  this.match(_MalloyParser.COMMA);
37296
- this.state = 872;
37446
+ this.state = 876;
37297
37447
  this.id();
37298
37448
  }
37299
37449
  }
37300
37450
  }
37301
- this.state = 877;
37451
+ this.state = 881;
37302
37452
  this._errHandler.sync(this);
37303
- _alt = this.interpreter.adaptivePredict(this._input, 81, this._ctx);
37453
+ _alt = this.interpreter.adaptivePredict(this._input, 82, this._ctx);
37304
37454
  }
37305
- this.state = 879;
37455
+ this.state = 883;
37306
37456
  this._errHandler.sync(this);
37307
37457
  _la = this._input.LA(1);
37308
37458
  if (_la === _MalloyParser.COMMA) {
37309
37459
  {
37310
- this.state = 878;
37460
+ this.state = 882;
37311
37461
  this.match(_MalloyParser.COMMA);
37312
37462
  }
37313
37463
  }
@@ -37332,9 +37482,9 @@ ${struct.dialect.sqlFinalStage("__stage0", [
37332
37482
  try {
37333
37483
  this.enterOuterAlt(_localctx, 1);
37334
37484
  {
37335
- this.state = 881;
37485
+ this.state = 885;
37336
37486
  this.match(_MalloyParser.ORDER_BY);
37337
- this.state = 882;
37487
+ this.state = 886;
37338
37488
  this.ordering();
37339
37489
  }
37340
37490
  } catch (re2) {
@@ -37359,39 +37509,39 @@ ${struct.dialect.sqlFinalStage("__stage0", [
37359
37509
  let _alt;
37360
37510
  this.enterOuterAlt(_localctx, 1);
37361
37511
  {
37362
- this.state = 884;
37512
+ this.state = 888;
37363
37513
  this.orderBySpec();
37364
- this.state = 891;
37514
+ this.state = 895;
37365
37515
  this._errHandler.sync(this);
37366
- _alt = this.interpreter.adaptivePredict(this._input, 84, this._ctx);
37516
+ _alt = this.interpreter.adaptivePredict(this._input, 85, this._ctx);
37367
37517
  while (_alt !== 2 && _alt !== ATN_1.ATN.INVALID_ALT_NUMBER) {
37368
37518
  if (_alt === 1) {
37369
37519
  {
37370
37520
  {
37371
- this.state = 886;
37521
+ this.state = 890;
37372
37522
  this._errHandler.sync(this);
37373
37523
  _la = this._input.LA(1);
37374
37524
  if (_la === _MalloyParser.COMMA) {
37375
37525
  {
37376
- this.state = 885;
37526
+ this.state = 889;
37377
37527
  this.match(_MalloyParser.COMMA);
37378
37528
  }
37379
37529
  }
37380
- this.state = 888;
37530
+ this.state = 892;
37381
37531
  this.orderBySpec();
37382
37532
  }
37383
37533
  }
37384
37534
  }
37385
- this.state = 893;
37535
+ this.state = 897;
37386
37536
  this._errHandler.sync(this);
37387
- _alt = this.interpreter.adaptivePredict(this._input, 84, this._ctx);
37537
+ _alt = this.interpreter.adaptivePredict(this._input, 85, this._ctx);
37388
37538
  }
37389
- this.state = 895;
37539
+ this.state = 899;
37390
37540
  this._errHandler.sync(this);
37391
37541
  _la = this._input.LA(1);
37392
37542
  if (_la === _MalloyParser.COMMA) {
37393
37543
  {
37394
- this.state = 894;
37544
+ this.state = 898;
37395
37545
  this.match(_MalloyParser.COMMA);
37396
37546
  }
37397
37547
  }
@@ -37417,31 +37567,31 @@ ${struct.dialect.sqlFinalStage("__stage0", [
37417
37567
  try {
37418
37568
  this.enterOuterAlt(_localctx, 1);
37419
37569
  {
37420
- this.state = 899;
37570
+ this.state = 903;
37421
37571
  this._errHandler.sync(this);
37422
37572
  switch (this._input.LA(1)) {
37423
37573
  case _MalloyParser.INTEGER_LITERAL:
37424
37574
  {
37425
- this.state = 897;
37575
+ this.state = 901;
37426
37576
  this.match(_MalloyParser.INTEGER_LITERAL);
37427
37577
  }
37428
37578
  break;
37429
37579
  case _MalloyParser.BQ_STRING:
37430
37580
  case _MalloyParser.IDENTIFIER:
37431
37581
  {
37432
- this.state = 898;
37582
+ this.state = 902;
37433
37583
  this.fieldName();
37434
37584
  }
37435
37585
  break;
37436
37586
  default:
37437
37587
  throw new NoViableAltException_1.NoViableAltException(this);
37438
37588
  }
37439
- this.state = 902;
37589
+ this.state = 906;
37440
37590
  this._errHandler.sync(this);
37441
37591
  _la = this._input.LA(1);
37442
37592
  if (_la === _MalloyParser.ASC || _la === _MalloyParser.DESC) {
37443
37593
  {
37444
- this.state = 901;
37594
+ this.state = 905;
37445
37595
  _la = this._input.LA(1);
37446
37596
  if (!(_la === _MalloyParser.ASC || _la === _MalloyParser.DESC)) {
37447
37597
  this._errHandler.recoverInline(this);
@@ -37475,9 +37625,9 @@ ${struct.dialect.sqlFinalStage("__stage0", [
37475
37625
  try {
37476
37626
  this.enterOuterAlt(_localctx, 1);
37477
37627
  {
37478
- this.state = 904;
37628
+ this.state = 908;
37479
37629
  this.match(_MalloyParser.LIMIT);
37480
- this.state = 905;
37630
+ this.state = 909;
37481
37631
  this.match(_MalloyParser.INTEGER_LITERAL);
37482
37632
  }
37483
37633
  } catch (re2) {
@@ -37498,24 +37648,24 @@ ${struct.dialect.sqlFinalStage("__stage0", [
37498
37648
  let _localctx = new BySpecContext(this._ctx, this.state);
37499
37649
  this.enterRule(_localctx, 176, _MalloyParser.RULE_bySpec);
37500
37650
  try {
37501
- this.state = 911;
37651
+ this.state = 915;
37502
37652
  this._errHandler.sync(this);
37503
- switch (this.interpreter.adaptivePredict(this._input, 88, this._ctx)) {
37653
+ switch (this.interpreter.adaptivePredict(this._input, 89, this._ctx)) {
37504
37654
  case 1:
37505
37655
  this.enterOuterAlt(_localctx, 1);
37506
37656
  {
37507
- this.state = 907;
37657
+ this.state = 911;
37508
37658
  this.match(_MalloyParser.BY);
37509
- this.state = 908;
37659
+ this.state = 912;
37510
37660
  this.fieldName();
37511
37661
  }
37512
37662
  break;
37513
37663
  case 2:
37514
37664
  this.enterOuterAlt(_localctx, 2);
37515
37665
  {
37516
- this.state = 909;
37666
+ this.state = 913;
37517
37667
  this.match(_MalloyParser.BY);
37518
- this.state = 910;
37668
+ this.state = 914;
37519
37669
  this.fieldExpr(0);
37520
37670
  }
37521
37671
  break;
@@ -37541,16 +37691,16 @@ ${struct.dialect.sqlFinalStage("__stage0", [
37541
37691
  try {
37542
37692
  this.enterOuterAlt(_localctx, 1);
37543
37693
  {
37544
- this.state = 913;
37694
+ this.state = 917;
37545
37695
  this.match(_MalloyParser.TOP);
37546
- this.state = 914;
37696
+ this.state = 918;
37547
37697
  this.match(_MalloyParser.INTEGER_LITERAL);
37548
- this.state = 916;
37698
+ this.state = 920;
37549
37699
  this._errHandler.sync(this);
37550
37700
  _la = this._input.LA(1);
37551
37701
  if (_la === _MalloyParser.BY) {
37552
37702
  {
37553
- this.state = 915;
37703
+ this.state = 919;
37554
37704
  this.bySpec();
37555
37705
  }
37556
37706
  }
@@ -37574,23 +37724,23 @@ ${struct.dialect.sqlFinalStage("__stage0", [
37574
37724
  this.enterRule(_localctx, 180, _MalloyParser.RULE_indexElement);
37575
37725
  let _la;
37576
37726
  try {
37577
- this.state = 924;
37727
+ this.state = 928;
37578
37728
  this._errHandler.sync(this);
37579
37729
  switch (this._input.LA(1)) {
37580
37730
  case _MalloyParser.BQ_STRING:
37581
37731
  case _MalloyParser.IDENTIFIER:
37582
37732
  this.enterOuterAlt(_localctx, 1);
37583
37733
  {
37584
- this.state = 918;
37734
+ this.state = 922;
37585
37735
  this.fieldPath();
37586
- this.state = 921;
37736
+ this.state = 925;
37587
37737
  this._errHandler.sync(this);
37588
37738
  _la = this._input.LA(1);
37589
37739
  if (_la === _MalloyParser.DOT) {
37590
37740
  {
37591
- this.state = 919;
37741
+ this.state = 923;
37592
37742
  this.match(_MalloyParser.DOT);
37593
- this.state = 920;
37743
+ this.state = 924;
37594
37744
  this.match(_MalloyParser.STAR);
37595
37745
  }
37596
37746
  }
@@ -37599,7 +37749,7 @@ ${struct.dialect.sqlFinalStage("__stage0", [
37599
37749
  case _MalloyParser.STAR:
37600
37750
  this.enterOuterAlt(_localctx, 2);
37601
37751
  {
37602
- this.state = 923;
37752
+ this.state = 927;
37603
37753
  this.match(_MalloyParser.STAR);
37604
37754
  }
37605
37755
  break;
@@ -37628,32 +37778,32 @@ ${struct.dialect.sqlFinalStage("__stage0", [
37628
37778
  let _alt;
37629
37779
  this.enterOuterAlt(_localctx, 1);
37630
37780
  {
37631
- this.state = 926;
37781
+ this.state = 930;
37632
37782
  this.indexElement();
37633
- this.state = 933;
37783
+ this.state = 937;
37634
37784
  this._errHandler.sync(this);
37635
- _alt = this.interpreter.adaptivePredict(this._input, 93, this._ctx);
37785
+ _alt = this.interpreter.adaptivePredict(this._input, 94, this._ctx);
37636
37786
  while (_alt !== 2 && _alt !== ATN_1.ATN.INVALID_ALT_NUMBER) {
37637
37787
  if (_alt === 1) {
37638
37788
  {
37639
37789
  {
37640
- this.state = 928;
37790
+ this.state = 932;
37641
37791
  this._errHandler.sync(this);
37642
37792
  _la = this._input.LA(1);
37643
37793
  if (_la === _MalloyParser.COMMA) {
37644
37794
  {
37645
- this.state = 927;
37795
+ this.state = 931;
37646
37796
  this.match(_MalloyParser.COMMA);
37647
37797
  }
37648
37798
  }
37649
- this.state = 930;
37799
+ this.state = 934;
37650
37800
  this.indexElement();
37651
37801
  }
37652
37802
  }
37653
37803
  }
37654
- this.state = 935;
37804
+ this.state = 939;
37655
37805
  this._errHandler.sync(this);
37656
- _alt = this.interpreter.adaptivePredict(this._input, 93, this._ctx);
37806
+ _alt = this.interpreter.adaptivePredict(this._input, 94, this._ctx);
37657
37807
  }
37658
37808
  }
37659
37809
  } catch (re2) {
@@ -37677,18 +37827,18 @@ ${struct.dialect.sqlFinalStage("__stage0", [
37677
37827
  try {
37678
37828
  this.enterOuterAlt(_localctx, 1);
37679
37829
  {
37680
- this.state = 936;
37830
+ this.state = 940;
37681
37831
  this.match(_MalloyParser.INDEX);
37682
- this.state = 937;
37832
+ this.state = 941;
37683
37833
  this.indexFields();
37684
- this.state = 940;
37834
+ this.state = 944;
37685
37835
  this._errHandler.sync(this);
37686
37836
  _la = this._input.LA(1);
37687
37837
  if (_la === _MalloyParser.BY) {
37688
37838
  {
37689
- this.state = 938;
37839
+ this.state = 942;
37690
37840
  this.match(_MalloyParser.BY);
37691
- this.state = 939;
37841
+ this.state = 943;
37692
37842
  this.fieldName();
37693
37843
  }
37694
37844
  }
@@ -37713,9 +37863,9 @@ ${struct.dialect.sqlFinalStage("__stage0", [
37713
37863
  try {
37714
37864
  this.enterOuterAlt(_localctx, 1);
37715
37865
  {
37716
- this.state = 942;
37866
+ this.state = 946;
37717
37867
  this.match(_MalloyParser.SAMPLE);
37718
- this.state = 943;
37868
+ this.state = 947;
37719
37869
  this.sampleSpec();
37720
37870
  }
37721
37871
  } catch (re2) {
@@ -37738,9 +37888,9 @@ ${struct.dialect.sqlFinalStage("__stage0", [
37738
37888
  try {
37739
37889
  this.enterOuterAlt(_localctx, 1);
37740
37890
  {
37741
- this.state = 945;
37891
+ this.state = 949;
37742
37892
  this.match(_MalloyParser.TIMEZONE);
37743
- this.state = 946;
37893
+ this.state = 950;
37744
37894
  this.string();
37745
37895
  }
37746
37896
  } catch (re2) {
@@ -37763,7 +37913,7 @@ ${struct.dialect.sqlFinalStage("__stage0", [
37763
37913
  try {
37764
37914
  this.enterOuterAlt(_localctx, 1);
37765
37915
  {
37766
- this.state = 948;
37916
+ this.state = 952;
37767
37917
  this.match(_MalloyParser.ANNOTATION);
37768
37918
  }
37769
37919
  } catch (re2) {
@@ -37787,7 +37937,7 @@ ${struct.dialect.sqlFinalStage("__stage0", [
37787
37937
  try {
37788
37938
  this.enterOuterAlt(_localctx, 1);
37789
37939
  {
37790
- this.state = 950;
37940
+ this.state = 954;
37791
37941
  _la = this._input.LA(1);
37792
37942
  if (!(_la === _MalloyParser.FALSE || _la === _MalloyParser.TRUE || _la === _MalloyParser.PERCENT_LITERAL || _la === _MalloyParser.INTEGER_LITERAL)) {
37793
37943
  this._errHandler.recoverInline(this);
@@ -37820,7 +37970,7 @@ ${struct.dialect.sqlFinalStage("__stage0", [
37820
37970
  try {
37821
37971
  this.enterOuterAlt(_localctx, 1);
37822
37972
  {
37823
- this.state = 952;
37973
+ this.state = 956;
37824
37974
  _la = this._input.LA(1);
37825
37975
  if (!((_la - 38 & ~31) === 0 && (1 << _la - 38 & (1 << _MalloyParser.AVG - 38 | 1 << _MalloyParser.COUNT - 38 | 1 << _MalloyParser.MAX - 38 | 1 << _MalloyParser.MIN - 38)) !== 0 || _la === _MalloyParser.SUM)) {
37826
37976
  this._errHandler.recoverInline(this);
@@ -37853,7 +38003,7 @@ ${struct.dialect.sqlFinalStage("__stage0", [
37853
38003
  try {
37854
38004
  this.enterOuterAlt(_localctx, 1);
37855
38005
  {
37856
- this.state = 954;
38006
+ this.state = 958;
37857
38007
  _la = this._input.LA(1);
37858
38008
  if (!(_la === _MalloyParser.BOOLEAN || _la === _MalloyParser.DATE || (_la - 73 & ~31) === 0 && (1 << _la - 73 & (1 << _MalloyParser.NUMBER - 73 | 1 << _MalloyParser.STRING - 73 | 1 << _MalloyParser.TIMESTAMP - 73)) !== 0)) {
37859
38009
  this._errHandler.recoverInline(this);
@@ -37886,7 +38036,7 @@ ${struct.dialect.sqlFinalStage("__stage0", [
37886
38036
  try {
37887
38037
  this.enterOuterAlt(_localctx, 1);
37888
38038
  {
37889
- this.state = 956;
38039
+ this.state = 960;
37890
38040
  _la = this._input.LA(1);
37891
38041
  if (!((_la - 118 & ~31) === 0 && (1 << _la - 118 & (1 << _MalloyParser.LT - 118 | 1 << _MalloyParser.GT - 118 | 1 << _MalloyParser.EQ - 118 | 1 << _MalloyParser.NE - 118 | 1 << _MalloyParser.LTE - 118 | 1 << _MalloyParser.GTE - 118 | 1 << _MalloyParser.NOT_MATCH - 118 | 1 << _MalloyParser.MATCH - 118)) !== 0)) {
37892
38042
  this._errHandler.recoverInline(this);
@@ -37916,21 +38066,21 @@ ${struct.dialect.sqlFinalStage("__stage0", [
37916
38066
  let _localctx = new StringContext(this._ctx, this.state);
37917
38067
  this.enterRule(_localctx, 200, _MalloyParser.RULE_string);
37918
38068
  try {
37919
- this.state = 960;
38069
+ this.state = 964;
37920
38070
  this._errHandler.sync(this);
37921
38071
  switch (this._input.LA(1)) {
37922
38072
  case _MalloyParser.SQ_STRING:
37923
38073
  case _MalloyParser.DQ_STRING:
37924
38074
  this.enterOuterAlt(_localctx, 1);
37925
38075
  {
37926
- this.state = 958;
38076
+ this.state = 962;
37927
38077
  this.shortString();
37928
38078
  }
37929
38079
  break;
37930
38080
  case _MalloyParser.SQL_BEGIN:
37931
38081
  this.enterOuterAlt(_localctx, 2);
37932
38082
  {
37933
- this.state = 959;
38083
+ this.state = 963;
37934
38084
  this.sqlString();
37935
38085
  }
37936
38086
  break;
@@ -37958,7 +38108,7 @@ ${struct.dialect.sqlFinalStage("__stage0", [
37958
38108
  try {
37959
38109
  this.enterOuterAlt(_localctx, 1);
37960
38110
  {
37961
- this.state = 962;
38111
+ this.state = 966;
37962
38112
  _la = this._input.LA(1);
37963
38113
  if (!(_la === _MalloyParser.SQ_STRING || _la === _MalloyParser.DQ_STRING)) {
37964
38114
  this._errHandler.recoverInline(this);
@@ -37991,7 +38141,7 @@ ${struct.dialect.sqlFinalStage("__stage0", [
37991
38141
  try {
37992
38142
  this.enterOuterAlt(_localctx, 1);
37993
38143
  {
37994
- this.state = 964;
38144
+ this.state = 968;
37995
38145
  _la = this._input.LA(1);
37996
38146
  if (!(_la === _MalloyParser.NUMERIC_LITERAL || _la === _MalloyParser.INTEGER_LITERAL)) {
37997
38147
  this._errHandler.recoverInline(this);
@@ -38022,7 +38172,7 @@ ${struct.dialect.sqlFinalStage("__stage0", [
38022
38172
  this.enterRule(_localctx, 206, _MalloyParser.RULE_literal);
38023
38173
  let _la;
38024
38174
  try {
38025
- this.state = 973;
38175
+ this.state = 977;
38026
38176
  this._errHandler.sync(this);
38027
38177
  switch (this._input.LA(1)) {
38028
38178
  case _MalloyParser.SQ_STRING:
@@ -38031,7 +38181,7 @@ ${struct.dialect.sqlFinalStage("__stage0", [
38031
38181
  _localctx = new ExprStringContext(_localctx);
38032
38182
  this.enterOuterAlt(_localctx, 1);
38033
38183
  {
38034
- this.state = 966;
38184
+ this.state = 970;
38035
38185
  this.string();
38036
38186
  }
38037
38187
  break;
@@ -38040,7 +38190,7 @@ ${struct.dialect.sqlFinalStage("__stage0", [
38040
38190
  _localctx = new ExprNumberContext(_localctx);
38041
38191
  this.enterOuterAlt(_localctx, 2);
38042
38192
  {
38043
- this.state = 967;
38193
+ this.state = 971;
38044
38194
  this.numericLiteral();
38045
38195
  }
38046
38196
  break;
@@ -38054,7 +38204,7 @@ ${struct.dialect.sqlFinalStage("__stage0", [
38054
38204
  _localctx = new ExprTimeContext(_localctx);
38055
38205
  this.enterOuterAlt(_localctx, 3);
38056
38206
  {
38057
- this.state = 968;
38207
+ this.state = 972;
38058
38208
  this.dateLiteral();
38059
38209
  }
38060
38210
  break;
@@ -38062,7 +38212,7 @@ ${struct.dialect.sqlFinalStage("__stage0", [
38062
38212
  _localctx = new ExprNULLContext(_localctx);
38063
38213
  this.enterOuterAlt(_localctx, 4);
38064
38214
  {
38065
- this.state = 969;
38215
+ this.state = 973;
38066
38216
  this.match(_MalloyParser.NULL);
38067
38217
  }
38068
38218
  break;
@@ -38071,7 +38221,7 @@ ${struct.dialect.sqlFinalStage("__stage0", [
38071
38221
  _localctx = new ExprBoolContext(_localctx);
38072
38222
  this.enterOuterAlt(_localctx, 5);
38073
38223
  {
38074
- this.state = 970;
38224
+ this.state = 974;
38075
38225
  _la = this._input.LA(1);
38076
38226
  if (!(_la === _MalloyParser.FALSE || _la === _MalloyParser.TRUE)) {
38077
38227
  this._errHandler.recoverInline(this);
@@ -38088,7 +38238,7 @@ ${struct.dialect.sqlFinalStage("__stage0", [
38088
38238
  _localctx = new ExprRegexContext(_localctx);
38089
38239
  this.enterOuterAlt(_localctx, 6);
38090
38240
  {
38091
- this.state = 971;
38241
+ this.state = 975;
38092
38242
  this.match(_MalloyParser.HACKY_REGEX);
38093
38243
  }
38094
38244
  break;
@@ -38096,7 +38246,7 @@ ${struct.dialect.sqlFinalStage("__stage0", [
38096
38246
  _localctx = new ExprNowContext(_localctx);
38097
38247
  this.enterOuterAlt(_localctx, 7);
38098
38248
  {
38099
- this.state = 972;
38249
+ this.state = 976;
38100
38250
  this.match(_MalloyParser.NOW);
38101
38251
  }
38102
38252
  break;
@@ -38121,14 +38271,14 @@ ${struct.dialect.sqlFinalStage("__stage0", [
38121
38271
  let _localctx = new DateLiteralContext(this._ctx, this.state);
38122
38272
  this.enterRule(_localctx, 208, _MalloyParser.RULE_dateLiteral);
38123
38273
  try {
38124
- this.state = 982;
38274
+ this.state = 986;
38125
38275
  this._errHandler.sync(this);
38126
38276
  switch (this._input.LA(1)) {
38127
38277
  case _MalloyParser.LITERAL_TIMESTAMP:
38128
38278
  _localctx = new LiteralTimestampContext(_localctx);
38129
38279
  this.enterOuterAlt(_localctx, 1);
38130
38280
  {
38131
- this.state = 975;
38281
+ this.state = 979;
38132
38282
  this.match(_MalloyParser.LITERAL_TIMESTAMP);
38133
38283
  }
38134
38284
  break;
@@ -38136,7 +38286,7 @@ ${struct.dialect.sqlFinalStage("__stage0", [
38136
38286
  _localctx = new LiteralHourContext(_localctx);
38137
38287
  this.enterOuterAlt(_localctx, 2);
38138
38288
  {
38139
- this.state = 976;
38289
+ this.state = 980;
38140
38290
  this.match(_MalloyParser.LITERAL_HOUR);
38141
38291
  }
38142
38292
  break;
@@ -38144,7 +38294,7 @@ ${struct.dialect.sqlFinalStage("__stage0", [
38144
38294
  _localctx = new LiteralDayContext(_localctx);
38145
38295
  this.enterOuterAlt(_localctx, 3);
38146
38296
  {
38147
- this.state = 977;
38297
+ this.state = 981;
38148
38298
  this.match(_MalloyParser.LITERAL_DAY);
38149
38299
  }
38150
38300
  break;
@@ -38152,7 +38302,7 @@ ${struct.dialect.sqlFinalStage("__stage0", [
38152
38302
  _localctx = new LiteralWeekContext(_localctx);
38153
38303
  this.enterOuterAlt(_localctx, 4);
38154
38304
  {
38155
- this.state = 978;
38305
+ this.state = 982;
38156
38306
  this.match(_MalloyParser.LITERAL_WEEK);
38157
38307
  }
38158
38308
  break;
@@ -38160,7 +38310,7 @@ ${struct.dialect.sqlFinalStage("__stage0", [
38160
38310
  _localctx = new LiteralMonthContext(_localctx);
38161
38311
  this.enterOuterAlt(_localctx, 5);
38162
38312
  {
38163
- this.state = 979;
38313
+ this.state = 983;
38164
38314
  this.match(_MalloyParser.LITERAL_MONTH);
38165
38315
  }
38166
38316
  break;
@@ -38168,7 +38318,7 @@ ${struct.dialect.sqlFinalStage("__stage0", [
38168
38318
  _localctx = new LiteralQuarterContext(_localctx);
38169
38319
  this.enterOuterAlt(_localctx, 6);
38170
38320
  {
38171
- this.state = 980;
38321
+ this.state = 984;
38172
38322
  this.match(_MalloyParser.LITERAL_QUARTER);
38173
38323
  }
38174
38324
  break;
@@ -38176,7 +38326,7 @@ ${struct.dialect.sqlFinalStage("__stage0", [
38176
38326
  _localctx = new LiteralYearContext(_localctx);
38177
38327
  this.enterOuterAlt(_localctx, 7);
38178
38328
  {
38179
- this.state = 981;
38329
+ this.state = 985;
38180
38330
  this.match(_MalloyParser.LITERAL_YEAR);
38181
38331
  }
38182
38332
  break;
@@ -38203,7 +38353,7 @@ ${struct.dialect.sqlFinalStage("__stage0", [
38203
38353
  try {
38204
38354
  this.enterOuterAlt(_localctx, 1);
38205
38355
  {
38206
- this.state = 984;
38356
+ this.state = 988;
38207
38357
  this.string();
38208
38358
  }
38209
38359
  } catch (re2) {
@@ -38226,7 +38376,7 @@ ${struct.dialect.sqlFinalStage("__stage0", [
38226
38376
  try {
38227
38377
  this.enterOuterAlt(_localctx, 1);
38228
38378
  {
38229
- this.state = 986;
38379
+ this.state = 990;
38230
38380
  this.string();
38231
38381
  }
38232
38382
  } catch (re2) {
@@ -38250,7 +38400,7 @@ ${struct.dialect.sqlFinalStage("__stage0", [
38250
38400
  try {
38251
38401
  this.enterOuterAlt(_localctx, 1);
38252
38402
  {
38253
- this.state = 988;
38403
+ this.state = 992;
38254
38404
  _la = this._input.LA(1);
38255
38405
  if (!(_la === _MalloyParser.BQ_STRING || _la === _MalloyParser.IDENTIFIER)) {
38256
38406
  this._errHandler.recoverInline(this);
@@ -38283,7 +38433,7 @@ ${struct.dialect.sqlFinalStage("__stage0", [
38283
38433
  try {
38284
38434
  this.enterOuterAlt(_localctx, 1);
38285
38435
  {
38286
- this.state = 990;
38436
+ this.state = 994;
38287
38437
  _la = this._input.LA(1);
38288
38438
  if (!((_la - 46 & ~31) === 0 && (1 << _la - 46 & (1 << _MalloyParser.DAY - 46 | 1 << _MalloyParser.HOUR - 46 | 1 << _MalloyParser.MINUTE - 46 | 1 << _MalloyParser.MONTH - 46 | 1 << _MalloyParser.QUARTER - 46)) !== 0 || (_la - 79 & ~31) === 0 && (1 << _la - 79 & (1 << _MalloyParser.SECOND - 79 | 1 << _MalloyParser.WEEK - 79 | 1 << _MalloyParser.YEAR - 79)) !== 0)) {
38289
38439
  this._errHandler.recoverInline(this);
@@ -38316,7 +38466,7 @@ ${struct.dialect.sqlFinalStage("__stage0", [
38316
38466
  try {
38317
38467
  this.enterOuterAlt(_localctx, 1);
38318
38468
  {
38319
- this.state = 992;
38469
+ this.state = 996;
38320
38470
  _la = this._input.LA(1);
38321
38471
  if (!(_la === _MalloyParser.ALL || _la === _MalloyParser.EXCLUDE)) {
38322
38472
  this._errHandler.recoverInline(this);
@@ -38346,7 +38496,7 @@ ${struct.dialect.sqlFinalStage("__stage0", [
38346
38496
  let _localctx = new MalloyOrSQLTypeContext(this._ctx, this.state);
38347
38497
  this.enterRule(_localctx, 220, _MalloyParser.RULE_malloyOrSQLType);
38348
38498
  try {
38349
- this.state = 996;
38499
+ this.state = 1e3;
38350
38500
  this._errHandler.sync(this);
38351
38501
  switch (this._input.LA(1)) {
38352
38502
  case _MalloyParser.BOOLEAN:
@@ -38356,7 +38506,7 @@ ${struct.dialect.sqlFinalStage("__stage0", [
38356
38506
  case _MalloyParser.TIMESTAMP:
38357
38507
  this.enterOuterAlt(_localctx, 1);
38358
38508
  {
38359
- this.state = 994;
38509
+ this.state = 998;
38360
38510
  this.malloyType();
38361
38511
  }
38362
38512
  break;
@@ -38365,7 +38515,7 @@ ${struct.dialect.sqlFinalStage("__stage0", [
38365
38515
  case _MalloyParser.SQL_BEGIN:
38366
38516
  this.enterOuterAlt(_localctx, 2);
38367
38517
  {
38368
- this.state = 995;
38518
+ this.state = 999;
38369
38519
  this.string();
38370
38520
  }
38371
38521
  break;
@@ -38401,15 +38551,15 @@ ${struct.dialect.sqlFinalStage("__stage0", [
38401
38551
  let _alt;
38402
38552
  this.enterOuterAlt(_localctx, 1);
38403
38553
  {
38404
- this.state = 1081;
38554
+ this.state = 1085;
38405
38555
  this._errHandler.sync(this);
38406
- switch (this.interpreter.adaptivePredict(this._input, 108, this._ctx)) {
38556
+ switch (this.interpreter.adaptivePredict(this._input, 109, this._ctx)) {
38407
38557
  case 1:
38408
38558
  {
38409
38559
  _localctx = new ExprFieldPathContext(_localctx);
38410
38560
  this._ctx = _localctx;
38411
38561
  _prevctx = _localctx;
38412
- this.state = 999;
38562
+ this.state = 1003;
38413
38563
  this.fieldPath();
38414
38564
  }
38415
38565
  break;
@@ -38418,7 +38568,7 @@ ${struct.dialect.sqlFinalStage("__stage0", [
38418
38568
  _localctx = new ExprLiteralContext(_localctx);
38419
38569
  this._ctx = _localctx;
38420
38570
  _prevctx = _localctx;
38421
- this.state = 1e3;
38571
+ this.state = 1004;
38422
38572
  this.literal();
38423
38573
  }
38424
38574
  break;
@@ -38427,9 +38577,9 @@ ${struct.dialect.sqlFinalStage("__stage0", [
38427
38577
  _localctx = new ExprMinusContext(_localctx);
38428
38578
  this._ctx = _localctx;
38429
38579
  _prevctx = _localctx;
38430
- this.state = 1001;
38580
+ this.state = 1005;
38431
38581
  this.match(_MalloyParser.MINUS);
38432
- this.state = 1002;
38582
+ this.state = 1006;
38433
38583
  this.fieldExpr(22);
38434
38584
  }
38435
38585
  break;
@@ -38438,9 +38588,9 @@ ${struct.dialect.sqlFinalStage("__stage0", [
38438
38588
  _localctx = new ExprNotContext(_localctx);
38439
38589
  this._ctx = _localctx;
38440
38590
  _prevctx = _localctx;
38441
- this.state = 1003;
38591
+ this.state = 1007;
38442
38592
  this.match(_MalloyParser.NOT);
38443
- this.state = 1004;
38593
+ this.state = 1008;
38444
38594
  this.fieldExpr(13);
38445
38595
  }
38446
38596
  break;
@@ -38449,17 +38599,17 @@ ${struct.dialect.sqlFinalStage("__stage0", [
38449
38599
  _localctx = new ExprCastContext(_localctx);
38450
38600
  this._ctx = _localctx;
38451
38601
  _prevctx = _localctx;
38452
- this.state = 1005;
38602
+ this.state = 1009;
38453
38603
  this.match(_MalloyParser.CAST);
38454
- this.state = 1006;
38604
+ this.state = 1010;
38455
38605
  this.match(_MalloyParser.OPAREN);
38456
- this.state = 1007;
38606
+ this.state = 1011;
38457
38607
  this.fieldExpr(0);
38458
- this.state = 1008;
38608
+ this.state = 1012;
38459
38609
  this.match(_MalloyParser.AS);
38460
- this.state = 1009;
38610
+ this.state = 1013;
38461
38611
  this.malloyOrSQLType();
38462
- this.state = 1010;
38612
+ this.state = 1014;
38463
38613
  this.match(_MalloyParser.CPAREN);
38464
38614
  }
38465
38615
  break;
@@ -38468,15 +38618,15 @@ ${struct.dialect.sqlFinalStage("__stage0", [
38468
38618
  _localctx = new ExprCountDisinctContext(_localctx);
38469
38619
  this._ctx = _localctx;
38470
38620
  _prevctx = _localctx;
38471
- this.state = 1012;
38621
+ this.state = 1016;
38472
38622
  this.match(_MalloyParser.COUNT);
38473
- this.state = 1013;
38623
+ this.state = 1017;
38474
38624
  this.match(_MalloyParser.OPAREN);
38475
- this.state = 1014;
38625
+ this.state = 1018;
38476
38626
  this.match(_MalloyParser.DISTINCT);
38477
- this.state = 1015;
38627
+ this.state = 1019;
38478
38628
  this.fieldExpr(0);
38479
- this.state = 1016;
38629
+ this.state = 1020;
38480
38630
  this.match(_MalloyParser.CPAREN);
38481
38631
  }
38482
38632
  break;
@@ -38485,22 +38635,22 @@ ${struct.dialect.sqlFinalStage("__stage0", [
38485
38635
  _localctx = new ExprPathlessAggregateContext(_localctx);
38486
38636
  this._ctx = _localctx;
38487
38637
  _prevctx = _localctx;
38488
- this.state = 1020;
38638
+ this.state = 1024;
38489
38639
  this._errHandler.sync(this);
38490
38640
  _la = this._input.LA(1);
38491
38641
  if (_la === _MalloyParser.SOURCE_KW) {
38492
38642
  {
38493
- this.state = 1018;
38643
+ this.state = 1022;
38494
38644
  this.match(_MalloyParser.SOURCE_KW);
38495
- this.state = 1019;
38645
+ this.state = 1023;
38496
38646
  this.match(_MalloyParser.DOT);
38497
38647
  }
38498
38648
  }
38499
- this.state = 1022;
38649
+ this.state = 1026;
38500
38650
  this.aggregate();
38501
- this.state = 1023;
38651
+ this.state = 1027;
38502
38652
  this.match(_MalloyParser.OPAREN);
38503
- this.state = 1026;
38653
+ this.state = 1030;
38504
38654
  this._errHandler.sync(this);
38505
38655
  switch (this._input.LA(1)) {
38506
38656
  case _MalloyParser.ALL:
@@ -38544,13 +38694,13 @@ ${struct.dialect.sqlFinalStage("__stage0", [
38544
38694
  case _MalloyParser.INTEGER_LITERAL:
38545
38695
  case _MalloyParser.SQL_BEGIN:
38546
38696
  {
38547
- this.state = 1024;
38697
+ this.state = 1028;
38548
38698
  this.fieldExpr(0);
38549
38699
  }
38550
38700
  break;
38551
38701
  case _MalloyParser.STAR:
38552
38702
  {
38553
- this.state = 1025;
38703
+ this.state = 1029;
38554
38704
  this.match(_MalloyParser.STAR);
38555
38705
  }
38556
38706
  break;
@@ -38559,7 +38709,7 @@ ${struct.dialect.sqlFinalStage("__stage0", [
38559
38709
  default:
38560
38710
  break;
38561
38711
  }
38562
- this.state = 1028;
38712
+ this.state = 1032;
38563
38713
  this.match(_MalloyParser.CPAREN);
38564
38714
  }
38565
38715
  break;
@@ -38568,24 +38718,24 @@ ${struct.dialect.sqlFinalStage("__stage0", [
38568
38718
  _localctx = new ExprAggregateContext(_localctx);
38569
38719
  this._ctx = _localctx;
38570
38720
  _prevctx = _localctx;
38571
- this.state = 1030;
38721
+ this.state = 1034;
38572
38722
  this.fieldPath();
38573
- this.state = 1031;
38723
+ this.state = 1035;
38574
38724
  this.match(_MalloyParser.DOT);
38575
- this.state = 1032;
38725
+ this.state = 1036;
38576
38726
  this.aggregate();
38577
- this.state = 1033;
38727
+ this.state = 1037;
38578
38728
  this.match(_MalloyParser.OPAREN);
38579
- this.state = 1035;
38729
+ this.state = 1039;
38580
38730
  this._errHandler.sync(this);
38581
38731
  _la = this._input.LA(1);
38582
38732
  if ((_la - 34 & ~31) === 0 && (1 << _la - 34 & (1 << _MalloyParser.ALL - 34 | 1 << _MalloyParser.AVG - 34 | 1 << _MalloyParser.CAST - 34 | 1 << _MalloyParser.COUNT - 34 | 1 << _MalloyParser.DAY - 34 | 1 << _MalloyParser.EXCLUDE - 34 | 1 << _MalloyParser.FALSE - 34 | 1 << _MalloyParser.HOUR - 34)) !== 0 || (_la - 66 & ~31) === 0 && (1 << _la - 66 & (1 << _MalloyParser.MAX - 66 | 1 << _MalloyParser.MIN - 66 | 1 << _MalloyParser.MINUTE - 66 | 1 << _MalloyParser.MONTH - 66 | 1 << _MalloyParser.NOT - 66 | 1 << _MalloyParser.NOW - 66 | 1 << _MalloyParser.NULL - 66 | 1 << _MalloyParser.PICK - 66 | 1 << _MalloyParser.QUARTER - 66 | 1 << _MalloyParser.SECOND - 66 | 1 << _MalloyParser.SOURCE_KW - 66 | 1 << _MalloyParser.SUM - 66 | 1 << _MalloyParser.TRUE - 66 | 1 << _MalloyParser.WEEK - 66 | 1 << _MalloyParser.YEAR - 66 | 1 << _MalloyParser.HACKY_REGEX - 66)) !== 0 || (_la - 98 & ~31) === 0 && (1 << _la - 98 & (1 << _MalloyParser.SQ_STRING - 98 | 1 << _MalloyParser.DQ_STRING - 98 | 1 << _MalloyParser.BQ_STRING - 98 | 1 << _MalloyParser.OPAREN - 98 | 1 << _MalloyParser.MINUS - 98)) !== 0 || (_la - 136 & ~31) === 0 && (1 << _la - 136 & (1 << _MalloyParser.LITERAL_TIMESTAMP - 136 | 1 << _MalloyParser.LITERAL_HOUR - 136 | 1 << _MalloyParser.LITERAL_DAY - 136 | 1 << _MalloyParser.LITERAL_QUARTER - 136 | 1 << _MalloyParser.LITERAL_MONTH - 136 | 1 << _MalloyParser.LITERAL_WEEK - 136 | 1 << _MalloyParser.LITERAL_YEAR - 136 | 1 << _MalloyParser.IDENTIFIER - 136 | 1 << _MalloyParser.NUMERIC_LITERAL - 136 | 1 << _MalloyParser.INTEGER_LITERAL - 136 | 1 << _MalloyParser.SQL_BEGIN - 136)) !== 0) {
38583
38733
  {
38584
- this.state = 1034;
38734
+ this.state = 1038;
38585
38735
  this.fieldExpr(0);
38586
38736
  }
38587
38737
  }
38588
- this.state = 1037;
38738
+ this.state = 1041;
38589
38739
  this.match(_MalloyParser.CPAREN);
38590
38740
  }
38591
38741
  break;
@@ -38594,11 +38744,11 @@ ${struct.dialect.sqlFinalStage("__stage0", [
38594
38744
  _localctx = new ExprExprContext(_localctx);
38595
38745
  this._ctx = _localctx;
38596
38746
  _prevctx = _localctx;
38597
- this.state = 1039;
38747
+ this.state = 1043;
38598
38748
  this.match(_MalloyParser.OPAREN);
38599
- this.state = 1040;
38749
+ this.state = 1044;
38600
38750
  this.partialAllowedFieldExpr();
38601
- this.state = 1041;
38751
+ this.state = 1045;
38602
38752
  this.match(_MalloyParser.CPAREN);
38603
38753
  }
38604
38754
  break;
@@ -38607,26 +38757,26 @@ ${struct.dialect.sqlFinalStage("__stage0", [
38607
38757
  _localctx = new ExprAggFuncContext(_localctx);
38608
38758
  this._ctx = _localctx;
38609
38759
  _prevctx = _localctx;
38610
- this.state = 1043;
38760
+ this.state = 1047;
38611
38761
  this.fieldPath();
38612
- this.state = 1044;
38762
+ this.state = 1048;
38613
38763
  this.match(_MalloyParser.DOT);
38614
- this.state = 1045;
38764
+ this.state = 1049;
38615
38765
  this.id();
38616
- this.state = 1046;
38766
+ this.state = 1050;
38617
38767
  this.match(_MalloyParser.OPAREN);
38618
38768
  {
38619
- this.state = 1048;
38769
+ this.state = 1052;
38620
38770
  this._errHandler.sync(this);
38621
38771
  _la = this._input.LA(1);
38622
38772
  if ((_la - 34 & ~31) === 0 && (1 << _la - 34 & (1 << _MalloyParser.ALL - 34 | 1 << _MalloyParser.AVG - 34 | 1 << _MalloyParser.CAST - 34 | 1 << _MalloyParser.COUNT - 34 | 1 << _MalloyParser.DAY - 34 | 1 << _MalloyParser.EXCLUDE - 34 | 1 << _MalloyParser.FALSE - 34 | 1 << _MalloyParser.HOUR - 34)) !== 0 || (_la - 66 & ~31) === 0 && (1 << _la - 66 & (1 << _MalloyParser.MAX - 66 | 1 << _MalloyParser.MIN - 66 | 1 << _MalloyParser.MINUTE - 66 | 1 << _MalloyParser.MONTH - 66 | 1 << _MalloyParser.NOT - 66 | 1 << _MalloyParser.NOW - 66 | 1 << _MalloyParser.NULL - 66 | 1 << _MalloyParser.PICK - 66 | 1 << _MalloyParser.QUARTER - 66 | 1 << _MalloyParser.SECOND - 66 | 1 << _MalloyParser.SOURCE_KW - 66 | 1 << _MalloyParser.SUM - 66 | 1 << _MalloyParser.TRUE - 66 | 1 << _MalloyParser.WEEK - 66 | 1 << _MalloyParser.YEAR - 66 | 1 << _MalloyParser.HACKY_REGEX - 66)) !== 0 || (_la - 98 & ~31) === 0 && (1 << _la - 98 & (1 << _MalloyParser.SQ_STRING - 98 | 1 << _MalloyParser.DQ_STRING - 98 | 1 << _MalloyParser.BQ_STRING - 98 | 1 << _MalloyParser.OPAREN - 98 | 1 << _MalloyParser.MINUS - 98)) !== 0 || (_la - 136 & ~31) === 0 && (1 << _la - 136 & (1 << _MalloyParser.LITERAL_TIMESTAMP - 136 | 1 << _MalloyParser.LITERAL_HOUR - 136 | 1 << _MalloyParser.LITERAL_DAY - 136 | 1 << _MalloyParser.LITERAL_QUARTER - 136 | 1 << _MalloyParser.LITERAL_MONTH - 136 | 1 << _MalloyParser.LITERAL_WEEK - 136 | 1 << _MalloyParser.LITERAL_YEAR - 136 | 1 << _MalloyParser.IDENTIFIER - 136 | 1 << _MalloyParser.NUMERIC_LITERAL - 136 | 1 << _MalloyParser.INTEGER_LITERAL - 136 | 1 << _MalloyParser.SQL_BEGIN - 136)) !== 0) {
38623
38773
  {
38624
- this.state = 1047;
38774
+ this.state = 1051;
38625
38775
  this.argumentList();
38626
38776
  }
38627
38777
  }
38628
38778
  }
38629
- this.state = 1050;
38779
+ this.state = 1054;
38630
38780
  this.match(_MalloyParser.CPAREN);
38631
38781
  }
38632
38782
  break;
@@ -38635,28 +38785,28 @@ ${struct.dialect.sqlFinalStage("__stage0", [
38635
38785
  _localctx = new ExprFuncContext(_localctx);
38636
38786
  this._ctx = _localctx;
38637
38787
  _prevctx = _localctx;
38638
- this.state = 1060;
38788
+ this.state = 1064;
38639
38789
  this._errHandler.sync(this);
38640
38790
  switch (this._input.LA(1)) {
38641
38791
  case _MalloyParser.BQ_STRING:
38642
38792
  case _MalloyParser.IDENTIFIER:
38643
38793
  {
38644
38794
  {
38645
- this.state = 1052;
38795
+ this.state = 1056;
38646
38796
  this.id();
38647
- this.state = 1057;
38797
+ this.state = 1061;
38648
38798
  this._errHandler.sync(this);
38649
38799
  _la = this._input.LA(1);
38650
38800
  if (_la === _MalloyParser.EXCLAM) {
38651
38801
  {
38652
- this.state = 1053;
38802
+ this.state = 1057;
38653
38803
  this.match(_MalloyParser.EXCLAM);
38654
- this.state = 1055;
38804
+ this.state = 1059;
38655
38805
  this._errHandler.sync(this);
38656
38806
  _la = this._input.LA(1);
38657
38807
  if (_la === _MalloyParser.BOOLEAN || _la === _MalloyParser.DATE || (_la - 73 & ~31) === 0 && (1 << _la - 73 & (1 << _MalloyParser.NUMBER - 73 | 1 << _MalloyParser.STRING - 73 | 1 << _MalloyParser.TIMESTAMP - 73)) !== 0) {
38658
38808
  {
38659
- this.state = 1054;
38809
+ this.state = 1058;
38660
38810
  this.malloyType();
38661
38811
  }
38662
38812
  }
@@ -38674,27 +38824,27 @@ ${struct.dialect.sqlFinalStage("__stage0", [
38674
38824
  case _MalloyParser.WEEK:
38675
38825
  case _MalloyParser.YEAR:
38676
38826
  {
38677
- this.state = 1059;
38827
+ this.state = 1063;
38678
38828
  this.timeframe();
38679
38829
  }
38680
38830
  break;
38681
38831
  default:
38682
38832
  throw new NoViableAltException_1.NoViableAltException(this);
38683
38833
  }
38684
- this.state = 1062;
38834
+ this.state = 1066;
38685
38835
  this.match(_MalloyParser.OPAREN);
38686
38836
  {
38687
- this.state = 1064;
38837
+ this.state = 1068;
38688
38838
  this._errHandler.sync(this);
38689
38839
  _la = this._input.LA(1);
38690
38840
  if ((_la - 34 & ~31) === 0 && (1 << _la - 34 & (1 << _MalloyParser.ALL - 34 | 1 << _MalloyParser.AVG - 34 | 1 << _MalloyParser.CAST - 34 | 1 << _MalloyParser.COUNT - 34 | 1 << _MalloyParser.DAY - 34 | 1 << _MalloyParser.EXCLUDE - 34 | 1 << _MalloyParser.FALSE - 34 | 1 << _MalloyParser.HOUR - 34)) !== 0 || (_la - 66 & ~31) === 0 && (1 << _la - 66 & (1 << _MalloyParser.MAX - 66 | 1 << _MalloyParser.MIN - 66 | 1 << _MalloyParser.MINUTE - 66 | 1 << _MalloyParser.MONTH - 66 | 1 << _MalloyParser.NOT - 66 | 1 << _MalloyParser.NOW - 66 | 1 << _MalloyParser.NULL - 66 | 1 << _MalloyParser.PICK - 66 | 1 << _MalloyParser.QUARTER - 66 | 1 << _MalloyParser.SECOND - 66 | 1 << _MalloyParser.SOURCE_KW - 66 | 1 << _MalloyParser.SUM - 66 | 1 << _MalloyParser.TRUE - 66 | 1 << _MalloyParser.WEEK - 66 | 1 << _MalloyParser.YEAR - 66 | 1 << _MalloyParser.HACKY_REGEX - 66)) !== 0 || (_la - 98 & ~31) === 0 && (1 << _la - 98 & (1 << _MalloyParser.SQ_STRING - 98 | 1 << _MalloyParser.DQ_STRING - 98 | 1 << _MalloyParser.BQ_STRING - 98 | 1 << _MalloyParser.OPAREN - 98 | 1 << _MalloyParser.MINUS - 98)) !== 0 || (_la - 136 & ~31) === 0 && (1 << _la - 136 & (1 << _MalloyParser.LITERAL_TIMESTAMP - 136 | 1 << _MalloyParser.LITERAL_HOUR - 136 | 1 << _MalloyParser.LITERAL_DAY - 136 | 1 << _MalloyParser.LITERAL_QUARTER - 136 | 1 << _MalloyParser.LITERAL_MONTH - 136 | 1 << _MalloyParser.LITERAL_WEEK - 136 | 1 << _MalloyParser.LITERAL_YEAR - 136 | 1 << _MalloyParser.IDENTIFIER - 136 | 1 << _MalloyParser.NUMERIC_LITERAL - 136 | 1 << _MalloyParser.INTEGER_LITERAL - 136 | 1 << _MalloyParser.SQL_BEGIN - 136)) !== 0) {
38691
38841
  {
38692
- this.state = 1063;
38842
+ this.state = 1067;
38693
38843
  this.argumentList();
38694
38844
  }
38695
38845
  }
38696
38846
  }
38697
- this.state = 1066;
38847
+ this.state = 1070;
38698
38848
  this.match(_MalloyParser.CPAREN);
38699
38849
  }
38700
38850
  break;
@@ -38703,7 +38853,7 @@ ${struct.dialect.sqlFinalStage("__stage0", [
38703
38853
  _localctx = new ExprPickContext(_localctx);
38704
38854
  this._ctx = _localctx;
38705
38855
  _prevctx = _localctx;
38706
- this.state = 1068;
38856
+ this.state = 1072;
38707
38857
  this.pickStatement();
38708
38858
  }
38709
38859
  break;
@@ -38712,37 +38862,37 @@ ${struct.dialect.sqlFinalStage("__stage0", [
38712
38862
  _localctx = new ExprUngroupContext(_localctx);
38713
38863
  this._ctx = _localctx;
38714
38864
  _prevctx = _localctx;
38715
- this.state = 1069;
38865
+ this.state = 1073;
38716
38866
  this.ungroup();
38717
- this.state = 1070;
38867
+ this.state = 1074;
38718
38868
  this.match(_MalloyParser.OPAREN);
38719
- this.state = 1071;
38869
+ this.state = 1075;
38720
38870
  this.fieldExpr(0);
38721
- this.state = 1076;
38871
+ this.state = 1080;
38722
38872
  this._errHandler.sync(this);
38723
38873
  _la = this._input.LA(1);
38724
38874
  while (_la === _MalloyParser.COMMA) {
38725
38875
  {
38726
38876
  {
38727
- this.state = 1072;
38877
+ this.state = 1076;
38728
38878
  this.match(_MalloyParser.COMMA);
38729
- this.state = 1073;
38879
+ this.state = 1077;
38730
38880
  this.fieldName();
38731
38881
  }
38732
38882
  }
38733
- this.state = 1078;
38883
+ this.state = 1082;
38734
38884
  this._errHandler.sync(this);
38735
38885
  _la = this._input.LA(1);
38736
38886
  }
38737
- this.state = 1079;
38887
+ this.state = 1083;
38738
38888
  this.match(_MalloyParser.CPAREN);
38739
38889
  }
38740
38890
  break;
38741
38891
  }
38742
38892
  this._ctx._stop = this._input.tryLT(-1);
38743
- this.state = 1134;
38893
+ this.state = 1138;
38744
38894
  this._errHandler.sync(this);
38745
- _alt = this.interpreter.adaptivePredict(this._input, 110, this._ctx);
38895
+ _alt = this.interpreter.adaptivePredict(this._input, 111, this._ctx);
38746
38896
  while (_alt !== 2 && _alt !== ATN_1.ATN.INVALID_ALT_NUMBER) {
38747
38897
  if (_alt === 1) {
38748
38898
  if (this._parseListeners != null) {
@@ -38750,18 +38900,18 @@ ${struct.dialect.sqlFinalStage("__stage0", [
38750
38900
  }
38751
38901
  _prevctx = _localctx;
38752
38902
  {
38753
- this.state = 1132;
38903
+ this.state = 1136;
38754
38904
  this._errHandler.sync(this);
38755
- switch (this.interpreter.adaptivePredict(this._input, 109, this._ctx)) {
38905
+ switch (this.interpreter.adaptivePredict(this._input, 110, this._ctx)) {
38756
38906
  case 1:
38757
38907
  {
38758
38908
  _localctx = new ExprMulDivContext(new FieldExprContext(_parentctx, _parentState));
38759
38909
  this.pushNewRecursionContext(_localctx, _startState, _MalloyParser.RULE_fieldExpr);
38760
- this.state = 1083;
38910
+ this.state = 1087;
38761
38911
  if (!this.precpred(this._ctx, 21)) {
38762
38912
  throw this.createFailedPredicateException("this.precpred(this._ctx, 21)");
38763
38913
  }
38764
- this.state = 1084;
38914
+ this.state = 1088;
38765
38915
  _la = this._input.LA(1);
38766
38916
  if (!((_la - 126 & ~31) === 0 && (1 << _la - 126 & (1 << _MalloyParser.STAR - 126 | 1 << _MalloyParser.SLASH - 126 | 1 << _MalloyParser.PERCENT - 126)) !== 0)) {
38767
38917
  this._errHandler.recoverInline(this);
@@ -38772,7 +38922,7 @@ ${struct.dialect.sqlFinalStage("__stage0", [
38772
38922
  this._errHandler.reportMatch(this);
38773
38923
  this.consume();
38774
38924
  }
38775
- this.state = 1085;
38925
+ this.state = 1089;
38776
38926
  this.fieldExpr(22);
38777
38927
  }
38778
38928
  break;
@@ -38780,11 +38930,11 @@ ${struct.dialect.sqlFinalStage("__stage0", [
38780
38930
  {
38781
38931
  _localctx = new ExprAddSubContext(new FieldExprContext(_parentctx, _parentState));
38782
38932
  this.pushNewRecursionContext(_localctx, _startState, _MalloyParser.RULE_fieldExpr);
38783
- this.state = 1086;
38933
+ this.state = 1090;
38784
38934
  if (!this.precpred(this._ctx, 20)) {
38785
38935
  throw this.createFailedPredicateException("this.precpred(this._ctx, 20)");
38786
38936
  }
38787
- this.state = 1087;
38937
+ this.state = 1091;
38788
38938
  _la = this._input.LA(1);
38789
38939
  if (!(_la === _MalloyParser.PLUS || _la === _MalloyParser.MINUS)) {
38790
38940
  this._errHandler.recoverInline(this);
@@ -38795,7 +38945,7 @@ ${struct.dialect.sqlFinalStage("__stage0", [
38795
38945
  this._errHandler.reportMatch(this);
38796
38946
  this.consume();
38797
38947
  }
38798
- this.state = 1088;
38948
+ this.state = 1092;
38799
38949
  this.fieldExpr(21);
38800
38950
  }
38801
38951
  break;
@@ -38803,13 +38953,13 @@ ${struct.dialect.sqlFinalStage("__stage0", [
38803
38953
  {
38804
38954
  _localctx = new ExprRangeContext(new FieldExprContext(_parentctx, _parentState));
38805
38955
  this.pushNewRecursionContext(_localctx, _startState, _MalloyParser.RULE_fieldExpr);
38806
- this.state = 1089;
38956
+ this.state = 1093;
38807
38957
  if (!this.precpred(this._ctx, 19)) {
38808
38958
  throw this.createFailedPredicateException("this.precpred(this._ctx, 19)");
38809
38959
  }
38810
- this.state = 1090;
38960
+ this.state = 1094;
38811
38961
  this.match(_MalloyParser.TO);
38812
- this.state = 1091;
38962
+ this.state = 1095;
38813
38963
  this.fieldExpr(20);
38814
38964
  }
38815
38965
  break;
@@ -38817,13 +38967,13 @@ ${struct.dialect.sqlFinalStage("__stage0", [
38817
38967
  {
38818
38968
  _localctx = new ExprCompareContext(new FieldExprContext(_parentctx, _parentState));
38819
38969
  this.pushNewRecursionContext(_localctx, _startState, _MalloyParser.RULE_fieldExpr);
38820
- this.state = 1092;
38970
+ this.state = 1096;
38821
38971
  if (!this.precpred(this._ctx, 15)) {
38822
38972
  throw this.createFailedPredicateException("this.precpred(this._ctx, 15)");
38823
38973
  }
38824
- this.state = 1093;
38974
+ this.state = 1097;
38825
38975
  this.compareOp();
38826
- this.state = 1094;
38976
+ this.state = 1098;
38827
38977
  this.fieldExpr(16);
38828
38978
  }
38829
38979
  break;
@@ -38831,13 +38981,13 @@ ${struct.dialect.sqlFinalStage("__stage0", [
38831
38981
  {
38832
38982
  _localctx = new ExprLogicalAndContext(new FieldExprContext(_parentctx, _parentState));
38833
38983
  this.pushNewRecursionContext(_localctx, _startState, _MalloyParser.RULE_fieldExpr);
38834
- this.state = 1096;
38984
+ this.state = 1100;
38835
38985
  if (!this.precpred(this._ctx, 12)) {
38836
38986
  throw this.createFailedPredicateException("this.precpred(this._ctx, 12)");
38837
38987
  }
38838
- this.state = 1097;
38988
+ this.state = 1101;
38839
38989
  this.match(_MalloyParser.AND);
38840
- this.state = 1098;
38990
+ this.state = 1102;
38841
38991
  this.fieldExpr(13);
38842
38992
  }
38843
38993
  break;
@@ -38845,13 +38995,13 @@ ${struct.dialect.sqlFinalStage("__stage0", [
38845
38995
  {
38846
38996
  _localctx = new ExprLogicalOrContext(new FieldExprContext(_parentctx, _parentState));
38847
38997
  this.pushNewRecursionContext(_localctx, _startState, _MalloyParser.RULE_fieldExpr);
38848
- this.state = 1099;
38998
+ this.state = 1103;
38849
38999
  if (!this.precpred(this._ctx, 11)) {
38850
39000
  throw this.createFailedPredicateException("this.precpred(this._ctx, 11)");
38851
39001
  }
38852
- this.state = 1100;
39002
+ this.state = 1104;
38853
39003
  this.match(_MalloyParser.OR);
38854
- this.state = 1101;
39004
+ this.state = 1105;
38855
39005
  this.fieldExpr(12);
38856
39006
  }
38857
39007
  break;
@@ -38859,13 +39009,13 @@ ${struct.dialect.sqlFinalStage("__stage0", [
38859
39009
  {
38860
39010
  _localctx = new ExprCoalesceContext(new FieldExprContext(_parentctx, _parentState));
38861
39011
  this.pushNewRecursionContext(_localctx, _startState, _MalloyParser.RULE_fieldExpr);
38862
- this.state = 1102;
39012
+ this.state = 1106;
38863
39013
  if (!this.precpred(this._ctx, 10)) {
38864
39014
  throw this.createFailedPredicateException("this.precpred(this._ctx, 10)");
38865
39015
  }
38866
- this.state = 1103;
39016
+ this.state = 1107;
38867
39017
  this.match(_MalloyParser.DOUBLE_QMARK);
38868
- this.state = 1104;
39018
+ this.state = 1108;
38869
39019
  this.fieldExpr(11);
38870
39020
  }
38871
39021
  break;
@@ -38873,11 +39023,11 @@ ${struct.dialect.sqlFinalStage("__stage0", [
38873
39023
  {
38874
39024
  _localctx = new ExprFieldPropsContext(new FieldExprContext(_parentctx, _parentState));
38875
39025
  this.pushNewRecursionContext(_localctx, _startState, _MalloyParser.RULE_fieldExpr);
38876
- this.state = 1105;
39026
+ this.state = 1109;
38877
39027
  if (!this.precpred(this._ctx, 28)) {
38878
39028
  throw this.createFailedPredicateException("this.precpred(this._ctx, 28)");
38879
39029
  }
38880
- this.state = 1106;
39030
+ this.state = 1110;
38881
39031
  this.fieldProperties();
38882
39032
  }
38883
39033
  break;
@@ -38885,11 +39035,11 @@ ${struct.dialect.sqlFinalStage("__stage0", [
38885
39035
  {
38886
39036
  _localctx = new ExprDurationContext(new FieldExprContext(_parentctx, _parentState));
38887
39037
  this.pushNewRecursionContext(_localctx, _startState, _MalloyParser.RULE_fieldExpr);
38888
- this.state = 1107;
39038
+ this.state = 1111;
38889
39039
  if (!this.precpred(this._ctx, 26)) {
38890
39040
  throw this.createFailedPredicateException("this.precpred(this._ctx, 26)");
38891
39041
  }
38892
- this.state = 1108;
39042
+ this.state = 1112;
38893
39043
  this.timeframe();
38894
39044
  }
38895
39045
  break;
@@ -38897,13 +39047,13 @@ ${struct.dialect.sqlFinalStage("__stage0", [
38897
39047
  {
38898
39048
  _localctx = new ExprTimeTruncContext(new FieldExprContext(_parentctx, _parentState));
38899
39049
  this.pushNewRecursionContext(_localctx, _startState, _MalloyParser.RULE_fieldExpr);
38900
- this.state = 1109;
39050
+ this.state = 1113;
38901
39051
  if (!this.precpred(this._ctx, 25)) {
38902
39052
  throw this.createFailedPredicateException("this.precpred(this._ctx, 25)");
38903
39053
  }
38904
- this.state = 1110;
39054
+ this.state = 1114;
38905
39055
  this.match(_MalloyParser.DOT);
38906
- this.state = 1111;
39056
+ this.state = 1115;
38907
39057
  this.timeframe();
38908
39058
  }
38909
39059
  break;
@@ -38911,13 +39061,13 @@ ${struct.dialect.sqlFinalStage("__stage0", [
38911
39061
  {
38912
39062
  _localctx = new ExprCastContext(new FieldExprContext(_parentctx, _parentState));
38913
39063
  this.pushNewRecursionContext(_localctx, _startState, _MalloyParser.RULE_fieldExpr);
38914
- this.state = 1112;
39064
+ this.state = 1116;
38915
39065
  if (!this.precpred(this._ctx, 24)) {
38916
39066
  throw this.createFailedPredicateException("this.precpred(this._ctx, 24)");
38917
39067
  }
38918
- this.state = 1113;
39068
+ this.state = 1117;
38919
39069
  this.match(_MalloyParser.DOUBLECOLON);
38920
- this.state = 1114;
39070
+ this.state = 1118;
38921
39071
  this.malloyOrSQLType();
38922
39072
  }
38923
39073
  break;
@@ -38925,13 +39075,13 @@ ${struct.dialect.sqlFinalStage("__stage0", [
38925
39075
  {
38926
39076
  _localctx = new ExprSafeCastContext(new FieldExprContext(_parentctx, _parentState));
38927
39077
  this.pushNewRecursionContext(_localctx, _startState, _MalloyParser.RULE_fieldExpr);
38928
- this.state = 1115;
39078
+ this.state = 1119;
38929
39079
  if (!this.precpred(this._ctx, 23)) {
38930
39080
  throw this.createFailedPredicateException("this.precpred(this._ctx, 23)");
38931
39081
  }
38932
- this.state = 1116;
39082
+ this.state = 1120;
38933
39083
  this.match(_MalloyParser.TRIPLECOLON);
38934
- this.state = 1117;
39084
+ this.state = 1121;
38935
39085
  this.malloyOrSQLType();
38936
39086
  }
38937
39087
  break;
@@ -38940,15 +39090,15 @@ ${struct.dialect.sqlFinalStage("__stage0", [
38940
39090
  _localctx = new ExprForRangeContext(new FieldExprContext(_parentctx, _parentState));
38941
39091
  _localctx._startAt = _prevctx;
38942
39092
  this.pushNewRecursionContext(_localctx, _startState, _MalloyParser.RULE_fieldExpr);
38943
- this.state = 1118;
39093
+ this.state = 1122;
38944
39094
  if (!this.precpred(this._ctx, 18)) {
38945
39095
  throw this.createFailedPredicateException("this.precpred(this._ctx, 18)");
38946
39096
  }
38947
- this.state = 1119;
39097
+ this.state = 1123;
38948
39098
  this.match(_MalloyParser.FOR);
38949
- this.state = 1120;
39099
+ this.state = 1124;
38950
39100
  _localctx._duration = this.fieldExpr(0);
38951
- this.state = 1121;
39101
+ this.state = 1125;
38952
39102
  this.timeframe();
38953
39103
  }
38954
39104
  break;
@@ -38956,13 +39106,13 @@ ${struct.dialect.sqlFinalStage("__stage0", [
38956
39106
  {
38957
39107
  _localctx = new ExprAndTreeContext(new FieldExprContext(_parentctx, _parentState));
38958
39108
  this.pushNewRecursionContext(_localctx, _startState, _MalloyParser.RULE_fieldExpr);
38959
- this.state = 1123;
39109
+ this.state = 1127;
38960
39110
  if (!this.precpred(this._ctx, 17)) {
38961
39111
  throw this.createFailedPredicateException("this.precpred(this._ctx, 17)");
38962
39112
  }
38963
- this.state = 1124;
39113
+ this.state = 1128;
38964
39114
  this.match(_MalloyParser.AMPER);
38965
- this.state = 1125;
39115
+ this.state = 1129;
38966
39116
  this.partialAllowedFieldExpr();
38967
39117
  }
38968
39118
  break;
@@ -38970,13 +39120,13 @@ ${struct.dialect.sqlFinalStage("__stage0", [
38970
39120
  {
38971
39121
  _localctx = new ExprOrTreeContext(new FieldExprContext(_parentctx, _parentState));
38972
39122
  this.pushNewRecursionContext(_localctx, _startState, _MalloyParser.RULE_fieldExpr);
38973
- this.state = 1126;
39123
+ this.state = 1130;
38974
39124
  if (!this.precpred(this._ctx, 16)) {
38975
39125
  throw this.createFailedPredicateException("this.precpred(this._ctx, 16)");
38976
39126
  }
38977
- this.state = 1127;
39127
+ this.state = 1131;
38978
39128
  this.match(_MalloyParser.BAR);
38979
- this.state = 1128;
39129
+ this.state = 1132;
38980
39130
  this.partialAllowedFieldExpr();
38981
39131
  }
38982
39132
  break;
@@ -38984,22 +39134,22 @@ ${struct.dialect.sqlFinalStage("__stage0", [
38984
39134
  {
38985
39135
  _localctx = new ExprApplyContext(new FieldExprContext(_parentctx, _parentState));
38986
39136
  this.pushNewRecursionContext(_localctx, _startState, _MalloyParser.RULE_fieldExpr);
38987
- this.state = 1129;
39137
+ this.state = 1133;
38988
39138
  if (!this.precpred(this._ctx, 14)) {
38989
39139
  throw this.createFailedPredicateException("this.precpred(this._ctx, 14)");
38990
39140
  }
38991
- this.state = 1130;
39141
+ this.state = 1134;
38992
39142
  this.match(_MalloyParser.QMARK);
38993
- this.state = 1131;
39143
+ this.state = 1135;
38994
39144
  this.partialAllowedFieldExpr();
38995
39145
  }
38996
39146
  break;
38997
39147
  }
38998
39148
  }
38999
39149
  }
39000
- this.state = 1136;
39150
+ this.state = 1140;
39001
39151
  this._errHandler.sync(this);
39002
- _alt = this.interpreter.adaptivePredict(this._input, 110, this._ctx);
39152
+ _alt = this.interpreter.adaptivePredict(this._input, 111, this._ctx);
39003
39153
  }
39004
39154
  }
39005
39155
  } catch (re2) {
@@ -39021,42 +39171,42 @@ ${struct.dialect.sqlFinalStage("__stage0", [
39021
39171
  this.enterRule(_localctx, 224, _MalloyParser.RULE_partialAllowedFieldExpr);
39022
39172
  let _la;
39023
39173
  try {
39024
- this.state = 1148;
39174
+ this.state = 1152;
39025
39175
  this._errHandler.sync(this);
39026
- switch (this.interpreter.adaptivePredict(this._input, 113, this._ctx)) {
39176
+ switch (this.interpreter.adaptivePredict(this._input, 114, this._ctx)) {
39027
39177
  case 1:
39028
39178
  this.enterOuterAlt(_localctx, 1);
39029
39179
  {
39030
- this.state = 1137;
39180
+ this.state = 1141;
39031
39181
  this.match(_MalloyParser.OPAREN);
39032
- this.state = 1139;
39182
+ this.state = 1143;
39033
39183
  this._errHandler.sync(this);
39034
39184
  _la = this._input.LA(1);
39035
39185
  if ((_la - 118 & ~31) === 0 && (1 << _la - 118 & (1 << _MalloyParser.LT - 118 | 1 << _MalloyParser.GT - 118 | 1 << _MalloyParser.EQ - 118 | 1 << _MalloyParser.NE - 118 | 1 << _MalloyParser.LTE - 118 | 1 << _MalloyParser.GTE - 118 | 1 << _MalloyParser.NOT_MATCH - 118 | 1 << _MalloyParser.MATCH - 118)) !== 0) {
39036
39186
  {
39037
- this.state = 1138;
39187
+ this.state = 1142;
39038
39188
  this.compareOp();
39039
39189
  }
39040
39190
  }
39041
- this.state = 1141;
39191
+ this.state = 1145;
39042
39192
  this.fieldExpr(0);
39043
- this.state = 1142;
39193
+ this.state = 1146;
39044
39194
  this.match(_MalloyParser.CPAREN);
39045
39195
  }
39046
39196
  break;
39047
39197
  case 2:
39048
39198
  this.enterOuterAlt(_localctx, 2);
39049
39199
  {
39050
- this.state = 1145;
39200
+ this.state = 1149;
39051
39201
  this._errHandler.sync(this);
39052
39202
  _la = this._input.LA(1);
39053
39203
  if ((_la - 118 & ~31) === 0 && (1 << _la - 118 & (1 << _MalloyParser.LT - 118 | 1 << _MalloyParser.GT - 118 | 1 << _MalloyParser.EQ - 118 | 1 << _MalloyParser.NE - 118 | 1 << _MalloyParser.LTE - 118 | 1 << _MalloyParser.GTE - 118 | 1 << _MalloyParser.NOT_MATCH - 118 | 1 << _MalloyParser.MATCH - 118)) !== 0) {
39054
39204
  {
39055
- this.state = 1144;
39205
+ this.state = 1148;
39056
39206
  this.compareOp();
39057
39207
  }
39058
39208
  }
39059
- this.state = 1147;
39209
+ this.state = 1151;
39060
39210
  this.fieldExpr(0);
39061
39211
  }
39062
39212
  break;
@@ -39082,7 +39232,7 @@ ${struct.dialect.sqlFinalStage("__stage0", [
39082
39232
  let _alt;
39083
39233
  this.enterOuterAlt(_localctx, 1);
39084
39234
  {
39085
- this.state = 1151;
39235
+ this.state = 1155;
39086
39236
  this._errHandler.sync(this);
39087
39237
  _alt = 1;
39088
39238
  do {
@@ -39090,7 +39240,7 @@ ${struct.dialect.sqlFinalStage("__stage0", [
39090
39240
  case 1:
39091
39241
  {
39092
39242
  {
39093
- this.state = 1150;
39243
+ this.state = 1154;
39094
39244
  this.pick();
39095
39245
  }
39096
39246
  }
@@ -39098,18 +39248,18 @@ ${struct.dialect.sqlFinalStage("__stage0", [
39098
39248
  default:
39099
39249
  throw new NoViableAltException_1.NoViableAltException(this);
39100
39250
  }
39101
- this.state = 1153;
39251
+ this.state = 1157;
39102
39252
  this._errHandler.sync(this);
39103
- _alt = this.interpreter.adaptivePredict(this._input, 114, this._ctx);
39253
+ _alt = this.interpreter.adaptivePredict(this._input, 115, this._ctx);
39104
39254
  } while (_alt !== 2 && _alt !== ATN_1.ATN.INVALID_ALT_NUMBER);
39105
- this.state = 1157;
39255
+ this.state = 1161;
39106
39256
  this._errHandler.sync(this);
39107
- switch (this.interpreter.adaptivePredict(this._input, 115, this._ctx)) {
39257
+ switch (this.interpreter.adaptivePredict(this._input, 116, this._ctx)) {
39108
39258
  case 1:
39109
39259
  {
39110
- this.state = 1155;
39260
+ this.state = 1159;
39111
39261
  this.match(_MalloyParser.ELSE);
39112
- this.state = 1156;
39262
+ this.state = 1160;
39113
39263
  _localctx._pickElse = this.fieldExpr(0);
39114
39264
  }
39115
39265
  break;
@@ -39136,20 +39286,20 @@ ${struct.dialect.sqlFinalStage("__stage0", [
39136
39286
  try {
39137
39287
  this.enterOuterAlt(_localctx, 1);
39138
39288
  {
39139
- this.state = 1159;
39289
+ this.state = 1163;
39140
39290
  this.match(_MalloyParser.PICK);
39141
- this.state = 1161;
39291
+ this.state = 1165;
39142
39292
  this._errHandler.sync(this);
39143
39293
  _la = this._input.LA(1);
39144
39294
  if ((_la - 34 & ~31) === 0 && (1 << _la - 34 & (1 << _MalloyParser.ALL - 34 | 1 << _MalloyParser.AVG - 34 | 1 << _MalloyParser.CAST - 34 | 1 << _MalloyParser.COUNT - 34 | 1 << _MalloyParser.DAY - 34 | 1 << _MalloyParser.EXCLUDE - 34 | 1 << _MalloyParser.FALSE - 34 | 1 << _MalloyParser.HOUR - 34)) !== 0 || (_la - 66 & ~31) === 0 && (1 << _la - 66 & (1 << _MalloyParser.MAX - 66 | 1 << _MalloyParser.MIN - 66 | 1 << _MalloyParser.MINUTE - 66 | 1 << _MalloyParser.MONTH - 66 | 1 << _MalloyParser.NOT - 66 | 1 << _MalloyParser.NOW - 66 | 1 << _MalloyParser.NULL - 66 | 1 << _MalloyParser.PICK - 66 | 1 << _MalloyParser.QUARTER - 66 | 1 << _MalloyParser.SECOND - 66 | 1 << _MalloyParser.SOURCE_KW - 66 | 1 << _MalloyParser.SUM - 66 | 1 << _MalloyParser.TRUE - 66 | 1 << _MalloyParser.WEEK - 66 | 1 << _MalloyParser.YEAR - 66 | 1 << _MalloyParser.HACKY_REGEX - 66)) !== 0 || (_la - 98 & ~31) === 0 && (1 << _la - 98 & (1 << _MalloyParser.SQ_STRING - 98 | 1 << _MalloyParser.DQ_STRING - 98 | 1 << _MalloyParser.BQ_STRING - 98 | 1 << _MalloyParser.OPAREN - 98 | 1 << _MalloyParser.MINUS - 98)) !== 0 || (_la - 136 & ~31) === 0 && (1 << _la - 136 & (1 << _MalloyParser.LITERAL_TIMESTAMP - 136 | 1 << _MalloyParser.LITERAL_HOUR - 136 | 1 << _MalloyParser.LITERAL_DAY - 136 | 1 << _MalloyParser.LITERAL_QUARTER - 136 | 1 << _MalloyParser.LITERAL_MONTH - 136 | 1 << _MalloyParser.LITERAL_WEEK - 136 | 1 << _MalloyParser.LITERAL_YEAR - 136 | 1 << _MalloyParser.IDENTIFIER - 136 | 1 << _MalloyParser.NUMERIC_LITERAL - 136 | 1 << _MalloyParser.INTEGER_LITERAL - 136 | 1 << _MalloyParser.SQL_BEGIN - 136)) !== 0) {
39145
39295
  {
39146
- this.state = 1160;
39296
+ this.state = 1164;
39147
39297
  _localctx._pickValue = this.fieldExpr(0);
39148
39298
  }
39149
39299
  }
39150
- this.state = 1163;
39300
+ this.state = 1167;
39151
39301
  this.match(_MalloyParser.WHEN);
39152
- this.state = 1164;
39302
+ this.state = 1168;
39153
39303
  _localctx._pickWhen = this.partialAllowedFieldExpr();
39154
39304
  }
39155
39305
  } catch (re2) {
@@ -39174,32 +39324,32 @@ ${struct.dialect.sqlFinalStage("__stage0", [
39174
39324
  let _alt;
39175
39325
  this.enterOuterAlt(_localctx, 1);
39176
39326
  {
39177
- this.state = 1166;
39327
+ this.state = 1170;
39178
39328
  this.fieldExpr(0);
39179
- this.state = 1171;
39329
+ this.state = 1175;
39180
39330
  this._errHandler.sync(this);
39181
- _alt = this.interpreter.adaptivePredict(this._input, 117, this._ctx);
39331
+ _alt = this.interpreter.adaptivePredict(this._input, 118, this._ctx);
39182
39332
  while (_alt !== 2 && _alt !== ATN_1.ATN.INVALID_ALT_NUMBER) {
39183
39333
  if (_alt === 1) {
39184
39334
  {
39185
39335
  {
39186
- this.state = 1167;
39336
+ this.state = 1171;
39187
39337
  this.match(_MalloyParser.COMMA);
39188
- this.state = 1168;
39338
+ this.state = 1172;
39189
39339
  this.fieldExpr(0);
39190
39340
  }
39191
39341
  }
39192
39342
  }
39193
- this.state = 1173;
39343
+ this.state = 1177;
39194
39344
  this._errHandler.sync(this);
39195
- _alt = this.interpreter.adaptivePredict(this._input, 117, this._ctx);
39345
+ _alt = this.interpreter.adaptivePredict(this._input, 118, this._ctx);
39196
39346
  }
39197
- this.state = 1175;
39347
+ this.state = 1179;
39198
39348
  this._errHandler.sync(this);
39199
39349
  _la = this._input.LA(1);
39200
39350
  if (_la === _MalloyParser.COMMA) {
39201
39351
  {
39202
- this.state = 1174;
39352
+ this.state = 1178;
39203
39353
  this.match(_MalloyParser.COMMA);
39204
39354
  }
39205
39355
  }
@@ -39226,32 +39376,32 @@ ${struct.dialect.sqlFinalStage("__stage0", [
39226
39376
  let _alt;
39227
39377
  this.enterOuterAlt(_localctx, 1);
39228
39378
  {
39229
- this.state = 1177;
39379
+ this.state = 1181;
39230
39380
  this.fieldName();
39231
- this.state = 1184;
39381
+ this.state = 1188;
39232
39382
  this._errHandler.sync(this);
39233
- _alt = this.interpreter.adaptivePredict(this._input, 120, this._ctx);
39383
+ _alt = this.interpreter.adaptivePredict(this._input, 121, this._ctx);
39234
39384
  while (_alt !== 2 && _alt !== ATN_1.ATN.INVALID_ALT_NUMBER) {
39235
39385
  if (_alt === 1) {
39236
39386
  {
39237
39387
  {
39238
- this.state = 1179;
39388
+ this.state = 1183;
39239
39389
  this._errHandler.sync(this);
39240
39390
  _la = this._input.LA(1);
39241
39391
  if (_la === _MalloyParser.COMMA) {
39242
39392
  {
39243
- this.state = 1178;
39393
+ this.state = 1182;
39244
39394
  this.match(_MalloyParser.COMMA);
39245
39395
  }
39246
39396
  }
39247
- this.state = 1181;
39397
+ this.state = 1185;
39248
39398
  this.fieldName();
39249
39399
  }
39250
39400
  }
39251
39401
  }
39252
- this.state = 1186;
39402
+ this.state = 1190;
39253
39403
  this._errHandler.sync(this);
39254
- _alt = this.interpreter.adaptivePredict(this._input, 120, this._ctx);
39404
+ _alt = this.interpreter.adaptivePredict(this._input, 121, this._ctx);
39255
39405
  }
39256
39406
  }
39257
39407
  } catch (re2) {
@@ -39276,39 +39426,39 @@ ${struct.dialect.sqlFinalStage("__stage0", [
39276
39426
  let _alt;
39277
39427
  this.enterOuterAlt(_localctx, 1);
39278
39428
  {
39279
- this.state = 1187;
39429
+ this.state = 1191;
39280
39430
  this.collectionMember();
39281
- this.state = 1194;
39431
+ this.state = 1198;
39282
39432
  this._errHandler.sync(this);
39283
- _alt = this.interpreter.adaptivePredict(this._input, 122, this._ctx);
39433
+ _alt = this.interpreter.adaptivePredict(this._input, 123, this._ctx);
39284
39434
  while (_alt !== 2 && _alt !== ATN_1.ATN.INVALID_ALT_NUMBER) {
39285
39435
  if (_alt === 1) {
39286
39436
  {
39287
39437
  {
39288
- this.state = 1189;
39438
+ this.state = 1193;
39289
39439
  this._errHandler.sync(this);
39290
39440
  _la = this._input.LA(1);
39291
39441
  if (_la === _MalloyParser.COMMA) {
39292
39442
  {
39293
- this.state = 1188;
39443
+ this.state = 1192;
39294
39444
  this.match(_MalloyParser.COMMA);
39295
39445
  }
39296
39446
  }
39297
- this.state = 1191;
39447
+ this.state = 1195;
39298
39448
  this.collectionMember();
39299
39449
  }
39300
39450
  }
39301
39451
  }
39302
- this.state = 1196;
39452
+ this.state = 1200;
39303
39453
  this._errHandler.sync(this);
39304
- _alt = this.interpreter.adaptivePredict(this._input, 122, this._ctx);
39454
+ _alt = this.interpreter.adaptivePredict(this._input, 123, this._ctx);
39305
39455
  }
39306
- this.state = 1198;
39456
+ this.state = 1202;
39307
39457
  this._errHandler.sync(this);
39308
39458
  _la = this._input.LA(1);
39309
39459
  if (_la === _MalloyParser.COMMA) {
39310
39460
  {
39311
- this.state = 1197;
39461
+ this.state = 1201;
39312
39462
  this.match(_MalloyParser.COMMA);
39313
39463
  }
39314
39464
  }
@@ -39334,25 +39484,25 @@ ${struct.dialect.sqlFinalStage("__stage0", [
39334
39484
  try {
39335
39485
  this.enterOuterAlt(_localctx, 1);
39336
39486
  {
39337
- this.state = 1203;
39487
+ this.state = 1207;
39338
39488
  this._errHandler.sync(this);
39339
39489
  _la = this._input.LA(1);
39340
39490
  if (_la === _MalloyParser.BQ_STRING || _la === _MalloyParser.IDENTIFIER) {
39341
39491
  {
39342
- this.state = 1200;
39492
+ this.state = 1204;
39343
39493
  this.fieldPath();
39344
- this.state = 1201;
39494
+ this.state = 1205;
39345
39495
  this.match(_MalloyParser.DOT);
39346
39496
  }
39347
39497
  }
39348
- this.state = 1205;
39498
+ this.state = 1209;
39349
39499
  this.match(_MalloyParser.STAR);
39350
- this.state = 1207;
39500
+ this.state = 1211;
39351
39501
  this._errHandler.sync(this);
39352
- switch (this.interpreter.adaptivePredict(this._input, 125, this._ctx)) {
39502
+ switch (this.interpreter.adaptivePredict(this._input, 126, this._ctx)) {
39353
39503
  case 1:
39354
39504
  {
39355
- this.state = 1206;
39505
+ this.state = 1210;
39356
39506
  this.starQualified();
39357
39507
  }
39358
39508
  break;
@@ -39379,29 +39529,29 @@ ${struct.dialect.sqlFinalStage("__stage0", [
39379
39529
  try {
39380
39530
  this.enterOuterAlt(_localctx, 1);
39381
39531
  {
39382
- this.state = 1209;
39383
- this.match(_MalloyParser.OCURLY);
39384
39532
  this.state = 1213;
39533
+ this.match(_MalloyParser.OCURLY);
39534
+ this.state = 1217;
39385
39535
  this._errHandler.sync(this);
39386
39536
  _la = this._input.LA(1);
39387
39537
  do {
39388
39538
  {
39389
- this.state = 1213;
39539
+ this.state = 1217;
39390
39540
  this._errHandler.sync(this);
39391
39541
  switch (this._input.LA(1)) {
39392
39542
  case _MalloyParser.EXCEPT:
39393
39543
  {
39394
39544
  {
39395
- this.state = 1210;
39545
+ this.state = 1214;
39396
39546
  this.match(_MalloyParser.EXCEPT);
39397
- this.state = 1211;
39547
+ this.state = 1215;
39398
39548
  this.fieldNameList();
39399
39549
  }
39400
39550
  }
39401
39551
  break;
39402
39552
  case _MalloyParser.COMMA:
39403
39553
  {
39404
- this.state = 1212;
39554
+ this.state = 1216;
39405
39555
  this.match(_MalloyParser.COMMA);
39406
39556
  }
39407
39557
  break;
@@ -39409,11 +39559,11 @@ ${struct.dialect.sqlFinalStage("__stage0", [
39409
39559
  throw new NoViableAltException_1.NoViableAltException(this);
39410
39560
  }
39411
39561
  }
39412
- this.state = 1215;
39562
+ this.state = 1219;
39413
39563
  this._errHandler.sync(this);
39414
39564
  _la = this._input.LA(1);
39415
39565
  } while (_la === _MalloyParser.EXCEPT || _la === _MalloyParser.COMMA);
39416
- this.state = 1217;
39566
+ this.state = 1221;
39417
39567
  this.match(_MalloyParser.CCURLY);
39418
39568
  }
39419
39569
  } catch (re2) {
@@ -39437,16 +39587,16 @@ ${struct.dialect.sqlFinalStage("__stage0", [
39437
39587
  try {
39438
39588
  this.enterOuterAlt(_localctx, 1);
39439
39589
  {
39440
- this.state = 1219;
39590
+ this.state = 1223;
39441
39591
  this.tags();
39442
- this.state = 1220;
39592
+ this.state = 1224;
39443
39593
  this.fieldPath();
39444
- this.state = 1222;
39594
+ this.state = 1226;
39445
39595
  this._errHandler.sync(this);
39446
39596
  _la = this._input.LA(1);
39447
39597
  if (_la === _MalloyParser.DOT) {
39448
39598
  {
39449
- this.state = 1221;
39599
+ this.state = 1225;
39450
39600
  this.refExpr();
39451
39601
  }
39452
39602
  }
@@ -39469,28 +39619,28 @@ ${struct.dialect.sqlFinalStage("__stage0", [
39469
39619
  let _localctx = new RefExprContext(this._ctx, this.state);
39470
39620
  this.enterRule(_localctx, 242, _MalloyParser.RULE_refExpr);
39471
39621
  try {
39472
- this.state = 1231;
39622
+ this.state = 1235;
39473
39623
  this._errHandler.sync(this);
39474
- switch (this.interpreter.adaptivePredict(this._input, 129, this._ctx)) {
39624
+ switch (this.interpreter.adaptivePredict(this._input, 130, this._ctx)) {
39475
39625
  case 1:
39476
39626
  this.enterOuterAlt(_localctx, 1);
39477
39627
  {
39478
- this.state = 1224;
39628
+ this.state = 1228;
39479
39629
  this.match(_MalloyParser.DOT);
39480
- this.state = 1225;
39630
+ this.state = 1229;
39481
39631
  this.timeframe();
39482
39632
  }
39483
39633
  break;
39484
39634
  case 2:
39485
39635
  this.enterOuterAlt(_localctx, 2);
39486
39636
  {
39487
- this.state = 1226;
39637
+ this.state = 1230;
39488
39638
  this.match(_MalloyParser.DOT);
39489
- this.state = 1227;
39639
+ this.state = 1231;
39490
39640
  this.aggregate();
39491
- this.state = 1228;
39641
+ this.state = 1232;
39492
39642
  this.match(_MalloyParser.OPAREN);
39493
- this.state = 1229;
39643
+ this.state = 1233;
39494
39644
  this.match(_MalloyParser.CPAREN);
39495
39645
  }
39496
39646
  break;
@@ -39513,27 +39663,27 @@ ${struct.dialect.sqlFinalStage("__stage0", [
39513
39663
  let _localctx = new CollectionMemberContext(this._ctx, this.state);
39514
39664
  this.enterRule(_localctx, 244, _MalloyParser.RULE_collectionMember);
39515
39665
  try {
39516
- this.state = 1236;
39666
+ this.state = 1240;
39517
39667
  this._errHandler.sync(this);
39518
- switch (this.interpreter.adaptivePredict(this._input, 130, this._ctx)) {
39668
+ switch (this.interpreter.adaptivePredict(this._input, 131, this._ctx)) {
39519
39669
  case 1:
39520
39670
  this.enterOuterAlt(_localctx, 1);
39521
39671
  {
39522
- this.state = 1233;
39672
+ this.state = 1237;
39523
39673
  this.taggedRef();
39524
39674
  }
39525
39675
  break;
39526
39676
  case 2:
39527
39677
  this.enterOuterAlt(_localctx, 2);
39528
39678
  {
39529
- this.state = 1234;
39679
+ this.state = 1238;
39530
39680
  this.collectionWildCard();
39531
39681
  }
39532
39682
  break;
39533
39683
  case 3:
39534
39684
  this.enterOuterAlt(_localctx, 3);
39535
39685
  {
39536
- this.state = 1235;
39686
+ this.state = 1239;
39537
39687
  this.fieldDef();
39538
39688
  }
39539
39689
  break;
@@ -39559,25 +39709,25 @@ ${struct.dialect.sqlFinalStage("__stage0", [
39559
39709
  let _alt;
39560
39710
  this.enterOuterAlt(_localctx, 1);
39561
39711
  {
39562
- this.state = 1238;
39712
+ this.state = 1242;
39563
39713
  this.fieldName();
39564
- this.state = 1243;
39714
+ this.state = 1247;
39565
39715
  this._errHandler.sync(this);
39566
- _alt = this.interpreter.adaptivePredict(this._input, 131, this._ctx);
39716
+ _alt = this.interpreter.adaptivePredict(this._input, 132, this._ctx);
39567
39717
  while (_alt !== 2 && _alt !== ATN_1.ATN.INVALID_ALT_NUMBER) {
39568
39718
  if (_alt === 1) {
39569
39719
  {
39570
39720
  {
39571
- this.state = 1239;
39721
+ this.state = 1243;
39572
39722
  this.match(_MalloyParser.DOT);
39573
- this.state = 1240;
39723
+ this.state = 1244;
39574
39724
  this.fieldName();
39575
39725
  }
39576
39726
  }
39577
39727
  }
39578
- this.state = 1245;
39728
+ this.state = 1249;
39579
39729
  this._errHandler.sync(this);
39580
- _alt = this.interpreter.adaptivePredict(this._input, 131, this._ctx);
39730
+ _alt = this.interpreter.adaptivePredict(this._input, 132, this._ctx);
39581
39731
  }
39582
39732
  }
39583
39733
  } catch (re2) {
@@ -39600,7 +39750,7 @@ ${struct.dialect.sqlFinalStage("__stage0", [
39600
39750
  try {
39601
39751
  this.enterOuterAlt(_localctx, 1);
39602
39752
  {
39603
- this.state = 1246;
39753
+ this.state = 1250;
39604
39754
  this.id();
39605
39755
  }
39606
39756
  } catch (re2) {
@@ -39623,7 +39773,7 @@ ${struct.dialect.sqlFinalStage("__stage0", [
39623
39773
  try {
39624
39774
  this.enterOuterAlt(_localctx, 1);
39625
39775
  {
39626
- this.state = 1248;
39776
+ this.state = 1252;
39627
39777
  this.id();
39628
39778
  }
39629
39779
  } catch (re2) {
@@ -39646,9 +39796,9 @@ ${struct.dialect.sqlFinalStage("__stage0", [
39646
39796
  try {
39647
39797
  this.enterOuterAlt(_localctx, 1);
39648
39798
  {
39649
- this.state = 1250;
39799
+ this.state = 1254;
39650
39800
  this.fieldExpr(0);
39651
- this.state = 1251;
39801
+ this.state = 1255;
39652
39802
  this.match(_MalloyParser.EOF);
39653
39803
  }
39654
39804
  } catch (re2) {
@@ -39671,7 +39821,7 @@ ${struct.dialect.sqlFinalStage("__stage0", [
39671
39821
  try {
39672
39822
  this.enterOuterAlt(_localctx, 1);
39673
39823
  {
39674
- this.state = 1253;
39824
+ this.state = 1257;
39675
39825
  this.id();
39676
39826
  }
39677
39827
  } catch (re2) {
@@ -39694,7 +39844,7 @@ ${struct.dialect.sqlFinalStage("__stage0", [
39694
39844
  try {
39695
39845
  this.enterOuterAlt(_localctx, 1);
39696
39846
  {
39697
- this.state = 1255;
39847
+ this.state = 1259;
39698
39848
  this.id();
39699
39849
  }
39700
39850
  } catch (re2) {
@@ -39717,7 +39867,7 @@ ${struct.dialect.sqlFinalStage("__stage0", [
39717
39867
  try {
39718
39868
  this.enterOuterAlt(_localctx, 1);
39719
39869
  {
39720
- this.state = 1257;
39870
+ this.state = 1261;
39721
39871
  this.string();
39722
39872
  }
39723
39873
  } catch (re2) {
@@ -39740,15 +39890,15 @@ ${struct.dialect.sqlFinalStage("__stage0", [
39740
39890
  try {
39741
39891
  this.enterOuterAlt(_localctx, 1);
39742
39892
  {
39743
- this.state = 1259;
39893
+ this.state = 1263;
39744
39894
  this.match(_MalloyParser.SEMI);
39745
- this.state = 1260;
39895
+ this.state = 1264;
39746
39896
  this.match(_MalloyParser.SEMI);
39747
- this.state = 1261;
39897
+ this.state = 1265;
39748
39898
  this.match(_MalloyParser.OBRACK);
39749
- this.state = 1262;
39899
+ this.state = 1266;
39750
39900
  this.string();
39751
- this.state = 1263;
39901
+ this.state = 1267;
39752
39902
  this.match(_MalloyParser.CBRACK);
39753
39903
  }
39754
39904
  } catch (re2) {
@@ -40571,9 +40721,9 @@ ${struct.dialect.sqlFinalStage("__stage0", [
40571
40721
  ];
40572
40722
  MalloyParser.VOCABULARY = new VocabularyImpl_1.VocabularyImpl(MalloyParser._LITERAL_NAMES, MalloyParser._SYMBOLIC_NAMES, []);
40573
40723
  MalloyParser._serializedATNSegments = 3;
40574
- MalloyParser._serializedATNSegment0 = "\uC91D\uCABA\u058D\uAFBA\u4F53\u0607\uEA8B\uC241\x9D\u04F4     \x07 \x07\b \b \n \n\v \v\f \f\r \r             \x1B \x1B     ! !\" \"# #$ $% %& &' '( () )* *+ +, ,- -. ./ /0 01 12 23 34 45 56 67 78 89 9: :; ;< <= => >? ?@ @A AB BC CD DE EF FG GH HI IJ JK KL LM MN NO OP PQ QR RS ST TU UV VW WX XY YZ Z[ [\\ \\] ]^ ^_ _` `a ab bc cd de ef fg gh hi ij jk kl lm mn no op pq qr rs st tu uv vw wx xy yz z{ {| |} }~ ~\x7F \x7F\x80 \x80\x81 \x81\x82 \x82\x83 \x83\x84 \x84\x07\u010B\n\f\u010E\v\u011A\n\u0125\n\x07\x07\x07\u012B\n\x07\f\x07\x07\u012E\v\x07\b\b\b\b    \n\n\n\n\n\v\v\v\u013F\n\v\r\v\v\u0140\v\v\f\f\f\f\f\u0149\n\f\r\r\x07\r\u014D\n\r\f\r\r\u0150\v\r\r\r\u015A\n\x07\u0162\n\f\u0165\v\u016D\n\u0172\n\r\u0173\u0177\n\r\u0178\u017C\n\r\u017D\u0184\n\x07\u0187\n\f\u018A\v\u018D\n\u019E\n\x1B\x1B\x1B\x1B\x1B\x1B\x1B\x1B\x1B\x1B\x1B\x1B\x1B\u01AE\n\x1B\x07\u01B6\n\f\u01B9\v\u01BC\n   \u01C7\n  \x07 \u01CA\n \f  \u01CD\v   \u01D0\n !!!!!\"\"##$$%%%\x07%\u01E0\n%\f%%\u01E3\v%%%%\u01E7\n%&&&&&&&&&&&&&&&&&&\u01FA\n&\r&&\u01FB&&\u01FF\n&''''(((()))\u020B\n))\x07)\u020E\n)\f))\u0211\v)))\u0214\n)****+++\u021C\n++\x07+\u021F\n+\f++\u0222\v+++\u0225\n+,,,,,--..///0000000000000\u023F\n01112222\u0247\n2333333333\u0251\n3333333333\x073\u025C\n3\f33\u025F\v344444444\u0268\n4444\x074\u026D\n4\f44\u0270\v4555555\u0277\n56666\u027C\n6777\x077\u0281\n7\f77\u0284\v777888\u028A\n88\x078\u028D\n8\f88\u0290\v888\u0293\n899999::;\x07;\u029D\n;\f;;\u02A0\v;;;;\u02A4\n;;;\u02A7\n;;;;;\x07;\u02AD\n;\f;;\u02B0\v;;;;\u02B4\n;;;\u02B7\n;;;;\u02BB\n;;\u02BD\n;<<===\u02C3\n=>>>\x07>\u02C8\n>\f>>\u02CB\v>>>???\x07?\u02D2\n?\f??\u02D5\v???\u02D8\n?@@@\u02DC\n@AAABBCCCCC\u02E7\nCDDD\x07D\u02EC\nD\fDD\u02EF\vDDD\u02F2\nDEEEFFFGGG\u02FC\nGG\x07G\u02FF\nG\fGG\u0302\vGGG\u0305\nGHHI\x07I\u030A\nI\fII\u030D\vIIIIIJJJJJJJJJJJJJJJJJJJ\u0325\nJKKLLLLMMM\u032F\nMM\x07M\u0332\nM\fMM\u0335\vMMM\u0338\nMNNN\u033C\nNOOOOPPP\u0344\nPP\x07P\u0347\nP\fPP\u034A\vPPP\u034D\nPQQQQQ\u0353\nQQQQQQQ\u035A\nQRRRRSSSSTTTTUUUU\x07U\u036C\nU\fUU\u036F\vUUU\u0372\nUVVVWWW\u0379\nWW\x07W\u037C\nW\fWW\u037F\vWWW\u0382\nWXXX\u0386\nXXX\u0389\nXYYYZZZZZ\u0392\nZ[[[[\u0397\n[\\\\\\\\\u039C\n\\\\\\\u039F\n\\]]]\u03A3\n]]\x07]\u03A6\n]\f]]\u03A9\v]^^^^^\u03AF\n^___```aabbccddeefff\u03C3\nfgghhiiiiiiii\u03D0\nijjjjjjjj\u03D9\njkkllmmnnooppp\u03E7\npqqqqqqqqqqqqqqqqqqqqqqq\u03FF\nqqqqqq\u0405\nqqqqqqqqq\u040E\nqqqqqqqqqqqqq\u041B\nqqqqqqq\u0422\nqq\u0424\nqqq\u0427\nqqqq\u042B\nqqqqqqqqq\x07q\u0435\nq\fqq\u0438\vqqqq\u043C\nqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq\x07q\u046F\nq\fqq\u0472\vqrrr\u0476\nrrrrrr\u047C\nrrr\u047F\nrss\u0482\ns\rss\u0483sss\u0488\nsttt\u048C\nttttuuu\x07u\u0494\nu\fuu\u0497\vuuu\u049A\nuvvv\u049E\nvv\x07v\u04A1\nv\fvv\u04A4\vvwww\u04A8\nww\x07w\u04AB\nw\fww\u04AE\vwww\u04B1\nwxxxx\u04B6\nxxxx\u04BA\nxyyyyy\u04C0\ny\ryy\u04C1yyzzzz\u04C9\nz{{{{{{{{\u04D2\n{||||\u04D7\n|}}}\x07}\u04DC\n}\f}}\u04DF\v}~~\x7F\x7F\x80\x80\x80\x81\x81\x82\x82\x83\x83\x84\x84\x84\x84\x84\x84\x84df\xE0\x85\b\n\f \"$&(*,.02468:<>@BDFHJLNPRTVXZ\\^`bdfhjlnprtvxz|~\x80\x82\x84\x86\x88\x8A\x8C\x8E\x90\x92\x94\x96\x98\x9A\x9C\x9E\xA0\xA2\xA4\xA6\xA8\xAA\xAC\xAE\xB0\xB2\xB4\xB6\xB8\xBA\xBC\xBE\xC0\xC2\xC4\xC6\xC8\xCA\xCC\xCE\xD0\xD2\xD4\xD6\xD8\xDA\xDC\xDE\xE0\xE2\xE4\xE6\xE8\xEA\xEC\xEE\xF0\xF2\xF4\xF6\xF8\xFA\xFC\xFE\u0100\u0102\u0104\u0106qq\x99\x99\n\n\"\"88??CCPP''1177[[\x92\x92\x94\x94((..DETT\x07))//KKRRYYx}\x85\x86de\x93\x9477[[ff\x91\x91 00==FGOOQQ]]``$$55\x80\x80\x82\x82\x87\x87~\x7F\u0542\u010C\u0119\u011B\b\u0124\n\u0126\f\u012C\u012F\u0133\u0137\u013C\u0148\u014A\u0153\u0157\u015D \u0169\"\u016E$\u0171&\u0176(\u017B*\u017F,\u018E.\u01930\u01952\u01974\u01AD6\u01AF8\u01BB:\u01BD<\u01C2>\u01C4@\u01D1B\u01D6D\u01D8F\u01DAH\u01E6J\u01FEL\u0200N\u0204P\u0208R\u0215T\u0219V\u0226X\u022BZ\u022D\\\u022F^\u023E`\u0240b\u0246d\u0250f\u0267h\u0276j\u027Bl\u027Dn\u0287p\u0294r\u0299t\u02BCv\u02BEx\u02C2z\u02C4|\u02CE~\u02D9\x80\u02DD\x82\u02E0\x84\u02E6\x86\u02E8\x88\u02F3\x8A\u02F6\x8C\u02F9\x8E\u0306\x90\u030B\x92\u0324\x94\u0326\x96\u0328\x98\u032C\x9A\u033B\x9C\u033D\x9E\u0341\xA0\u0359\xA2\u035B\xA4\u035F\xA6\u0363\xA8\u0367\xAA\u0373\xAC\u0376\xAE\u0385\xB0\u038A\xB2\u0391\xB4\u0393\xB6\u039E\xB8\u03A0\xBA\u03AA\xBC\u03B0\xBE\u03B3\xC0\u03B6\xC2\u03B8\xC4\u03BA\xC6\u03BC\xC8\u03BE\xCA\u03C2\xCC\u03C4\xCE\u03C6\xD0\u03CF\xD2\u03D8\xD4\u03DA\xD6\u03DC\xD8\u03DE\xDA\u03E0\xDC\u03E2\xDE\u03E6\xE0\u043B\xE2\u047E\xE4\u0481\xE6\u0489\xE8\u0490\xEA\u049B\xEC\u04A5\xEE\u04B5\xF0\u04BB\xF2\u04C5\xF4\u04D1\xF6\u04D6\xF8\u04D8\xFA\u04E0\xFC\u04E2\xFE\u04E4\u0100\u04E7\u0102\u04E9\u0104\u04EB\u0106\u04ED\u0108\u010B\u0109\u010B\x07\x84\u010A\u0108\u010A\u0109\u010B\u010E\u010C\u010A\u010C\u010D\u010D\u010F\u010E\u010C\u010F\u0110\x07\u0110\u0111\u011A\u0112\u011A\n\u0113\u011A\b\u0114\u011A\u0115\u011A \u0116\u011A$\u0117\u011A&\u0118\u011A\u0106\x84\u0119\u0111\u0119\u0112\u0119\u0113\u0119\u0114\u0119\u0115\u0119\u0116\u0119\u0117\u0119\u0118\u011A\u011B\u011C\f\x07\u011C\u011D\x07\u011D\u011E> \u011E\x07\u011F\u0125*\u0120\u0121\f\x07\u0121\u0122\x07\u0122\u0123\n\u0123\u0125\u0124\u011F\u0124\u0120\u0125 \u0126\u0127\f\x07\u0127\u0128d3\u0128\v\u0129\u012B\x07h\u012A\u0129\u012B\u012E\u012C\u012A\u012C\u012D\u012D\r\u012E\u012C\u012F\u0130\f\x07\u0130\u0131\x07@\u0131\u0132\f\x07\u0132\u0133\u0134\f\x07\u0134\u0135\x07\x1B\u0135\u0136\n\u0136\u0137\u0138\x07\u0138\u0139\u0102\x82\u0139\u013A\b\u013A\u013B\v\u013B\u013C\u013E\x07p\u013D\u013F\f\u013E\u013D\u013F\u0140\u0140\u013E\u0140\u0141\u0141\u0142\u0142\u0143\x07q\u0143\u0144\u0145\x07\x07\u0145\u0149\u0104\x83\u0146\u0147\x07\u0147\u0149\r\u0148\u0144\u0148\u0146\u0149\u014A\u014E\x07\x98\u014B\u014D\u014C\u014B\u014D\u0150\u014E\u014C\u014E\u014F\u014F\u0151\u0150\u014E\u0151\u0152\x07\x9D\u0152\u0153\u0154\x07\x9C\u0154\u0155d3\u0155\u0156 \u0156\x1B\u0157\u0159\x07>\u0158\u015A\u0159\u0158\u0159\u015A\u015A\u015B\u015B\u015C\"\u015C\u015D\u015E\x07p\u015E\u0163 \u015F\u0160\x07v\u0160\u0162 \u0161\u015F\u0162\u0165\u0163\u0161\u0163\u0164\u0164\u0166\u0165\u0163\u0166\u0167\x07q\u0167\u0168\x07:\u0168\u0169\u016C\xD8m\u016A\u016B\x07@\u016B\u016D\xD8m\u016C\u016A\u016C\u016D\u016D!\u016E\u016F\xCAf\u016F#\u0170\u0172\x07g\u0171\u0170\u0172\u0173\u0173\u0171\u0173\u0174\u0174%\u0175\u0177\x07h\u0176\u0175\u0177\u0178\u0178\u0176\u0178\u0179\u0179'\u017A\u017C\x07g\u017B\u017A\u017C\u017D\u017D\u017B\u017D\u017E\u017E)\u017F\u0180\f\x07\u0180\u0181\x07\u0181\u0188,\u0182\u0184\x07v\u0183\u0182\u0183\u0184\u0184\u0185\u0185\u0187,\u0186\u0183\u0187\u018A\u0188\u0186\u0188\u0189\u0189\u018C\u018A\u0188\u018B\u018D\x07v\u018C\u018B\u018C\u018D\u018D+\u018E\u018F\f\x07\u018F\u0190<\u0190\u0191\b\u0191\u0192d3\u0192-\u0193\u0194\x07~\u0194/\u0195\u0196\xD8m\u01961\u0197\u01986\u0198\u0199\x07w\u0199\u019A\x07U\u019A\u019D\x07l\u019B\u019E\r\u019C\u019E\xCCg\u019D\u019B\u019D\u019C\u019E\u019F\u019F\u01A0\x07m\u01A03\u01A1\u01A2\x07V\u01A2\u01A3\x07l\u01A3\u01A4\xD6l\u01A4\u01A5\x07m\u01A5\u01AE\u01A6\u01A76\u01A7\u01A8\x07w";
40575
- MalloyParser._serializedATNSegment1 = "\u01A8\u01A9\x07V\u01A9\u01AA\x07l\u01AA\u01AB\xD4k\u01AB\u01AC\x07m\u01AC\u01AE\u01AD\u01A1\u01AD\u01A6\u01AE5\u01AF\u01B0\xD8m\u01B07\u01B1\u01BC:\u01B2\u01B7\x07p\u01B3\u01B6\x92J\u01B4\u01B6\x07\x84\u01B5\u01B3\u01B5\u01B4\u01B6\u01B9\u01B7\u01B5\u01B7\u01B8\u01B8\u01BA\u01B9\u01B7\u01BA\u01BC\x07q\u01BB\u01B1\u01BB\u01B2\u01BC9\u01BD\u01BE\x07p\u01BE\u01BF\x07\x89\u01BF\u01C0\xE0q\u01C0\u01C1\x07q\u01C1;\u01C2\u01C3\xD8m\u01C3=\u01C4\u01CB@!\u01C5\u01C7\x07v\u01C6\u01C5\u01C6\u01C7\u01C7\u01C8\u01C8\u01CA@!\u01C9\u01C6\u01CA\u01CD\u01CB\u01C9\u01CB\u01CC\u01CC\u01CF\u01CD\u01CB\u01CE\u01D0\x07v\u01CF\u01CE\u01CF\u01D0\u01D0?\u01D1\u01D2\f\x07\u01D2\u01D3D#\u01D3\u01D4\b\u01D4\u01D5B\"\u01D5A\u01D6\u01D7d3\u01D7C\u01D8\u01D9\xD8m\u01D9E\u01DA\u01DB\xD8m\u01DBG\u01DC\u01E1\x07p\u01DD\u01E0J&\u01DE\u01E0\x07\x84\u01DF\u01DD\u01DF\u01DE\u01E0\u01E3\u01E1\u01DF\u01E1\u01E2\u01E2\u01E4\u01E3\u01E1\u01E4\u01E7\x07q\u01E5\u01E7:\u01E6\u01DC\u01E6\u01E5\u01E7I\u01E8\u01FFN(\u01E9\u01FFL'\u01EA\u01FF\\/\u01EB\u01FF^0\u01EC\u01FF\x88E\u01ED\u01EE\x07\u01EE\u01FF\xFC\x7F\u01EF\u01F0\x07\u01F0\u01FFP)\u01F1\u01F2 \u01F2\u01FF\xEAv\u01F3\u01F4\f\x07\u01F4\u01F5 \u01F5\u01F6\x8CG\u01F6\u01FF\u01F7\u01FF\xBE`\u01F8\u01FA\x07h\u01F9\u01F8\u01FA\u01FB\u01FB\u01F9\u01FB\u01FC\u01FC\u01FF\u01FD\u01FF(\u01FE\u01E8\u01FE\u01E9\u01FE\u01EA\u01FE\u01EB\u01FE\u01EC\u01FE\u01ED\u01FE\u01EF\u01FE\u01F1\u01FE\u01F3\u01FE\u01F7\u01FE\u01F9\u01FE\u01FD\u01FFK\u0200\u0201\f\x07\u0201\u0202\x07\u0202\u0203T+\u0203M\u0204\u0205\f\x07\u0205\u0206\x07 \u0206\u0207T+\u0207O\u0208\u020FR*\u0209\u020B\x07v\u020A\u0209\u020A\u020B\u020B\u020C\u020C\u020ER*\u020D\u020A\u020E\u0211\u020F\u020D\u020F\u0210\u0210\u0213\u0211\u020F\u0212\u0214\x07v\u0213\u0212\u0213\u0214\u0214Q\u0215\u0216\xFC\x7F\u0216\u0217\b\u0217\u0218\xFC\x7F\u0218S\u0219\u0220V,\u021A\u021C\x07v\u021B\u021A\u021B\u021C\u021C\u021D\u021D\u021FV,\u021E\u021B\u021F\u0222\u0220\u021E\u0220\u0221\u0221\u0224\u0222\u0220\u0223\u0225\x07v\u0224\u0223\u0224\u0225\u0225U\u0226\u0227\f\x07\u0227\u0228X-\u0228\u0229\b\u0229\u022A\xE0q\u022AW\u022B\u022C\xD8m\u022CY\u022D\u022E\xD8m\u022E[\u022F\u0230\x07\b\u0230\u0231T+\u0231]\u0232\u0233\f\x07\u0233\u0234\x07\u0234\u0235n8\u0235\u023F\u0236\u0237\f\x07\u0237\u0238\x07\u0238\u0239n8\u0239\u023F\u023A\u023B\f\x07\u023B\u023C\x07\u023C\u023Dn8\u023D\u023F\u023E\u0232\u023E\u0236\u023E\u023A\u023F_\u0240\u0241\x07\v\u0241\u0242l7\u0242a\u0243\u0247^0\u0244\u0247\x88E\u0245\u0247\\/\u0246\u0243\u0246\u0244\u0246\u0245\u0247c\u0248\u0249\b3\u0249\u0251\xD8m\u024A\u024B\x07l\u024B\u024Cd3\u024C\u024D\x07m\u024D\u0251\u024E\u02514\x1B\u024F\u02512\u0250\u0248\u0250\u024A\u0250\u024E\u0250\u024F\u0251\u025D\u0252\u0253\f\x07\u0253\u0254\x07~\u0254\u025Cf4\u0255\u0256\f\u0256\u0257\x07j\u0257\u025Cf4\u0258\u0259\f\u0259\u025A\x076\u025A\u025CH%\u025B\u0252\u025B\u0255\u025B\u0258\u025C\u025F\u025D\u025B\u025D\u025E\u025Ee\u025F\u025D\u0260\u0261\b4\u0261\u0268\xF8}\u0262\u02688\u0263\u0264\x07l\u0264\u0265h5\u0265\u0266\x07m\u0266\u0268\u0267\u0260\u0267\u0262\u0267\u0263\u0268\u026E\u0269\u026A\f\u026A\u026B\x07~\u026B\u026Df4\u026C\u0269\u026D\u0270\u026E\u026C\u026E\u026F\u026Fg\u0270\u026E\u0271\u0277f4\u0272\u0273f4\u0273\u0274\x07j\u0274\u0275h5\u0275\u0277\u0276\u0271\u0276\u0272\u0277i\u0278\u027CN(\u0279\u027CL'\u027A\u027C^0\u027B\u0278\u027B\u0279\u027B\u027A\u027Ck\u027D\u0282\x07p\u027E\u0281j6\u027F\u0281\x07\x84\u0280\u027E\u0280\u027F\u0281\u0284\u0282\u0280\u0282\u0283\u0283\u0285\u0284\u0282\u0285\u0286\x07q\u0286m\u0287\u028Et;\u0288\u028A\x07v\u0289\u0288\u0289\u028A\u028A\u028B\u028B\u028Dt;\u028C\u0289\u028D\u0290\u028E\u028C\u028E\u028F\u028F\u0292\u0290\u028E\u0291\u0293\x07v\u0292\u0291\u0292\u0293\u0293o\u0294\u0295\f\x07\u0295\u0296\x07@\u0296\u0297\f\x07\u0297\u0298d3\u0298q\u0299\u029A \u029As\u029B\u029D\x07h\u029C\u029B\u029D\u02A0\u029E\u029C\u029E\u029F\u029F\u02A1\u02A0\u029E\u02A1\u02A3Z.\u02A2\u02A4p9\u02A3\u02A2\u02A3\u02A4\u02A4\u02A6\u02A5\u02A7r:\u02A6\u02A5\u02A6\u02A7\u02A7\u02A8\u02A8\u02A9\x07_\u02A9\u02AA\xE0q\u02AA\u02BD\u02AB\u02AD\x07h\u02AC\u02AB\u02AD\u02B0\u02AE\u02AC\u02AE\u02AF\u02AF\u02B1\u02B0\u02AE\u02B1\u02B3Z.\u02B2\u02B4p9\u02B3\u02B2\u02B3\u02B4\u02B4\u02BA\u02B5\u02B7r:\u02B6\u02B5\u02B6\u02B7\u02B7\u02B8\u02B8\u02B9\x07L\u02B9\u02BBv<\u02BA\u02B6\u02BA\u02BB\u02BB\u02BD\u02BC\u029E\u02BC\u02AE\u02BDu\u02BE\u02BF\xE0q\u02BFw\u02C0\u02C3\x88E\u02C1\u02C3\x8AF\u02C2\u02C0\u02C2\u02C1\u02C3y\u02C4\u02C9\x07p\u02C5\u02C8\x84C\u02C6\u02C8\x07\x84\u02C7\u02C5\u02C7\u02C6\u02C8\u02CB\u02C9\u02C7\u02C9\u02CA\u02CA\u02CC\u02CB\u02C9\u02CC\u02CD\x07q\u02CD{\u02CE\u02D3~@\u02CF\u02D0\x07v\u02D0\u02D2~@\u02D1\u02CF\u02D2\u02D5\u02D3\u02D1\u02D3\u02D4\u02D4\u02D7\u02D5\u02D3\u02D6\u02D8\x07v\u02D7\u02D6\u02D7\u02D8\u02D8}\u02D9\u02DB\xE0q\u02DA\u02DC \u02DB\u02DA\u02DB\u02DC\u02DC\x7F\u02DD\u02DE\x07\u02DE\u02DF|?\u02DF\x81\u02E0\u02E1\xB0Y\u02E1\x83\u02E2\u02E7\x88E\u02E3\u02E7\xA8U\u02E4\u02E7\x80A\u02E5\u02E7\x82B\u02E6\u02E2\u02E6\u02E3\u02E6\u02E4\u02E6\u02E5\u02E7\x85\u02E8\u02ED\xE0q\u02E9\u02EA\x07v\u02EA\u02EC\xE0q\u02EB\u02E9\u02EC\u02EF\u02ED\u02EB\u02ED\u02EE\u02EE\u02F1\u02EF\u02ED\u02F0\u02F2\x07v\u02F1\u02F0\u02F1\u02F2\u02F2\x87\u02F3\u02F4\x07!\u02F4\u02F5\x86D\u02F5\x89\u02F6\u02F7\x07\r\u02F7\u02F8\x86D\u02F8\x8B\u02F9\u0300\x90I\u02FA\u02FC\x07v\u02FB\u02FA\u02FB\u02FC\u02FC\u02FD\u02FD\u02FF\x90I\u02FE\u02FB\u02FF\u0302\u0300\u02FE\u0300\u0301\u0301\u0304\u0302\u0300\u0303\u0305\x07v\u0304\u0303\u0304\u0305\u0305\x8D\u0306\u0307\xD8m\u0307\x8F\u0308\u030A\x07h\u0309\u0308\u030A\u030D\u030B\u0309\u030B\u030C\u030C\u030E\u030D\u030B\u030E\u030F\x8EH\u030F\u0310\b\u0310\u0311h5\u0311\x91\u0312\u0325\x96L\u0313\u0325\\/\u0314\u0325\x94K\u0315\u0325`1\u0316\u0325\xA6T\u0317\u0325\xBA^\u0318\u0325\xA2R\u0319\u0325\xA4S\u031A\u0325\xB4[\u031B\u0325\xB0Y\u031C\u0325\xAAV\u031D\u0325\x88E\u031E\u0325\x8AF\u031F\u0325\x9CO\u0320\u0325\xBC_\u0321\u0325\xBE`\u0322\u0325\xC0a\u0323\u0325(\u0324\u0312\u0324\u0313\u0324\u0314\u0324\u0315\u0324\u0316\u0324\u0317\u0324\u0318\u0324\u0319\u0324\u031A\u0324\u031B\u0324\u031C\u0324\u031D\u0324\u031E\u0324\u031F\u0324\u0320\u0324\u0321\u0324\u0322\u0324\u0323\u0325\x93\u0326\u0327^0\u0327\x95\u0328\u0329\f\x07\u0329\u032A\x07\f\u032A\u032B\x98M\u032B\x97\u032C\u0333\x9AN\u032D\u032F\x07v\u032E\u032D\u032E\u032F\u032F\u0330\u0330\u0332\x9AN\u0331\u032E\u0332\u0335\u0333\u0331\u0333\u0334\u0334\u0337\u0335\u0333\u0336\u0338\x07v\u0337\u0336\u0337\u0338\u0338\x99\u0339\u033C\xF2z\u033A\u033CV,\u033B\u0339\u033B\u033A\u033C\x9B\u033D\u033E\f\x07\u033E\u033F\x07\u033F\u0340\x9EP\u0340\x9D\u0341\u0348\xA0Q\u0342\u0344\x07v\u0343\u0342\u0343\u0344\u0344\u0345\u0345\u0347\xA0Q\u0346\u0343\u0347\u034A\u0348\u0346\u0348\u0349\u0349\u034C\u034A\u0348\u034B\u034D\x07v\u034C\u034B\u034C\u034D\u034D\x9F\u034E\u034F\f\x07\u034F\u0352\xF8}\u0350\u0351\x07~\u0351\u0353h5\u0352\u0350\u0352\u0353\u0353\u035A\u0354\u0355\f\x07\u0355\u0356<\u0356\u0357\b\u0357\u0358h5\u0358\u035A\u0359\u034E\u0359\u0354\u035A\xA1\u035B\u035C\f\x07\u035C\u035D\x07\u035D\u035E\x98M\u035E\xA3\u035F\u0360\f\x07\u0360\u0361\x07\u0361\u0362\x98M\u0362\xA5\u0363\u0364\f\x07\u0364\u0365 \x07\u0365\u0366\xECw\u0366\xA7\u0367\u0368\x07\u0368\u036D\xD8m\u0369\u036A\x07v\u036A\u036C\xD8m\u036B\u0369\u036C\u036F\u036D\u036B\u036D\u036E\u036E\u0371\u036F\u036D\u0370\u0372\x07v\u0371\u0370\u0371\u0372\u0372\xA9\u0373\u0374\x07\u0374\u0375\xACW\u0375\xAB\u0376\u037D\xAEX\u0377\u0379\x07v\u0378\u0377\u0378\u0379\u0379\u037A\u037A\u037C\xAEX\u037B\u0378\u037C\u037F\u037D\u037B\u037D\u037E\u037E\u0381\u037F\u037D\u0380\u0382\x07v\u0381\u0380\u0381\u0382\u0382\xAD\u0383\u0386\x07\x94\u0384\u0386\xFC\x7F\u0385\u0383\u0385\u0384\u0386\u0388\u0387\u0389 \u0388\u0387\u0388\u0389\u0389\xAF\u038A\u038B\x07\u038B\u038C\x07\x94\u038C\xB1\u038D\u038E\x07*\u038E\u0392\xFC\x7F\u038F\u0390\x07*\u0390\u0392\xE0q\u0391\u038D\u0391\u038F\u0392\xB3\u0393\u0394\x07 \u0394\u0396\x07\x94\u0395\u0397\xB2Z\u0396\u0395\u0396\u0397\u0397\xB5\u0398\u039B\xF8}\u0399\u039A\x07w\u039A\u039C\x07\x80\u039B\u0399\u039B\u039C\u039C\u039F\u039D\u039F\x07\x80\u039E\u0398\u039E\u039D\u039F\xB7\u03A0\u03A7\xB6\\\u03A1\u03A3\x07v\u03A2\u03A1\u03A2\u03A3\u03A3\u03A4\u03A4\u03A6\xB6\\\u03A5\u03A2\u03A6\u03A9\u03A7\u03A5\u03A7\u03A8\u03A8\xB9\u03A9\u03A7\u03AA\u03AB\x07\u03AB\u03AE\xB8]\u03AC\u03AD\x07*\u03AD\u03AF\xFC\x7F\u03AE\u03AC\u03AE\u03AF\u03AF\xBB\u03B0\u03B1\x07\u03B1\u03B2\xC2b\u03B2\xBD\u03B3\u03B4\x07#\u03B4\u03B5\xCAf\u03B5\xBF\u03B6\u03B7\x07h\u03B7\xC1\u03B8\u03B9 \b\u03B9\xC3\u03BA\u03BB \u03BB\xC5\u03BC\u03BD \n\u03BD\xC7\u03BE\u03BF \v\u03BF\xC9\u03C0\u03C3\xCCg\u03C1\u03C3\r\u03C2\u03C0\u03C2\u03C1\u03C3\xCB\u03C4\u03C5 \f\u03C5\xCD\u03C6\u03C7 \r\u03C7\xCF\u03C8\u03D0\xCAf\u03C9\u03D0\xCEh\u03CA\u03D0\xD2j\u03CB\u03D0\x07J\u03CC\u03D0 \u03CD\u03D0\x07c\u03CE\u03D0\x07I\u03CF\u03C8\u03CF\u03C9\u03CF\u03CA\u03CF\u03CB\u03CF\u03CC\u03CF\u03CD\u03CF\u03CE\u03D0\xD1\u03D1\u03D9\x07\x8A\u03D2\u03D9\x07\x8B\u03D3\u03D9\x07\x8C\u03D4\u03D9\x07\x8F\u03D5\u03D9\x07\x8E\u03D6\u03D9\x07\x8D\u03D7\u03D9\x07\x90\u03D8\u03D1\u03D8\u03D2\u03D8\u03D3\u03D8\u03D4\u03D8\u03D5\u03D8\u03D6\u03D8\u03D7\u03D9\xD3\u03DA\u03DB\xCAf\u03DB\xD5\u03DC\u03DD\xCAf\u03DD\xD7\u03DE\u03DF \u03DF\xD9\u03E0\u03E1 \u03E1\xDB\u03E2\u03E3 \u03E3\xDD\u03E4\u03E7\xC6d\u03E5\u03E7\xCAf\u03E6\u03E4\u03E6\u03E5\u03E7\xDF\u03E8\u03E9\bq\u03E9\u043C\xF8}\u03EA\u043C\xD0i\u03EB\u03EC\x07\x7F\u03EC\u043C\xE0q\u03ED\u03EE\x07H\u03EE\u043C\xE0q\u03EF\u03F0\x07,\u03F0\u03F1\x07l\u03F1\u03F2\xE0q\u03F2\u03F3\x07&\u03F3\u03F4\xDEp\u03F4\u03F5\x07m\u03F5\u043C\u03F6\u03F7\x07.\u03F7\u03F8\x07l\u03F8\u03F9\x072\u03F9\u03FA\xE0q\u03FA\u03FB\x07m\u03FB\u043C\u03FC\u03FD\x07S\u03FD\u03FF\x07w\u03FE\u03FC\u03FE\u03FF\u03FF\u0400\u0400\u0401\xC4c\u0401\u0404\x07l\u0402\u0405\xE0q\u0403\u0405\x07\x80\u0404\u0402\u0404\u0403\u0404\u0405\u0405\u0406\u0406\u0407\x07m\u0407\u043C\u0408\u0409\xF8}\u0409\u040A\x07w\u040A\u040B\xC4c\u040B\u040D\x07l\u040C\u040E\xE0q\u040D\u040C\u040D\u040E\u040E\u040F\u040F\u0410\x07m\u0410\u043C\u0411\u0412\x07l\u0412\u0413\xE2r\u0413\u0414\x07m\u0414\u043C\u0415\u0416\xF8}\u0416\u0417\x07w\u0417\u0418\xD8m\u0418\u041A\x07l\u0419\u041B\xE8u\u041A\u0419\u041A\u041B\u041B\u041C\u041C\u041D\x07m\u041D\u043C\u041E\u0423\xD8m\u041F\u0421\x07t\u0420\u0422\xC6d\u0421\u0420\u0421\u0422\u0422\u0424\u0423\u041F\u0423\u0424\u0424\u0427\u0425\u0427\xDAn\u0426\u041E\u0426\u0425\u0427\u0428\u0428\u042A\x07l\u0429\u042B\xE8u\u042A\u0429\u042A\u042B\u042B\u042C\u042C\u042D\x07m\u042D\u043C\u042E\u043C\xE4s\u042F\u0430\xDCo\u0430\u0431\x07l\u0431\u0436\xE0q\u0432\u0433\x07v\u0433\u0435\xFC\x7F\u0434\u0432\u0435\u0438\u0436\u0434\u0436\u0437\u0437\u0439\u0438\u0436\u0439\u043A\x07m\u043A\u043C\u043B\u03E8\u043B\u03EA\u043B\u03EB\u043B\u03ED\u043B\u03EF\u043B\u03F6\u043B\u03FE\u043B\u0408\u043B\u0411\u043B\u0415\u043B\u0426\u043B\u042E\u043B\u042F\u043C\u0470\u043D\u043E\f\u043E\u043F \u043F\u046F\xE0q\u0440\u0441\f\u0441\u0442 \u0442\u046F\xE0q\u0443\u0444\f\u0444\u0445\x07Z\u0445\u046F\xE0q\u0446\u0447\f\u0447\u0448\xC8e\u0448\u0449\xE0q\u0449\u046F\u044A\u044B\f\u044B\u044C\x07%\u044C\u046F\xE0q\u044D\u044E\f\r\u044E\u044F\x07M\u044F\u046F\xE0q\u0450\u0451\f\f\u0451\u0452\x07\x88\u0452\u046F\xE0q\r\u0453\u0454\f\u0454\u046Fz>";
40576
- MalloyParser._serializedATNSegment2 = "\u0455\u0456\f\u0456\u046F\xDAn\u0457\u0458\f\x1B\u0458\u0459\x07w\u0459\u046F\xDAn\u045A\u045B\f\u045B\u045C\x07r\u045C\u046F\xDEp\u045D\u045E\f\u045E\u045F\x07s\u045F\u046F\xDEp\u0460\u0461\f\u0461\u0462\x079\u0462\u0463\xE0q\u0463\u0464\xDAn\u0464\u046F\u0465\u0466\f\u0466\u0467\x07i\u0467\u046F\xE2r\u0468\u0469\f\u0469\u046A\x07\x83\u046A\u046F\xE2r\u046B\u046C\f\u046C\u046D\x07\x89\u046D\u046F\xE2r\u046E\u043D\u046E\u0440\u046E\u0443\u046E\u0446\u046E\u044A\u046E\u044D\u046E\u0450\u046E\u0453\u046E\u0455\u046E\u0457\u046E\u045A\u046E\u045D\u046E\u0460\u046E\u0465\u046E\u0468\u046E\u046B\u046F\u0472\u0470\u046E\u0470\u0471\u0471\xE1\u0472\u0470\u0473\u0475\x07l\u0474\u0476\xC8e\u0475\u0474\u0475\u0476\u0476\u0477\u0477\u0478\xE0q\u0478\u0479\x07m\u0479\u047F\u047A\u047C\xC8e\u047B\u047A\u047B\u047C\u047C\u047D\u047D\u047F\xE0q\u047E\u0473\u047E\u047B\u047F\xE3\u0480\u0482\xE6t\u0481\u0480\u0482\u0483\u0483\u0481\u0483\u0484\u0484\u0487\u0485\u0486\x073\u0486\u0488\xE0q\u0487\u0485\u0487\u0488\u0488\xE5\u0489\u048B\x07N\u048A\u048C\xE0q\u048B\u048A\u048B\u048C\u048C\u048D\u048D\u048E\x07^\u048E\u048F\xE2r\u048F\xE7\u0490\u0495\xE0q\u0491\u0492\x07v\u0492\u0494\xE0q\u0493\u0491\u0494\u0497\u0495\u0493\u0495\u0496\u0496\u0499\u0497\u0495\u0498\u049A\x07v\u0499\u0498\u0499\u049A\u049A\xE9\u049B\u04A2\xFC\x7F\u049C\u049E\x07v\u049D\u049C\u049D\u049E\u049E\u049F\u049F\u04A1\xFC\x7F\u04A0\u049D\u04A1\u04A4\u04A2\u04A0\u04A2\u04A3\u04A3\xEB\u04A4\u04A2\u04A5\u04AC\xF6|\u04A6\u04A8\x07v\u04A7\u04A6\u04A7\u04A8\u04A8\u04A9\u04A9\u04AB\xF6|\u04AA\u04A7\u04AB\u04AE\u04AC\u04AA\u04AC\u04AD\u04AD\u04B0\u04AE\u04AC\u04AF\u04B1\x07v\u04B0\u04AF\u04B0\u04B1\u04B1\xED\u04B2\u04B3\xF8}\u04B3\u04B4\x07w\u04B4\u04B6\u04B5\u04B2\u04B5\u04B6\u04B6\u04B7\u04B7\u04B9\x07\x80\u04B8\u04BA\xF0y\u04B9\u04B8\u04B9\u04BA\u04BA\xEF\u04BB\u04BF\x07p\u04BC\u04BD\x07\n\u04BD\u04C0\xEAv\u04BE\u04C0\x07v\u04BF\u04BC\u04BF\u04BE\u04C0\u04C1\u04C1\u04BF\u04C1\u04C2\u04C2\u04C3\u04C3\u04C4\x07q\u04C4\xF1\u04C5\u04C6\f\x07\u04C6\u04C8\xF8}\u04C7\u04C9\xF4{\u04C8\u04C7\u04C8\u04C9\u04C9\xF3\u04CA\u04CB\x07w\u04CB\u04D2\xDAn\u04CC\u04CD\x07w\u04CD\u04CE\xC4c\u04CE\u04CF\x07l\u04CF\u04D0\x07m\u04D0\u04D2\u04D1\u04CA\u04D1\u04CC\u04D2\xF5\u04D3\u04D7\xF2z\u04D4\u04D7\xEEx\u04D5\u04D7V,\u04D6\u04D3\u04D6\u04D4\u04D6\u04D5\u04D7\xF7\u04D8\u04DD\xFC\x7F\u04D9\u04DA\x07w\u04DA\u04DC\xFC\x7F\u04DB\u04D9\u04DC\u04DF\u04DD\u04DB\u04DD\u04DE\u04DE\xF9\u04DF\u04DD\u04E0\u04E1\xD8m\u04E1\xFB\u04E2\u04E3\xD8m\u04E3\xFD\u04E4\u04E5\xE0q\u04E5\u04E6\x07\u04E6\xFF\u04E7\u04E8\xD8m\u04E8\u0101\u04E9\u04EA\xD8m\u04EA\u0103\u04EB\u04EC\xCAf\u04EC\u0105\u04ED\u04EE\x07\x84\u04EE\u04EF\x07\x84\u04EF\u04F0\x07n\u04F0\u04F1\xCAf\u04F1\u04F2\x07o\u04F2\u0107\x86\u010A\u010C\u0119\u0124\u012C\u0140\u0148\u014E\u0159\u0163\u016C\u0173\u0178\u017D\u0183\u0188\u018C\u019D\u01AD\u01B5\u01B7\u01BB\u01C6\u01CB\u01CF\u01DF\u01E1\u01E6\u01FB\u01FE\u020A\u020F\u0213\u021B\u0220\u0224\u023E\u0246\u0250\u025B\u025D\u0267\u026E\u0276\u027B\u0280\u0282\u0289\u028E\u0292\u029E\u02A3\u02A6\u02AE\u02B3\u02B6\u02BA\u02BC\u02C2\u02C7\u02C9\u02D3\u02D7\u02DB\u02E6\u02ED\u02F1\u02FB\u0300\u0304\u030B\u0324\u032E\u0333\u0337\u033B\u0343\u0348\u034C\u0352\u0359\u036D\u0371\u0378\u037D\u0381\u0385\u0388\u0391\u0396\u039B\u039E\u03A2\u03A7\u03AE\u03C2\u03CF\u03D8\u03E6\u03FE\u0404\u040D\u041A\u0421\u0423\u0426\u042A\u0436\u043B\u046E\u0470\u0475\u047B\u047E\u0483\u0487\u048B\u0495\u0499\u049D\u04A2\u04A7\u04AC\u04B0\u04B5\u04B9\u04BF\u04C1\u04C8\u04D1\u04D6\u04DD";
40724
+ MalloyParser._serializedATNSegment0 = "\uC91D\uCABA\u058D\uAFBA\u4F53\u0607\uEA8B\uC241\x9D\u04F8     \x07 \x07\b \b \n \n\v \v\f \f\r \r             \x1B \x1B     ! !\" \"# #$ $% %& &' '( () )* *+ +, ,- -. ./ /0 01 12 23 34 45 56 67 78 89 9: :; ;< <= => >? ?@ @A AB BC CD DE EF FG GH HI IJ JK KL LM MN NO OP PQ QR RS ST TU UV VW WX XY YZ Z[ [\\ \\] ]^ ^_ _` `a ab bc cd de ef fg gh hi ij jk kl lm mn no op pq qr rs st tu uv vw wx xy yz z{ {| |} }~ ~\x7F \x7F\x80 \x80\x81 \x81\x82 \x82\x83 \x83\x84 \x84\x07\u010B\n\f\u010E\v\u011A\n\u0125\n\x07\x07\x07\u012B\n\x07\f\x07\x07\u012E\v\x07\b\b\b\b    \n\n\n\n\n\v\v\v\u013F\n\v\r\v\v\u0140\v\v\f\f\f\f\f\u0149\n\f\r\r\x07\r\u014D\n\r\f\r\r\u0150\v\r\r\r\u015A\n\x07\u0162\n\f\u0165\v\u016D\n\u0172\n\r\u0173\u0177\n\r\u0178\u017C\n\r\u017D\u0184\n\x07\u0187\n\f\u018A\v\u018D\n\u019E\n\x1B\x1B\x1B\x1B\x1B\x1B\x1B\x1B\x1B\x1B\x1B\x1B\x1B\u01AE\n\x1B\x07\u01B6\n\f\u01B9\v\u01BC\n   \u01C7\n  \x07 \u01CA\n \f  \u01CD\v   \u01D0\n !!!!!\"\"##$$%%%\x07%\u01E0\n%\f%%\u01E3\v%%%%\u01E7\n%&&&&&&&&&&&&&&&&&&\u01FA\n&\r&&\u01FB&&\u01FF\n&''''(((()))\u020B\n))\x07)\u020E\n)\f))\u0211\v)))\u0214\n)****+++\u021C\n++\x07+\u021F\n+\f++\u0222\v+++\u0225\n+,,,,,--..///0000000000000\u023F\n01112222\u0247\n2333333333\u0251\n3333333333\x073\u025C\n3\f33\u025F\v344444444\u0268\n4444\x074\u026D\n4\f44\u0270\v4555555\u0277\n56666\u027C\n6777\x077\u0281\n7\f77\u0284\v777888\u028A\n88\x078\u028D\n8\f88\u0290\v888\u0293\n899999::;\x07;\u029D\n;\f;;\u02A0\v;;;;\u02A4\n;;;\u02A7\n;;;;;\x07;\u02AD\n;\f;;\u02B0\v;;;;\u02B4\n;;;\u02B7\n;;;;\u02BB\n;;\u02BD\n;<<===\u02C3\n=>>>\x07>\u02C8\n>\f>>\u02CB\v>>>???\x07?\u02D2\n?\f??\u02D5\v???\u02D8\n?@@@\u02DC\n@@@@\u02E0\n@AAABBCCCCC\u02EB\nCDDD\x07D\u02F0\nD\fDD\u02F3\vDDD\u02F6\nDEEEFFFGGG\u0300\nGG\x07G\u0303\nG\fGG\u0306\vGGG\u0309\nGHHI\x07I\u030E\nI\fII\u0311\vIIIIIJJJJJJJJJJJJJJJJJJJ\u0329\nJKKLLLLMMM\u0333\nMM\x07M\u0336\nM\fMM\u0339\vMMM\u033C\nMNNN\u0340\nNOOOOPPP\u0348\nPP\x07P\u034B\nP\fPP\u034E\vPPP\u0351\nPQQQQQ\u0357\nQQQQQQQ\u035E\nQRRRRSSSSTTTTUUUU\x07U\u0370\nU\fUU\u0373\vUUU\u0376\nUVVVWWW\u037D\nWW\x07W\u0380\nW\fWW\u0383\vWWW\u0386\nWXXX\u038A\nXXX\u038D\nXYYYZZZZZ\u0396\nZ[[[[\u039B\n[\\\\\\\\\u03A0\n\\\\\\\u03A3\n\\]]]\u03A7\n]]\x07]\u03AA\n]\f]]\u03AD\v]^^^^^\u03B3\n^___```aabbccddeefff\u03C7\nfgghhiiiiiiii\u03D4\nijjjjjjjj\u03DD\njkkllmmnnooppp\u03EB\npqqqqqqqqqqqqqqqqqqqqqqq\u0403\nqqqqqq\u0409\nqqqqqqqqq\u0412\nqqqqqqqqqqqqq\u041F\nqqqqqqq\u0426\nqq\u0428\nqqq\u042B\nqqqq\u042F\nqqqqqqqqq\x07q\u0439\nq\fqq\u043C\vqqqq\u0440\nqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq\x07q\u0473\nq\fqq\u0476\vqrrr\u047A\nrrrrrr\u0480\nrrr\u0483\nrss\u0486\ns\rss\u0487sss\u048C\nsttt\u0490\nttttuuu\x07u\u0498\nu\fuu\u049B\vuuu\u049E\nuvvv\u04A2\nvv\x07v\u04A5\nv\fvv\u04A8\vvwww\u04AC\nww\x07w\u04AF\nw\fww\u04B2\vwww\u04B5\nwxxxx\u04BA\nxxxx\u04BE\nxyyyyy\u04C4\ny\ryy\u04C5yyzzzz\u04CD\nz{{{{{{{{\u04D6\n{||||\u04DB\n|}}}\x07}\u04E0\n}\f}}\u04E3\v}~~\x7F\x7F\x80\x80\x80\x81\x81\x82\x82\x83\x83\x84\x84\x84\x84\x84\x84\x84df\xE0\x85\b\n\f \"$&(*,.02468:<>@BDFHJLNPRTVXZ\\^`bdfhjlnprtvxz|~\x80\x82\x84\x86\x88\x8A\x8C\x8E\x90\x92\x94\x96\x98\x9A\x9C\x9E\xA0\xA2\xA4\xA6\xA8\xAA\xAC\xAE\xB0\xB2\xB4\xB6\xB8\xBA\xBC\xBE\xC0\xC2\xC4\xC6\xC8\xCA\xCC\xCE\xD0\xD2\xD4\xD6\xD8\xDA\xDC\xDE\xE0\xE2\xE4\xE6\xE8\xEA\xEC\xEE\xF0\xF2\xF4\xF6\xF8\xFA\xFC\xFE\u0100\u0102\u0104\u0106qq\x99\x99\n\n\"\"88??CCPP''1177[[\x92\x92\x94\x94((..DETT\x07))//KKRRYYx}\x85\x86de\x93\x9477[[ff\x91\x91 00==FGOOQQ]]``$$55\x80\x80\x82\x82\x87\x87~\x7F\u0548\u010C\u0119\u011B\b\u0124\n\u0126\f\u012C\u012F\u0133\u0137\u013C\u0148\u014A\u0153\u0157\u015D \u0169\"\u016E$\u0171&\u0176(\u017B*\u017F,\u018E.\u01930\u01952\u01974\u01AD6\u01AF8\u01BB:\u01BD<\u01C2>\u01C4@\u01D1B\u01D6D\u01D8F\u01DAH\u01E6J\u01FEL\u0200N\u0204P\u0208R\u0215T\u0219V\u0226X\u022BZ\u022D\\\u022F^\u023E`\u0240b\u0246d\u0250f\u0267h\u0276j\u027Bl\u027Dn\u0287p\u0294r\u0299t\u02BCv\u02BEx\u02C2z\u02C4|\u02CE~\u02DF\x80\u02E1\x82\u02E4\x84\u02EA\x86\u02EC\x88\u02F7\x8A\u02FA\x8C\u02FD\x8E\u030A\x90\u030F\x92\u0328\x94\u032A\x96\u032C\x98\u0330\x9A\u033F\x9C\u0341\x9E\u0345\xA0\u035D\xA2\u035F\xA4\u0363\xA6\u0367\xA8\u036B\xAA\u0377\xAC\u037A\xAE\u0389\xB0\u038E\xB2\u0395\xB4\u0397\xB6\u03A2\xB8\u03A4\xBA\u03AE\xBC\u03B4\xBE\u03B7\xC0\u03BA\xC2\u03BC\xC4\u03BE\xC6\u03C0\xC8\u03C2\xCA\u03C6\xCC\u03C8\xCE\u03CA\xD0\u03D3\xD2\u03DC\xD4\u03DE\xD6\u03E0\xD8\u03E2\xDA\u03E4\xDC\u03E6\xDE\u03EA\xE0\u043F\xE2\u0482\xE4\u0485\xE6\u048D\xE8\u0494\xEA\u049F\xEC\u04A9\xEE\u04B9\xF0\u04BF\xF2\u04C9\xF4\u04D5\xF6\u04DA\xF8\u04DC\xFA\u04E4\xFC\u04E6\xFE\u04E8\u0100\u04EB\u0102\u04ED\u0104\u04EF\u0106\u04F1\u0108\u010B\u0109\u010B\x07\x84\u010A\u0108\u010A\u0109\u010B\u010E\u010C\u010A\u010C\u010D\u010D\u010F\u010E\u010C\u010F\u0110\x07\u0110\u0111\u011A\u0112\u011A\n\u0113\u011A\b\u0114\u011A\u0115\u011A \u0116\u011A$\u0117\u011A&\u0118\u011A\u0106\x84\u0119\u0111\u0119\u0112\u0119\u0113\u0119\u0114\u0119\u0115\u0119\u0116\u0119\u0117\u0119\u0118\u011A\u011B\u011C\f\x07\u011C\u011D\x07\u011D\u011E> \u011E\x07\u011F\u0125*\u0120\u0121\f\x07\u0121\u0122\x07\u0122\u0123\n\u0123\u0125\u0124\u011F\u0124\u0120\u0125 \u0126\u0127\f\x07\u0127\u0128d3\u0128\v\u0129\u012B\x07h\u012A\u0129\u012B\u012E\u012C\u012A\u012C\u012D\u012D\r\u012E\u012C\u012F\u0130\f\x07\u0130\u0131\x07@\u0131\u0132\f\x07\u0132\u0133\u0134\f\x07\u0134\u0135\x07\x1B\u0135\u0136\n\u0136\u0137\u0138\x07\u0138\u0139\u0102\x82\u0139\u013A\b\u013A\u013B\v\u013B\u013C\u013E\x07p\u013D\u013F\f\u013E\u013D\u013F\u0140\u0140\u013E\u0140\u0141\u0141\u0142\u0142\u0143\x07q\u0143\u0144\u0145\x07\x07\u0145\u0149\u0104\x83\u0146\u0147\x07\u0147\u0149\r\u0148\u0144\u0148\u0146\u0149\u014A\u014E\x07\x98\u014B\u014D\u014C\u014B\u014D\u0150\u014E\u014C\u014E\u014F\u014F\u0151\u0150\u014E\u0151\u0152\x07\x9D\u0152\u0153\u0154\x07\x9C\u0154\u0155d3\u0155\u0156 \u0156\x1B\u0157\u0159\x07>\u0158\u015A\u0159\u0158\u0159\u015A\u015A\u015B\u015B\u015C\"\u015C\u015D\u015E\x07p\u015E\u0163 \u015F\u0160\x07v\u0160\u0162 \u0161\u015F\u0162\u0165\u0163\u0161\u0163\u0164\u0164\u0166\u0165\u0163\u0166\u0167\x07q\u0167\u0168\x07:\u0168\u0169\u016C\xD8m\u016A\u016B\x07@\u016B\u016D\xD8m\u016C\u016A\u016C\u016D\u016D!\u016E\u016F\xCAf\u016F#\u0170\u0172\x07g\u0171\u0170\u0172\u0173\u0173\u0171\u0173\u0174\u0174%\u0175\u0177\x07h\u0176\u0175\u0177\u0178\u0178\u0176\u0178\u0179\u0179'\u017A\u017C\x07g\u017B\u017A\u017C\u017D\u017D\u017B\u017D\u017E\u017E)\u017F\u0180\f\x07\u0180\u0181\x07\u0181\u0188,\u0182\u0184\x07v\u0183\u0182\u0183\u0184\u0184\u0185\u0185\u0187,\u0186\u0183\u0187\u018A\u0188\u0186\u0188\u0189\u0189\u018C\u018A\u0188\u018B\u018D\x07v\u018C\u018B\u018C\u018D\u018D+\u018E\u018F\f\x07\u018F\u0190<\u0190\u0191\b\u0191\u0192d3\u0192-\u0193\u0194\x07~\u0194/\u0195\u0196\xD8m\u01961\u0197\u01986\u0198\u0199\x07w\u0199\u019A\x07U\u019A\u019D\x07l\u019B\u019E\r\u019C\u019E\xCCg\u019D\u019B\u019D\u019C\u019E\u019F\u019F\u01A0\x07m\u01A03\u01A1\u01A2\x07V\u01A2\u01A3\x07l\u01A3\u01A4\xD6l\u01A4\u01A5\x07m\u01A5\u01AE\u01A6";
40725
+ MalloyParser._serializedATNSegment1 = "\u01A76\u01A7\u01A8\x07w\u01A8\u01A9\x07V\u01A9\u01AA\x07l\u01AA\u01AB\xD4k\u01AB\u01AC\x07m\u01AC\u01AE\u01AD\u01A1\u01AD\u01A6\u01AE5\u01AF\u01B0\xD8m\u01B07\u01B1\u01BC:\u01B2\u01B7\x07p\u01B3\u01B6\x92J\u01B4\u01B6\x07\x84\u01B5\u01B3\u01B5\u01B4\u01B6\u01B9\u01B7\u01B5\u01B7\u01B8\u01B8\u01BA\u01B9\u01B7\u01BA\u01BC\x07q\u01BB\u01B1\u01BB\u01B2\u01BC9\u01BD\u01BE\x07p\u01BE\u01BF\x07\x89\u01BF\u01C0\xE0q\u01C0\u01C1\x07q\u01C1;\u01C2\u01C3\xD8m\u01C3=\u01C4\u01CB@!\u01C5\u01C7\x07v\u01C6\u01C5\u01C6\u01C7\u01C7\u01C8\u01C8\u01CA@!\u01C9\u01C6\u01CA\u01CD\u01CB\u01C9\u01CB\u01CC\u01CC\u01CF\u01CD\u01CB\u01CE\u01D0\x07v\u01CF\u01CE\u01CF\u01D0\u01D0?\u01D1\u01D2\f\x07\u01D2\u01D3D#\u01D3\u01D4\b\u01D4\u01D5B\"\u01D5A\u01D6\u01D7d3\u01D7C\u01D8\u01D9\xD8m\u01D9E\u01DA\u01DB\xD8m\u01DBG\u01DC\u01E1\x07p\u01DD\u01E0J&\u01DE\u01E0\x07\x84\u01DF\u01DD\u01DF\u01DE\u01E0\u01E3\u01E1\u01DF\u01E1\u01E2\u01E2\u01E4\u01E3\u01E1\u01E4\u01E7\x07q\u01E5\u01E7:\u01E6\u01DC\u01E6\u01E5\u01E7I\u01E8\u01FFN(\u01E9\u01FFL'\u01EA\u01FF\\/\u01EB\u01FF^0\u01EC\u01FF\x88E\u01ED\u01EE\x07\u01EE\u01FF\xFC\x7F\u01EF\u01F0\x07\u01F0\u01FFP)\u01F1\u01F2 \u01F2\u01FF\xEAv\u01F3\u01F4\f\x07\u01F4\u01F5 \u01F5\u01F6\x8CG\u01F6\u01FF\u01F7\u01FF\xBE`\u01F8\u01FA\x07h\u01F9\u01F8\u01FA\u01FB\u01FB\u01F9\u01FB\u01FC\u01FC\u01FF\u01FD\u01FF(\u01FE\u01E8\u01FE\u01E9\u01FE\u01EA\u01FE\u01EB\u01FE\u01EC\u01FE\u01ED\u01FE\u01EF\u01FE\u01F1\u01FE\u01F3\u01FE\u01F7\u01FE\u01F9\u01FE\u01FD\u01FFK\u0200\u0201\f\x07\u0201\u0202\x07\u0202\u0203T+\u0203M\u0204\u0205\f\x07\u0205\u0206\x07 \u0206\u0207T+\u0207O\u0208\u020FR*\u0209\u020B\x07v\u020A\u0209\u020A\u020B\u020B\u020C\u020C\u020ER*\u020D\u020A\u020E\u0211\u020F\u020D\u020F\u0210\u0210\u0213\u0211\u020F\u0212\u0214\x07v\u0213\u0212\u0213\u0214\u0214Q\u0215\u0216\xFC\x7F\u0216\u0217\b\u0217\u0218\xFC\x7F\u0218S\u0219\u0220V,\u021A\u021C\x07v\u021B\u021A\u021B\u021C\u021C\u021D\u021D\u021FV,\u021E\u021B\u021F\u0222\u0220\u021E\u0220\u0221\u0221\u0224\u0222\u0220\u0223\u0225\x07v\u0224\u0223\u0224\u0225\u0225U\u0226\u0227\f\x07\u0227\u0228X-\u0228\u0229\b\u0229\u022A\xE0q\u022AW\u022B\u022C\xD8m\u022CY\u022D\u022E\xD8m\u022E[\u022F\u0230\x07\b\u0230\u0231T+\u0231]\u0232\u0233\f\x07\u0233\u0234\x07\u0234\u0235n8\u0235\u023F\u0236\u0237\f\x07\u0237\u0238\x07\u0238\u0239n8\u0239\u023F\u023A\u023B\f\x07\u023B\u023C\x07\u023C\u023Dn8\u023D\u023F\u023E\u0232\u023E\u0236\u023E\u023A\u023F_\u0240\u0241\x07\v\u0241\u0242l7\u0242a\u0243\u0247^0\u0244\u0247\x88E\u0245\u0247\\/\u0246\u0243\u0246\u0244\u0246\u0245\u0247c\u0248\u0249\b3\u0249\u0251\xD8m\u024A\u024B\x07l\u024B\u024Cd3\u024C\u024D\x07m\u024D\u0251\u024E\u02514\x1B\u024F\u02512\u0250\u0248\u0250\u024A\u0250\u024E\u0250\u024F\u0251\u025D\u0252\u0253\f\x07\u0253\u0254\x07~\u0254\u025Cf4\u0255\u0256\f\u0256\u0257\x07j\u0257\u025Cf4\u0258\u0259\f\u0259\u025A\x076\u025A\u025CH%\u025B\u0252\u025B\u0255\u025B\u0258\u025C\u025F\u025D\u025B\u025D\u025E\u025Ee\u025F\u025D\u0260\u0261\b4\u0261\u0268\xF8}\u0262\u02688\u0263\u0264\x07l\u0264\u0265h5\u0265\u0266\x07m\u0266\u0268\u0267\u0260\u0267\u0262\u0267\u0263\u0268\u026E\u0269\u026A\f\u026A\u026B\x07~\u026B\u026Df4\u026C\u0269\u026D\u0270\u026E\u026C\u026E\u026F\u026Fg\u0270\u026E\u0271\u0277f4\u0272\u0273f4\u0273\u0274\x07j\u0274\u0275h5\u0275\u0277\u0276\u0271\u0276\u0272\u0277i\u0278\u027CN(\u0279\u027CL'\u027A\u027C^0\u027B\u0278\u027B\u0279\u027B\u027A\u027Ck\u027D\u0282\x07p\u027E\u0281j6\u027F\u0281\x07\x84\u0280\u027E\u0280\u027F\u0281\u0284\u0282\u0280\u0282\u0283\u0283\u0285\u0284\u0282\u0285\u0286\x07q\u0286m\u0287\u028Et;\u0288\u028A\x07v\u0289\u0288\u0289\u028A\u028A\u028B\u028B\u028Dt;\u028C\u0289\u028D\u0290\u028E\u028C\u028E\u028F\u028F\u0292\u0290\u028E\u0291\u0293\x07v\u0292\u0291\u0292\u0293\u0293o\u0294\u0295\f\x07\u0295\u0296\x07@\u0296\u0297\f\x07\u0297\u0298d3\u0298q\u0299\u029A \u029As\u029B\u029D\x07h\u029C\u029B\u029D\u02A0\u029E\u029C\u029E\u029F\u029F\u02A1\u02A0\u029E\u02A1\u02A3Z.\u02A2\u02A4p9\u02A3\u02A2\u02A3\u02A4\u02A4\u02A6\u02A5\u02A7r:\u02A6\u02A5\u02A6\u02A7\u02A7\u02A8\u02A8\u02A9\x07_\u02A9\u02AA\xE0q\u02AA\u02BD\u02AB\u02AD\x07h\u02AC\u02AB\u02AD\u02B0\u02AE\u02AC\u02AE\u02AF\u02AF\u02B1\u02B0\u02AE\u02B1\u02B3Z.\u02B2\u02B4p9\u02B3\u02B2\u02B3\u02B4\u02B4\u02BA\u02B5\u02B7r:\u02B6\u02B5\u02B6\u02B7\u02B7\u02B8\u02B8\u02B9\x07L\u02B9\u02BBv<\u02BA\u02B6\u02BA\u02BB\u02BB\u02BD\u02BC\u029E\u02BC\u02AE\u02BDu\u02BE\u02BF\xE0q\u02BFw\u02C0\u02C3\x88E\u02C1\u02C3\x8AF\u02C2\u02C0\u02C2\u02C1\u02C3y\u02C4\u02C9\x07p\u02C5\u02C8\x84C\u02C6\u02C8\x07\x84\u02C7\u02C5\u02C7\u02C6\u02C8\u02CB\u02C9\u02C7\u02C9\u02CA\u02CA\u02CC\u02CB\u02C9\u02CC\u02CD\x07q\u02CD{\u02CE\u02D3~@\u02CF\u02D0\x07v\u02D0\u02D2~@\u02D1\u02CF\u02D2\u02D5\u02D3\u02D1\u02D3\u02D4\u02D4\u02D7\u02D5\u02D3\u02D6\u02D8\x07v\u02D7\u02D6\u02D7\u02D8\u02D8}\u02D9\u02DB\xE0q\u02DA\u02DC \u02DB\u02DA\u02DB\u02DC\u02DC\u02E0\u02DD\u02E0\x07'\u02DE\u02E0\x071\u02DF\u02D9\u02DF\u02DD\u02DF\u02DE\u02E0\x7F\u02E1\u02E2\x07\u02E2\u02E3|?\u02E3\x81\u02E4\u02E5\xB0Y\u02E5\x83\u02E6\u02EB\x88E\u02E7\u02EB\xA8U\u02E8\u02EB\x80A\u02E9\u02EB\x82B\u02EA\u02E6\u02EA\u02E7\u02EA\u02E8\u02EA\u02E9\u02EB\x85\u02EC\u02F1\xE0q\u02ED\u02EE\x07v\u02EE\u02F0\xE0q\u02EF\u02ED\u02F0\u02F3\u02F1\u02EF\u02F1\u02F2\u02F2\u02F5\u02F3\u02F1\u02F4\u02F6\x07v\u02F5\u02F4\u02F5\u02F6\u02F6\x87\u02F7\u02F8\x07!\u02F8\u02F9\x86D\u02F9\x89\u02FA\u02FB\x07\r\u02FB\u02FC\x86D\u02FC\x8B\u02FD\u0304\x90I\u02FE\u0300\x07v\u02FF\u02FE\u02FF\u0300\u0300\u0301\u0301\u0303\x90I\u0302\u02FF\u0303\u0306\u0304\u0302\u0304\u0305\u0305\u0308\u0306\u0304\u0307\u0309\x07v\u0308\u0307\u0308\u0309\u0309\x8D\u030A\u030B\xD8m\u030B\x8F\u030C\u030E\x07h\u030D\u030C\u030E\u0311\u030F\u030D\u030F\u0310\u0310\u0312\u0311\u030F\u0312\u0313\x8EH\u0313\u0314\b\u0314\u0315h5\u0315\x91\u0316\u0329\x96L\u0317\u0329\\/\u0318\u0329\x94K\u0319\u0329`1\u031A\u0329\xA6T\u031B\u0329\xBA^\u031C\u0329\xA2R\u031D\u0329\xA4S\u031E\u0329\xB4[\u031F\u0329\xB0Y\u0320\u0329\xAAV\u0321\u0329\x88E\u0322\u0329\x8AF\u0323\u0329\x9CO\u0324\u0329\xBC_\u0325\u0329\xBE`\u0326\u0329\xC0a\u0327\u0329(\u0328\u0316\u0328\u0317\u0328\u0318\u0328\u0319\u0328\u031A\u0328\u031B\u0328\u031C\u0328\u031D\u0328\u031E\u0328\u031F\u0328\u0320\u0328\u0321\u0328\u0322\u0328\u0323\u0328\u0324\u0328\u0325\u0328\u0326\u0328\u0327\u0329\x93\u032A\u032B^0\u032B\x95\u032C\u032D\f\x07\u032D\u032E\x07\f\u032E\u032F\x98M\u032F\x97\u0330\u0337\x9AN\u0331\u0333\x07v\u0332\u0331\u0332\u0333\u0333\u0334\u0334\u0336\x9AN\u0335\u0332\u0336\u0339\u0337\u0335\u0337\u0338\u0338\u033B\u0339\u0337\u033A\u033C\x07v\u033B\u033A\u033B\u033C\u033C\x99\u033D\u0340\xF2z\u033E\u0340V,\u033F\u033D\u033F\u033E\u0340\x9B\u0341\u0342\f\x07\u0342\u0343\x07\u0343\u0344\x9EP\u0344\x9D\u0345\u034C\xA0Q\u0346\u0348\x07v\u0347\u0346\u0347\u0348\u0348\u0349\u0349\u034B\xA0Q\u034A\u0347\u034B\u034E\u034C\u034A\u034C\u034D\u034D\u0350\u034E\u034C\u034F\u0351\x07v\u0350\u034F\u0350\u0351\u0351\x9F\u0352\u0353\f\x07\u0353\u0356\xF8}\u0354\u0355\x07~\u0355\u0357h5\u0356\u0354\u0356\u0357\u0357\u035E\u0358\u0359\f\x07\u0359\u035A<\u035A\u035B\b\u035B\u035Ch5\u035C\u035E\u035D\u0352\u035D\u0358\u035E\xA1\u035F\u0360\f\x07\u0360\u0361\x07\u0361\u0362\x98M\u0362\xA3\u0363\u0364\f\x07\u0364\u0365\x07\u0365\u0366\x98M\u0366\xA5\u0367\u0368\f\x07\u0368\u0369 \x07\u0369\u036A\xECw\u036A\xA7\u036B\u036C\x07\u036C\u0371\xD8m\u036D\u036E\x07v\u036E\u0370\xD8m\u036F\u036D\u0370\u0373\u0371\u036F\u0371\u0372\u0372\u0375\u0373\u0371\u0374\u0376\x07v\u0375\u0374\u0375\u0376\u0376\xA9\u0377\u0378\x07\u0378\u0379\xACW\u0379\xAB\u037A\u0381\xAEX\u037B\u037D\x07v\u037C\u037B\u037C\u037D\u037D\u037E\u037E\u0380\xAEX\u037F\u037C\u0380\u0383\u0381\u037F\u0381\u0382\u0382\u0385\u0383\u0381\u0384\u0386\x07v\u0385\u0384\u0385\u0386\u0386\xAD\u0387\u038A\x07\x94\u0388\u038A\xFC\x7F\u0389\u0387\u0389\u0388\u038A\u038C\u038B\u038D \u038C\u038B\u038C\u038D\u038D\xAF\u038E\u038F\x07\u038F\u0390\x07\x94\u0390\xB1\u0391\u0392\x07*\u0392\u0396\xFC\x7F\u0393\u0394\x07*\u0394\u0396\xE0q\u0395\u0391\u0395\u0393\u0396\xB3\u0397\u0398\x07 \u0398\u039A\x07\x94\u0399\u039B\xB2Z\u039A\u0399\u039A\u039B\u039B\xB5\u039C\u039F\xF8}\u039D\u039E\x07w\u039E\u03A0\x07\x80\u039F\u039D\u039F\u03A0\u03A0\u03A3\u03A1\u03A3\x07\x80\u03A2\u039C\u03A2\u03A1\u03A3\xB7\u03A4\u03AB\xB6\\\u03A5\u03A7\x07v\u03A6\u03A5\u03A6\u03A7\u03A7\u03A8\u03A8\u03AA\xB6\\\u03A9\u03A6\u03AA\u03AD\u03AB\u03A9\u03AB\u03AC\u03AC\xB9\u03AD\u03AB\u03AE\u03AF\x07\u03AF\u03B2\xB8]\u03B0\u03B1\x07*\u03B1\u03B3\xFC\x7F\u03B2\u03B0\u03B2\u03B3\u03B3\xBB\u03B4\u03B5\x07\u03B5\u03B6\xC2b\u03B6\xBD\u03B7\u03B8\x07#\u03B8\u03B9\xCAf\u03B9\xBF\u03BA\u03BB\x07h\u03BB\xC1\u03BC\u03BD \b\u03BD\xC3\u03BE\u03BF \u03BF\xC5\u03C0\u03C1 \n\u03C1\xC7\u03C2\u03C3 \v\u03C3\xC9\u03C4\u03C7\xCCg\u03C5\u03C7\r\u03C6\u03C4\u03C6\u03C5\u03C7\xCB\u03C8\u03C9 \f\u03C9\xCD\u03CA\u03CB \r\u03CB\xCF\u03CC\u03D4\xCAf\u03CD\u03D4\xCEh\u03CE\u03D4\xD2j\u03CF\u03D4\x07J\u03D0\u03D4 \u03D1\u03D4\x07c\u03D2\u03D4\x07I\u03D3\u03CC\u03D3\u03CD\u03D3\u03CE\u03D3\u03CF\u03D3\u03D0\u03D3\u03D1\u03D3\u03D2\u03D4\xD1\u03D5\u03DD\x07\x8A\u03D6\u03DD\x07\x8B\u03D7\u03DD\x07\x8C\u03D8\u03DD\x07\x8F\u03D9\u03DD\x07\x8E\u03DA\u03DD\x07\x8D\u03DB\u03DD\x07\x90\u03DC\u03D5\u03DC\u03D6\u03DC\u03D7\u03DC\u03D8\u03DC\u03D9\u03DC\u03DA\u03DC\u03DB\u03DD\xD3\u03DE\u03DF\xCAf\u03DF\xD5\u03E0\u03E1\xCAf\u03E1\xD7\u03E2\u03E3 \u03E3\xD9\u03E4\u03E5 \u03E5\xDB\u03E6\u03E7 \u03E7\xDD\u03E8\u03EB\xC6d\u03E9\u03EB\xCAf\u03EA\u03E8\u03EA\u03E9\u03EB\xDF\u03EC\u03ED\bq\u03ED\u0440\xF8}\u03EE\u0440\xD0i\u03EF\u03F0\x07\x7F\u03F0\u0440\xE0q\u03F1\u03F2\x07H\u03F2\u0440\xE0q\u03F3\u03F4\x07,\u03F4\u03F5\x07l\u03F5\u03F6\xE0q\u03F6\u03F7\x07&\u03F7\u03F8\xDEp\u03F8\u03F9\x07m\u03F9\u0440\u03FA\u03FB\x07.\u03FB\u03FC\x07l\u03FC\u03FD\x072\u03FD\u03FE\xE0q\u03FE\u03FF\x07m\u03FF\u0440\u0400\u0401\x07S\u0401\u0403\x07w\u0402\u0400\u0402\u0403\u0403\u0404\u0404\u0405\xC4c\u0405\u0408\x07l\u0406\u0409\xE0q\u0407\u0409\x07\x80\u0408\u0406\u0408\u0407\u0408\u0409\u0409\u040A\u040A\u040B\x07m\u040B\u0440\u040C\u040D\xF8}\u040D\u040E\x07w\u040E\u040F\xC4c\u040F\u0411\x07l\u0410\u0412\xE0q\u0411\u0410\u0411\u0412\u0412\u0413\u0413\u0414\x07m\u0414\u0440\u0415\u0416\x07l\u0416\u0417\xE2r\u0417\u0418\x07m\u0418\u0440\u0419\u041A\xF8}\u041A\u041B\x07w\u041B\u041C\xD8m\u041C\u041E\x07l\u041D\u041F\xE8u\u041E\u041D\u041E\u041F\u041F\u0420\u0420\u0421\x07m\u0421\u0440\u0422\u0427\xD8m\u0423\u0425\x07t\u0424\u0426\xC6d\u0425\u0424\u0425\u0426\u0426\u0428\u0427\u0423\u0427\u0428\u0428\u042B\u0429\u042B\xDAn\u042A\u0422\u042A\u0429\u042B\u042C\u042C\u042E\x07l\u042D\u042F\xE8u\u042E\u042D\u042E\u042F\u042F\u0430\u0430\u0431\x07m\u0431\u0440\u0432\u0440\xE4s\u0433\u0434\xDCo\u0434\u0435\x07l\u0435\u043A\xE0q\u0436\u0437\x07v\u0437\u0439\xFC\x7F\u0438\u0436\u0439\u043C\u043A\u0438\u043A\u043B\u043B\u043D\u043C\u043A\u043D\u043E\x07m\u043E\u0440\u043F\u03EC\u043F\u03EE\u043F\u03EF\u043F\u03F1\u043F\u03F3\u043F\u03FA\u043F\u0402\u043F\u040C\u043F\u0415\u043F\u0419\u043F\u042A\u043F\u0432\u043F\u0433\u0440\u0474\u0441\u0442\f\u0442\u0443 \u0443\u0473\xE0q\u0444\u0445\f\u0445\u0446 \u0446\u0473\xE0q\u0447\u0448\f\u0448\u0449\x07Z\u0449\u0473\xE0q\u044A\u044B\f\u044B\u044C\xC8e\u044C\u044D\xE0q\u044D\u0473\u044E\u044F\f\u044F\u0450\x07%\u0450\u0473\xE0q\u0451\u0452\f";
40726
+ MalloyParser._serializedATNSegment2 = "\r\u0452\u0453\x07M\u0453\u0473\xE0q\u0454\u0455\f\f\u0455\u0456\x07\x88\u0456\u0473\xE0q\r\u0457\u0458\f\u0458\u0473z>\u0459\u045A\f\u045A\u0473\xDAn\u045B\u045C\f\x1B\u045C\u045D\x07w\u045D\u0473\xDAn\u045E\u045F\f\u045F\u0460\x07r\u0460\u0473\xDEp\u0461\u0462\f\u0462\u0463\x07s\u0463\u0473\xDEp\u0464\u0465\f\u0465\u0466\x079\u0466\u0467\xE0q\u0467\u0468\xDAn\u0468\u0473\u0469\u046A\f\u046A\u046B\x07i\u046B\u0473\xE2r\u046C\u046D\f\u046D\u046E\x07\x83\u046E\u0473\xE2r\u046F\u0470\f\u0470\u0471\x07\x89\u0471\u0473\xE2r\u0472\u0441\u0472\u0444\u0472\u0447\u0472\u044A\u0472\u044E\u0472\u0451\u0472\u0454\u0472\u0457\u0472\u0459\u0472\u045B\u0472\u045E\u0472\u0461\u0472\u0464\u0472\u0469\u0472\u046C\u0472\u046F\u0473\u0476\u0474\u0472\u0474\u0475\u0475\xE1\u0476\u0474\u0477\u0479\x07l\u0478\u047A\xC8e\u0479\u0478\u0479\u047A\u047A\u047B\u047B\u047C\xE0q\u047C\u047D\x07m\u047D\u0483\u047E\u0480\xC8e\u047F\u047E\u047F\u0480\u0480\u0481\u0481\u0483\xE0q\u0482\u0477\u0482\u047F\u0483\xE3\u0484\u0486\xE6t\u0485\u0484\u0486\u0487\u0487\u0485\u0487\u0488\u0488\u048B\u0489\u048A\x073\u048A\u048C\xE0q\u048B\u0489\u048B\u048C\u048C\xE5\u048D\u048F\x07N\u048E\u0490\xE0q\u048F\u048E\u048F\u0490\u0490\u0491\u0491\u0492\x07^\u0492\u0493\xE2r\u0493\xE7\u0494\u0499\xE0q\u0495\u0496\x07v\u0496\u0498\xE0q\u0497\u0495\u0498\u049B\u0499\u0497\u0499\u049A\u049A\u049D\u049B\u0499\u049C\u049E\x07v\u049D\u049C\u049D\u049E\u049E\xE9\u049F\u04A6\xFC\x7F\u04A0\u04A2\x07v\u04A1\u04A0\u04A1\u04A2\u04A2\u04A3\u04A3\u04A5\xFC\x7F\u04A4\u04A1\u04A5\u04A8\u04A6\u04A4\u04A6\u04A7\u04A7\xEB\u04A8\u04A6\u04A9\u04B0\xF6|\u04AA\u04AC\x07v\u04AB\u04AA\u04AB\u04AC\u04AC\u04AD\u04AD\u04AF\xF6|\u04AE\u04AB\u04AF\u04B2\u04B0\u04AE\u04B0\u04B1\u04B1\u04B4\u04B2\u04B0\u04B3\u04B5\x07v\u04B4\u04B3\u04B4\u04B5\u04B5\xED\u04B6\u04B7\xF8}\u04B7\u04B8\x07w\u04B8\u04BA\u04B9\u04B6\u04B9\u04BA\u04BA\u04BB\u04BB\u04BD\x07\x80\u04BC\u04BE\xF0y\u04BD\u04BC\u04BD\u04BE\u04BE\xEF\u04BF\u04C3\x07p\u04C0\u04C1\x07\n\u04C1\u04C4\xEAv\u04C2\u04C4\x07v\u04C3\u04C0\u04C3\u04C2\u04C4\u04C5\u04C5\u04C3\u04C5\u04C6\u04C6\u04C7\u04C7\u04C8\x07q\u04C8\xF1\u04C9\u04CA\f\x07\u04CA\u04CC\xF8}\u04CB\u04CD\xF4{\u04CC\u04CB\u04CC\u04CD\u04CD\xF3\u04CE\u04CF\x07w\u04CF\u04D6\xDAn\u04D0\u04D1\x07w\u04D1\u04D2\xC4c\u04D2\u04D3\x07l\u04D3\u04D4\x07m\u04D4\u04D6\u04D5\u04CE\u04D5\u04D0\u04D6\xF5\u04D7\u04DB\xF2z\u04D8\u04DB\xEEx\u04D9\u04DBV,\u04DA\u04D7\u04DA\u04D8\u04DA\u04D9\u04DB\xF7\u04DC\u04E1\xFC\x7F\u04DD\u04DE\x07w\u04DE\u04E0\xFC\x7F\u04DF\u04DD\u04E0\u04E3\u04E1\u04DF\u04E1\u04E2\u04E2\xF9\u04E3\u04E1\u04E4\u04E5\xD8m\u04E5\xFB\u04E6\u04E7\xD8m\u04E7\xFD\u04E8\u04E9\xE0q\u04E9\u04EA\x07\u04EA\xFF\u04EB\u04EC\xD8m\u04EC\u0101\u04ED\u04EE\xD8m\u04EE\u0103\u04EF\u04F0\xCAf\u04F0\u0105\u04F1\u04F2\x07\x84\u04F2\u04F3\x07\x84\u04F3\u04F4\x07n\u04F4\u04F5\xCAf\u04F5\u04F6\x07o\u04F6\u0107\x87\u010A\u010C\u0119\u0124\u012C\u0140\u0148\u014E\u0159\u0163\u016C\u0173\u0178\u017D\u0183\u0188\u018C\u019D\u01AD\u01B5\u01B7\u01BB\u01C6\u01CB\u01CF\u01DF\u01E1\u01E6\u01FB\u01FE\u020A\u020F\u0213\u021B\u0220\u0224\u023E\u0246\u0250\u025B\u025D\u0267\u026E\u0276\u027B\u0280\u0282\u0289\u028E\u0292\u029E\u02A3\u02A6\u02AE\u02B3\u02B6\u02BA\u02BC\u02C2\u02C7\u02C9\u02D3\u02D7\u02DB\u02DF\u02EA\u02F1\u02F5\u02FF\u0304\u0308\u030F\u0328\u0332\u0337\u033B\u033F\u0347\u034C\u0350\u0356\u035D\u0371\u0375\u037C\u0381\u0385\u0389\u038C\u0395\u039A\u039F\u03A2\u03A6\u03AB\u03B2\u03C6\u03D3\u03DC\u03EA\u0402\u0408\u0411\u041E\u0425\u0427\u042A\u042E\u043A\u043F\u0472\u0474\u0479\u047F\u0482\u0487\u048B\u048F\u0499\u049D\u04A1\u04A6\u04AB\u04B0\u04B4\u04B9\u04BD\u04C3\u04C5\u04CC\u04D5\u04DA\u04E1";
40577
40727
  MalloyParser._serializedATN = Utils.join([
40578
40728
  MalloyParser._serializedATNSegment0,
40579
40729
  MalloyParser._serializedATNSegment1,
@@ -44053,7 +44203,7 @@ ${struct.dialect.sqlFinalStage("__stage0", [
44053
44203
  exports.AggregateOrderingContext = AggregateOrderingContext;
44054
44204
  var AggregateOrderBySpecContext = class extends ParserRuleContext_1.ParserRuleContext {
44055
44205
  fieldExpr() {
44056
- return this.getRuleContext(0, FieldExprContext);
44206
+ return this.tryGetRuleContext(0, FieldExprContext);
44057
44207
  }
44058
44208
  ASC() {
44059
44209
  return this.tryGetToken(MalloyParser.ASC, 0);
@@ -54672,9 +54822,14 @@ QUERY: ${(0, util_1.inspect)(opDesc, { breakLength: 72, depth: Infinity })}`);
54672
54822
  this.field = field3;
54673
54823
  this.dir = dir;
54674
54824
  this.elementType = "orderBy";
54675
- this.has({ field: field3 });
54825
+ if (field3)
54826
+ this.has({ field: field3 });
54676
54827
  }
54677
54828
  getAnalyticOrderBy(fs) {
54829
+ if (!this.field) {
54830
+ this.log("analytic `order_by` must specify an aggregate expression or output field reference");
54831
+ return { e: ["error"], dir: this.dir };
54832
+ }
54678
54833
  const expr2 = this.field.getExpression(fs);
54679
54834
  if ((0, malloy_types_1.expressionIsAggregate)(expr2.expressionType)) {
54680
54835
  } else if ((0, malloy_types_1.expressionIsScalar)(expr2.expressionType)) {
@@ -54686,12 +54841,23 @@ QUERY: ${(0, util_1.inspect)(opDesc, { breakLength: 72, depth: Infinity })}`);
54686
54841
  }
54687
54842
  return { e: expr2.value, dir: this.dir };
54688
54843
  }
54689
- getAggregateOrderBy(fs) {
54690
- const expr2 = this.field.getExpression(fs);
54691
- if (!(0, malloy_types_1.expressionIsScalar)(expr2.expressionType)) {
54692
- this.field.log("aggregate `order_by` must be scalar");
54844
+ getAggregateOrderBy(fs, allowExpression) {
54845
+ if (this.field) {
54846
+ const expr2 = this.field.getExpression(fs);
54847
+ if (!(0, malloy_types_1.expressionIsScalar)(expr2.expressionType)) {
54848
+ this.field.log("aggregate `order_by` must be scalar");
54849
+ }
54850
+ if (!allowExpression) {
54851
+ this.field.log("`order_by` must be only `asc` or `desc` with no expression");
54852
+ }
54853
+ return { e: expr2.value, dir: this.dir };
54854
+ } else {
54855
+ if (this.dir === void 0) {
54856
+ this.log("field or order direction must be specified");
54857
+ return { e: void 0, dir: "asc" };
54858
+ }
54859
+ return { e: void 0, dir: this.dir };
54693
54860
  }
54694
- return { e: expr2.value, dir: this.dir };
54695
54861
  }
54696
54862
  };
54697
54863
  exports.FunctionOrderBy = FunctionOrderBy;
@@ -54703,8 +54869,8 @@ QUERY: ${(0, util_1.inspect)(opDesc, { breakLength: 72, depth: Infinity })}`);
54703
54869
  getAnalyticOrderBy(fs) {
54704
54870
  return this.list.map((el) => el.getAnalyticOrderBy(fs));
54705
54871
  }
54706
- getAggregateOrderBy(fs) {
54707
- return this.list.map((el) => el.getAggregateOrderBy(fs));
54872
+ getAggregateOrderBy(fs, allowExpression) {
54873
+ return this.list.map((el) => el.getAggregateOrderBy(fs, allowExpression));
54708
54874
  }
54709
54875
  };
54710
54876
  exports.FunctionOrdering = FunctionOrdering;
@@ -55835,6 +56001,7 @@ QUERY: ${(0, util_1.inspect)(opDesc, { breakLength: 72, depth: Infinity })}`);
55835
56001
  const frag = {
55836
56002
  type: "function_call",
55837
56003
  overload,
56004
+ name: this.name,
55838
56005
  args: argExprs.map((x6) => x6.value),
55839
56006
  expressionType,
55840
56007
  structPath
@@ -55848,7 +56015,8 @@ QUERY: ${(0, util_1.inspect)(opDesc, { breakLength: 72, depth: Infinity })}`);
55848
56015
  if ((props === null || props === void 0 ? void 0 : props.orderBys) && props.orderBys.length > 0) {
55849
56016
  const isAnalytic = (0, malloy_types_1.expressionIsAnalytic)(overload.returnType.expressionType);
55850
56017
  if (dialectOverload.supportsOrderBy || isAnalytic) {
55851
- const allObs = props.orderBys.flatMap((orderBy) => isAnalytic ? orderBy.getAnalyticOrderBy(fs) : orderBy.getAggregateOrderBy(fs));
56018
+ const allowExpression = dialectOverload.supportsOrderBy !== "only_default";
56019
+ const allObs = props.orderBys.flatMap((orderBy) => isAnalytic ? orderBy.getAnalyticOrderBy(fs) : orderBy.getAggregateOrderBy(fs, allowExpression));
55852
56020
  frag.orderBy = allObs;
55853
56021
  } else {
55854
56022
  props.orderBys[0].log(`Function ${this.name} does not support order_by`);
@@ -66314,7 +66482,8 @@ QUERY: ${(0, util_1.inspect)(opDesc, { breakLength: 72, depth: Infinity })}`);
66314
66482
  }
66315
66483
  visitAggregateOrderBySpec(pcx) {
66316
66484
  const dir = pcx.ASC() ? "asc" : pcx.DESC() ? "desc" : void 0;
66317
- const f4 = this.getFieldExpr(pcx.fieldExpr());
66485
+ const fCx = pcx.fieldExpr();
66486
+ const f4 = fCx ? this.getFieldExpr(fCx) : void 0;
66318
66487
  return this.astAt(new ast.FunctionOrderBy(f4, dir), pcx);
66319
66488
  }
66320
66489
  visitAggregateOrderByStatement(pcx) {