parboiled 0.9.9 released
Yesterday parboiled, the PEG parsing framework for Java and Scala, received an update to version 0.9.9.0. You can find the full changelog here.
Apart from the usual line-up of bug fixes and smaller improvements this release comes with three things worthy of a little emphasis:
- Much improved Scala facade
- The TracingParseRunner
- The IndentDedentBuffer
Improved Scala Facade
The Scala side of parboiled has received a lot of attention since the previous release. Apart from a cleaner inner structure it now
- comes with more flexible parser actions
- builds faster rules in less time
- accepts a wider range of input sources (String, Array[Char], Source and InputStream)
- simplifies parser test development
With version 0.9.9.0 parboiled for Scala has become much more mature and should now provide a solid base for a large range of parsing applications in Scala.
In order to further simplify parser development parboiled now comes with another ParseRunner implementation, the TracingParseRunner. This runner allows for easy, selective tracing of the parsing process by generating a matching log for all (or a subset of all) grammar rules including semantic predicates and parser actions. Especially with line-based IDE debugging being somewhat less effective on the Scala side (due to the higher code density) the TracingParseRunner can deliver valuable support during grammar and parser debugging.
Writing grammars for languages relying on indentation-based scoping (like Python or YAML) can be difficult if no dedicated parsing step preprocessing the line indentations is used. While writing such a preprocessor is not hard, doing it in a way that does not break error reporting and recovery can be more of a challenge.
This is why parboiled now comes with a dedicated InputBuffer implementation that frees you of these worries. The documentation on indentation-based grammars is a good starting point if your application falls into that category.
Generally, the 0.9.9.0 release is another important step towards a stable parboiled 1.0, which I hope to be able to release before the end of the year. There is only one more important addition on my roadmap before that: A “FastParseRunner”, which compiles the parser to optimized byte code before launching it, hopefully yielding another significant speed increase and putting parboiled parsers on par with comparable ones generated by ANTLR or Rats!.