parseman 0.60.4 → 0.60.6
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/commitment.d.ts.map +1 -1
- package/dist/analysis/diagnostics.js +31 -5
- package/dist/analysis/diagnostics.js.map +1 -1
- package/dist/cli/index.js +639 -613
- package/dist/cli/index.js.map +3 -3
- package/dist/combinators/parser.d.ts +34 -3
- package/dist/combinators/parser.d.ts.map +1 -1
- package/dist/combinators/trivia-boundary.d.ts +5 -3
- package/dist/combinators/trivia-boundary.d.ts.map +1 -1
- package/dist/compiler/compile-linkable-table.d.ts.map +1 -1
- package/dist/compiler/linker.d.ts +11 -3
- package/dist/compiler/linker.d.ts.map +1 -1
- package/dist/compiler/token-capability.js +6 -0
- package/dist/compiler/token-capability.js.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +93 -25
- package/dist/index.js.map +1 -1
- package/dist/plugin/evaluator.d.ts +3 -1
- package/dist/plugin/evaluator.d.ts.map +1 -1
- package/dist/plugin/index.d.ts.map +1 -1
- package/dist/plugin/index.js +116 -75
- package/dist/plugin/index.js.map +1 -1
- package/dist/spec/index.js +3 -1
- package/dist/spec/index.js.map +1 -1
- package/dist/spec/model.d.ts.map +1 -1
- package/dist/table/assemble.d.ts.map +1 -1
- package/dist/table/emit-assembly.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 +31 -5
- package/dist/table/index.js.map +1 -1
- package/dist/table/ops.d.ts +6 -0
- package/dist/table/ops.d.ts.map +1 -1
- package/dist/version.d.ts +1 -1
- package/package.json +1 -1
- package/src/analysis/commitment.ts +3 -1
- package/src/combinators/grammar.ts +1 -1
- package/src/combinators/parser.ts +82 -9
- package/src/combinators/trivia-boundary.ts +11 -3
- package/src/compiler/compile-linkable-table.ts +4 -1
- package/src/compiler/ir-serialize.ts +10 -4
- package/src/compiler/linker.ts +22 -12
- package/src/index.ts +2 -1
- package/src/plugin/evaluator.ts +16 -5
- package/src/plugin/index.ts +27 -104
- package/src/spec/model.ts +3 -1
- package/src/table/assemble.ts +11 -1
- package/src/table/emit-assembly.ts +10 -1
- package/src/table/encode.ts +16 -9
- package/src/table/exec.ts +11 -9
- package/src/table/ops.ts +6 -0
- package/src/table/site-labels.ts +3 -3
- package/src/version.ts +1 -1
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import type { Expression, Node } from '@oxc-project/types';
|
|
9
9
|
import type { Combinator } from '../types.ts';
|
|
10
|
-
import { type RulesOptions } from '../combinators/parser.ts';
|
|
10
|
+
import { type RulesOptions, type RulesRecipe } from '../combinators/parser.ts';
|
|
11
11
|
import type { ReducerResolver } from './reducer-resolver.ts';
|
|
12
12
|
/** Install (or clear, with `null`) the resolver for the module being transformed. */
|
|
13
13
|
export declare function setReducerResolver(r: ReducerResolver | null, entrySource?: string | null): void;
|
|
@@ -143,6 +143,8 @@ out?: {
|
|
|
143
143
|
* (`parser.ts:228-242`), which the macro's stamp-only copy never did.
|
|
144
144
|
*/
|
|
145
145
|
options?: RulesOptions): Map<string, Combinator<unknown>> | null;
|
|
146
|
+
/** The recipe an evaluated rule map came from, for a composition that links it. */
|
|
147
|
+
export declare const ruleMapRecipes: WeakMap<ReadonlyMap<string, Combinator<unknown>>, readonly RulesRecipe[]>;
|
|
146
148
|
/**
|
|
147
149
|
* Every EXTERNAL name an evaluated factory read through `g`, keyed by the map
|
|
148
150
|
* `evaluateParserFactory` returned. The map holds declared rules only, so a `g.X`
|
|
@@ -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,MAA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C,EAAE,OAAO,CAAA;IAClB;8CAC0C;IAC1C,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB;;;;;;;;OAQG;IACH,eAAe,CAAC,EAAE,eAAe,CAAA;IACjC;;;;;;OAMG;IACH,cAAc,CAAC,EAAE,MAAM,CAAA;CACxB,CAAA;AAED,wFAAwF;AACxF,MAAM,MAAM,eAAe,GAAG;IAC5B;qDACiD;IACjD,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,sCAAsC;IACtC,QAAQ,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAA;CAClC,CAAA;;;AAgkBD,MAAM,MAAM,oBAAoB,GAAG;IACjC,IAAI,EAAE,MAAM,CAAA;IACZ,GAAG,EAAE,UAAU,CAAC,WAAW,CAAC,aAAa,CAAC,CAAC,CAAA;IAC3C,kFAAkF;IAClF,QAAQ,EAAE,MAAM,EAAE,CAAA;CACnB,CAAA;AA0CD;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,cAAc,CAC5B,IAAI,EAAE,MAAM,EACZ,EAAE,EAAE,MAAM,EACV,aAAa,cAA6B,EAC1C,kBAAkB,UAAQ,EAC1B,QAAQ,UAAQ,EAChB,eAAe,UAAQ,EACvB,eAAe,CAAC,EAAE,eAAe,EACjC,cAAc,SAA0B,EACxC,WAAW,CAAC,EAAE,WAAW,GACxB,oBAAoB,GAAG,IAAI,CAW7B"}
|
package/dist/plugin/index.js
CHANGED
|
@@ -48,6 +48,12 @@ function hasOwnTriviaBoundary(p, depth = MAX_DEPTH) {
|
|
|
48
48
|
case "oneOrMore":
|
|
49
49
|
case "sepBy":
|
|
50
50
|
return true;
|
|
51
|
+
// A scope that names or clears trivia keeps an outer install out of its body.
|
|
52
|
+
// Any other inherits, so it falls through at no cost in depth: line tracking
|
|
53
|
+
// wraps every rule in one, and must not change what this walk sees.
|
|
54
|
+
case "grammar":
|
|
55
|
+
if (d.triviaParser || d.clearTrivia) return false;
|
|
56
|
+
depth++;
|
|
51
57
|
// Transparent wrappers — they add no position, so ask what they wrap.
|
|
52
58
|
case "node":
|
|
53
59
|
case "transform":
|
|
@@ -1782,7 +1788,7 @@ function parser(opts, root) {
|
|
|
1782
1788
|
ctx.triviaKindLabels = void 0;
|
|
1783
1789
|
} else if (scopeTrivia !== void 0) {
|
|
1784
1790
|
ctx.trivia = scopeTrivia;
|
|
1785
|
-
|
|
1791
|
+
ctx.triviaKindLabels = scopeLabels;
|
|
1786
1792
|
}
|
|
1787
1793
|
if (forceCaptureTrivia || _ctx?.captureTrivia) ctx.captureTrivia = true;
|
|
1788
1794
|
if (ownCaptureMask !== void 0) ctx._triviaCaptureMask = ownCaptureMask;
|
|
@@ -1926,11 +1932,16 @@ function tagRule(r, key) {
|
|
|
1926
1932
|
function isDefinableRef(v) {
|
|
1927
1933
|
return !!v && typeof v === "object" && "_def" in v && v._def.tag === "lazy" && typeof v.define === "function";
|
|
1928
1934
|
}
|
|
1935
|
+
function priorNameOf(r) {
|
|
1936
|
+
return r._priorOf;
|
|
1937
|
+
}
|
|
1929
1938
|
function ruleNameOf(r) {
|
|
1930
1939
|
return r._ruleName;
|
|
1931
1940
|
}
|
|
1932
1941
|
function isNamedRuleRefForAnotherRule(r, key) {
|
|
1933
|
-
|
|
1942
|
+
if (r._def.tag !== "lazy") return false;
|
|
1943
|
+
if (priorNameOf(r) !== void 0) return true;
|
|
1944
|
+
const name = ruleNameOf(r);
|
|
1934
1945
|
return name !== void 0 && name !== key;
|
|
1935
1946
|
}
|
|
1936
1947
|
var claimedRules = /* @__PURE__ */ new WeakSet();
|
|
@@ -1943,6 +1954,20 @@ function ownRule(p, copies) {
|
|
|
1943
1954
|
}
|
|
1944
1955
|
return own;
|
|
1945
1956
|
}
|
|
1957
|
+
var priorUnfilled = (key) => new Error(`compose: prior.${key} is read, but no grammar composed before it defines "${key}"`);
|
|
1958
|
+
function priorHole(key) {
|
|
1959
|
+
const unfilled = priorUnfilled(key);
|
|
1960
|
+
const fail = () => {
|
|
1961
|
+
throw unfilled;
|
|
1962
|
+
};
|
|
1963
|
+
return {
|
|
1964
|
+
_tag: "lazy",
|
|
1965
|
+
_meta: { firstSet: any(), canMatchNewline: true, isTrivia: false },
|
|
1966
|
+
_def: { tag: "lazy", thunk: fail },
|
|
1967
|
+
parse: fail,
|
|
1968
|
+
_priorOf: key
|
|
1969
|
+
};
|
|
1970
|
+
}
|
|
1946
1971
|
function rules(a, b) {
|
|
1947
1972
|
const factory = typeof a === "function" ? a : b;
|
|
1948
1973
|
const options = typeof a === "function" ? b : a;
|
|
@@ -1967,8 +1992,20 @@ function linkRules(recipes, link) {
|
|
|
1967
1992
|
}
|
|
1968
1993
|
});
|
|
1969
1994
|
const winners = /* @__PURE__ */ new Map();
|
|
1995
|
+
const priorHoles = /* @__PURE__ */ new Map();
|
|
1996
|
+
const prior = new Proxy({}, {
|
|
1997
|
+
get(_target, key) {
|
|
1998
|
+
if (typeof key !== "string") return void 0;
|
|
1999
|
+
const earlier = winners.get(key)?.parser;
|
|
2000
|
+
if (earlier !== void 0) return earlier._def.tag === "node" ? earlier._def.parser : earlier;
|
|
2001
|
+
if (link !== void 0) throw priorUnfilled(key);
|
|
2002
|
+
let hole = priorHoles.get(key);
|
|
2003
|
+
if (hole === void 0) priorHoles.set(key, hole = priorHole(key));
|
|
2004
|
+
return hole;
|
|
2005
|
+
}
|
|
2006
|
+
});
|
|
1970
2007
|
for (const recipe of recipes) {
|
|
1971
|
-
const definitions = recipe.factory(proxy);
|
|
2008
|
+
const definitions = recipe.factory(proxy, prior);
|
|
1972
2009
|
for (const key of Object.keys(definitions)) {
|
|
1973
2010
|
winners.set(key, { parser: definitions[key], options: recipe.options });
|
|
1974
2011
|
}
|
|
@@ -6934,7 +6971,8 @@ function classifyRuleMap(ruleMap) {
|
|
|
6934
6971
|
resolved = void 0;
|
|
6935
6972
|
}
|
|
6936
6973
|
if (resolved === void 0) {
|
|
6937
|
-
|
|
6974
|
+
const hole = p;
|
|
6975
|
+
if (hole._ruleName !== void 0 || hole._priorOf !== void 0) externalRefs.add(p);
|
|
6938
6976
|
return;
|
|
6939
6977
|
}
|
|
6940
6978
|
scanExternal(resolved);
|
|
@@ -7116,6 +7154,7 @@ var OP_LIT_CI = 27;
|
|
|
7116
7154
|
var OP_LIT_CI_TRACK = 28;
|
|
7117
7155
|
var OP_TOKEN = 29;
|
|
7118
7156
|
var OP_SCOPE_CAP = 30;
|
|
7157
|
+
var SCOPE_INHERIT = -2;
|
|
7119
7158
|
var OP_WITHCTX = 31;
|
|
7120
7159
|
var OP_GUARD = 32;
|
|
7121
7160
|
var OP_ADJ = 33;
|
|
@@ -9148,7 +9187,7 @@ var Encoder = class {
|
|
|
9148
9187
|
this.triviaKnown = savedKnown;
|
|
9149
9188
|
if (d.clearTrivia === true) return this.emit(op, -1, bodyIp, flags);
|
|
9150
9189
|
if (d.triviaParser === void 0) {
|
|
9151
|
-
return cap
|
|
9190
|
+
return cap ? this.emit(op, SCOPE_INHERIT, bodyIp, flags) : bodyIp;
|
|
9152
9191
|
}
|
|
9153
9192
|
return this.emit(op, this.triviaSlot(d.triviaParser), bodyIp, flags);
|
|
9154
9193
|
}
|
|
@@ -10540,7 +10579,7 @@ function transfer(code, ip, at, hostCst) {
|
|
|
10540
10579
|
const op = code[ip];
|
|
10541
10580
|
if (op === OP_SCOPE || op === OP_SCOPE_CAP || op === OP_SCOPE_PLAIN) {
|
|
10542
10581
|
const ki = code[ip + 1];
|
|
10543
|
-
const tri = ki < 0 ? TRI_NONE : ki;
|
|
10582
|
+
const tri = ki === SCOPE_INHERIT ? at.tri : ki < 0 ? TRI_NONE : ki;
|
|
10544
10583
|
const cap = op === OP_SCOPE_CAP ? CAP_ON : at.cap;
|
|
10545
10584
|
if (tri === at.tri && cap === at.cap) return at;
|
|
10546
10585
|
return { tri, buf: at.buf, raw: at.raw, cap };
|
|
@@ -10614,7 +10653,7 @@ function scanHandoffNeeded(code, ip, labels) {
|
|
|
10614
10653
|
if (l.tri === TRI_UNKNOWN) return true;
|
|
10615
10654
|
const op = code[at];
|
|
10616
10655
|
if (op === OP_SCAN) return true;
|
|
10617
|
-
if (op === OP_TOKEN || op === OP_SCOPE_CAP) continue;
|
|
10656
|
+
if (op === OP_TOKEN || op === OP_SCOPE_CAP && code[at + 1] !== SCOPE_INHERIT) continue;
|
|
10618
10657
|
if ((op === OP_SCOPE_PLAIN || op === OP_SCOPE) && !(code[at + 1] >= 0 && l.tri === code[at + 1] && (op === OP_SCOPE_PLAIN || code[at + 3] === 0))) continue;
|
|
10619
10658
|
kids.length = 0;
|
|
10620
10659
|
if (!childSlots(code, at, kids)) return true;
|
|
@@ -11909,6 +11948,15 @@ return r.value
|
|
|
11909
11948
|
const cap = op === OP_SCOPE_CAP;
|
|
11910
11949
|
const flags = op === OP_SCOPE_PLAIN ? 0 : code[ip + 3];
|
|
11911
11950
|
const child = link(code[ip + 2]);
|
|
11951
|
+
if (ki === SCOPE_INHERIT) {
|
|
11952
|
+
return `${head}
|
|
11953
|
+
const sC=ctx.captureTrivia
|
|
11954
|
+
ctx.captureTrivia=true
|
|
11955
|
+
const v=${child}(input,pos,ctx)
|
|
11956
|
+
ctx.captureTrivia=sC
|
|
11957
|
+
return v
|
|
11958
|
+
}`;
|
|
11959
|
+
}
|
|
11912
11960
|
const scanFor = swapLegal && ki >= 0 && !triviaLabelled[ki] ? hoist("ts", `TRIVIASCAN[${ki}]`) : "null";
|
|
11913
11961
|
const tri = ki < 0 ? "undefined" : hoist("tv", `TRIVIA[${ki}]`);
|
|
11914
11962
|
const lab = ki < 0 ? "undefined" : hoist("tl", `TRIVIA[${ki}]._meta.triviaKindLabels`);
|
|
@@ -13498,7 +13546,7 @@ function clearOf(ranges, input, from, to) {
|
|
|
13498
13546
|
}
|
|
13499
13547
|
|
|
13500
13548
|
// src/version.ts
|
|
13501
|
-
var PARSEMAN_VERSION = "0.60.
|
|
13549
|
+
var PARSEMAN_VERSION = "0.60.6";
|
|
13502
13550
|
|
|
13503
13551
|
// src/table/assemble.ts
|
|
13504
13552
|
import { PlainBuf as PlainBuf2, PlainField, PlainLeaf as PlainLeaf9, PlainNode as PlainNode2, PlainSpan as PlainSpan10 } from "../cst/plain.js";
|
|
@@ -15028,6 +15076,16 @@ function assemble(t, prog, cfg) {
|
|
|
15028
15076
|
case OP_SCOPE_CAP:
|
|
15029
15077
|
case OP_SCOPE_PLAIN: {
|
|
15030
15078
|
const ki = code[ip + 1];
|
|
15079
|
+
if (ki === SCOPE_INHERIT) {
|
|
15080
|
+
const body = link(code[ip + 2]);
|
|
15081
|
+
return (input, pos, ctx) => {
|
|
15082
|
+
const savedCap = ctx.captureTrivia;
|
|
15083
|
+
ctx.captureTrivia = true;
|
|
15084
|
+
const v = body(input, pos, ctx);
|
|
15085
|
+
ctx.captureTrivia = savedCap;
|
|
15086
|
+
return v;
|
|
15087
|
+
};
|
|
15088
|
+
}
|
|
15031
15089
|
const scopeTrivia = ki < 0 ? void 0 : trivia2[ki];
|
|
15032
15090
|
const scopeLabels = scopeTrivia?._meta.triviaKindLabels;
|
|
15033
15091
|
const scanFor = swapLegal && ki >= 0 && !triviaLabelled[ki] ? triviaScan[ki] : null;
|
|
@@ -17662,7 +17720,7 @@ function buildGrammarPlan(entry, winners) {
|
|
|
17662
17720
|
const dispatches = /* @__PURE__ */ new Map();
|
|
17663
17721
|
const attempts = /* @__PURE__ */ new Map();
|
|
17664
17722
|
const labels = /* @__PURE__ */ new Map();
|
|
17665
|
-
const
|
|
17723
|
+
const rules3 = /* @__PURE__ */ new Map();
|
|
17666
17724
|
const winnerNames = /* @__PURE__ */ new Map();
|
|
17667
17725
|
if (winners) {
|
|
17668
17726
|
for (const [name, winner] of Object.entries(winners)) {
|
|
@@ -17696,7 +17754,7 @@ function buildGrammarPlan(entry, winners) {
|
|
|
17696
17754
|
const ownRule2 = (parser2, rule) => {
|
|
17697
17755
|
const id = `rule:${rule}`;
|
|
17698
17756
|
definitions.set(id, { id, kind: "rule" });
|
|
17699
|
-
|
|
17757
|
+
rules3.set(parser2, id);
|
|
17700
17758
|
};
|
|
17701
17759
|
const seen = /* @__PURE__ */ new Set();
|
|
17702
17760
|
const visit = (parser2, path3) => {
|
|
@@ -17736,7 +17794,7 @@ function buildGrammarPlan(entry, winners) {
|
|
|
17736
17794
|
}
|
|
17737
17795
|
visit(body ?? root, name);
|
|
17738
17796
|
}
|
|
17739
|
-
return { definitions: [...definitions.values()].sort((a, b) => a.id.localeCompare(b.id)), choices, dispatches, attempts, labels, rules:
|
|
17797
|
+
return { definitions: [...definitions.values()].sort((a, b) => a.id.localeCompare(b.id)), choices, dispatches, attempts, labels, rules: rules3 };
|
|
17740
17798
|
}
|
|
17741
17799
|
|
|
17742
17800
|
// src/analysis/duplication.ts
|
|
@@ -19532,6 +19590,8 @@ var Serializer = class {
|
|
|
19532
19590
|
localRuleNames = /* @__PURE__ */ new Map();
|
|
19533
19591
|
ruleMap;
|
|
19534
19592
|
scanSkip;
|
|
19593
|
+
/** Whether any rule reads a `prior.X` hole, so the factory takes `(g, prior)`. */
|
|
19594
|
+
usesPrior = false;
|
|
19535
19595
|
accessed;
|
|
19536
19596
|
referenced = /* @__PURE__ */ new Set();
|
|
19537
19597
|
constructor(ruleMap, scanSkip = [], accessed = []) {
|
|
@@ -19552,7 +19612,7 @@ var Serializer = class {
|
|
|
19552
19612
|
if (seen.has(c)) return;
|
|
19553
19613
|
seen.add(c);
|
|
19554
19614
|
if (c._def.tag === "lazy") {
|
|
19555
|
-
if (ruleNameOf3(c) !== void 0) throw new Unserializable("scanSkip unit references a grammar rule");
|
|
19615
|
+
if (ruleNameOf3(c) !== void 0 || priorNameOf(c) !== void 0) throw new Unserializable("scanSkip unit references a grammar rule");
|
|
19556
19616
|
const target = lazyTarget(c);
|
|
19557
19617
|
if (target) this.assertNoRuleRef(target, seen);
|
|
19558
19618
|
return;
|
|
@@ -19616,9 +19676,10 @@ var Serializer = class {
|
|
|
19616
19676
|
for (const name of this.accessed) {
|
|
19617
19677
|
if (!this.referenced.has(name)) innerDecls.push(`void g[${JSON.stringify(name)}]`);
|
|
19618
19678
|
}
|
|
19619
|
-
const
|
|
19679
|
+
const params = this.usesPrior ? "(g, prior)" : "(g)";
|
|
19680
|
+
const factory = innerDecls.length === 0 ? `${params} => ({
|
|
19620
19681
|
${body}
|
|
19621
|
-
})` :
|
|
19682
|
+
})` : `${params} => {
|
|
19622
19683
|
${innerDecls.map((d) => " " + d).join("\n")}
|
|
19623
19684
|
return ({
|
|
19624
19685
|
${body}
|
|
@@ -19635,6 +19696,10 @@ ${outerDecls.map((d) => " " + d).join("\n")}
|
|
|
19635
19696
|
analyze(c, active) {
|
|
19636
19697
|
const def = c._def;
|
|
19637
19698
|
if (def.tag === "lazy") {
|
|
19699
|
+
if (priorNameOf(c) !== void 0) {
|
|
19700
|
+
this.usesPrior = true;
|
|
19701
|
+
return;
|
|
19702
|
+
}
|
|
19638
19703
|
if (ruleNameOf3(c) !== void 0) return;
|
|
19639
19704
|
const target = lazyTarget(c);
|
|
19640
19705
|
if (!target) throw new Unserializable("unresolved unnamed ref");
|
|
@@ -19713,6 +19778,8 @@ ${outerDecls.map((d) => " " + d).join("\n")}
|
|
|
19713
19778
|
}
|
|
19714
19779
|
switch (def.tag) {
|
|
19715
19780
|
case "lazy": {
|
|
19781
|
+
const prior = priorNameOf(c);
|
|
19782
|
+
if (prior !== void 0) return `prior[${JSON.stringify(prior)}]`;
|
|
19716
19783
|
const name = this.localRuleNames.get(c) ?? ruleNameOf3(c);
|
|
19717
19784
|
if (name !== void 0) {
|
|
19718
19785
|
this.referenced.add(name);
|
|
@@ -19893,7 +19960,8 @@ function externalNames(ruleMap) {
|
|
|
19893
19960
|
resolved = void 0;
|
|
19894
19961
|
}
|
|
19895
19962
|
if (resolved === void 0) {
|
|
19896
|
-
const
|
|
19963
|
+
const prior = priorNameOf(p);
|
|
19964
|
+
const name = prior === void 0 ? p._ruleName : `prior.${prior}`;
|
|
19897
19965
|
if (name !== void 0 && !out.includes(name)) out.push(name);
|
|
19898
19966
|
return;
|
|
19899
19967
|
}
|
|
@@ -21532,10 +21600,15 @@ function evaluateParserFactory(factoryNode, scope, code, mapFnSources, out, opti
|
|
|
21532
21600
|
if (factoryNode.type !== "ArrowFunctionExpression" && factoryNode.type !== "FunctionDeclaration" && factoryNode.type !== "FunctionExpression") return null;
|
|
21533
21601
|
const factory = factoryNode;
|
|
21534
21602
|
const params = factory.params;
|
|
21535
|
-
if (params.length !== 1) return null;
|
|
21536
|
-
const
|
|
21537
|
-
|
|
21603
|
+
if (params.length !== 1 && params.length !== 2) return null;
|
|
21604
|
+
const paramName = (param) => {
|
|
21605
|
+
const p = param;
|
|
21606
|
+
return p.type === "Identifier" ? p.name ?? null : null;
|
|
21607
|
+
};
|
|
21608
|
+
const proxyName = paramName(params[0]);
|
|
21538
21609
|
if (!proxyName) return null;
|
|
21610
|
+
const priorName = params.length === 2 ? paramName(params[1]) : void 0;
|
|
21611
|
+
if (priorName === null) return null;
|
|
21539
21612
|
const body = factory.body;
|
|
21540
21613
|
if (!body) return null;
|
|
21541
21614
|
const statements = [];
|
|
@@ -21565,9 +21638,10 @@ function evaluateParserFactory(factoryNode, scope, code, mapFnSources, out, opti
|
|
|
21565
21638
|
const ABORT = /* @__PURE__ */ Symbol("parseman: factory not statically evaluable");
|
|
21566
21639
|
let built;
|
|
21567
21640
|
try {
|
|
21568
|
-
built = rules(options ?? {}, (g) => {
|
|
21641
|
+
built = rules(options ?? {}, (g, prior) => {
|
|
21569
21642
|
const localScope = scope instanceof ModuleScope ? scope.fork() : new Map(scope);
|
|
21570
21643
|
localScope.set(proxyName, g);
|
|
21644
|
+
if (priorName !== void 0) localScope.set(priorName, prior);
|
|
21571
21645
|
if (!evalBodyStatements(statements, localScope, code, out)) throw ABORT;
|
|
21572
21646
|
const entries = flattenRuleEntries(retObj, localScope, code);
|
|
21573
21647
|
if (!entries) throw ABORT;
|
|
@@ -21590,8 +21664,10 @@ function evaluateParserFactory(factoryNode, scope, code, mapFnSources, out, opti
|
|
|
21590
21664
|
for (const key of keys) map.set(key, built[key]);
|
|
21591
21665
|
const declared = new Set(keys);
|
|
21592
21666
|
externalAccesses.set(map, Object.keys(built).filter((name) => !declared.has(name)));
|
|
21667
|
+
ruleMapRecipes.set(map, built[RULES_RECIPE]);
|
|
21593
21668
|
return map;
|
|
21594
21669
|
}
|
|
21670
|
+
var ruleMapRecipes = /* @__PURE__ */ new WeakMap();
|
|
21595
21671
|
var externalAccesses = /* @__PURE__ */ new WeakMap();
|
|
21596
21672
|
function isDefinableRef2(v) {
|
|
21597
21673
|
return isCombinator3(v) && typeof v.define === "function" && v._def.tag === "lazy";
|
|
@@ -22935,15 +23011,6 @@ var PARSEMAN_MODULE = "parseman";
|
|
|
22935
23011
|
var DEFAULT_ASSEMBLY_BUDGET = 0.25;
|
|
22936
23012
|
var LinkRefusal = class extends Error {
|
|
22937
23013
|
};
|
|
22938
|
-
function isResolved(rule) {
|
|
22939
|
-
if (rule._def.tag !== "lazy") return true;
|
|
22940
|
-
try {
|
|
22941
|
-
rule._def.thunk();
|
|
22942
|
-
return true;
|
|
22943
|
-
} catch {
|
|
22944
|
-
return false;
|
|
22945
|
-
}
|
|
22946
|
-
}
|
|
22947
23014
|
function reasonSuffix(runtimeOnly) {
|
|
22948
23015
|
return runtimeOnly === void 0 || runtimeOnly.length === 0 ? "" : ` \u2014 ${runtimeOnly.join("; ")}`;
|
|
22949
23016
|
}
|
|
@@ -24076,22 +24143,6 @@ ${names.map((n) => ` - ${n}`).join("\n")}` : " (it is not a static combinator/v
|
|
|
24076
24143
|
}
|
|
24077
24144
|
return { pieces, trackLines };
|
|
24078
24145
|
};
|
|
24079
|
-
const mergeRuleMaps = (maps) => {
|
|
24080
|
-
const winners = /* @__PURE__ */ new Map();
|
|
24081
|
-
for (const map of maps) {
|
|
24082
|
-
for (const [name, rule] of map) {
|
|
24083
|
-
if (rule._def.tag === "lazy") {
|
|
24084
|
-
try {
|
|
24085
|
-
rule._def.thunk();
|
|
24086
|
-
} catch {
|
|
24087
|
-
continue;
|
|
24088
|
-
}
|
|
24089
|
-
}
|
|
24090
|
-
winners.set(name, rule);
|
|
24091
|
-
}
|
|
24092
|
-
}
|
|
24093
|
-
return [...winners];
|
|
24094
|
-
};
|
|
24095
24146
|
const mergedCarriedRules = (items, link) => {
|
|
24096
24147
|
const carriedMaps = carriedRuleMaps(items);
|
|
24097
24148
|
if (carriedMaps === null) return null;
|
|
@@ -24099,12 +24150,6 @@ ${names.map((n) => ` - ${n}`).join("\n")}` : " (it is not a static combinator/v
|
|
|
24099
24150
|
const dangling = danglingReference(linked);
|
|
24100
24151
|
return { rules: Object.entries(linked), trackLines: carriedMaps.trackLines, dangling };
|
|
24101
24152
|
};
|
|
24102
|
-
const applyComposingTrivia = (ruleMap, composing) => {
|
|
24103
|
-
for (const [, rule] of ruleMap) {
|
|
24104
|
-
if (rule._meta.isTrivia) continue;
|
|
24105
|
-
rule._meta.grammarTrivia = composing;
|
|
24106
|
-
}
|
|
24107
|
-
};
|
|
24108
24153
|
const localCarried = (rm, label2, composing, scanSkip) => {
|
|
24109
24154
|
const entries = [...rm];
|
|
24110
24155
|
const ns = nsFor(label2);
|
|
@@ -24192,10 +24237,15 @@ ${names.map((n) => ` - ${n}`).join("\n")}` : " (it is not a static combinator/v
|
|
|
24192
24237
|
carried.push(...r.carried);
|
|
24193
24238
|
importedFactories.push(...r.importedFactories ?? []);
|
|
24194
24239
|
}
|
|
24195
|
-
|
|
24196
|
-
|
|
24197
|
-
|
|
24198
|
-
|
|
24240
|
+
let merged;
|
|
24241
|
+
try {
|
|
24242
|
+
merged = mergedCarriedRules(carried, {
|
|
24243
|
+
trivia: composing,
|
|
24244
|
+
...cHostMode ? { hostMode: cHostMode } : {}
|
|
24245
|
+
});
|
|
24246
|
+
} catch (e) {
|
|
24247
|
+
throw new Error(`${id}:${lineOf(init.start)} \u2014 ${e.message}`, { cause: e });
|
|
24248
|
+
}
|
|
24199
24249
|
if (merged?.dangling !== void 0) throw new Error(`${id}:${lineOf(init.start)} \u2014 compose: ${merged.dangling}`);
|
|
24200
24250
|
if (merged !== null) {
|
|
24201
24251
|
collectBuilderImports(merged.rules);
|
|
@@ -24256,8 +24306,8 @@ ${names.map((n) => ` - ${n}`).join("\n")}` : " (it is not a static combinator/v
|
|
|
24256
24306
|
const type = fn?.[INERT_BUILDER];
|
|
24257
24307
|
return type === void 0 ? fn : (children3, _fields, span) => ({ type, span, children: children3 });
|
|
24258
24308
|
});
|
|
24259
|
-
const counts = countSiteVisits(compiled.prog, (
|
|
24260
|
-
const entry =
|
|
24309
|
+
const counts = countSiteVisits(compiled.prog, (rules3) => {
|
|
24310
|
+
const entry = rules3[assemblyProfile.entry];
|
|
24261
24311
|
for (const text of corpusTexts(assemblyProfile)) {
|
|
24262
24312
|
try {
|
|
24263
24313
|
if (run(entry, text).ok) parsed++;
|
|
@@ -24284,17 +24334,14 @@ ${names.map((n) => ` - ${n}`).join("\n")}` : " (it is not a static combinator/v
|
|
|
24284
24334
|
}
|
|
24285
24335
|
const localArg = elements[elements.length - 1];
|
|
24286
24336
|
let localRules = null;
|
|
24287
|
-
let localScanSkip;
|
|
24288
24337
|
const importedFactories = [];
|
|
24289
24338
|
if (isRulesCall(localArg)) {
|
|
24290
24339
|
const evaluated = evaluateRulesFactory(localArg, `composeLeaf${init.start}`);
|
|
24291
24340
|
localRules = evaluated?.ruleMap ?? null;
|
|
24292
|
-
localScanSkip = evaluated?.scanSkip;
|
|
24293
24341
|
if (evaluated?.importedFactory) importedFactories.push(evaluated.importedFactory);
|
|
24294
24342
|
} else if (localArg.type === "Identifier") {
|
|
24295
24343
|
const name = localArg.name;
|
|
24296
24344
|
localRules = localRuleMaps.get(name) ?? null;
|
|
24297
|
-
localScanSkip = localGrammarScanSkip.get(name);
|
|
24298
24345
|
}
|
|
24299
24346
|
if (!localRules) {
|
|
24300
24347
|
const named = localArg.type === "Identifier" ? localArg.name : null;
|
|
@@ -24313,8 +24360,6 @@ ${names.map((n) => ` - ${n}`).join("\n")}` : " (it is not a static combinator/v
|
|
|
24313
24360
|
importedFactories.push(...r.importedFactories ?? []);
|
|
24314
24361
|
}
|
|
24315
24362
|
try {
|
|
24316
|
-
const localNs = nsFor(`composeLeaf${init.start}`);
|
|
24317
|
-
const localEntries = [...localRules];
|
|
24318
24363
|
const carriedMaps = carriedRuleMaps(carried);
|
|
24319
24364
|
if (carriedMaps !== null) {
|
|
24320
24365
|
const unproven = carriedMaps.pieces.find((p) => {
|
|
@@ -24325,24 +24370,20 @@ ${names.map((n) => ` - ${n}`).join("\n")}` : " (it is not a static combinator/v
|
|
|
24325
24370
|
warn(init.start, "composeLeaf(): every pre-final grammar must explicitly prove recognition-only");
|
|
24326
24371
|
return null;
|
|
24327
24372
|
}
|
|
24328
|
-
|
|
24329
|
-
|
|
24330
|
-
|
|
24331
|
-
|
|
24332
|
-
|
|
24333
|
-
|
|
24373
|
+
let linked;
|
|
24374
|
+
try {
|
|
24375
|
+
linked = linkRules(
|
|
24376
|
+
[...carriedMaps.pieces.flatMap((p) => p.recipes), ...ruleMapRecipes.get(localRules)],
|
|
24377
|
+
{ trivia: composing }
|
|
24378
|
+
);
|
|
24379
|
+
} catch (e) {
|
|
24380
|
+
throw new LinkRefusal(`${id}:${lineOf(init.start)} \u2014 composeLeaf: ${e.message.replace(/^compose: /, "")}`, { cause: e });
|
|
24334
24381
|
}
|
|
24335
|
-
const
|
|
24336
|
-
const accessed = [
|
|
24337
|
-
...carriedMaps.pieces.flatMap((p) => p.rules).filter(([, rule]) => !isResolved(rule)).map(([name]) => name),
|
|
24338
|
-
...localRules instanceof Map ? externalAccesses.get(localRules) ?? [] : []
|
|
24339
|
-
];
|
|
24340
|
-
const dangling = danglingReference(Object.fromEntries(leafMerged), accessed);
|
|
24382
|
+
const dangling = danglingReference(linked);
|
|
24341
24383
|
if (dangling !== void 0) throw new LinkRefusal(`${id}:${lineOf(init.start)} \u2014 composeLeaf: ${dangling}`);
|
|
24342
|
-
if (composing) applyComposingTrivia(carriedMaps.pieces.flatMap((p) => p.rules), composing);
|
|
24343
24384
|
const refusals = [];
|
|
24344
24385
|
const compiled = compileRuleMap(
|
|
24345
|
-
|
|
24386
|
+
Object.entries(linked),
|
|
24346
24387
|
{
|
|
24347
24388
|
...composing ? { trivia: composing } : {},
|
|
24348
24389
|
...carriedMaps.trackLines ? { trackLines: true } : {},
|