Instance that allows to import all text parsers in isolation.
Usually it is more convenient to import laika.parse.api._ to get all parser builders with one import.
Attributes
- Companion
- trait
- Graph
-
- Supertypes
- Self type
-
TextParsers.type
Members list
Type members
Inherited classlikes
Attributes
- Inherited from:
- Parsers
- Supertypes
-
trait Producttrait Equalsclass RuntimeExceptionclass Exceptionclass Throwabletrait Serializableclass Objecttrait Matchableclass AnyShow all
Value members
Inherited methods
Consumes any number of consecutive occurrences that are not one of the specified characters. Always succeeds unless a minimum number of required matches is specified.
Consumes any number of consecutive occurrences that are not one of the specified characters. Always succeeds unless a minimum number of required matches is specified.
Attributes
- Inherited from:
- TextParsers
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 not one of the specified characters. Always succeeds unless a minimum number of required matches is specified.
Attributes
- Inherited from:
- TextParsers
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 consecutive occurrences of the specified characters. Always succeeds unless a minimum number of required matches is specified.
Attributes
- Inherited from:
- TextParsers
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 consecutive occurrences of the specified characters. Always succeeds unless a minimum number of required matches is specified.
Attributes
- Inherited from:
- TextParsers
Consumes any number of consecutive characters which satisfy the specified predicate. Always succeeds unless a minimum number of required matches is specified.
Consumes any number of consecutive characters which satisfy the specified predicate. Always succeeds unless a minimum number of required matches is specified.
Attributes
- Inherited from:
- TextParsers
A parser that succeeds if the specified parser succeeds and all input has been consumed.
A parser that succeeds if the specified parser succeeds and all input has been consumed.
Attributes
- Inherited from:
- Parsers
Consumes any number of consecutive characters until the specified delimiter parser succeeds on the input.
Consumes any number of consecutive characters until the specified delimiter parser succeeds on the input.
This constructor is limited to the sub-trait PrefixedParser
as only those can be optimized for an assertion that needs to be performed on each character. Most parsers for non-empty text implement this trait, e.g oneOf
, someOf
, delimiter
or the literal parsers for a character or string.
Attributes
- Inherited from:
- TextParsers
Consumes any number of consecutive characters until the specified string delimiter is encountered on the input string.
Consumes any number of consecutive characters until the specified string delimiter is encountered on the input string.
Attributes
- Inherited from:
- TextParsers
Consumes any number of consecutive characters until one of the specified characters is encountered on the input string.
Consumes any number of consecutive characters until one of the specified characters is encountered on the input string.
Attributes
- Inherited from:
- TextParsers
Consumes any number of consecutive characters until one of the specified characters is encountered on the input string.
Consumes any number of consecutive characters until one of the specified characters is encountered on the input string.
Attributes
- Inherited from:
- TextParsers
Creates a parser for a delimiter with an API that allows to specify predicates for the characters immediately preceding or following the delimiter, a common task in markup parsing.
Creates a parser for a delimiter with an API that allows to specify predicates for the characters immediately preceding or following the delimiter, a common task in markup parsing.
This specified underlying parser needs to implement the sub-trait PrefixedParser
as only those can be optimized for an assertion that needs to be performed on each character. Most parsers for non-empty text implement this trait, e.g oneOf
, someOf
, delimiter
or the literal parsers for a character or string.
Attributes
- Inherited from:
- TextParsers
Creates a parser for a delimiter based on a literal string with an API that allows to specify predicates for the characters immediately preceding or following the delimiter, a common task in markup parsing.
Creates a parser for a delimiter based on a literal string with an API that allows to specify predicates for the characters immediately preceding or following the delimiter, a common task in markup parsing.
Attributes
- Inherited from:
- TextParsers
Creates a parser for a delimiter based on the given set of delimiter characters with an API that allows to specify predicates for the characters immediately preceding or following the delimiter, a common task in markup parsing.
Creates a parser for a delimiter based on the given set of delimiter characters with an API that allows to specify predicates for the characters immediately preceding or following the delimiter, a common task in markup parsing.
Attributes
- Inherited from:
- TextParsers
A parser that always fails with the specified message.
Constructs a parser lazily, useful when breaking circles in recursive parsing.
Constructs a parser lazily, useful when breaking circles in recursive parsing.
Attributes
- Inherited from:
- Parsers
A parser that matches only the specified literal string.
A parser that matches only the specified literal string.
The method is implicit so that strings can automatically be lifted to their parsers.
Attributes
- Inherited from:
- TextParsers
Attempts to parse the specified literal value at the specified offset behind the current position. Never consumes any input.
Attempts to parse the specified literal value at the specified offset behind the current position. Never consumes any input.
Attributes
- Inherited from:
- Parsers
Applies the specified parser at the specified offset behind the current position. Never consumes any input.
Applies the specified parser at the specified offset behind the current position. Never consumes any input.
Attributes
- Inherited from:
- Parsers
Attempts to parse the specified literal value at the current position. Never consumes any input.
Attempts to parse the specified literal value at the current position. Never consumes any input.
Attributes
- Inherited from:
- Parsers
Applies the specified parser at the current position. Never consumes any input.
Applies the specified parser at the current position. Never consumes any input.
Attributes
- Inherited from:
- Parsers
Applies the specified parser at the specified offset behind the current position. Never consumes any input.
Applies the specified parser at the specified offset behind the current position. Never consumes any input.
Attributes
- Inherited from:
- Parsers
Verifies that the next character is one of those specified. Fails at the end of the input and does not consume any input or produce a result when it succeeds.
Verifies that the next character is one of those specified. Fails at the end of the input and does not consume any input or produce a result when it succeeds.
Attributes
- Inherited from:
- TextParsers
Verifies that the next character is one of those specified. Fails at the end of the input and does not consume any input or produce a result when it succeeds.
Verifies that the next character is one of those specified. Fails at the end of the input and does not consume any input or produce a result when it succeeds.
Attributes
- Inherited from:
- TextParsers
Verifies that the next character does not satisfy the specified predicate. Fails at the end of the input and does not consume any input or produce a result when it succeeds.
Verifies that the next character does not satisfy the specified predicate. Fails at the end of the input and does not consume any input or produce a result when it succeeds.
Attributes
- Inherited from:
- TextParsers
Verifies that the next character does not satisfy the specified predicate. Succeeds at the end of the input and does not consume any input or produce a result when it succeeds.
Verifies that the next character does not satisfy the specified predicate. Succeeds at the end of the input and does not consume any input or produce a result when it succeeds.
Attributes
- Inherited from:
- TextParsers
Verifies that the next character is not one of those specified. Succeeds at the end of the input and does not consume any input or produce a result when it succeeds.
Verifies that the next character is not one of those specified. Succeeds at the end of the input and does not consume any input or produce a result when it succeeds.
Attributes
- Inherited from:
- TextParsers
Verifies that the next character is not one of those specified. Succeeds at the end of the input and does not consume any input or produce a result when it succeeds.
Verifies that the next character is not one of those specified. Succeeds at the end of the input and does not consume any input or produce a result when it succeeds.
Attributes
- Inherited from:
- TextParsers
A parser that only succeeds if the parsing the specified literal value fails and vice versa, it never consumes any input.
A parser that only succeeds if the parsing the specified literal value fails and vice versa, it never consumes any input.
Attributes
- Inherited from:
- Parsers
A parser that only succeeds if the specified parser fails and vice versa, it never consumes any input.
A parser that only succeeds if the specified parser fails and vice versa, it never consumes any input.
Attributes
- Inherited from:
- Parsers
Consumes one character if it satisfies the specified predicate, fails otherwise.
Consumes one character if it satisfies the specified predicate, fails otherwise.
Attributes
- Inherited from:
- TextParsers
Consumes one character if it is not one of the specified characters.
Consumes one character if it is not one of the specified characters.
Attributes
- Inherited from:
- TextParsers
Consumes one character if it is not one of the specified characters.
Consumes one character if it is not one of the specified characters.
Attributes
- Inherited from:
- TextParsers
Consumes one character if it matches one of the specified characters, fails otherwise.
Consumes one character if it matches one of the specified characters, fails otherwise.
Attributes
- Inherited from:
- TextParsers
Consumes one character if it matches one of the specified characters, fails otherwise.
Consumes one character if it matches one of the specified characters, fails otherwise.
Attributes
- Inherited from:
- TextParsers
A parser for an optional literal string that always succeeds.
A parser for an optional literal string that always succeeds.
If the underlying parser succeeds this parser will contain its result as a Some
, if it fails this parser will succeed with a None
.
Attributes
- Inherited from:
- Parsers
A parser for an optional element that always succeeds.
A parser for an optional element that always succeeds.
If the underlying parser succeeds this parser will contain its result as a Some
, if it fails this parser will succeed with a None
.
Attributes
- Inherited from:
- Parsers
Verifies that the previous character is one of those specified. Fails at the start of the input and does not consume any input or produce a result when it succeeds.
Verifies that the previous character is one of those specified. Fails at the start of the input and does not consume any input or produce a result when it succeeds.
Attributes
- Inherited from:
- TextParsers
Verifies that the previous character is one of those specified. Fails at the start of the input and does not consume any input or produce a result when it succeeds.
Verifies that the previous character is one of those specified. Fails at the start of the input and does not consume any input or produce a result when it succeeds.
Attributes
- Inherited from:
- TextParsers
Verifies that the previous character satisfies the specified predicate. Fails at the start of the input and does not consume any input or produce a result when it succeeds.
Verifies that the previous character satisfies the specified predicate. Fails at the start of the input and does not consume any input or produce a result when it succeeds.
Attributes
- Inherited from:
- TextParsers
Verifies that the previous character does not satisfy the specified predicate. Succeeds at the start of the input and does not consume any input or produce a result when it succeeds.
Verifies that the previous character does not satisfy the specified predicate. Succeeds at the start of the input and does not consume any input or produce a result when it succeeds.
Attributes
- Inherited from:
- TextParsers
Verifies that the previous character is not one of those specified. Succeeds at the start of the input and does not consume any input or produce a result when it succeeds.
Verifies that the previous character is not one of those specified. Succeeds at the start of the input and does not consume any input or produce a result when it succeeds.
Attributes
- Inherited from:
- TextParsers
Verifies that the previous character is not one of those specified. Succeeds at the start of the input and does not consume any input or produce a result when it succeeds.
Verifies that the previous character is not one of those specified. Succeeds at the start of the input and does not consume any input or produce a result when it succeeds.
Attributes
- Inherited from:
- TextParsers
Creates a NonEmptySet from a Character range. This set can then be passed to parsers like anyOf
or oneOf
which expect a NonEmptySet as a parameter.
Creates a NonEmptySet from a Character range. This set can then be passed to parsers like anyOf
or oneOf
which expect a NonEmptySet as a parameter.
Attributes
- Inherited from:
- TextParsers
Consumes one or more characters that are not one of the specified characters, fails for empty results.
Consumes one or more characters that are not one of the specified characters, fails for empty results.
Attributes
- Inherited from:
- TextParsers
Consumes one or more characters that are not one of the specified characters, fails for empty results.
Consumes one or more characters that are not one of the specified characters, fails for empty results.
Attributes
- Inherited from:
- TextParsers
Consumes one or more characters if they match one of the specified characters, fails if the first character does not match.
Consumes one or more characters if they match one of the specified characters, fails if the first character does not match.
Attributes
- Inherited from:
- TextParsers
Consumes one or more characters if they match one of the specified characters, fails if the first character does not match.
Consumes one or more characters if they match one of the specified characters, fails if the first character does not match.
Attributes
- Inherited from:
- TextParsers
Consumes one or more characters which satisfy the specified predicate, fails for empty results.
Consumes one or more characters which satisfy the specified predicate, fails for empty results.
Attributes
- Inherited from:
- TextParsers
Inherited fields
Consumes any kind of input, always succeeds. This parser would consume the entire input unless a max
constraint is specified.
Consumes any kind of input, always succeeds. This parser would consume the entire input unless a max
constraint is specified.
Attributes
- Inherited from:
- TextParsers
Succeeds at the start of the input.
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.
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.
Attributes
- Inherited from:
- TextParsers
Parses one or more blank lines, producing a list of empty strings corresponding to the number of blank lines consumed.
Parses one or more blank lines, producing a list of empty strings corresponding to the number of blank lines consumed.
Attributes
- Inherited from:
- TextParsers
Succeeds at 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.
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.
Attributes
- Inherited from:
- TextParsers
Parses exactly one character from the input, fails only at the end of the input.
Parses exactly one character from the input, fails only at the end of the input.
Attributes
- Inherited from:
- TextParsers
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 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).
Attributes
- Inherited from:
- TextParsers
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).
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).
Attributes
- Inherited from:
- TextParsers
Parses horizontal whitespace (space and tab). Always succeeds, consuming all whitespace found.
Parses horizontal whitespace (space and tab). Always succeeds, consuming all whitespace found.
Attributes
- Inherited from:
- TextParsers
Parses any number of whitespace characters followed by a newline character.
Parses any number of whitespace characters followed by a newline character.
Attributes
- Inherited from:
- TextParsers