Class/Object

laika.parse.text

DelimitedText

Related Docs: object DelimitedText | package text

Permalink

class DelimitedText[T] extends Parser[T]

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.

Linear Supertypes
Parser[T], AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. DelimitedText
  2. Parser
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new DelimitedText(delimiter: Delimiter[T])

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. def *: Repeat[T]

    Permalink

    Returns a parser that repeatedly applies this parser.

    Returns a parser that repeatedly applies this parser. It will always succeed, potentially with an empty list as the result.

    Definition Classes
    Parser
  4. def +: Repeat[T]

    Permalink

    Returns a parser that repeatedly applies this parser (at least once).

    Returns a parser that repeatedly applies this parser (at least once).

    Definition Classes
    Parser
  5. def <~[U](p: Parser[U]): Parser[T]

    Permalink

    Applies the specified parser to the input left over by this parser, but only keeps the left result.

    Applies the specified parser to the input left over by this parser, but only keeps the left result.

    a <~ b only succeeds if both parsers succeed.

    Definition Classes
    Parser
  6. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  7. def >>[U](fq: (T) ⇒ Parser[U]): Parser[U]

    Permalink

    Operator synonym for flatMap.

    Operator synonym for flatMap.

    Definition Classes
    Parser
  8. def ?: Parser[Option[T]]

    Permalink

    Returns a parser that optionally parses what this parser parses.

    Returns a parser that optionally parses what this parser parses.

    Definition Classes
    Parser
  9. def ^?[U](f: PartialFunction[T, U], error: (T) ⇒ String = ...): Parser[U]

    Permalink

    Returns a parser that applies a partial function to the result of this parser.

    Returns a parser that applies a partial function to the result of this parser.

    p ^? f succeeds if p succeeds and f is defined at the result of p, In that case it returns f applied to the result of p.

    f

    a partial function that will be applied to this parser's result.

    error

    an optional function that takes the same argument as f and produces an error message.

    Definition Classes
    Parser
  10. def ^^[U](f: (T) ⇒ U): Parser[U]

    Permalink

    A synonym for map, allowing the grammar to be declared in a concise way.

    A synonym for map, allowing the grammar to be declared in a concise way.

    Definition Classes
    Parser
  11. def ^^?[U](f: (T) ⇒ Either[String, U]): Parser[U]

    Permalink

    Returns a parser that applies a function to the result of this parser producing an Either where Left is interpreted as failure.

    Returns a parser that applies a function to the result of this parser producing an Either where Left is interpreted as failure. It is an alternative to ^? for scenarios where the conditional check cannot be easily performed in a pattern match.

    p ^^? f succeeds if p succeeds and f returns a Right when applied to the result of p.

    Definition Classes
    Parser
  12. def ^^^[U](v: ⇒ U): Parser[U]

    Permalink

    Returns a parser that ignores the result of this parser (if it succeeds) and returns the specified result instead.

    Returns a parser that ignores the result of this parser (if it succeeds) and returns the specified result instead.

    Subclasses may override this method to avoid any expensive result processing.

    Definition Classes
    Parser
  13. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  14. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  15. val delimiter: Delimiter[T]

    Permalink
  16. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  17. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  18. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  19. def flatMap[U](f: (T) ⇒ Parser[U]): Parser[U]

    Permalink

    Builds a new parser by applying the specified function to the result of this parser and subsequently applying the parser returned by that function to the input left over by this parser.

    Builds a new parser by applying the specified function to the result of this parser and subsequently applying the parser returned by that function to the input left over by this parser.

    Definition Classes
    Parser
  20. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  21. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  22. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  23. def map[U](f: (T) ⇒ U): Parser[U]

    Permalink

    Builds a new parser by applying the specified function to the result of this parser.

    Builds a new parser by applying the specified function to the result of this parser.

    Definition Classes
    Parser
  24. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  25. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  26. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  27. def orElse[U >: T](p0: ⇒ Parser[U]): Parser[U]

    Permalink

    Applies the specified parser when this parser fails.

    Applies the specified parser when this parser fails.

    a orElse b succeeds if either of the parsers succeeds.

    Implementation note: The parameter is by-name to allow the definition of recursive parsers. In contrast to the former SDK parser combinators this is the only place where a parser with a by-name parameter is used whereas in all other places the additional cost is avoided.

    Definition Classes
    Parser
  28. def parse(ctx: ParserContext): Parsed[T]

    Permalink

    Parses the string content in the specified context and returns the result.

    Parses the string content in the specified context and returns the result.

    This is the only abstract method in Parser that concrete implementations need to implement.

    Definition Classes
    DelimitedTextParser
  29. def parse(in: String): Parsed[T]

    Permalink

    Parses the specified string and returns the result.

    Parses the specified string and returns the result.

    Definition Classes
    Parser
  30. def rep: Repeat[T]

    Permalink

    Returns a parser that repeatedly applies this parser.

    Returns a parser that repeatedly applies this parser. The returned parser offers an API to specify further constraints like min or max.

    Definition Classes
    Parser
  31. def repWith[U >: T](next: (U) ⇒ Parser[U]): Parser[List[U]]

    Permalink

    Returns a parser that invokes the specified function repeatedly, passing the result of this parser if it succeeds, to produce new parsers that get applied until one of them fails.

    Returns a parser that invokes the specified function repeatedly, passing the result of this parser if it succeeds, to produce new parsers that get applied until one of them fails.

    The result of the returned parser is a list containing the result of this parser (if it succeeds) plus the results of successful invocations of the parsers returned by the specified function.

    Definition Classes
    Parser
  32. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  33. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  34. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  35. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  36. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  37. def withFailureMessage(msg: String): Parser[T]

    Permalink

    Changes the failure message produced by a parser.

    Changes the failure message produced by a parser.

    Definition Classes
    Parser
  38. def |[U >: T](p: ⇒ Parser[U]): Parser[U]

    Permalink

    Applies the specified parser when this parser fails.

    Applies the specified parser when this parser fails.

    a | b succeeds if either of the parsers succeeds.

    Implementation note: The parameter is by-name to allow the definition of recursive parsers. In contrast to the former SDK parser combinators this is the only place where a parser with a by-name parameter is used whereas in all other places the additional cost is avoided.

    Definition Classes
    Parser
  39. def ~[U](p: Parser[U]): Parser[~[T, U]]

    Permalink

    Applies the specified parser to the input left over by this parser and combines the two results.

    Applies the specified parser to the input left over by this parser and combines the two results.

    a ~ b only succeeds if both parsers succeed, with the results in a wrapper class named ~ for convenient pattern matching:

    a ~ b ~ c ^^ {
      case a ~ b ~ c => processResult(a, b, c)
    }
    Definition Classes
    Parser
  40. def ~>[U](p: Parser[U]): Parser[U]

    Permalink

    Applies the specified parser to the input left over by this parser, but only keeps the right result.

    Applies the specified parser to the input left over by this parser, but only keeps the right result.

    a ~> b only succeeds if both parsers succeed.

    Definition Classes
    Parser

Inherited from Parser[T]

Inherited from AnyRef

Inherited from Any

Ungrouped