package util
- Alphabetic
- Public
- All
Type Members
-
trait
Compiler
[T <: Attributable] extends CompilerWithConfig[T, Config]
Specialisation of
CompilerWithConfigthat uses the default configuration type. -
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.
Tis the type of the syntax tree communicated from the parser to the main processing of the compiler.Cis the type of the configuration. -
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
initTreebyprocess. Override it and call it before performing specific attribution.Cis the type of the compiler configuration. -
class
Config
extends ScallopConf
Configurations for Kiama programs.
Configurations for Kiama programs.
argsgives 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.outputdefaults toemitterallows the output target to be altered for purposes such as testing; it defaults to standard output. -
class
Console
extends AnyRef
A console using which input data can be read from standard input.
-
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.
initis the initial value of the counter (default: -1). -
abstract
class
Emitter
extends AnyRef
Class of objects that can emit text.
-
abstract
class
Entity
extends AnyRef
An entity that represents some program object.
-
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.
-
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
OutputEmitterif you just want to output normal program output. -
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.
-
class
FileConsole
extends Console with ReaderConsole
A console that reads from the given UTF-8 encoded file.
-
class
FileEmitter
extends StringEmitter
A string emitter that also provides a
closemethod to send the result to the named UTF-8 encoded file. -
trait
Memoiser
extends AnyRef
Support for memoisation, encapsulating common behaviour of memoised entities and a general reset mechanism for all such entities.
-
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. -
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.
-
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
ErrorEmitterif your output is signalling errors, warnings, log messages or similar. -
trait
ParserUtilities
extends RegexParsers with PackratParsers
Useful utilities for defining regular expression packrat parsers.
-
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.
-
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.
-
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.
Cis the type of the configuration. -
trait
PositionedParserUtilities
extends ParserUtilities
An extension of
ParserUtilitiesthat has support for automatically tracking start and finish positions for tree nodes. -
trait
Profiler
extends bitbucket.inkytonik.dsprofile.Profiler
Kiama-specific additions to
dsprofileprofilers. -
trait
REPL
extends REPLBase[REPLConfig]
General support for applications that implement read-eval-print loops (REPLs).
-
trait
REPLBase
[C <: REPLConfig] extends Profiler
General support for applications that implement read-eval-print loops (REPLs).
-
class
REPLConfig
extends Config
Configurations for Kiama REPLS.
Configurations for Kiama REPLS. Adds some options to the default set that all Kiama programs support.
-
trait
ReaderConsole
extends Console
A console that reads from a given buffered reader.
-
class
StringConsole
extends Console with ReaderConsole
A console that returns from a specified string.
-
class
StringEmitter
extends Emitter
An emitter that records the output in a string that can be accessed via the result method.
-
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.
-
case class
UnknownEntity
() extends ErrorEntity with Product with Serializable
An unknown entity, for example one that is represened by names whose declarations are missing.
-
class
WeakIdentityHashSet
[T] extends AnyRef
A simple set that holds onto its elements weakly and compares them by identity.
-
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).
-
trait
WhitespacePositionedParserUtilities
extends WhitespaceParser with PositionedParserUtilities
Combination of positioned parsing utilities and whitespace handling with a parser.
-
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
-
object
Comparison
Utility module for comparison routines.
-
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.
-
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.
-
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.
-
object
Messaging
Facility for building messages associated with positioned values.
-
object
Patterns
Patterns that are useful when processing trees.
-
object
Positions
extends Memoiser
Record of source positions that correspond to program elements.
-
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.