Releases: dryruby/ebnf
Releases · dryruby/ebnf
Release 2.1.3
- Add turtle output to cli.
- Don't output non-unique HTML identifiers.
- Don't output non-printable unicode characters in HTML.
- Check Unicode type for non-printables
- Validate HTML output if Nokogumbo gem is present and
validate
option is used.
Release 2.1.2
- Support
:rept
expressions in PEG (@stouset) - Minor HTML format updates.
- Use native parser for builds and tests so that changes to the PEG parser don't spread too far.
- Note ambiguity inherent in using rule identifiers which conflict with ranges.
Release 2.1.1
- Remove :unescape option in PEG parser. (It remains in LL1, but really a contamination of concerns from RDF).
- Fix line counting in scanner.
- Encode HTML entities in formatted output.
Release 2.1.0
Builds on the previous 2.0 release with the PEG/Packrat parser. This version supports additional BNF-like grammars:
As the gem parses everything to an intermediate S-Expression model, the gem can also perform limited transliterations between different BNF variants, either as text formatted for the particular variant, or HTML also specific to the particular variation.
Additional notable changes:
- Better logging support of RDF::Util::Logger is loaded, or errors are being logged to STDOUT/ERR.
- Add
Base#validate!, Base#valid?
,Rule#validate! and
Rule#valid?`. - Update Turtle generation to use rule sym as identifier, and id as dc:identifier.
- Allow
diff
(a - b
) to be used with non-termainals in PEG parsing. - Added
not
andrept
operators (not used directly by EBNF grammar, just yet). - Added ISO EBNF (ISO/IEC 14977:1996) example, which parses files using that grammar.
- Allow
start_production
to take an option, which can includeas_hash: true
, which is provided toPEG::Rule#parse
on the return fromPEG::Parser#onStart
. This allowsseq
matching to return a hash rather than an array of hashes. - Add native ABNF support usable from the command line, and by using
format: :abnf
toEBNF.parse
. No support for writing ABNF yet, but parsed ABNF can be written as EBNF, with some loss of fideliy. - Use Erubis instead of Haml for HTML formatting, as it preserves leading whitespace.
Release 2.0.0
New PEG parser mode, allows parsing of non-context-free grammars based on Parser Expression Grammars
- Add a PEG parser option, implemented to do recursive-descent parsing by interpreting the rules directly. The
Rule#to_peg
(and related) changes extract sub-rules from rules in a simlar way toRule#to_bnf
. - Uses a Packrat memoizer.
Other changes:
- Update EBNF grammar to eliminate confusion between ENUM and LHS and to fix PASS so that
#xN
is not confused with a comment. - Don't rewrite LL1 rules to de-dupliate terminals, as it gets into nasty self-depedency issues.
- Update LL1 parser to accept a logger, and use if available if a callback is not provided. Adjust log levels to be compatible with Logger.
- Remove
Rule#rewrite
, which was flawed and unused.
Release 1.2.0
- Updates for Ruby 2.7 calling sequence changes.
- Fix problems generating SXP and help debugging LL1 when rules do not have a first.
Release 1.1.0
- Note rules which require cleanup to get back to EBNF (opt, star, plus) and add default production to pass and merge these results. This is activated in the LL1 parser when the :cleanup option is provided, which can be initialized from the generated CLEANUP table.
- Add simple parsers for *, + and ? EBNF operator cleanup.
- Fix bug in Scanner based on some upstream change to StringScanner which caused it to return null when empty. If passed a string, instantiate StringScanner rather than Scanner, which saves some work.
- Allow
Scanner#first
,#recover
, and#match_token
to take a list of type symbols to subset the actual terminals searched against.