Package

org.bitbucket.inkytonik.kiama

parsing

Permalink

package parsing

Visibility
  1. Public
  2. All

Type Members

  1. case class Error(message: String, next: Input) extends NoSuccess with Product with Serializable

    Permalink

    An error parse result.

    An error parse result. Parsers that error do not backtrack.

  2. case class Failure(message: String, next: Input) extends NoSuccess with Product with Serializable

    Permalink

    A failure parse result.

  3. case class Input(source: Source, offset: Int) extends Product with Serializable

    Permalink

    The input consumed by a parser.

  4. class ListParsers extends ParsersBase with ListRepetitionParsers

    Permalink

    Parser combinators that use lists to represent repetitive constructs.

  5. trait ListRepetitionParsers extends AnyRef

    Permalink

    Repetitive parser combinators that use lists to represent repetitive constructs,

  6. sealed abstract class NoSuccess extends ParseResult[Nothing]

    Permalink

    All parse results that are not successful.

  7. sealed abstract class ParseResult[+T] extends AnyRef

    Permalink

    Parse results.

  8. class Parsers extends ParsersBase with VectorRepetitionParsers

    Permalink

    Parser combinators that use vectors to represent repetitive constructs.

  9. class ParsersBase extends AnyRef

    Permalink

    Simple packrat parsing combinator suite.

    Simple packrat parsing combinator suite. These combinators are largely source compatible with the Scala parser combinator library but the implementation is simpler and less general. Broadly speaking this library provides behaviour similar to the Scala library RegexParsers trait with sensible defaults and better integration with the rest of Kiama.

    The parameter positions provides the position store that this suite should use to track AST node positions. Usually the value passed in is shared with the rest of a program that reports errors etc.

    This library should not be used if efficiency is a concern. These combinators are essentially interpreting the grammar so the performance can't compare to a parser generator which compiles the grammar. Nevertheless, the library is perfectly fine for prototyping and for processing small to medium-sized inputs.

    Some of the implementation details in this module are based on the implementation of the Scala parser combinator library but in a much simpler form.

    The algorithms used here to handle left recursion are from "Packrat parsers can support left recursion" by Warth, Douglass and Millstein, ACM SIGPLAN Symposium on Partial Evaluation and Semantics-based Program Manipulation, 2008.

  10. case class Success[+T](result: T, next: Input) extends ParseResult[T] with Product with Serializable

    Permalink

    A successful parse result.

  11. trait VectorRepetitionParsers extends AnyRef

    Permalink

    Repetitive parser combinators that use vectors to represent repetitive constructs.

Value Members

  1. object NoSuccess

    Permalink

    Support for NoSuccess.

Ungrouped