You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The IELR(1) parser core is now a native Go implementation and is used by default. GNU Bison is no longer required to generate a parser. The Bison backed core is still available as "ielr1-bison".
The LALR(1) and LR(1) parser cores are now native Go implementations as well and are used by default. The Bison backed cores are still available as "lalr1-bison" and "lr1-bison".
Generated parsers now recover from syntax errors. Mark the places to resume at with the error symbol (@error in GoLR grammars, error in GNU Bison grammars) and the parser reports several errors in one run instead of stopping at the first one.
The VS Code and IntelliJ plugins now support the @error token.
The parser command now reports shift/reduce and reduce/reduce conflicts on stderr. The new --verbose flag additionally lists every conflict which was resolved automatically.
Generated parser tables are smaller, because reductions are compacted into a default reduction and unreachable states are removed.
The LALR(1) and IELR(1) cores now report an error when a grammar needs more states than the parser tables can address. Previously only the LR(1) core did.
Parser generation for large grammars is significantly faster and needs less memory.
The released binaries are built without debug assertions, which makes parser generation noticeably faster.
The parsers and scanners generated by GoLR are exempt from the Apache License, Version 2.0. You can license the generated files as you choose.
Fixed %nonassoc not rejecting sentences which it should reject.
Fixed the Go backend generating broken accept actions, which could result in generated code which does not compile.
Fixed terminals declared with %precedence being dropped when handing the grammar to the Bison backed cores, which silently changed how conflicts were resolved.
Fixed the precedence of a production getting lost while the grammar is augmented.
BREAKING: GrammarToParser of the pkg/parsergen/core/... packages now returns the list of conflicts as an additional result. Call sites need to be updated.
Added the golr selftest command, which checks the IELR(1) parser core against a canonical LR(1) oracle on randomly generated grammars across all CPU cores for as long as you let it run.
Fixed index out of range panics in the Bison frontend scanner when a grammar file ends inside a tag, prologue or braced code block.
Fixed the Bison frontend not recognizing the %lex-param and %parse-param directives.
Fixed the Bison frontend scanner swallowing input after char literals or strings ending in an escaped backslash, like '\'.
Fixed the Bison frontend ignoring char literal token declarations like %token '\' and misnaming escaped char literals: escape sequences are now decoded, so different spellings of the same character resolve to the same terminal.
Added the scanner backend go-table, which writes the scanner as lookup tables instead of as code.
Added the new parser backend 'go-table' which writes the parser as lookup tables instead of as control flow. The existing Go backend is now also available as 'go-direct', with 'go' remaining an alias for it.