parseman 0.31.0 → 0.32.0
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/gating.d.ts +115 -0
- package/dist/analysis/gating.d.ts.map +1 -0
- package/dist/combinators/first-set.d.ts +25 -0
- package/dist/combinators/first-set.d.ts.map +1 -1
- package/dist/combinators/gate.d.ts +24 -0
- package/dist/combinators/gate.d.ts.map +1 -0
- package/dist/combinators/grammar.d.ts.map +1 -1
- package/dist/combinators/guard.d.ts +5 -12
- package/dist/combinators/guard.d.ts.map +1 -1
- package/dist/combinators/parser.d.ts +7 -0
- package/dist/combinators/parser.d.ts.map +1 -1
- package/dist/combinators/regex.d.ts.map +1 -1
- package/dist/combinators/scanTo.d.ts +45 -3
- package/dist/combinators/scanTo.d.ts.map +1 -1
- package/dist/compiler/codegen.d.ts +78 -14
- package/dist/compiler/codegen.d.ts.map +1 -1
- package/dist/compiler/linker.d.ts.map +1 -1
- package/dist/functional/run.d.ts.map +1 -1
- package/dist/index.cjs +715 -237
- package/dist/index.cjs.map +4 -4
- package/dist/index.d.ts +5 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +715 -237
- package/dist/index.js.map +4 -4
- package/dist/language-service/index.cjs +2 -0
- package/dist/language-service/index.cjs.map +2 -2
- package/dist/language-service/index.js +2 -0
- package/dist/language-service/index.js.map +2 -2
- package/dist/plugin/index.cjs +741 -249
- package/dist/plugin/index.cjs.map +4 -4
- package/dist/plugin/index.d.ts.map +1 -1
- package/dist/plugin/index.js +741 -249
- package/dist/plugin/index.js.map +4 -4
- package/dist/spec/index.cjs.map +1 -1
- package/dist/spec/index.js.map +1 -1
- package/dist/types.d.ts +18 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/version.d.ts +17 -0
- package/dist/version.d.ts.map +1 -0
- package/package.json +2 -1
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Static first-char gating diagnostic.
|
|
3
|
+
*
|
|
4
|
+
* Parseman is scannerless PEG: a `choice` is CORRECT regardless of whether it
|
|
5
|
+
* first-char-gates. When a hot choice fails to gate, every non-matching input
|
|
6
|
+
* position speculatively ENTERS a doomed arm (ctx save/restore + child array +
|
|
7
|
+
* recognizer + rollback) instead of being skipped by a cheap first-char test —
|
|
8
|
+
* and nothing tells the author, because the grammar still passes every test. The
|
|
9
|
+
* only symptom is a CPU profile. This module surfaces, at build time, exactly what
|
|
10
|
+
* the compiler already knows: which choices gate, and for those that don't, which
|
|
11
|
+
* arm poisons dispatch and why.
|
|
12
|
+
*
|
|
13
|
+
* `analyzeGating()` is the pure programmatic surface. `compile()` runs it by
|
|
14
|
+
* default and emits `formatGatingWarnings()` output for genuinely-ungated choices
|
|
15
|
+
* (see `src/compiler/codegen.ts`). Accept a deliberately-ungated choice by listing
|
|
16
|
+
* its `id` in the gating snapshot allowlist (`analyzeGating(entry, { accept })` /
|
|
17
|
+
* `compile(g, { gating: { level, accept } })`) — the single suppression mechanism.
|
|
18
|
+
*/
|
|
19
|
+
import type { Combinator, FirstSet } from '../types.ts';
|
|
20
|
+
/** Why an arm's (deep) first-set is `any` / over-broad — the poison source. */
|
|
21
|
+
export type FirstSetCause = 'leading-not' | 'nullable-prefix' | 'cross-artifact-ref' | 'broad-recognizer' | 'opaque-wrapper' | 'ref-cycle';
|
|
22
|
+
/** An arm whose deep first-set is `any` / over-broad. */
|
|
23
|
+
export type AnyArm = {
|
|
24
|
+
index: number;
|
|
25
|
+
cause: FirstSetCause;
|
|
26
|
+
/** Human-readable trail to the poison, e.g. "via ref g.anyValue → broad recognizer (regex)". */
|
|
27
|
+
detail: string;
|
|
28
|
+
/**
|
|
29
|
+
* True when only the CONSTRUCTION-time (shallow) first-set was `any` but the
|
|
30
|
+
* deep, ref-resolving first-set is finite — the monolithic compile recovers a
|
|
31
|
+
* real per-arm guard, so this is NOT a genuine cliff. Never present on a
|
|
32
|
+
* genuinely-ungated finding.
|
|
33
|
+
*/
|
|
34
|
+
shallowAnyOnly: boolean;
|
|
35
|
+
/** Concrete fix, naming a real primitive. */
|
|
36
|
+
suggestion: string;
|
|
37
|
+
};
|
|
38
|
+
/** Two arms whose finite first-sets intersect — a shared prefix. */
|
|
39
|
+
export type Overlap = {
|
|
40
|
+
a: number;
|
|
41
|
+
b: number;
|
|
42
|
+
on: FirstSet;
|
|
43
|
+
suggestion: string;
|
|
44
|
+
};
|
|
45
|
+
/** An API-misuse pattern detected in a choice's arms (independent of gating). */
|
|
46
|
+
export type AntiPattern = {
|
|
47
|
+
kind: 'double-not' | 'leading-not' | 'keyword-regex';
|
|
48
|
+
rule: string;
|
|
49
|
+
armIndex: number;
|
|
50
|
+
message: string;
|
|
51
|
+
};
|
|
52
|
+
export type ChoiceStrategyTag = 'firstMatch' | 'greedyClassify' | 'literalsLongestFirst' | 'sharedPrefix';
|
|
53
|
+
export type ChoiceGating = {
|
|
54
|
+
/**
|
|
55
|
+
* Stable per-choice identity for the accepted-snapshot allowlist. The enclosing
|
|
56
|
+
* rule name when that rule holds exactly one choice, else `rule#N` (0-based
|
|
57
|
+
* occurrence order within the rule). This is the key you list in the snapshot to
|
|
58
|
+
* ACCEPT a known ungated choice.
|
|
59
|
+
*/
|
|
60
|
+
id: string;
|
|
61
|
+
/** Nearest enclosing rule name (from `_ruleName`), or a synthetic path label. */
|
|
62
|
+
rule: string;
|
|
63
|
+
strategy: ChoiceStrategyTag;
|
|
64
|
+
/**
|
|
65
|
+
* `yes` — emits O(1) first-char dispatch (a switch/if jump table).
|
|
66
|
+
* `recoverable` — not O(1) dispatch, but every arm still first-char-guards via
|
|
67
|
+
* the deep, ref-resolving first-set (monolithic compile) / fuse-time resolution
|
|
68
|
+
* (compose). NOT a cliff; never warned.
|
|
69
|
+
* `no` — genuinely ungated: a broad/any arm or a finite overlap forces ordered
|
|
70
|
+
* speculative entry with no per-arm first-char skip.
|
|
71
|
+
*/
|
|
72
|
+
gates: 'yes' | 'recoverable' | 'no';
|
|
73
|
+
/** True when this ungated choice's `id` is in the accepted-snapshot allowlist. */
|
|
74
|
+
accepted: boolean;
|
|
75
|
+
combinedFirstSet: {
|
|
76
|
+
shallow: FirstSet;
|
|
77
|
+
deep: FirstSet;
|
|
78
|
+
};
|
|
79
|
+
anyArms: AnyArm[];
|
|
80
|
+
overlaps: Overlap[];
|
|
81
|
+
};
|
|
82
|
+
/** Options for `analyzeGating` — the accepted-snapshot allowlist. */
|
|
83
|
+
export type AnalyzeGatingOptions = {
|
|
84
|
+
/**
|
|
85
|
+
* Choice `id`s that are accepted as intentionally ungated. An ungated choice
|
|
86
|
+
* whose id is here is moved to `accepted` (silent, does not fail the CI gate); one
|
|
87
|
+
* whose id is NOT here stays in `ungated` (warned + fails the gate). This is the
|
|
88
|
+
* SINGLE per-choice suppression mechanism.
|
|
89
|
+
*/
|
|
90
|
+
accept?: Iterable<string>;
|
|
91
|
+
};
|
|
92
|
+
export type GatingReport = {
|
|
93
|
+
totalChoices: number;
|
|
94
|
+
gated: number;
|
|
95
|
+
recoverable: number;
|
|
96
|
+
/** Genuinely-ungated choices NOT in the accepted allowlist — warned + gate-failing. */
|
|
97
|
+
ungated: ChoiceGating[];
|
|
98
|
+
/** Ungated choices whose id was in the accepted allowlist — silent, accepted with intent. */
|
|
99
|
+
accepted: ChoiceGating[];
|
|
100
|
+
/** Accepted ids that matched no ungated choice — stale snapshot entries to prune. */
|
|
101
|
+
acceptedUnused: string[];
|
|
102
|
+
/** Every choice, for full inspection / CI snapshots. */
|
|
103
|
+
choices: ChoiceGating[];
|
|
104
|
+
antiPatterns: AntiPattern[];
|
|
105
|
+
};
|
|
106
|
+
export declare function firstSetToString(fs: FirstSet): string;
|
|
107
|
+
export declare function analyzeGating(entry: Combinator<unknown>, opts?: AnalyzeGatingOptions): GatingReport;
|
|
108
|
+
export type GatingWarnLevel = 'off' | 'warn' | 'error';
|
|
109
|
+
/**
|
|
110
|
+
* Format the genuinely-ungated findings + anti-patterns as ready-to-print lines.
|
|
111
|
+
* Precise by design: only 'no'-gated choices NOT in the accepted allowlist, plus
|
|
112
|
+
* the anti-pattern lints. Recoverable / gated / accepted choices produce nothing.
|
|
113
|
+
*/
|
|
114
|
+
export declare function formatGatingWarnings(report: GatingReport): string[];
|
|
115
|
+
//# sourceMappingURL=gating.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gating.d.ts","sourceRoot":"","sources":["../../src/analysis/gating.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,OAAO,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAa,MAAM,aAAa,CAAA;AAGlE,+EAA+E;AAC/E,MAAM,MAAM,aAAa,GACrB,aAAa,GACb,iBAAiB,GACjB,oBAAoB,GACpB,kBAAkB,GAClB,gBAAgB,GAChB,WAAW,CAAA;AAEf,yDAAyD;AACzD,MAAM,MAAM,MAAM,GAAG;IACnB,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,aAAa,CAAA;IACpB,gGAAgG;IAChG,MAAM,EAAE,MAAM,CAAA;IACd;;;;;OAKG;IACH,cAAc,EAAE,OAAO,CAAA;IACvB,6CAA6C;IAC7C,UAAU,EAAE,MAAM,CAAA;CACnB,CAAA;AAED,oEAAoE;AACpE,MAAM,MAAM,OAAO,GAAG;IACpB,CAAC,EAAE,MAAM,CAAA;IACT,CAAC,EAAE,MAAM,CAAA;IACT,EAAE,EAAE,QAAQ,CAAA;IACZ,UAAU,EAAE,MAAM,CAAA;CACnB,CAAA;AAED,iFAAiF;AACjF,MAAM,MAAM,WAAW,GAAG;IACxB,IAAI,EAAE,YAAY,GAAG,aAAa,GAAG,eAAe,CAAA;IACpD,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,EAAE,MAAM,CAAA;CAChB,CAAA;AAED,MAAM,MAAM,iBAAiB,GAAG,YAAY,GAAG,gBAAgB,GAAG,sBAAsB,GAAG,cAAc,CAAA;AAEzG,M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AAoB,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,EAAE,CAanE"}
|
|
@@ -21,12 +21,37 @@ export declare function empty(): FirstSet;
|
|
|
21
21
|
* first-char dispatch skip a matching arm.
|
|
22
22
|
*/
|
|
23
23
|
export declare function matchesEmpty(p: Combinator<unknown>, seen?: Set<Combinator<unknown>>): boolean;
|
|
24
|
+
/**
|
|
25
|
+
* A ZERO-WIDTH ASSERTION never consumes input, so it contributes NOTHING to a
|
|
26
|
+
* sequence's first-set — the first consumed char comes from the following
|
|
27
|
+
* non-nullable term. `not(X)` reports `firstSet: any()` (it cannot know what it
|
|
28
|
+
* forbids), which would otherwise poison a sequence's first-set to `any` and kill
|
|
29
|
+
* first-char dispatch of the whole arm. Skipping its contribution is SOUND: a
|
|
30
|
+
* first-set used for dispatch gating must stay a correct SUPERSET of the rule's
|
|
31
|
+
* true first chars, and `not(X) Y` can only start with a char in firstSet(Y) — the
|
|
32
|
+
* assertion only NARROWS the language (it forbids a full match ahead), it never
|
|
33
|
+
* widens the set of possible first chars beyond Y. So firstSet(Y) is a sound (and
|
|
34
|
+
* tighter) superset.
|
|
35
|
+
*
|
|
36
|
+
* Parseman has NO positive-lookahead combinator (`(?=X)` exists only INSIDE a
|
|
37
|
+
* `regex()` pattern, where the regex first-set analyzer handles it). If one is ever
|
|
38
|
+
* added, its tight first-set is firstSet(body) ∩ firstSet(Y) when `body` is
|
|
39
|
+
* NON-nullable (both must be satisfiable at the same position), else firstSet(Y)
|
|
40
|
+
* (a nullable `(?=body)` succeeds on empty, so it imposes no first-char constraint
|
|
41
|
+
* and intersecting would UNSOUNDLY exclude valid chars). It must NOT be added to
|
|
42
|
+
* this predicate without that intersection logic — a future assertion combinator
|
|
43
|
+
* left out of this set merely contributes its shallow `any` first-set, which stays
|
|
44
|
+
* sound (over-approximation), only losing tightness.
|
|
45
|
+
*/
|
|
46
|
+
export declare function isZeroWidthAssertion(p: Combinator<unknown>): boolean;
|
|
24
47
|
/**
|
|
25
48
|
* First-set of a sequence: union each term's first-set through the NULLABLE
|
|
26
49
|
* PREFIX — a leading `optional(…)` / `many(…)` / nullable term can be skipped, so
|
|
27
50
|
* the sequence can begin with a LATER term's first char. Stop at (and include)
|
|
28
51
|
* the first non-nullable term. (`parsers[0].firstSet` alone under-approximates
|
|
29
52
|
* and silently breaks first-char dispatch — see the InterpolatedSelector bug.)
|
|
53
|
+
* A leading zero-width assertion (`not(…)`) is nullable but contributes NOTHING to
|
|
54
|
+
* the first-set (see `isZeroWidthAssertion`) — its `any` must not poison the union.
|
|
30
55
|
*/
|
|
31
56
|
export declare function sequenceFirstSet(parsers: readonly Combinator<unknown>[]): FirstSet;
|
|
32
57
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"first-set.d.ts","sourceRoot":"","sources":["../../src/combinators/first-set.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAa,QAAQ,EAAE,UAAU,EAAa,MAAM,aAAa,CAAA;AAE7E,wBAAgB,KAAK,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,QAAQ,GAAG,QAAQ,CAKxD;AAED,wBAAgB,UAAU,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,QAAQ,GAAG,OAAO,CAS5D;AAED,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,QAAQ,CAE/C;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,UAAU,EAAE,UAAU,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAQnG;AAED,wBAAgB,SAAS,CAAC,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,QAAQ,CAE1D;AAED,wBAAgB,GAAG,IAAI,QAAQ,CAE9B;AAED,wBAAgB,KAAK,IAAI,QAAQ,CAEhC;AAED;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAAE,UAAU,CAAC,OAAO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,UAAU,CAAC,CAAC,EAAE,UAAU,CAAC,OAAO,CAAC,EAAE,IAAI,GAAE,GAAG,CAAC,UAAU,CAAC,OAAO,CAAC,CAAa,GAAG,QAAQ,CA2CvG"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { Combinator } from '../types.ts';
|
|
2
|
+
/**
|
|
3
|
+
* Zero-width state ASSERTION: succeeds (consuming nothing) only when `predicate`
|
|
4
|
+
* returns true for `ctx.state`. Fails otherwise.
|
|
5
|
+
*
|
|
6
|
+
* Intended for use inside sequence() to gate subsequent parsing on runtime
|
|
7
|
+
* context set with withCtx():
|
|
8
|
+
*
|
|
9
|
+
* const returnStmt = sequence(
|
|
10
|
+
* gate(ctx => (ctx as { inFn: boolean }).inFn),
|
|
11
|
+
* literal('return'), optional(expr)
|
|
12
|
+
* )
|
|
13
|
+
*
|
|
14
|
+
* Naming: this matches the `gate:` field on a gated CHOICE arm
|
|
15
|
+
* (`choice({ gate, combinator }, other)`). Use the arm FIELD to SELECT a branch by
|
|
16
|
+
* a cheap state predicate; use this COMBINATOR to ASSERT a state predicate
|
|
17
|
+
* mid-sequence. Formerly named `guard()` — see the deprecated alias in `guard.ts`.
|
|
18
|
+
*
|
|
19
|
+
* Note: like all state predicates its first-set is `any`, so a `gate(...)` as the
|
|
20
|
+
* LEADING term of a choice arm poisons that choice's first-char dispatch. Keep it
|
|
21
|
+
* after a concrete leading terminal.
|
|
22
|
+
*/
|
|
23
|
+
export declare function gate(predicate: (state: unknown) => boolean): Combinator<null>;
|
|
24
|
+
//# sourceMappingURL=gate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gate.d.ts","sourceRoot":"","sources":["../../src/combinators/gate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAyC,MAAM,aAAa,CAAA;AAEpF;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,IAAI,CAAC,SAAS,EAAE,CAAC,KAAK,EA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CAAC,EACrB,UAAU,EAAE,UAAU,CAAC,CAAC,CAAC,EACzB,KAAK,EAAE,MAAM,EACb,IAAI,GAAE,YAAiB,GACtB,WAAW,CAAC,CAAC,CAAC,CAmChB"}
|
|
@@ -1,15 +1,8 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { gate } from './gate.ts';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* Intended for use inside sequence() to gate subsequent parsing on runtime
|
|
7
|
-
* context set with withCtx().
|
|
8
|
-
*
|
|
9
|
-
* const returnStmt = sequence(
|
|
10
|
-
* guard(ctx => (ctx as { inFn: boolean }).inFn),
|
|
11
|
-
* literal('return'), optional(expr)
|
|
12
|
-
* )
|
|
3
|
+
* @deprecated Renamed to `gate()` — the name now matches the `gate:` field on a
|
|
4
|
+
* gated choice arm. This alias forwards to `gate()` unchanged and will be removed
|
|
5
|
+
* in a future major. Update call sites: `guard(pred)` → `gate(pred)`.
|
|
13
6
|
*/
|
|
14
|
-
export declare
|
|
7
|
+
export declare const guard: typeof gate;
|
|
15
8
|
//# sourceMappingURL=guard.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"guard.d.ts","sourceRoot":"","sources":["../../src/combinators/guard.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"guard.d.ts","sourceRoot":"","sources":["../../src/combinators/guard.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAEhC;;;;GAIG;AACH,eAAO,MAAM,KAAK,aAAO,CAAA"}
|
|
@@ -38,6 +38,13 @@ export type RulesOptions = {
|
|
|
38
38
|
/** Ambient trivia for the whole grammar. See `parser({ trivia })` for the shape
|
|
39
39
|
* (`null` clears it — equivalent to omitting it at the grammar level). */
|
|
40
40
|
trivia?: Combinator<unknown> | null;
|
|
41
|
+
/**
|
|
42
|
+
* Ambient scan-skip for the whole grammar: opaque non-trivia units (strings,
|
|
43
|
+
* balanced brackets, …) that a `scanTo`/`balanced` with no explicit `skip`
|
|
44
|
+
* consults so a sentinel hidden inside one is never matched. Declared ONCE here
|
|
45
|
+
* and inherited everywhere, mirroring `trivia`. `null`/absent = none.
|
|
46
|
+
*/
|
|
47
|
+
scanSkip?: Combinator<unknown>[] | null;
|
|
41
48
|
};
|
|
42
49
|
export declare function rules<T extends Record<string, Combinator<unknown>>>(factory: (self: any) => T): T;
|
|
43
50
|
export declare function rules<T extends Record<string, Combinator<unknown>>>(options: RulesOptions, factory: (self: any) => T): T;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parser.d.ts","sourceRoot":"","sources":["../../src/combinators/parser.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAI7C;;;;GAIG;AACH,eAAO,MAAM,UAAU,wBAAwB,CAAA;AAO/C;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH;;;;;;GAMG;AACH,MAAM,MAAM,YAAY,GAAG;IACzB;8EAC0E;IAC1E,MAAM,CAAC,EAAE,UAAU,CAAC,OAAO,CAAC,GAAG,IAAI,CAAA;
|
|
1
|
+
{"version":3,"file":"parser.d.ts","sourceRoot":"","sources":["../../src/combinators/parser.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAI7C;;;;GAIG;AACH,eAAO,MAAM,UAAU,wBAAwB,CAAA;AAO/C;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH;;;;;;GAMG;AACH,MAAM,MAAM,YAAY,GAAG;IACzB;8EAC0E;IAC1E,MAAM,CAAC,EAAE,UAAU,CAAC,OAAO,CAAC,GAAG,IAAI,CAAA;IACnC;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,UAAU,CAAC,OAAO,CAAC,EAAE,GAAG,IAAI,CAAA;CACxC,CAAA;AAKD,wBAAgB,KAAK,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,CAAC,GAAG,CAAC,CAAA;AAClG,wBAAgB,KAAK,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC,EAAE,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,CAAC,GAAG,CAAC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"regex.d.ts","sourceRoot":"","sources":["../../src/combinators/regex.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAyC,QAAQ,EAAE,MAAM,aAAa,CAAA;AAM9F;;;;;;;;;GASG;AACH,MAAM,MAAM,qBAAqB,GAAG,CAAC,OAAO,EAAE,MAAM,KAAK;IAAE,QAAQ,EAAE,QAAQ,CAAC;IAAC,eAAe,EAAE,OAAO,CAAA;CAAE,CAAA;AAIzG,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,qBAAqB,GAAG,IAAI,CAE3E;
|
|
1
|
+
{"version":3,"file":"regex.d.ts","sourceRoot":"","sources":["../../src/combinators/regex.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAyC,QAAQ,EAAE,MAAM,aAAa,CAAA;AAM9F;;;;;;;;;GASG;AACH,MAAM,MAAM,qBAAqB,GAAG,CAAC,OAAO,EAAE,MAAM,KAAK;IAAE,QAAQ,EAAE,QAAQ,CAAC;IAAC,eAAe,EAAE,OAAO,CAAA;CAAE,CAAA;AAIzG,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,qBAAqB,GAAG,IAAI,CAE3E;AA2FD,wBAAgB,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,KAAK,SAAK,GAAG,UAAU,CAAC,MAAM,CAAC,CAsD9E"}
|
|
@@ -1,13 +1,39 @@
|
|
|
1
|
-
import type { Combinator } from '../types.ts';
|
|
1
|
+
import type { Combinator, ParseContext } from '../types.ts';
|
|
2
2
|
export type ScanToOptions = {
|
|
3
|
-
/**
|
|
3
|
+
/**
|
|
4
|
+
* Per-call opaque-unit skippers (balanced parens/brackets, dialect
|
|
5
|
+
* interpolation, …). These EXTEND the grammar-level ambient default: ambient
|
|
6
|
+
* trivia (comments/ws) and ambient `scanSkip` (strings) are applied too, unless
|
|
7
|
+
* `raw`. So a site only needs to list the extra units its scan requires.
|
|
8
|
+
*/
|
|
4
9
|
skip?: Combinator<unknown>[];
|
|
10
|
+
/**
|
|
11
|
+
* Hard opt-out: skip NOTHING ambiently — no trivia, no scanSkip, and (with no
|
|
12
|
+
* per-call `skip`) a pure raw byte-walk. For the rare site that intends to scan
|
|
13
|
+
* literally through comments/strings.
|
|
14
|
+
*/
|
|
15
|
+
raw?: boolean;
|
|
5
16
|
/**
|
|
6
17
|
* If true, reaching EOF without finding the sentinel is a success — returns
|
|
7
18
|
* everything consumed so far. Default false (fail at EOF).
|
|
8
19
|
*/
|
|
9
20
|
orEOF?: boolean;
|
|
10
21
|
};
|
|
22
|
+
/**
|
|
23
|
+
* Resolve the effective ordered skipper list for a scan, folding grammar-level
|
|
24
|
+
* ambient trivia + scanSkip in FRONT of the per-call `skip` (explicit skip
|
|
25
|
+
* EXTENDS the ambient default). Shared by the interpreter `scanTo`/`balanced`;
|
|
26
|
+
* the compiled path bakes the identical list in codegen.
|
|
27
|
+
*
|
|
28
|
+
* raw → [] (no trivia, no scanSkip, no skip)
|
|
29
|
+
* else → [ ...trivia?, ...scanSkip?, ...skip ]
|
|
30
|
+
*
|
|
31
|
+
* The ambient trivia (comments/ws) leads so a sentinel hidden in a comment is
|
|
32
|
+
* never matched, then ambient strings, then the site's extra units. The sentinel
|
|
33
|
+
* itself is still checked before any skipper, so a sentinel that also starts a
|
|
34
|
+
* skip region wins (unchanged priority).
|
|
35
|
+
*/
|
|
36
|
+
export declare function resolveScanSkip(explicitSkip: Combinator<unknown>[], raw: boolean, ctx: ParseContext): Combinator<unknown>[];
|
|
11
37
|
/**
|
|
12
38
|
* Consume input up to (but not including) the sentinel, skipping over any
|
|
13
39
|
* "hole" patterns in order so their contents are never mistaken for the sentinel.
|
|
@@ -19,12 +45,28 @@ export type ScanToOptions = {
|
|
|
19
45
|
* skip: [cssComment, stringLit, balanced('(', ')'), balanced('[', ']')],
|
|
20
46
|
* })
|
|
21
47
|
*/
|
|
22
|
-
export declare function scanTo(sentinel: Combinator<unknown>, { skip, orEOF }?: ScanToOptions): Combinator<string>;
|
|
48
|
+
export declare function scanTo(sentinel: Combinator<unknown>, { skip, raw, orEOF }?: ScanToOptions): Combinator<string>;
|
|
49
|
+
/** Codegen marker: a balanced combinator that must re-resolve ambient scanSkip
|
|
50
|
+
* into its interior at emit time (the compiled mirror of the interpreter wrapper). */
|
|
51
|
+
export type BalancedAmbient = Combinator<string> & {
|
|
52
|
+
_balancedAmbient?: {
|
|
53
|
+
open: string;
|
|
54
|
+
close: string;
|
|
55
|
+
ownSkip: Combinator<unknown>[];
|
|
56
|
+
};
|
|
57
|
+
};
|
|
23
58
|
/**
|
|
24
59
|
* Match a balanced open/close pair, skipping over any holes inside.
|
|
25
60
|
* Returns the full matched text including delimiters.
|
|
26
61
|
*
|
|
27
62
|
* const parenGroup = balanced('(', ')', { skip: [comment, stringLit] })
|
|
63
|
+
*
|
|
64
|
+
* With no per-call `skip`, a balanced under a grammar that declares
|
|
65
|
+
* `rules({ scanSkip })` consults that ambient opaque-unit set in its INTERIOR too,
|
|
66
|
+
* so a delimiter hidden inside a string/bracket run never closes the balance
|
|
67
|
+
* early — the same footgun closure `scanTo` gets. `raw: true` opts out.
|
|
28
68
|
*/
|
|
29
69
|
export declare function balanced(open: string, close: string, options?: ScanToOptions): Combinator<string>;
|
|
70
|
+
/** Build a balanced open/close interior for a FIXED skip set (no ambient). */
|
|
71
|
+
export declare function buildBalancedInterior(open: string, close: string, skips: Combinator<unknown>[]): Combinator<string>;
|
|
30
72
|
//# sourceMappingURL=scanTo.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scanTo.d.ts","sourceRoot":"","sources":["../../src/combinators/scanTo.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,
|
|
1
|
+
{"version":3,"file":"scanTo.d.ts","sourceRoot":"","sources":["../../src/combinators/scanTo.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,YAAY,EAA2B,MAAM,aAAa,CAAA;AAYpF,MAAM,MAAM,aAAa,GAAG;IAC1B;;;;;OAKG;IACH,IAAI,CAAC,EAAE,UAAU,CAAC,OAAO,CAAC,EAAE,CAAA;IAC5B;;;;OAIG;IACH,GAAG,CAAC,EAAE,OAAO,CAAA;IACb;;;OAGG;IACH,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB,CAAA;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,eAAe,CAC7B,YAAY,EAAE,UAAU,CAAC,OAAO,CAAC,EAAE,EACnC,GAAG,EAAE,OAAO,EACZ,GAAG,EAAE,YAAY,GAChB,UAAU,CAAC,OAAO,CAAC,EAAE,CAUvB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,MAAM,CACpB,QAAQ,EAAE,UAAU,CAAC,OAAO,CAAC,EAC7B,EAAE,IAAI,EAAE,GAAW,EAAE,KAAa,EAAE,GAAE,aAAkB,GACvD,UAAU,CAAC,MAAM,CAAC,CAuEpB;AAED;sFACsF;AACtF,MAAM,MAAM,eAAe,GAAG,UAAU,CAAC,MAAM,CAAC,GAAG;IACjD,gBAAgB,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,UAAU,CAAC,OAAO,CAAC,EAAE,CAAA;KAAE,CAAA;CACnF,CAAA;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,QAAQ,CACtB,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,MAAM,EACb,OAAO,GAAE,aAAkB,GAC1B,UAAU,CAAC,MAAM,CAAC,CA6BpB;AAED,8EAA8E;AAC9E,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,UAAU,CAAC,OAAO,CAAC,EAAE,GAC3B,UAAU,CAAC,MAAM,CAAC,CA6CpB"}
|
|
@@ -7,19 +7,41 @@
|
|
|
7
7
|
* object allocation per node.
|
|
8
8
|
*/
|
|
9
9
|
import type { Combinator, FirstSet, ParseResult, ParseContext, ParseError } from '../types.ts';
|
|
10
|
+
import { type GatingReport, type GatingWarnLevel } from '../analysis/gating.ts';
|
|
10
11
|
/**
|
|
11
|
-
* A rule's LEADING first-set as a fuse-resolvable recipe
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
* (
|
|
12
|
+
* A rule's LEADING first-set as a fuse-resolvable recipe.
|
|
13
|
+
*
|
|
14
|
+
* A recipe is a UNION of ORDERED CHAINS (`alts`). Each chain is the leading-term
|
|
15
|
+
* sequence of one alternative; `fusedBody()` resolves it left-to-right against the
|
|
16
|
+
* WINNING rules, UNIONING each segment's first-set and STOPPING after the first
|
|
17
|
+
* segment that is not nullable. A segment is either
|
|
18
|
+
* - a concrete first-set (`set`) with its build-time-known `nullable` flag, or
|
|
19
|
+
* - a rule REFERENCE (`ref`) whose first-set AND nullability are resolved at fuse
|
|
20
|
+
* time (`nullable` is a conservative placeholder until then).
|
|
21
|
+
*
|
|
22
|
+
* Why the ORDER + per-segment nullability matter (the bug this shape fixes): a rule
|
|
23
|
+
* like `sequence(g.CssAstSyntaxStatementAtRuleName, prelude, ';')` leads with a
|
|
24
|
+
* cross-artifact ref. At compile time that ref's nullability is unknown, so a flat
|
|
25
|
+
* "concrete chars + ref names" recipe would conservatively treat it as nullable and
|
|
26
|
+
* union the FOLLOWING terms' first-sets — and the prelude's first-set is `any` (a
|
|
27
|
+
* `scanTo`), collapsing the whole recipe to `any` and losing first-char dispatch.
|
|
28
|
+
* Keeping the leading chain ordered lets fuse-time resolution see the ref is actually
|
|
29
|
+
* NON-nullable and STOP — so the arm gates on `{@}`, exactly as a grammar-local
|
|
30
|
+
* `regex(/@…/)` would. Grammar authors had to hand-copy those recognizers to work
|
|
31
|
+
* around this; the ordered chain removes the need.
|
|
32
|
+
*
|
|
33
|
+
* Soundness: the resolved set is always a SUPERSET of the rule's true first chars.
|
|
34
|
+
* An unknown/opaque construct contributes its shallow `_meta.firstSet`; a ref whose
|
|
35
|
+
* nullability can't be resolved defaults to nullable (keep unioning — never drops a
|
|
36
|
+
* valid first char).
|
|
19
37
|
*/
|
|
38
|
+
export type FirstSetSeg = {
|
|
39
|
+
set: FirstSet;
|
|
40
|
+
nullable: boolean;
|
|
41
|
+
ref?: string;
|
|
42
|
+
};
|
|
20
43
|
export type FirstSetRecipe = {
|
|
21
|
-
|
|
22
|
-
refs: string[];
|
|
44
|
+
alts: FirstSetSeg[][];
|
|
23
45
|
};
|
|
24
46
|
export declare function leadingFirstSetRecipe(p: Combinator<unknown>, seen?: Set<Combinator<unknown>>): FirstSetRecipe;
|
|
25
47
|
import { type GrammarCoveragePlan } from './grammar-coverage-ids.ts';
|
|
@@ -65,6 +87,14 @@ export type CompiledParser<T> = {
|
|
|
65
87
|
inlineExpression: string | null;
|
|
66
88
|
/** Present only when compiled with `{ coverage: true }`. */
|
|
67
89
|
coverageDefinitions?: readonly import('./grammar-coverage-ids.ts').GrammarCoverageDefinition[];
|
|
90
|
+
/**
|
|
91
|
+
* Static first-char gating diagnostic for this grammar (per-choice gated/
|
|
92
|
+
* recoverable/ungated + offending arm + cause + anti-patterns). Computed unless
|
|
93
|
+
* `{ gating: 'off' }`. Warnings for genuinely-ungated hot choices are emitted at
|
|
94
|
+
* compile time by default (see the `gating` option); this is the programmatic
|
|
95
|
+
* view for CI budget snapshots. See `src/analysis/gating.ts`.
|
|
96
|
+
*/
|
|
97
|
+
gating?: GatingReport;
|
|
68
98
|
};
|
|
69
99
|
/**
|
|
70
100
|
* Dependency manifest for the linkable form: for each rule in the map, the set
|
|
@@ -84,12 +114,29 @@ export declare function ruleDependencies(ruleMap: ReadonlyArray<readonly [string
|
|
|
84
114
|
*
|
|
85
115
|
* @see https://www.greadme.com/blog/security/what-is-content-security-policy-complete-guide
|
|
86
116
|
*/
|
|
117
|
+
/**
|
|
118
|
+
* Resolve the gating-diagnostic level: explicit option wins, else the
|
|
119
|
+
* `PARSEMAN_GATING` env var, else default-on `'warn'`. `'off'` skips the analysis
|
|
120
|
+
* entirely; `'warn'` prints via `console.warn`; `'error'` throws when any
|
|
121
|
+
* genuinely-ungated hot choice (or anti-pattern) is found.
|
|
122
|
+
*/
|
|
123
|
+
/**
|
|
124
|
+
* The `gating` compile option. A bare level is shorthand for `{ level }`; the
|
|
125
|
+
* object form adds the accepted-snapshot `accept` allowlist (choice ids that are
|
|
126
|
+
* intentionally ungated — silent, and excluded from the `'error'` gate).
|
|
127
|
+
*/
|
|
128
|
+
export type GatingOption = GatingWarnLevel | {
|
|
129
|
+
level?: GatingWarnLevel;
|
|
130
|
+
accept?: Iterable<string>;
|
|
131
|
+
};
|
|
87
132
|
export declare function compile<T>(combinator: Combinator<T>, mapFnSources?: string[], opts?: {
|
|
88
133
|
recovery?: boolean;
|
|
89
134
|
coverage?: boolean;
|
|
135
|
+
gating?: GatingOption;
|
|
90
136
|
}): CompiledParser<T>;
|
|
91
137
|
export declare function compileRuleMap(ruleMap: ReadonlyArray<readonly [string, Combinator<unknown>]>, opts?: {
|
|
92
138
|
trivia?: Combinator<unknown>;
|
|
139
|
+
scanSkip?: Combinator<unknown>[];
|
|
93
140
|
recovery?: boolean;
|
|
94
141
|
coverage?: boolean;
|
|
95
142
|
}): {
|
|
@@ -115,6 +162,14 @@ export declare function compileRuleMap(ruleMap: ReadonlyArray<readonly [string,
|
|
|
115
162
|
* Returns null on the same "can't inline" conditions as `compileRuleMap`.
|
|
116
163
|
*/
|
|
117
164
|
export type LinkablePieces = {
|
|
165
|
+
/**
|
|
166
|
+
* The parseman version that produced this artifact (the ARTIFACT VERSION LOCK; see
|
|
167
|
+
* `src/version.ts`). REQUIRED — `compileLinkable` always stamps it. `fusedBody`
|
|
168
|
+
* refuses to link a piece whose stamp differs from the linking parseman OR is absent
|
|
169
|
+
* (a stale pre-invariant artifact, whose recipe/pieces shape is unsupported).
|
|
170
|
+
* Artifacts are version-locked; the format carries no cross-version back-compat.
|
|
171
|
+
*/
|
|
172
|
+
v: string;
|
|
118
173
|
ns: string;
|
|
119
174
|
keys: string[];
|
|
120
175
|
prelude: string[];
|
|
@@ -127,11 +182,19 @@ export type LinkablePieces = {
|
|
|
127
182
|
*/
|
|
128
183
|
firstSets: Map<string, FirstSet>;
|
|
129
184
|
/**
|
|
130
|
-
* Per-rule
|
|
131
|
-
*
|
|
185
|
+
* Per-rule nullability (does the rule match the empty string?). `fusedBody()`
|
|
186
|
+
* reads it when resolving an ordered-chain recipe segment that REFERENCES this
|
|
187
|
+
* rule: a non-nullable ref terminates the leading chain (stop unioning the tail),
|
|
188
|
+
* a nullable one lets it continue. Optional/absent → treated as nullable (the safe
|
|
189
|
+
* default: keep unioning, never drop a valid first char).
|
|
190
|
+
*/
|
|
191
|
+
nullable?: Map<string, boolean>;
|
|
192
|
+
/**
|
|
193
|
+
* Per-rule LEADING first-set recipe — a union of ordered leading-term chains.
|
|
194
|
+
* `fusedBody()` fixpoint-resolves the leading ref names over the WINNING rules so a
|
|
132
195
|
* `sequence(ref, …)`-led arm/node dispatches on the ref's real first char —
|
|
133
|
-
* matching a monolithic compile — instead of degrading to always-try because
|
|
134
|
-
*
|
|
196
|
+
* matching a monolithic compile — instead of degrading to always-try because the
|
|
197
|
+
* ref baked `any`. Optional (absent for hand-built pieces → `any`, always try).
|
|
135
198
|
*/
|
|
136
199
|
firstSetRecipes?: Map<string, FirstSetRecipe>;
|
|
137
200
|
deps: Map<string, string[]>;
|
|
@@ -152,6 +215,7 @@ export type LinkablePieces = {
|
|
|
152
215
|
};
|
|
153
216
|
export declare function compileLinkable(ruleMapArg: ReadonlyArray<readonly [string, Combinator<unknown>]>, ns: string, opts?: {
|
|
154
217
|
trivia?: Combinator<unknown>;
|
|
218
|
+
scanSkip?: Combinator<unknown>[];
|
|
155
219
|
recovery?: boolean;
|
|
156
220
|
captureTerminals?: boolean;
|
|
157
221
|
coverage?: GrammarCoveragePlan;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codegen.d.ts","sourceRoot":"","sources":["../../src/compiler/codegen.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,KAAK,EAAE,UAAU,EAAa,QAAQ,EAAE,WAAW,EAAE,YAAY,EAAE,UAAU,EAA4B,MAAM,aAAa,CAAA;AAKnI
|
|
1
|
+
{"version":3,"file":"codegen.d.ts","sourceRoot":"","sources":["../../src/compiler/codegen.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,KAAK,EAAE,UAAU,EAAa,QAAQ,EAAE,WAAW,EAAE,YAAY,EAAE,UAAU,EAA4B,MAAM,aAAa,CAAA;AAKnI,OAAO,EAAuC,KAAK,YAAY,EAAE,KAAK,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAEpH;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAOH,MAAM,MAAM,WAAW,GAAG;IAAE,GAAG,EAAE,QAAQ,CAAC;IAAC,QAAQ,EAAE,OAAO,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,CAAA;AAC5E,MAAM,MAAM,cAAc,GAAG;IAAE,IAAI,EAAE,WAAW,EAAE,EAAE,CAAA;CAAE,CAAA;AACtD,wBAAgB,qBAAqB,CAAC,CAAC,EAAE,UAAU,CAAC,OAAO,CAAC,EAAE,IAAI,GAAE,GAAG,CAAC,UAAU,CAAC,OAAO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;IAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAAC,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,EAAE,mBAAmB,CAAA;CAAE,GACxJ,cAAc,GAAG,IAAI,CA2NvB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"linker.d.ts","sourceRoot":"","sources":["../../src/compiler/linker.ts"],"names":[],"mappings":"AAsBA,OAAO,KAAK,EAAE,cAAc,EAAkB,MAAM,cAAc,CAAA;
|
|
1
|
+
{"version":3,"file":"linker.d.ts","sourceRoot":"","sources":["../../src/compiler/linker.ts"],"names":[],"mappings":"AAsBA,OAAO,KAAK,EAAE,cAAc,EAAkB,MAAM,cAAc,CAAA;AAGlE,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,oBAAoB,EAAY,YAAY,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAanH,wBAAgB,QAAQ,CACtB,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC,EAC7C,EAAE,CAAC,EAAE,MAAM,EACX,MAAM,CAAC,EAAE,UAAU,CAAC,OAAO,CAAC,GAC3B,cAAc,CAIhB;AAED,MAAM,MAAM,mBAAmB,GAAG;IAChC;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,OAAO,GAAG,SAAS,MAAM,EAAE,GAAG,oBAAoB,CAAA;CAC9D,CAAA;AAyBD;;;;;;;;;GASG;AACH,wBAAgB,YAAY,CAAC,OAAO,CAAC,EAAE,mBAAmB,GAAG,SAAS,CAAA;AACtE,wBAAgB,YAAY,CAC1B,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,aAAa,CAAC,OAAO,CAAC,EAChC,MAAM,EAAE,OAAO,EACf,IAAI,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,EACpC,WAAW,CAAC,EAAE,aAAa,CAAC,OAAO,CAAC,EACp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