Skip to content

Metal 5.0.0

Compare
Choose a tag to compare
@jvdb jvdb released this 10 Jan 10:20
· 777 commits to main since this release

Most important changes:

  1. A new type of Token has been added: Tie, which is short for Token-in-(Value)Expression. It allows a Token to use the output value of a ValueExpression as input for another Token. Simply put, this allows nested parsing.
  2. Since Tie makes it possible to parse other data than the directly underlying inputstream, the mechanism to relate a ParseValue back to its underlying data has been redesigned. Each ParseValue now has a Slice of a Source, which refers to some ValueExpression, the underlying ByteStream or to some constant value.
  3. Another new type of Token has been added: TokenRef, which allows referencing by name of a previously parsed Token. This allows constructing recursive tokens such as a linked list without having to rely on workarounds such as anonymous classes to put the structure together.
  4. The Str Token has been removed! Instead we have a scheme to dynamically attach Callback instances by adding them to the Environment.
  5. There is now an Nth ValueExpression that allows indexing of a result of some other ValueExpression.

Additionally, several bugs have been fixed, code coverage has increased again (100% now!), documentation has been written and more tests have been added (including automated mutation testing). For a full overview of the changes, please have a look at the accompanying milestone: https://github.com/parsingdata/metal/milestone/3?closed=1.

Finally, note that the parent pom has been renamed from metal-parent to just metal. To use it, please use the following Maven dependency:

<dependency>
  <groupId>io.parsingdata</groupId>
  <artifactId>metal</artifactId>
  <version>5.0.0</version>
</dependency>