parseman 0.59.3 → 0.60.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/diagnostics.js +876 -190
- package/dist/analysis/diagnostics.js.map +3 -3
- package/dist/cli/index.js +876 -190
- package/dist/cli/index.js.map +3 -3
- package/dist/combinators/dispatch.d.ts +13 -1
- package/dist/combinators/dispatch.d.ts.map +1 -1
- package/dist/combinators/first-set.d.ts +35 -2
- package/dist/combinators/first-set.d.ts.map +1 -1
- package/dist/combinators/regex.d.ts.map +1 -1
- package/dist/combinators/trivia-boundary.d.ts +11 -0
- package/dist/combinators/trivia-boundary.d.ts.map +1 -1
- package/dist/combinators/trivia-skip.d.ts +1 -1
- package/dist/combinators/trivia-skip.d.ts.map +1 -1
- package/dist/compiler/token-alphabet.d.ts +2 -0
- package/dist/compiler/token-alphabet.d.ts.map +1 -1
- package/dist/compiler/token-capability.js +65 -53
- package/dist/compiler/token-capability.js.map +2 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +896 -199
- package/dist/index.js.map +3 -3
- package/dist/plugin/evaluator.d.ts.map +1 -1
- package/dist/plugin/index.js +903 -201
- package/dist/plugin/index.js.map +3 -3
- package/dist/regex/first-set.d.ts +19 -0
- package/dist/regex/first-set.d.ts.map +1 -1
- package/dist/table/assemble.d.ts +15 -1
- package/dist/table/assemble.d.ts.map +1 -1
- package/dist/table/child-slots.d.ts.map +1 -1
- package/dist/table/compile-rule-map.d.ts +1 -1
- package/dist/table/compile-rule-map.d.ts.map +1 -1
- package/dist/table/compile.d.ts +1 -1
- package/dist/table/emit-assembly.d.ts +8 -2
- package/dist/table/emit-assembly.d.ts.map +1 -1
- package/dist/table/emit.d.ts +4 -3
- package/dist/table/emit.d.ts.map +1 -1
- package/dist/table/encode.d.ts.map +1 -1
- package/dist/table/exec.d.ts +0 -35
- package/dist/table/exec.d.ts.map +1 -1
- package/dist/table/factor-choice.d.ts +27 -0
- package/dist/table/factor-choice.d.ts.map +1 -1
- package/dist/table/gap-gate.d.ts +11 -0
- package/dist/table/gap-gate.d.ts.map +1 -0
- package/dist/table/index.js +926 -201
- package/dist/table/index.js.map +3 -3
- package/dist/table/lex-program.d.ts.map +1 -1
- package/dist/table/ops.d.ts +35 -16
- package/dist/table/ops.d.ts.map +1 -1
- package/dist/table/program.d.ts +6 -1
- package/dist/table/program.d.ts.map +1 -1
- package/dist/types.d.ts +16 -4
- package/dist/types.d.ts.map +1 -1
- package/dist/version.d.ts +1 -1
- package/package.json +2 -4
- package/src/analysis/duplication.ts +1 -1
- package/src/combinators/attempt.ts +1 -1
- package/src/combinators/dispatch.ts +30 -6
- package/src/combinators/first-set.ts +55 -12
- package/src/combinators/node.ts +1 -1
- package/src/combinators/regex.ts +9 -4
- package/src/combinators/repeat.ts +6 -6
- package/src/combinators/sequence.ts +1 -1
- package/src/combinators/trivia-boundary.ts +18 -0
- package/src/combinators/trivia-skip.ts +1 -1
- package/src/compiler/ir-serialize.ts +1 -1
- package/src/compiler/token-alphabet.ts +3 -1
- package/src/coverage.ts +1 -1
- package/src/index.ts +1 -1
- package/src/plugin/evaluator.ts +8 -3
- package/src/regex/first-set.ts +37 -3
- package/src/table/assemble.ts +176 -30
- package/src/table/child-slots.ts +8 -3
- package/src/table/compile-rule-map.ts +7 -4
- package/src/table/compile.ts +1 -1
- package/src/table/emit-assembly.ts +184 -33
- package/src/table/emit.ts +6 -4
- package/src/table/encode.ts +469 -74
- package/src/table/exec.ts +38 -82
- package/src/table/factor-choice.ts +62 -0
- package/src/table/fail-clean.ts +2 -2
- package/src/table/gap-gate.ts +55 -0
- package/src/table/hold-gap.ts +2 -2
- package/src/table/lex-program.ts +15 -6
- package/src/table/ops.ts +38 -16
- package/src/table/program.ts +7 -2
- package/src/table/select-hot.ts +7 -2
- package/src/types.ts +12 -5
- package/src/version.ts +1 -1
- package/dist/table/encode-baseline.d.ts +0 -16
- package/dist/table/encode-baseline.d.ts.map +0 -1
- package/dist/table/exec-baseline.d.ts +0 -9
- package/dist/table/exec-baseline.d.ts.map +0 -1
- package/src/table/encode-baseline.ts +0 -346
- package/src/table/exec-baseline.ts +0 -557
|
@@ -42,6 +42,14 @@ import type { FirstSet } from '../types.ts';
|
|
|
42
42
|
* match empty, so callers that delete code on a `false` keep their proof.
|
|
43
43
|
*/
|
|
44
44
|
export declare function regexCanMatchEmpty(source: string): boolean;
|
|
45
|
+
/**
|
|
46
|
+
* The first chars of a NON-EMPTY match of `source`, nullable or not: the set
|
|
47
|
+
* `firstSetFromRegex` reports for a pattern that must consume, without its
|
|
48
|
+
* widening of a nullable one to `any()`. Only a caller that accounts for the
|
|
49
|
+
* empty match itself may use it (`sequenceSet`). `any()` when unparseable.
|
|
50
|
+
* `flags` reads atoms as `firstSetFromRegex` does.
|
|
51
|
+
*/
|
|
52
|
+
export declare function consumingFirstSetFromRegex(source: string, flags?: string): FirstSet;
|
|
45
53
|
/**
|
|
46
54
|
* `flags` decides how atoms read: under `u`/`v` each is one code point, else one
|
|
47
55
|
* code unit, so a non-`u` set holds a high surrogate where an astral character
|
|
@@ -52,4 +60,15 @@ export declare function firstSetFromRegex(source: string, flags?: string): {
|
|
|
52
60
|
firstSet: FirstSet;
|
|
53
61
|
canMatchNewline: boolean;
|
|
54
62
|
};
|
|
63
|
+
/**
|
|
64
|
+
* The first TWO characters every match of `source` begins with, where the
|
|
65
|
+
* pattern says them outright: a one-character class and then another, or a
|
|
66
|
+
* positive lookahead over one (`:(?=[ \t])`). `undefined` otherwise. Every
|
|
67
|
+
* match that starts with a character of `first` has a second character, and it
|
|
68
|
+
* is in `second`. `flags` reads atoms as `firstSetFromRegex` does.
|
|
69
|
+
*/
|
|
70
|
+
export declare function regexFirstTwo(source: string, flags?: string): {
|
|
71
|
+
first: FirstSet;
|
|
72
|
+
second: FirstSet;
|
|
73
|
+
} | undefined;
|
|
55
74
|
//# sourceMappingURL=first-set.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"first-set.d.ts","sourceRoot":"","sources":["../../src/regex/first-set.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"first-set.d.ts","sourceRoot":"","sources":["../../src/regex/first-set.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAoT3C;;;;;GAKG;AACH;;;;;;;;;;;;GAYG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAE1D;AAED;;;;;;GAMG;AACH,wBAAgB,0BAA0B,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,SAAK,GAAG,QAAQ,CAE/E;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,SAAK,GAAG;IAAE,QAAQ,EAAE,QAAQ,CAAC;IAAC,eAAe,EAAE,OAAO,CAAA;CAAE,CAa9G;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,SAAK,GAAG;IAAE,KAAK,EAAE,QAAQ,CAAC;IAAC,MAAM,EAAE,QAAQ,CAAA;CAAE,GAAG,SAAS,CAW3G"}
|
package/dist/table/assemble.d.ts
CHANGED
|
@@ -153,6 +153,20 @@ export type Assembly = {
|
|
|
153
153
|
* ONE walk. Each site is lowered at most once and memoised by its code offset,
|
|
154
154
|
* so a subtree shared by two parents is one piece with two references to it.
|
|
155
155
|
*/
|
|
156
|
+
/**
|
|
157
|
+
* A printed factory takes its helpers BY POSITION (`EMITTED_PARAMS`), so one printed
|
|
158
|
+
* against a different helper list would bind the wrong function to a name and run
|
|
159
|
+
* wrong rather than fail. A factory printed by 0.59.x guards only against FEWER
|
|
160
|
+
* helpers, and one printed before 0.59.0 has no guard at all. So the runtime checks
|
|
161
|
+
* too, before calling it: the assembly's printed `arity` must be exactly the list it
|
|
162
|
+
* passes. It reads that printed number, never `factory.length`, which a minifier that
|
|
163
|
+
* drops unused trailing parameters lowers on a valid artifact. An assembly printed
|
|
164
|
+
* before 0.60.0 carries no `arity` and is refused. A factory this version prints also
|
|
165
|
+
* checks the count it is called with (`FACTORY_ARITY_GUARD`, `emit.ts`).
|
|
166
|
+
*/
|
|
167
|
+
export declare function assertFactoryArity(pre: {
|
|
168
|
+
readonly arity?: number;
|
|
169
|
+
}): void;
|
|
156
170
|
export declare function assemble(t: ResolvedTable, prog: TableProgram, cfg: RunCfg): Assembly;
|
|
157
171
|
/**
|
|
158
172
|
* How many times each table site runs while `parse` drives the program — the
|
|
@@ -213,7 +227,7 @@ export declare class AssemblyCache {
|
|
|
213
227
|
* That is not a hole in G5, it is G5's own first clause: "quickly building the
|
|
214
228
|
* grammar reference ON RUN START, making some swaps on rules or sub-rules, and
|
|
215
229
|
* then the run actually runs with no logic branching for that option input"
|
|
216
|
-
* (`notes/TABLE-DRIVER.md`). This IS the run-start step. What the criterion
|
|
230
|
+
* (`notes/history/TABLE-DRIVER.md`). This IS the run-start step. What the criterion
|
|
217
231
|
* forbids is the second sentence, and past this call there is no option read
|
|
218
232
|
* anywhere — `scripts/check-invariants.mjs` INV-6 decides that mechanically.
|
|
219
233
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assemble.d.ts","sourceRoot":"","sources":["../../src/table/assemble.ts"],"names":[],"mappings":"AAmEA,OAAO,KAAK,EAAE,UAAU,EAAsB,YAAY,EAA0B,MAAM,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"assemble.d.ts","sourceRoot":"","sources":["../../src/table/assemble.ts"],"names":[],"mappings":"AAmEA,OAAO,KAAK,EAAE,UAAU,EAAsB,YAAY,EAA0B,MAAM,aAAa,CAAA;AAgDvG;;;;;;;;;;;;GAYG;A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AC,GAAG,EAAE,YAAY,GAAG,QAAQ,CAkClC;CACF;AAED;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE,YAAY,GAAG,cAAc,EAAE,KAAK,EAAE,MAAM,GAAG,SAAS,CAAA;AAC3F;;;;;;;;;;;GAWG;AACH,wBAAgB,UAAU,CACxB,MAAM,EAAE,YAAY,GAAG,cAAc,EACrC,gBAAgB,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,GACnD,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"child-slots.d.ts","sourceRoot":"","sources":["../../src/table/child-slots.ts"],"names":[],"mappings":"AASA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,SAAS,CAAC,MAAM,CAAC,EAAE,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,OAAO,
|
|
1
|
+
{"version":3,"file":"child-slots.d.ts","sourceRoot":"","sources":["../../src/table/child-slots.ts"],"names":[],"mappings":"AASA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,SAAS,CAAC,MAAM,CAAC,EAAE,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,OAAO,CAiFtF"}
|
|
@@ -57,7 +57,7 @@ export type TableRuleMapOptions = {
|
|
|
57
57
|
* `coverage: grammarCoverage` here for every `rules()` grammar — so this is what
|
|
58
58
|
* makes `{ grammarCoverage: true }` a working build under the table lowering.
|
|
59
59
|
*
|
|
60
|
-
* COUNTERS ONLY, per the owner ruling recorded in `notes/RELEASE-0.48-TARGET.md`
|
|
60
|
+
* COUNTERS ONLY, per the owner ruling recorded in `notes/history/RELEASE-0.48-TARGET.md`
|
|
61
61
|
* §1; `_grammarTrace` parity is 0.48 work. The plugin's coverage path needs the
|
|
62
62
|
* DEFINITIONS STAMP and the HITS, and both are here.
|
|
63
63
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compile-rule-map.d.ts","sourceRoot":"","sources":["../../src/table/compile-rule-map.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAE7C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAA;AACnD,OAAO,EAAgD,KAAK,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AAU3G,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAC3D,OAAO,EAAoB,KAAK,yBAAyB,EAAE,MAAM,qCAAqC,CAAA;AACtG,OAAO,EAAiC,KAAK,iBAAiB,EAAE,MAAM,uBAAuB,CAAA;AAE7F;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAChC,2EAA2E;IAC3E,QAAQ,CAAC,MAAM,CAAC,EAAE,UAAU,CAAC,OAAO,CAAC,CAAA;IACrC;;;;OAIG;IACH,QAAQ,CAAC,UAAU,CAAC,EAAE,OAAO,CAAA;IAC7B,gFAAgF;IAChF,QAAQ,CAAC,QAAQ,CAAC,EAAE,UAAU,CAAC,OAAO,CAAC,EAAE,CAAA;IACzC,mGAAmG;IACnG,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAC3B,QAAQ,CAAC,QAAQ,CAAC,EAAE,QAAQ,CAAA;IAC5B,QAAQ,CAAC,UAAU,CAAC,EAAE,OAAO,CAAA;IAC7B;;;;;;;;OAQG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAC3B,6EAA6E;IAC7E,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAA;IAC5B;;;;;;;;;OASG;IACH,QAAQ,CAAC,SAAS,CAAC,E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;;;;;;;;;;;GAcG;AACH,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,aAAa,CAAC,SAAS,CAAC,MAAM,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,EAC9D,IAAI,GAAE,mBAAwB,GAC7B,IAAI,CAAC,oBAAoB,EAAE,aAAa,GAAG,yBAAyB,GAAG,gBAAgB,CAAC,GAAG,IAAI,CAiBjG;AAmCD,wBAAgB,cAAc,CAC5B,OAAO,EAAE,aAAa,CAAC,SAAS,CAAC,MAAM,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,EAC9D,IAAI,GAAE,mBAAwB,GAC7B,oBAAoB,GAAG,IAAI,CA0H7B"}
|
package/dist/table/compile.d.ts
CHANGED
|
@@ -34,7 +34,7 @@ export type TableCompileOptions = {
|
|
|
34
34
|
*
|
|
35
35
|
* COUNTERS ONLY — owner ruling. `_grammarTrace`'s six phases are emitted at
|
|
36
36
|
* ~40 fine-grained sites by codegen and are deferred to 0.48
|
|
37
|
-
* (`notes/RELEASE-0.48-TARGET.md` §1). A table entry rejects a context carrying
|
|
37
|
+
* (`notes/history/RELEASE-0.48-TARGET.md` §1). A table entry rejects a context carrying
|
|
38
38
|
* a trace sink before parsing: silently returning an empty trace would look
|
|
39
39
|
* exactly like a real trace whose grammar sites were never visited. The
|
|
40
40
|
* plugin's coverage path reads `_grammarCoverage` and the definitions stamp,
|
|
@@ -77,7 +77,7 @@ export declare class Unemittable extends Error {
|
|
|
77
77
|
* mismatch binds the wrong function to the wrong name and yields a parser that
|
|
78
78
|
* runs and is wrong, which no type in this file would catch.
|
|
79
79
|
*/
|
|
80
|
-
export declare const EMITTED_PARAMS: readonly ['EC', 'FAIL', 'K', 'FX', 'FNS', 'MASK', 'CLS', 'AFX', 'TRIVIA', '
|
|
80
|
+
export declare const EMITTED_PARAMS: readonly ['EC', 'FAIL', 'K', 'FX', 'FNS', 'MASK', 'CLS', 'AFX', 'TRIVIA', 'TRIVIASCAN', 'SCANS', 'DISP', 'DSP', 'EMPTY_FX', 'EMPTY_CH', 'EMPTY_TLOG', 'EMPTY_TL', 'cstCaptureActive', 'pushCstLeaf', 'pushCstChild', 'rollbackTriviaAt', 'rollbackScannedTriviaAt', 'failAt', 'classHas', 'consumeTrivia', 'buildFieldMap', 'projectChild', 'unwrapChild', 'demoteCapturedToRaw', 'cstLeavesLen', 'skipTriviaScanned', 'needsDeferredTriviaCommit', 'advanceTrivia', 'refuseUnclassifiedRootScope', 'spanLines', 'rawEntry', 'lead', 'asciiFoldKey', 'ROUTED_FX', 'SENTS', 'matchesAt', 'recoverScan', 'orSentinel', 'captureError', 'RECOG', 'LEX', 'adjacencyHolds', 'LEXPROG', 'LEAD', 'triviaFieldCapture', 'skipDeferredTrivia', 'collapseEmpty', '_SP', '_LF', '_ND', '_FC', '_BUF', 'GAP'];
|
|
81
81
|
/**
|
|
82
82
|
* THE THREE POOLS, SAID AS INDICES INTO THE PROGRAM.
|
|
83
83
|
*
|
|
@@ -161,5 +161,11 @@ export declare function emitAssemblySource(t: ResolvedTable, prog: TableProgram,
|
|
|
161
161
|
* the marks that bit adds move no site in or out of a budget; the artifact is
|
|
162
162
|
* then emitted with them.
|
|
163
163
|
*/
|
|
164
|
-
scanSinkNeutral?: boolean
|
|
164
|
+
scanSinkNeutral?: boolean,
|
|
165
|
+
/**
|
|
166
|
+
* Lower every gap gate (`gap-gate.ts`) as the item it wraps. A selection is
|
|
167
|
+
* ranked on this lowering, so adding the gates moves no site's place in the
|
|
168
|
+
* order; the fit is judged by the source that ships, gates included.
|
|
169
|
+
*/
|
|
170
|
+
gapNeutral?: boolean): EmitResult;
|
|
165
171
|
//# sourceMappingURL=emit-assembly.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"emit-assembly.d.ts","sourceRoot":"","sources":["../../src/table/emit-assembly.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AACH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AAE,YAAY,EAClB,GAAG,EAAE;IACH,OAAO,EAAE,OAAO,CAAA;IAChB,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B,iBAAiB,CAAC,EAAE,CAAC,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,GAAG,SAAS,CAAA;IAC3D,UAAU,EAAE,OAAO,CAAA;IACnB,QAAQ,EAAE,OAAO,CAAA;IACjB,QAAQ,EAAE,OAAO,CAAA;IACjB,KAAK,EAAE,OAAO,CAAA;CACf,EACD,QAAQ,GAAE,SAAS,MAAM,EAAO,EAChC,WAAW,UAAQ,EACnB,MAAM,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC;AAC5B;;;;;GAKG;AACH,eAAe,UAAQ;AACvB;;;;GAIG;AACH,UAAU,UAAQ,GACjB,UAAU,CAg0EZ"}
|
package/dist/table/emit.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import type { FoldedProgram, TableProgram } from './program.ts';
|
|
2
2
|
import { type RunCfg } from './assemble.ts';
|
|
3
3
|
/**
|
|
4
|
-
* Opens every printed assembly factory.
|
|
5
|
-
*
|
|
6
|
-
*
|
|
4
|
+
* Opens every printed assembly factory. Helpers are bound BY POSITION, so a runtime that
|
|
5
|
+
* passes any other number of them, fewer or more, binds the wrong function to a name;
|
|
6
|
+
* refuse it when the assembly is built, instead of failing partway through the first parse
|
|
7
|
+
* on whichever helper is reached first. Runs once per assembly.
|
|
7
8
|
*/
|
|
8
9
|
export declare const FACTORY_ARITY_GUARD: string;
|
|
9
10
|
/**
|
package/dist/table/emit.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"emit.d.ts","sourceRoot":"","sources":["../../src/table/emit.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA;AAG/D,OAAO,EAAU,KAAK,MAAM,EAAE,MAAM,eAAe,CAAA;AAGnD
|
|
1
|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,IAAI,EAAE,YAAY,EAAE,IAAI,GAAE,qBAA0B,GAAG,MAAM,CAkBhG;AAED,MAAM,MAAM,iBAAiB,GAAG,WAAW,GAAG;IAC5C;;;OAGG;IACH,QAAQ,CAAC,KAAK,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAA;CAClD,CAAA;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,aAAa,EAAE,IAAI,GAAE,iBAAsB,GAAG,MAAM,CA0B5F;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,YAAY,GAAG,MAAM,CAExD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"encode.d.ts","sourceRoot":"","sources":["../../src/table/encode.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"encode.d.ts","sourceRoot":"","sources":["../../src/table/encode.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAgB,UAAU,EAAuB,MAAM,aAAa,CAAA;AAyBhF,OAAO,KAAK,EAAmE,YAAY,EAAc,MAAM,cAAc,CAAA;AAS7H,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAA;AA0B9E,8EAA8E;AAC9E,qBAAa,oBAAqB,SAAQ,KAAK;IAC7C,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;IACpB,YAAY,GAAG,EAAE,MAAM,EAAqE;CAC7F;AAED,8EAA8E;AAC9E,MAAM,MAAM,aAAa,GAAG;IAC1B,QAAQ,CAAC,QAAQ,CAAC,EAAE,KAAK,GAAG,KAAK,CAAA;IACjC,QAAQ,CAAC,UAAU,CAAC,EAAE,OAAO,CAAA;IAC7B;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAC3B;;;;;;;;;;;;;OAaG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,mBAAmB,CAAA;CACxC,CAAA;AA8sED,wBAAgB,WAAW,CACzB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC,EAC5C,QAAQ,GAAE,aAAkB,GAC3B,YAAY,CAEd;AAED;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC,EAC5C,QAAQ,GAAE,aAAkB,GAC3B;IAAE,IAAI,EAAE,YAAY,CAAC;IAAC,MAAM,EAAE,CAAC,MAAM,GAAG,IAAI,CAAC,EAAE,CAAA;CAAE,CA+BnD"}
|
package/dist/table/exec.d.ts
CHANGED
|
@@ -1,39 +1,4 @@
|
|
|
1
1
|
import { type CompactProgram, type TableProgram, type TableRule } from './program.ts';
|
|
2
|
-
/**
|
|
3
|
-
* DIAGNOSTIC ROW COUNTER — off unless `PM_TABLE_COUNT=1` at process start.
|
|
4
|
-
*
|
|
5
|
-
* Read ONCE, at module load, into a module const, so this is not the per-parse
|
|
6
|
-
* option branch G5 forbids: with the variable false the whole thing folds away
|
|
7
|
-
* after tier-up. It exists because "too many rows" and "each row too slow" are
|
|
8
|
-
* different defects with the same symptom, and only a count separates them.
|
|
9
|
-
* No timing run in this repo may set it — see `bench/jess/table-rows.ts`.
|
|
10
|
-
*/
|
|
11
|
-
export declare const tableCounters: {
|
|
12
|
-
rows: number;
|
|
13
|
-
byOp: Int32Array;
|
|
14
|
-
/** Distinct reducer/host functions actually reaching each shared call site. */
|
|
15
|
-
sites: Map<string, Set<unknown>>;
|
|
16
|
-
/**
|
|
17
|
-
* SPECULATION AT UNGATED CHOICES. `encode.ts:368-376` gives a choice its
|
|
18
|
-
* first-char dispatch only when NO arm is nullable, ALL arms are pairwise
|
|
19
|
-
* disjoint and ALL map to a char class; any one failure ungates every arm of
|
|
20
|
-
* the site, which then runs the linear loop below. Codegen has no such
|
|
21
|
-
* all-or-nothing rule — `emitFirstMatch` guards each arm on its OWN first set
|
|
22
|
-
* — so these counts are work the table does and the compiled engine does not.
|
|
23
|
-
*
|
|
24
|
-
* `ungatedEntries` is arms entered there; `ungatedFails` is those that then
|
|
25
|
-
* failed, which is pure waste by construction: a failing arm consumed nothing
|
|
26
|
-
* the winning arm will not scan again.
|
|
27
|
-
*/
|
|
28
|
-
ungatedEntries: number;
|
|
29
|
-
ungatedFails: number;
|
|
30
|
-
/** Rows executed INSIDE failed ungated arms — the subtree each wasted entry drags. */
|
|
31
|
-
ungatedFailRows: number;
|
|
32
|
-
gatedEntries: number;
|
|
33
|
-
/** Arm entries DECLINED by the per-arm class gate — the work this change removes. */
|
|
34
|
-
armGateSkips: number;
|
|
35
|
-
};
|
|
36
|
-
export declare function resetTableCounters(): void;
|
|
37
2
|
/**
|
|
38
3
|
* THE REFERENCE DRIVER. Turn a program into a rule map, by INTERPRETING the
|
|
39
4
|
* bytecode. Nothing ships on this — `tableRules` (`table/assemble.ts`) is
|
package/dist/table/exec.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exec.d.ts","sourceRoot":"","sources":["../../src/table/exec.ts"],"names":[],"mappings":"AA6CA,OAAO,EAEL,KAAK,cAAc,EACF,KAAK,YAAY,EAAE,KAAK,SAAS,EACnD,MAAM,cAAc,CAAA;
|
|
1
|
+
{"version":3,"file":"exec.d.ts","sourceRoot":"","sources":["../../src/table/exec.ts"],"names":[],"mappings":"AA6CA,OAAO,EAEL,KAAK,cAAc,EACF,KAAK,YAAY,EAAE,KAAK,SAAS,EACnD,MAAM,cAAc,CAAA;AAkpDrB;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,SAAS,CACvB,MAAM,EAAE,YAAY,GAAG,cAAc;AACrC;;;;;;;;GAQG;AACH,IAAI,GAAE;IAAE,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAO,EACjC,gBAAgB,GAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAM,GACvD,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAiC3B"}
|
|
@@ -30,6 +30,12 @@
|
|
|
30
30
|
* reducer AS its source, so two reducers printed alike are one function there.
|
|
31
31
|
*/
|
|
32
32
|
import type { Combinator, ParserDef } from '../types.ts';
|
|
33
|
+
/**
|
|
34
|
+
* The choices this module builds. The interpreter never runs them: it runs the
|
|
35
|
+
* authored choice, so a factored one's `disjoint` says nothing about which arms
|
|
36
|
+
* the interpreter lets in (`Encoder` classifies them by their derived sets).
|
|
37
|
+
*/
|
|
38
|
+
export declare const factoredChoices: WeakSet<Combinator<unknown>>;
|
|
33
39
|
type ChoiceDef = Extract<ParserDef, {
|
|
34
40
|
tag: 'choice';
|
|
35
41
|
}>;
|
|
@@ -38,5 +44,26 @@ type ChoiceDef = Extract<ParserDef, {
|
|
|
38
44
|
* shape that differs in one term.
|
|
39
45
|
*/
|
|
40
46
|
export declare function factorSharedEnds(d: ChoiceDef): Combinator<unknown> | undefined;
|
|
47
|
+
/**
|
|
48
|
+
* AN ARM WHOSE NEXT SIBLING IS ITS OWN PREFIX — `choice(sequence(X, a), X)`.
|
|
49
|
+
*
|
|
50
|
+
* On input where `X` matches and `a` does not, the choice parses `X`, fails `a`,
|
|
51
|
+
* rolls back, and parses `X` again for the next arm. Where the choice's value is
|
|
52
|
+
* unused (its sequence arms are `valueUnused`, so only their captures reach the
|
|
53
|
+
* enclosing node), the first arm may be `sequence(X, optional(a))`:
|
|
54
|
+
*
|
|
55
|
+
* - `X` then `a` matches: the arm as it was.
|
|
56
|
+
* - `X` matches, `a` fails uncommitted: the optional matches empty, rolls `a`'s
|
|
57
|
+
* captures back and leaves the gap before it unrecorded, so the arm ends where
|
|
58
|
+
* `X` did with `X`'s captures, which is what the retried next arm produced.
|
|
59
|
+
* - `a` fails committed: the arm fails committed, as it did.
|
|
60
|
+
* - `X` fails: the arm fails as before, and the next arm, kept as it is, fails the
|
|
61
|
+
* same way, so the choice merges the same sets in the same order.
|
|
62
|
+
*
|
|
63
|
+
* `X` is the next arm's sequence of terms, or that arm itself as a single term,
|
|
64
|
+
* and "the same" is `sameComb`. Gated arms, `autoNot` and strategies that reorder
|
|
65
|
+
* are left alone.
|
|
66
|
+
*/
|
|
67
|
+
export declare function factorPrefixArms(d: ChoiceDef): Combinator<unknown> | undefined;
|
|
41
68
|
export {};
|
|
42
69
|
//# sourceMappingURL=factor-choice.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"factor-choice.d.ts","sourceRoot":"","sources":["../../src/table/factor-choice.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"factor-choice.d.ts","sourceRoot":"","sources":["../../src/table/factor-choice.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AASxD;;;;GAIG;AACH,eAAO,MAAM,eAAe,8BAAqC,CAAA;AAEjE,KAAK,SAAS,GAAG,OAAO,CAAC,SAAS,EAAE;IAAE,GAAG,EAAE,QAAQ,CAAA;CAAE,CAAC,CAAA;AAqEtD;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,SAAS,GAAG,UAAU,CAAC,OAAO,CAAC,GAAG,SAAS,CA6D9E;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,SAAS,GAAG,UAAU,CAAC,OAAO,CAAC,GAAG,SAAS,CA+B9E"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/** The gap slot one assembly shares between its closure and emitted pieces. */
|
|
2
|
+
export type GapSlot = {
|
|
3
|
+
row: number;
|
|
4
|
+
at: number;
|
|
5
|
+
end: number;
|
|
6
|
+
input: string | undefined;
|
|
7
|
+
};
|
|
8
|
+
export declare function newGapSlot(): GapSlot;
|
|
9
|
+
/** The regex rows some reachable `OP_GAPGATE` names as its gap. */
|
|
10
|
+
export declare function gapRows(code: ArrayLike<number>, roots: Iterable<number>): Set<number>;
|
|
11
|
+
//# sourceMappingURL=gap-gate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gap-gate.d.ts","sourceRoot":"","sources":["../../src/table/gap-gate.ts"],"names":[],"mappings":"AA+BA,+EAA+E;AAC/E,MAAM,MAAM,OAAO,GAAG;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,CAAA;AAEzF,wBAAgB,UAAU,IAAI,OAAO,CAEpC;AAED,mEAAmE;AACnE,wBAAgB,OAAO,CAAC,IAAI,EAAE,SAAS,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC,GAAG,GAAG,CAAC,MAAM,CAAC,CAerF"}
|