trait ParsingREPLWithConfig[T <: Attributable, C <: REPLConfig] extends ParsingREPLBase[T, C]
A REPL that parses its input lines into a value (such as an abstract syntax
tree), then processes them. C is the type of the configuration.
- Source
- REPL.scala
- Alphabetic
- By Inheritance
- ParsingREPLWithConfig
- ParsingREPLBase
- RegexParsers
- Parsers
- REPLBase
- Profiler
- Profiler
- Values
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
-
type
Elem = Char
- Definition Classes
- RegexParsers → Parsers
-
case class
Error extends NoSuccess with Product with Serializable
- Definition Classes
- Parsers
-
case class
Failure extends NoSuccess with Product with Serializable
- Definition Classes
- Parsers
-
type
Input = Reader[Elem]
- Definition Classes
- Parsers
-
sealed abstract
class
NoSuccess extends ParseResult[Nothing]
- Definition Classes
- Parsers
-
trait
OnceParser[+T] extends Parser[T]
- Definition Classes
- Parsers
-
sealed abstract
class
ParseResult[+T] extends AnyRef
- Definition Classes
- Parsers
-
abstract
class
Parser[+T] extends (Input) ⇒ ParseResult[T]
- Definition Classes
- Parsers
-
case class
Record extends Product with Serializable
- Definition Classes
- Values
-
case class
Success[+T] extends ParseResult[T] with Product with Serializable
- Definition Classes
- Parsers
-
case class
~[+a, +b] extends Product with Serializable
- Definition Classes
- Parsers
-
case class
Child
(i: Int) extends Step with Product with Serializable
A step to child
iof the current node, counting from zero.A step to child
iof the current node, counting from zero.- Definition Classes
- Profiler
-
case class
Dep
(step: Step, tipe: Value, attribute: Value) extends Product with Serializable
Dependence record saying that the source attribute depends on
attributeof a node with typetypethat is the given step away.Dependence record saying that the source attribute depends on
attributeof a node with typetypethat is the given step away.- Definition Classes
- Profiler
-
abstract
class
Step
extends AnyRef
A single step in the evaluation of an attribute.
A single step in the evaluation of an attribute.
- Definition Classes
- Profiler
Abstract Value Members
-
abstract
def
banner: String
Banner message that is printed before the REPL starts.
Banner message that is printed before the REPL starts.
- Definition Classes
- REPLBase
-
abstract
def
createConfig(args: Seq[String], output: Emitter = new OutputEmitter, error: Emitter = new ErrorEmitter): C
Create the configuration for a particular run of the REPL.
Create the configuration for a particular run of the REPL. If supplied, use
emitterinstead of a standard output emitter.- Definition Classes
- REPLBase
-
abstract
def
parser: Parser[T]
The parser to use to convert user input lines into values.
The parser to use to convert user input lines into values.
- Definition Classes
- ParsingREPLBase
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
OnceParser[T](f: (Input) ⇒ ParseResult[T]): Parser[T] with OnceParser[T]
- Definition Classes
- Parsers
-
def
Parser[T](f: (Input) ⇒ ParseResult[T]): Parser[T]
- Definition Classes
- Parsers
-
def
accept[U](expected: String, f: PartialFunction[Elem, U]): Parser[U]
- Definition Classes
- Parsers
-
def
accept[ES](es: ES)(implicit arg0: (ES) ⇒ List[Elem]): Parser[List[Elem]]
- Definition Classes
- Parsers
-
implicit
def
accept(e: Elem): Parser[Elem]
- Definition Classes
- Parsers
-
def
acceptIf(p: (Elem) ⇒ Boolean)(err: (Elem) ⇒ String): Parser[Elem]
- Definition Classes
- Parsers
-
def
acceptMatch[U](expected: String, f: PartialFunction[Elem, U]): Parser[U]
- Definition Classes
- Parsers
-
def
acceptSeq[ES](es: ES)(implicit arg0: (ES) ⇒ Iterable[Elem]): Parser[List[Elem]]
- Definition Classes
- Parsers
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
chainl1[T, U](first: ⇒ Parser[T], p: ⇒ Parser[U], q: ⇒ Parser[(T, U) ⇒ T]): Parser[T]
- Definition Classes
- Parsers
-
def
chainl1[T](p: ⇒ Parser[T], q: ⇒ Parser[(T, T) ⇒ T]): Parser[T]
- Definition Classes
- Parsers
-
def
chainr1[T, U](p: ⇒ Parser[T], q: ⇒ Parser[(T, U) ⇒ U], combine: (T, U) ⇒ U, first: U): Parser[U]
- Definition Classes
- Parsers
-
def
checkFor(record: Record, dim: Dimension, eventtype: String, needed: Dimension)(f: (Value) ⇒ Value): Value
- Definition Classes
- Values
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
def
commit[T](p: ⇒ Parser[T]): Parser[T]
- Definition Classes
- Parsers
-
def
dimValue(record: Record, dim: Dimension): Value
Support Kiama-specific profiling dimensions.
Support Kiama-specific profiling dimensions.
- Definition Classes
- Profiler → Profiler → Values
-
def
driver(args: Seq[String]): Unit
Driver for this REPL.
Driver for this REPL. First, use the argument list to create a configuration for this execution. If the arguments parse ok, then print the REPL banner. Read lines from the console and pass non-null ones to
processline. IfignoreWhitespaceLinesis true, do not pass lines that contain just whitespace, otherwise do. Continue untilprocesslinereturns false. Callprompteach time input is about to be read.- Definition Classes
- REPLBase
-
def
elem(e: Elem): Parser[Elem]
- Definition Classes
- Parsers
-
def
elem(kind: String, p: (Elem) ⇒ Boolean): Parser[Elem]
- Definition Classes
- Parsers
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
err(msg: String): Parser[Nothing]
- Definition Classes
- Parsers
-
def
failure(msg: String): Parser[Nothing]
- Definition Classes
- Parsers
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
finishReport(): Unit
- Definition Classes
- Values
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
def
guard[T](p: ⇒ Parser[T]): Parser[T]
- Definition Classes
- Parsers
-
def
handleWhiteSpace(source: CharSequence, offset: Int): Int
- Attributes
- protected
- Definition Classes
- RegexParsers
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
-
def
includeTimings: Boolean
- Definition Classes
- Profiler
-
def
isEventType(record: Record, eventtype: String): Boolean
- Definition Classes
- Values
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
implicit
def
literal(s: String): Parser[String]
- Definition Classes
- RegexParsers
-
def
log[T](p: ⇒ Parser[T])(name: String): Parser[T]
- Definition Classes
- Parsers
-
def
main(args: Array[String]): Unit
The entry point for this REPL.
The entry point for this REPL.
- Definition Classes
- REPLBase
-
def
mkList[T]: (~[T, List[T]]) ⇒ List[T]
- Definition Classes
- Parsers
-
def
nanoToMs(nano: Long): Long
- Definition Classes
- Profiler
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
not[T](p: ⇒ Parser[T]): Parser[Unit]
- Definition Classes
- Parsers
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
-
def
opt[T](p: ⇒ Parser[T]): Parser[Option[T]]
- Definition Classes
- Parsers
-
def
output(str: String): Unit
- Definition Classes
- Values
-
def
outputln(str: String): Unit
- Definition Classes
- Values
-
def
parse[T](p: Parser[T], in: Reader): ParseResult[T]
- Definition Classes
- RegexParsers
-
def
parse[T](p: Parser[T], in: CharSequence): ParseResult[T]
- Definition Classes
- RegexParsers
-
def
parse[T](p: Parser[T], in: Reader[Char]): ParseResult[T]
- Definition Classes
- RegexParsers
-
def
parseAll[T](p: Parser[T], in: CharSequence): ParseResult[T]
- Definition Classes
- RegexParsers
-
def
parseAll[T](p: Parser[T], in: Reader): ParseResult[T]
- Definition Classes
- RegexParsers
-
def
parseAll[T](p: Parser[T], in: Reader[Char]): ParseResult[T]
- Definition Classes
- RegexParsers
-
def
parseProfileOption(value: String): Seq[Dimension]
- Definition Classes
- Profiler
-
def
percent(v: Long, total: Long): String
- Definition Classes
- Profiler
-
def
phrase[T](p: Parser[T]): Parser[T]
- Definition Classes
- RegexParsers → Parsers
-
def
positioned[T <: Positional](p: ⇒ Parser[T]): Parser[T]
- Definition Classes
- RegexParsers → Parsers
-
def
printDependencyGraph(record: Record, dim: Dimension): Unit
Print the dependency graph for the attribute evaluation represented by
record.Print the dependency graph for the attribute evaluation represented by
record. The output is in dot form.- Definition Classes
- Profiler
-
def
printReports(totalTime: Long, dimensionNames: Seq[Dimension], records: List[Record]): Unit
- Definition Classes
- Profiler
-
val
printTables: Boolean
- Definition Classes
- Values
-
def
process(t: T, config: C): Unit
Process a user input value.
Process a user input value. By default, just initialise the tree.
- Definition Classes
- ParsingREPLBase
-
def
processline(line: String, config: C): C
Process a user input line by parsing it to get a value of type
T, then passing it to theprocessmethod.Process a user input line by parsing it to get a value of type
T, then passing it to theprocessmethod. Returns the configuration unchanged.- Definition Classes
- ParsingREPLBase → REPLBase
-
final
def
processlines(config: C): Unit
Process interactively entered lines, one by one, until end of file.
Process interactively entered lines, one by one, until end of file.
- Definition Classes
- REPLBase
- Annotations
- @tailrec()
-
def
profile[T](computation: ⇒ T, dimensionNames: Seq[Dimension], logging: Boolean): T
- Definition Classes
- Profiler
-
def
profileStart(logging: Boolean): Unit
- Definition Classes
- Profiler
-
def
profileStop(): (Seq[Dimension]) ⇒ Unit
- Definition Classes
- Profiler
-
def
profileStop(dimensionNames: Seq[Dimension]): Unit
- Definition Classes
- Profiler
-
def
profileStopInteractive(): Unit
- Definition Classes
- Profiler
-
def
prompt: String
Define the prompt (default:
"> ").Define the prompt (default:
"> ").- Definition Classes
- REPLBase
-
implicit
def
regex(r: Regex): Parser[String]
- Definition Classes
- RegexParsers
-
def
rep[T](p: ⇒ Parser[T]): Parser[List[T]]
- Definition Classes
- Parsers
-
def
rep1[T](first: ⇒ Parser[T], p0: ⇒ Parser[T]): Parser[List[T]]
- Definition Classes
- Parsers
- Annotations
- @migration
- Migration
(Changed in version 2.9.0) The
p0call-by-name arguments is evaluated at most once per constructed Parser object, instead of on every need that arises during parsing.
-
def
rep1[T](p: ⇒ Parser[T]): Parser[List[T]]
- Definition Classes
- Parsers
-
def
rep1sep[T](p: ⇒ Parser[T], q: ⇒ Parser[Any]): Parser[List[T]]
- Definition Classes
- Parsers
-
def
repN[T](num: Int, p: ⇒ Parser[T]): Parser[List[T]]
- Definition Classes
- Parsers
-
def
repsep[T](p: ⇒ Parser[T], q: ⇒ Parser[Any]): Parser[List[T]]
- Definition Classes
- Parsers
-
def
skipWhitespace: Boolean
- Definition Classes
- RegexParsers
-
def
startReport(dimensionNames: Seq[Dimension]): Unit
Take any actions that need to be done at the start of reporting.
Take any actions that need to be done at the start of reporting.
- Definition Classes
- Profiler → Values
-
val
startTime: Long
- Definition Classes
- Profiler
-
def
subjectsToStep(src: Any, dst: Any): Step
Summarise the single step between two nodes at which attributes have been evaluated.
Summarise the single step between two nodes at which attributes have been evaluated.
- Definition Classes
- Profiler
-
def
success[T](v: T): Parser[T]
- Definition Classes
- Parsers
-
def
summariseAlongDims(dimensionNames: Seq[Dimension], records: List[Record], nrecords: Int, profiledTime: Long): Unit
- Definition Classes
- Profiler
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
time[T](computation: ⇒ T, warmup: Int, n: Int, discard: Int): Unit
- Definition Classes
- Profiler
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
def
trace(predicate: (Event) ⇒ Boolean): Unit
- Definition Classes
- Profiler
-
def
valueToString(a: Value): String
- Definition Classes
- Values
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
val
whiteSpace: Regex
- Attributes
- protected
- Definition Classes
- RegexParsers
-
object
NoSuccess
- Definition Classes
- Parsers
-
object
Next
extends Step with Product with Serializable
A step to the previous node in a sequence.
A step to the previous node in a sequence.
- Definition Classes
- Profiler
-
object
Other
extends Step with Product with Serializable
A step to a node that doesn't fit into any of the other categories.
A step to a node that doesn't fit into any of the other categories. This category will be used for nodes that were obtained as the result of reference attributes or as values that sit outside the main tree.
- Definition Classes
- Profiler
-
object
Parent
extends Step with Product with Serializable
A step to the parent of the current node.
A step to the parent of the current node.
- Definition Classes
- Profiler
-
object
Prev
extends Step with Product with Serializable
A step to the previous node in a sequence.
A step to the previous node in a sequence.
- Definition Classes
- Profiler
-
object
Self
extends Step with Product with Serializable
A step nowhere.
A step nowhere. I.e., the dependent attribute is evaluated at the current node.
- Definition Classes
- Profiler