org.kiama.util

CompilerBase

trait CompilerBase[T] extends AnyRef

Trait to provide basic functionality for a compiler-like program constructed from phases.

Source
Compiler.scala
Linear Supertypes
AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Hide All
  2. Show all
  1. CompilerBase
  2. AnyRef
  3. Any
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def makeast(reader: Reader, filename: String, emitter: Emitter): Either[T, String]

    Make an AST from the file with the given name, returning it wrapped in Left.

    Make an AST from the file with the given name, returning it wrapped in Left. Returns Right with an error message if an AST cannot be made.

  2. abstract def process(ast: T, console: Console, emitter: Emitter): Boolean

    Function to process the input that was parsed.

    Function to process the input that was parsed. console should be used to read anything needed by the processing. emitter should be used for output. Return true if everything worked, false otherwise. If false is returned, messages about the problem should be logged by process using the messaging facility.

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. final def asInstanceOf[T0]: T0

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

    Entry point for standard compiler framework.

    Entry point for standard compiler framework. All command-line argumnents, a JLine console for input editing and a new emitter to standard output are passed to driver.

  8. def clone(): AnyRef

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  9. def compile(args: Array[String], console: Console): String

    Run the driver using the given args and return the resulting output, which may be error messages or the result of running the compiled program, for example.

    Run the driver using the given args and return the resulting output, which may be error messages or the result of running the compiled program, for example. Read standard input from the specified console. Reset the message buffer before calling the driver.

  10. def driver(args: Array[String], console: Console, emitter: Emitter): Unit

    Process the arguments, using the given console for input and the given emitter for output.

    Process the arguments, using the given console for input and the given emitter for output. The arguments are first processed by checkargs. Any remaining arguments are interpreted as names of files which are processed in turn by using makeast to turn their contents into abstract syntax trees (ASTs) and then by process which conducts arbitrary processing on the ASTs. The character encoding of the files is given by the encoding method.

  11. def encoding: String

    The character encoding of input files read by this compiler.

    The character encoding of input files read by this compiler. Defaults to UTF-8.

  12. final def eq(arg0: AnyRef): Boolean

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

    Definition Classes
    AnyRef → Any
  14. def finalize(): Unit

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

    Definition Classes
    AnyRef → Any
  16. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  17. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  18. def main(args: Array[String]): Unit

    Process the program in the file given as the first command-line argument, read input using JLine input editing, and emit output to the standard output.

  19. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  20. final def notify(): Unit

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

    Definition Classes
    AnyRef
  22. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  23. def toString(): String

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

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws()

Inherited from AnyRef

Inherited from Any