Package | Description |
---|---|
org.jparsec |
Provides core Parser implementations for parser combinator logic.
|
org.jparsec.pattern |
Provides Pattern implementations for use by character level scanners.
|
Modifier and Type | Method and Description |
---|---|
static Parser<Void> |
Scanners.isChar(CharPredicate predicate)
A scanner that succeeds and consumes the current character if it satisfies the given
CharPredicate . |
static Parser<Void> |
Scanners.isChar(CharPredicate predicate,
String name)
Deprecated.
Implement
Object.toString() in the CharPredicate ,
or use Patterns.isChar(predicate).toScanner(name) . |
static Parser<Void> |
Scanners.many(CharPredicate predicate)
A scanner that scans greedily for 0 or more characters that satisfies the given CharPredicate.
|
static Parser<Void> |
Scanners.many1(CharPredicate predicate)
A scanner that scans greedily for 1 or more characters that satisfies the given CharPredicate.
|
Modifier and Type | Field and Description |
---|---|
static CharPredicate |
CharPredicates.ALWAYS
A
CharPredicate that always returns true. |
static CharPredicate |
CharPredicates.IS_ALPHA
A
CharPredicate that returns true if the character is an alpha character. |
static CharPredicate |
CharPredicates.IS_ALPHA_
A
CharPredicate that returns true if it is an alpha character or the underscore
character _ . |
static CharPredicate |
CharPredicates.IS_ALPHA_NUMERIC
A
CharPredicate that returns true if it is an alphanumeric character, or an
underscore character. |
static CharPredicate |
CharPredicates.IS_ALPHA_NUMERIC_
A
CharPredicate that returns true if it is an alphanumeric character, or an
underscore character. |
static CharPredicate |
CharPredicates.IS_DIGIT
A
CharPredicate that returns true if the character is a digit. |
static CharPredicate |
CharPredicates.IS_HEX_DIGIT
A
CharPredicate that returns true if the character is a digit or within the range
of [a-f] or [A-F] . |
static CharPredicate |
CharPredicates.IS_LETTER
A
CharPredicate that returns true if Character.isLetter(char) returns
true. |
static CharPredicate |
CharPredicates.IS_LOWER_CASE
A
CharPredicate that returns true if Character.isLowerCase(char) returns
true. |
static CharPredicate |
CharPredicates.IS_UPPER_CASE
A
CharPredicate that returns true if Character.isUpperCase(char) returns
true. |
static CharPredicate |
CharPredicates.IS_WHITESPACE
A
CharPredicate that returns true if Character.isWhitespace(char)
returns true. |
static CharPredicate |
CharPredicates.NEVER
A
CharPredicate that always returns false. |
Modifier and Type | Method and Description |
---|---|
static CharPredicate |
CharPredicates.among(String chars)
A
CharPredicate that returns true if the character is equal to any character in
chars . |
static CharPredicate |
CharPredicates.and(CharPredicate... predicates)
|
static CharPredicate |
CharPredicates.and(CharPredicate predicate1,
CharPredicate predicate2)
|
static CharPredicate |
CharPredicates.isChar(char c)
A
CharPredicate that returns true if the character is equal to c . |
static CharPredicate |
CharPredicates.not(CharPredicate predicate)
A
CharPredicate that returns true if predicate evaluates to false. |
static CharPredicate |
CharPredicates.notAmong(String chars)
A
CharPredicate that returns true if the character is not equal to any character
in chars . |
static CharPredicate |
CharPredicates.notChar(char c)
A
CharPredicate that returns true if the character is not equal to c . |
static CharPredicate |
CharPredicates.notRange(char a,
char b)
A
CharPredicate that returns true if the character is not within the range of
[a, b] . |
static CharPredicate |
CharPredicates.or(CharPredicate... predicates)
|
static CharPredicate |
CharPredicates.or(CharPredicate predicate1,
CharPredicate predicate2)
|
static CharPredicate |
CharPredicates.range(char a,
char b)
A
CharPredicate that returns true if the character is within the range of
[a, b] . |
Modifier and Type | Method and Description |
---|---|
static CharPredicate |
CharPredicates.and(CharPredicate... predicates)
|
static CharPredicate |
CharPredicates.and(CharPredicate predicate1,
CharPredicate predicate2)
|
static Pattern |
Patterns.atLeast(int min,
CharPredicate predicate)
Returns a
Pattern object that matches if the input starts with min or more characters and all
satisfy predicate . |
static Pattern |
Patterns.atMost(int max,
CharPredicate predicate)
|
static Pattern |
Patterns.isChar(CharPredicate predicate)
Returns a
Pattern object that matches if the current character in the input satisfies predicate , in
which case 1 is returned as match length. |
static Pattern |
Patterns.many(CharPredicate predicate)
Returns a
Pattern that matches 0 or more characters satisfying predicate . |
static Pattern |
Patterns.many(int min,
CharPredicate predicate)
Deprecated.
Use
Patterns.atLeast(int, CharPredicate) instead. |
static Pattern |
Patterns.many1(CharPredicate predicate)
Returns a
Pattern that matches 1 or more characters satisfying predicate . |
static CharPredicate |
CharPredicates.not(CharPredicate predicate)
A
CharPredicate that returns true if predicate evaluates to false. |
static CharPredicate |
CharPredicates.or(CharPredicate... predicates)
|
static CharPredicate |
CharPredicates.or(CharPredicate predicate1,
CharPredicate predicate2)
|
static Pattern |
Patterns.repeat(int n,
CharPredicate predicate)
Returns a
Pattern object that matches if the input has at least n characters and the first n characters all satisfy predicate . |
static Pattern |
Patterns.some(int max,
CharPredicate predicate)
Deprecated.
Use
Patterns.atMost(int, CharPredicate) instead. |
static Pattern |
Patterns.some(int min,
int max,
CharPredicate predicate)
Deprecated.
Use
Patterns.times(int, int, CharPredicate) instead. |
static Pattern |
Patterns.times(int min,
int max,
CharPredicate predicate)
Returns a
Pattern that matches at least min and up to max number of characters satisfying
predicate , |
Copyright © 2013–2016 jparsec. All rights reserved.