org.kiama.example.oberon0.base

Driver

trait Driver extends Compiler[ModuleDecl] with PrettyPrinter

A driver for an artefact that parses, pretty prints and performs semantic analysis.

Self Type
Driver with RegexParsers with SourcePrettyPrinter with SymbolTable with Analyser
Linear Supertypes
PrettyPrinter, PrettyPrinterBase, Compiler[ModuleDecl], RegexCompiler[ModuleDecl], RegexParsers, Parsers, CompilerBase[ModuleDecl], AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Driver
  2. PrettyPrinter
  3. PrettyPrinterBase
  4. Compiler
  5. RegexCompiler
  6. RegexParsers
  7. Parsers
  8. CompilerBase
  9. AnyRef
  10. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. class Doc extends ((output.PrettyPrinter.Indent, output.PrettyPrinter.Width)) ⇒ ((Int, Queue[(Int, (Boolean) ⇒ ((Int) ⇒ output.PrettyPrinter.Layout) ⇒ (Int) ⇒ output.PrettyPrinter.Layout)]) ⇒ (Int) ⇒ output.PrettyPrinter.Layout) ⇒ (Int, Queue[(Int, (Boolean) ⇒ ((Int) ⇒ output.PrettyPrinter.Layout) ⇒ (Int) ⇒ output.PrettyPrinter.Layout)]) ⇒ (Int) ⇒ output.PrettyPrinter.Layout with output.PrettyPrinter.DocOps

    Definition Classes
    PrettyPrinter → PrettyPrinterBase
  2. trait DocOps extends AnyRef

    Definition Classes
    PrettyPrinterBase
  3. type Elem = Char

    Definition Classes
    RegexParsers → Parsers
  4. case class Error extends NoSuccess with Product with Serializable

    Definition Classes
    Parsers
  5. case class Failure extends NoSuccess with Product with Serializable

    Definition Classes
    Parsers
  6. type Indent = Int

    Definition Classes
    PrettyPrinterBase
  7. type Input = Reader[(Driver.this)#Elem]

    Definition Classes
    Parsers
  8. type Layout = String

    Definition Classes
    PrettyPrinterBase
  9. sealed abstract class NoSuccess extends ParseResult[Nothing]

    Definition Classes
    Parsers
  10. trait OnceParser[+T] extends Parser[T]

    Definition Classes
    Parsers
  11. sealed abstract class ParseResult[+T] extends AnyRef

    Definition Classes
    Parsers
  12. abstract class Parser[+T] extends (Input) ⇒ ParseResult[T]

    Definition Classes
    Parsers
  13. trait PrettyPrintable extends AnyRef

    Definition Classes
    PrettyPrinterBase
  14. case class Success[+T] extends ParseResult[T] with Product with Serializable

    Definition Classes
    Parsers
  15. type Width = Int

    Definition Classes
    PrettyPrinterBase
  16. case class ~[+a, +b] extends Product with Serializable

    Definition Classes
    Parsers

Abstract Value Members

  1. abstract def artefact: String

    The name of this artefact.

  2. abstract def parser: (Driver.this)#Parser[ModuleDecl]

    Definition Classes
    RegexCompiler

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: ((Driver.this)#Input) ⇒ (Driver.this)#ParseResult[T]): (Driver.this)#Parser[T] with (Driver.this)#OnceParser[T]

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

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

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

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

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

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

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

    Definition Classes
    Parsers
  14. def angles(d: (Driver.this)#Doc): (Driver.this)#Doc

    Definition Classes
    PrettyPrinterBase
  15. def any(a: Any): (Driver.this)#Doc

    Definition Classes
    PrettyPrinterBase
  16. implicit def anyToPrettyPrintable(a: Any): (Driver.this)#PrettyPrintable

    Definition Classes
    PrettyPrinterBase
  17. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  18. def backslash: (Driver.this)#Doc

    Definition Classes
    PrettyPrinterBase
  19. def braces(d: (Driver.this)#Doc): (Driver.this)#Doc

    Definition Classes
    PrettyPrinterBase
  20. def brackets(d: (Driver.this)#Doc): (Driver.this)#Doc

    Definition Classes
    PrettyPrinterBase
  21. def cat(ds: Seq[(Driver.this)#Doc]): (Driver.this)#Doc

    Definition Classes
    PrettyPrinterBase
  22. def chainl1[T, U](first: ⇒ (Driver.this)#Parser[T], p: ⇒ (Driver.this)#Parser[U], q: ⇒ (Driver.this)#Parser[(T, U) ⇒ T]): (Driver.this)#Parser[T]

    Definition Classes
    Parsers
  23. def chainl1[T](p: ⇒ (Driver.this)#Parser[T], q: ⇒ (Driver.this)#Parser[(T, T) ⇒ T]): (Driver.this)#Parser[T]

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

    Definition Classes
    Parsers
  25. var challengeFlag: Boolean

  26. val challengeFlagDefault: Boolean

  27. implicit def char(c: Char): (Driver.this)#Doc

    Definition Classes
    PrettyPrinterBase
  28. def checkargs(args: Array[String], emitter: Emitter): Array[String]

    Process the command-line arguments and return an array of the input file names if processing should continue, None otherwise.

    Process the command-line arguments and return an array of the input file names if processing should continue, None otherwise.

    Definition Classes
    Driver → CompilerBase
  29. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  30. def colon: (Driver.this)#Doc

    Definition Classes
    PrettyPrinterBase
  31. def comma: (Driver.this)#Doc

    Definition Classes
    PrettyPrinterBase
  32. def commit[T](p: ⇒ (Driver.this)#Parser[T]): (Driver.this)#Parser[T]

    Definition Classes
    Parsers
  33. def compile(args: Array[String], console: Console): String

    Definition Classes
    CompilerBase
  34. def consumeast(ast: ModuleDecl, console: Console, emitter: Emitter): Unit

    Consume the AST.

    Consume the AST. For example, translate it to something else. By default, do nothing.

  35. val defaultIndent: Int

    Definition Classes
    PrettyPrinterBase
  36. val defaultWidth: Int

    Definition Classes
    PrettyPrinterBase
  37. def dot: (Driver.this)#Doc

    Definition Classes
    PrettyPrinterBase
  38. def dquote: (Driver.this)#Doc

    Definition Classes
    PrettyPrinterBase
  39. def dquotes(d: (Driver.this)#Doc): (Driver.this)#Doc

    Definition Classes
    PrettyPrinterBase
  40. def driver(args: Array[String], console: Console, emitter: Emitter): Unit

    Custom driver for section tagging and challenge mode for errors.

    Custom driver for section tagging and challenge mode for errors. If a parse error occurs: in challenge mode, just send "parse failed" to standard output, otherwise send the message to the errors file.

    Definition Classes
    Driver → CompilerBase
  41. def elem(e: (Driver.this)#Elem): (Driver.this)#Parser[(Driver.this)#Elem]

    Definition Classes
    Parsers
  42. def elem(kind: String, p: ((Driver.this)#Elem) ⇒ Boolean): (Driver.this)#Parser[(Driver.this)#Elem]

    Definition Classes
    Parsers
  43. def empty: (Driver.this)#Doc

    Definition Classes
    PrettyPrinter → PrettyPrinterBase
  44. def enclose(l: (Driver.this)#Doc, d: (Driver.this)#Doc, r: (Driver.this)#Doc): (Driver.this)#Doc

    Definition Classes
    PrettyPrinterBase
  45. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  46. def equal: (Driver.this)#Doc

    Definition Classes
    PrettyPrinterBase
  47. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  48. def err(msg: String): (Driver.this)#Parser[Nothing]

    Definition Classes
    Parsers
  49. def failure(msg: String): (Driver.this)#Parser[Nothing]

    Definition Classes
    Parsers
  50. def fillcat(ds: Seq[(Driver.this)#Doc]): (Driver.this)#Doc

    Definition Classes
    PrettyPrinterBase
  51. def fillsep(ds: Seq[(Driver.this)#Doc], sep: (Driver.this)#Doc): (Driver.this)#Doc

    Definition Classes
    PrettyPrinterBase
  52. def fillsep(ds: Seq[(Driver.this)#Doc]): (Driver.this)#Doc

    Definition Classes
    PrettyPrinterBase
  53. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  54. def forwslash: (Driver.this)#Doc

    Definition Classes
    PrettyPrinterBase
  55. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  56. def group(d: (Driver.this)#Doc): (Driver.this)#Doc

    Definition Classes
    PrettyPrinter → PrettyPrinterBase
  57. def guard[T](p: ⇒ (Driver.this)#Parser[T]): (Driver.this)#Parser[T]

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

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

    Definition Classes
    AnyRef → Any
  60. def hcat(ds: Seq[(Driver.this)#Doc]): (Driver.this)#Doc

    Definition Classes
    PrettyPrinterBase
  61. var helpFlag: Boolean

  62. val helpFlagDefault: Boolean

  63. def hsep(ds: Seq[(Driver.this)#Doc], sep: (Driver.this)#Doc): (Driver.this)#Doc

    Definition Classes
    PrettyPrinterBase
  64. def hsep(ds: Seq[(Driver.this)#Doc]): (Driver.this)#Doc

    Definition Classes
    PrettyPrinterBase
  65. def initialiseSemanticAnalysis: Unit

    Perform initialisation of semantic analysis that is necessary before processing an AST.

  66. var input: String

  67. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  68. def langle: (Driver.this)#Doc

    Definition Classes
    PrettyPrinterBase
  69. def lbrace: (Driver.this)#Doc

    Definition Classes
    PrettyPrinterBase
  70. def lbracket: (Driver.this)#Doc

    Definition Classes
    PrettyPrinterBase
  71. def line: (Driver.this)#Doc

    Definition Classes
    PrettyPrinter → PrettyPrinterBase
  72. def linebreak: (Driver.this)#Doc

    Definition Classes
    PrettyPrinter → PrettyPrinterBase
  73. def list[T](l: List[T], prefix: String, elemToDoc: (T) ⇒ (Driver.this)#Doc, sep: (Driver.this)#Doc, sepfn: (Seq[(Driver.this)#Doc], (Driver.this)#Doc) ⇒ (Driver.this)#Doc): (Driver.this)#Doc

    Definition Classes
    PrettyPrinterBase
  74. implicit def literal(s: String): (Driver.this)#Parser[String]

    Definition Classes
    RegexParsers
  75. def log[T](p: ⇒ (Driver.this)#Parser[T])(name: String): (Driver.this)#Parser[T]

    Definition Classes
    Parsers
  76. def lparen: (Driver.this)#Doc

    Definition Classes
    PrettyPrinterBase
  77. def lsep(ds: Seq[(Driver.this)#Doc], sep: (Driver.this)#Doc): (Driver.this)#Doc

    Definition Classes
    PrettyPrinterBase
  78. def lsep2(ds: Seq[(Driver.this)#Doc], sep: (Driver.this)#Doc): (Driver.this)#Doc

    Definition Classes
    PrettyPrinterBase
  79. def lterm(ds: Seq[(Driver.this)#Doc], term: (Driver.this)#Doc): (Driver.this)#Doc

    Definition Classes
    PrettyPrinterBase
  80. def main(args: Array[String]): Unit

    Definition Classes
    CompilerBase
  81. def makeast(reader: Reader, filename: String, emitter: Emitter): Either[ModuleDecl, String]

    Definition Classes
    RegexCompiler → CompilerBase
  82. def mkList[T]: ((Driver.this)#~[T, List[T]]) ⇒ List[T]

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

    Definition Classes
    AnyRef
  84. def nest(d: (Driver.this)#Doc, j: (Driver.this)#Indent): (Driver.this)#Doc

    Definition Classes
    PrettyPrinter → PrettyPrinterBase
  85. def not[T](p: ⇒ (Driver.this)#Parser[T]): (Driver.this)#Parser[Unit]

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

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

    Definition Classes
    AnyRef
  88. def opt[T](p: ⇒ (Driver.this)#Parser[T]): (Driver.this)#Parser[Option[T]]

    Definition Classes
    Parsers
  89. def parens(d: (Driver.this)#Doc): (Driver.this)#Doc

    Definition Classes
    PrettyPrinterBase
  90. def parse[T](p: (Driver.this)#Parser[T], in: Reader): (Driver.this)#ParseResult[T]

    Definition Classes
    RegexParsers
  91. def parse[T](p: (Driver.this)#Parser[T], in: CharSequence): (Driver.this)#ParseResult[T]

    Definition Classes
    RegexParsers
  92. def parse[T](p: (Driver.this)#Parser[T], in: Reader[Char]): (Driver.this)#ParseResult[T]

    Definition Classes
    RegexParsers
  93. def parseAll[T](p: (Driver.this)#Parser[T], in: CharSequence): (Driver.this)#ParseResult[T]

    Definition Classes
    RegexParsers
  94. def parseAll[T](p: (Driver.this)#Parser[T], in: Reader): (Driver.this)#ParseResult[T]

    Definition Classes
    RegexParsers
  95. def parseAll[T](p: (Driver.this)#Parser[T], in: Reader[Char]): (Driver.this)#ParseResult[T]

    Definition Classes
    RegexParsers
  96. def phrase[T](p: (Driver.this)#Parser[T]): (Driver.this)#Parser[T]

    Definition Classes
    RegexParsers → Parsers
  97. def plist(l: List[(Driver.this)#PrettyPrintable], prefix: String, elemToDoc: ((Driver.this)#PrettyPrintable) ⇒ (Driver.this)#Doc, sep: (Driver.this)#Doc, sepfn: (Seq[(Driver.this)#Doc], (Driver.this)#Doc) ⇒ (Driver.this)#Doc): (Driver.this)#Doc

    Definition Classes
    PrettyPrinterBase
  98. def positioned[T <: Positional](p: ⇒ (Driver.this)#Parser[T]): (Driver.this)#Parser[T]

    Definition Classes
    RegexParsers → Parsers
  99. var pprintastFlag: Boolean

  100. val pprintastFlagDefault: Boolean

  101. def pretty(d: (Driver.this)#Doc, w: (Driver.this)#Width): (Driver.this)#Layout

    Definition Classes
    PrettyPrinter → PrettyPrinterBase
  102. def pretty(p: (Driver.this)#PrettyPrintable): (Driver.this)#Layout

    Definition Classes
    PrettyPrinterBase
  103. def pretty_any(a: Any): (Driver.this)#Layout

    Definition Classes
    PrettyPrinterBase
  104. var printastFlag: Boolean

  105. val printastFlagDefault: Boolean

  106. def process(ast: ModuleDecl, console: Console, emitter: Emitter): Boolean

    Process the given abstract syntax tree.

    Process the given abstract syntax tree. Send output to emitter, marking sections so that we can split things later.

    Definition Classes
    Driver → Compiler → CompilerBase
  107. def processargs(args: List[String]): Boolean

  108. def processast(ast: ModuleDecl, console: Console, emitter: Emitter): ModuleDecl

    Process the AST, returning the new one.

    Process the AST, returning the new one. By default, return the AST unchanged.

  109. def rangle: (Driver.this)#Doc

    Definition Classes
    PrettyPrinterBase
  110. def rbrace: (Driver.this)#Doc

    Definition Classes
    PrettyPrinterBase
  111. def rbracket: (Driver.this)#Doc

    Definition Classes
    PrettyPrinterBase
  112. implicit def regex(r: Regex): (Driver.this)#Parser[String]

    Definition Classes
    RegexParsers
  113. def rep[T](p: ⇒ (Driver.this)#Parser[T]): (Driver.this)#Parser[List[T]]

    Definition Classes
    Parsers
  114. def rep1[T](first: ⇒ (Driver.this)#Parser[T], p0: ⇒ (Driver.this)#Parser[T]): (Driver.this)#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.

  115. def rep1[T](p: ⇒ (Driver.this)#Parser[T]): (Driver.this)#Parser[List[T]]

    Definition Classes
    Parsers
  116. def rep1sep[T](p: ⇒ (Driver.this)#Parser[T], q: ⇒ (Driver.this)#Parser[Any]): (Driver.this)#Parser[List[T]]

    Definition Classes
    Parsers
  117. def repN[T](num: Int, p: ⇒ (Driver.this)#Parser[T]): (Driver.this)#Parser[List[T]]

    Definition Classes
    Parsers
  118. def repsep[T](p: ⇒ (Driver.this)#Parser[T], q: ⇒ (Driver.this)#Parser[Any]): (Driver.this)#Parser[List[T]]

    Definition Classes
    Parsers
  119. def resetflags(): Unit

  120. def rparen: (Driver.this)#Doc

    Definition Classes
    PrettyPrinterBase
  121. def section(emitter: Emitter, name: String): Unit

    Output a section heading so that the output can be split later.

  122. def semi: (Driver.this)#Doc

    Definition Classes
    PrettyPrinterBase
  123. def sep(ds: Seq[(Driver.this)#Doc]): (Driver.this)#Doc

    Definition Classes
    PrettyPrinterBase
  124. def skipWhitespace: Boolean

    Definition Classes
    RegexParsers
  125. def softbreak: (Driver.this)#Doc

    Definition Classes
    PrettyPrinterBase
  126. def softline: (Driver.this)#Doc

    Definition Classes
    PrettyPrinterBase
  127. def space: (Driver.this)#Doc

    Definition Classes
    PrettyPrinterBase
  128. def spaces(n: Int): (Driver.this)#Doc

    Definition Classes
    PrettyPrinterBase
  129. def squote: (Driver.this)#Doc

    Definition Classes
    PrettyPrinterBase
  130. def squotes(d: (Driver.this)#Doc): (Driver.this)#Doc

    Definition Classes
    PrettyPrinterBase
  131. def ssep(ds: Seq[(Driver.this)#Doc], sep: (Driver.this)#Doc): (Driver.this)#Doc

    Definition Classes
    PrettyPrinterBase
  132. def sterm(ds: Seq[(Driver.this)#Doc], term: (Driver.this)#Doc): (Driver.this)#Doc

    Definition Classes
    PrettyPrinterBase
  133. def string(s: String): (Driver.this)#Doc

    Definition Classes
    PrettyPrinterBase
  134. def success[T](v: T): (Driver.this)#Parser[T]

    Definition Classes
    Parsers
  135. def surround(d: (Driver.this)#Doc, b: (Driver.this)#Doc): (Driver.this)#Doc

    Definition Classes
    PrettyPrinterBase
  136. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  137. implicit def text(t: String): (Driver.this)#Doc

    Definition Classes
    PrettyPrinter → PrettyPrinterBase
  138. def toString(): String

    Definition Classes
    AnyRef → Any
  139. def usageMessage: String

  140. def value(v: Any): (Driver.this)#Doc

    Definition Classes
    PrettyPrinterBase
  141. def vcat(ds: Seq[(Driver.this)#Doc]): (Driver.this)#Doc

    Definition Classes
    PrettyPrinterBase
  142. def vsep(ds: Seq[(Driver.this)#Doc], sep: (Driver.this)#Doc): (Driver.this)#Doc

    Definition Classes
    PrettyPrinterBase
  143. def vsep(ds: Seq[(Driver.this)#Doc]): (Driver.this)#Doc

    Definition Classes
    PrettyPrinterBase
  144. final def wait(): Unit

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

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

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

    Attributes
    protected
    Definition Classes
    RegexParsers

Deprecated Value Members

  1. def lastNoSuccess: (Driver.this)#NoSuccess

    Definition Classes
    Parsers
    Annotations
    @deprecated
    Deprecated

    (Since version 2.10.0) lastNoSuccess was not thread-safe and will be removed in 2.11.0

  2. def lastNoSuccess_=(x: (Driver.this)#NoSuccess): Unit

    Definition Classes
    Parsers
    Annotations
    @deprecated
    Deprecated

    (Since version 2.10.0) lastNoSuccess was not thread-safe and will be removed in 2.11.0

  3. def product(p: Any): (Driver.this)#Doc

    Definition Classes
    PrettyPrinterBase
    Annotations
    @deprecated
    Deprecated

    (Since version 1.2.1) Use PrettyPrinter.any instead.

Inherited from PrettyPrinter

Inherited from PrettyPrinterBase

Inherited from Compiler[ModuleDecl]

Inherited from RegexCompiler[ModuleDecl]

Inherited from RegexParsers

Inherited from Parsers

Inherited from CompilerBase[ModuleDecl]

Inherited from AnyRef

Inherited from Any

Ungrouped