Fix a bug where moduleStyle
defaulted to "cjs"
when using the node API (rather than to "es"
as documented).
You can now import "lezer-generator/rollup"
to get a rollup plugin that will transform grammars during the build.
Fix a bug that broke @external prop
declarations in grammars.
Make sure unrelated precedence declarations for non-cyclic overlapping tokens don't end up also defining a relation between those tokens.
Actually reuse parser states when skip rules refer to rules also used in other contexts.
Fix a bug where the automaton generated for skip rules wasn't being compressed.
Properly raise an error when different specializations for the same token are given different names.
Fix a bug that prevented NodeProp.skipped
from being properly attached to node types.
Fix a corner-case infinite loop in the state-collapsing algorithm (and speed it up).
Compile +
and *
operators in a way that is less likely to lead to conflicts.
Emit all shift/reduce and reduce/reduce conflicts in a single run, rather than stopping on the first one.
Emit all overlapping token errors, rather than only the first one.
Inline rules can now be anonymous (with syntax [props..] { body }
).
Dynamic precedences can now be associated with productions, which can help pick the preferred GLR parse when a grammar is ambiguous.
Token @precedence
declarations can now refer to a parameterized rule by name (without arguments) to indicate that all instances of that rule have a given precedence.
Fix an issue where the output file would in some cases have a superfluous comma.
Fix a bug in the reuse of compiled rules (which sometimes got confused by inline rules).
The error message for overlapping tokens is a bit more concrete now, including an example of a string that matches both tokens.
Add support for grammar dialects.
Add support for external specializers.
Commas in precedence tag, dialect, or external token lists are now optional.
Changes the serialized parser format.
The test runner helper now allows tests to pass additional configuration options.
The @detectDelim
directive now assigns NodeProp.openedBy
/closedBy
props to the bracket nodes, instead of NodeProp.delim
to the parent node.
Publish less useless cruft to npm, reducing package size.
Fix an issue where token groups were inappropriately merged when conflicting tokens didn't appear in overlapping state sets.
Fix an issue where external tokenizers needed for skipped tokens were not properly enabled for some states.
Fix a bug where the tool would sometimes overeagerly merge states, resulting in incorrect output.
Make dist/test loadable from CommonJS modules again.
Fix a bug that prevented NodeProp.top
from being assigned to top rules in most cases.
Fix an issue that broke the bin command.
Make the package load as an ES module on node
Changes the serialized parser format.
Add support for multiple @top
rules.
Support Foo(...)
syntax in test specs to indicate "ignore the children of this node".
You can now write a node name directly after @top
to give your top node type a name.
Changes the way repeated nodes are represented in the generated parser.
Fix crash when the top rule had no node name.
Adjust the way states' forced reductions are computed to avoid cycles (where force-reducing multiple times gets you back in your original state).
Fix issue where serialized parsers didn't have the top node prop set.
The generator now automatically assigns the top
node prop to the grammar's top node.
Fix bug that made matching single-token skipped expressions unnecessarily expensive.
Do not emit recovery actions in the parse table anymore.
Fix several issues in the way forced reductions were picked, to avoid infinite reduction loops.
Add support for props and custom node names in the grammar notation.
Allow importing of props via @external prop
.
Rule capitalization is now relevant (again), only capitalized rules appear in the tree by default.
Remove support for node tags, tag expressions, the @tags
block, and everything else related to tags.
Replace tagged expression syntax with inline rule syntax.
Literal declarations must now go into the @tokens
block.
The @detectDelim
declaration must now appear at the top level.
The dash in @external-...
syntax was dropped—@external
is now a separate token.
External grammars that default to null must now have the word empty
instead of from "..."
(to resolve an ambiguity that syntax introduced).
Fix bug where the grammar parser unintentionally required semicolon between rules in skip blocks.
Actually throw an error when detecing a skip inconsistency.
Track skip context more accurately through parse states.
Fix specializing of external tokens.
Add support for tags.
Add @tags
blocks, allow tags for literals.
Add @punctuation
to succinctly declare punctuation tags.
Add @infer-delim
to enable automatic delimiter detection.
Add @all
as a way to append tags to all tagged rules in the grammar.
Allow a choice of literals to be passed to @specialize
/@extend
.
Add dist/test.js
with test helper functions.
Require @
in front of grammar keywords.
Remove support for =
-style tag declarations.
Replace tag.foo
syntax with colon suffix syntax.
Actually include the .d.ts file in the published package.
First documented release.