Skip to content

Releases: aroemers/crustimoney

Release 2.0.0-rc-3-0x8bb5

22 May 22:22
Compare
Choose a tag to compare

Added

  • The results/postwalk function is now public. It performs a post-walk over the success nodes.

Changed

  • The results/transform function now throws an Exception when it encounters a success node for which no transformer is specified.

Full Changelog: v2.0.0-rc-1-0x68b1...v2.0.0-rc-3-0x8bb5

Release 2.0.0-rc-1-0x68b1

19 May 20:53
Compare
Choose a tag to compare

Changed

  • The quick/parse now returns a vector-based result, instead of maps. This is more in line with the standard results structure.

Full Changelog: v2.0.0-rc...v2.0.0-rc-1-0x68b1

Release 2.0.0-rc

19 May 18:58
Compare
Choose a tag to compare

This concerns a (possibly breaking) refactor, where every grammar (string-based, data-based and the new combinator-based) now return a vector model in "hiccup"-style. The core/parse function will compile this on the fly (using the vector-grammar), or it can be compiled beforehand using the new core/compile function.

This allowed us to get rid of the grammar macro with its intricacies, and opens up the possibility to combine grammars (something that was a bit cumbersome). It has been replaced with a with-scope macro, that now even supports lexical scoping.

For all the details, see below:

Added:

  • A combinator-grammar namespace has been added. This contains the same functions as the combinators namespace, but all return vector models. This new namespace should be used, instead of the combinators directly.
  • The combinator-grammar also has proper definitions for hard-cut, soft-cut and their aliases >> and >.
  • The combinator-grammar allows references to other rules by simply specifying the keyword. No need to wrap it in ref anymore (though it still exists for completeness sake).
  • The replacement of the combinators/grammar macro is called with-scope. It returns its input map, where the refs inside it have been bound to the lexically scoped rules.
  • A core/compile function has been added, which is an alias to the compile in vector-grammar.
  • The transformation applied by the quick/parse is now in a public function called quick/transform.

Changed:

  • The data-grammar/create-parser and string-grammar/create-parser now return a vector model instead of a function.
  • The core/parse function now compiles a vector model on the fly.
  • Recursive grammars now require a :root key.
  • Combinator implementations now take at least one argument, the parameter map. The rest of the arguments are the child parsers. The combinators in combinators and experimental.combinators have been adapted. Some combinators now take their arguments in this parameter map, like literal or ref, or the experimental range.
  • The data-grammar/vector-tree from the DataGrammar protocol has been renamed to vector-model.
  • The special result from quick/parse has been changed. It now returns a map per node, instead of a vector.
  • The vector-model/create-parser function is now called compile.

Removed:

  • The combinators/grammar macro was removed. Combining grammars is now done by Clojure's merge.
  • The experimental.combinators/recover has been removed.
  • The vector-tree function has been removed from data-grammar and string-grammar. The create-parser functions now return a vector model themselves.

Full Changelog: v2.0.0-beta-198-0xf954...v2.0.0-rc

Release 2.0.0-beta-198-0xf954

11 Apr 17:55
f95490d
Compare
Choose a tag to compare

What's Changed

  • Add results/transform function for batteries-included result tree postwalk processing
  • Add results/coerce and results/collect macros for use with transform

Above additions makes that transforming a parse result tree does not have to be reinvented. The addition should be applicable for many use cases, in a succinct manner. The internals of string-grammar have been rewritten to use transform, coerce and collect, another case of eating its own dog food in this library.

  • A comma (,) is now considered whitespace in the string-grammar syntax.
  • The parameter order of success->text and errors->line-column have been updated; the success node now comes first.

Full Changelog: v2.0.0-beta-195-0xb0fc...v2.0.0-beta-198-0xf954

Release 2.0.0-beta-195-0xb0fc

09 Apr 10:27
b0fc957
Compare
Choose a tag to compare

Added

  • Add quick namespace for a quick parse

This is for those “I want something better than a regex”-moments.

  • Add experimental streaming support

An experimental java.io.Reader wrapper has been added, that keeps a cut-supporting internal buffer, such that it can perform string and even regex matching. Together with the experimental streaming*, recover and with-callback combinators, this yields a first take on streaming support for this recursive descent parser.

Release 2.0.0-beta-181-0x3b05

07 Apr 13:12
3b0569a
Compare
Choose a tag to compare

Added

  • The grammar macro can now be nested, where outer-one does the final resolving of refs.
  • The grammar macro can now takes multiple maps, merging them.

Above two additions allows one to combine multiple grammar, which can also refer to each other.

  • A built-ins namespace with predefined parsers has been added.
  • A map called all is available in the built-ins namespace, containing all the predefined parsers.

Above two additions make a great candidate as one of the arguments to the updated grammar macro.

Changed

  • The create-parser functions of the string- and data-grammer no longer take a second argument with extra parsers. This is now done via the grammar macro.

Full Changelog: v2.0.0-beta-166-0x62b5...v2.0.0-beta-181-0x3b05

Release 2.0.0-beta-166-0x62b5

31 Mar 13:24
Compare
Choose a tag to compare

Complete rewrite. The old version from 10 years ago served its purpose at the time, but was incomplete and difficult to improve. This version intends to fix that.