@ifc-lite/parser 6.1.0 → 6.2.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/georef-extractor.js +5 -5
- package/dist/georef-extractor.js.map +1 -1
- package/dist/ifczip.d.ts +1 -1
- package/dist/ifczip.d.ts.map +1 -1
- package/dist/ifczip.js +62 -5
- package/dist/ifczip.js.map +1 -1
- package/dist/scan-entities-balanced.d.ts.map +1 -1
- package/dist/scan-entities-balanced.js +9 -6
- package/dist/scan-entities-balanced.js.map +1 -1
- package/dist/scan-worker-lexing.d.ts +1 -1
- package/dist/scan-worker-lexing.d.ts.map +1 -1
- package/dist/scan-worker-lexing.js +8 -3
- package/dist/scan-worker-lexing.js.map +1 -1
- package/dist/scan-worker-source.d.ts +1 -1
- package/dist/scan-worker-source.d.ts.map +1 -1
- package/dist/scan-worker-source.js +5 -2
- package/dist/scan-worker-source.js.map +1 -1
- package/dist/step-record-boundary.d.ts.map +1 -1
- package/dist/step-record-boundary.js +25 -0
- package/dist/step-record-boundary.js.map +1 -1
- package/dist/step-record-boundary.vectors.d.ts +44 -0
- package/dist/step-record-boundary.vectors.d.ts.map +1 -1
- package/dist/step-record-boundary.vectors.js +51 -0
- package/dist/step-record-boundary.vectors.js.map +1 -1
- package/dist/tokenizer.d.ts.map +1 -1
- package/dist/tokenizer.js +6 -3
- package/dist/tokenizer.js.map +1 -1
- package/package.json +4 -4
package/dist/georef-extractor.js
CHANGED
|
@@ -111,12 +111,12 @@ function isNegativeComponent(n) {
|
|
|
111
111
|
function compoundPlaneAngleToDecimalDegrees(value) {
|
|
112
112
|
if (!Array.isArray(value) || value.length < 3)
|
|
113
113
|
return undefined;
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
if (
|
|
114
|
+
// Read BY POSITION and refuse the whole angle on a non-numeric component, as
|
|
115
|
+
// the Rust twin does: dropping non-numbers first read ($,51,30,0) as 51°30'.
|
|
116
|
+
const parts = [...value.slice(0, 3), value.length > 3 ? value[3] : 0].map((entry) => getNumber(entry));
|
|
117
|
+
if (!parts.every((part) => part !== undefined))
|
|
118
118
|
return undefined;
|
|
119
|
-
const [degreesRaw, minutesRaw, secondsRaw, millionthsRaw
|
|
119
|
+
const [degreesRaw, minutesRaw, secondsRaw, millionthsRaw] = parts;
|
|
120
120
|
const sign = isNegativeComponent(degreesRaw) ||
|
|
121
121
|
isNegativeComponent(minutesRaw) ||
|
|
122
122
|
isNegativeComponent(secondsRaw) ||
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"georef-extractor.js","sourceRoot":"","sources":["../src/georef-extractor.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAE/D,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAC/D,yEAAyE;AACzE,wEAAwE;AACxE,OAAO,EACL,gBAAgB,EAChB,gBAAgB,EAChB,8BAA8B,GAC/B,MAAM,uBAAuB,CAAC;AAmB/B,OAAO,EACL,SAAS,EACT,SAAS,EACT,YAAY,EACZ,6BAA6B,GAC9B,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,EAAE,yBAAyB,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,6BAA6B,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAC3F,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAcpD;;;;;;GAMG;AACH,MAAM,UAAU,uBAAuB,CACrC,aAAsB,EACtB,aAAsB;IAEtB,IAAI,aAAa,KAAK,SAAS,IAAI,aAAa,KAAK,SAAS;QAAE,OAAO,IAAI,CAAC;IAC5E,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,aAAa,EAAE,aAAa,CAAC,CAAC;IACzD,OAAO,OAAO,GAAG,CAAC,GAAG,GAAG,IAAI,CAAC,EAAE,CAAC,CAAC;AACnC,C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EAAE,CAAC;4BAC9B,YAAY,GAAG,WAAW,CAAC;4BAC3B,OAAO,GAAG,SAAS,KAAK,OAAO,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,SAAS,GAAG,OAAO,CAAC;wBACvE,CAAC;oBACH,CAAC;oBACD,qCAAqC;gBACvC,CAAC;YACH,CAAC;QACH,CAAC;IACH,CAAC;IACD,kFAAkF;IAClF,+DAA+D;IAE/D,OAAO;QACL,EAAE,EAAE,MAAM,CAAC,SAAS;QACpB,IAAI,EAAE,SAAS,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE;QAC3C,WAAW,EAAE,SAAS,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;QAC5C,aAAa,EAAE,SAAS,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;QAC9C,aAAa,EAAE,SAAS,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;QAC9C,aAAa,EAAE,SAAS,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;QAC9C,OAAO,EAAE,SAAS,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;QACxC,OAAO;QACP,YAAY;KACb,CAAC;AACJ,CAAC"}
|
package/dist/ifczip.d.ts
CHANGED
|
@@ -45,7 +45,7 @@ export interface IfcZipContents {
|
|
|
45
45
|
* `.ifcZIP`). Non-zip input returns unchanged bytes and an empty map, so
|
|
46
46
|
* callers can invoke this unconditionally like `unwrapIfcZip`.
|
|
47
47
|
*/
|
|
48
|
-
export declare function unwrapIfcZipWithResources(buffer: ArrayBuffer): Promise<IfcZipContents>;
|
|
48
|
+
export declare function unwrapIfcZipWithResources(buffer: ArrayBuffer, maxModelBytes?: number): Promise<IfcZipContents>;
|
|
49
49
|
/**
|
|
50
50
|
* `unwrapIfcZip` for a Node `Buffer`/`Uint8Array` view (CLI/MCP loaders):
|
|
51
51
|
* handles the ArrayBuffer-slice dance for a view that may not span its whole
|
package/dist/ifczip.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ifczip.d.ts","sourceRoot":"","sources":["../src/ifczip.ts"],"names":[],"mappings":"AAuBA,wEAAwE;AACxE,wBAAgB,WAAW,CAAC,MAAM,EAAE,WAAW,GAAG,OAAO,CAGxD;AAwDD;;;;;;;;;;;;GAYG;AACH,wBAAsB,YAAY,CAAC,MAAM,EAAE,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC,CAE5E;AAED;;;;;GAKG;AACH,wBAAsB,qBAAqB,CACzC,MAAM,EAAE,WAAW,EACnB,oBAAoB,EAAE,MAAM,GAC3B,OAAO,CAAC,WAAW,CAAC,
|
|
1
|
+
{"version":3,"file":"ifczip.d.ts","sourceRoot":"","sources":["../src/ifczip.ts"],"names":[],"mappings":"AAuBA,wEAAwE;AACxE,wBAAgB,WAAW,CAAC,MAAM,EAAE,WAAW,GAAG,OAAO,CAGxD;AAwDD;;;;;;;;;;;;GAYG;AACH,wBAAsB,YAAY,CAAC,MAAM,EAAE,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC,CAE5E;AAED;;;;;GAKG;AACH,wBAAsB,qBAAqB,CACzC,MAAM,EAAE,WAAW,EACnB,oBAAoB,EAAE,MAAM,GAC3B,OAAO,CAAC,WAAW,CAAC,CAKtB;AAuBD,6CAA6C;AAC7C,MAAM,WAAW,cAAc;IAC7B,2EAA2E;IAC3E,KAAK,EAAE,WAAW,CAAC;IACnB;;;;OAIG;IACH,SAAS,EAAE,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;IACnC,0EAA0E;IAC1E,iBAAiB,EAAE,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;IAC3C,2EAA2E;IAC3E,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mEAAmE;IACnE,mBAAmB,EAAE,OAAO,CAAC;CAC9B;AAED;;;;;;GAMG;AACH,wBAAsB,yBAAyB,CAC7C,MAAM,EAAE,WAAW,EACnB,aAAa,GAAE,MAA+B,GAC7C,OAAO,CAAC,cAAc,CAAC,CAsCzB;AAiGD;;;;GAIG;AACH,wBAAsB,gBAAgB,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO,CAAC,WAAW,CAAC,CA0B7E"}
|
package/dist/ifczip.js
CHANGED
|
@@ -96,7 +96,8 @@ export async function unwrapIfcZipWithLimit(buffer, maxUncompressedBytes) {
|
|
|
96
96
|
if (!isZipBuffer(buffer))
|
|
97
97
|
return buffer;
|
|
98
98
|
const { entry } = await openZipModelEntry(buffer, maxUncompressedBytes);
|
|
99
|
-
|
|
99
|
+
const bytes = await extractEntryWithLimit(entry, maxUncompressedBytes);
|
|
100
|
+
return bytes.buffer;
|
|
100
101
|
}
|
|
101
102
|
/** Sibling raster-image entries `IfcImageTexture.URLReference` can point at. */
|
|
102
103
|
const IMAGE_ENTRY_RE = /\.(png|jpe?g)$/i;
|
|
@@ -123,10 +124,12 @@ const MAX_IMAGE_ENTRIES = 256;
|
|
|
123
124
|
* `.ifcZIP`). Non-zip input returns unchanged bytes and an empty map, so
|
|
124
125
|
* callers can invoke this unconditionally like `unwrapIfcZip`.
|
|
125
126
|
*/
|
|
126
|
-
export async function unwrapIfcZipWithResources(buffer) {
|
|
127
|
+
export async function unwrapIfcZipWithResources(buffer, maxModelBytes = MAX_UNCOMPRESSED_BYTES) {
|
|
127
128
|
if (!isZipBuffer(buffer))
|
|
128
129
|
return { model: buffer, resources: new Map(), originalResources: new Map(), resourcesIncomplete: false };
|
|
129
|
-
const { zip, entry } = await openZipModelEntry(buffer,
|
|
130
|
+
const { zip, entry } = await openZipModelEntry(buffer, maxModelBytes);
|
|
131
|
+
const modelBytes = await extractEntryWithLimit(entry, maxModelBytes);
|
|
132
|
+
const model = modelBytes.buffer;
|
|
130
133
|
const resources = new Map();
|
|
131
134
|
const originalResources = new Map();
|
|
132
135
|
let totalImageBytes = 0;
|
|
@@ -146,7 +149,19 @@ export async function unwrapIfcZipWithResources(buffer) {
|
|
|
146
149
|
const basename = res.name.split('/').pop()?.toLowerCase();
|
|
147
150
|
if (!basename)
|
|
148
151
|
continue;
|
|
149
|
-
const
|
|
152
|
+
const remaining = MAX_TOTAL_IMAGE_BYTES - totalImageBytes;
|
|
153
|
+
let bytes;
|
|
154
|
+
try {
|
|
155
|
+
bytes = await extractEntryWithLimit(res, Math.min(MAX_IMAGE_BYTES, remaining));
|
|
156
|
+
}
|
|
157
|
+
catch (error) {
|
|
158
|
+
if (!(error instanceof ZipEntryLimitError))
|
|
159
|
+
throw error;
|
|
160
|
+
resourcesIncomplete = true;
|
|
161
|
+
if (remaining <= MAX_IMAGE_BYTES)
|
|
162
|
+
break;
|
|
163
|
+
continue;
|
|
164
|
+
}
|
|
150
165
|
// Enforce the aggregate budget on REAL decompressed sizes (the central-
|
|
151
166
|
// directory declaration is advisory and absent on some writers).
|
|
152
167
|
if (bytes.byteLength > MAX_IMAGE_BYTES) {
|
|
@@ -163,7 +178,49 @@ export async function unwrapIfcZipWithResources(buffer) {
|
|
|
163
178
|
if (!resources.has(basename))
|
|
164
179
|
resources.set(basename, bytes);
|
|
165
180
|
}
|
|
166
|
-
return { model
|
|
181
|
+
return { model, resources, originalResources, modelPath: entry.name, resourcesIncomplete };
|
|
182
|
+
}
|
|
183
|
+
class ZipEntryLimitError extends Error {
|
|
184
|
+
}
|
|
185
|
+
/** Inflate incrementally so falsified ZIP metadata cannot bypass the limit. */
|
|
186
|
+
function extractEntryWithLimit(entry, limit) {
|
|
187
|
+
return new Promise((resolve, reject) => {
|
|
188
|
+
const chunks = [];
|
|
189
|
+
let total = 0;
|
|
190
|
+
let settled = false;
|
|
191
|
+
// `internalStream` is JSZip's browser streaming API but is omitted from
|
|
192
|
+
// the package's public TypeScript declaration.
|
|
193
|
+
const stream = entry.internalStream('uint8array');
|
|
194
|
+
stream.on('data', (chunk) => {
|
|
195
|
+
if (settled)
|
|
196
|
+
return;
|
|
197
|
+
total += chunk.byteLength;
|
|
198
|
+
if (total > limit) {
|
|
199
|
+
settled = true;
|
|
200
|
+
stream.pause();
|
|
201
|
+
reject(new ZipEntryLimitError(`This .ifcZIP archive's extracted entry "${entry.name}" exceeds the ${(limit / (1024 * 1024)).toFixed(0)} MiB limit.`));
|
|
202
|
+
return;
|
|
203
|
+
}
|
|
204
|
+
chunks.push(chunk);
|
|
205
|
+
});
|
|
206
|
+
stream.on('error', (error) => { if (!settled) {
|
|
207
|
+
settled = true;
|
|
208
|
+
reject(error);
|
|
209
|
+
} });
|
|
210
|
+
stream.on('end', () => {
|
|
211
|
+
if (settled)
|
|
212
|
+
return;
|
|
213
|
+
settled = true;
|
|
214
|
+
const output = new Uint8Array(total);
|
|
215
|
+
let offset = 0;
|
|
216
|
+
for (const chunk of chunks) {
|
|
217
|
+
output.set(chunk, offset);
|
|
218
|
+
offset += chunk.byteLength;
|
|
219
|
+
}
|
|
220
|
+
resolve(output);
|
|
221
|
+
});
|
|
222
|
+
stream.resume();
|
|
223
|
+
});
|
|
167
224
|
}
|
|
168
225
|
/** JSZip's central-directory uncompressed size — internal field, so read
|
|
169
226
|
* defensively: a future JSZip dropping it just skips the size guard. */
|
package/dist/ifczip.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ifczip.js","sourceRoot":"","sources":["../src/ifczip.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAE/D;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B;8EAC8E;AAC9E,MAAM,SAAS,GAAG,UAAU,CAAC;AAE7B,wEAAwE;AACxE,MAAM,UAAU,WAAW,CAAC,MAAmB;IAC7C,IAAI,MAAM,CAAC,UAAU,GAAG,CAAC;QAAE,OAAO,KAAK,CAAC;IACxC,OAAO,IAAI,QAAQ,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,CAAC,EAAE,IAAI,CAAC,KAAK,SAAS,CAAC;AAC/D,CAAC;AAED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,IAAI,oBAAoB,IAAI,MAAM,CAEjC;IAED,0EAA0E;IACzE,GAAG,IAAI,SAAS,CAAC,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"scan-entities-balanced.d.ts","sourceRoot":"","sources":["../src/scan-entities-balanced.ts"],"names":[],"mappings":"AA2BA,MAAM,WAAW,gBAAgB;IAC/B,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;;;;GAKG;AACH,qBAAa,kBAAkB;IAMjB,OAAO,CAAC,QAAQ,CAAC,MAAM;IALnC,OAAO,CAAC,QAAQ,CAAK;IACrB,OAAO,CAAC,UAAU,CAAK;IACvB,OAAO,CAAC,YAAY,CAAK;IACzB,OAAO,CAAC,SAAS,CAAK;gBAEO,MAAM,EAAE,UAAU;IAE/C,2EAA2E;IAC3E,IAAI,gBAAgB,IAAI,MAAM,CAE7B;IAED;4DACwD;IACxD,IAAI,oBAAoB,IAAI,MAAM,CAEjC;IAED,0EAA0E;IACzE,GAAG,IAAI,SAAS,CAAC,gBAAgB,CAAC;IA8InC,OAAO,CAAC,aAAa;IAmCrB,OAAO,CAAC,YAAY;IA+BpB;;;;;OAKG;IACH,OAAO,CAAC,UAAU;CAMnB"}
|
|
@@ -143,12 +143,15 @@ export class BalancedEntityScan {
|
|
|
143
143
|
};
|
|
144
144
|
}
|
|
145
145
|
else {
|
|
146
|
-
// Either classified failure (
|
|
147
|
-
//
|
|
148
|
-
//
|
|
149
|
-
//
|
|
150
|
-
// past
|
|
151
|
-
//
|
|
146
|
+
// Either classified failure: UNREADABLE_RECORD (a literal or
|
|
147
|
+
// comment took the rest of the input) or UNBALANCED_RECORD (no ')'
|
|
148
|
+
// of this record's own before the next declaration's '=' or EOF,
|
|
149
|
+
// #4573). This scan STOPS on both, unlike scanEntitiesFast, which
|
|
150
|
+
// re-hunts past an unbalanced record (#4179): its one consumer is
|
|
151
|
+
// the CLI's mutate-step-record, a write path, where a refusal beats
|
|
152
|
+
// a guess. Before the '=' bound this walk balanced across the next
|
|
153
|
+
// declaration and yielded `#1=IFCA(2 #2=IFCWALL($))` as ONE record
|
|
154
|
+
// with nothing reported; now it stops here and reports it.
|
|
152
155
|
stopped = true;
|
|
153
156
|
break;
|
|
154
157
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scan-entities-balanced.js","sourceRoot":"","sources":["../src/scan-entities-balanced.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAE/D;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAEhD,OAAO,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,EACL,aAAa,EACb,qBAAqB,EACrB,WAAW,EACX,UAAU,GACX,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAU7D;;;;;GAKG;AACH,MAAM,OAAO,kBAAkB;IAMA;IALrB,QAAQ,GAAG,CAAC,CAAC;IACb,UAAU,GAAG,CAAC,CAAC;IACf,YAAY,GAAG,CAAC,CAAC;IACjB,SAAS,GAAG,CAAC,CAAC;IAEtB,YAA6B,MAAkB;QAAlB,WAAM,GAAN,MAAM,CAAY;IAAG,CAAC;IAEnD,2EAA2E;IAC3E,IAAI,gBAAgB;QAClB,OAAO,IAAI,CAAC,YAAY,CAAC;IAC3B,CAAC;IAED;4DACwD;IACxD,IAAI,oBAAoB;QACtB,OAAO,IAAI,CAAC,SAAS,CAAC;IACxB,CAAC;IAED,0EAA0E;IAC1E,CAAC,GAAG;QACF,IAAI,CAAC,QAAQ,GAAG,CAAC,CAAC;QAClB,IAAI,CAAC,UAAU,GAAG,CAAC,CAAC;QACpB,IAAI,CAAC,YAAY,GAAG,CAAC,CAAC;QACtB,IAAI,CAAC,SAAS,GA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AAG,EAAE,CAAC;YACR,CAAC;iBAAM,CAAC;gBACN,MAAM;YACR,CAAC;QACH,CAAC;QAED,IAAI,GAAG,KAAK,KAAK;YAAE,OAAO,IAAI,CAAC;QAE/B,MAAM,QAAQ,GAAG,cAAc,CAAC,IAAI,CAAC,MAAM,EAAE,KAAK,EAAE,GAAG,CAAC,CAAC;QACzD,IAAI,CAAC,QAAQ,GAAG,GAAG,CAAC;QACpB,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED;;;;;OAKG;IACK,UAAU;QAChB,MAAM,IAAI,GAAG,UAAU,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QACxE,IAAI,CAAC,UAAU,IAAI,IAAI,CAAC,KAAK,CAAC;QAC9B,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC;QAC1B,OAAO,IAAI,CAAC,IAAI,CAAC;IACnB,CAAC;CACF"}
|
|
@@ -10,5 +10,5 @@
|
|
|
10
10
|
*
|
|
11
11
|
* Interpolated into `WORKER_CODE`, which supplies `buf`, `len` and `line`.
|
|
12
12
|
*/
|
|
13
|
-
export declare const WORKER_LEXING = "\n // The STEP whitespace set: space, tab, CR, LF, form feed, vertical tab.\n // The matched half is the now-exported isSpaceByte in step-lexing.ts; a\n // member going missing from one copy is what #3733 was.\n function isSpaceByteAt(p) {\n var t = buf[p];\n return t === 0x20 || t === 0x09 || t === 0x0A || t === 0x0D || t === 0x0C || t === 0x0B;\n }\n\n // Whether a STEP comment opens at p.\n function opensCommentAt(p) {\n return p + 1 < len && buf[p] === 0x2F && buf[p + 1] === 0x2A;\n }\n\n // Index just past the '*/' closing the comment at p, or -1 when it never\n // closes. Counts the newlines it crosses so line numbers stay in step.\n //\n // Kept behaviourally identical to skipComment/skipTrivia in step-lexing.ts,\n // which this cannot import: the worker source is a string, so this copy of\n // the rule has to live here. Comments do not nest, per ISO 10303-21.\n function skipCommentAt(p) {\n var q = p + 2;\n while (q + 1 < len) {\n if (buf[q] === 0x2A && buf[q + 1] === 0x2F) return q + 2;\n if (buf[q] === 0x0A) line++;\n q++;\n }\n return -1;\n }\n\n // Skip whitespace, comments, and any run of the two -- 10303-21 allows a\n // comment wherever whitespace is allowed, INCLUDING inside a record.\n // Returns -1 when a comment opens and never closes: everything from there on\n // is inside it, so there is nothing left to find.\n //\n // The whitespace byte set (space, tab, CR, LF, form feed, vertical tab) is\n // kept byte-for-byte in sync with isSpaceByte in step-lexing.ts and its\n // three inline twins in tokenizer.ts's scanEntitiesFast -- this file is a\n // string because a Blob worker cannot import at runtime, not a reason for\n // the rule itself to drift.\n function skipTriviaAt(p) {\n for (;;) {\n while (p < len) {\n var t = buf[p];\n if (t === 0x20 || t === 0x09 || t === 0x0D || t === 0x0C || t === 0x0B) { p++; }\n else if (t === 0x0A) { line++; p++; }\n else break;\n }\n if (!opensCommentAt(p)) return p;\n var e = skipCommentAt(p);\n if (e < 0) return -1;\n p = e;\n }\n }\n\n // Byte length from startOffset through the ')' balancing the '(' at p, or a\n // CLASSIFIED failure: -1 unbalanced but readable, -2 a literal or comment\n // that never closed. The RECOVERY point for a record with no ';' of its own\n // (#4179), and the exact answer for whether a ';' is the record's own.\n // Mirrors findEntityLength in step-record-boundary.ts; a literal is jumped\n // whole and a comment after it, in that order, so a paren inside either is\n // text. NOTE
|
|
13
|
+
export declare const WORKER_LEXING = "\n // The STEP whitespace set: space, tab, CR, LF, form feed, vertical tab.\n // The matched half is the now-exported isSpaceByte in step-lexing.ts; a\n // member going missing from one copy is what #3733 was.\n function isSpaceByteAt(p) {\n var t = buf[p];\n return t === 0x20 || t === 0x09 || t === 0x0A || t === 0x0D || t === 0x0C || t === 0x0B;\n }\n\n // Whether a STEP comment opens at p.\n function opensCommentAt(p) {\n return p + 1 < len && buf[p] === 0x2F && buf[p + 1] === 0x2A;\n }\n\n // Index just past the '*/' closing the comment at p, or -1 when it never\n // closes. Counts the newlines it crosses so line numbers stay in step.\n //\n // Kept behaviourally identical to skipComment/skipTrivia in step-lexing.ts,\n // which this cannot import: the worker source is a string, so this copy of\n // the rule has to live here. Comments do not nest, per ISO 10303-21.\n function skipCommentAt(p) {\n var q = p + 2;\n while (q + 1 < len) {\n if (buf[q] === 0x2A && buf[q + 1] === 0x2F) return q + 2;\n if (buf[q] === 0x0A) line++;\n q++;\n }\n return -1;\n }\n\n // Skip whitespace, comments, and any run of the two -- 10303-21 allows a\n // comment wherever whitespace is allowed, INCLUDING inside a record.\n // Returns -1 when a comment opens and never closes: everything from there on\n // is inside it, so there is nothing left to find.\n //\n // The whitespace byte set (space, tab, CR, LF, form feed, vertical tab) is\n // kept byte-for-byte in sync with isSpaceByte in step-lexing.ts and its\n // three inline twins in tokenizer.ts's scanEntitiesFast -- this file is a\n // string because a Blob worker cannot import at runtime, not a reason for\n // the rule itself to drift.\n function skipTriviaAt(p) {\n for (;;) {\n while (p < len) {\n var t = buf[p];\n if (t === 0x20 || t === 0x09 || t === 0x0D || t === 0x0C || t === 0x0B) { p++; }\n else if (t === 0x0A) { line++; p++; }\n else break;\n }\n if (!opensCommentAt(p)) return p;\n var e = skipCommentAt(p);\n if (e < 0) return -1;\n p = e;\n }\n }\n\n // Byte length from startOffset through the ')' balancing the '(' at p, or a\n // CLASSIFIED failure: -1 unbalanced but readable, -2 a literal or comment\n // that never closed. The RECOVERY point for a record with no ';' of its own\n // (#4179), and the exact answer for whether a ';' is the record's own.\n // Mirrors findEntityLength in step-record-boundary.ts; a literal is jumped\n // whole and a comment after it, in that order, so a paren inside either is\n // text. A top-level '=' is the NEXT declaration's, so the walk stops there\n // and answers -1 rather than balancing across a record it has not read;\n // that stop is also what keeps a file of unbalanced records linear instead\n // of quadratic (#4573; the argument is on findEntityLength). NOTE:\n // skipCommentAt advances the line counter, so a caller that re-walks the\n // record must save and restore it.\n function findEntityLengthAt(p, startOffset) {\n var d = 0;\n while (p < len) {\n var b = buf[p];\n if (b === 0x27) {\n p++;\n for (;;) {\n if (p >= len) return -2;\n if (buf[p] === 0x27) { if (buf[p + 1] === 0x27) { p += 2; continue; } p++; break; }\n p++;\n }\n } else if (opensCommentAt(p)) {\n var q = skipCommentAt(p);\n if (q < 0) return -2;\n p = q;\n } else if (b === 0x3D) { return -1; }\n else if (b === 0x28) { d++; p++; }\n else if (b === 0x29) { if (d === 0) return -1; d--; p++; if (d === 0) return p - startOffset; }\n else { p++; }\n }\n return -1;\n }\n";
|
|
14
14
|
//# sourceMappingURL=scan-worker-lexing.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scan-worker-lexing.d.ts","sourceRoot":"","sources":["../src/scan-worker-lexing.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,aAAa,
|
|
1
|
+
{"version":3,"file":"scan-worker-lexing.d.ts","sourceRoot":"","sources":["../src/scan-worker-lexing.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,aAAa,0pHAyFzB,CAAC"}
|
|
@@ -74,8 +74,12 @@ export const WORKER_LEXING = `
|
|
|
74
74
|
// (#4179), and the exact answer for whether a ';' is the record's own.
|
|
75
75
|
// Mirrors findEntityLength in step-record-boundary.ts; a literal is jumped
|
|
76
76
|
// whole and a comment after it, in that order, so a paren inside either is
|
|
77
|
-
// text.
|
|
78
|
-
//
|
|
77
|
+
// text. A top-level '=' is the NEXT declaration's, so the walk stops there
|
|
78
|
+
// and answers -1 rather than balancing across a record it has not read;
|
|
79
|
+
// that stop is also what keeps a file of unbalanced records linear instead
|
|
80
|
+
// of quadratic (#4573; the argument is on findEntityLength). NOTE:
|
|
81
|
+
// skipCommentAt advances the line counter, so a caller that re-walks the
|
|
82
|
+
// record must save and restore it.
|
|
79
83
|
function findEntityLengthAt(p, startOffset) {
|
|
80
84
|
var d = 0;
|
|
81
85
|
while (p < len) {
|
|
@@ -91,7 +95,8 @@ export const WORKER_LEXING = `
|
|
|
91
95
|
var q = skipCommentAt(p);
|
|
92
96
|
if (q < 0) return -2;
|
|
93
97
|
p = q;
|
|
94
|
-
} else if (b ===
|
|
98
|
+
} else if (b === 0x3D) { return -1; }
|
|
99
|
+
else if (b === 0x28) { d++; p++; }
|
|
95
100
|
else if (b === 0x29) { if (d === 0) return -1; d--; p++; if (d === 0) return p - startOffset; }
|
|
96
101
|
else { p++; }
|
|
97
102
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scan-worker-lexing.js","sourceRoot":"","sources":["../src/scan-worker-lexing.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAE/D;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG
|
|
1
|
+
{"version":3,"file":"scan-worker-lexing.js","sourceRoot":"","sources":["../src/scan-worker-lexing.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAE/D;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyF5B,CAAC"}
|
|
@@ -5,5 +5,5 @@
|
|
|
5
5
|
*/
|
|
6
6
|
/** Exported for direct testing (run inside a mock `self`); the runtime path
|
|
7
7
|
* wraps it in a Blob worker in `scan-worker-inline.ts`. */
|
|
8
|
-
export declare const WORKER_CODE = "\n'use strict';\nself.onmessage = function(e) {\n var buf = new Uint8Array(e.data);\n var len = buf.length;\n var pos = 0;\n var line = 1;\n\n // Pre-allocate result array (estimate ~13,500 entities per MB)\n var estimatedCount = Math.max((len / 1024 / 1024) * 13500, 1000) | 0;\n // Pack results into typed arrays for fast transfer. Uint32Array for the ids:\n // that is the express-id storage contract every consumer of this scan holds\n // to (CompactEntityIndex, the entity/property/quantity tables, the wasm\n // boundary, Rust's ColumnarIndex), so the guard below refuses anything wider\n // rather than carrying it one buffer further and truncating downstream\n // (#3395). The worker runs from a Blob URL and cannot import at runtime, so\n // the bound below is interpolated from express-id.ts when this template is\n // evaluated -- one home for the number, not a copy that can drift.\n\n // The STEP whitespace set: space, tab, CR, LF, form feed, vertical tab.\n // The matched half is the now-exported isSpaceByte in step-lexing.ts; a\n // member going missing from one copy is what #3733 was.\n function isSpaceByteAt(p) {\n var t = buf[p];\n return t === 0x20 || t === 0x09 || t === 0x0A || t === 0x0D || t === 0x0C || t === 0x0B;\n }\n\n // Whether a STEP comment opens at p.\n function opensCommentAt(p) {\n return p + 1 < len && buf[p] === 0x2F && buf[p + 1] === 0x2A;\n }\n\n // Index just past the '*/' closing the comment at p, or -1 when it never\n // closes. Counts the newlines it crosses so line numbers stay in step.\n //\n // Kept behaviourally identical to skipComment/skipTrivia in step-lexing.ts,\n // which this cannot import: the worker source is a string, so this copy of\n // the rule has to live here. Comments do not nest, per ISO 10303-21.\n function skipCommentAt(p) {\n var q = p + 2;\n while (q + 1 < len) {\n if (buf[q] === 0x2A && buf[q + 1] === 0x2F) return q + 2;\n if (buf[q] === 0x0A) line++;\n q++;\n }\n return -1;\n }\n\n // Skip whitespace, comments, and any run of the two -- 10303-21 allows a\n // comment wherever whitespace is allowed, INCLUDING inside a record.\n // Returns -1 when a comment opens and never closes: everything from there on\n // is inside it, so there is nothing left to find.\n //\n // The whitespace byte set (space, tab, CR, LF, form feed, vertical tab) is\n // kept byte-for-byte in sync with isSpaceByte in step-lexing.ts and its\n // three inline twins in tokenizer.ts's scanEntitiesFast -- this file is a\n // string because a Blob worker cannot import at runtime, not a reason for\n // the rule itself to drift.\n function skipTriviaAt(p) {\n for (;;) {\n while (p < len) {\n var t = buf[p];\n if (t === 0x20 || t === 0x09 || t === 0x0D || t === 0x0C || t === 0x0B) { p++; }\n else if (t === 0x0A) { line++; p++; }\n else break;\n }\n if (!opensCommentAt(p)) return p;\n var e = skipCommentAt(p);\n if (e < 0) return -1;\n p = e;\n }\n }\n\n // Byte length from startOffset through the ')' balancing the '(' at p, or a\n // CLASSIFIED failure: -1 unbalanced but readable, -2 a literal or comment\n // that never closed. The RECOVERY point for a record with no ';' of its own\n // (#4179), and the exact answer for whether a ';' is the record's own.\n // Mirrors findEntityLength in step-record-boundary.ts; a literal is jumped\n // whole and a comment after it, in that order, so a paren inside either is\n // text. NOTE: skipCommentAt advances the line counter, so a caller that\n // re-walks the record must save and restore it.\n function findEntityLengthAt(p, startOffset) {\n var d = 0;\n while (p < len) {\n var b = buf[p];\n if (b === 0x27) {\n p++;\n for (;;) {\n if (p >= len) return -2;\n if (buf[p] === 0x27) { if (buf[p + 1] === 0x27) { p += 2; continue; } p++; break; }\n p++;\n }\n } else if (opensCommentAt(p)) {\n var q = skipCommentAt(p);\n if (q < 0) return -2;\n p = q;\n } else if (b === 0x28) { d++; p++; }\n else if (b === 0x29) { if (d === 0) return -1; d--; p++; if (d === 0) return p - startOffset; }\n else { p++; }\n }\n return -1;\n }\n\n\n var ids = new Uint32Array(estimatedCount);\n var offsets = new Uint32Array(estimatedCount);\n var lengths = new Uint32Array(estimatedCount);\n var lines = new Uint32Array(estimatedCount);\n // Type names stored separately (strings)\n var types = new Array(estimatedCount);\n var count = 0;\n // Records refused by the express-id bound, reported back to the caller.\n var oversizedIds = 0;\n // 0 or 1, never a count of how many: whether this scan stopped early on an\n // unclosed string, an unclosed comment, or a declaration cut off before its\n // own '(' -- set once, by the single post-loop check at the bottom of this\n // function. Reported back to the caller. Mirrors tokenizer.ts's\n // scanEntitiesFast contract exactly, including the 0-or-1 shape.\n var malformedRecords = 0;\n // Set on the way to that post-loop check, not counted at each site:\n // 'stopped' for an unclosed string or comment that ran to end of buffer\n // with nothing left to find, 'declOpen' while a #id=TYPE( header is\n // incomplete. 'declOpen' stays armed ONLY when the reason for abandoning\n // is running out of buffer (pos >= len); a mismatch with buffer still\n // left (bad byte, oversized id) clears it, because the scan resumes\n // byte-by-byte from wherever it gave up, and a #ref token inside the\n // abandoned record's own argument list reads as a fresh, equally\n // incomplete attempt that must not report \"cut off\" just because\n // nothing later happens to clear it.\n var stopped = false;\n var declOpen = false;\n\n // Type name cache (IFC files have ~776 unique types across millions of entities)\n var typeCache = new Map();\n\n function growArrays() {\n var newSize = (count * 2) | 0;\n var newIds = new Uint32Array(newSize);\n newIds.set(ids);\n ids = newIds;\n var newOffsets = new Uint32Array(newSize);\n newOffsets.set(offsets);\n offsets = newOffsets;\n var newLengths = new Uint32Array(newSize);\n newLengths.set(lengths);\n lengths = newLengths;\n var newLines = new Uint32Array(newSize);\n newLines.set(lines);\n lines = newLines;\n types.length = newSize;\n }\n\n while (pos < len) {\n var ch = buf[pos];\n\n if (ch === 0x23) { // '#'\n var startOffset = pos;\n var startLine = line;\n pos++;\n\n // Read express ID\n var expressId = 0;\n var hasDigits = false;\n while (pos < len) {\n var c = buf[pos];\n if (c >= 0x30 && c <= 0x39) {\n expressId = expressId * 10 + (c - 0x30);\n hasDigits = true;\n pos++;\n } else {\n break;\n }\n }\n if (!hasDigits) continue;\n declOpen = true;\n\n // Whitespace AND comments: '#1 /* was #7 */ =' is a declaration. The\n // inline loop stays for the common case; skipTriviaAt runs only once a\n // comment actually opens. Mirrors tokenizer.ts's scanEntitiesFast.\n while (pos < len) {\n var c2 = buf[pos];\n if (c2 === 0x20 || c2 === 0x09 || c2 === 0x0D || c2 === 0x0C || c2 === 0x0B) { pos++; }\n else if (c2 === 0x0A) { line++; pos++; }\n else break;\n }\n if (opensCommentAt(pos)) { pos = skipTriviaAt(pos); if (pos < 0) { stopped = true; break; } }\n\n // Check for '='. A byte that is not '=' with buffer left to scan is\n // not a truncation -- clear declOpen so a reference token inside a\n // LATER abandoned record's argument list (see the oversized-id note\n // below) cannot leave it stuck armed with nothing left to clear it.\n if (pos >= len) continue;\n if (buf[pos] !== 0x3D) { declOpen = false; continue; }\n pos++;\n\n // Express-id bound, identical to StepTokenizer.scanEntitiesFast -- this\n // worker is that scan's twin and must reject the same records, and count\n // the same ones, or which scan path ran decides both whether an id\n // collides with another and what the user is told was dropped. The\n // single '>' subsumes a safe-integer check: a digit run accumulated as a\n // double is non-negative and integral, and every value past 2^32 --\n // including one past 2^53, where two distinct ids collide onto one\n // double -- fails it. Tested only after '=' has matched, because that is\n // the DECLARATION shape Rust's EntityScanner validates before refusing:\n // the 'continue' below resumes inside the refused record's argument\n // list, so an oversized '#ref' in there arrives here too and would be\n // counted as a second dropped record. Count the refusal; a record that\n // vanishes without a trace is the same defect wearing a different hat.\n if (expressId > 4294967295) { oversizedIds++; declOpen = false; continue; }\n\n // Skip whitespace and comments\n while (pos < len) {\n var c3 = buf[pos];\n if (c3 === 0x20 || c3 === 0x09 || c3 === 0x0D || c3 === 0x0C || c3 === 0x0B) { pos++; }\n else if (c3 === 0x0A) { line++; pos++; }\n else break;\n }\n if (opensCommentAt(pos)) { pos = skipTriviaAt(pos); if (pos < 0) { stopped = true; break; } }\n\n // Read type name. Must start A-Z; a bad start byte with buffer left\n // clears declOpen for the same reason as the '=' check.\n var typeStart = pos;\n if (pos >= len) continue;\n if (buf[pos] < 0x41 || buf[pos] > 0x5A) { declOpen = false; continue; }\n\n while (pos < len) {\n var c4 = buf[pos];\n if ((c4 >= 0x41 && c4 <= 0x5A) || (c4 >= 0x61 && c4 <= 0x7A) ||\n (c4 >= 0x30 && c4 <= 0x39) || c4 === 0x5F) {\n pos++;\n } else {\n break;\n }\n }\n if (pos === typeStart) continue;\n\n // Cache type name \u2014 use length + hash compound key and verify the actual\n // bytes on a hit. Length alone can't disambiguate a 32-bit hash collision\n // (e.g. \"Aa\"/\"BB\"), so without the byte compare a crafted/unlucky file\n // could have one type silently misread as another. Mirrors tokenizer.ts.\n var typeLen = pos - typeStart;\n var typeHash = typeLen;\n for (var i = typeStart; i < pos; i++) {\n typeHash = (typeHash * 31 + buf[i]) | 0;\n }\n var cacheKey = typeLen + ':' + typeHash;\n var typeName = typeCache.get(cacheKey);\n var cacheHitMatches = false;\n if (typeName !== undefined && typeName.length === typeLen) {\n cacheHitMatches = true;\n for (var v = 0; v < typeLen; v++) {\n if (typeName.charCodeAt(v) !== buf[typeStart + v]) {\n cacheHitMatches = false;\n break;\n }\n }\n }\n if (typeName === undefined || !cacheHitMatches) {\n typeName = String.fromCharCode.apply(null, buf.subarray(typeStart, pos));\n typeCache.set(cacheKey, typeName);\n }\n\n // Skip whitespace and comments\n while (pos < len) {\n var c5 = buf[pos];\n if (c5 === 0x20 || c5 === 0x09 || c5 === 0x0D || c5 === 0x0C || c5 === 0x0B) { pos++; }\n else if (c5 === 0x0A) { line++; pos++; }\n else break;\n }\n if (opensCommentAt(pos)) { pos = skipTriviaAt(pos); if (pos < 0) { stopped = true; break; } }\n\n // Check for '('. Same EOF-vs-mismatch split as '=' and the type name.\n if (pos >= len) continue;\n if (buf[pos] !== 0x28) { declOpen = false; continue; }\n declOpen = false; // Header complete: '(' found.\n\n // Skip to semicolon (handling strings), bounded to THIS record's own\n // body so a record missing its ';' cannot latch onto a later one and\n // swallow what lies between (#4179): the ';' must be preceded, modulo\n // trivia, by the ')' closing the parameter list, and no '=' may come\n // before it outside a string or comment. On either failure the record is\n // DROPPED and the scan resumes at that ')' rather than abandoning the\n // file's tail. close_step_record in rust/core/src/parser/lexical.rs\n // argues both rules and the recovery; this is a hand-duplicated copy\n // because a Blob worker cannot import at runtime. Change them together.\n var parenPos = pos;\n var inString = false;\n var foundTerminator = false;\n // Memoised across the exact ';' check and the recovery below, which\n // would otherwise balance the same record twice. -3 = not computed;\n // -1 = unbalanced but readable; -2 = a literal/comment never closed.\n var recordClose = -3;\n while (pos < len) {\n var c6 = buf[pos];\n if (c6 === 0x27) { // quote\n if (inString && pos + 1 < len && buf[pos + 1] === 0x27) {\n pos += 2;\n continue;\n }\n inString = !inString;\n } else if (c6 === 0x2F && !inString && opensCommentAt(pos)) {\n // The ';' that ends a record can be preceded by a comment holding\n // its own ';'. Take the comment whole, which also makes the quotes\n // and parens inside it text -- the other direction of the rule the\n // quote branch above gives for a '/*' inside a literal.\n var ce = skipCommentAt(pos);\n if (ce < 0) break; // Unterminated: recovery below finds no ')'.\n pos = ce;\n continue;\n } else if (c6 === 0x3B && !inString) { // semicolon\n // ')' modulo whitespace settles it for every record a real file\n // holds. Anything else -- including the '/' of a trailing '*/',\n // which a backwards walk cannot see through -- goes to the cold,\n // exact balance-and-skip-trivia check.\n var w = pos;\n while (w > parenPos && isSpaceByteAt(w - 1)) w--;\n if (buf[w - 1] !== 0x29) {\n var savedBalLine = line;\n recordClose = findEntityLengthAt(parenPos, startOffset);\n line = savedBalLine;\n if (recordClose <= 0) break;\n recordClose += startOffset;\n var after = skipTriviaAt(recordClose);\n line = savedBalLine;\n if (after < 0 || after !== pos) break;\n }\n var entityLength = pos - startOffset + 1;\n\n // Grow if needed\n if (count >= ids.length) growArrays();\n\n ids[count] = expressId;\n offsets[count] = startOffset;\n lengths[count] = entityLength;\n lines[count] = startLine;\n types[count] = typeName;\n count++;\n\n pos++;\n foundTerminator = true;\n break;\n } else if (c6 === 0x3D && !inString) {\n break; // '=': the NEXT declaration already started.\n } else if (c6 === 0x0A) {\n line++;\n }\n pos++;\n }\n\n // No ';' of this record's own. EVERY such exit lands here, so the\n // recovery lives here once rather than at each break -- mirrors\n // tokenizer.ts's scanEntitiesFast. Resume at the ')' balancing this\n // record's own '(' when there is one, dropping just this record;\n // otherwise run to len, ending the scan un-resynced rather than guessing\n // a resume point from misaligned bytes.\n if (!foundTerminator) {\n stopped = true;\n if (recordClose === -3) {\n var savedRecLine = line;\n recordClose = findEntityLengthAt(parenPos, startOffset);\n line = savedRecLine;\n if (recordClose > 0) recordClose += startOffset;\n }\n if (recordClose > 0) {\n pos = recordClose;\n line = startLine;\n for (var q = startOffset; q < pos; q++) if (buf[q] === 0x0A) line++;\n } else if (recordClose === -1) {\n // Unbalanced but readable: re-hunt from past this record's '#'.\n pos = startOffset + 1;\n line = startLine;\n } else {\n pos = len; // Nothing to resume from (#3695).\n }\n }\n } else if (ch === 0x0A) {\n line++;\n pos++;\n } else if (ch === 0x27) { // quote\n // Consume a string literal whole. HEADER records carry no '#', so this\n // loop walks them byte by byte, and a '/*' inside a description would\n // otherwise open a comment that never closes and take DATA with it.\n var sp = pos + 1;\n var closed = false;\n while (sp < len) {\n if (buf[sp] === 0x27) {\n if (sp + 1 < len && buf[sp + 1] === 0x27) { sp += 2; continue; }\n sp++;\n closed = true;\n break;\n }\n if (buf[sp] === 0x0A) { line++; }\n sp++;\n }\n pos = sp;\n // Ran off the end without a closing quote: everything from the open\n // quote to EOF was consumed looking for one, so nothing after it was\n // ever a candidate '#' -- the same \"no terminator\" shape as inside a\n // record, just outside one (a HEADER string, most often).\n if (!closed) { stopped = true; break; }\n } else if (opensCommentAt(pos)) {\n // Skip a comment region BETWEEN records. A record that is commented out\n // is still a well-formed #id = TYPE(...), so every check above accepts\n // it and only skipping the region rejects it.\n var cp = skipCommentAt(pos);\n if (cp < 0) {\n // Unterminated: everything to EOF is commented out.\n pos = len;\n stopped = true;\n break;\n }\n pos = cp;\n } else {\n pos++;\n }\n }\n\n // ONE post-loop check, not an increment at every exit site above: the scan\n // stopped early if it hit an explicit \"no terminator\" boundary ('stopped'),\n // or the last #id=TYPE( header was cut short before its own '(' was found\n // ('declOpen'). Always 0 or 1 -- the scan stops at the first one, so there\n // is nothing further to accumulate.\n if (stopped || declOpen) { malformedRecords = 1; }\n\n // Trim arrays once, reuse for both message and transfer list\n var needsTrim = ids.buffer.byteLength > count * 4;\n var trimmedIds = needsTrim ? ids.slice(0, count) : ids;\n var trimmedOffsets = needsTrim ? offsets.slice(0, count) : offsets;\n var trimmedLengths = needsTrim ? lengths.slice(0, count) : lengths;\n var trimmedLines = needsTrim ? lines.slice(0, count) : lines;\n self.postMessage({\n ids: trimmedIds.buffer,\n offsets: trimmedOffsets.buffer,\n lengths: trimmedLengths.buffer,\n lines: trimmedLines.buffer,\n types: types.slice(0, count),\n count: count,\n oversizedIds: oversizedIds,\n malformedRecords: malformedRecords,\n }, [\n trimmedIds.buffer,\n trimmedOffsets.buffer,\n trimmedLengths.buffer,\n trimmedLines.buffer,\n ]);\n};\n";
|
|
8
|
+
export declare const WORKER_CODE = "\n'use strict';\nself.onmessage = function(e) {\n var buf = new Uint8Array(e.data);\n var len = buf.length;\n var pos = 0;\n var line = 1;\n\n // Pre-allocate result array (estimate ~13,500 entities per MB)\n var estimatedCount = Math.max((len / 1024 / 1024) * 13500, 1000) | 0;\n // Pack results into typed arrays for fast transfer. Uint32Array for the ids:\n // that is the express-id storage contract every consumer of this scan holds\n // to (CompactEntityIndex, the entity/property/quantity tables, the wasm\n // boundary, Rust's ColumnarIndex), so the guard below refuses anything wider\n // rather than carrying it one buffer further and truncating downstream\n // (#3395). The worker runs from a Blob URL and cannot import at runtime, so\n // the bound below is interpolated from express-id.ts when this template is\n // evaluated -- one home for the number, not a copy that can drift.\n\n // The STEP whitespace set: space, tab, CR, LF, form feed, vertical tab.\n // The matched half is the now-exported isSpaceByte in step-lexing.ts; a\n // member going missing from one copy is what #3733 was.\n function isSpaceByteAt(p) {\n var t = buf[p];\n return t === 0x20 || t === 0x09 || t === 0x0A || t === 0x0D || t === 0x0C || t === 0x0B;\n }\n\n // Whether a STEP comment opens at p.\n function opensCommentAt(p) {\n return p + 1 < len && buf[p] === 0x2F && buf[p + 1] === 0x2A;\n }\n\n // Index just past the '*/' closing the comment at p, or -1 when it never\n // closes. Counts the newlines it crosses so line numbers stay in step.\n //\n // Kept behaviourally identical to skipComment/skipTrivia in step-lexing.ts,\n // which this cannot import: the worker source is a string, so this copy of\n // the rule has to live here. Comments do not nest, per ISO 10303-21.\n function skipCommentAt(p) {\n var q = p + 2;\n while (q + 1 < len) {\n if (buf[q] === 0x2A && buf[q + 1] === 0x2F) return q + 2;\n if (buf[q] === 0x0A) line++;\n q++;\n }\n return -1;\n }\n\n // Skip whitespace, comments, and any run of the two -- 10303-21 allows a\n // comment wherever whitespace is allowed, INCLUDING inside a record.\n // Returns -1 when a comment opens and never closes: everything from there on\n // is inside it, so there is nothing left to find.\n //\n // The whitespace byte set (space, tab, CR, LF, form feed, vertical tab) is\n // kept byte-for-byte in sync with isSpaceByte in step-lexing.ts and its\n // three inline twins in tokenizer.ts's scanEntitiesFast -- this file is a\n // string because a Blob worker cannot import at runtime, not a reason for\n // the rule itself to drift.\n function skipTriviaAt(p) {\n for (;;) {\n while (p < len) {\n var t = buf[p];\n if (t === 0x20 || t === 0x09 || t === 0x0D || t === 0x0C || t === 0x0B) { p++; }\n else if (t === 0x0A) { line++; p++; }\n else break;\n }\n if (!opensCommentAt(p)) return p;\n var e = skipCommentAt(p);\n if (e < 0) return -1;\n p = e;\n }\n }\n\n // Byte length from startOffset through the ')' balancing the '(' at p, or a\n // CLASSIFIED failure: -1 unbalanced but readable, -2 a literal or comment\n // that never closed. The RECOVERY point for a record with no ';' of its own\n // (#4179), and the exact answer for whether a ';' is the record's own.\n // Mirrors findEntityLength in step-record-boundary.ts; a literal is jumped\n // whole and a comment after it, in that order, so a paren inside either is\n // text. A top-level '=' is the NEXT declaration's, so the walk stops there\n // and answers -1 rather than balancing across a record it has not read;\n // that stop is also what keeps a file of unbalanced records linear instead\n // of quadratic (#4573; the argument is on findEntityLength). NOTE:\n // skipCommentAt advances the line counter, so a caller that re-walks the\n // record must save and restore it.\n function findEntityLengthAt(p, startOffset) {\n var d = 0;\n while (p < len) {\n var b = buf[p];\n if (b === 0x27) {\n p++;\n for (;;) {\n if (p >= len) return -2;\n if (buf[p] === 0x27) { if (buf[p + 1] === 0x27) { p += 2; continue; } p++; break; }\n p++;\n }\n } else if (opensCommentAt(p)) {\n var q = skipCommentAt(p);\n if (q < 0) return -2;\n p = q;\n } else if (b === 0x3D) { return -1; }\n else if (b === 0x28) { d++; p++; }\n else if (b === 0x29) { if (d === 0) return -1; d--; p++; if (d === 0) return p - startOffset; }\n else { p++; }\n }\n return -1;\n }\n\n\n var ids = new Uint32Array(estimatedCount);\n var offsets = new Uint32Array(estimatedCount);\n var lengths = new Uint32Array(estimatedCount);\n var lines = new Uint32Array(estimatedCount);\n // Type names stored separately (strings)\n var types = new Array(estimatedCount);\n var count = 0;\n // Records refused by the express-id bound, reported back to the caller.\n var oversizedIds = 0;\n // 0 or 1, never a count of how many: whether this scan stopped early on an\n // unclosed string, an unclosed comment, or a declaration cut off before its\n // own '(' -- set once, by the single post-loop check at the bottom of this\n // function. Reported back to the caller. Mirrors tokenizer.ts's\n // scanEntitiesFast contract exactly, including the 0-or-1 shape.\n var malformedRecords = 0;\n // Set on the way to that post-loop check, not counted at each site:\n // 'stopped' for an unclosed string or comment that ran to end of buffer\n // with nothing left to find, 'declOpen' while a #id=TYPE( header is\n // incomplete. 'declOpen' stays armed ONLY when the reason for abandoning\n // is running out of buffer (pos >= len); a mismatch with buffer still\n // left (bad byte, oversized id) clears it, because the scan resumes\n // byte-by-byte from wherever it gave up, and a #ref token inside the\n // abandoned record's own argument list reads as a fresh, equally\n // incomplete attempt that must not report \"cut off\" just because\n // nothing later happens to clear it.\n var stopped = false;\n var declOpen = false;\n\n // Type name cache (IFC files have ~776 unique types across millions of entities)\n var typeCache = new Map();\n\n function growArrays() {\n var newSize = (count * 2) | 0;\n var newIds = new Uint32Array(newSize);\n newIds.set(ids);\n ids = newIds;\n var newOffsets = new Uint32Array(newSize);\n newOffsets.set(offsets);\n offsets = newOffsets;\n var newLengths = new Uint32Array(newSize);\n newLengths.set(lengths);\n lengths = newLengths;\n var newLines = new Uint32Array(newSize);\n newLines.set(lines);\n lines = newLines;\n types.length = newSize;\n }\n\n while (pos < len) {\n var ch = buf[pos];\n\n if (ch === 0x23) { // '#'\n var startOffset = pos;\n var startLine = line;\n pos++;\n\n // Read express ID\n var expressId = 0;\n var hasDigits = false;\n while (pos < len) {\n var c = buf[pos];\n if (c >= 0x30 && c <= 0x39) {\n expressId = expressId * 10 + (c - 0x30);\n hasDigits = true;\n pos++;\n } else {\n break;\n }\n }\n if (!hasDigits) continue;\n declOpen = true;\n\n // Whitespace AND comments: '#1 /* was #7 */ =' is a declaration. The\n // inline loop stays for the common case; skipTriviaAt runs only once a\n // comment actually opens. Mirrors tokenizer.ts's scanEntitiesFast.\n while (pos < len) {\n var c2 = buf[pos];\n if (c2 === 0x20 || c2 === 0x09 || c2 === 0x0D || c2 === 0x0C || c2 === 0x0B) { pos++; }\n else if (c2 === 0x0A) { line++; pos++; }\n else break;\n }\n if (opensCommentAt(pos)) { pos = skipTriviaAt(pos); if (pos < 0) { stopped = true; break; } }\n\n // Check for '='. A byte that is not '=' with buffer left to scan is\n // not a truncation -- clear declOpen so a reference token inside a\n // LATER abandoned record's argument list (see the oversized-id note\n // below) cannot leave it stuck armed with nothing left to clear it.\n if (pos >= len) continue;\n if (buf[pos] !== 0x3D) { declOpen = false; continue; }\n pos++;\n\n // Express-id bound, identical to StepTokenizer.scanEntitiesFast -- this\n // worker is that scan's twin and must reject the same records, and count\n // the same ones, or which scan path ran decides both whether an id\n // collides with another and what the user is told was dropped. The\n // single '>' subsumes a safe-integer check: a digit run accumulated as a\n // double is non-negative and integral, and every value past 2^32 --\n // including one past 2^53, where two distinct ids collide onto one\n // double -- fails it. Tested only after '=' has matched, because that is\n // the DECLARATION shape Rust's EntityScanner validates before refusing:\n // the 'continue' below resumes inside the refused record's argument\n // list, so an oversized '#ref' in there arrives here too and would be\n // counted as a second dropped record. Count the refusal; a record that\n // vanishes without a trace is the same defect wearing a different hat.\n if (expressId > 4294967295) { oversizedIds++; declOpen = false; continue; }\n\n // Skip whitespace and comments\n while (pos < len) {\n var c3 = buf[pos];\n if (c3 === 0x20 || c3 === 0x09 || c3 === 0x0D || c3 === 0x0C || c3 === 0x0B) { pos++; }\n else if (c3 === 0x0A) { line++; pos++; }\n else break;\n }\n if (opensCommentAt(pos)) { pos = skipTriviaAt(pos); if (pos < 0) { stopped = true; break; } }\n\n // Read type name. Must start A-Z; a bad start byte with buffer left\n // clears declOpen for the same reason as the '=' check.\n var typeStart = pos;\n if (pos >= len) continue;\n if (buf[pos] < 0x41 || buf[pos] > 0x5A) { declOpen = false; continue; }\n\n while (pos < len) {\n var c4 = buf[pos];\n if ((c4 >= 0x41 && c4 <= 0x5A) || (c4 >= 0x61 && c4 <= 0x7A) ||\n (c4 >= 0x30 && c4 <= 0x39) || c4 === 0x5F) {\n pos++;\n } else {\n break;\n }\n }\n if (pos === typeStart) continue;\n\n // Cache type name \u2014 use length + hash compound key and verify the actual\n // bytes on a hit. Length alone can't disambiguate a 32-bit hash collision\n // (e.g. \"Aa\"/\"BB\"), so without the byte compare a crafted/unlucky file\n // could have one type silently misread as another. Mirrors tokenizer.ts.\n var typeLen = pos - typeStart;\n var typeHash = typeLen;\n for (var i = typeStart; i < pos; i++) {\n typeHash = (typeHash * 31 + buf[i]) | 0;\n }\n var cacheKey = typeLen + ':' + typeHash;\n var typeName = typeCache.get(cacheKey);\n var cacheHitMatches = false;\n if (typeName !== undefined && typeName.length === typeLen) {\n cacheHitMatches = true;\n for (var v = 0; v < typeLen; v++) {\n if (typeName.charCodeAt(v) !== buf[typeStart + v]) {\n cacheHitMatches = false;\n break;\n }\n }\n }\n if (typeName === undefined || !cacheHitMatches) {\n typeName = String.fromCharCode.apply(null, buf.subarray(typeStart, pos));\n typeCache.set(cacheKey, typeName);\n }\n\n // Skip whitespace and comments\n while (pos < len) {\n var c5 = buf[pos];\n if (c5 === 0x20 || c5 === 0x09 || c5 === 0x0D || c5 === 0x0C || c5 === 0x0B) { pos++; }\n else if (c5 === 0x0A) { line++; pos++; }\n else break;\n }\n if (opensCommentAt(pos)) { pos = skipTriviaAt(pos); if (pos < 0) { stopped = true; break; } }\n\n // Check for '('. Same EOF-vs-mismatch split as '=' and the type name.\n if (pos >= len) continue;\n if (buf[pos] !== 0x28) { declOpen = false; continue; }\n declOpen = false; // Header complete: '(' found.\n\n // Skip to semicolon (handling strings), bounded to THIS record's own\n // body so a record missing its ';' cannot latch onto a later one and\n // swallow what lies between (#4179): the ';' must be preceded, modulo\n // trivia, by the ')' closing the parameter list, and no '=' may come\n // before it outside a string or comment. On either failure the record is\n // DROPPED and the scan resumes at that ')' rather than abandoning the\n // file's tail. close_step_record in rust/core/src/parser/lexical.rs\n // argues both rules and the recovery; this is a hand-duplicated copy\n // because a Blob worker cannot import at runtime. Change them together.\n var parenPos = pos;\n var inString = false;\n var foundTerminator = false;\n // Memoised across the exact ';' check and the recovery below, which\n // would otherwise balance the same record twice. -3 = not computed;\n // -1 = unbalanced but readable; -2 = a literal/comment never closed.\n var recordClose = -3;\n while (pos < len) {\n var c6 = buf[pos];\n if (c6 === 0x27) { // quote\n if (inString && pos + 1 < len && buf[pos + 1] === 0x27) {\n pos += 2;\n continue;\n }\n inString = !inString;\n } else if (c6 === 0x2F && !inString && opensCommentAt(pos)) {\n // The ';' that ends a record can be preceded by a comment holding\n // its own ';'. Take the comment whole, which also makes the quotes\n // and parens inside it text -- the other direction of the rule the\n // quote branch above gives for a '/*' inside a literal.\n var ce = skipCommentAt(pos);\n if (ce < 0) break; // Unterminated: recovery below finds no ')'.\n pos = ce;\n continue;\n } else if (c6 === 0x3B && !inString) { // semicolon\n // ')' modulo whitespace settles it for every record a real file\n // holds. Anything else -- including the '/' of a trailing '*/',\n // which a backwards walk cannot see through -- goes to the cold,\n // exact balance-and-skip-trivia check.\n var w = pos;\n while (w > parenPos && isSpaceByteAt(w - 1)) w--;\n if (buf[w - 1] !== 0x29) {\n var savedBalLine = line;\n recordClose = findEntityLengthAt(parenPos, startOffset);\n line = savedBalLine;\n if (recordClose <= 0) break;\n recordClose += startOffset;\n var after = skipTriviaAt(recordClose);\n line = savedBalLine;\n if (after < 0 || after !== pos) break;\n }\n var entityLength = pos - startOffset + 1;\n\n // Grow if needed\n if (count >= ids.length) growArrays();\n\n ids[count] = expressId;\n offsets[count] = startOffset;\n lengths[count] = entityLength;\n lines[count] = startLine;\n types[count] = typeName;\n count++;\n\n pos++;\n foundTerminator = true;\n break;\n } else if (c6 === 0x3D && !inString) {\n break; // '=': the NEXT declaration already started.\n } else if (c6 === 0x0A) {\n line++;\n }\n pos++;\n }\n\n // No ';' of this record's own. EVERY such exit lands here, so the\n // recovery lives here once rather than at each break -- mirrors\n // tokenizer.ts's scanEntitiesFast. Resume at the ')' balancing this\n // record's own '(' when there is one, dropping just this record;\n // otherwise run to len, ending the scan un-resynced rather than guessing\n // a resume point from misaligned bytes. The balance walk stops at the\n // next declaration's '=' (#4573), so a refusal costs this record's\n // bytes, never a re-walk of the remainder per refusal.\n if (!foundTerminator) {\n stopped = true;\n if (recordClose === -3) {\n var savedRecLine = line;\n recordClose = findEntityLengthAt(parenPos, startOffset);\n line = savedRecLine;\n if (recordClose > 0) recordClose += startOffset;\n }\n if (recordClose > 0) {\n pos = recordClose;\n line = startLine;\n for (var q = startOffset; q < pos; q++) if (buf[q] === 0x0A) line++;\n } else if (recordClose === -1) {\n // No ')' before the next '=' (or EOF), bytes after readable:\n // re-hunt from past this record's '#'.\n pos = startOffset + 1;\n line = startLine;\n } else {\n pos = len; // Nothing to resume from (#3695).\n }\n }\n } else if (ch === 0x0A) {\n line++;\n pos++;\n } else if (ch === 0x27) { // quote\n // Consume a string literal whole. HEADER records carry no '#', so this\n // loop walks them byte by byte, and a '/*' inside a description would\n // otherwise open a comment that never closes and take DATA with it.\n var sp = pos + 1;\n var closed = false;\n while (sp < len) {\n if (buf[sp] === 0x27) {\n if (sp + 1 < len && buf[sp + 1] === 0x27) { sp += 2; continue; }\n sp++;\n closed = true;\n break;\n }\n if (buf[sp] === 0x0A) { line++; }\n sp++;\n }\n pos = sp;\n // Ran off the end without a closing quote: everything from the open\n // quote to EOF was consumed looking for one, so nothing after it was\n // ever a candidate '#' -- the same \"no terminator\" shape as inside a\n // record, just outside one (a HEADER string, most often).\n if (!closed) { stopped = true; break; }\n } else if (opensCommentAt(pos)) {\n // Skip a comment region BETWEEN records. A record that is commented out\n // is still a well-formed #id = TYPE(...), so every check above accepts\n // it and only skipping the region rejects it.\n var cp = skipCommentAt(pos);\n if (cp < 0) {\n // Unterminated: everything to EOF is commented out.\n pos = len;\n stopped = true;\n break;\n }\n pos = cp;\n } else {\n pos++;\n }\n }\n\n // ONE post-loop check, not an increment at every exit site above: the scan\n // stopped early if it hit an explicit \"no terminator\" boundary ('stopped'),\n // or the last #id=TYPE( header was cut short before its own '(' was found\n // ('declOpen'). Always 0 or 1 -- the scan stops at the first one, so there\n // is nothing further to accumulate.\n if (stopped || declOpen) { malformedRecords = 1; }\n\n // Trim arrays once, reuse for both message and transfer list\n var needsTrim = ids.buffer.byteLength > count * 4;\n var trimmedIds = needsTrim ? ids.slice(0, count) : ids;\n var trimmedOffsets = needsTrim ? offsets.slice(0, count) : offsets;\n var trimmedLengths = needsTrim ? lengths.slice(0, count) : lengths;\n var trimmedLines = needsTrim ? lines.slice(0, count) : lines;\n self.postMessage({\n ids: trimmedIds.buffer,\n offsets: trimmedOffsets.buffer,\n lengths: trimmedLengths.buffer,\n lines: trimmedLines.buffer,\n types: types.slice(0, count),\n count: count,\n oversizedIds: oversizedIds,\n malformedRecords: malformedRecords,\n }, [\n trimmedIds.buffer,\n trimmedOffsets.buffer,\n trimmedLengths.buffer,\n trimmedLines.buffer,\n ]);\n};\n";
|
|
9
9
|
//# sourceMappingURL=scan-worker-source.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scan-worker-source.d.ts","sourceRoot":"","sources":["../src/scan-worker-source.ts"],"names":[],"mappings":"AAiBA;;;;GAIG;AACH;4DAC4D;AAC5D,eAAO,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"scan-worker-source.d.ts","sourceRoot":"","sources":["../src/scan-worker-source.ts"],"names":[],"mappings":"AAiBA;;;;GAIG;AACH;4DAC4D;AAC5D,eAAO,MAAM,WAAW,4lmBA6WvB,CAAC"}
|
|
@@ -289,7 +289,9 @@ ${WORKER_LEXING}
|
|
|
289
289
|
// tokenizer.ts's scanEntitiesFast. Resume at the ')' balancing this
|
|
290
290
|
// record's own '(' when there is one, dropping just this record;
|
|
291
291
|
// otherwise run to len, ending the scan un-resynced rather than guessing
|
|
292
|
-
// a resume point from misaligned bytes.
|
|
292
|
+
// a resume point from misaligned bytes. The balance walk stops at the
|
|
293
|
+
// next declaration's '=' (#4573), so a refusal costs this record's
|
|
294
|
+
// bytes, never a re-walk of the remainder per refusal.
|
|
293
295
|
if (!foundTerminator) {
|
|
294
296
|
stopped = true;
|
|
295
297
|
if (recordClose === -3) {
|
|
@@ -303,7 +305,8 @@ ${WORKER_LEXING}
|
|
|
303
305
|
line = startLine;
|
|
304
306
|
for (var q = startOffset; q < pos; q++) if (buf[q] === 0x0A) line++;
|
|
305
307
|
} else if (recordClose === -1) {
|
|
306
|
-
//
|
|
308
|
+
// No ')' before the next '=' (or EOF), bytes after readable:
|
|
309
|
+
// re-hunt from past this record's '#'.
|
|
307
310
|
pos = startOffset + 1;
|
|
308
311
|
line = startLine;
|
|
309
312
|
} else {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scan-worker-source.js","sourceRoot":"","sources":["../src/scan-worker-source.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAE/D;;;;;;;;GAQG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAExD;;;;GAIG;AACH;4DAC4D;AAC5D,MAAM,CAAC,MAAM,WAAW,GAAG;;;;;;;;;;;;;;;;;;EAkBzB,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBA0GS,cAAc
|
|
1
|
+
{"version":3,"file":"scan-worker-source.js","sourceRoot":"","sources":["../src/scan-worker-source.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAE/D;;;;;;;;GAQG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAExD;;;;GAIG;AACH;4DAC4D;AAC5D,MAAM,CAAC,MAAM,WAAW,GAAG;;;;;;;;;;;;;;;;;;EAkBzB,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBA0GS,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiPrC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"step-record-boundary.d.ts","sourceRoot":"","sources":["../src/step-record-boundary.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"step-record-boundary.d.ts","sourceRoot":"","sources":["../src/step-record-boundary.ts"],"names":[],"mappings":"AA0DA,eAAO,MAAM,iBAAiB,KAAK,CAAC;AACpC,eAAO,MAAM,iBAAiB,KAAK,CAAC;AACpC,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,UAAU,EAAE,GAAG,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,MAAM,CAqC1F;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAC/B,GAAG,EAAE,UAAU,EACf,QAAQ,EAAE,MAAM,EAChB,WAAW,EAAE,MAAM,GAClB,MAAM,CAGR;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,qBAAqB,CACnC,GAAG,EAAE,UAAU,EACf,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,MAAM,GACX,OAAO,CAIT"}
|
|
@@ -16,6 +16,7 @@ import { opensComment, skipComment, skipStringLiteral, skipTrivia } from './step
|
|
|
16
16
|
const QUOTE = 0x27; // '\''
|
|
17
17
|
const LPAREN = 0x28; // '('
|
|
18
18
|
const RPAREN = 0x29; // ')'
|
|
19
|
+
const EQUALS = 0x3D; // '='
|
|
19
20
|
// Byte length of the record starting at `startOffset` whose argument list
|
|
20
21
|
// opens at `pos`: up to and including the ')' balancing that '('.
|
|
21
22
|
//
|
|
@@ -35,6 +36,22 @@ const RPAREN = 0x29; // ')'
|
|
|
35
36
|
// test comes first, so a '/*' inside a value is text; the comment is then taken
|
|
36
37
|
// whole, so a '(' or a quote inside it is text. Without that, the comment in
|
|
37
38
|
// `#1=IFCWALL('a', /* see IFCWALL( */ $);` opened a depth that never closed.
|
|
39
|
+
//
|
|
40
|
+
// The walk STOPS at the next top-level '=' and answers UNBALANCED_RECORD
|
|
41
|
+
// (#4573; "Why the scan stops at the next `=`" in lexical.rs). 10303-21 has
|
|
42
|
+
// '=' only in `entity_instance_name '=' record`, so a ')' past one closes a
|
|
43
|
+
// LATER record's list, never this one's: `#1=IFCA(2 #2=IFCWALL($));`
|
|
44
|
+
// balanced at #2's ')' and the recovery resumed past #2, dropping it with
|
|
45
|
+
// nothing reported. The same stop is what bounds the walk. Without it a record
|
|
46
|
+
// with no ')' of its own read to end of input, the caller resumed one byte
|
|
47
|
+
// past its '#', and the next declaration repeated the whole walk: a file of
|
|
48
|
+
// `#1=A(2;` repeated measured 2.5s at 10 000 records and 10s at 20 000, 4x
|
|
49
|
+
// per doubling, in this scan and the Blob worker's copy alike. Stopping at
|
|
50
|
+
// the '=' makes each refusal cost its own record's bytes, so a file of refused
|
|
51
|
+
// records costs its length. A byte-window cap is not monotone (work is
|
|
52
|
+
// records x window, and the adversary shrinks the record), and a suffix memo
|
|
53
|
+
// of "no terminator from here on" is disarmed by the `ENDSEC;` every real
|
|
54
|
+
// file ends with; neither substitutes for the grammar rule.
|
|
38
55
|
export const UNBALANCED_RECORD = -1;
|
|
39
56
|
export const UNREADABLE_RECORD = -2;
|
|
40
57
|
export function findEntityLength(buf, pos, startOffset) {
|
|
@@ -57,11 +74,19 @@ export function findEntityLength(buf, pos, startOffset) {
|
|
|
57
74
|
return UNREADABLE_RECORD;
|
|
58
75
|
pos = end;
|
|
59
76
|
}
|
|
77
|
+
else if (char === EQUALS) {
|
|
78
|
+
// The NEXT declaration's: this record's own ')' cannot lie past it.
|
|
79
|
+
return UNBALANCED_RECORD;
|
|
80
|
+
}
|
|
60
81
|
else if (char === LPAREN) {
|
|
61
82
|
depth++;
|
|
62
83
|
pos++;
|
|
63
84
|
}
|
|
64
85
|
else if (char === RPAREN) {
|
|
86
|
+
// A ')' before any '(' closes nothing, but the bytes after it are
|
|
87
|
+
// readable: the answer the Rust and worker copies already give.
|
|
88
|
+
if (depth === 0)
|
|
89
|
+
return UNBALANCED_RECORD;
|
|
65
90
|
depth--;
|
|
66
91
|
pos++;
|
|
67
92
|
if (depth === 0)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"step-record-boundary.js","sourceRoot":"","sources":["../src/step-record-boundary.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAE/D;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE5F,MAAM,KAAK,GAAG,IAAI,CAAC,CAAC,OAAO;AAC3B,MAAM,MAAM,GAAG,IAAI,CAAC,CAAC,MAAM;AAC3B,MAAM,MAAM,GAAG,IAAI,CAAC,CAAC,MAAM;AAE3B,0EAA0E;AAC1E,kEAAkE;AAClE,EAAE;AACF,2EAA2E;AAC3E,8EAA8E;AAC9E,+EAA+E;AAC/E,6EAA6E;AAC7E,iDAAiD;AACjD,EAAE;AACF,+EAA+E;AAC/E,gFAAgF;AAChF,2EAA2E;AAC3E,gFAAgF;AAChF,+EAA+E;AAC/E,EAAE;AACF,+EAA+E;AAC/E,gFAAgF;AAChF,6EAA6E;AAC7E,6EAA6E;AAC7E,MAAM,CAAC,MAAM,iBAAiB,GA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AAiB,CAAC;QAC3B,CAAC;aAAM,IAAI,IAAI,KAAK,MAAM,EAAE,CAAC;YAC3B,KAAK,EAAE,CAAC;YACR,GAAG,EAAE,CAAC;QACR,CAAC;aAAM,IAAI,IAAI,KAAK,MAAM,EAAE,CAAC;YAC3B,kEAAkE;YAClE,gEAAgE;YAChE,IAAI,KAAK,KAAK,CAAC;gBAAE,OAAO,iBAAiB,CAAC;YAC1C,KAAK,EAAE,CAAC;YACR,GAAG,EAAE,CAAC;YACN,IAAI,KAAK,KAAK,CAAC;gBAAE,OAAO,GAAG,GAAG,WAAW,CAAC;QAC5C,CAAC;aAAM,CAAC;YACN,GAAG,EAAE,CAAC;QACR,CAAC;IACH,CAAC;IAED,OAAO,iBAAiB,CAAC,CAAC,2CAA2C;AACvE,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,iBAAiB,CAC/B,GAAe,EACf,QAAgB,EAChB,WAAmB;IAEnB,MAAM,MAAM,GAAG,gBAAgB,CAAC,GAAG,EAAE,QAAQ,EAAE,WAAW,CAAC,CAAC;IAC5D,OAAO,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,WAAW,GAAG,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC;AACpD,CAAC;AAED;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,qBAAqB,CACnC,GAAe,EACf,KAAa,EACb,IAAY;IAEZ,IAAI,KAAK,IAAI,CAAC;QAAE,OAAO,KAAK,CAAC;IAC7B,MAAM,KAAK,GAAG,UAAU,CAAC,GAAG,EAAE,KAAK,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IACjD,OAAO,CAAC,KAAK,CAAC,IAAI,IAAI,KAAK,CAAC,IAAI,KAAK,IAAI,CAAC;AAC5C,CAAC"}
|
|
@@ -41,6 +41,50 @@ export declare const UNBALANCED_CASE: {
|
|
|
41
41
|
};
|
|
42
42
|
/** Bodies with no ';' of their own AND no balancing ')' to resume at. */
|
|
43
43
|
export declare const UNRESUMABLE_BODIES: readonly string[];
|
|
44
|
+
/**
|
|
45
|
+
* A record whose parens balance only PAST a later declaration must not hand
|
|
46
|
+
* back a resume point past that declaration (#4573). Pre-fix the balance walk
|
|
47
|
+
* closed #1 at #2's ')' and the fast scan resumed after it, so #2 vanished
|
|
48
|
+
* with nothing reported. The walk now stops at #2's '=', #1 is dropped alone,
|
|
49
|
+
* and #2 (its own ')' then ';') is found by the re-hunt. Matches Rust's
|
|
50
|
+
* `recovery_does_not_resume_past_the_next_declaration_4179`.
|
|
51
|
+
*/
|
|
52
|
+
export declare const NEXT_DECLARATION_CASE: {
|
|
53
|
+
text: string;
|
|
54
|
+
spans: readonly [readonly [2, "#2=IFCWALL($));"], readonly [3, "#3=IFCC(3);"]];
|
|
55
|
+
};
|
|
56
|
+
/**
|
|
57
|
+
* A refused record must not damage its NEIGHBOUR. #1 is refused at the stray
|
|
58
|
+
* '=' in its body and re-hunted from past its '#'; the hunt then meets
|
|
59
|
+
* `#5 = 3);`, which has a declaration's `#<digits> =` prefix. It is refused
|
|
60
|
+
* at the type-name check (a record needs a keyword after the '='), so the
|
|
61
|
+
* real #5 declared a line earlier is the only #5. Matches Rust's
|
|
62
|
+
* `a_stray_equals_in_a_refused_body_does_not_mint_a_phantom_neighbour`.
|
|
63
|
+
*/
|
|
64
|
+
export declare const PHANTOM_NEIGHBOUR_CASE: {
|
|
65
|
+
text: string;
|
|
66
|
+
ids: readonly [5, 6];
|
|
67
|
+
};
|
|
68
|
+
/**
|
|
69
|
+
* Files that are nothing but refused records, one per way of reaching the
|
|
70
|
+
* balance walk (#4573). `#1=A(2;` finds a ';' with no ')' before it, so the
|
|
71
|
+
* exact check balances the record; `#1=A(` never finds a ';' at all, so the
|
|
72
|
+
* recovery balances it. The trailers are what disarmed a suffix-memo cut of
|
|
73
|
+
* the fix: a lone ';', and the `ENDSEC;` every real file ends with.
|
|
74
|
+
*
|
|
75
|
+
* Pre-fix each walk read to end of input and the next declaration repeated
|
|
76
|
+
* it: measured 1.8-2.5s at 10 000 records and 7.4-10s at 20 000, 4x per
|
|
77
|
+
* doubling, on the fast scan and the worker copy alike. Bounded at the next
|
|
78
|
+
* '=', all four cost the file's length. `RECORDS` is sized so the unfixed
|
|
79
|
+
* walk overruns the budget many times over on any machine (the well-formed
|
|
80
|
+
* twin takes ~2ms here; the 20ms floor keeps timer noise out), while a fixed
|
|
81
|
+
* scan finishes in single-digit milliseconds.
|
|
82
|
+
*/
|
|
83
|
+
export declare const QUADRATIC_SHAPES: readonly (readonly [string, string, string])[];
|
|
84
|
+
export declare const QUADRATIC_RECORDS = 20000;
|
|
85
|
+
export declare const QUADRATIC_WELL_FORMED = "#1=A();\n";
|
|
86
|
+
/** The budget a refused-record file must scan within, from the well-formed twin's time. */
|
|
87
|
+
export declare function quadraticBudgetMs(baselineMs: number): number;
|
|
44
88
|
/** The two shapes #4179 is about, as `[label, text, expected spans]`. */
|
|
45
89
|
/**
|
|
46
90
|
* Records whose LINE numbers a cold re-walk must not disturb.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"step-record-boundary.vectors.d.ts","sourceRoot":"","sources":["../src/step-record-boundary.vectors.ts"],"names":[],"mappings":"AAIA;;;;;;;;GAQG;AAEH,uEAAuE;AACvE,MAAM,MAAM,SAAS,GAAG;IAAE,KAAK,EAAE,CAAC,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,EAAE,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,CAAC;AAEpF,kDAAkD;AAClD,MAAM,MAAM,UAAU,GAAG,CAAC,IAAI,EAAE,MAAM,KAAK,SAAS,CAAC;AAErD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,YAAY,EAAE,SAAS,MAAM,EAgBzC,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,eAAe;;;CAG3B,CAAC;AAEF,yEAAyE;AACzE,eAAO,MAAM,kBAAkB,EAAE,SAAS,MAAM,EAG/C,CAAC;AAEF,yEAAyE;AACzE;;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;;;GAOG;AACH,eAAO,MAAM,gBAAgB;;;CAG5B,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,SAAS,CAAC,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,EAgB9F,CAAC"}
|
|
@@ -47,6 +47,57 @@ export const UNRESUMABLE_BODIES = [
|
|
|
47
47
|
"IFCWALL('never closes,$)",
|
|
48
48
|
'IFCWALL(/* never closes $)',
|
|
49
49
|
];
|
|
50
|
+
/**
|
|
51
|
+
* A record whose parens balance only PAST a later declaration must not hand
|
|
52
|
+
* back a resume point past that declaration (#4573). Pre-fix the balance walk
|
|
53
|
+
* closed #1 at #2's ')' and the fast scan resumed after it, so #2 vanished
|
|
54
|
+
* with nothing reported. The walk now stops at #2's '=', #1 is dropped alone,
|
|
55
|
+
* and #2 (its own ')' then ';') is found by the re-hunt. Matches Rust's
|
|
56
|
+
* `recovery_does_not_resume_past_the_next_declaration_4179`.
|
|
57
|
+
*/
|
|
58
|
+
export const NEXT_DECLARATION_CASE = {
|
|
59
|
+
text: '#1=IFCA(2 #2=IFCWALL($));\n#3=IFCC(3);\n',
|
|
60
|
+
spans: [[2, '#2=IFCWALL($));'], [3, '#3=IFCC(3);']],
|
|
61
|
+
};
|
|
62
|
+
/**
|
|
63
|
+
* A refused record must not damage its NEIGHBOUR. #1 is refused at the stray
|
|
64
|
+
* '=' in its body and re-hunted from past its '#'; the hunt then meets
|
|
65
|
+
* `#5 = 3);`, which has a declaration's `#<digits> =` prefix. It is refused
|
|
66
|
+
* at the type-name check (a record needs a keyword after the '='), so the
|
|
67
|
+
* real #5 declared a line earlier is the only #5. Matches Rust's
|
|
68
|
+
* `a_stray_equals_in_a_refused_body_does_not_mint_a_phantom_neighbour`.
|
|
69
|
+
*/
|
|
70
|
+
export const PHANTOM_NEIGHBOUR_CASE = {
|
|
71
|
+
text: '#5=IFCCARTESIANPOINT((0.,0.));\n#1=IFCWALL(#5 = 3);\n#6=IFCWALL($);\n',
|
|
72
|
+
ids: [5, 6],
|
|
73
|
+
};
|
|
74
|
+
/**
|
|
75
|
+
* Files that are nothing but refused records, one per way of reaching the
|
|
76
|
+
* balance walk (#4573). `#1=A(2;` finds a ';' with no ')' before it, so the
|
|
77
|
+
* exact check balances the record; `#1=A(` never finds a ';' at all, so the
|
|
78
|
+
* recovery balances it. The trailers are what disarmed a suffix-memo cut of
|
|
79
|
+
* the fix: a lone ';', and the `ENDSEC;` every real file ends with.
|
|
80
|
+
*
|
|
81
|
+
* Pre-fix each walk read to end of input and the next declaration repeated
|
|
82
|
+
* it: measured 1.8-2.5s at 10 000 records and 7.4-10s at 20 000, 4x per
|
|
83
|
+
* doubling, on the fast scan and the worker copy alike. Bounded at the next
|
|
84
|
+
* '=', all four cost the file's length. `RECORDS` is sized so the unfixed
|
|
85
|
+
* walk overruns the budget many times over on any machine (the well-formed
|
|
86
|
+
* twin takes ~2ms here; the 20ms floor keeps timer noise out), while a fixed
|
|
87
|
+
* scan finishes in single-digit milliseconds.
|
|
88
|
+
*/
|
|
89
|
+
export const QUADRATIC_SHAPES = [
|
|
90
|
+
['#1=A(2;\\n', '#1=A(2;\n', ''],
|
|
91
|
+
['#1=A(\\n', '#1=A(\n', ''],
|
|
92
|
+
['#1=A(\\n then ;', '#1=A(\n', ';'],
|
|
93
|
+
['#1=A(\\n then ENDSEC', '#1=A(\n', 'ENDSEC;\nEND-ISO-10303-21;\n'],
|
|
94
|
+
];
|
|
95
|
+
export const QUADRATIC_RECORDS = 20_000;
|
|
96
|
+
export const QUADRATIC_WELL_FORMED = '#1=A();\n';
|
|
97
|
+
/** The budget a refused-record file must scan within, from the well-formed twin's time. */
|
|
98
|
+
export function quadraticBudgetMs(baselineMs) {
|
|
99
|
+
return Math.max(baselineMs, 20) * 20;
|
|
100
|
+
}
|
|
50
101
|
/** The two shapes #4179 is about, as `[label, text, expected spans]`. */
|
|
51
102
|
/**
|
|
52
103
|
* Records whose LINE numbers a cold re-walk must not disturb.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"step-record-boundary.vectors.js","sourceRoot":"","sources":["../src/step-record-boundary.vectors.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAkB/D;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,YAAY,GAAsB;IAC7C,mBAAmB;IACnB,uBAAuB;IACvB,+CAA+C;IAC/C,2BAA2B;IAC3B,+BAA+B;IAC/B,0CAA0C;IAC1C,8BAA8B;IAC9B,yBAAyB;IACzB,2BAA2B;IAC3B,wEAAwE;IACxE,gDAAgD;IAChD,GAAG,CAAC,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC;QACrD,aAAa,EAAE,GAAG;QAClB,aAAa,EAAE,UAAU,EAAE,GAAG;KAC/B,CAAC;CACH,CAAC;AAEF;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,IAAI,EAAE,qDAAqD;IAC3D,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,aAAa,CAAC,EAAE,CAAC,CAAC,EAAE,aAAa,CAAC,EAAE,CAAC,CAAC,EAAE,aAAa,CAAC,CAAU;CAC7E,CAAC;AAEF,yEAAyE;AACzE,MAAM,CAAC,MAAM,kBAAkB,GAAsB;IACnD,0BAA0B;IAC1B,4BAA4B;CAC7B,CAAC;AAEF,yEAAyE;AACzE;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,IAAI,EAAE,mDAAmD;IACzD,KAAK,EAAE,CAAC,CAAC,EAAE,CAAC,CAAU;CACvB,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAA0E;IAClG;QACE,0EAA0E;QAC1E,2EAA2E;QAC3E,4EAA4E;QAC5E,+DAA+D;QAC/D,qDAAqD;QACrD,CAAC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oE;QACpE,CAAC,CAAC,CAAC,EAAE,qBAAqB,CAAC,CAAC;KAC7B;CACF,CAAC"}
|
package/dist/tokenizer.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tokenizer.d.ts","sourceRoot":"","sources":["../src/tokenizer.ts"],"names":[],"mappings":"AAUA,OAAO,EAAsB,KAAK,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAmBxF,qBAAa,aAAa;IACxB,OAAO,CAAC,MAAM,CAAa;IAC3B,OAAO,CAAC,YAAY,CAAa;IACjC,OAAO,CAAC,gBAAgB,CAAa;gBAEzB,MAAM,EAAE,UAAU;IAI9B;yEACqE;IACrE,IAAI,gBAAgB,IAAI,MAAM,CAA8B;IAE5D;;;;;;;;;;+EAU2E;IAC3E,IAAI,oBAAoB,IAAI,MAAM,CAAkC;IAEpE;;;;;;;;OAQG;IACF,YAAY,IAAI,SAAS,CAAC,gBAAgB,CAAC;IAY5C;;;OAGG;IACF,gBAAgB,IAAI,SAAS,CAAC,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"tokenizer.d.ts","sourceRoot":"","sources":["../src/tokenizer.ts"],"names":[],"mappings":"AAUA,OAAO,EAAsB,KAAK,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAmBxF,qBAAa,aAAa;IACxB,OAAO,CAAC,MAAM,CAAa;IAC3B,OAAO,CAAC,YAAY,CAAa;IACjC,OAAO,CAAC,gBAAgB,CAAa;gBAEzB,MAAM,EAAE,UAAU;IAI9B;yEACqE;IACrE,IAAI,gBAAgB,IAAI,MAAM,CAA8B;IAE5D;;;;;;;;;;+EAU2E;IAC3E,IAAI,oBAAoB,IAAI,MAAM,CAAkC;IAEpE;;;;;;;;OAQG;IACF,YAAY,IAAI,SAAS,CAAC,gBAAgB,CAAC;IAY5C;;;OAGG;IACF,gBAAgB,IAAI,SAAS,CAAC,gBAAgB,CAAC;CAgTjD"}
|
package/dist/tokenizer.js
CHANGED
|
@@ -346,7 +346,9 @@ export class StepTokenizer {
|
|
|
346
346
|
// dropping just this record; otherwise run to `len`, ending the scan
|
|
347
347
|
// un-resynced rather than guessing a resume point from misaligned
|
|
348
348
|
// bytes. The pre-existing exits reach the second case, which is the
|
|
349
|
-
// `pos = len` they used to set for themselves.
|
|
349
|
+
// `pos = len` they used to set for themselves. The balance walk stops
|
|
350
|
+
// at the next declaration's '=' (#4573), so a refusal costs this
|
|
351
|
+
// record's bytes, never a re-walk of the remainder per refusal.
|
|
350
352
|
if (!foundTerminator) {
|
|
351
353
|
stopped = true;
|
|
352
354
|
if (recordClose === NOT_COMPUTED) {
|
|
@@ -357,8 +359,9 @@ export class StepTokenizer {
|
|
|
357
359
|
line = startLine + countNewlines(buf, startOffset, pos);
|
|
358
360
|
}
|
|
359
361
|
else if (recordClose === UNBALANCED_RECORD) {
|
|
360
|
-
// No balancing ')'
|
|
361
|
-
// past this record's '#' so the
|
|
362
|
+
// No balancing ')' before the next '=' (or EOF), but the bytes
|
|
363
|
+
// after are readable: re-hunt from past this record's '#' so the
|
|
364
|
+
// NEXT declaration is still found.
|
|
362
365
|
pos = startOffset + 1;
|
|
363
366
|
line = startLine;
|
|
364
367
|
}
|
package/dist/tokenizer.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tokenizer.js","sourceRoot":"","sources":["../src/tokenizer.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAE/D;;;GAGG;AAEH,OAAO,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAyB,MAAM,6BAA6B,CAAC;AACxF,OAAO,EACL,aAAa,EACb,WAAW,EACX,YAAY,EACZ,qBAAqB,EACrB,WAAW,EACX,WAAW,EACX,UAAU,GACX,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,iBAAiB,EACjB,qBAAqB,EACrB,iBAAiB,GAClB,MAAM,2BAA2B,CAAC;AAEnC,uFAAuF;AACvF,MAA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AAC;oBAAC,OAAO,GAAG,IAAI,CAAC;oBAAC,MAAM;gBAAC,CAAC;YAC3C,CAAC;iBAAM,CAAC;gBACN,GAAG,EAAE,CAAC;YACR,CAAC;QACH,CAAC;QAED,sEAAsE;QACtE,oEAAoE;QACpE,uEAAuE;QACvE,qEAAqE;QACrE,wDAAwD;QACxD,IAAI,OAAO,IAAI,QAAQ;YAAE,IAAI,CAAC,gBAAgB,GAAG,CAAC,CAAC;IACrD,CAAC;CACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ifc-lite/parser",
|
|
3
|
-
"version": "6.1
|
|
3
|
+
"version": "6.2.1",
|
|
4
4
|
"description": "IFC/STEP parser for IFC-Lite",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -19,11 +19,11 @@
|
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"fflate": "^0.8.3",
|
|
21
21
|
"jszip": "^3.10.0",
|
|
22
|
-
"@ifc-lite/data": "^4.2.
|
|
22
|
+
"@ifc-lite/data": "^4.2.1",
|
|
23
23
|
"@ifc-lite/encoding": "^2.2.0",
|
|
24
|
-
"@ifc-lite/wasm": "^
|
|
24
|
+
"@ifc-lite/wasm": "^8.0.1",
|
|
25
25
|
"@ifc-lite/wasm-lifecycle": "^0.2.0",
|
|
26
|
-
"@ifc-lite/ifcx": "^4.1.
|
|
26
|
+
"@ifc-lite/ifcx": "^4.1.1"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"typescript": "^6.0.3",
|