Comparing version 3.0.7 to 3.0.8
@@ -7,3 +7,3 @@ import { ATNState } from "./ATNState.js"; | ||
isCtxDependent: boolean; | ||
constructor(target: ATNState, ruleIndex: number, actionIndex: number, isCtxDependent: boolean); | ||
constructor(target: ATNState, ruleIndex: number, actionIndex?: number, isCtxDependent?: boolean); | ||
get isEpsilon(): boolean; | ||
@@ -10,0 +10,0 @@ get transitionType(): number; |
@@ -46,3 +46,3 @@ import { IntervalSet } from "../misc/IntervalSet.js"; | ||
lexerActions: LexerAction[]; | ||
readonly modeToStartState: Array<RuleStartState | null>; | ||
readonly modeToStartState: Array<TokensStartState | null>; | ||
constructor(grammarType: number, maxTokenType: number); | ||
@@ -49,0 +49,0 @@ /** |
@@ -25,2 +25,3 @@ export * from "./atn/index.js"; | ||
export * from "./LexerNoViableAltException.js"; | ||
export * from "./ListTokenSource.js"; | ||
export * from "./NoViableAltException.js"; | ||
@@ -33,2 +34,3 @@ export * from "./Parser.js"; | ||
export * from "./Recognizer.js"; | ||
export * from "./RuntimeMetaData.js"; | ||
export * from "./Token.js"; | ||
@@ -40,3 +42,4 @@ export * from "./TokenFactory.js"; | ||
export * from "./TraceListener.js"; | ||
export * from "./UnbufferedTokenStream.js"; | ||
export * from "./Vocabulary.js"; | ||
export * from "./WritableToken.js"; |
@@ -5,3 +5,3 @@ import type { IComparable } from "../utils/helpers.js"; | ||
private backingStore; | ||
constructor(keyComparer: EqualityComparator<K>); | ||
constructor(keyComparer?: EqualityComparator<K>); | ||
constructor(map: HashMap<K, V>); | ||
@@ -8,0 +8,0 @@ clear(): void; |
@@ -19,2 +19,4 @@ import { Interval } from "./Interval.js"; | ||
static of(a: number, b: number): IntervalSet; | ||
/** Combine all sets in the array and return the union of them */ | ||
static or(sets: IntervalSet[]): IntervalSet; | ||
[Symbol.iterator](): IterableIterator<Interval>; | ||
@@ -76,4 +78,5 @@ get(index: number): Interval; | ||
toArray(): number[]; | ||
/** @returns the number of elements in this set. */ | ||
get length(): number; | ||
private elementName; | ||
} |
@@ -121,5 +121,5 @@ import { Interval } from "./misc/Interval.js"; | ||
*/ | ||
toStringTree(recog: Parser | null): string; | ||
toStringTree(recog?: Parser): string; | ||
toStringTree(ruleNames: string[] | null, recog: Parser): string; | ||
toString(ruleNames?: string[] | null, stop?: ParserRuleContext | null): string; | ||
} |
@@ -11,4 +11,4 @@ import { ParserRuleContext } from "../ParserRuleContext.js"; | ||
*/ | ||
static toStringTree(tree: ParseTree, ruleNames: string[] | null, recog?: Parser | null): string; | ||
static getNodeText(t: ParseTree, ruleNames: string[] | null, recog?: Parser | null): string | undefined; | ||
static toStringTree(tree: ParseTree, ruleNames: string[] | null, recog?: Parser): string; | ||
static getNodeText(t: ParseTree, ruleNames: string[] | null, recog?: Parser): string | undefined; | ||
/** | ||
@@ -15,0 +15,0 @@ * Return ordered list of all children of this node |
{ | ||
"name": "antlr4ng", | ||
"version": "3.0.7", | ||
"version": "3.0.8", | ||
"type": "module", | ||
@@ -28,7 +28,7 @@ "description": "Alternative JavaScript/TypeScript runtime for ANTLR4", | ||
"@mike-lischke/antlr-tgen": "1.0.8", | ||
"@types/jest": "29.5.12", | ||
"@types/node": "20.14.9", | ||
"@types/unicode-properties": "1.3.2", | ||
"@typescript-eslint/eslint-plugin": "8.0.0", | ||
"@typescript-eslint/eslint-plugin": "7.18.0", | ||
"@typescript-eslint/parser": "7.18.0", | ||
"@vitest/coverage-v8": "2.1.3", | ||
"esbuild": "0.23.0", | ||
@@ -39,7 +39,6 @@ "eslint": "8.57.0", | ||
"eslint-plugin-prefer-arrow": "1.2.3", | ||
"jest": "29.7.0", | ||
"ts-jest": "29.1.4", | ||
"ts-node": "10.9.2", | ||
"typescript": "5.5.4", | ||
"unicode-properties": "1.4.1" | ||
"unicode-properties": "1.4.1", | ||
"vitest": "2.1.3" | ||
}, | ||
@@ -51,3 +50,3 @@ "scripts": { | ||
"build-and-test": "npm run build && npm run test", | ||
"test": "node --no-warnings --experimental-vm-modules node_modules/jest/bin/jest.js --no-coverage", | ||
"test": "vitest run --no-watch --no-coverage", | ||
"full-test": "npm run test && npm run run-benchmarks && npm run time-lexer-speed", | ||
@@ -54,0 +53,0 @@ "run-benchmarks": "node --no-warnings --experimental-vm-modules --loader ts-node/esm tests/benchmarks/run-benchmarks.ts", |
@@ -160,11 +160,11 @@ [![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/mike-lischke/antlr4ng/nodejs.yml?style=for-the-badge&logo=github)](https://github.com/mike-lischke/antlr4ng/actions/workflows/nodejs.yml) | ||
|---:|---:|---:|---:|---:|---:| | ||
|Query Collection (cold)| 941 ms| <ins>169/1999 (2167) ms</ins>| 7789 ms| 3353 ms| 3217 ms| | ||
| Bitrix Queries (cold)| 143 ms| <ins>66/220 (285) ms</ins>| 1105 ms| 450 ms| 899 ms| | ||
| Large Inserts (cold)|3590 ms|<ins>6058/954 (7012) ms</ins>|10607 ms|11539 ms|30466 ms| | ||
|Total (cold) |4696 ms|<ins>6292/3173 (9465) ms</ins>|19532 ms|15371 ms|34612 ms| | ||
|Query Collection (cold)| 941 ms| <ins>173/1991 (2163) ms</ins>| 7789 ms| 3353 ms| 3217 ms| | ||
| Bitrix Queries (cold)| 143 ms| <ins>66/224 (290) ms</ins>| 1105 ms| 450 ms| 899 ms| | ||
| Large Inserts (cold)|3590 ms|<ins>6095/913 (7008) ms</ins>|10607 ms|11539 ms|30466 ms| | ||
|Total (cold) |4696 ms|<ins>6333/3128 (9461) ms</ins>|19532 ms|15371 ms|34612 ms| | ||
||||||| | ||
|Query Collection (warm)| 95 ms| <ins>126/49 (175) ms</ins>| 215 ms| 266 ms| 1041 ms| | ||
| Bitrix Queries (warm)| 52 ms| <ins>60/34 (95) ms</ins>| 107 ms| 137 ms| 715 ms| | ||
| Large Inserts (warm)|3564 ms|<ins>6089/909 (6999) ms</ins>|10539 ms|11461 ms|32425 ms| | ||
|Total (warm) |3733 ms|<ins>6275/994 (7270) ms</ins>|10889 ms|11889 ms|34216 ms| | ||
|Query Collection (warm)| 95 ms| <ins>125/51 (176) ms</ins>| 215 ms| 266 ms| 1041 ms| | ||
| Bitrix Queries (warm)| 52 ms| <ins>61/34 (95) ms</ins>| 107 ms| 137 ms| 715 ms| | ||
| Large Inserts (warm)|3564 ms|<ins>6121/914 (7035) ms</ins>|10539 ms|11461 ms|32425 ms| | ||
|Total (warm) |3733 ms|<ins>6307/1001 (7308) ms</ins>|10889 ms|11889 ms|34216 ms| | ||
@@ -171,0 +171,0 @@ Underlined entries are the smallest (not counting C++, which beats them all). For antlr4ng, the times are split into lexing and parsing. Note the high lexer execution times, caused by the large number of predicates (126) + lexer actions (40) in the MySQL lexer. |
@@ -5,7 +5,13 @@ <img src="https://raw.githubusercontent.com/mike-lischke/mike-lischke/master/images/ANTLRng2.svg" title="ANTLR Next Generation" alt="ANTLRng" width="96" height="96"/><label style="font-size: 70%">Part of the Next Generation ANTLR Project</label> | ||
## 3.0.7 | ||
## 3.0.8 | ||
## 3.0.6 | ||
- Switched from Jest to vitest for unit tests. This increases test speed by around 30% (from ~9s to ~6s). | ||
- Fixed a few issues too. | ||
- HashMap can now be created without a parameter for the comparator (it uses the DefaultEqualityComparator then). | ||
- Exported more types that were forgotten (like RuntimeMetaData). | ||
## 3.0.6 - 3.0.7 | ||
- Small HashSet/HashMap improvements. | ||
- Export all utils stuff. | ||
@@ -12,0 +18,0 @@ ## 3.0.5 |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
1324931
15
171
42213