Skip to content

Metal 6.0.0

Compare
Choose a tag to compare
@jvdb jvdb released this 26 Jul 20:33
· 570 commits to main since this release

Many changes in this release. Functional:

  1. A new Token called Until has been added, which greatly simplifies parsing data that has a terminator instead of some explicit size.
  2. A new ValueExpression called Bytes has been added, which turns a list of values into a list of single-byte values.
  3. Support for deep, value-based equality checks on all Tokens.
  4. The Def Token has been generalized by removing its predicate field. Instead there is now a general Post Token to express post-conditions.
  5. The Pre Token is now more strict: if its condition is not true, it fails.
  6. Two new ComparisonExpressions have been added: GtEqNum and LtEqNum for greater-than-or-equals and lower-than-or-equals respectively.

Non-functional:

  1. Migrated to Java 8. Many parts of the API have been improved, e.g., ParseResult is now Optional<Environment>, Reducer is now BinaryOperator<ValueExpression>, the old OptionalValue class is now a proper Optional<Value>, etc.
  2. The implementation is still recursive and (almost entirely) immutable, but because all recursive code has been augmented with trampolines, this will no longer cause stack overflows.
  3. ValueExpressions of the form last(ref(x)) have been optimized to immediately return a single value, greatly improving runtime performance.
  4. To evaluate a ValueExpression, only a ParseGraph is now needed instead of an entire Environment.

For a more detailed description and all other changes, see the milestones associated with this release: Migrate to Java 8 and 6.0.0.