Trait

laika.parse.rst

InlineParsers

Related Doc: package rst

Permalink

trait InlineParsers extends parse.InlineParsers with URIParsers

Provides all inline parsers for reStructuredText.

Inline parsers deal with markup within a block of text, such as a link or emphasized text. They are used in the second phase of parsing, after the block parsers have cut the document into a (potentially nested) block structure.

Linear Supertypes
URIParsers, parse.InlineParsers, MarkupParsers, BaseParsers, RegexParsers, Parsers, AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. InlineParsers
  2. URIParsers
  3. InlineParsers
  4. MarkupParsers
  5. BaseParsers
  6. RegexParsers
  7. Parsers
  8. AnyRef
  9. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. type Elem = Char

    Permalink
    Definition Classes
    RegexParsers → Parsers
  2. case class Error extends NoSuccess with Product with Serializable

    Permalink
    Definition Classes
    Parsers
  3. case class Failure extends NoSuccess with Product with Serializable

    Permalink
    Definition Classes
    Parsers
  4. type Input = Reader[Elem]

    Permalink
    Definition Classes
    Parsers
  5. class MarkupParserException extends RuntimeException

    Permalink

    Exception thrown when parsing a text markup document or fragment fails.

    Exception thrown when parsing a text markup document or fragment fails. This can only happen due to a bug in this library, as the behaviour of the parser is to treat all unknown or malformed markup as regular text and always succeed. The result property holds the NoSuccess instance that caused the failure.

    Definition Classes
    MarkupParsers
  6. sealed abstract class NoSuccess extends ParseResult[Nothing]

    Permalink
    Definition Classes
    Parsers
  7. trait OnceParser[+T] extends Parser[T]

    Permalink
    Definition Classes
    Parsers
  8. sealed abstract class ParseResult[+T] extends AnyRef

    Permalink
    Definition Classes
    Parsers
  9. abstract class Parser[+T] extends (Input) ⇒ ParseResult[T]

    Permalink
    Definition Classes
    Parsers
  10. implicit class ParserOps[A] extends AnyRef

    Permalink

    Provides additional combinator methods to parsers via implicit conversion.

    Provides additional combinator methods to parsers via implicit conversion.

    Definition Classes
    BaseParsers
  11. case class ReferenceName(original: String) extends Product with Serializable

    Permalink

    Represent a reference name.

    Represent a reference name. When resolving references whitespace needs to be normalized and the name converted to lower case.

  12. trait ResultBuilder[Elem, +To] extends AnyRef

    Permalink

    Abstracts the internal process of building up the result of an inline parser.

    Abstracts the internal process of building up the result of an inline parser. Since some inline parser produce a tree of nested spans whereas others may only produce a text result, they often require the same logic in how they deal with nested constructs.

    Definition Classes
    InlineParsers
  13. case class Reverse(length: Int, target: Span, fallback: Span, options: Options = NoOpt) extends Element with Span with Product with Serializable

    Permalink
    Attributes
    protected
  14. class SpanBuilder extends ResultBuilder[Span, List[Span]]

    Permalink

    ResultBuilder that produces a list of spans.

    ResultBuilder that produces a list of spans.

    Definition Classes
    InlineParsers
  15. case class Success[+T] extends ParseResult[T] with Product with Serializable

    Permalink
    Definition Classes
    Parsers
  16. class TextBuilder extends ResultBuilder[String, String]

    Permalink

    ResultBuilder that produces a String.

    ResultBuilder that produces a String.

    Definition Classes
    InlineParsers
  17. class TextParser extends Parser[String]

    Permalink

    API for specifying further constraints on the parsers provided by this base trait.

    API for specifying further constraints on the parsers provided by this base trait.

    For reading 3 or more '*' or '+'characters for example the constraint could be specified as follows:

    anyOf('*','+') min 3
    Definition Classes
    MarkupParsers
  18. implicit class TryOps[A] extends AnyRef

    Permalink

    Provides additional methods to Try via implicit conversion.

    Provides additional methods to Try via implicit conversion.

    Definition Classes
    BaseParsers
  19. case class ~[+a, +b] extends Product with Serializable

    Permalink
    Definition Classes
    Parsers

Value Members

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. object NoSuccess

    Permalink
    Definition Classes
    Parsers
  5. def OnceParser[T](f: (Input) ⇒ ParseResult[T]): Parser[T] with OnceParser[T]

    Permalink
    Definition Classes
    Parsers
  6. def Parser[T](f: (Input) ⇒ ParseResult[T]): Parser[T]

    Permalink
    Definition Classes
    Parsers
  7. def accept[U](expected: String, f: PartialFunction[Elem, U]): Parser[U]

    Permalink
    Definition Classes
    Parsers
  8. def accept[ES](es: ES)(implicit arg0: (ES) ⇒ List[Elem]): Parser[List[Elem]]

    Permalink
    Definition Classes
    Parsers
  9. implicit def accept(e: Elem): Parser[Elem]

    Permalink
    Definition Classes
    Parsers
  10. def acceptIf(p: (Elem) ⇒ Boolean)(err: (Elem) ⇒ String): Parser[Elem]

    Permalink
    Definition Classes
    Parsers
  11. def acceptMatch[U](expected: String, f: PartialFunction[Elem, U]): Parser[U]

    Permalink
    Definition Classes
    Parsers
  12. def acceptSeq[ES](es: ES)(implicit arg0: (ES) ⇒ Iterable[Elem]): Parser[List[Elem]]

    Permalink
    Definition Classes
    Parsers
  13. val addrSpec: Parser[String]

    Permalink

    Parses a single email address as defined in RFC 6068.

    Parses a single email address as defined in RFC 6068.

    addr-spec = local-part "@" domain
    Definition Classes
    URIParsers
  14. val alpha: TextParser

    Permalink

    Parses letters according to RFC 2234.

    Parses letters according to RFC 2234.

    ALPHA =  %x41-5A / %x61-7A ; A-Z / a-z
    Definition Classes
    URIParsers
  15. val any: TextParser

    Permalink

    Consumes any kind of input, always succeeds.

    Consumes any kind of input, always succeeds. This parser would consume the entire input unless a max constraint is specified.

    Definition Classes
    MarkupParsers
  16. def anyBut(chars: Char*): TextParser

    Permalink

    Consumes any number of consecutive characters that are not one of the specified characters.

    Consumes any number of consecutive characters that are not one of the specified characters. Always succeeds unless a minimum number of required matches is specified.

    Definition Classes
    MarkupParsers
  17. def anyIn(ranges: Traversable[Char]*): TextParser

    Permalink

    Consumes any number of consecutive characters that are in one of the specified character ranges.

    Consumes any number of consecutive characters that are in one of the specified character ranges. Always succeeds unless a minimum number of required matches is specified.

    Definition Classes
    MarkupParsers
  18. def anyOf(chars: Char*): TextParser

    Permalink

    Consumes any number of consecutive occurrences of the specified characters.

    Consumes any number of consecutive occurrences of the specified characters. Always succeeds unless a minimum number of required matches is specified.

    Definition Classes
    MarkupParsers
  19. def anyUntil(until: ⇒ Parser[Any]): TextParser

    Permalink

    Consumes any number of characters for which the specified parser fails on the corresponding offset.

    Consumes any number of characters for which the specified parser fails on the corresponding offset. This parser fails if the end of input is reached without the specified parser ever succeeding or if the parser causes an Error result instead of a plain Failure or Success. Further constraints like minimum or maximum number of required matching characters can be specified through the API of the returned TextParser instance.

    Definition Classes
    MarkupParsers
  20. def anyUntil(chars: Char*): TextParser

    Permalink

    Consumes any number of consecutive characters that are not one of the specified characters.

    Consumes any number of consecutive characters that are not one of the specified characters.

    This parser is identical to the anyBut parser except for two differences: this parser fails if it reaches the end of the input without seeing any of the specified characters and it also consumes this final character, without adding it to the result. This parser is usually used when a construct like a span enclosed between two characters needs to be parsed.

    Definition Classes
    MarkupParsers
  21. def anyWhile(p: (Char) ⇒ Boolean): TextParser

    Permalink

    Consumes any number of consecutive characters which satisfy the specified predicate.

    Consumes any number of consecutive characters which satisfy the specified predicate. Always succeeds unless a minimum number of required matches is specified.

    Definition Classes
    MarkupParsers
  22. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  23. val atStart: Parser[Unit]

    Permalink

    Succeeds at the start of the input.

    Succeeds at the start of the input.

    Definition Classes
    MarkupParsers
  24. val authority: Parser[String]

    Permalink

    Parses the authority part of a URI as defined in RFC 3986.

    Parses the authority part of a URI as defined in RFC 3986.

    authority = [ userinfo "@" ] host [ ":" port ]
    Definition Classes
    URIParsers
  25. def chainl1[T, U](first: ⇒ Parser[T], p: ⇒ Parser[U], q: ⇒ Parser[(T, U) ⇒ T]): Parser[T]

    Permalink
    Definition Classes
    Parsers
  26. def chainl1[T](p: ⇒ Parser[T], q: ⇒ Parser[(T, T) ⇒ T]): Parser[T]

    Permalink
    Definition Classes
    Parsers
  27. def chainr1[T, U](p: ⇒ Parser[T], q: ⇒ Parser[(T, U) ⇒ U], combine: (T, U) ⇒ U, first: U): Parser[U]

    Permalink
    Definition Classes
    Parsers
  28. implicit def charToTraversalble(char: Char): Traversable[Char]

    Permalink

    Implicit conversion that allows to pass a single character to the range-based anyIn parser.

    Implicit conversion that allows to pass a single character to the range-based anyIn parser.

    Definition Classes
    MarkupParsers
  29. lazy val citationRef: Parser[CitationReference]

    Permalink

    Parses a citation reference.

  30. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  31. def commit[T](p: ⇒ Parser[T]): Parser[T]

    Permalink
    Definition Classes
    Parsers
  32. def defaultTextRole: String

    Permalink

    The default text role to use when no role is specified in an interpreted text element.

  33. val digit: TextParser

    Permalink

    Parses digits according to RFC 2234.

    Parses digits according to RFC 2234.

    DIGIT =  %x30-39; 0-9
    Definition Classes
    URIParsers
  34. val domain: Parser[String]

    Permalink

    Parses the domain portion of an email address as defined in RFC 6068.

    Parses the domain portion of an email address as defined in RFC 6068.

    domain       = dot-atom-text / "[" *dtext-no-obs "]"
    dtext-no-obs = %d33-90 / ; Printable US-ASCII
                   %d94-126  ; characters not including
                             ; "[", "]", or "\"
    Definition Classes
    URIParsers
  35. val dotAtomText: Parser[String]

    Permalink

    Parses a dot-atom-text sequence as defined in RFC 5322.

    Parses a dot-atom-text sequence as defined in RFC 5322.

    dot-atom-text   =   1*atext *("." 1*atext)
    
     atext           =   ALPHA / DIGIT /    ; Printable US-ASCII
                      "!" / "#" /        ;  characters not including
                      "$" / "%" /        ;  specials.  Used for atoms.
                      "&" / "'" /
                      "*" / "+" /
                      "-" / "/" /
                      "=" / "?" /
                      "^" / "_" /
                      "`" / "{" /
                      "|" / "}" /
                      "~"
    Definition Classes
    URIParsers
  36. def elem(e: Elem): Parser[Elem]

    Permalink
    Definition Classes
    Parsers
  37. def elem(kind: String, p: (Elem) ⇒ Boolean): Parser[Elem]

    Permalink
    Definition Classes
    Parsers
  38. lazy val em: Parser[Emphasized]

    Permalink

    Parses a span of emphasized text.

  39. lazy val email: Parser[(String, String, String)]

    Permalink

    Parses a standalone email address (with no surrounding markup).

    Parses a standalone email address (with no surrounding markup).

    See http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#standalone-hyperlinks

  40. val emailAddress: Parser[String]

    Permalink

    Parses a mailto URI without the scheme part as defined in RFC 6068.

    Parses a mailto URI without the scheme part as defined in RFC 6068.

    Definition Classes
    URIParsers
  41. val emailURI: Parser[String]

    Permalink

    Parses a full mailto URI as defined in RFC 6068.

    Parses a full mailto URI as defined in RFC 6068.

    mailtoURI = "mailto:" [ to ] [ hfields ]
    Definition Classes
    URIParsers
  42. def eof: Parser[String]

    Permalink

    Succeeds at the end of the input.

    Succeeds at the end of the input.

    Definition Classes
    MarkupParsers
  43. def eol: Parser[String]

    Permalink

    Succeeds at the end of a line, including the end of the input.

    Succeeds at the end of a line, including the end of the input. Produces an empty string as a result and consumes any new line characters.

    Definition Classes
    MarkupParsers
  44. final def eq(arg0: AnyRef): Boolean

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

    Permalink
    Definition Classes
    AnyRef → Any
  46. def err(msg: String): Parser[Nothing]

    Permalink
    Definition Classes
    Parsers
  47. lazy val escapedChar: Parser[String]

    Permalink

    Parses an escaped character.

    Parses an escaped character. For most characters it produces the character itself as the result with the only exception being an escaped space character which is removed from the output in reStructuredText.

    See http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#escaping-mechanism.

    Definition Classes
    InlineParsersInlineParsers
  48. def escapedText(p: TextParser): Parser[String]

    Permalink

    Adds support for escape sequences to the specified text parser.

    Adds support for escape sequences to the specified text parser.

    p

    the parser to add support for escape sequences to

    returns

    a parser for a text span that supports escape sequences

    Definition Classes
    InlineParsers
  49. def escapedUntil(char: Char*): Parser[String]

    Permalink

    Parses a span of text until one of the specified characters is seen (unless it is escaped), while also processing escaped characters, but no other nested spans.

    Parses a span of text until one of the specified characters is seen (unless it is escaped), while also processing escaped characters, but no other nested spans. The final character is not included in the result.

    char

    the character that signals the end of the text span

    returns

    a parser for a text span that supports escape sequences

    Definition Classes
    InlineParsers
  50. def failure(msg: String): Parser[Nothing]

    Permalink
    Definition Classes
    Parsers
  51. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  52. def flatten(result: Any): String

    Permalink

    Flattens the result from various combinators, including the repX variants and ~ into a single string.

    Flattens the result from various combinators, including the repX variants and ~ into a single string.

    Definition Classes
    URIParsers
  53. val footnoteLabel: Parser[FootnoteLabel]

    Permalink

    Parses any of the four supported types of footnote labels.

    Parses any of the four supported types of footnote labels.

    See http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#footnote-references.

  54. lazy val footnoteRef: Parser[FootnoteReference]

    Permalink

    Parses a footnote reference.

  55. val fragment: Parser[String]

    Permalink

    Parses the fragment part of a URI as defined in RFC 3986.

    Parses the fragment part of a URI as defined in RFC 3986.

    fragment = *( pchar / "/" / "?" )
    Definition Classes
    URIParsers
  56. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  57. def guard[T](p: ⇒ Parser[T]): Parser[T]

    Permalink
    Definition Classes
    Parsers
  58. def handleWhiteSpace(source: CharSequence, offset: Int): Int

    Permalink
    Attributes
    protected
    Definition Classes
    RegexParsers
  59. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  60. val hexdig: TextParser

    Permalink

    Parses a hexadecimal value according to RFC 2234.

    Parses a hexadecimal value according to RFC 2234.

    HEXDIG = DIGIT / "A" / "B" / "C" / "D" / "E" / "F"
    Definition Classes
    URIParsers
  61. val hfields: Parser[String]

    Permalink

    Parses header fields of an email address as defined in RFC 6068.

    Parses header fields of an email address as defined in RFC 6068.

    hfields      = "?" hfield *( "&" hfield )
    hfield       = hfname "=" hfvalue
    hfname       = *qchar
    hfvalue      = *qchar
    
    qchar        = unreserved / pct-encoded / some-delims
    some-delims  = "!" / "$" / "'" / "(" / ")" / "*"
                 / "+" / "," / ";" / ":" / "@"
    Definition Classes
    URIParsers
  62. val hierPart: Parser[String]

    Permalink

    Parses the hierarchical part of a URI with an authority component as defined in RFC 3986, but only the variant including an authority component.

    Parses the hierarchical part of a URI with an authority component as defined in RFC 3986, but only the variant including an authority component.

    hier-part     = "//" authority path-abempty
                  / path-absolute ; excluded
                  / path-rootless ; excluded
                  / path-empty    ; excluded
    Definition Classes
    URIParsers
  63. val host: Parser[String]

    Permalink

    Parses a host as defined in RFC 3986.

    Parses a host as defined in RFC 3986.

    host = IP-literal / IPv4address / reg-name
    Definition Classes
    URIParsers
  64. val httpUri: Parser[String]

    Permalink

    Parses a full HTTP URI including the scheme part and an authority component as defined in RFC 3986.

    Parses a full HTTP URI including the scheme part and an authority component as defined in RFC 3986.

    Definition Classes
    URIParsers
  65. val httpUriNoScheme: Parser[String]

    Permalink

    Parses an HTTP or HTTPS URI with an authority component, but without the scheme part (therefore starting with "//") as defined in RFC 3986.

    Parses an HTTP or HTTPS URI with an authority component, but without the scheme part (therefore starting with "//") as defined in RFC 3986.

    URI = scheme ":" hier-part [ "?" query ] [ "#" fragment ]
    Definition Classes
    URIParsers
  66. val httpsUri: Parser[String]

    Permalink

    Parses a full HTTPS URI including the scheme part and an authority component as defined in RFC 3986.

    Parses a full HTTPS URI including the scheme part and an authority component as defined in RFC 3986.

    Definition Classes
    URIParsers
  67. def inline[Elem, To](text: ⇒ TextParser, nested: ⇒ Map[Char, Parser[Elem]], resultBuilder: ⇒ ResultBuilder[Elem, To]): Parser[To]

    Permalink

    Generic base parser that parses inline elements based on the specified helper parsers.

    Generic base parser that parses inline elements based on the specified helper parsers. Usually not used directly by parser implementations, this is the base parser the other inline parsers of this trait delegate to.

    Elem

    the element type produced by a single parser for a nested span

    To

    the type of the result this parser produces

    nested

    a mapping from the start character of a span to the corresponding parser for nested span elements

    resultBuilder

    responsible for building the final result of this parser based on the results of the helper parsers

    returns

    the resulting parser

    Definition Classes
    InlineParsers
  68. lazy val inlineLiteral: Parser[Literal]

    Permalink

    Parses an inline literal element.

  69. val internalTarget: Parser[Text]

    Permalink

    Parses an inline internal link target.

  70. lazy val interpretedTextWithRolePrefix: Parser[InterpretedText]

    Permalink

    Parses an interpreted text element with the role name as a prefix.

    Parses an interpreted text element with the role name as a prefix.

    See http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#interpreted-text

  71. lazy val interpretedTextWithRoleSuffix: Parser[InterpretedText]

    Permalink

    Parses an interpreted text element with the role name as a suffix.

    Parses an interpreted text element with the role name as a suffix.

    See http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#interpreted-text

  72. val ipLiteral: Parser[String]

    Permalink

    Parses an ip literal as defined in RFC 3986.

    Parses an ip literal as defined in RFC 3986.

    IP-literal = "[" ( IPv6address / IPvFuture  ) "]"
    Definition Classes
    URIParsers
  73. val ipv4address: Parser[String]

    Permalink

    Parses an IPv4 address as defined in RFC 3986.

    Parses an IPv4 address as defined in RFC 3986.

    IPv4address   = dec-octet "." dec-octet "." dec-octet "." dec-octet
    
    dec-octet     = DIGIT                 ; 0-9
                  / %x31-39 DIGIT         ; 10-99
                  / "1" 2DIGIT            ; 100-199
                  / "2" %x30-34 DIGIT     ; 200-249
                  / "25" %x30-35          ; 250-255

    The implementation has been simplified to parse a 3-digit number and check its value.

    Definition Classes
    URIParsers
  74. val ipv6address: Parser[~[Any, Any]]

    Permalink

    Parses an IPv6 address as defined in RFC 3986.

    Parses an IPv6 address as defined in RFC 3986.

    IPv6address  =                            6( h16 ":" ) ls32
                 /                       "::" 5( h16 ":" ) ls32
                 / [               h16 ] "::" 4( h16 ":" ) ls32
                 / [ *1( h16 ":" ) h16 ] "::" 3( h16 ":" ) ls32
                 / [ *2( h16 ":" ) h16 ] "::" 2( h16 ":" ) ls32
                 / [ *3( h16 ":" ) h16 ] "::"    h16 ":"   ls32
                 / [ *4( h16 ":" ) h16 ] "::"              ls32
                 / [ *5( h16 ":" ) h16 ] "::"              h16
                 / [ *6( h16 ":" ) h16 ] "::"
    
    h16          = 1*4HEXDIG
    
    ls32         = ( h16 ":" h16 ) / IPv4address
    Definition Classes
    URIParsers
  75. val ipvFuture: Parser[~[~[~[Char, String], Char], List[Any]]]

    Permalink

    Parses a future IP address as defined in RFC 3986.

    Parses a future IP address as defined in RFC 3986.

    IPvFuture = "v" 1*HEXDIG "." 1*( unreserved / sub-delims / ":" )
    Definition Classes
    URIParsers
  76. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  77. implicit def literal(s: String): Parser[String]

    Permalink
    Definition Classes
    RegexParsers
  78. val localPart: Parser[String]

    Permalink

    Parses the local part of an email address (before the @), with one deviation from RFC 6068: a quoted string is not allowed.

    Parses the local part of an email address (before the @), with one deviation from RFC 6068: a quoted string is not allowed. It is rarely used, not supported by the reStructuredText reference parser and would be hard to combine within text markup as it allows for whitespace and line break characters.

    local-part = dot-atom-text / quoted-string ; quoted-string omitted
    Definition Classes
    URIParsers
  79. def log[T](p: ⇒ Parser[T])(name: String): Parser[T]

    Permalink
    Definition Classes
    Parsers
  80. def lookBehind[T](offset: Int, parser: ⇒ Parser[T]): Parser[T]

    Permalink

    Applies the specified parser at the specified offset behind the current position.

    Applies the specified parser at the specified offset behind the current position. Never consumes any input.

    Definition Classes
    BaseParsers
  81. def markupEnd(end: Parser[String]): Parser[String]

    Permalink

    Parses the end of an inline element according to reStructuredText markup recognition rules.

    Parses the end of an inline element according to reStructuredText markup recognition rules.

    See http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#inline-markup-recognition-rules.

    end

    the parser that recognizes the markup at the end of an inline element

    returns

    a parser that produces the same result as the parser passed as an argument

  82. def markupStart(end: Parser[String]): Parser[Any]

    Permalink

    Parses the start of an inline element without specific start markup according to reStructuredText markup recognition rules.

    Parses the start of an inline element without specific start markup according to reStructuredText markup recognition rules.

    See http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#inline-markup-recognition-rules.

    end

    the parser that recognizes the markup at the end of an inline element, needed to verify the start sequence is not immediately followed by an end sequence as empty elements are not allowed.

    returns

    a parser without a useful result, as it is only needed to verify it succeeds

  83. def markupStart(start: Parser[Any], end: Parser[String]): Parser[Any]

    Permalink

    Parses the markup at the start of an inline element according to reStructuredText markup recognition rules.

    Parses the markup at the start of an inline element according to reStructuredText markup recognition rules.

    See http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#inline-markup-recognition-rules.

    start

    the parser that recognizes the markup at the start of an inline element

    end

    the parser that recognizes the markup at the end of an inline element, needed to verify the start sequence is not immediately followed by an end sequence as empty elements are not allowed.

    returns

    a parser without a useful result, as it is only needed to verify it succeeds

  84. def mkList[T]: (~[T, List[T]]) ⇒ List[T]

    Permalink
    Definition Classes
    Parsers
  85. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  86. def not[T](p: ⇒ Parser[T]): Parser[Unit]

    Permalink
    Definition Classes
    Parsers
  87. final def notify(): Unit

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

    Permalink
    Definition Classes
    AnyRef
  89. def opt[T](p: ⇒ Parser[T]): Parser[Option[T]]

    Permalink
    Definition Classes
    Parsers
  90. def optimizedCharLookup(chars: Char*): (Char) ⇒ Boolean

    Permalink

    Returns an optimized, Array-based lookup function for the specified characters.

    Returns an optimized, Array-based lookup function for the specified characters.

    Attributes
    protected
    Definition Classes
    MarkupParsers
  91. def optimizedRangeLookup(ranges: Traversable[Char]*): (Char) ⇒ Boolean

    Permalink

    Returns an optimized, Array-based lookup function for the specified ranges of characters.

    Returns an optimized, Array-based lookup function for the specified ranges of characters.

    Attributes
    protected
    Definition Classes
    MarkupParsers
  92. val pChar: Parser[Any]

    Permalink

    Parses one path character as defined in RFC 3986.

    Parses one path character as defined in RFC 3986.

    pchar = unreserved / pct-encoded / sub-delims / ":" / "@"
    Definition Classes
    URIParsers
  93. def parse[T](p: Parser[T], in: Reader): ParseResult[T]

    Permalink
    Definition Classes
    RegexParsers
  94. def parse[T](p: Parser[T], in: CharSequence): ParseResult[T]

    Permalink
    Definition Classes
    RegexParsers
  95. def parse[T](p: Parser[T], in: Reader[Char]): ParseResult[T]

    Permalink
    Definition Classes
    RegexParsers
  96. def parseAll[T](p: Parser[T], in: CharSequence): ParseResult[T]

    Permalink
    Definition Classes
    RegexParsers
  97. def parseAll[T](p: Parser[T], in: Reader): ParseResult[T]

    Permalink
    Definition Classes
    RegexParsers
  98. def parseAll[T](p: Parser[T], in: Reader[Char]): ParseResult[T]

    Permalink
    Definition Classes
    RegexParsers
  99. def parseInline(source: String, spanParsers: Map[Char, Parser[Span]]): List[Span]

    Permalink

    Fully parses the input string and produces a list of spans.

    Fully parses the input string and produces a list of spans.

    This function is expected to always succeed, errors would be considered a bug of this library, as the parsers treat all unknown or malformed markup as regular text. Some parsers might additionally insert system message elements in case of markup errors.

    source

    the input to parse

    spanParsers

    a mapping from the start character of a span to the corresponding parser

    returns

    the result of the parser in form of a list of spans

    Definition Classes
    InlineParsersInlineParsers
  100. def parseInline(source: String): List[Span]

    Permalink

    Fully parses the input string and produces a list of spans, using the default span parsers returned by the spanParsers method.

    Fully parses the input string and produces a list of spans, using the default span parsers returned by the spanParsers method.

    This function is expected to always succeed, errors would be considered a bug of this library, as the parsers treat all unknown or malformed markup as regular text. Some parsers might additionally insert system message elements in case of markup errors.

    source

    the input to parse

    returns

    the result of the parser in form of a list of spans

    Definition Classes
    InlineParsers
  101. def parseMarkup[T](parser: Parser[T], reader: Reader[Char]): T

    Permalink

    Fully parses the input from the specified reader and returns the result.

    Fully parses the input from the specified reader and returns the result. This function is expected to always succeed, errors would be considered a bug in this library, as the parsers treat all unknown or malformed markup as regular text.

    Definition Classes
    MarkupParsers
  102. def parseMarkup[T](parser: Parser[T], source: String): T

    Permalink

    Fully parses the specified input string and returns the result.

    Fully parses the specified input string and returns the result. This function is expected to always succeed, errors would be considered a bug in this library, as the parsers treat all unknown or malformed markup as regular text.

    Definition Classes
    MarkupParsers
  103. val path: Parser[String]

    Permalink

    Parses the path of a URI as defined in RFC 3986, but only the path variant following an authority component.

    Parses the path of a URI as defined in RFC 3986, but only the path variant following an authority component.

    path-abempty  = *( "/" segment )
    
    segment       = *pchar
    Definition Classes
    URIParsers
  104. val pctEncoded: Parser[~[Char, String]]

    Permalink

    Parses a percent-encoded character as defined in RFC 3986.

    Parses a percent-encoded character as defined in RFC 3986.

    pct-encoded = "%" HEXDIG HEXDIG
    Definition Classes
    URIParsers
  105. def phrase[T](p: Parser[T]): Parser[T]

    Permalink
    Definition Classes
    RegexParsers → Parsers
  106. lazy val phraseLinkRef: Parser[Span]

    Permalink

    Parses a phrase link reference (enclosed in back ticks).

    Parses a phrase link reference (enclosed in back ticks).

    See http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#hyperlink-references

  107. val phraseRef: Parser[String]

    Permalink

    Parses a phrase reference name enclosed in back ticks.

    Parses a phrase reference name enclosed in back ticks.

    See http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#reference-names.

  108. val port: Parser[String]

    Permalink

    Parses a port as defined in RFC 3986, except for requiring at least one digit; instead the port is defined as optional in a higher level combinator.

    Parses a port as defined in RFC 3986, except for requiring at least one digit; instead the port is defined as optional in a higher level combinator.

    port = *DIGIT
    Definition Classes
    URIParsers
  109. def positioned[T <: Positional](p: ⇒ Parser[T]): Parser[T]

    Permalink
    Definition Classes
    RegexParsers → Parsers
  110. def prepareSpanParsers: Map[Char, Parser[Span]]

    Permalink

    A mapping of the start character of an inline element to the corresponding parser.

    A mapping of the start character of an inline element to the corresponding parser. The mapping is used to provide a fast implementation of an inline parser that only stops at known special characters.

    Attributes
    protected
    Definition Classes
    InlineParsersInlineParsers
  111. val query: Parser[String]

    Permalink

    Parses the query part of a URI as defined in RFC 3986.

    Parses the query part of a URI as defined in RFC 3986.

    query = *( pchar / "/" / "?" )
    Definition Classes
    URIParsers
  112. val refName: Parser[String]

    Permalink

    Parses a simple reference name that only allows alphanumerical characters and the punctuation characters -, _, ., :, +.

    Parses a simple reference name that only allows alphanumerical characters and the punctuation characters -, _, ., :, +.

    Definition Classes
    MarkupParsers
  113. val regName: Parser[String]

    Permalink

    Parses a server name as defined in RFC 3986.

    Parses a server name as defined in RFC 3986.

    reg-name = *( unreserved / pct-encoded / sub-delims )
    Definition Classes
    URIParsers
  114. implicit def regex(r: Regex): Parser[String]

    Permalink
    Definition Classes
    RegexParsers
  115. def rep[T](first: ⇒ Parser[T], next: (T) ⇒ Parser[T]): Parser[List[T]]

    Permalink

    A parser generator for repetitions where all subsequent parsers after the first depend on the result of the previous.

    A parser generator for repetitions where all subsequent parsers after the first depend on the result of the previous.

    first

    the parser to use for the first piece of input

    next

    a function that determines the next parser based on the result of the previous

    Definition Classes
    BaseParsers
  116. def rep[T](p: ⇒ Parser[T]): Parser[List[T]]

    Permalink
    Definition Classes
    Parsers
  117. def rep1[T](first: ⇒ Parser[T], p0: ⇒ Parser[T]): Parser[List[T]]

    Permalink
    Definition Classes
    Parsers
    Annotations
    @migration
    Migration

    (Changed in version 2.9.0) The p0 call-by-name arguments is evaluated at most once per constructed Parser object, instead of on every need that arises during parsing.

  118. def rep1[T](p: ⇒ Parser[T]): Parser[List[T]]

    Permalink
    Definition Classes
    Parsers
  119. def rep1sep[T](p: ⇒ Parser[T], q: ⇒ Parser[Any]): Parser[List[T]]

    Permalink
    Definition Classes
    Parsers
  120. def repMax[T](num: Int, p: ⇒ Parser[T]): Parser[List[T]]

    Permalink

    Uses the parser for at most the specified number of repetitions, always succeeds.

    Uses the parser for at most the specified number of repetitions, always succeeds. The result is the list of results from applying the parser repeatedly.

    Definition Classes
    BaseParsers
  121. def repMin[T](num: Int, p: ⇒ Parser[T]): Parser[List[T]]

    Permalink

    Uses the parser for at least the specified number of repetitions or otherwise fails.

    Uses the parser for at least the specified number of repetitions or otherwise fails. Continues to apply the parser after the minimum has been reached until if fails. The result is the list of results from applying the parser repeatedly.

    Definition Classes
    BaseParsers
  122. def repN[T](num: Int, p: ⇒ Parser[T]): Parser[List[T]]

    Permalink
    Definition Classes
    Parsers
  123. def repsep[T](p: ⇒ Parser[T], q: ⇒ Parser[Any]): Parser[List[T]]

    Permalink
    Definition Classes
    Parsers
  124. lazy val simpleLinkRef: Parser[Span]

    Permalink

    Parses a simple link reference.

  125. val simpleRefName: Parser[String]

    Permalink

    Parses a simple reference name that only allows alphanumerical characters and the punctuation characters -, _, ., :, +.

    Parses a simple reference name that only allows alphanumerical characters and the punctuation characters -, _, ., :, +.

    See http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#reference-names.

  126. def skipWhitespace: Boolean

    Permalink
    Definition Classes
    MarkupParsers → RegexParsers
  127. final lazy val spanParsers: Map[Char, Parser[Span]]

    Permalink

    The mapping of markup start characters to their corresponding span parsers.

    The mapping of markup start characters to their corresponding span parsers.

    A parser mapped to a start character is not required to successfully parse the subsequent input. If it fails the character that triggered the parser invocation will be treated as normal text. The mapping is merely used as a performance optimization. The parser will be invoked with the input offset pointing to the character after the one specified as the key for the mapping.

    Definition Classes
    InlineParsers
  128. def spans(parser: ⇒ TextParser, spanParsers: ⇒ Map[Char, Parser[Span]]): Parser[List[Span]]

    Permalink

    Parses a list of spans based on the specified helper parsers.

    Parses a list of spans based on the specified helper parsers.

    parser

    the parser for the text of the current span element

    returns

    the resulting parser

    Definition Classes
    InlineParsers
  129. lazy val strong: Parser[Strong]

    Permalink

    Parses a span of text with strong emphasis.

  130. val subDelims: TextParser

    Permalink

    Parses a single sub-delimiter as defined in RFC 3986.

    Parses a single sub-delimiter as defined in RFC 3986.

    sub-delims = "!" / "$" / "&" / "'" / "(" / ")"
                     / "*" / "+" / "," / ";" / "="
    Definition Classes
    URIParsers
  131. lazy val substitutionRef: Parser[Reference]

    Permalink

    Parses a substitution reference.

  132. def success[T](v: T): Parser[T]

    Permalink
    Definition Classes
    Parsers
  133. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  134. def text(parser: ⇒ TextParser, nested: ⇒ Map[Char, Parser[String]]): Parser[String]

    Permalink

    Parses text based on the specified helper parsers.

    Parses text based on the specified helper parsers.

    parser

    the parser for the text of the current element

    nested

    a mapping from the start character of a span to the corresponding parser for nested span elements

    returns

    the resulting parser

    Definition Classes
    InlineParsers
  135. val to: Parser[String]

    Permalink

    Parses a sequence of email addresses as defined in RFC 6068.

    Parses a sequence of email addresses as defined in RFC 6068.

    to = addr-spec *("," addr-spec )
    Definition Classes
    URIParsers
  136. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  137. val unreserved: Parser[String]

    Permalink

    Parses a single unreserved character as defined in RFC 3986.

    Parses a single unreserved character as defined in RFC 3986.

    sub-delims = "!" / "$" / "&" / "'" / "(" / ")"
                     / "*" / "+" / "," / ";" / "="
    Definition Classes
    URIParsers
  138. lazy val uri: Parser[(String, String, String)]

    Permalink

    Parses a standalone HTTP or HTTPS hyperlink (with no surrounding markup).

    Parses a standalone HTTP or HTTPS hyperlink (with no surrounding markup).

    See http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#standalone-hyperlinks

  139. val userInfo: Parser[String]

    Permalink

    Parses the user info portion of a URI as defined in RFC 3986.

    Parses the user info portion of a URI as defined in RFC 3986.

    userinfo = *( unreserved / pct-encoded / sub-delims / ":" )
    Definition Classes
    URIParsers
  140. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  143. val whiteSpace: Regex

    Permalink
    Attributes
    protected
    Definition Classes
    RegexParsers
  144. def ws: TextParser

    Permalink

    Parses horizontal whitespace (space and tab).

    Parses horizontal whitespace (space and tab). Always succeeds, consuming all whitespace found.

    Definition Classes
    MarkupParsers

Inherited from URIParsers

Inherited from parse.InlineParsers

Inherited from MarkupParsers

Inherited from BaseParsers

Inherited from RegexParsers

Inherited from Parsers

Inherited from AnyRef

Inherited from Any

Ungrouped