tla-ts 0.0.10-dev.b4a856304 → 0.0.10-dev.f16792fed
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/index.cjs +1 -1
- package/dist/index.d.cts +34 -0
- package/dist/index.d.ts +34 -0
- package/dist/index.js +1 -1
- package/dist/parallel-worker.cjs +1 -1
- package/dist/parallel-worker.js +1 -1
- package/dist/prove.cjs +48 -48
- package/dist/prove.js +29 -29
- package/dist/run.cjs +40 -40
- package/dist/run.js +31 -31
- package/dist/transfer.cjs +36 -36
- package/dist/transfer.js +40 -40
- package/package.json +1 -1
- package/src/ast.ts +0 -5
- package/src/bags.ts +2 -5
- package/src/builtins.ts +1 -8
- package/src/check.ts +128 -193
- package/src/cli/options.ts +1 -1
- package/src/cli/run.ts +0 -2
- package/src/cli/runtime-invariants.ts +8 -7
- package/src/cli/shared.ts +0 -4
- package/src/cli/tlc-arguments.ts +24 -30
- package/src/cli/tlc-usage.ts +2 -3
- package/src/coverage.ts +3 -8
- package/src/evaluate.ts +26 -102
- package/src/java-hash.ts +7 -0
- package/src/java-overrides.ts +4 -9
- package/src/json-reader.ts +1 -2
- package/src/json.ts +4 -11
- package/src/levels.ts +7 -15
- package/src/lexer.ts +72 -83
- package/src/liveness-checker.ts +77 -106
- package/src/liveness.ts +10 -34
- package/src/parallel.ts +26 -33
- package/src/parser.ts +163 -226
- package/src/pcal/ast.ts +53 -65
- package/src/pcal/parse.ts +144 -191
- package/src/pcal/tokenize.ts +91 -115
- package/src/pcal/translate.ts +83 -98
- package/src/pcal/validate.ts +48 -50
- package/src/pretty-print.ts +6 -6
- package/src/randomization.ts +1 -4
- package/src/resolve.ts +12 -70
- package/src/runtime.ts +11 -18
- package/src/sany/builtins.ts +1 -3
- package/src/sany/generator.ts +74 -127
- package/src/sany/levels.ts +5 -9
- package/src/sany/lexer.ts +40 -44
- package/src/sany/linter.ts +0 -1
- package/src/sany/nodes.ts +4 -10
- package/src/search.ts +1 -1
- package/src/simulate.ts +50 -59
- package/src/spec-description.ts +23 -34
- package/src/standard-definitions.ts +0 -3
- package/src/standard-modules.ts +1 -12
- package/src/state-graph.ts +3 -15
- package/src/subexpressions.ts +38 -47
- package/src/successors.ts +14 -35
- package/src/symmetry.ts +4 -19
- package/src/tlc/fingerprint.ts +15 -21
- package/src/tlc/jar-data.ts +0 -1
- package/src/tlc/messages.ts +2 -21
- package/src/tlc/order.ts +22 -47
- package/src/tlc/random.ts +18 -30
- package/src/tlc/replay.ts +13 -33
- package/src/tlc/summary.ts +36 -45
- package/src/tlc/tlc-operators.ts +4 -14
- package/src/tlc/tlcext-operators.ts +11 -15
- package/src/tlc/trace-spec.ts +4 -9
- package/src/tlc/value-stream.ts +9 -13
- package/src/tlc/version.ts +0 -1
- package/src/values.ts +74 -186
package/src/pcal/tokenize.ts
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { PcalError, PcalBugError } from "../errors";
|
|
2
2
|
import { createNormalizedPcalExpr, createPcalToken, PCAL_TOKEN, type PcalToken } from "./ast";
|
|
3
3
|
|
|
4
|
-
// Returns "\n" at the end of each line and "\t" at the end of the input. Columns count code
|
|
5
|
-
// points, and the lines come without tabs, as trans.removeTabs replaced them.
|
|
6
4
|
export interface PcalCharReader {
|
|
7
5
|
lines: string[];
|
|
8
6
|
currentLine: string[] | undefined;
|
|
@@ -90,7 +88,6 @@ const BUILT_IN_SYMBOLS = new Set([
|
|
|
90
88
|
),
|
|
91
89
|
]);
|
|
92
90
|
|
|
93
|
-
// tla2tex.Misc.IsLetter, IsDigit and IsSpace, which only accept ASCII.
|
|
94
91
|
const isLetter = (char: string) => /^[A-Za-z_]$/.test(char);
|
|
95
92
|
const isDigit = (char: string) => /^[0-9]$/.test(char);
|
|
96
93
|
const isSpace = (char: string) => char === " " || char === "\f" || char === "\r";
|
|
@@ -98,7 +95,9 @@ const isSpace = (char: string) => char === " " || char === "\f" || char === "\r"
|
|
|
98
95
|
const BUILT_IN_PREFIXES = new Set(
|
|
99
96
|
[...BUILT_IN_SYMBOLS]
|
|
100
97
|
.filter((symbol) => !isLetter(symbol[0]) && !(symbol[0] === "\\" && isLetter(symbol[1] ?? "")))
|
|
101
|
-
.flatMap((symbol) =>
|
|
98
|
+
.flatMap((symbol) =>
|
|
99
|
+
Array.from(symbol, (_char, index) => symbol.slice(0, symbol.length - index)),
|
|
100
|
+
),
|
|
102
101
|
);
|
|
103
102
|
|
|
104
103
|
const STRING_CHARS = new Set(
|
|
@@ -113,7 +112,6 @@ const DELIMITERS = new Set(
|
|
|
113
112
|
|
|
114
113
|
const TOKEN_TYPE = { ...PCAL_TOKEN, dashes: 6, endModule: 7 };
|
|
115
114
|
|
|
116
|
-
// An error in a comment leaves the comment depth set for the next call.
|
|
117
115
|
export interface PcalTokenizerState {
|
|
118
116
|
delimiter: string;
|
|
119
117
|
delimiterLine: number;
|
|
@@ -128,126 +126,108 @@ export const createPcalTokenizerState = (): PcalTokenizerState => ({
|
|
|
128
126
|
commentDepth: 0,
|
|
129
127
|
});
|
|
130
128
|
|
|
131
|
-
interface PcalScan {
|
|
132
|
-
lines: PcalToken[][];
|
|
133
|
-
line: PcalToken[];
|
|
134
|
-
token: string;
|
|
135
|
-
state: string;
|
|
136
|
-
column: number;
|
|
137
|
-
nextColumn: number;
|
|
138
|
-
nextChar: string;
|
|
139
|
-
parenDepth: number;
|
|
140
|
-
isInQuantifier: boolean;
|
|
141
|
-
isExprEnd: boolean;
|
|
142
|
-
previousToken: string;
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
// A define block's commas at the top level don't end its expression.
|
|
146
129
|
const tokenize = (
|
|
147
130
|
state: PcalTokenizerState,
|
|
148
131
|
reader: PcalCharReader,
|
|
149
132
|
isExpr: boolean,
|
|
150
133
|
isInDefineBlock: boolean,
|
|
151
134
|
) => {
|
|
152
|
-
const
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
previousToken: " ",
|
|
164
|
-
};
|
|
135
|
+
const lines: PcalToken[][] = [];
|
|
136
|
+
let line: PcalToken[] = [];
|
|
137
|
+
let token = "";
|
|
138
|
+
let scanState = "start";
|
|
139
|
+
let column = reader.vcolumn;
|
|
140
|
+
let nextColumn = reader.vcolumn;
|
|
141
|
+
let nextChar = getNextPcalChar(reader);
|
|
142
|
+
let parenDepth = 0;
|
|
143
|
+
let isInQuantifier = false;
|
|
144
|
+
let isExprEnd = false;
|
|
145
|
+
let previousToken = " ";
|
|
165
146
|
const skipNextChar = () => {
|
|
166
|
-
|
|
167
|
-
|
|
147
|
+
nextColumn = reader.vcolumn;
|
|
148
|
+
nextChar = getNextPcalChar(reader);
|
|
168
149
|
};
|
|
169
150
|
const addNextChar = () => {
|
|
170
|
-
|
|
151
|
+
token += nextChar;
|
|
171
152
|
skipNextChar();
|
|
172
153
|
};
|
|
173
154
|
const gotoStart = () => {
|
|
174
|
-
|
|
175
|
-
|
|
155
|
+
scanState = "start";
|
|
156
|
+
column = nextColumn;
|
|
176
157
|
};
|
|
177
158
|
const startNewLine = () => {
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
159
|
+
lines.push(line);
|
|
160
|
+
line = [];
|
|
161
|
+
column = 0;
|
|
181
162
|
};
|
|
182
163
|
const throwTokenizingError = (message: string): never => {
|
|
183
164
|
throw new PcalError(
|
|
184
|
-
`${message} \`${
|
|
165
|
+
`${message} \`${token}' found at\n line ${reader.line + 1}, column ${column + 1}`,
|
|
185
166
|
);
|
|
186
167
|
};
|
|
187
168
|
const endExpression = () => {
|
|
188
|
-
|
|
189
|
-
state.delimiter =
|
|
190
|
-
state.delimiterCol =
|
|
191
|
-
state.delimiterLine = reader.line - (
|
|
169
|
+
isExprEnd = true;
|
|
170
|
+
state.delimiter = token;
|
|
171
|
+
state.delimiterCol = column;
|
|
172
|
+
state.delimiterLine = reader.line - (nextChar === "\n" ? 1 : 0);
|
|
192
173
|
};
|
|
193
|
-
const
|
|
174
|
+
const emitToken = (type: number) => {
|
|
194
175
|
if (!isExpr) {
|
|
195
176
|
endExpression();
|
|
196
|
-
|
|
177
|
+
token = "";
|
|
197
178
|
return;
|
|
198
179
|
}
|
|
199
180
|
if (type > TOKEN_TYPE.ident) throwTokenizingError("Illegal token in an expression");
|
|
200
|
-
const token = scan.token;
|
|
201
181
|
const isDelimiter =
|
|
202
182
|
type !== TOKEN_TYPE.string &&
|
|
203
183
|
((DELIMITERS.has(token) &&
|
|
204
|
-
!(type === TOKEN_TYPE.ident && [".", "[", ","].includes(
|
|
205
|
-
(((token === "," && !
|
|
184
|
+
!(type === TOKEN_TYPE.ident && [".", "[", ","].includes(previousToken))) ||
|
|
185
|
+
(((token === "," && !isInQuantifier && !isInDefineBlock) ||
|
|
206
186
|
token === ")" ||
|
|
207
187
|
token === "}") &&
|
|
208
|
-
|
|
188
|
+
parenDepth === 0));
|
|
209
189
|
if (isDelimiter) {
|
|
210
|
-
if (
|
|
190
|
+
if (parenDepth !== 0) {
|
|
211
191
|
throwTokenizingError("Expression with an unmatched (, [, {, or << followed by");
|
|
212
192
|
}
|
|
213
|
-
if (
|
|
193
|
+
if (isInQuantifier) {
|
|
214
194
|
throwTokenizingError("Expression with \\A or \\E but no following `:` followed by");
|
|
215
195
|
}
|
|
216
196
|
endExpression();
|
|
217
|
-
if (
|
|
197
|
+
if (line.length > 0) startNewLine();
|
|
218
198
|
return;
|
|
219
199
|
}
|
|
220
|
-
if (type === TOKEN_TYPE.builtin && LEFT_PARENS.has(token))
|
|
200
|
+
if (type === TOKEN_TYPE.builtin && LEFT_PARENS.has(token)) parenDepth += 1;
|
|
221
201
|
if (type === TOKEN_TYPE.builtin && RIGHT_PARENS.has(token)) {
|
|
222
|
-
|
|
223
|
-
if (
|
|
202
|
+
parenDepth -= 1;
|
|
203
|
+
if (parenDepth < 0) throwTokenizingError("Extra (unmatching)");
|
|
224
204
|
}
|
|
225
|
-
|
|
226
|
-
if (["\\A", "∀", "\\E", "∃"].includes(token) &&
|
|
227
|
-
|
|
205
|
+
previousToken = type === TOKEN_TYPE.string ? " " : token;
|
|
206
|
+
if (["\\A", "∀", "\\E", "∃"].includes(token) && parenDepth === 0) {
|
|
207
|
+
isInQuantifier = true;
|
|
228
208
|
}
|
|
229
|
-
if (
|
|
230
|
-
|
|
209
|
+
if (isInQuantifier && token === ":" && parenDepth === 0) {
|
|
210
|
+
isInQuantifier = false;
|
|
231
211
|
}
|
|
232
212
|
if (token !== "" || type === TOKEN_TYPE.string) {
|
|
233
|
-
|
|
213
|
+
line.push(createPcalToken(token, column, type));
|
|
234
214
|
}
|
|
235
|
-
|
|
215
|
+
token = "";
|
|
236
216
|
};
|
|
237
217
|
const outputToken = (type: number) => {
|
|
238
|
-
|
|
218
|
+
emitToken(type);
|
|
239
219
|
gotoStart();
|
|
240
220
|
};
|
|
241
221
|
const addAndGoto = (nextState: string) => {
|
|
242
222
|
addNextChar();
|
|
243
|
-
|
|
223
|
+
scanState = nextState;
|
|
244
224
|
};
|
|
245
225
|
const skipAndGoto = (nextState: string) => {
|
|
246
226
|
skipNextChar();
|
|
247
|
-
|
|
227
|
+
scanState = nextState;
|
|
248
228
|
};
|
|
249
229
|
const step = (next: string) => {
|
|
250
|
-
switch (
|
|
230
|
+
switch (scanState) {
|
|
251
231
|
case "start":
|
|
252
232
|
if (isSpace(next)) {
|
|
253
233
|
skipNextChar();
|
|
@@ -271,17 +251,15 @@ const tokenize = (
|
|
|
271
251
|
}
|
|
272
252
|
if (BUILT_IN_PREFIXES.has(next)) return addAndGoto("builtIn");
|
|
273
253
|
if (next === "\t") {
|
|
274
|
-
|
|
254
|
+
scanState = "done";
|
|
275
255
|
return;
|
|
276
256
|
}
|
|
277
257
|
addNextChar();
|
|
278
258
|
return throwTokenizingError("Illegal lexeme");
|
|
279
259
|
case "id":
|
|
280
|
-
if (
|
|
260
|
+
if (token === "WF_" || token === "SF_") return outputToken(TOKEN_TYPE.builtin);
|
|
281
261
|
if (isLetter(next) || isDigit(next)) return addNextChar();
|
|
282
|
-
return outputToken(
|
|
283
|
-
BUILT_IN_SYMBOLS.has(scan.token) ? TOKEN_TYPE.builtin : TOKEN_TYPE.ident,
|
|
284
|
-
);
|
|
262
|
+
return outputToken(BUILT_IN_SYMBOLS.has(token) ? TOKEN_TYPE.builtin : TOKEN_TYPE.ident);
|
|
285
263
|
case "numOrId":
|
|
286
264
|
if (isDigit(next)) return addNextChar();
|
|
287
265
|
if (isLetter(next)) return addAndGoto("id");
|
|
@@ -289,48 +267,47 @@ const tokenize = (
|
|
|
289
267
|
case "bs":
|
|
290
268
|
if (["b", "B", "o", "O", "h", "H"].includes(next)) return addAndGoto("numOrBi");
|
|
291
269
|
if (isLetter(next)) {
|
|
292
|
-
|
|
270
|
+
scanState = "bsBuiltIn";
|
|
293
271
|
return;
|
|
294
272
|
}
|
|
295
273
|
if (next === "*") {
|
|
296
274
|
skipNextChar();
|
|
297
|
-
|
|
298
|
-
|
|
275
|
+
token = "";
|
|
276
|
+
scanState = "lineComment";
|
|
299
277
|
return;
|
|
300
278
|
}
|
|
301
|
-
|
|
279
|
+
scanState = "builtIn";
|
|
302
280
|
return;
|
|
303
281
|
case "numOrBi":
|
|
304
|
-
|
|
282
|
+
scanState = isDigit(next) ? "num" : "bsBuiltIn";
|
|
305
283
|
return;
|
|
306
284
|
case "num":
|
|
307
285
|
if (isDigit(next)) return addNextChar();
|
|
308
286
|
if (!isLetter(next)) return outputToken(TOKEN_TYPE.number);
|
|
309
287
|
addNextChar();
|
|
310
|
-
if (
|
|
311
|
-
|
|
288
|
+
if (token.startsWith("\\")) throwTokenizingError("Illegal lexeme");
|
|
289
|
+
scanState = "id";
|
|
312
290
|
return;
|
|
313
291
|
case "bsBuiltIn":
|
|
314
292
|
if (isLetter(next) && next !== "_") return addNextChar();
|
|
315
|
-
if (BUILT_IN_SYMBOLS.has(
|
|
293
|
+
if (BUILT_IN_SYMBOLS.has(token)) return outputToken(TOKEN_TYPE.builtin);
|
|
316
294
|
return throwTokenizingError("Illegal lexeme ");
|
|
317
295
|
case "builtIn":
|
|
318
|
-
if (BUILT_IN_PREFIXES.has(
|
|
319
|
-
|
|
320
|
-
if (!BUILT_IN_SYMBOLS.has(scan.token)) {
|
|
296
|
+
if (BUILT_IN_PREFIXES.has(token + next)) return addNextChar();
|
|
297
|
+
if (!BUILT_IN_SYMBOLS.has(token)) {
|
|
321
298
|
backspacePcalReader(reader);
|
|
322
|
-
while (!BUILT_IN_SYMBOLS.has(
|
|
299
|
+
while (!BUILT_IN_SYMBOLS.has(token)) {
|
|
323
300
|
backspacePcalReader(reader);
|
|
324
|
-
if (
|
|
325
|
-
|
|
301
|
+
if (token.length === 0) throwTokenizingError("Illegal lexeme");
|
|
302
|
+
token = Array.from(token).slice(0, -1).join("");
|
|
326
303
|
}
|
|
327
304
|
skipNextChar();
|
|
328
305
|
}
|
|
329
306
|
return outputToken(TOKEN_TYPE.builtin);
|
|
330
307
|
case "dash1":
|
|
331
308
|
case "dash2":
|
|
332
|
-
if (next === "-") return addAndGoto(
|
|
333
|
-
|
|
309
|
+
if (next === "-") return addAndGoto(scanState === "dash1" ? "dash2" : "dash3");
|
|
310
|
+
scanState = "builtIn";
|
|
334
311
|
return;
|
|
335
312
|
case "dash3":
|
|
336
313
|
if (next !== "-") throwTokenizingError("Illegal lexeme");
|
|
@@ -339,8 +316,8 @@ const tokenize = (
|
|
|
339
316
|
return next === "-" ? addNextChar() : outputToken(TOKEN_TYPE.dashes);
|
|
340
317
|
case "eq1":
|
|
341
318
|
case "eq2":
|
|
342
|
-
if (next === "=") return addAndGoto(
|
|
343
|
-
|
|
319
|
+
if (next === "=") return addAndGoto(scanState === "eq1" ? "eq2" : "eq3");
|
|
320
|
+
scanState = "builtIn";
|
|
344
321
|
return;
|
|
345
322
|
case "eq3":
|
|
346
323
|
if (next !== "=") throwTokenizingError("Illegal lexeme");
|
|
@@ -352,8 +329,8 @@ const tokenize = (
|
|
|
352
329
|
state.commentDepth = 1;
|
|
353
330
|
return skipAndGoto("comment");
|
|
354
331
|
}
|
|
355
|
-
|
|
356
|
-
|
|
332
|
+
token = "(";
|
|
333
|
+
scanState = "builtIn";
|
|
357
334
|
return;
|
|
358
335
|
case "string":
|
|
359
336
|
if (next === "\\") return addAndGoto("escString");
|
|
@@ -369,13 +346,13 @@ const tokenize = (
|
|
|
369
346
|
if (!['"', "\\", "t", "n", "f", "r"].includes(next)) {
|
|
370
347
|
throwTokenizingError("Illegal character following \\ in string");
|
|
371
348
|
}
|
|
372
|
-
|
|
349
|
+
scanState = "string";
|
|
373
350
|
return;
|
|
374
351
|
case "lineComment":
|
|
375
352
|
if (next === "(") return skipAndGoto("lineComParen");
|
|
376
353
|
if (next === "*" && state.commentDepth > 0) return skipAndGoto("lineComStar");
|
|
377
354
|
if (next === "\n" || next === "\t") {
|
|
378
|
-
|
|
355
|
+
token = "";
|
|
379
356
|
state.commentDepth = 0;
|
|
380
357
|
return gotoStart();
|
|
381
358
|
}
|
|
@@ -385,8 +362,8 @@ const tokenize = (
|
|
|
385
362
|
state.commentDepth += 1;
|
|
386
363
|
return skipAndGoto("lineComment");
|
|
387
364
|
}
|
|
388
|
-
if (state.commentDepth === 0)
|
|
389
|
-
|
|
365
|
+
if (state.commentDepth === 0) token += "(";
|
|
366
|
+
scanState = "lineComment";
|
|
390
367
|
return;
|
|
391
368
|
case "lineComStar":
|
|
392
369
|
if (next === ")") {
|
|
@@ -396,20 +373,19 @@ const tokenize = (
|
|
|
396
373
|
}
|
|
397
374
|
return skipAndGoto("lineComment");
|
|
398
375
|
}
|
|
399
|
-
if (state.commentDepth === 0)
|
|
400
|
-
|
|
376
|
+
if (state.commentDepth === 0) token += "*";
|
|
377
|
+
scanState = "lineComment";
|
|
401
378
|
return;
|
|
402
|
-
// A comment that continues past its first line is an "or comment".
|
|
403
379
|
case "comment":
|
|
404
380
|
case "orComment": {
|
|
405
|
-
const isFirstLine =
|
|
381
|
+
const isFirstLine = scanState === "comment";
|
|
406
382
|
if (next === "*") return skipAndGoto(isFirstLine ? "commentStar" : "orCommentStar");
|
|
407
383
|
if (next === "(") return skipAndGoto(isFirstLine ? "commentParen" : "orCommentParen");
|
|
408
384
|
if (next === "\n") {
|
|
409
|
-
|
|
385
|
+
token = "";
|
|
410
386
|
skipNextChar();
|
|
411
387
|
startNewLine();
|
|
412
|
-
|
|
388
|
+
scanState = "orComment";
|
|
413
389
|
return;
|
|
414
390
|
}
|
|
415
391
|
if (next === "\t") {
|
|
@@ -423,10 +399,10 @@ const tokenize = (
|
|
|
423
399
|
}
|
|
424
400
|
case "commentStar":
|
|
425
401
|
case "orCommentStar": {
|
|
426
|
-
const commentState =
|
|
402
|
+
const commentState = scanState === "commentStar" ? "comment" : "orComment";
|
|
427
403
|
if (next !== ")") {
|
|
428
|
-
if (state.commentDepth === 1)
|
|
429
|
-
|
|
404
|
+
if (state.commentDepth === 1) token += "*";
|
|
405
|
+
scanState = commentState;
|
|
430
406
|
return;
|
|
431
407
|
}
|
|
432
408
|
skipNextChar();
|
|
@@ -435,28 +411,28 @@ const tokenize = (
|
|
|
435
411
|
throw new PcalBugError("Assertion failure");
|
|
436
412
|
}
|
|
437
413
|
if (state.commentDepth !== 0) {
|
|
438
|
-
|
|
414
|
+
scanState = commentState;
|
|
439
415
|
return;
|
|
440
416
|
}
|
|
441
|
-
|
|
417
|
+
token = "";
|
|
442
418
|
return gotoStart();
|
|
443
419
|
}
|
|
444
420
|
case "commentParen":
|
|
445
421
|
case "orCommentParen": {
|
|
446
|
-
const commentState =
|
|
422
|
+
const commentState = scanState === "commentParen" ? "comment" : "orComment";
|
|
447
423
|
if (next === "*") {
|
|
448
424
|
state.commentDepth += 1;
|
|
449
425
|
return skipAndGoto(commentState);
|
|
450
426
|
}
|
|
451
|
-
if (state.commentDepth === 1)
|
|
452
|
-
|
|
427
|
+
if (state.commentDepth === 1) token += "(";
|
|
428
|
+
scanState = commentState;
|
|
453
429
|
return;
|
|
454
430
|
}
|
|
455
431
|
}
|
|
456
432
|
};
|
|
457
|
-
while (
|
|
458
|
-
if (
|
|
459
|
-
return createNormalizedPcalExpr(
|
|
433
|
+
while (scanState !== "done" && !isExprEnd) step(nextChar);
|
|
434
|
+
if (nextChar !== "\n") backspacePcalReader(reader);
|
|
435
|
+
return createNormalizedPcalExpr(lines);
|
|
460
436
|
};
|
|
461
437
|
|
|
462
438
|
export const tokenizePcalExpr = (
|