kiama.example.lambda2

object Lambda

[source: kiama/example/lambda2/Lambda.scala]

object Lambda
extends ParsingREPL[Exp] with Parser
A simple typed lambda calculus read-eval-print-loop that offers choice from among multiple evaluation mechanisms. The lambda calculus supported and the strategies used are heavily based on "Building Interpreters with Rewriting Strategies", Eelco Dolstra and Eelco Visser, LDTA 2002 (published in Volume 65/3 of Electronic Notes in Theoretical Computer Science, Elsevier).
Values and Variables inherited from Parser
parse, exp, exp2, exp1, exp0, ttype, ttype0, op, idn, number
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
def process (e : Exp) : Unit
Process an expression by performing semantic analysis on it and then evaluating it.
override def processline (line : java.lang.String) : Unit
Process a user input line by intercepting meta-level commands to update the evaluation mechanisms. By default we just parse what they type into an expression. We support the following meta-level commands: :eval list the available evaluation mechanisms :eval change to using to evaluate
override def prompt : java.lang.String
Define the prompt (default: "> ").
override def setup : Unit
Carry out setup processing for the REPL. Default: do nothing.
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 REPL
main
Methods inherited from AnyRef
getClass, hashCode, equals, clone, toString, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized
Methods inherited from Any
==, !=, isInstanceOf, asInstanceOf
Object Summary
object Command extends AnyRef
Extractor for commands, splits the line into separate words.
Method Details
override def setup : Unit
Carry out setup processing for the REPL. Default: do nothing.

override def prompt : java.lang.String
Define the prompt (default: "> ").

override def processline(line : java.lang.String) : Unit
Process a user input line by intercepting meta-level commands to update the evaluation mechanisms. By default we just parse what they type into an expression. We support the following meta-level commands: :eval list the available evaluation mechanisms :eval change to using to evaluate
Overrides
ParsingREPL.processline

def process(e : Exp) : Unit
Process an expression by performing semantic analysis on it and then evaluating it.
Overrides
ParsingREPL.process