Slide 7
Slide 7 text
Kiama: Shallow Embedding of Software Language
Processing in Scala
val beta =
rule {
case App (Lam (x, t, e1), e2) =>
Let (x, t, e2 , e1)
}
val lambda =
beta + arithop + subsNum + subsVar + subsApp +
subsLam + subsOpn
def innermost (s : => Strategy) : Strategy =
all (innermost (s) <*
attempt (s <* innermost (s)))
lazy val s : Strategy =
innermost (lambda)
Macquarie University, kiama.googlecode.com
7 / 16