parseman 0.59.1 → 0.59.2
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/README.md +5 -4
- package/dist/analysis/diagnostics.js +1 -1
- package/dist/cli/index.js +1 -1
- package/dist/index.js +1 -1
- package/dist/plugin/index.js +1 -1
- package/dist/table/index.js +1 -1
- package/dist/table/ops.d.ts +6 -6
- package/dist/table/ops.d.ts.map +1 -1
- package/dist/version.d.ts +1 -1
- package/package.json +1 -1
- package/src/table/ops.ts +6 -6
- package/src/version.ts +1 -1
package/README.md
CHANGED
|
@@ -200,10 +200,11 @@ pnpm docs:dev # this documentation site, locally
|
|
|
200
200
|
Benchmark and chart tasks (`pnpm bench`, `bench:svg`, `bench:parseman`, …) are described in
|
|
201
201
|
the [benchmarks guide](https://matthew-dean.github.io/parseman/guide/benchmarks#reproducing-the-numbers).
|
|
202
202
|
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
203
|
+
How the code fits together (the pipeline, the engines, the table format, macro builds
|
|
204
|
+
and how performance is measured) is in
|
|
205
|
+
[`docs/design/internals.md`](https://github.com/matthew-dean/parseman/blob/main/docs/design/internals.md). Start there before reading
|
|
206
|
+
`src/`. The token and lexical-body specification is
|
|
207
|
+
[`docs/design/parseman-0.48.md`](https://github.com/matthew-dean/parseman/blob/main/docs/design/parseman-0.48.md).
|
|
207
208
|
|
|
208
209
|
## License
|
|
209
210
|
|
|
@@ -16383,7 +16383,7 @@ function tableRules(source, metadataOrEntry = {}) {
|
|
|
16383
16383
|
}
|
|
16384
16384
|
|
|
16385
16385
|
// src/version.ts
|
|
16386
|
-
var PARSEMAN_VERSION = "0.59.
|
|
16386
|
+
var PARSEMAN_VERSION = "0.59.2";
|
|
16387
16387
|
|
|
16388
16388
|
// src/table/emit.ts
|
|
16389
16389
|
var FACTORY_ARITY_GUARD = `if(arguments.length<${EMITTED_PARAMS.length})throw new Error(${JSON.stringify(`parseman: this parser was printed by parseman ${PARSEMAN_VERSION}; upgrade the parseman runtime to at least that version`)});`;
|
package/dist/cli/index.js
CHANGED
|
@@ -16524,7 +16524,7 @@ function tableRules(source, metadataOrEntry = {}) {
|
|
|
16524
16524
|
}
|
|
16525
16525
|
|
|
16526
16526
|
// src/version.ts
|
|
16527
|
-
var PARSEMAN_VERSION = "0.59.
|
|
16527
|
+
var PARSEMAN_VERSION = "0.59.2";
|
|
16528
16528
|
|
|
16529
16529
|
// src/table/emit.ts
|
|
16530
16530
|
var FACTORY_ARITY_GUARD = `if(arguments.length<${EMITTED_PARAMS.length})throw new Error(${JSON.stringify(`parseman: this parser was printed by parseman ${PARSEMAN_VERSION}; upgrade the parseman runtime to at least that version`)});`;
|
package/dist/index.js
CHANGED
|
@@ -16989,7 +16989,7 @@ function tableRules(source, metadataOrEntry = {}) {
|
|
|
16989
16989
|
}
|
|
16990
16990
|
|
|
16991
16991
|
// src/version.ts
|
|
16992
|
-
var PARSEMAN_VERSION = "0.59.
|
|
16992
|
+
var PARSEMAN_VERSION = "0.59.2";
|
|
16993
16993
|
|
|
16994
16994
|
// src/table/emit.ts
|
|
16995
16995
|
var FACTORY_ARITY_GUARD = `if(arguments.length<${EMITTED_PARAMS.length})throw new Error(${JSON.stringify(`parseman: this parser was printed by parseman ${PARSEMAN_VERSION}; upgrade the parseman runtime to at least that version`)});`;
|
package/dist/plugin/index.js
CHANGED
|
@@ -16594,7 +16594,7 @@ function tableRules(source, metadataOrEntry = {}) {
|
|
|
16594
16594
|
}
|
|
16595
16595
|
|
|
16596
16596
|
// src/version.ts
|
|
16597
|
-
var PARSEMAN_VERSION = "0.59.
|
|
16597
|
+
var PARSEMAN_VERSION = "0.59.2";
|
|
16598
16598
|
|
|
16599
16599
|
// src/table/emit.ts
|
|
16600
16600
|
var FACTORY_ARITY_GUARD = `if(arguments.length<${EMITTED_PARAMS.length})throw new Error(${JSON.stringify(`parseman: this parser was printed by parseman ${PARSEMAN_VERSION}; upgrade the parseman runtime to at least that version`)});`;
|
package/dist/table/index.js
CHANGED
|
@@ -15537,7 +15537,7 @@ function encodeTableProgram(ruleMap, settings = {}) {
|
|
|
15537
15537
|
}
|
|
15538
15538
|
|
|
15539
15539
|
// src/version.ts
|
|
15540
|
-
var PARSEMAN_VERSION = "0.59.
|
|
15540
|
+
var PARSEMAN_VERSION = "0.59.2";
|
|
15541
15541
|
|
|
15542
15542
|
// src/table/emit.ts
|
|
15543
15543
|
var FACTORY_ARITY_GUARD = `if(arguments.length<${EMITTED_PARAMS.length})throw new Error(${JSON.stringify(`parseman: this parser was printed by parseman ${PARSEMAN_VERSION}; upgrade the parseman runtime to at least that version`)});`;
|
package/dist/table/ops.d.ts
CHANGED
|
@@ -17,9 +17,9 @@
|
|
|
17
17
|
* Operand layouts are documented per opcode below and are the contract between
|
|
18
18
|
* `encode.ts` and `exec.ts`. Nothing else may read the stream.
|
|
19
19
|
*/
|
|
20
|
-
/** `LIT k` — `k` indexes a string in the const pool. */
|
|
20
|
+
/** `LIT k fx` — `k` indexes a string in the const pool; `fx` the expected set on failure. */
|
|
21
21
|
export declare const OP_LIT = 1;
|
|
22
|
-
/** `RX k` — `k` indexes a STICKY `RegExp` in the const pool
|
|
22
|
+
/** `RX k fx` — `k` indexes a STICKY `RegExp` in the const pool; `fx` as `LIT`. */
|
|
23
23
|
export declare const OP_RX = 2;
|
|
24
24
|
/** `SEQ n c1 … cn` — n child offsets; value is the array of their values. */
|
|
25
25
|
export declare const OP_SEQ = 3;
|
|
@@ -79,9 +79,9 @@ export declare const OP_XFORM = 9;
|
|
|
79
79
|
export declare const OP_NODE = 10;
|
|
80
80
|
/** `RULE r` — `r` indexes `prog.rules`. */
|
|
81
81
|
export declare const OP_RULE = 11;
|
|
82
|
-
/** `GATE cc c` — first-char gate: `cc` indexes a char class; then run `c`. */
|
|
82
|
+
/** `GATE cc c fx` — first-char gate: `cc` indexes a char class; then run `c`. `fx` is the set reported when the gate rejects. */
|
|
83
83
|
export declare const OP_GATE = 12;
|
|
84
|
-
/** `NOT c` — zero-width negative lookahead
|
|
84
|
+
/** `NOT c fx` — zero-width negative lookahead; `fx` is the assertion's own set, as `PEEK`. */
|
|
85
85
|
export declare const OP_NOT = 13;
|
|
86
86
|
/**
|
|
87
87
|
* `PEEK c fx` — zero-width positive lookahead. `fx` is the ASSERTION's own set,
|
|
@@ -200,10 +200,10 @@ export declare const OP_LIT_CI_TRACK = 28;
|
|
|
200
200
|
*/
|
|
201
201
|
export declare const OP_TOKEN = 29;
|
|
202
202
|
/**
|
|
203
|
-
* `SCOPE_CAP k c` — a `parser({ trivia, captureTrivia: true })` scope. Identical
|
|
203
|
+
* `SCOPE_CAP k c policy` — a `parser({ trivia, captureTrivia: true })` scope. Identical
|
|
204
204
|
* operands to `SCOPE`; it additionally sets `ctx.captureTrivia` for the child.
|
|
205
205
|
*
|
|
206
|
-
* A SEPARATE OPCODE rather than
|
|
206
|
+
* A SEPARATE OPCODE rather than another operand on `SCOPE`, for two reasons.
|
|
207
207
|
* Widening an instruction means every walker that knows its shape has to learn
|
|
208
208
|
* the new one, and there is no central arity table here to change in one place.
|
|
209
209
|
* And the driver should SELECT this piece, not test a flag inside the scope
|
package/dist/table/ops.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ops.d.ts","sourceRoot":"","sources":["../../src/table/ops.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,
|
|
1
|
+
{"version":3,"file":"ops.d.ts","sourceRoot":"","sources":["../../src/table/ops.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,6FAA6F;AAC7F,eAAO,MAAM,MAAM,IAAI,CAAA;AACvB,kFAAkF;AAClF,eAAO,MAAM,KAAK,IAAI,CAAA;AACtB,6EAA6E;AAC7E,eAAO,MAAM,MAAM,IAAI,CAAA;AACvB,iFAAiF;AACjF,eAAO,MAAM,OAAO,IAAI,CAAA;AACxB;;;;;;;;;GASG;A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M,CAAC,MAAM,EAAE,MAAM,CAe3C,CAAA"}
|
package/dist/version.d.ts
CHANGED
|
@@ -13,5 +13,5 @@
|
|
|
13
13
|
* Kept in sync with `package.json` by `test/unit/version-sync.test.ts`, which fails
|
|
14
14
|
* the build if this constant drifts from the published version.
|
|
15
15
|
*/
|
|
16
|
-
export declare const PARSEMAN_VERSION = "0.59.
|
|
16
|
+
export declare const PARSEMAN_VERSION = "0.59.2";
|
|
17
17
|
//# sourceMappingURL=version.d.ts.map
|
package/package.json
CHANGED
package/src/table/ops.ts
CHANGED
|
@@ -18,9 +18,9 @@
|
|
|
18
18
|
* `encode.ts` and `exec.ts`. Nothing else may read the stream.
|
|
19
19
|
*/
|
|
20
20
|
|
|
21
|
-
/** `LIT k` — `k` indexes a string in the const pool. */
|
|
21
|
+
/** `LIT k fx` — `k` indexes a string in the const pool; `fx` the expected set on failure. */
|
|
22
22
|
export const OP_LIT = 1
|
|
23
|
-
/** `RX k` — `k` indexes a STICKY `RegExp` in the const pool
|
|
23
|
+
/** `RX k fx` — `k` indexes a STICKY `RegExp` in the const pool; `fx` as `LIT`. */
|
|
24
24
|
export const OP_RX = 2
|
|
25
25
|
/** `SEQ n c1 … cn` — n child offsets; value is the array of their values. */
|
|
26
26
|
export const OP_SEQ = 3
|
|
@@ -80,9 +80,9 @@ export const OP_XFORM = 9
|
|
|
80
80
|
export const OP_NODE = 10
|
|
81
81
|
/** `RULE r` — `r` indexes `prog.rules`. */
|
|
82
82
|
export const OP_RULE = 11
|
|
83
|
-
/** `GATE cc c` — first-char gate: `cc` indexes a char class; then run `c`. */
|
|
83
|
+
/** `GATE cc c fx` — first-char gate: `cc` indexes a char class; then run `c`. `fx` is the set reported when the gate rejects. */
|
|
84
84
|
export const OP_GATE = 12
|
|
85
|
-
/** `NOT c` — zero-width negative lookahead
|
|
85
|
+
/** `NOT c fx` — zero-width negative lookahead; `fx` is the assertion's own set, as `PEEK`. */
|
|
86
86
|
export const OP_NOT = 13
|
|
87
87
|
/**
|
|
88
88
|
* `PEEK c fx` — zero-width positive lookahead. `fx` is the ASSERTION's own set,
|
|
@@ -201,10 +201,10 @@ export const OP_LIT_CI_TRACK = 28
|
|
|
201
201
|
*/
|
|
202
202
|
export const OP_TOKEN = 29
|
|
203
203
|
/**
|
|
204
|
-
* `SCOPE_CAP k c` — a `parser({ trivia, captureTrivia: true })` scope. Identical
|
|
204
|
+
* `SCOPE_CAP k c policy` — a `parser({ trivia, captureTrivia: true })` scope. Identical
|
|
205
205
|
* operands to `SCOPE`; it additionally sets `ctx.captureTrivia` for the child.
|
|
206
206
|
*
|
|
207
|
-
* A SEPARATE OPCODE rather than
|
|
207
|
+
* A SEPARATE OPCODE rather than another operand on `SCOPE`, for two reasons.
|
|
208
208
|
* Widening an instruction means every walker that knows its shape has to learn
|
|
209
209
|
* the new one, and there is no central arity table here to change in one place.
|
|
210
210
|
* And the driver should SELECT this piece, not test a flag inside the scope
|
package/src/version.ts
CHANGED