-
Notifications
You must be signed in to change notification settings - Fork 1
Home
Kare Morstol edited this page Jul 1, 2020
·
9 revisions
- Link: 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
wrapped
pattern, 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
first
pattern, if that fails it tries thesecond
pattern from the same position. -
Concat:
A pattern which first tries the
first
pattern, if that succeeds it continues with thesecond
pattern. -
NotPattern:
A pattern which only succeeds if the
wrapped
pattern fails. The next pattern will continue from wherewrapped
started. -
RepeatPattern:
Repeats the
wrapped
patternmin
times, then repeats it optionallymax-min
times. Or an unlimited number of times if max is nil. - Skip: Skips 0 or more elements until a match for the next patterns are 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
.
-
OneOfConvertible:
A type that
OneOf
can 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.
- •(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 the end of input, and consumes 1 element.
- alphanumeric
- digit
- letter
- lowercase
- newline
- punctuation
- symbol
- uppercase
- whitespace
- hexDigit
- ascii
- mathSymbol
- currencySymbol
Generated at 2020-08-23T12:56:49+0000 using swift-doc 1.0.0-beta.3.