org.kiama.util

ParsingREPLBase

trait ParsingREPLBase[T] extends REPLBase with RegexParsers

A REPL that parses its input lines into a value (such as an abstract syntax tree), then processes them. Output is emitted using a configurable emitter.

Source
REPL.scala
Linear Supertypes
RegexParsers, Parsers, REPLBase, AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Hide All
  2. Show all
  1. ParsingREPLBase
  2. RegexParsers
  3. Parsers
  4. REPLBase
  5. AnyRef
  6. Any
Visibility
  1. Public
  2. All

Type Members

  1. type Elem = Char

    Definition Classes
    RegexParsers → Parsers
  2. type Input = Reader[Elem]

    Definition Classes
    Parsers

Abstract Value Members

  1. abstract def emitter: Emitter

    The emitter to use to display any output.

    The emitter to use to display any output.

    Definition Classes
    REPLBase
  2. abstract def process(t: T): Unit

    Process a user input value.

  3. abstract def start: Parser[T]

    The parser to use to convert user input lines into values.

Concrete Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. def OnceParser[T](f: (Input) ⇒ ParseResult[T]): Parser[T] with OnceParser[T]

    Definition Classes
    Parsers
  7. def Parser[T](f: (Input) ⇒ ParseResult[T]): Parser[T]

    Definition Classes
    Parsers
  8. def accept[U](expected: String, f: PartialFunction[Elem, U]): Parser[U]

    Definition Classes
    Parsers
  9. def accept[ES](es: ES)(implicit arg0: (ES) ⇒ List[Elem]): Parser[List[Elem]]

    Definition Classes
    Parsers
  10. implicit def accept(e: Elem): Parser[Elem]

    Definition Classes
    Parsers
  11. def acceptIf(p: (Elem) ⇒ Boolean)(err: (Elem) ⇒ String): Parser[Elem]

    Definition Classes
    Parsers
  12. def acceptMatch[U](expected: String, f: PartialFunction[Elem, U]): Parser[U]

    Definition Classes
    Parsers
  13. def acceptSeq[ES](es: ES)(implicit arg0: (ES) ⇒ Iterable[Elem]): Parser[List[Elem]]

    Definition Classes
    Parsers
  14. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  15. def chainl1[T, U](first: ⇒ Parser[T], p: ⇒ Parser[U], q: ⇒ Parser[(T, U) ⇒ T]): Parser[T]

    Definition Classes
    Parsers
  16. def chainl1[T](p: ⇒ Parser[T], q: ⇒ Parser[(T, T) ⇒ T]): Parser[T]

    Definition Classes
    Parsers
  17. def chainr1[T, U](p: ⇒ Parser[T], q: ⇒ Parser[(T, U) ⇒ U], combine: (T, U) ⇒ U, first: U): Parser[U]

    Definition Classes
    Parsers
  18. def clone(): AnyRef

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  19. def commit[T](p: ⇒ Parser[T]): Parser[T]

    Definition Classes
    Parsers
  20. def elem(e: Elem): Parser[Elem]

    Definition Classes
    Parsers
  21. def elem(kind: String, p: (Elem) ⇒ Boolean): Parser[Elem]

    Definition Classes
    Parsers
  22. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  23. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  24. def err(msg: String): Parser[Nothing]

    Definition Classes
    Parsers
  25. def failure(msg: String): Parser[Nothing]

    Definition Classes
    Parsers
  26. def finalize(): Unit

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  27. final def getClass(): java.lang.Class[_]

    Definition Classes
    AnyRef → Any
  28. def guard[T](p: ⇒ Parser[T]): Parser[T]

    Definition Classes
    Parsers
  29. def handleWhiteSpace(source: CharSequence, offset: Int): Int

    Attributes
    protected
    Definition Classes
    RegexParsers
  30. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  31. def ignoreWhitespaceLines: Boolean

    Whether lines consisting entirely of whitespace should be ignored or not.

    Whether lines consisting entirely of whitespace should be ignored or not. Default: yes.

    Definition Classes
    REPLBase
  32. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  33. var lastNoSuccess: NoSuccess

    Definition Classes
    Parsers
  34. implicit def literal(s: String): Parser[String]

    Definition Classes
    RegexParsers
  35. def log[T](p: ⇒ Parser[T])(name: String): Parser[T]

    Definition Classes
    Parsers
  36. def main(args: Array[String]): Unit

    Read lines from the console and pass non-null ones to processline.

    Read lines from the console and pass non-null ones to processline. If ignoreWhitespaceLines is true, do not pass lines that contain just whitespace, otherwise do. Continue until processline returns false. Call setup before entering the loop and call prompt each time input is about to be read. The command-line arguments are passed to the setup method.

    Definition Classes
    REPLBase
  37. def mkList[T]: (~[T, List[T]]) ⇒ List[T]

    Definition Classes
    Parsers
  38. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  39. def not[T](p: ⇒ Parser[T]): Parser[Unit]

    Definition Classes
    Parsers
  40. final def notify(): Unit

    Definition Classes
    AnyRef
  41. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  42. def opt[T](p: ⇒ Parser[T]): Parser[Option[T]]

    Definition Classes
    Parsers
  43. def parse[T](p: Parser[T], in: Reader): ParseResult[T]

    Definition Classes
    RegexParsers
  44. def parse[T](p: Parser[T], in: CharSequence): ParseResult[T]

    Definition Classes
    RegexParsers
  45. def parse[T](p: Parser[T], in: Reader[Char]): ParseResult[T]

    Definition Classes
    RegexParsers
  46. def parseAll[T](p: Parser[T], in: CharSequence): ParseResult[T]

    Definition Classes
    RegexParsers
  47. def parseAll[T](p: Parser[T], in: Reader): ParseResult[T]

    Definition Classes
    RegexParsers
  48. def parseAll[T](p: Parser[T], in: Reader[Char]): ParseResult[T]

    Definition Classes
    RegexParsers
  49. def phrase[T](p: Parser[T]): Parser[T]

    Definition Classes
    RegexParsers → Parsers
  50. def positioned[T <: Positional](p: ⇒ Parser[T]): Parser[T]

    Definition Classes
    RegexParsers → Parsers
  51. def processline(line: String): Unit

    Process a user input line by parsing it to get a value of type T, then passing it to the process method.

    Process a user input line by parsing it to get a value of type T, then passing it to the process method.

    Definition Classes
    ParsingREPLBaseREPLBase
  52. def prompt: String

    Define the prompt (default: "> ").

    Define the prompt (default: "> ").

    Definition Classes
    REPLBase
  53. implicit def regex(r: Regex): Parser[String]

    Definition Classes
    RegexParsers
  54. def rep[T](p: ⇒ Parser[T]): Parser[List[T]]

    Definition Classes
    Parsers
  55. 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 p0 call-by-name arguments is evaluated at most once per constructed Parser object, instead of on every need that arises during parsing.

  56. def rep1[T](p: ⇒ Parser[T]): Parser[List[T]]

    Definition Classes
    Parsers
  57. def rep1sep[T](p: ⇒ Parser[T], q: ⇒ Parser[Any]): Parser[List[T]]

    Definition Classes
    Parsers
  58. def repN[T](num: Int, p: ⇒ Parser[T]): Parser[List[T]]

    Definition Classes
    Parsers
  59. def repsep[T](p: ⇒ Parser[T], q: ⇒ Parser[Any]): Parser[List[T]]

    Definition Classes
    Parsers
  60. def setup(args: Array[String]): Boolean

    Carry out setup processing for the REPL.

    Carry out setup processing for the REPL. Default: do nothing.

    Definition Classes
    REPLBase
  61. def skipWhitespace: Boolean

    Definition Classes
    RegexParsers
  62. def success[T](v: T): Parser[T]

    Definition Classes
    Parsers
  63. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  64. def toString(): String

    Definition Classes
    AnyRef → Any
  65. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()
  66. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()
  67. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()
  68. val whiteSpace: Regex

    Attributes
    protected
    Definition Classes
    RegexParsers

Inherited from RegexParsers

Inherited from Parsers

Inherited from REPLBase

Inherited from AnyRef

Inherited from Any