The Kiama team are pleased to bring you the next release of the library.
This release includes some breaking changes that improve the reliability and safety of Kiama-based applications. All users should take careful note of these changes.
In addition, there are quite a few new features and bug fixes, most notably a new chain decorator for threading attributes through a tree, support for minimal parenthesisation in pretty printing, and callback support for rewriting. A new version of the Oberon-0 example shows how Kiama can be used in an extensible, modular way.
com.googlecode.kiama
instead of com.googlecode
to fit with Maven Central policies. In sbt you can use it with the following dependency."com.googlecode.kiama" %% "kiama" % "1.2.0"
Attributable
such as parent
are not automatically set any more. If you want to use them, first call the Attribution.initTree
method, passing the root of your tree. This change removes a set of bad behaviours caused by setting these properties at node construction time.Attributable
does not extend scala.util.parsing.input.Positional
any more, since it didn’t use it.org.kiama.output
package from org.kiama.util
.chain
decorator for threading attributes through a tree.reset
method which clears their cache.clone
and deepclone
support to Attributable
. Cloning is important if you intend to calculate some attributes on a structure that would otherwise contain duplicate occurrences of nodes.Some
and GenTraversable
children.ParenPrettyPrinter
trait for pretty-printing with minimal parenthesisation.PrettyPrinter
String
and Char
to pretty-printer Doc
type implicit.list
combinator into list
(for lists of values) and plist
(for list of pretty printables).hsep
, vsep
and fillsep
variants that allow a separator to be given.product
combinator now does something sensible for vectors, maps and tuples.lterm
combinator for lists with terminated elements.log
and logfail
combinators to Rewriter
to improve debugging of rewriting phases.CallbackRewriter
extension of Rewriter
that adds callbacks to various rewriting operations. The callback provides both the node that is being rewritten and the node to which it is being rewritten.PositionalRewriter
extension of CallbackRewriter
that automatically copies positions when rewriting scala.util.parsing.input.Positional
nodes .ParserUtilities
trait containing helper support for using Scala combinator parsers, most notably implicit conversions so that case
class
constructors can take “tilde” tuples, thereby eliminating a lot of the pattern matching that you normally need to do in parser actions.WhitespaceParser
trait which allows white space to be defined using a parser instead of a regular expression when using RegexParsers
and PackratParsers
. This capability is useful when white space contains comments that are nestable.Patterns
module to contain useful extractors (just HasParent
for Attributable
now).build.sbt
so that interactive testing is easier.Product
node duplication operation now caches constructors to reduce reflection overhead.Messaging.report
now defaults its Emitter
argument to standard output. www.scala-tools.org
.http://kiama.googlecode.com
now includes links to source.