parseman 0.50.7 → 0.51.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/analysis/choice-cost.d.ts.map +1 -1
- package/dist/analysis/commitment.d.ts.map +1 -1
- package/dist/analysis/diagnostics.js +165 -21
- package/dist/analysis/diagnostics.js.map +2 -2
- package/dist/analysis/duplication.d.ts.map +1 -1
- package/dist/analysis/gating.d.ts.map +1 -1
- package/dist/cli/index.js +171 -22
- package/dist/cli/index.js.map +2 -2
- package/dist/combinators/dispatch.d.ts.map +1 -1
- package/dist/combinators/scanTo.d.ts +23 -1
- package/dist/combinators/scanTo.d.ts.map +1 -1
- package/dist/compiler/fields.d.ts.map +1 -1
- package/dist/compiler/grammar-coverage-ids.d.ts.map +1 -1
- package/dist/compiler/ir-serialize.d.ts.map +1 -1
- package/dist/compiler/token-capability.js +2 -2
- package/dist/compiler/token-capability.js.map +1 -1
- package/dist/coverage.d.ts.map +1 -1
- package/dist/cst/reflection.d.ts.map +1 -1
- package/dist/index.js +198 -30
- package/dist/index.js.map +2 -2
- package/dist/plugin/index.js +185 -27
- package/dist/plugin/index.js.map +2 -2
- package/dist/spec/index.js +127 -12
- package/dist/spec/index.js.map +2 -2
- package/dist/table/assemble.d.ts.map +1 -1
- package/dist/table/emit.d.ts.map +1 -1
- package/dist/table/encode.d.ts.map +1 -1
- package/dist/table/exec.d.ts.map +1 -1
- package/dist/table/index.js +171 -22
- package/dist/table/index.js.map +2 -2
- package/dist/table/program.d.ts +2 -0
- package/dist/table/program.d.ts.map +1 -1
- package/dist/types.d.ts +2 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/version.d.ts +1 -1
- package/package.json +1 -1
- package/src/analysis/choice-cost.ts +6 -1
- package/src/analysis/commitment.ts +10 -2
- package/src/analysis/duplication.ts +7 -2
- package/src/analysis/gating.ts +6 -1
- package/src/analysis/rebuild.ts +1 -1
- package/src/combinators/dispatch.ts +4 -1
- package/src/combinators/scanTo.ts +163 -9
- package/src/compiler/fields.ts +8 -2
- package/src/compiler/grammar-coverage-ids.ts +6 -1
- package/src/compiler/ir-serialize.ts +14 -5
- package/src/compiler/token-alphabet.ts +1 -1
- package/src/coverage.ts +7 -1
- package/src/cst/reflection.ts +6 -1
- package/src/table/assemble.ts +11 -1
- package/src/table/emit.ts +4 -0
- package/src/table/encode.ts +6 -0
- package/src/table/exec.ts +7 -1
- package/src/table/program.ts +2 -0
- package/src/types.ts +1 -1
- package/src/version.ts +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"choice-cost.d.ts","sourceRoot":"","sources":["../../src/analysis/choice-cost.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+IG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAwC,MAAM,aAAa,CAAA;AACnF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAA;AAIpD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAI3C,gFAAgF;AAChF,MAAM,MAAM,UAAU,GAAG;IACvB,+EAA+E;IAC/E,IAAI,EAAE,MAAM,CAAA;IACZ,kFAAkF;IAClF,IAAI,EAAE,MAAM,CAAA;CACb,CAAA;AAED;qFACqF;AACrF,eAAO,MAAM,aAAa,MAAO,UAAU,KAAG,MACI,CAAA;AAIlD,yDAAyD;AACzD,MAAM,MAAM,gBAAgB;AAC1B;;sFAEsF;AACpF,gBAAgB;AAClB,yEAAyE;GACvE,yBAAyB;AAC3B;;8BAE8B;GAC5B,+BAA+B;AACjC;;gCAEgC;GAC9B,4BAA4B,CAAA;AAEhC,qDAAqD;AACrD,MAAM,MAAM,iBAAiB;AAC3B;oDACoD;AAClD,mBAAm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CAAC,OAAO,CAAC,CAAa,GAAG,OAAO,CAgCtG;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,UAAU,CAAC,OAAO,CAAC,EAAE,IAAI,GAAE,GAAG,CAAC,UAAU,CAAC,OAAO,CAAC,CAAa,GAAG,OAAO,CAqC7G;AAED,2FAA2F;AAC3F,wBAAgB,gBAAgB,CAC9B,CAAC,EAAE,UAAU,CAAC,OAAO,CAAC,EACtB,IAAI,GAAE,GAAG,CAAC,UAAU,CAAC,OAAO,CAAC,CAAa,EAC1C,OAAO,CAAC,EAAE,WAAW,GACpB,OAAO,CA6CT;AAwCD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,eAAe,CAC7B,OAAO,EAAE,aAAa,CAAC,SAAS,CAAC,MAAM,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,GAC7D;IAAE,iBAAiB,EAAE,OAAO,CAAC;IAAC,iBAAiB,EAAE,OAAO,CAAA;CAAE,CAwB5D"}
|
|
@@ -2374,7 +2374,12 @@ function childrenOf(d) {
|
|
|
2374
2374
|
case "recover":
|
|
2375
2375
|
return [d.parser, d.sentinel];
|
|
2376
2376
|
case "scanTo":
|
|
2377
|
-
return [
|
|
2377
|
+
return [
|
|
2378
|
+
d.sentinel,
|
|
2379
|
+
...d.skip,
|
|
2380
|
+
...d.recoverAt === void 0 ? [] : [d.recoverAt],
|
|
2381
|
+
...d.stopAt === void 0 ? [] : [d.stopAt]
|
|
2382
|
+
];
|
|
2378
2383
|
case "grammar":
|
|
2379
2384
|
return d.triviaParser ? [d.parser, d.triviaParser] : [d.parser];
|
|
2380
2385
|
case "routed":
|
|
@@ -3228,7 +3233,7 @@ function hasNodeDef(p, seen = /* @__PURE__ */ new Set()) {
|
|
|
3228
3233
|
case "sepBy":
|
|
3229
3234
|
return hasNodeDef(d.parser, seen) || hasNodeDef(d.separator, seen);
|
|
3230
3235
|
case "scanTo":
|
|
3231
|
-
return hasNodeDef(d.sentinel, seen) || d.skip.some((x) => hasNodeDef(x, seen));
|
|
3236
|
+
return hasNodeDef(d.sentinel, seen) || d.skip.some((x) => hasNodeDef(x, seen)) || d.recoverAt !== void 0 && hasNodeDef(d.recoverAt, seen) || d.stopAt !== void 0 && hasNodeDef(d.stopAt, seen);
|
|
3232
3237
|
case "recover":
|
|
3233
3238
|
return hasNodeDef(d.parser, seen) || hasNodeDef(d.sentinel, seen);
|
|
3234
3239
|
case "expect":
|
|
@@ -3267,7 +3272,7 @@ function mayCommitFailure(p, seen = /* @__PURE__ */ new Set(), resolve) {
|
|
|
3267
3272
|
case "withCtx":
|
|
3268
3273
|
return mayCommitFailure(d.parser, seen, resolve);
|
|
3269
3274
|
case "scanTo":
|
|
3270
|
-
return mayCommitFailure(d.sentinel, seen, resolve) || d.skip.some((x) => mayCommitFailure(x, seen, resolve));
|
|
3275
|
+
return mayCommitFailure(d.sentinel, seen, resolve) || d.skip.some((x) => mayCommitFailure(x, seen, resolve)) || d.recoverAt !== void 0 && mayCommitFailure(d.recoverAt, seen, resolve) || d.stopAt !== void 0 && mayCommitFailure(d.stopAt, seen, resolve);
|
|
3271
3276
|
case "lazy": {
|
|
3272
3277
|
try {
|
|
3273
3278
|
return mayCommitFailure(d.thunk(), seen, resolve);
|
|
@@ -4111,7 +4116,7 @@ function parserHasOwnFields(p, seen = /* @__PURE__ */ new Set()) {
|
|
|
4111
4116
|
case "grammar":
|
|
4112
4117
|
return parserHasOwnFields(d.parser, seen) || (d.triviaParser ? parserHasOwnFields(d.triviaParser, seen) : false);
|
|
4113
4118
|
case "scanTo":
|
|
4114
|
-
return parserHasOwnFields(d.sentinel, seen) || d.skip.some((x) => parserHasOwnFields(x, seen));
|
|
4119
|
+
return parserHasOwnFields(d.sentinel, seen) || d.skip.some((x) => parserHasOwnFields(x, seen)) || d.recoverAt !== void 0 && parserHasOwnFields(d.recoverAt, seen) || d.stopAt !== void 0 && parserHasOwnFields(d.stopAt, seen);
|
|
4115
4120
|
case "recover":
|
|
4116
4121
|
return parserHasOwnFields(d.parser, seen) || parserHasOwnFields(d.sentinel, seen);
|
|
4117
4122
|
case "routed":
|
|
@@ -4165,7 +4170,7 @@ function parserUsesRouted(parser2, seen = /* @__PURE__ */ new Set()) {
|
|
|
4165
4170
|
case "grammar":
|
|
4166
4171
|
return parserUsesRouted(def.parser, seen) || (def.triviaParser ? parserUsesRouted(def.triviaParser, seen) : false);
|
|
4167
4172
|
case "scanTo":
|
|
4168
|
-
return parserUsesRouted(def.sentinel, seen) || def.skip.some((entry) => parserUsesRouted(entry, seen));
|
|
4173
|
+
return parserUsesRouted(def.sentinel, seen) || def.skip.some((entry) => parserUsesRouted(entry, seen)) || def.recoverAt !== void 0 && parserUsesRouted(def.recoverAt, seen) || def.stopAt !== void 0 && parserUsesRouted(def.stopAt, seen);
|
|
4169
4174
|
case "recover":
|
|
4170
4175
|
return parserUsesRouted(def.parser, seen) || parserUsesRouted(def.sentinel, seen);
|
|
4171
4176
|
case "lazy":
|
|
@@ -6861,6 +6866,8 @@ var Encoder = class {
|
|
|
6861
6866
|
flags: (d.raw ? 1 : 0) | (d.orEOF ? 2 : 0),
|
|
6862
6867
|
skip: d.skip.map((c) => this.subtree(c)),
|
|
6863
6868
|
sentinel: this.subtree(d.sentinel),
|
|
6869
|
+
...d.recoverAt === void 0 ? {} : { recoverAt: this.subtree(d.recoverAt) },
|
|
6870
|
+
...d.stopAt === void 0 ? {} : { stopAt: this.subtree(d.stopAt) },
|
|
6864
6871
|
sent: sentDef.tag === "literal" ? sentDef.value : null
|
|
6865
6872
|
}));
|
|
6866
6873
|
}
|
|
@@ -7294,6 +7301,8 @@ var Encoder = class {
|
|
|
7294
7301
|
const refs = [];
|
|
7295
7302
|
for (const s of this.scans) {
|
|
7296
7303
|
if (s.sentinel !== void 0) refs.push(s.sentinel);
|
|
7304
|
+
if (s.recoverAt !== void 0) refs.push(s.recoverAt);
|
|
7305
|
+
if (s.stopAt !== void 0) refs.push(s.stopAt);
|
|
7297
7306
|
refs.push(...s.skip);
|
|
7298
7307
|
}
|
|
7299
7308
|
for (const set of this.scanSkipSets) refs.push(...set);
|
|
@@ -7313,7 +7322,9 @@ var Encoder = class {
|
|
|
7313
7322
|
this.scans = this.scans.map((s) => ({
|
|
7314
7323
|
...s,
|
|
7315
7324
|
skip: s.skip.map(res),
|
|
7316
|
-
...s.sentinel === void 0 ? {} : { sentinel: res(s.sentinel) }
|
|
7325
|
+
...s.sentinel === void 0 ? {} : { sentinel: res(s.sentinel) },
|
|
7326
|
+
...s.recoverAt === void 0 ? {} : { recoverAt: res(s.recoverAt) },
|
|
7327
|
+
...s.stopAt === void 0 ? {} : { stopAt: res(s.stopAt) }
|
|
7317
7328
|
}));
|
|
7318
7329
|
this.scanSkipSets = this.scanSkipSets.map((set) => set.map(res));
|
|
7319
7330
|
}
|
|
@@ -10932,7 +10943,7 @@ function resolveScanSkip(explicitSkip, raw, ctx) {
|
|
|
10932
10943
|
out.push(...explicitSkip);
|
|
10933
10944
|
return out;
|
|
10934
10945
|
}
|
|
10935
|
-
function scanTo(sentinel, { skip, raw = false, orEOF = false } = {}) {
|
|
10946
|
+
function scanTo(sentinel, { skip, raw = false, orEOF = false, recoverAt, stopAt } = {}) {
|
|
10936
10947
|
const meta = {
|
|
10937
10948
|
firstSet: any(),
|
|
10938
10949
|
canMatchNewline: true,
|
|
@@ -10942,7 +10953,15 @@ function scanTo(sentinel, { skip, raw = false, orEOF = false } = {}) {
|
|
|
10942
10953
|
return {
|
|
10943
10954
|
_tag: "scanTo",
|
|
10944
10955
|
_meta: meta,
|
|
10945
|
-
_def: {
|
|
10956
|
+
_def: {
|
|
10957
|
+
tag: "scanTo",
|
|
10958
|
+
sentinel,
|
|
10959
|
+
skip: explicitSkip,
|
|
10960
|
+
raw,
|
|
10961
|
+
orEOF,
|
|
10962
|
+
...recoverAt === void 0 ? {} : { recoverAt },
|
|
10963
|
+
...stopAt === void 0 ? {} : { stopAt }
|
|
10964
|
+
},
|
|
10946
10965
|
parse(input, pos, ctx) {
|
|
10947
10966
|
let cur = pos;
|
|
10948
10967
|
const skip2 = resolveScanSkip(explicitSkip, raw, ctx);
|
|
@@ -10954,28 +10973,130 @@ function scanTo(sentinel, { skip, raw = false, orEOF = false } = {}) {
|
|
|
10954
10973
|
pushCstLeaf(ctx, leaf2);
|
|
10955
10974
|
}
|
|
10956
10975
|
};
|
|
10957
|
-
|
|
10958
|
-
|
|
10959
|
-
|
|
10976
|
+
if (recoverAt === void 0 && stopAt === void 0) {
|
|
10977
|
+
while (cur < input.length) {
|
|
10978
|
+
const s = sentinel.parse(input, cur, probeCtx);
|
|
10979
|
+
if (s.ok) {
|
|
10980
|
+
if (ctx.trackLines) recordLineRangeFromContext(ctx, input, pos, cur);
|
|
10981
|
+
emit(cur);
|
|
10982
|
+
return { ok: true, value: input.slice(pos, cur), span: { start: pos, end: cur } };
|
|
10983
|
+
}
|
|
10984
|
+
let advanced = false;
|
|
10985
|
+
for (const skipper of skip2) {
|
|
10986
|
+
const r = skipper.parse(input, cur, probeCtx);
|
|
10987
|
+
if (r.ok && r.span.end > cur) {
|
|
10988
|
+
cur = r.span.end;
|
|
10989
|
+
advanced = true;
|
|
10990
|
+
break;
|
|
10991
|
+
}
|
|
10992
|
+
}
|
|
10993
|
+
if (!advanced) cur++;
|
|
10994
|
+
}
|
|
10995
|
+
if (orEOF) {
|
|
10960
10996
|
if (ctx.trackLines) recordLineRangeFromContext(ctx, input, pos, cur);
|
|
10961
10997
|
emit(cur);
|
|
10962
10998
|
return { ok: true, value: input.slice(pos, cur), span: { start: pos, end: cur } };
|
|
10963
10999
|
}
|
|
11000
|
+
const sentDef2 = sentinel._def;
|
|
11001
|
+
const expected2 = sentDef2.tag === "literal" ? [JSON.stringify(sentDef2.value)] : ["sentinel"];
|
|
11002
|
+
return { ok: false, expected: expected2, span: { start: pos, end: cur } };
|
|
11003
|
+
}
|
|
11004
|
+
let recovery = -1;
|
|
11005
|
+
let firstSentinel = -1;
|
|
11006
|
+
let sentinelCount = 0;
|
|
11007
|
+
let recoveryErrorCount = -1;
|
|
11008
|
+
let sentinelErrorCount = -1;
|
|
11009
|
+
const succeed = (end) => {
|
|
11010
|
+
if (ctx.trackLines) recordLineRangeFromContext(ctx, input, pos, end);
|
|
11011
|
+
emit(end);
|
|
11012
|
+
return { ok: true, value: input.slice(pos, end), span: { start: pos, end } };
|
|
11013
|
+
};
|
|
11014
|
+
const recoveredEnd = () => {
|
|
11015
|
+
const acceptSentinel = firstSentinel >= 0 && (sentinelCount & 1) === 1;
|
|
11016
|
+
const errors = ctx._errors;
|
|
11017
|
+
if (errors !== void 0) {
|
|
11018
|
+
const keep = acceptSentinel ? sentinelErrorCount : recoveryErrorCount;
|
|
11019
|
+
if (keep >= 0 && errors.length > keep) errors.length = keep;
|
|
11020
|
+
}
|
|
11021
|
+
return acceptSentinel ? firstSentinel : recovery;
|
|
11022
|
+
};
|
|
11023
|
+
while (cur < input.length) {
|
|
11024
|
+
const sentinelProbeErrorCount = ctx._errors?.length ?? -1;
|
|
11025
|
+
const s = sentinel.parse(input, cur, probeCtx);
|
|
11026
|
+
const sentinelProbeErrors = ctx._errors;
|
|
11027
|
+
if (sentinelProbeErrors !== void 0 && sentinelProbeErrorCount >= 0 && sentinelProbeErrors.length > sentinelProbeErrorCount) {
|
|
11028
|
+
sentinelProbeErrors.length = sentinelProbeErrorCount;
|
|
11029
|
+
}
|
|
11030
|
+
if (s.ok) {
|
|
11031
|
+
if (recovery < 0) return succeed(cur);
|
|
11032
|
+
if (s.span.end <= cur) {
|
|
11033
|
+
throw new TypeError("scanTo recovery requires a sentinel that consumes input");
|
|
11034
|
+
}
|
|
11035
|
+
if (firstSentinel < 0) {
|
|
11036
|
+
firstSentinel = cur;
|
|
11037
|
+
sentinelErrorCount = sentinelProbeErrorCount;
|
|
11038
|
+
}
|
|
11039
|
+
sentinelCount++;
|
|
11040
|
+
cur = s.span.end;
|
|
11041
|
+
continue;
|
|
11042
|
+
}
|
|
11043
|
+
if (stopAt !== void 0) {
|
|
11044
|
+
const errorCount = ctx._errors?.length ?? -1;
|
|
11045
|
+
const stop = stopAt.parse(input, cur, probeCtx);
|
|
11046
|
+
const errors = ctx._errors;
|
|
11047
|
+
if (errors !== void 0 && errorCount >= 0 && errors.length > errorCount) {
|
|
11048
|
+
errors.length = errorCount;
|
|
11049
|
+
}
|
|
11050
|
+
if (stop.ok) {
|
|
11051
|
+
if (recovery < 0) {
|
|
11052
|
+
recovery = cur;
|
|
11053
|
+
recoveryErrorCount = errorCount;
|
|
11054
|
+
}
|
|
11055
|
+
return succeed(recoveredEnd());
|
|
11056
|
+
}
|
|
11057
|
+
}
|
|
10964
11058
|
let advanced = false;
|
|
10965
11059
|
for (const skipper of skip2) {
|
|
11060
|
+
const errorCount = ctx._errors?.length ?? -1;
|
|
10966
11061
|
const r = skipper.parse(input, cur, probeCtx);
|
|
10967
11062
|
if (r.ok && r.span.end > cur) {
|
|
10968
11063
|
cur = r.span.end;
|
|
10969
11064
|
advanced = true;
|
|
10970
11065
|
break;
|
|
10971
11066
|
}
|
|
11067
|
+
const errors = ctx._errors;
|
|
11068
|
+
if (errors !== void 0 && errorCount >= 0 && errors.length > errorCount) {
|
|
11069
|
+
errors.length = errorCount;
|
|
11070
|
+
}
|
|
11071
|
+
}
|
|
11072
|
+
if (advanced) continue;
|
|
11073
|
+
if (recoverAt !== void 0) {
|
|
11074
|
+
const errorCount = ctx._errors?.length ?? -1;
|
|
11075
|
+
const recover = recoverAt.parse(input, cur, probeCtx);
|
|
11076
|
+
const errors = ctx._errors;
|
|
11077
|
+
if (errors !== void 0 && errorCount >= 0 && errors.length > errorCount) {
|
|
11078
|
+
errors.length = errorCount;
|
|
11079
|
+
}
|
|
11080
|
+
if (recover.ok) {
|
|
11081
|
+
if (recover.span.end <= cur) {
|
|
11082
|
+
throw new TypeError("scanTo recoverAt must consume input");
|
|
11083
|
+
}
|
|
11084
|
+
if (recovery < 0) {
|
|
11085
|
+
recovery = cur;
|
|
11086
|
+
recoveryErrorCount = errorCount;
|
|
11087
|
+
}
|
|
11088
|
+
if (firstSentinel >= 0 && (sentinelCount & 1) === 1) {
|
|
11089
|
+
return succeed(recoveredEnd());
|
|
11090
|
+
}
|
|
11091
|
+
cur = recover.span.end;
|
|
11092
|
+
continue;
|
|
11093
|
+
}
|
|
10972
11094
|
}
|
|
10973
|
-
|
|
11095
|
+
cur++;
|
|
10974
11096
|
}
|
|
11097
|
+
if (recovery >= 0) return succeed(recoveredEnd());
|
|
10975
11098
|
if (orEOF) {
|
|
10976
|
-
|
|
10977
|
-
emit(cur);
|
|
10978
|
-
return { ok: true, value: input.slice(pos, cur), span: { start: pos, end: cur } };
|
|
11099
|
+
return succeed(cur);
|
|
10979
11100
|
}
|
|
10980
11101
|
const sentDef = sentinel._def;
|
|
10981
11102
|
const expected = sentDef.tag === "literal" ? [JSON.stringify(sentDef.value)] : ["sentinel"];
|
|
@@ -11263,6 +11384,8 @@ function assemble(t2, prog, cfg) {
|
|
|
11263
11384
|
for (const s of prog.scans ?? []) {
|
|
11264
11385
|
for (const r of s.skip) labelExtraIps.push(r[0]);
|
|
11265
11386
|
if (s.sentinel !== void 0) labelExtraIps.push(s.sentinel[0]);
|
|
11387
|
+
if (s.recoverAt !== void 0) labelExtraIps.push(s.recoverAt[0]);
|
|
11388
|
+
if (s.stopAt !== void 0) labelExtraIps.push(s.stopAt[0]);
|
|
11266
11389
|
}
|
|
11267
11390
|
for (const set of prog.scanSkip ?? []) for (const r of set) labelExtraIps.push(r[0]);
|
|
11268
11391
|
const closureLabels = computeSiteLabels(
|
|
@@ -13948,6 +14071,8 @@ function assemble(t2, prog, cfg) {
|
|
|
13948
14071
|
for (const s of prog.scans ?? []) {
|
|
13949
14072
|
for (const r of s.skip) extraIps.push(r[0]);
|
|
13950
14073
|
if (s.sentinel !== void 0) extraIps.push(s.sentinel[0]);
|
|
14074
|
+
if (s.recoverAt !== void 0) extraIps.push(s.recoverAt[0]);
|
|
14075
|
+
if (s.stopAt !== void 0) extraIps.push(s.stopAt[0]);
|
|
13951
14076
|
}
|
|
13952
14077
|
for (const set of prog.scanSkip ?? []) for (const r of set) extraIps.push(r[0]);
|
|
13953
14078
|
const roots = [...Object.values(prog.rules), ...extraIps];
|
|
@@ -14159,7 +14284,13 @@ function assemble(t2, prog, cfg) {
|
|
|
14159
14284
|
continue;
|
|
14160
14285
|
}
|
|
14161
14286
|
const sentDef = typeof s.sent === "string" ? { tag: "literal", value: s.sent, caseInsensitive: false } : void 0;
|
|
14162
|
-
scansArr.push(scanTo(subtreeComb(s.sentinel, sentDef), {
|
|
14287
|
+
scansArr.push(scanTo(subtreeComb(s.sentinel, sentDef), {
|
|
14288
|
+
skip,
|
|
14289
|
+
raw,
|
|
14290
|
+
orEOF: (s.flags & 2) !== 0,
|
|
14291
|
+
...s.recoverAt === void 0 ? {} : { recoverAt: subtreeComb(s.recoverAt) },
|
|
14292
|
+
...s.stopAt === void 0 ? {} : { stopAt: subtreeComb(s.stopAt) }
|
|
14293
|
+
}));
|
|
14163
14294
|
}
|
|
14164
14295
|
const scans = scansArr;
|
|
14165
14296
|
const scanSkip = (prog.scanSkip ?? []).map((set) => set.map((r) => subtreeComb(r)));
|
|
@@ -14376,6 +14507,8 @@ function emitRef(r) {
|
|
|
14376
14507
|
function emitScanSpec(s) {
|
|
14377
14508
|
const parts = [`kind:${s.kind}`, `flags:${s.flags}`, `skip:[${s.skip.map(emitRef).join(",")}]`];
|
|
14378
14509
|
if (s.sentinel !== void 0) parts.push(`sentinel:${emitRef(s.sentinel)}`);
|
|
14510
|
+
if (s.recoverAt !== void 0) parts.push(`recoverAt:${emitRef(s.recoverAt)}`);
|
|
14511
|
+
if (s.stopAt !== void 0) parts.push(`stopAt:${emitRef(s.stopAt)}`);
|
|
14379
14512
|
if (s.sent !== void 0) parts.push(`sent:${s.sent === null ? "null" : jsString(s.sent)}`);
|
|
14380
14513
|
if (s.open !== void 0) parts.push(`open:${jsString(s.open)}`);
|
|
14381
14514
|
if (s.close !== void 0) parts.push(`close:${jsString(s.close)}`);
|
|
@@ -14391,6 +14524,8 @@ function emitAssemblies(prog, cfgs) {
|
|
|
14391
14524
|
for (const s of prog.scans ?? []) {
|
|
14392
14525
|
for (const r of s.skip) extraIps.push(r[0]);
|
|
14393
14526
|
if (s.sentinel !== void 0) extraIps.push(s.sentinel[0]);
|
|
14527
|
+
if (s.recoverAt !== void 0) extraIps.push(s.recoverAt[0]);
|
|
14528
|
+
if (s.stopAt !== void 0) extraIps.push(s.stopAt[0]);
|
|
14394
14529
|
}
|
|
14395
14530
|
for (const set of prog.scanSkip ?? []) for (const r of set) extraIps.push(r[0]);
|
|
14396
14531
|
const out = [];
|
|
@@ -14533,7 +14668,12 @@ function children(def, winners) {
|
|
|
14533
14668
|
case "sepBy":
|
|
14534
14669
|
return [def.parser, def.separator];
|
|
14535
14670
|
case "scanTo":
|
|
14536
|
-
return [
|
|
14671
|
+
return [
|
|
14672
|
+
def.sentinel,
|
|
14673
|
+
...def.skip,
|
|
14674
|
+
...def.recoverAt === void 0 ? [] : [def.recoverAt],
|
|
14675
|
+
...def.stopAt === void 0 ? [] : [def.stopAt]
|
|
14676
|
+
];
|
|
14537
14677
|
case "lazy": {
|
|
14538
14678
|
let resolved;
|
|
14539
14679
|
try {
|
|
@@ -14646,7 +14786,7 @@ function payloadKey(p, d) {
|
|
|
14646
14786
|
case "expect":
|
|
14647
14787
|
return `expect\0${d.label ?? ""}\0${d.expected.join("")}`;
|
|
14648
14788
|
case "scanTo":
|
|
14649
|
-
return `scanTo\0${d.raw}\0${d.orEOF}`;
|
|
14789
|
+
return `scanTo\0${d.raw}\0${d.orEOF}\0${d.recoverAt !== void 0}\0${d.stopAt !== void 0}`;
|
|
14650
14790
|
case "guard":
|
|
14651
14791
|
return `guard\0${fnKey(d.predSrc, d.predicate)}`;
|
|
14652
14792
|
case "adjacency":
|
|
@@ -14761,8 +14901,12 @@ function segment(d, index) {
|
|
|
14761
14901
|
return index === 0 ? "sepBy.item" : "sepBy.sep";
|
|
14762
14902
|
case "recover":
|
|
14763
14903
|
return index === 0 ? "recover.body" : "recover.sentinel";
|
|
14764
|
-
case "scanTo":
|
|
14765
|
-
|
|
14904
|
+
case "scanTo": {
|
|
14905
|
+
if (index === 0) return "scanTo.sentinel";
|
|
14906
|
+
if (index <= d.skip.length) return `scanTo.skip[${index - 1}]`;
|
|
14907
|
+
if (d.recoverAt !== void 0 && index === d.skip.length + 1) return "scanTo.recoverAt";
|
|
14908
|
+
return "scanTo.stopAt";
|
|
14909
|
+
}
|
|
14766
14910
|
default:
|
|
14767
14911
|
return d.tag;
|
|
14768
14912
|
}
|
|
@@ -16290,7 +16434,7 @@ function subtreeContains(p, targets) {
|
|
|
16290
16434
|
const kids = [];
|
|
16291
16435
|
if (Array.isArray(rec.parsers)) kids.push(...rec.parsers);
|
|
16292
16436
|
if (Array.isArray(rec.skip)) kids.push(...rec.skip);
|
|
16293
|
-
for (const k of ["parser", "main", "skipped", "separator", "sentinel", "selector", "otherwise", "fallback", "triviaParser"])
|
|
16437
|
+
for (const k of ["parser", "main", "skipped", "separator", "sentinel", "recoverAt", "stopAt", "selector", "otherwise", "fallback", "triviaParser"])
|
|
16294
16438
|
if (rec[k]) kids.push(rec[k]);
|
|
16295
16439
|
if (d.tag === "dispatch") {
|
|
16296
16440
|
for (const c2 of d.cases) kids.push(c2.parser);
|