kiama.example.til

trait TransformingMain

[source: kiama/example/til/TransformingMain.scala]

trait TransformingMain
extends ParsingMain with Rewriter
Standard main program for TIL chairmarks that parse and transform.
Direct Known Subclasses:
TIL2_1, TIL2_3, TIL2_2

Type Summary
abstract type Root <: AnyRef
The root type of the AST being processed. Needs to be sub-type of Term so that we can transform it using rewriting.
Values and Variables inherited from Rewriter
failure, id, eq, equal, issubterm, ispropersubterm, issuperterm, ispropersuperterm, isleaf, isinnernode
Values and Variables inherited from CharParsers
whitespace, layout, digit, letter, letterOrDigit
Values and Variables inherited from PackratParsers
heads, LRStack
Values and Variables inherited from Parsers
any
Method Summary
override def process (reader : java.io.Reader) : Any
Process the file given by the argument reader by parsing it, transforming it and returning the resulting AST.
abstract def transform (ast : Root) : Root
Transform a single AST.
Methods inherited from Rewriter
strategyf, strategy, rulef, rule, termToStrategy, queryf, query, term, para, child, all, one, some, rewrite, collects, collectl, count, attempt, repeat, repeat, repeat, repeat1, repeat1, repeatuntil, loop, loopnot, doloop, loopiter, loopiter, not, where, test, breadthfirst, topdown, topdownS, bottomup, bottomupS, downup, downup, downupS, downupS, dontstop, oncetd, oncebu, sometd, somebu, outermost, innermost, innermost2, reduce, alltd, alldownup2, alltdfold, somedownup, manybu, manytd, leaves, leaves, everywherebu, everywheretd, restore, restorealways, lastly, ior, or, and
Methods inherited from CharParsers
token, phrase, literal, regex, parse, parse, parse, parseAll, parseAll, parseAll
Methods inherited from PackratParsers
rep1, memo
Methods inherited from Parsers
Parser, success, failure, accept, acceptIf, opt, rep, rep1, repN, repsep, rep1sep, and, not
Methods inherited from Main
main, test
Methods inherited from AnyRef
getClass, hashCode, equals, clone, toString, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized
Methods inherited from Any
==, !=, isInstanceOf, asInstanceOf
Methods inherited from ParsingMain
parse (abstract)
Type Details
abstract type Root <: AnyRef
The root type of the AST being processed. Needs to be sub-type of Term so that we can transform it using rewriting.

Method Details
override def process(reader : java.io.Reader) : Any
Process the file given by the argument reader by parsing it, transforming it and returning the resulting AST.
Overrides
ParsingMain.process

abstract def transform(ast : Root) : Root
Transform a single AST.