Chevrotain
Home
Features
Tutorial
Guide
FAQ
Changes
APIs
Playground
Benchmark
Discussions
GitHub
Home
Features
Tutorial
Guide
FAQ
Changes
APIs
Playground
Benchmark
Discussions
GitHub
  • Changes

    • Breaking Changes
    • /changes/CHANGELOG.html

11.1.1 (1-24-2026)

Dependencies Bumps

  • update dependency lodash-es to v4.17.23
  • To address CVE: CVE-2025-13465
  • There were no usages of _.omit or _.unset in the published codebase, (only in test files) So this update should have no functional impact, instead it is meant to address security scanners alerts.

11.1.0 (1-4-2026)

Minor Changes

  • Support RegExp Lookbehind assertions
    • Thanks to @luiz290788 👍

Bug Fixes

  • Support "Loading ECMAScript modules using require()" of latest nodejs versions
    • Chevrotain is still officially ESM only, but this minimal metadata fix may allow some CJS in modern nodejs versions to load chevrotain using CJS require().

11.0.3 (8-15-2023)

Bug Fixes

  • fix: columns position incorrect after lexer recovery

11.0.2 (8-3-2023)

Bug Fixes

  • fix: missing source maps and *.ts sources

11.0.1 (7-18-2023)

Bug Fixes

  • fix: add types to package.json exports
    • Thanks to @msujew 👍

11.0.0 (7-11-2023)

Breaking Changes

  • BREAKING_CHANGES For V11

Minor Changes

  • Reduced bundled size of chevrotain.min.mjs 212Kb --> 137kb
  • build: move regexp-to-ast package into this mono-repo
    • Thanks to @luiz290788 👍

Bug Fixes

  • fix: direct eval() causing warning with esbuild/rollup

10.5.0 (3-11-2023)

Minor Changes

  • feat: add context argument to recoveryValueFunc
    • Thanks to @msujew 👍

10.4.2 (11-21-2022)

Bug Fixes

  • chore: add types at package.json exports
    • Thanks to @msujew 👍

10.4.1 (11-4-2022)

Bug Fixes

  • fix: missing call to lookahead initialization for experimental lookahead plugins
    • Thanks to @msujew 👍

Documentation

  • docs: fix broken links to protected props

10.4.0 (10-23-2022)

Minor Changes

  • feat: support pluggable lookahead strategy
    • experimental API subject to potential changes...
    • Thanks to @msujew 👍

Documentation

  • docs: IRecognitionException should extend 'Error'
    • Thanks to @benhohner 👍

10.3.0 (8-21-2022)

Minor Changes

  • Removed validating of redundant methods from validateVisitor()

Bug Fixes

  • runtime exception: Class constructor GAstVisitor cannot be invoked without 'new'

10.2.0 (8-19-2022)

Minor Changes

  • Capability to fail fast on first lexer error via ILexerConfig recoveryEnabled config
    • Thanks to @jonestristand 👍

Bug Fixes

  • Lexer throws uncaught error when longer_alt token is not in mode

    • Thanks to @msujew 👍
  • "unreachable code after return statement" warning in Firefox

    • Thanks to @medihack 👍

Documentation

  • TypeScript Signatures: add generics to getBaseCstVisitorConstructor functions

    • Thanks to @jackhenry 👍
  • docs: document SKIP_TOKEN()

  • Various broken links fixes in chevrotain.io/docs website.

10.1.2 (3-6-2022)

Bug Fixes

  • missing *.ts source referenced by source maps in sub-packages

Documentation

  • docs(api.d.ts): add generics for getBaseCstVisitorConstructor functions
    • Thanks to @jackhenry 👍

10.1.1 (2-15-2022)

Patch release as a workaround for release process issues...

10.1.0 (2-15-2022)

Minor Changes

  • customizing automatic token deletion recovery by exposing canRecoverWithSingleTokenDeletion API
    • Thanks to @medihack 👍

Bug Fixes

  • Wrong CST d.ts type generation with same label for different alternatives

    • Thanks to @medihack 👍
  • Recovery Re-Sync logic ignores Token Categories

    • Thanks to @medihack 👍

Documentation

  • various fixes to broken links in docs
    • Thanks to @kevinkhill 👍
  • Update the "where used" list
  • additional description on token location attributes
    • Thanks to @NaridaL 👍

10.0.0 (1-17-2022)

Breaking Changes

  • BREAKING_CHANGES For V10

Minor Changes

  • Generating TypeScript Signatures(d.ts) for CST constructs.
    • See relevant documentation
    • Thanks to @mbett7 👍
  • refactor(utils): replace internal utils with lodash
    • This adds a new 3rd party dependency (lodash).
    • This was done to reduce the amount of code being maintained, but at the cost of increased bundle size, for example: chevrotain.min.js is now 189kb instead of 156kb.

Bug Fixes

  • CST naming conflicts with built-in Object prototype props

9.1.0 (10-9-2021)

Minor Changes

  • Support multiple longer_alt tokens
    • Thanks to @msujew 👍

9.0.2 (6-13-2021)

Bug Fixes

  • esm bundle: the export name "__esModule" is reserved and cannot be used

9.0.1 (3-29-2021)

Bug Fixes

  • fix: missing d.ts definitions in npm package

9.0.0 (3-21-2021)

Breaking Changes

  • BREAKING_CHANGES For V9.0

Bug Fixes

  • fix: missing "./lib_esm/api_esm.mjs" file in npm package

8.0.1 (2-28-2021)

Bug Fixes

  • fix: resolve multiple issues with bundled artifacts

8.0.0 (2-28-202)

Breaking Changes

  • BREAKING_CHANGES For V8.0

Minor Changes

  • feat: improve ESM compatibility

Documentation

  • docs: update "under the hood" section in tutorial
  • docs: add clarification for longer_alt chaining

7.1.2 (2-23-2021)

Patch release after migration to new github org with updated metadata in package.json

7.1.1 (2-5-2021)

Minor Changes

  • fix: add missing members to parser exception type declarations

    • Thanks to @mbett7 :thumbsup
  • fix: update type declaration for CstChildrenDictionary

    • Thanks to @raineszm :thumbsup

7.1.0 (1-2-2021)

Minor Changes

  • feat: remove constraints on rules and token names
    • Thanks to @jlguenego :thumbsup
  • Add generics to getBaseCSTVisitorConstructor
    • Thanks to @ryanleecode :thumbsup

7.0.3 (10-30-2020)

Bug Fixes

  • Runtime errors after Webpack minification.

7.0.2 (9-4-2020)

Bug Fixes

  • Empty Alternative inside Nested Repetitions causes infinite loops on Parser initialization.

7.0.1 (4-22-2020)

Bug Fixes

  • Broken diagram generation in 7.0.0.

7.0.0 (4-18-2020)

Breaking Changes

  • BREAKING_CHANGES For V7.0

Minor Changes

  • Improved Type Signature for 'OR' method

    • Thanks to @OmarTawfik :thumbsup
  • Include source maps and original *.ts sources in npm package

Bug Fixes

  • Literal single token character "ignore case" flag bug.

    • Thanks to @janisdd :thumbsup
  • IParserErrorMessageProvider properties must be implemented as own properties.

Documentation

  • Clarify Lexer Limitation: "Complement Sets cannot be automatically optimized" Docs.
  • document recoveredNode property on CST Nodes.

6.5.0 (9-20-2019)

  • Optimize Certain Complex Lexers Initialization Performance
  • Lexer Initialization Performance Tracing
  • Lexer Initialization: Optionally Skip Validations

6.4.0 (9-15-2019)

Minor Changes

  • Larger Max numerical suffix/idx for the DSL Methods
  • Improve duplicate DSL methods suffix error message

Bug Fixes

  • Unexpected Side Effects When backtracking in a CstParser

6.3.1 (9-10-2019)

Bug Fixes

  • Runtime Error thrown when trying to build an Early Exit Parsing Error with maxLookahead 1

6.3.0 (9-8-2019)

Minor Changes

  • Improved Lookahead functions and maxLookahead handling
  • Parser Initialization Performance Tracing
  • Ability to Optionally Skip Grammar Validations in Production

Documentation

  • Cold Start Performance Guide
  • Deprecate: "Terminal Token Name Not Found" Error
  • Update Performance Guide
  • Incorrect Perf Docs
  • Several TypeScript API fixes for IToken and TokenType
    • 1
    • 2
    • Thanks to @HoldYourWaffle :thumbsup

Dev-Ops

  • Integrate Algolia Search in the docs website

6.2.0 (8-30-2019)

Minor Changes

  • Improved handling of alternation ambiguities

Documentation

  • Documentation for ambiguous alternatives

  • Several TypeScript API fixes for CustomPatternMatcherFunc

    • 1
    • 2
    • Thanks to @HoldYourWaffle :thumbsup

6.1.0 (8-25-2019)

Minor Changes

  • Improve Complex Lexers initialization time.

Performance

  • A resolved performance related bug and a couple of new micro optimizations have produced minor performance improvements in the JSON(5%) and CSS(15%) benchmarks.

Documentation

  • Document the Parser.LA method.

Dev-Ops

  • Create Cold Start Performance benchmark.

6.0.0 (8-20-2019)

Breaking Changes

  • BREAKING_CHANGES For V6.0

Major Changes

  • Remove usage of Function.prototype.toString().
    • Means no more bundling/minification/transpiling issues! with WebPack/Babel/UglifyJS/other...
    • Provides a ~20% performance boost to most parsers initialization time.
    • These improved analysis capabilities will also enable multiple new features in future versions.
    • Thanks to @EqualMa for inspiration & proof of concept :thumbsup

Minor Changes

  • Parsing Exceptions should be declared as classes.

5.0.0 (8-1-2019)

Breaking Changes

  • BREAKING_CHANGES For V5.0

Minor Changes

  • Detect missing "performSelfAnalysis" during a parser's input setter.
  • Provide an ES6 build.
    • Thanks to @EqualMa :thumbsup
  • Restructure api.ts to be ESM compatible.
    • Thanks to @EqualMa :thumbsup

4.8.1 (6-21-2019)

Bug Fixes

  • Resolved edge case in repetition error recovery which may cause "Maximum call stack size exceeded".

4.8.0 (6-14-2019)

Minor Changes

  • Custom Token Patterns and "Custom Payloads".

4.7.0 (6-8-2019)

Minor Changes

  • CST location information.

4.6.0 (6-1-2019)

Minor Changes

  • Expose two base Parser classes: CstParser and EmbeddedActionsParser.

4.5.0 (5-25-2019)

Minor Changes

  • Consider Token Categories in Lookahead Functions Calculation.

4.4.0 (5-24-2019)

Minor Changes

  • Better handling of infinite loops in repetitions.

4.3.3 (4-12-2019)

Bug Fixes

  • Performance regressions in Chrome Beta (74)

4.3.2 (4-2-2019)

Bug Fixes

  • Failure Lexing RegExp patterns starting with empty or "fully optional" groups.
    • Thanks to @jmrog :thumbsup

4.3.1 (3-18-2019)

Bug Fixes

  • Missing README.md in the npm package.

4.3.0 (3-16-2019)

Minor Changes

  • Updated regexp-to-ast to version 0.4.0.
    • This should provide a performance boost to the initialization time of large lexers.
    • Thanks to @morwen :thumbsup

Bug Fixes

  • Fix broken link to docs in lexer disallowed anchors error message.
    • Thanks @triplepointfive :thumbsup

4.2.0 (1-26-2019)

Minor Changes

  • Support Custom Lexer Error Messages Thanks @morwen!

Bug Fixes

  • Error when building a noAltException with maxLookahead === 1.

4.1.1 (12-14-2018)

Bug Fixes

  • Alternations ambiguity may not be detected when short repetitions.

4.1.0 (9-28-2018)

Minor Changes

  • Runtime check for removed Token vector argument in Parser constructor.

4.0.0 (9-26-2018)

Breaking Changes

  • BREAKING_CHANGES For V4.0

Major Changes

  • Concrete Syntax Tree creation is now enabled by default.

Minor Changes

  • The Parser's constructor no longer accepts a Token vector as the first argument.
  • Runtime infinite loop detection in iterations.
  • Small (~5-10%) performance improvements and optimizations.
    • Use ES6 Maps(if available) for faster lookahead functions caching.
    • Remove automatic collection of return values for iterations.

Bug Fixes

  • Stack overflow during grammar analysis..

3.7.4 (7-30-2018)

Bug Fixes

  • OVERRIDE_RULE bugs.

3.7.3 (7-21-2018)

Bug Fixes

  • CST - Labels of nonTerminals are lost during error recovery.

3.7.2 (7-19-2018)

Bug Fixes

  • Performance Regressions under Chrome Canary 69.

Examples

  • GraphQL Grammar Example

3.7.1 (7-12-2018)

Bug Fixes

  • Potential Very Slow Lexer Initialization.

3.7.0 (6-27-2018)

Minor Changes

  • Remove global cache (state) and use instance level cache instead.

Bug Fixes

  • mocha --watch breaks the parser.

3.6.1 (6-21-2018)

Bug Fixes

  • Runtime exception when checking custom patterns line break issues.

3.6.0 (6-21-2018)

Minor Changes

  • Simplify Handling of line terminators in Lexers.
  • Ability to de-serialize and serialize the GST instead of rebuilding it using Function.toString.

Bug Fixes

  • Types - fixed groups parameter type in CustomPatternMatcherFunc.
  • Types - CustomPatternMatcherFunc return type now allows null value.

3.5.0 (6-10-2018)

Minor Changes

  • PerformSelfAnalysis can be an instance method..
  • Previous Token Information on Parser Runtime Errors..
  • Updated regexp-to-ast to 0.3.3.
  • Lexer Validations now use regexp-to-ast library when appropriate.

3.4.0 (6-6-2018)

Minor Changes

  • Detect grammars with none unique names.
  • Better error message for: "Terminal Token name not found".
  • Updated regexp-to-ast to 0.2.4.

Bug Fixes

  • Fixed UMD bundle to work on commonjs.

Examples

  • Update WebPack example to webpack 4.

3.3.0 (5-20-2018)

Documentation

  • Define APIs separately from the source code.

3.2.1 (5-9-2018)

Bug Fixes

  • Failure Lexing Case Insensetive Patterns.

  • Version of regexp-to-ast library printed incorrectly.

3.2.0 (4-24-2018)

Minor Changes

  • Micro Optimizations.

Documentation

  • New documentation website generated using vuepress.

3.1.0 (4-13-2018)

Major Changes

  • Lexer optimizations using the next charCode in the remaining text.

3.0.1 (2-23-2018)

Bug Fixes

  • Easier handling of optional CST Nodes.

3.0.0 (2-23-2018)

Breaking Changes

  • BREAKING_CHANGES for V3.0

Major Changes

  • Optional Labels for CST Nodes

  • Performance Improvements for CST Creation

Minor Changes

  • The CST creation no longer relies on "new Function()" calls and can thus be used in environments with Content Security Policy enabled.

2.0.2 (2-21-2018)

Bug Fixes

  • Runtime Error During re-sync Recovery.

2.0.1 (2-11-2018)

Bug Fixes

  • Removed redundant dependency.

2.0.0 (2-11-2018)

Breaking Changes

  • BREAKING_CHANGES for V2.0

Major Changes

  • Support custom user defined declarative APIs

Minor Changes

  • Increase DSL methods suffix indices.

Bug Fixes

  • Added missing link to deprecated TokenType parent property error message.

1.0.1 (12-27-2017)

Documentation

  • New Documentation Website.

Bug Fixes

  • Parser exceptions will now reference the new docs page.

1.0.0 (12-8-2017)

Breaking Changes

  • Rework token single inheritance into multiple classifications/ categories.
  • Tokens properties renaming.

Minor Changes

  • Custom Error Message argument for CONSUME.
  • Improved empty empty alternatives detection.
  • previousToken information for EarlyExitException.

Bug Fixes

  • Missing token location in EarlyExitException if token is EOF.

0.35.0 (11-15-2017)

Minor Changes

  • "Type" Property on Tokens "instances" for easier debugging.
  • Support both "push_mode" and "pop_mode" on a Token to support transitions.
  • Validation to check for too many alternatives.

Examples

  • TinyC Grammar Example
  • Backtracking Example.

0.34.0 (10-15-2017)

Minor Changes

  • Rework syntax diagrams creation for ease of use and simplicity.

0.33.0 (10-2-2017)

Breaking Changes

  • Removed "extendToken" and "NEXT*TOKEN" deprecated APIs. Use createToken and LA(1) instead.

Minor Changes

  • Tiny performance improvements and optimizations.
    • 1
    • 2
    • 3

0.32.1 (7-8-2017)

Bug Fixes

  • Fixed diagrams sample.

0.32.0 (7-6-2017)

Major Changes

Lexer Performance oriented release. 10%+ performance boost measured under V8.

  • Lexer Perf boost - .test + lastIndex vs .exec.
  • Reduce token vector resizing using a simple heuristic

0.31.0 (7-1-2017)

Breaking Changes

  • Token patterns which may include line terminators must be explicitly flagged with the "line_breaks" property.

Major Changes

  • Support for user defined line terminators.

0.30.0 (6-23-2017)

Major Changes

  • Customizable error messages.

Minor Changes

  • Validate that user Token Patterns cannot match an empty string.

0.29.0 (6-13-2017)

Breaking Changes

  • Default maxLookahead changed to 4
    • Originally the default maxLookahead was 5, This could cause very slow parser initialization under certain edge case during ambiguity detection, however the vast majority of grammars do not require five tokens of lookahead. A smaller default avoids these potential slow downs while still allows overriding in unique cases which require a large lookahead.

Bug Fixes

  • Separator DSL methods lookahead issue.

0.28.3 (5-1-2017)

Bug Fixes

  • Diagrams drawing bug when using custom Token patterns.

0.28.2 (4-28-2017)

Minor Changes

  • Upgrade to TypeScript 2.3.1

Documentation

  • Ensure chevrotain.d.ts is compatiable with noImplicitAny.

0.28.1 (4-18-2017)

Minor Changes

  • Major performance boost for CST Creation.
    • 50% speed boost measured on V8 when CST output is enabled.

0.28.0 (4-16-2017)

Major Changes

  • Concrete Syntax Tree / Semantic Actions Visitor.

Documentation

  • Runnable offline tutorial source code.

Bug Fixes

  • Definitions: Chevrotain don't support literal string as Token PATTERN in TypeScript.

0.27.3 (3-31-2017)

Minor Changes

  • Support MultiMode Lexer definitions in Parser Constructor.

0.27.2 (3-31-2017)

Minor Changes

  • Detect alternation prefix ambiguities.

0.27.1 (3-29-2017)

Minor Changes

  • Refactor Lexer for minor performance boost.

Bug Fixes

  • Certain RegExp meta characters won't be handled correctly in small RegExps.

0.27.0 (3-27-]62017)

Major Changes

  • Support string Literals as Token patterns.
  • Lexer Performance optimizations 0.27.0

0.26.0 (3-26-2017)

Breaking Changes

  • Major Refactoring to Lexer & Token APIs

Major Changes

  • Simplify Lexer & Tokens APIs.

Minor Changes

  • Detection of infinite loops caused by grammars with "empty" repetitions.
    • Thanks @kdex!

0.25.1 (3-21-2017)

Bug Fixes

  • Fix Performance regression in Regular Tokens 0.25.0.

0.25.0 (3-19-2017)

Breaking Changes

  • Custom Token Patterns API change

Major Changes

  • Use RegExp sticky flag for lexer performance boost.
    • Up to 30% Lexer performance boost measured.

Bug Fixes

  • 0.24.0: Regression: Terminal token name: {name} not found.

0.24.0 (3-17-2017)

Breaking Changes

  • DSL Methods Improved optional arguments syntax.

Major Changes

  • Automatic creation of a Concrete Syntax Tree.
    • See Relevant Docs.

Minor Changes

  • Clear error message if rules have been defined after performSelfAnalysis has been called.
  • Micro performance boost on subrule array init.

Bug Fixes

  • Avoid Possible internal unique key conflicts.
  • Infinite loop during GAST builder.

0.23.0 (2-3-2017)

Major Changes

  • Custom Token Patterns to Support Lexer Context.

Documentation

  • Example of lexing python style indentation.

0.22.0 (1-27-2017)

Minor Changes

  • Lexer performance improvements.

0.21.1 (1-26-2017)

Bug Fixes

  • Fix issue with tokens that both pop and push a mode.
  • Avoid infinite loops during validations caused by left recursion.

0.21.0 (12-24-2016)

Major Changes

  • New "createToken" helper functions.
  • Support for custom implementations of Token patterns.

0.20.0 (12-11-2016)

Breaking Changes

  • More Functional Parsing DSL API.
    • This change broke a couple of APIS:
      • "OPTION" now returns the value of the inner grammar implementation or undefined otherwise instead of a boolean.
      • The "*_SEP" methods now return an object made up of two arrays, separators and values instead of a single array of separators.

0.19.0 (12-3-2016)

Minor Changes

  • Improve formatting of NoViableAlt exception message.
  • Less verbose syntax for defining grammar rules.

0.18.0 (10-27-2016)

Major Changes

  • Syntactic Content Assist Support.

0.17.1 (10-12-2016)

Bug Fixes

  • Lexer "Groups" state persists between different inputs tokenization.

Minor Changes

  • Parsers without error recovery should fail faster on invalid inputs.

0.17.0 (10-3-2016)

Major Changes

  • Grammar serialization and de-serialization.
  • Separate Railroad Diagram Generation into Scriptable Function.

0.16.1 (9-28-2016)

Minor Changes

  • Simple Lazy Tokens should support Token inheritance.

0.16.0 (9-24-2016)

Breaking Changes

The chevrotain TypeScript definitions file is now only compatible with TypeScript 2.0 and later versions. For older versions of TypeScript use Chevrotain versions <= 0.15.0.

Minor Changes

  • Add "typings" field to package.json.

0.15.0 (9-23-2016)

Major Changes

  • Performance Improvements: Lookahead functions.
  • Performance: SimpleLazyTokens.
  • "Smart" Map based lookahead for K = 1 with Token inheritance.

This release is focused on performance improvements, with ~20% boost on V8 and potentially ~100% (double) performance on SpiderMonkey (FireFox 49).

To enjoy the maximum performance boost the new SimpleLazyTokens should be used.

Breaking Changes

Certain advanced uses cases of dynamically defined Tokens Will break if some of new lookahead optimizations are enabled.

To resolve this a new property dynamicTokensEnabled has been defined on the IParserConfig interface. This configuration property is disabled by default, but can be enabled to support the use case of dynamically defined tokens. See the dynamically defined Tokens example for details.

0.14.0 (9-3-2016)

Breaking Changes

  • OR DSL method Syntax should be more consistent.

Minor Changes

  • Performance Optimizations for 0.14.0 release.

0.13.4 (9-1-2016)

Minor Changes

  • Change NPMCDN links to use UNPKG domain name.

0.13.3 (8-28-2016)

Bug Fixes

  • Slow Parser Initialization.

0.13.2 (8-23-2016)

Bug Fixes

  • Diagrams with nodejs fail on instanceof check.

0.13.1 (8-15-2016)

Major Changes

  • Lexer: Lazy Tokens support.
  • Token "startOffset" and "endOffset" properties.

This Release includes a new performance feature called "Lazy Tokens". These tokens contain less actual state and defer the calculation of their properties until needed. Considering most of the time this information is never needed (full position information) the overall speed boost can be as much as 10-25% (depending on the grammar used).

See "2. Use Lazy Tokens" for more details.

0.13.0 (8-6-2016)

Major Changes

  • 0.13.0 Performance Optimizations.
  • Performance FAQ section docs.

This release includes major performance optimizations and guidelines. Anywhere from 20% to 100% was measured (on V8) depending on the grammar used. Please read the Performance FAQ section, as much of the performance gain is achieved by changing the way a Chevrotain parser is initialized which will require code changes (not mandatory) in user's code.

0.12.1 (8-3-2016)

Bug Fixes

  • Diagrams do not work with custom lexers.

Documentation

  • Improve support for running minified in the browser.

0.12.0 (7-21-2016)

Breaking Changes

  • Removed Bower support.

Bug Fixes

  • Predicates / Gates using closures to parameters will cause unexpected behavior.
  • Diagrams highlights issues under IE Edge.

Documentation

  • Example using parametrized sub-rules.

0.11.4 (7-16-2016)

  • Fixes issue with previous release automation.

0.11.3 (7-16-2016)

Bug Fixes

  • AmbiguousAlternatives error's <occurence> property was always undefined.

Quality

  • Use SauceLabs for browser matrix testing

0.11.2 (7-5-2016)

Minor Changes

  • Unresolved subrule references can cause none descriptive exceptions during follow up validations.
  • More descriptive unresolved grammar error message.

Documentation

  • Dynamically defined Tokens example.

0.11.1 (6-16-2016)

Minor Changes

  • extendToken should create constructor functions with meaningful names

0.11.0 (6-7-2016)

  • Minor version release as the previous version included a breaking change in a patch version.

Minor Changes

  • Better runtime checks for Invalid Lexer definitions.

0.10.2 (6-6-2016)

Breaking Changes

  • MultiMode Lexer defaultMode should not be implicitly defined.

Documentation

  • XML grammar example.

0.10.1 (5-30-2016)

  • Fixes issue with previous release automation.

0.10.0 (5-29-2016)

Major Changes

  • Predicates / Gates on productions should be in addition to standard lookahead.

  • Capability to ignore parser definition issues at construction time.

Breaking Changes

  • IsNextRule method was removed from the Parser class. It's functionality is no longer needed as usage of predicates / gates no longer requires manually (re)implementing the lookahead function.

  • DSL methods with separators should not support predicates.

  • Move all "parse time" grammar validations to the initialization phase (grammar construction).

Documentation

  • Example implementing syntactic & semantic content assist.

0.9.0 (4-29-2016)

Major Changes

  • Support LL(k) grammars.

0.8.1 (4-11-2016)

Minor Changes

  • Avoid rebuilding the GAST on parser construction when using RULE_OVERRIDE.

Bug Fixes

  • GAST Production cache does not take into account grammar inheritance

0.8.0 (4-8-2016)

Breaking Changes

Some breaking API changes in this version. Most have the changes have been to optional arguments, so not many changes will be needed (if at all) for most users.

  • Use a config object for RULE DSL method.

    The RULE method's optional third and fourth parameters have been been replaced with a single configuration object of the type IRuleConfig. Therefore any RULE invocation with more than two arguments must be refactored to the new form. For example:

        // old deprecated form
        this.RULE("createStmt", function(){ /* ... */}, function(){ return 666 })
    
        // new form
        this.RULE("createStmt", function(){ /* ... */}, {recoveryValueFunc: function(){ return 666 }})
    
  • Remove RULE_NO_RESYNC DSL method.

    The RULE_NO_RESYNC convenience method has been removed. All usages of it must be replaced with an equivalent RULE call using the IRuleConfig resyncEnabled property.

    For example:

    // old deprecated form
    this.RULE_NO_RESYNC("createStmt", function () {
      /* ... */
    });
    
    // new form
    this.RULE(
      "createStmt",
      function () {
        /* ... */
      },
      { resyncEnabled: false },
    );
    
  • Parser Configuration should be done using a "Config" Object instead of constructor parameters.

  • Error Recovery / Fault Tolerance abilities should be disabled by default.

    The Parser constructors's third (optional) parameter has been been replaced with a single configuration object of the type IParserConfig Therefore any Base Parser super invocation which uses the optional parameter must be updated. Additionally The Error recovery functionality is now disabled by default, it can be enabled via the parser's configuration. For example:

    // old deprecated form
    function JsonParser(input) {
      // The third argument was used to enable/disable error recovery
      // and was **true** by default.
      Parser.call(this, input, true);
    }
    
    // new form
    function JsonParser(input) {
      // invoke super constructor
      Parser.call(this, input, allTokens, {
        // by default the error recovery flag is **false**
        // use recoveryEnabled flag in the IParserConfig object to enable enable it.
        recoveryEnabled: true,
      });
    }
    

0.7.2 (4-7-2016)

Minor Changes

  • Support Overriding Rule implementations in inheriting grammars.

Documentation

  • Bring order to the chaos of the examples folder.

0.7.1 (4-3-2016)

Minor Changes

  • Parsing Errors should include Parser context information.
  • AT_LEAST_ONE dsl rule, errMsg param should be optional.

0.7.0 (4-2-2016)

Major Changes

  • Lexer multi "modes" support.

0.6.3 (3-28-2016)

Minor Changes

  • Re-synced tokens should be reported to the user.

0.6.2 (3-25-2016)

Bug Fixes

  • LexerDefinitionErrorType enum was not exported as part of the public API.

0.6.1 (3-25-2016)

Bug Fixes

  • ParserDefinitionError enum was not exported.

0.6.0 (3-20-2016)

Breaking Changes

  • Reorganized projected structure to be consistent and use "lib" folder Chevrotain's aggregated artifacts are now located under the lib folder instead of the bin folder in the npm package or the release folder in the bower package.

    This means that references to "bower_components/chevrotain/release/..." or "node_modules/chevrotain/bin/..." Will have to be replaced with references to ".../lib/...".

    For example - modified diagrams.html

    Note that no changes are needed for standard consumption of chevrotain under node.js (require('chevrotain')).

Bug Fixes

  • Diagrams - Fixed global references to permit UMD loading.

0.5.23 (3-17-2016)

Bug Fixes

  • Syntax Diagrams usage highlights issues.

0.5.22 (3-15-2016)

Minor Changes

  • Human Readable Token Labels in Syntax Diagrams.
  • Use Token Labels in error messages.

Bug Fixes

  • Diagrams template resources were not fully included in bower "package".

Older Releases changelog is available on Github Releases.

Edit this page on GitHub
Last Updated: 1/24/26, 5:39 PM
Contributors: Shahar Soel, Soel, bd82, i060847, I060847, Kevin Hill, Yudai Takada
Prev
Breaking Changes