Exception thrown when parsing a text markup document or fragment fails.
Reader implementation that keeps the current nest level in case of recursive parsing of block-level elements.
Provides additional combinator methods to parsers via implicit conversion.
Represent a reference name.
Abstracts the internal process of building up the result of an inline parser.
ResultBuilder that produces a list of spans.
ResultBuilder that produces a String.
API for specifying further constraints on the parsers provided by this base trait.
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
Parses letters according to RFC 2234.
Parses letters according to RFC 2234.
ALPHA = %x41-5A / %x61-7A ; A-Z / a-z
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.
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.
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.
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.
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.
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.
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.
Succeeds at the start of the input.
Succeeds at the start of the input.
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 ]
Parses a blank line from the current input offset (which may not be at the start of the line).
Parses a blank line from the current input offset (which may not be at the start of the line). Fails for lines that contain any non-whitespace character. Does always produce an empty string as the result, discarding any whitespace characters found in the line.
Since it also succeeds at the end of the input
it should never be used in the form of (blankLine *)
or (blankLine +)
. Use
the blankLines
parser instead in these cases.
Parses one or more blanklines, producing a list of empty strings corresponding to the number of blank lines consumed.
Parses one or more blanklines, producing a list of empty strings corresponding to the number of blank lines consumed.
Parses a full block based on the specified helper parsers.
Parses a full block based on the specified helper parsers.
parser that recognizes the start of the first line of this block
parser that recognizes the start of subsequent lines that still belong to the same block
parser that recognizes whether a line after one or more blank lines still belongs to the same block
Retrieves the block directive with the specified name.
Retrieves the block directive with the specified name.
See laika.parse.rst.Directives for details on how to implement directives.
Parses a block-level directive.
Parses a block-level directive.
See http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#directives.
Builds a parser for a list of blocks based on the parser for a single block.
Builds a parser for a list of blocks based on the parser for a single block.
Overridden to add the processing required for cases where a block has influence on the parsing or processing of the subsequent block.
This includes checking each Paragraph for a double colon ending which turns the following block into a literal block as well as processing internal link targets and section headers.
the parser for a single block element
a parser for a list of blocks
Parses a block quote with an optional attribution.
Parses a block quote with an optional attribution.
See http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#block-quotes
Parses a bullet list with any of the supported bullet characters.
Parses a bullet list with any of the supported bullet characters.
See http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#bullet-lists.
Parses a caption (a single paragraph) and a legend (one or more blocks), both being optional.
Parses a caption (a single paragraph) and a legend (one or more blocks), both being optional.
the standard block parsers including all registered directives for recursive use
the input to parse
Right
in case of parser success and Left
in case of failure, to adjust to the Directive API
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.
Parses a citation.
Parses a citation.
See http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#citations.
Parses a citation reference.
Parses a citation reference.
See http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#citation-references.
Parses a comment.
Parses a comment.
See http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#comments.
The default text role to use when no role is specified in an interpreted text element.
The default text role to use when no role is specified in an interpreted text element.
Parses a definition list.
Parses a definition list.
See http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#definition-lists.
Parses digits according to RFC 2234.
Parses digits according to RFC 2234.
DIGIT = %x30-39; 0-9
Parses a doctest block.
Parses a doctest block. This is a feature which is very specific to the
world of Python where reStructuredText originates. Therefore the resulting
DoctestBlock
tree element is not part of the standard Laika tree model.
When this block type is used the corresponding special renderers must
be enabled (e.g. the ExtendedHTML
renderer for HTML).
See http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#doctest-blocks
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 "\"
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. "&" / "'" / "*" / "+" / "-" / "/" / "=" / "?" / "^" / "_" / "`" / "{" / "|" / "}" / "~"
Parses a span of emphasized text.
Parses a span of emphasized text.
See http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#emphasis
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
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.
Parses a full mailto URI as defined in RFC 6068.
Parses a full mailto URI as defined in RFC 6068.
mailtoURI = "mailto:" [ to ] [ hfields ]
Parses an enumerated list in any of the supported combinations of enumeration style and formatting.
Parses an enumerated list in any of the supported combinations of enumeration style and formatting.
See http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#enumerated-lists.
Succeeds at the end of the input.
Succeeds at the end of the input.
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.
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.
Adds support for escape sequences to the specified text parser.
Adds support for escape sequences to the specified text parser.
the parser to add support for escape sequences to
a parser for a text span that supports escape sequences
Parses a span of text until the specified character is seen (unless it is escaped), while also processing escaped characters, but no other nested spans.
Parses a span of text until the specified character 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.
the character that signals the end of the text span
a parser for a text span that supports escape sequences
Parses all types of explicit block items.
Parses all types of explicit block items.
See http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#explicit-markup-blocks.
Parses a field list.
Parses a field list.
See http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#field-lists.
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.
Parses a footnote.
Parses a footnote.
See http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#footnotes.
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.
Parses a footnote reference.
Parses a footnote reference.
See http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#footnote-references.
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 / "/" / "?" )
Parses a grid table.
Parses a grid table.
See http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#grid-tables.
Parses a section header with both overline and underline.
Parses a section header with both overline and underline.
See http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#sections.
Parses a section header with an underline, but no overline.
Parses a section header with an underline, but no overline.
See http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#sections.
Parses a hexadecimal value according to RFC 2234.
Parses a hexadecimal value according to RFC 2234.
HEXDIG = DIGIT / "A" / "B" / "C" / "D" / "E" / "F"
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 = "!" / "$" / "'" / "(" / ")" / "*" / "+" / "," / ";" / ":" / "@"
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
Parses a host as defined in RFC 3986.
Parses a host as defined in RFC 3986.
host = IP-literal / IPv4address / reg-name
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.
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 ]
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.
Parses a full block based on the specified helper parsers, expecting an indentation for all lines except the first.
Parses a full block based on the specified helper parsers, expecting an indentation for all lines except the first. The indentation may vary between the parts of the indented block, so that this parser only cuts off the minimum indentation shared by all lines, but each line must have at least the specified minimum indentation.
the minimum indentation that each line in this block must have
parser that recognizes the start of subsequent lines that still belong to the same block
indicates whether parsing should end on the first blank line
indicates whether the first line is expected to be indented, too
the maximum indentation that will get dropped from the start of each line of the result
a parser that produces an instance of IndentedBlock
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.
the element type produced by a single parser for a nested span
the type of the result this parser produces
a mapping from the start character of a span to the corresponding parser for nested span elements
responsible for building the final result of this parser based on the results of the helper parsers
the resulting parser
Parses an inline literal element.
Parses an inline literal element.
See http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#inline-literals.
Parses an inline internal link target.
Parses an inline internal link target.
See http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#inline-internal-targets
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
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
Parses an ip literal as defined in RFC 3986.
Parses an ip literal as defined in RFC 3986.
IP-literal = "[" ( IPv6address / IPvFuture ) "]"
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.
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
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 / ":" )
Parses a block of lines with line breaks preserved.
Parses a block of lines with line breaks preserved.
See http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#line-blocks.
Parses a link definition, either an internal, external or indirect link.
Parses a link definition, either an internal, external or indirect link.
See http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#hyperlink-targets.
Parses a literal block, either quoted or indented.
Parses a literal block, either quoted or indented.
Only used when the preceding block ends with a double colon (::
).
See http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#literal-blocks
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
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.
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.
the parser that recognizes the markup at the end of an inline element
a parser that produces the same result as the parser passed as an argument
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.
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.
a parser without a useful result, as it is only needed to verify it succeeds
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.
the parser that recognizes the markup at the start of an inline element
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.
a parser without a useful result, as it is only needed to verify it succeeds
The maximum level of block nesting.
The maximum level of block nesting. Some block types like lists and blockquotes contain nested blocks. To protect against malicious input or accidentally broken markup, the level of nesting is restricted.
Returns the current nest level from the specified input or 0 if it cannot be determined.
Returns the current nest level from the specified input or 0 if it cannot be determined.
The nest level is usually only used to prevent endless recursion of nested blocks.
Parses any kind of nested block supported by a concrete markup language.
Parses any kind of nested block supported by a concrete markup language.
Parses reStructuredText blocks, except for blocks that allow nesting of blocks.
Parses reStructuredText blocks, except for blocks that allow nesting of blocks. Only used in rare cases when the maximum nest level allowed had been reached
Returns an optimized, Array-based lookup function for the specified characters.
Returns an optimized, Array-based lookup function for the specified characters.
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.
Parses an option list.
Parses an option list.
See http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#option-lists.
Parses one path character as defined in RFC 3986.
Parses one path character as defined in RFC 3986.
pchar = unreserved / pct-encoded / sub-delims / ":" / "@"
Parses a single paragraph.
Parses a single paragraph. Everything between two blank lines that is not recognized as a special reStructuredText block type will be parsed as a regular paragraph.
Fully parses the input from the specified reader and returns the configuration and root element.
Fully parses the input from the specified reader and returns the configuration and root element.
Utility method to be used by custom parsers for directive argument or body.
Utility method to be used by custom parsers for directive argument or body.
It translates a Success
into a Right
and a NoSuccess
into a Left
.
Fully parses the input from the specified reader and returns the document tree.
Fully parses the input from the specified reader and returns the document tree. 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.
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.
the input to parse
a mapping from the start character of a span to the corresponding parser
the result of the parser in form of a list of spans
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.
the input to parse
the result of the parser in form of a list of spans
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.
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.
Parses all nested blocks inside the specified indented block.
Parses all nested blocks inside the specified indented block.
Parses all nested blocks for the specified input and nest level.
Parses all nested blocks for the specified input and nest level.
Delegates to the abstract nestedBlock
parser that sub-traits need to define.
The nest level is primarily used as a protection against malicious
input that forces endless recursion.
the input to parse
the level of nesting with 0 being the outermost level
the parser result as a list of blocks
Parses all nested blocks for the specified input and nest level.
Parses all nested blocks for the specified input and nest level.
Delegates to the abstract nestedBlock
parser that sub-traits need to define.
The nest level is primarily used as a protection against malicious
input that forces endless recursion.
the input to parse
the level of nesting with 0 being the outermost level
the parser result as a list of blocks
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
Parses a percent-encoded character as defined in RFC 3986.
Parses a percent-encoded character as defined in RFC 3986.
pct-encoded = "%" HEXDIG HEXDIG
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
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.
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
Extension hook for assembling the block parsers for a particular markup format.
Extension hook for assembling the block parsers for a particular markup format.
true if these are parsers for nested blocks, false if they are for top level blocks
a list of block parsers which later will be interpreted as choices in the specified order
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.
Parses punctuation characters as supported by transitions (rules) and overlines and underlines for header sections.
Parses punctuation characters as supported by transitions (rules) and overlines and underlines for header sections.
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 / "/" / "?" )
Parses a quoted block with nested blocks.
Parses a quoted block with nested blocks.
the standard block parsers including all registered directives for recursive use
the input to parse
Right
in case of parser success and Left
in case of failure, to adjust to the Directive API
Parses a reference name, either a simple or a phrase reference name.
Parses a reference name, either a simple or a phrase reference name.
See http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#reference-names.
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 )
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.
the parser to use for the first piece of input
a function that determines the next parser based on the result of the previous
(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.
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.
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.
Parses the rest of the line from the current input offset no matter whether it consist of whitespace only or some text.
Parses the rest of the line from the current input offset no matter whether it consist of whitespace only or some text. Does not include the eol character(s).
Parses a role directive.
Parses a role directive.
See http://docutils.sourceforge.net/docs/ref/rst/directives.html#custom-interpreted-text-roles.
Parses a full document, delegating most of the work to the topLevelBlock
parser.
Parses a full document, delegating most of the work to the topLevelBlock
parser.
Parses the short variant of an anonymous link definition
(that starts with
) instead of
.. :
Parses the short variant of an anonymous link definition
(that starts with
) instead of
.. :
See http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#anonymous-hyperlinks.
Parses a simple link reference.
Parses a simple link reference.
See http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#hyperlink-references
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.
Parses a simple table.
Parses a simple table.
See http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#simple-tables.
Retrieves the span directive with the specified name.
Retrieves the span directive with the specified name.
See laika.parse.rst.Directives for details on how to implement directives.
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.
Parses a list of spans based on the specified helper parsers.
Parses a list of spans based on the specified helper parsers.
the parser for the text of the current span element
the resulting parser
Parses all standard inline markup supported by reStructuredText
.
Parses all standard inline markup supported by reStructuredText
.
the standard inline parsers including all registered directives for recursive use
the input to parse
Right
in case of parser success and Left
in case of failure, to adjust to the Directive API
Parses a span of text with strong emphasis.
Parses a span of text with strong emphasis.
See http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#strong-emphasis
Parses a single sub-delimiter as defined in RFC 3986.
Parses a single sub-delimiter as defined in RFC 3986.
sub-delims = "!" / "$" / "&" / "'" / "(" / ")" / "*" / "+" / "," / ";" / "="
Parses a substitution definition.
Parses a substitution definition.
See http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#substitution-definitions.
Parses a substitution reference.
Parses a substitution reference.
See http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#substitution-references.
Parses one of the two table types supported by reStructuredText
.
Parses one of the two table types supported by reStructuredText
.
the standard block parsers including all registered directives for recursive use
the input to parse
Right
in case of parser success and Left
in case of failure, to adjust to the Directive API
Parses a target which might be a simple reference, a phrase reference or an uri.
Parses a target which might be a simple reference, a phrase reference or an uri.
the input to parse
Right
in case of parser success and Left
in case of failure, to adjust to the Directive API
Parses text based on the specified helper parsers.
Parses text based on the specified helper parsers.
the parser for the text of the current element
a mapping from the start character of a span to the corresponding parser for nested span elements
the resulting parser
Parses a single text line from the current input offset (which may not be at the start of the line.
Parses a single text line from the current input offset (which may not be at the start of the line. Fails for blank lines. Does not include the eol character(s).
Retrieves the text role with the specified name.
Retrieves the text role with the specified name.
See laika.parse.rst.TextRoles for details on how to implement text roles.
All the base text roles supported by this parser not including any custom roles specified within document markup.
All the base text roles supported by this parser not including any custom roles specified within document markup.
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 )
Parses any kind of top-level block supported by a concrete markup language.
Parses any kind of top-level block supported by a concrete markup language.
Parses a transition (rule).
Parses a transition (rule).
See http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#transitions.
Parses unicode values in various notations intertwined with normal text.
Parses unicode values in various notations intertwined with normal text.
the input to parse
Right
in case of parser success and Left
in case of failure, to adjust to the Directive API
Parses a single unreserved character as defined in RFC 3986.
Parses a single unreserved character as defined in RFC 3986.
sub-delims = "!" / "$" / "&" / "'" / "(" / ")" / "*" / "+" / "," / ";" / "="
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
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 / ":" )
Overrides the failure message to the specified parser.
Overrides the failure message to the specified parser.
Creates a new parser that produces a tuple containing the current nest level as well as the result from the specified parser.
Creates a new parser that produces a tuple containing the current nest level as well as the result from the specified parser.
The nest level is usually only used to prevent endless recursion of nested blocks.
Parses horizontal whitespace (space and tab).
Parses horizontal whitespace (space and tab). Always succeeds, consuming all whitespace found.
(Since version 2.10.0) lastNoSuccess was not thread-safe and will be removed in 2.11.0
(Since version 2.10.0) lastNoSuccess was not thread-safe and will be removed in 2.11.0
Defines the custom argument and body parsers for the standard directives. Most of these delegate to the default block or inline parsers for
reStructuredText
, but often do only except one specific block type likeTable
orQuotedBlock
whereas the default block parser usually accepts any of the blocks.