org.kiama

util

package util

Visibility
  1. Public
  2. All

Type Members

  1. trait Compiler[T <: Attributable] extends CompilerWithConfig[T, Config]

    Specialisation of CompilerWithConfig that uses the default configuration type.

  2. trait CompilerBase[T, C <: Config] extends Profiler

    Trait to provide basic functionality for a compiler-like program constructed from phases, including profiling and timing support.

    Trait to provide basic functionality for a compiler-like program constructed from phases, including profiling and timing support. T is the type of the syntax tree communicated from the parser to the main processing of the compiler. C is the type of the configuration.

  3. trait CompilerWithConfig[T <: Attributable, C <: Config] extends CompilerBase[T, C] with RegexParsers

    A compiler that uses RegexParsers to produce Attributable ASTs.

    A compiler that uses RegexParsers to produce Attributable ASTs. The AST is initialised with initTree by process. Override it and call it before performing specific attribution. C is the type of the compiler configuration.

  4. class Config extends ScallopConf

    Configurations for Kiama programs.

    Configurations for Kiama programs. args gives the command-line arguments that are used to determine many of the configuration settings. The emitters allow the output and errors targets to be altered for testing. output defaults to

    emitter allows the output target to be altered for purposes such as testing; it defaults to standard output.

  5. class Console extends AnyRef

    A console using which input data can be read from standard input.

  6. class Counter extends AnyRef

    Thread-safe counters.

    Thread-safe counters. This class provides an operation that can be used to generate a sequence of integer values. Instances of this class are useful for generating things like unique names for generated entities. The methods synchronize on the counter value so they can be called safely from more than one thread.

    init is the initial value of the counter (default: -1).

  7. abstract class Emitter extends AnyRef

    Class of objects that can emit text.

  8. abstract class Entity extends AnyRef

    An entity that represents some program object.

  9. trait Environments extends AnyRef

    General implementation of environments as stacked scopes.

    General implementation of environments as stacked scopes. The objects associated with names in environments are of type Entity.

  10. class ErrorEmitter extends Emitter

    Class of objects that can emit arbitrary error-like text such as program errors, warnings or log messages.

    Class of objects that can emit arbitrary error-like text such as program errors, warnings or log messages. The messages are sent to standard error. Use an OutputEmitter if you just want to output normal program output.

  11. abstract class ErrorEntity extends Entity

    An entity that represents an error situation.

    An entity that represents an error situation. These entities are usually accepted in most situations to avoid cascade errors.

  12. class FileConsole extends Console with ReaderConsole

    A console that reads from the given UTF-8 encoded file.

  13. class FileEmitter extends StringEmitter

    A string emitter that also provides a close method to send the result to the named UTF-8 encoded file.

  14. trait Memoiser extends AnyRef

    Support for memoisation, encapsulating common behaviour of memoised entities and a general reset mechanism for all such entities.

  15. case class Message(label: String, pos: Position = NoPosition) extends Product with Serializable

    A message record consisting of a position and a label string.

    A message record consisting of a position and a label string. If the position is not specified, it defaults to NoPosition.

  16. case class MultipleEntity() extends ErrorEntity with Product with Serializable

    A entity represented by names for whom we have seen more than one declaration so we are unsure what is being represented.

  17. class OutputEmitter extends Emitter

    Class of objects that can emit arbitrary output.

    Class of objects that can emit arbitrary output. The output is sent to standard output. Use an ErrorEmitter if your output is signalling errors, warnings, log messages or similar.

  18. trait ParserUtilities extends RegexParsers with PackratParsers

    Useful utilities for defining regular expression packrat parsers.

  19. trait ParsingREPL[T <: Attributable] extends ParsingREPLWithConfig[T, REPLConfig]

    A REPL that parses its input lines into a value (such as an abstract syntax tree), then processes them.

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

  20. trait ParsingREPLBase[T <: Attributable, C <: REPLConfig] extends REPLBase[C] with RegexParsers

    A REPL that parses its input lines into a value (such as an abstract syntax tree), then processes them.

    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.

  21. 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.

    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.

  22. trait PositionedParserUtilities extends ParserUtilities

    An extension of ParserUtilities that has support for automatically tracking start and finish positions for tree nodes.

  23. trait Profiler extends bitbucket.inkytonik.dsprofile.Profiler

    Kiama-specific additions to dsprofile profilers.

  24. trait REPL extends REPLBase[REPLConfig]

    General support for applications that implement read-eval-print loops (REPLs).

  25. trait REPLBase[C <: REPLConfig] extends Profiler

    General support for applications that implement read-eval-print loops (REPLs).

  26. class REPLConfig extends Config

    Configurations for Kiama REPLS.

    Configurations for Kiama REPLS. Adds some options to the default set that all Kiama programs support.

  27. trait ReaderConsole extends Console

    A console that reads from a given buffered reader.

  28. class StringConsole extends Console with ReaderConsole

    A console that returns from a specified string.

  29. class StringEmitter extends Emitter

    An emitter that records the output in a string that can be accessed via the result method.

  30. trait TreeNode extends Attributable

    General behaviour for tree nodes.

    General behaviour for tree nodes. Case classes that implement actual tree node types should mix-in this trait.

  31. case class UnknownEntity() extends ErrorEntity with Product with Serializable

    An unknown entity, for example one that is represened by names whose declarations are missing.

  32. class WeakIdentityHashSet[T] extends AnyRef

    A simple set that holds onto its elements weakly and compares them by identity.

  33. trait WhitespaceParser extends ParserUtilities

    Support for defining the form of whitespace using a parser, rather than a regular expression.

    Support for defining the form of whitespace using a parser, rather than a regular expression. This version is useful particularly in cases where the form of comments requires more power than a regular expression can provide (e.g., for nested comments).

  34. trait WhitespacePositionedParserUtilities extends WhitespaceParser with PositionedParserUtilities

    Combination of positioned parsing utilities and whitespace handling with a parser.

  35. class Compat210 extends AnyRef

    Compatibility interface so variances between Scala 2.10 and 2.11 can be accommodated in the same client code.

    Compatibility interface so variances between Scala 2.10 and 2.11 can be accommodated in the same client code. This class is deprecated so that warnings about 2.10 things that are deprecated in 2.11 are hidden. Do not use this class directly, but import from its companion object so that the deprecation warnings will be suppressed.

    Annotations
    @deprecated
    Deprecated

    (Since version 2.11) You should never see this message

Value Members

  1. object Comparison

    Utility module for comparison routines.

  2. object Compat210 extends Compat210

    Object by which to access the compatibility interface.

    Object by which to access the compatibility interface. We don't just put the compatibility definitions in this object because using a class and companion object suppresses deprecation warnings.

  3. object IO

    Utility wrapper for I/O to isolate Kiama code from some Java I/O details.

    Utility wrapper for I/O to isolate Kiama code from some Java I/O details. Ultimately this will be replaced by code using the new scala.io.

  4. object JLineConsole extends Console

    A console that provides line editing using JLine.

    A console that provides line editing using JLine. This code follows sbt's equivalent code to try to ensure that there are no incompatibilities.

  5. object Messaging

    Facility for building messages associated with positioned values.

  6. object Patterns

    Patterns that are useful when processing trees.

  7. object Positions extends Memoiser

    Record of source positions that correspond to program elements.

  8. object Trampolines

    Trampolines.

    Trampolines. Useful for converting stack-heavy operations into heap-based ones and thereby avoiding stack overflow.

    Based on code from "Stackless Scala With Free Monads", Runar Oli Bjarnason.

Ungrouped