Skip to content

Release 2.1.0

Compare
Choose a tag to compare
@gkellogg gkellogg released this 13 Jul 18:38
· 109 commits to develop since this release

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 and rept 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 include as_hash: true, which is provided to PEG::Rule#parse on the return from PEG::Parser#onStart. This allows seq 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 to EBNF.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.