Package

laika.parse

text

Permalink

package text

Visibility
  1. Public
  2. All

Type Members

  1. class Characters[T] extends Parser[T]

    Permalink

    Optimized parser for character input.

  2. case class ConfigurableDelimiter(endDelimiters: Set[Char], postCondition: Option[Parser[Any]] = None, acceptEOF: Boolean = false, nonEmpty: Boolean = false, keepDelimiter: Boolean = false, failOn: Set[Char] = Set()) extends Delimiter[String] with Product with Serializable

    Permalink

    Delimiter implementation that allows for various kinds of customization.

  3. class DelimitedText[T] extends Parser[T]

    Permalink

    A parser for text that ends with a specific delimiter condition, either marking the end of the text span or the start of an embedded inner span.

  4. trait Delimiter[T] extends AnyRef

    Permalink

    Represents the logic of a specific kind of text delimiter.

    Represents the logic of a specific kind of text delimiter.

    T

    the type of result produced by this delimiter

  5. trait DelimiterOptions extends AnyRef

    Permalink

    API for customizing a delimiter.

  6. trait DelimiterResult[+T] extends AnyRef

    Permalink

    Represents the result of parsing a delimiter.

    Represents the result of parsing a delimiter.

    T

    the type of result produced by this delimiter

  7. case class Literal(expected: String) extends Parser[String] with Product with Serializable

    Permalink

    A parser that matches a literal string.

  8. class WhitespacePreprocessor extends (String) ⇒ String

    Permalink

    Processes whitespace, removing or replacing most whitespace characters except for newline and space.

    Processes whitespace, removing or replacing most whitespace characters except for newline and space.

    It modifies string input in the following ways:

    • Replaces all occurrences of tabs with the corresponding number of spaces, depending on the column the tab is placed in and the configured tabStops value.
    • Removes any return character.
    • Replaces form feed and vertical tab with spaces.

    The processor should run on text input before it is passed to the actual parsers as they would not be able to deal with tabs properly.

Value Members

  1. object Characters

    Permalink

    Companion with factory methods for creating optimized character parsers.

  2. object DelimitedText

    Permalink
  3. object DelimiterOptions

    Permalink
  4. object DelimiterResult

    Permalink
  5. object TextParsers extends Parsers

    Permalink

    Base text parsers that provide optimized low-level parsers for typical requirements of text markup parsers.

    Base text parsers that provide optimized low-level parsers for typical requirements of text markup parsers. In particular they are meant as an efficient replacement for scenarios where usually regex parsers are used. In cases where different parsers need to be tried for relatively short input sequences, regex parsers tend to be less efficient. Furthermore, these base parsers may also improve readability, as it allows to combine simple low-level parsers to higher-level parsers based on the Laika combinator API, instead of producing long regexes which may be hard to read.

  6. object WhitespacePreprocessor

    Permalink

    Companion for creating instances of WhitespacePreprocessor.

Ungrouped