parseman 0.50.5 → 0.50.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/analysis/diagnostics.js +49 -46
- package/dist/analysis/diagnostics.js.map +2 -2
- package/dist/cli/index.js +49 -46
- package/dist/cli/index.js.map +2 -2
- package/dist/combinators/first-set.d.ts +2 -26
- package/dist/combinators/first-set.d.ts.map +1 -1
- package/dist/compiler/token-capability.js +38 -27
- package/dist/compiler/token-capability.js.map +1 -1
- package/dist/index.js +50 -47
- package/dist/index.js.map +2 -2
- package/dist/plugin/evaluator.d.ts.map +1 -1
- package/dist/plugin/index.js +53 -47
- package/dist/plugin/index.js.map +2 -2
- package/dist/spec/index.js +37 -36
- package/dist/spec/index.js.map +2 -2
- package/dist/table/encode.d.ts.map +1 -1
- package/dist/table/index.js +49 -46
- package/dist/table/index.js.map +2 -2
- package/dist/version.d.ts +1 -1
- package/package.json +1 -1
- package/src/combinators/first-set.ts +58 -36
- package/src/plugin/evaluator.ts +13 -0
- package/src/table/encode.ts +10 -8
- package/src/version.ts +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"evaluator.d.ts","sourceRoot":"","sources":["../../src/plugin/evaluator.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,EACV,UAAU,EAAE,IAAI,EAMjB,MAAM,oBAAoB,CAAA;AAC3B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAG7C,OAAO,EAAS,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAInE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAmG5D,qFAAqF;AACrF,wBAAgB,kBAAkB,CAAC,CAAC,EAAE,eAAe,GAAG,IAAI,EAAE,WAAW,GAAE,MAAM,GAAG,IAAW,GAAG,IAAI,CAGrG;AAED;;;;;;GAMG;AACH,MAAM,MAAM,qBAAqB,GAAG,CAAC,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CAQrB;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAClC,QAAQ,EAAE,UAAU,EACpB,KAAK,EAAE,KAAK,EACZ,IAAI,EAAE,MAAM,GACX,OAAO,CAoBT;AAED,kFAAkF;AAClF,wBAAgB,aAAa,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,KAAK,GAAG,OAAO,CAcnF"}
|
package/dist/plugin/index.js
CHANGED
|
@@ -7,14 +7,14 @@ import { ResolverFactory } from "oxc-resolver";
|
|
|
7
7
|
import MagicString from "magic-string";
|
|
8
8
|
|
|
9
9
|
// src/combinators/first-set.ts
|
|
10
|
-
function classifyFinalChoice(arms, resolve3) {
|
|
10
|
+
function classifyFinalChoice(arms, resolve3, activeTrivia) {
|
|
11
11
|
const firstSets = [];
|
|
12
12
|
const nullable2 = [];
|
|
13
13
|
let exclusive = true;
|
|
14
14
|
for (const arm of arms) {
|
|
15
15
|
const empty2 = matchesEmpty(arm, /* @__PURE__ */ new Set(), resolve3);
|
|
16
16
|
nullable2.push(empty2);
|
|
17
|
-
firstSets.push(empty2 ? { kind: "any" } : firstSetOf(arm, /* @__PURE__ */ new Set(), resolve3));
|
|
17
|
+
firstSets.push(empty2 ? { kind: "any" } : firstSetOf(arm, /* @__PURE__ */ new Set(), resolve3, activeTrivia));
|
|
18
18
|
if (empty2) exclusive = false;
|
|
19
19
|
}
|
|
20
20
|
if (exclusive) {
|
|
@@ -75,7 +75,7 @@ function intersects(a, b) {
|
|
|
75
75
|
return false;
|
|
76
76
|
}
|
|
77
77
|
function fromChar(code) {
|
|
78
|
-
return
|
|
78
|
+
return fromRange(code, code);
|
|
79
79
|
}
|
|
80
80
|
function startsFirstSet(combinator, input, pos) {
|
|
81
81
|
const fs3 = combinator._meta.firstSet;
|
|
@@ -168,11 +168,10 @@ function matchesEmptyBody(p, seen, resolve3) {
|
|
|
168
168
|
}
|
|
169
169
|
}
|
|
170
170
|
function isZeroWidthAssertion(p) {
|
|
171
|
-
|
|
172
|
-
return tag === "not" || tag === "adjacency";
|
|
171
|
+
return p._tag === "not" || p._tag === "adjacency";
|
|
173
172
|
}
|
|
174
173
|
function isPositiveLookahead(p) {
|
|
175
|
-
return p.
|
|
174
|
+
return p._tag === "peek";
|
|
176
175
|
}
|
|
177
176
|
function narrowBy(acc, constraint) {
|
|
178
177
|
if (constraint.kind === "any") return acc;
|
|
@@ -188,34 +187,42 @@ function narrowBy(acc, constraint) {
|
|
|
188
187
|
return ranges.length === 0 ? { kind: "empty" } : { kind: "ranges", ranges };
|
|
189
188
|
}
|
|
190
189
|
function applyAssertion(fs3, assertion) {
|
|
191
|
-
|
|
192
|
-
if (fs3.kind === "empty") return assertion;
|
|
193
|
-
return narrowBy(fs3, assertion) ?? fs3;
|
|
190
|
+
return assertion === null ? fs3 : fs3.kind === "empty" ? assertion : narrowBy(fs3, assertion);
|
|
194
191
|
}
|
|
195
|
-
function
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
192
|
+
function sequenceSet(parsers, fs3, empties, trivia2) {
|
|
193
|
+
const afterBoundary = (i) => {
|
|
194
|
+
const rest = at(i);
|
|
195
|
+
return trivia2 ? union(rest, fs3(trivia2)) : rest;
|
|
196
|
+
};
|
|
197
|
+
const at = (i) => {
|
|
198
|
+
const p = parsers[i];
|
|
199
199
|
if (isPositiveLookahead(p)) {
|
|
200
|
-
|
|
201
|
-
|
|
200
|
+
const constraint = fs3(p);
|
|
201
|
+
return i + 1 === parsers.length ? constraint : applyAssertion(afterBoundary(i + 1), constraint);
|
|
202
202
|
}
|
|
203
|
-
if (
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
203
|
+
if (isZeroWidthAssertion(p)) {
|
|
204
|
+
return i + 1 === parsers.length ? empty() : afterBoundary(i + 1);
|
|
205
|
+
}
|
|
206
|
+
const first = fs3(p);
|
|
207
|
+
if (!empties(p) || i + 1 === parsers.length) return first;
|
|
208
|
+
return union(first, afterBoundary(i + 1));
|
|
209
|
+
};
|
|
210
|
+
return at(0);
|
|
211
|
+
}
|
|
212
|
+
function sequenceFirstSet(parsers) {
|
|
213
|
+
return sequenceSet(parsers, (p) => p._meta.firstSet, matchesEmpty);
|
|
207
214
|
}
|
|
208
|
-
function firstSetOf(p, seen = /* @__PURE__ */ new Set(), resolve3) {
|
|
215
|
+
function firstSetOf(p, seen = /* @__PURE__ */ new Set(), resolve3, activeTrivia) {
|
|
209
216
|
if (seen.has(p)) return any();
|
|
210
217
|
seen.add(p);
|
|
211
218
|
try {
|
|
212
|
-
return firstSetBody(p, seen, resolve3);
|
|
219
|
+
return firstSetBody(p, seen, resolve3, activeTrivia);
|
|
213
220
|
} finally {
|
|
214
221
|
seen.delete(p);
|
|
215
222
|
}
|
|
216
223
|
}
|
|
217
|
-
function firstSetBody(p, seen, resolve3) {
|
|
218
|
-
const fs3 = (c) => firstSetOf(c, seen, resolve3);
|
|
224
|
+
function firstSetBody(p, seen, resolve3, activeTrivia) {
|
|
225
|
+
const fs3 = (c) => firstSetOf(c, seen, resolve3, activeTrivia);
|
|
219
226
|
const empties = (c) => matchesEmpty(c, /* @__PURE__ */ new Set(), resolve3);
|
|
220
227
|
const d = p._def;
|
|
221
228
|
switch (d.tag) {
|
|
@@ -241,17 +248,7 @@ function firstSetBody(p, seen, resolve3) {
|
|
|
241
248
|
return out;
|
|
242
249
|
}
|
|
243
250
|
case "sequence": {
|
|
244
|
-
|
|
245
|
-
let assertion = null;
|
|
246
|
-
for (const term of d.parsers) {
|
|
247
|
-
if (isPositiveLookahead(term)) {
|
|
248
|
-
assertion = narrowBy(assertion, fs3(term));
|
|
249
|
-
continue;
|
|
250
|
-
}
|
|
251
|
-
if (!isZeroWidthAssertion(term)) out = union(out, fs3(term));
|
|
252
|
-
if (!empties(term)) return applyAssertion(out, assertion);
|
|
253
|
-
}
|
|
254
|
-
return applyAssertion(out, assertion);
|
|
251
|
+
return sequenceSet(d.parsers, fs3, empties, activeTrivia);
|
|
255
252
|
}
|
|
256
253
|
case "peek": {
|
|
257
254
|
const inner = d.parser;
|
|
@@ -266,12 +263,16 @@ function firstSetBody(p, seen, resolve3) {
|
|
|
266
263
|
case "token":
|
|
267
264
|
case "leaf":
|
|
268
265
|
case "node":
|
|
269
|
-
case "grammar":
|
|
270
|
-
case "expect":
|
|
271
|
-
return fs3(d.parser);
|
|
272
266
|
case "sepBy":
|
|
267
|
+
case "expect":
|
|
273
268
|
return fs3(d.parser);
|
|
274
|
-
|
|
269
|
+
case "grammar":
|
|
270
|
+
return firstSetOf(
|
|
271
|
+
d.parser,
|
|
272
|
+
seen,
|
|
273
|
+
resolve3,
|
|
274
|
+
d.clearTrivia ? null : d.triviaParser ?? activeTrivia
|
|
275
|
+
);
|
|
275
276
|
default:
|
|
276
277
|
return p._meta.firstSet;
|
|
277
278
|
}
|
|
@@ -7118,7 +7119,9 @@ var Encoder = class {
|
|
|
7118
7119
|
followClass(parsers, i) {
|
|
7119
7120
|
let fs3 = { kind: "empty" };
|
|
7120
7121
|
const rr = this.refResolver();
|
|
7121
|
-
for (let j = i + 1; j < parsers.length; j++)
|
|
7122
|
+
for (let j = i + 1; j < parsers.length; j++) {
|
|
7123
|
+
fs3 = union(fs3, firstSetOf(parsers[j], /* @__PURE__ */ new Set(), rr, this.activeTrivia));
|
|
7124
|
+
}
|
|
7122
7125
|
return this.charClass(fs3);
|
|
7123
7126
|
}
|
|
7124
7127
|
constant(v) {
|
|
@@ -7335,7 +7338,7 @@ var Encoder = class {
|
|
|
7335
7338
|
*/
|
|
7336
7339
|
subtree(c) {
|
|
7337
7340
|
const ip = this.node(c).ip;
|
|
7338
|
-
const fs3 = firstSetOf(c, /* @__PURE__ */ new Set(), this.refResolver());
|
|
7341
|
+
const fs3 = firstSetOf(c, /* @__PURE__ */ new Set(), this.refResolver(), this.activeTrivia);
|
|
7339
7342
|
return [ip, fs3.kind === "empty" ? -2 : this.charClass(fs3)];
|
|
7340
7343
|
}
|
|
7341
7344
|
/** Pool one scan spec. One per combinator: `node()` memoizes by identity. */
|
|
@@ -7554,12 +7557,12 @@ var Encoder = class {
|
|
|
7554
7557
|
return this.covWrap(gated, armCovIds?.[src], 1);
|
|
7555
7558
|
});
|
|
7556
7559
|
const rr = this.refResolver();
|
|
7557
|
-
const finalChoice = classifyFinalChoice(arms, rr);
|
|
7560
|
+
const finalChoice = classifyFinalChoice(arms, rr, this.activeTrivia);
|
|
7558
7561
|
const transactionalFirst = arms.map((arm, i) => {
|
|
7559
7562
|
if (!finalChoice.nullable[i]) return void 0;
|
|
7560
7563
|
const def = arm._def;
|
|
7561
7564
|
if (def.tag !== "attempt" || matchesEmpty(def.parser, /* @__PURE__ */ new Set(), rr)) return void 0;
|
|
7562
|
-
return firstSetOf(def.parser, /* @__PURE__ */ new Set(), rr);
|
|
7565
|
+
return firstSetOf(def.parser, /* @__PURE__ */ new Set(), rr, this.activeTrivia);
|
|
7563
7566
|
});
|
|
7564
7567
|
const gateFirst = finalChoice.firstSets.map((first, i) => transactionalFirst[i] ?? first);
|
|
7565
7568
|
const classes = gateFirst.map((first, i) => finalChoice.nullable[i] && transactionalFirst[i] === void 0 ? -1 : this.charClass(first));
|
|
@@ -7606,7 +7609,7 @@ var Encoder = class {
|
|
|
7606
7609
|
case "oneOrMore": {
|
|
7607
7610
|
const child = this.node(d.parser).ip;
|
|
7608
7611
|
const rr = this.refResolver();
|
|
7609
|
-
const itemClass = matchesEmpty(d.parser, /* @__PURE__ */ new Set(), rr) ? -1 : this.existingCharClass(firstSetOf(d.parser, /* @__PURE__ */ new Set(), rr));
|
|
7612
|
+
const itemClass = matchesEmpty(d.parser, /* @__PURE__ */ new Set(), rr) ? -1 : this.existingCharClass(firstSetOf(d.parser, /* @__PURE__ */ new Set(), rr, this.activeTrivia));
|
|
7610
7613
|
const op = d.valueUnused ? OP_REPV : OP_REP;
|
|
7611
7614
|
const min = d.tag === "many" ? 0 : d.min;
|
|
7612
7615
|
return this.rec ? this.emit(op, child, min, d.max ?? -1, -1, 0, this.expected(deriveExpected(d.parser)), itemClass) : this.emit(op, child, min, d.max ?? -1, -1, 0);
|
|
@@ -7624,7 +7627,7 @@ var Encoder = class {
|
|
|
7624
7627
|
sep2,
|
|
7625
7628
|
flags,
|
|
7626
7629
|
this.expected(deriveExpected(d.parser)),
|
|
7627
|
-
this.charClass(firstSetOf(d.separator, /* @__PURE__ */ new Set(), this.refResolver()))
|
|
7630
|
+
this.charClass(firstSetOf(d.separator, /* @__PURE__ */ new Set(), this.refResolver(), this.activeTrivia))
|
|
7628
7631
|
);
|
|
7629
7632
|
}
|
|
7630
7633
|
return d.min >= 2 ? this.emit(OP_REP, child, d.min, d.max ?? -1, sep2, flags, this.expected(deriveExpected(d.parser))) : this.emit(OP_REP, child, d.min, d.max ?? -1, sep2, flags);
|
|
@@ -7679,7 +7682,7 @@ var Encoder = class {
|
|
|
7679
7682
|
d.tags === void 0 ? -1 : this.constant(d.tags)
|
|
7680
7683
|
);
|
|
7681
7684
|
if (matchesEmpty(d.parser)) return body;
|
|
7682
|
-
const fs3 = d.parser._def.tag === "lazy" ? firstSetOf(d.parser, /* @__PURE__ */ new Set(), this.refResolver()) : d.parser._meta.firstSet;
|
|
7685
|
+
const fs3 = d.parser._def.tag === "lazy" ? firstSetOf(d.parser, /* @__PURE__ */ new Set(), this.refResolver(), this.activeTrivia) : d.parser._meta.firstSet;
|
|
7683
7686
|
if (fs3.kind === "any") return body;
|
|
7684
7687
|
const cls = this.charClass(fs3);
|
|
7685
7688
|
if (cls < 0) return body;
|
|
@@ -7793,7 +7796,7 @@ var Encoder = class {
|
|
|
7793
7796
|
case "attempt": {
|
|
7794
7797
|
const inner = this.emit(OP_ATTEMPT, this.node(d.parser).ip);
|
|
7795
7798
|
if (!this.failureNeedsRollback(d.parser, void 0)) this.failureRollbackCleanSites.add(inner);
|
|
7796
|
-
const fs3 = d.parser._def.tag === "lazy" ? firstSetOf(d.parser, /* @__PURE__ */ new Set(), this.refResolver()) : d.parser._meta.firstSet;
|
|
7799
|
+
const fs3 = d.parser._def.tag === "lazy" ? firstSetOf(d.parser, /* @__PURE__ */ new Set(), this.refResolver(), this.activeTrivia) : d.parser._meta.firstSet;
|
|
7797
7800
|
if (fs3.kind === "any" || matchesEmpty(d.parser)) return inner;
|
|
7798
7801
|
const cls = this.charClass(fs3);
|
|
7799
7802
|
if (cls < 0) return inner;
|
|
@@ -16968,7 +16971,7 @@ function compileRuleMap(ruleMap, opts = {}) {
|
|
|
16968
16971
|
}
|
|
16969
16972
|
|
|
16970
16973
|
// src/version.ts
|
|
16971
|
-
var PARSEMAN_VERSION = "0.50.
|
|
16974
|
+
var PARSEMAN_VERSION = "0.50.7";
|
|
16972
16975
|
|
|
16973
16976
|
// src/compiler/compile-linkable-table.ts
|
|
16974
16977
|
function isLocal(rule) {
|
|
@@ -17766,6 +17769,9 @@ function exprToCombi(node2, scope, code, mfs) {
|
|
|
17766
17769
|
if (prov) carriedImports.push({ local: name, source: prov.source, imported: prov.imported });
|
|
17767
17770
|
else unresolved.push(name);
|
|
17768
17771
|
}
|
|
17772
|
+
} else if (be.type === "Identifier" && typeof be.name === "string" && combi._def.buildSrc === be.name) {
|
|
17773
|
+
const prov = _builderImports?.(be.name) ?? null;
|
|
17774
|
+
if (prov) carriedImports.push({ local: be.name, source: prov.source, imported: prov.imported });
|
|
17769
17775
|
}
|
|
17770
17776
|
const staticError = [...report.structural, ...unresolved];
|
|
17771
17777
|
if (staticError.length > 0) combi._def.buildStaticError = staticError;
|