Package

laika

parse

Permalink

package parse

Visibility
  1. Public
  2. All

Type Members

  1. case class Failure(msgProvider: Message, next: ParserContext) extends Parsed[Nothing] with Product with Serializable

    Permalink

    The failure case of Parsed containing an error message and the remaining input.

    The failure case of Parsed containing an error message and the remaining input.

    Implementation note: The message property is of type Message, to allow for lazy message creation. The former SDK parser combinators which this API is partially inspired by contained a lot of unnecessary string concatenations for messages which were then never read. This implementation avoids this extra cost and the result is measurable (about 15% performance gain for a typical Markdown document for example).

    msgProvider

    A provider that produces an error message for this failure based on its ParserContext

    next

    The parser's unconsumed input at the point where the failure occurred.

  2. trait Message extends AnyRef

    Permalink

    Represents a lazy failure message.

    Represents a lazy failure message. Implementations can use the specified ParserContext to construct the actual message, e.g. for adding parts of the input to the message.

  3. sealed abstract class Parsed[+T] extends AnyRef

    Permalink

    Represents the result of a Parser, a value of type T in case of success, a message in case of failure as well as the ParserContext for the remaining input.

  4. abstract class Parser[+T] extends AnyRef

    Permalink

    The abstract base for all parser implementations.

    The abstract base for all parser implementations.

    Contains the main parse function as well as various combinator function to create a new parser based on this one.

  5. case class ParserContext(source: Source, offset: Int, nestLevel: Int) extends Product with Serializable

    Permalink

    Represents the state and context of a parsing operation, containing the input string as well as positional information/

  6. case class Position(s: Source, offset: Int) extends Product with Serializable

    Permalink

    Represents an offset into a source string.

    Represents an offset into a source string. Its main purpose is error reporting, e.g. printing a visual representation of the line containing the error.

    s

    the source for this position

    offset

    the offset into the source string

  7. case class Source(value: String) extends Product with Serializable

    Permalink

    Represents the input string for a parsing operation.

  8. case class Success[+T](result: T, next: ParserContext) extends Parsed[T] with Product with Serializable

    Permalink

    The success case of Parsed containing the result and the remaining input.

Value Members

  1. object Message

    Permalink

    Message companion providing several pre-built messages and factory methods.

  2. object Parser

    Permalink

    Companion factory for creating new parser instances.

  3. object ParserContext extends Serializable

    Permalink

    Companion for creating new ParserContext instances.

  4. package combinator

    Permalink
  5. package css

    Permalink
  6. package directive

    Permalink
  7. package markup

    Permalink
  8. package text

    Permalink
  9. package uri

    Permalink

Ungrouped