-
Notifications
You must be signed in to change notification settings - Fork 1
Home
kareman edited this page Aug 23, 2020
·
9 revisions
- Line: Matches one line, not including newline characters.
- Line.Start: Matches the start of a line, including the start of input.
- Line.End: Matches the end of a line, including the end of input.
- Literal: Matches a sequence of elements.
- OneOf: Matches and consumes a single element.
- Word
- Word.Boundary: Detects boundaries between words.
- Parser.Match.MatchDecoder
- Grammar: Allows for recursive patterns, also indirectly.
- Grammar.CallPattern: Calls another subpattern in a grammar.
-
AndPattern:
A pattern which matches the
wrappedpattern, without consuming any input. - AnyPattern: A type erased wrapper around a pattern. Can be used to store patterns in arrays and non-generic variables.
- AnyPattern.StringInterpolation
- Capture: Captures the current position as a range.
- NoPattern: A pattern that does absolutely nothing.
-
OrPattern:
A pattern which first tries the
firstpattern, if that fails it tries thesecondpattern from the same position. -
Concat:
A pattern which first tries the
firstpattern, if that succeeds it continues with thesecondpattern. -
NotPattern:
A pattern which only succeeds if the
wrappedpattern fails. The next pattern will continue from wherewrappedstarted. -
RepeatPattern:
Repeats the
wrappedpatternmintimes, then repeats it optionallymax-mintimes. Or an unlimited number of times if max is nil. - Skip: Skips 0 or more elements until a match for the next patterns is found.
- Parser: Takes a pattern, optimises it and tries to match it over an input.
- Parser.PatternError: Indicates a problem with a malformed pattern.
- Parser.Match: Contains information about a patterns successfully completed match.
-
Instruction:
The instructions used by patterns in
createInstructions.
- CharacterLike
-
OneOfConvertible:
A type that
OneOfcan use. - Pattern: Something that can create Instructions for the Parser.
- RegexConvertible: A pattern that can be converted to regex.
- •(lhs:rhs:)
- •(lhs:rhs:)
- •(lhs:rhs:)
- •(lhs:rhs:)
- /(lhs:rhs:)
- /(lhs:rhs:)
-
<-(call:pattern:):
Used by grammars to define subpatterns with
g.a <- .... -
<-(call:capture:):
In case of
g.name <- Capture(...), names the nameless Capture "name". - /(p1:p2:): First tries the pattern to the left, if that fails it tries the pattern to the right from the same position.
- /(p1:p2:): First tries the pattern to the left, if that fails it tries the pattern to the right from the same position.
- /(p1:p2:): First tries the pattern to the left, if that fails it tries the pattern to the right from the same position.
- /(p1:p2:): First tries the pattern to the left, if that fails it tries the pattern to the right from the same position.
- /(p1:p2:): First tries the pattern to the left, if that fails it tries the pattern to the right from the same position.
- •(lhs:rhs:): First tries the pattern to the left, if that succeeds it tries the pattern to the right.
- •(lhs:rhs:): First tries the pattern to the left, if that succeeds it tries the pattern to the right.
- •(lhs:rhs:): First tries the pattern to the left, if that succeeds it tries the pattern to the right.
- •(lhs:rhs:): First tries the pattern to the left, if that succeeds it tries the pattern to the right.
- !(pattern:): Will only succeed if the following pattern fails. Does not consume any input.
- !(pattern:): Will only succeed if the following pattern fails. Does not consume any input.
- *(me:): Repeats the preceding pattern 0 or more times.
- *(me:): Repeats the preceding pattern 0 or more times.
- +(me:): Repeats the preceding pattern 1 or more times.
- +(me:): Repeats the preceding pattern 1 or more times.
- ¿(me:): Tries the preceding pattern, and continues even if it fails.
- ¿(me:): Tries the preceding pattern, and continues even if it fails.
- any: Succeeds anywhere except for at the end of input, and consumes 1 element.
-
letter:
Matches one character representing a letter, i.e. where
Character.isLetteristrue. -
lowercase:
Matches one character representing a lowercase character, i.e. where
Character.isLowercaseistrue. -
uppercase:
Matches one character representing an uppercase character, i.e. where
Character.isUppercaseistrue. -
digit:
Matches one character representing a whole number, i.e. where
Character.isWholeNumberistrue. - alphanumeric: Matches one letter or one digit.
-
newline:
Matches one character representing a newline, i.e. where
Character.isNewlineistrue. -
whitespace:
Matches one character representing whitespace (including newlines), i.e. where
Character.isWhitespaceistrue. -
punctuation:
Matches one character representing punctuation, i.e. where
Character.isPunctuationistrue. -
symbol:
Matches one character representing a symbol, i.e. where
Character.isSymbolistrue. -
hexDigit:
Matches one character representing a hexadecimal digit, i.e. where
Character.isHexDigitistrue. -
ascii:
Matches one ASCII character, i.e. where
Character.isASCIIistrue. -
mathSymbol:
Matches one character representing a mathematical symbol, i.e. where
Character.isMathSymbolistrue. -
currencySymbol:
Matches one character representing a currency symbol, i.e. where
Character.isCurrencySymbolistrue.
Generated at 2020-08-23T12:56:49+0000 using swift-doc 1.0.0-beta.3.