|
||||||||||
PREV NEXT | FRAMES NO FRAMES |
Packages that use Parser | |
---|---|
org.codehaus.jparsec | Provides core Parser implementations for parser combinator logic. |
org.codehaus.jparsec.misc | Provides optional convenience API built around core jparsec (Extra dependency on cglib is required). |
org.codehaus.jparsec.pattern | Provides Pattern implementations for use by character level scanners. |
Uses of Parser in org.codehaus.jparsec |
---|
Fields in org.codehaus.jparsec declared as Parser | |
---|---|
static Parser<Void> |
Scanners.ANY_CHAR
Matches any character in the input. |
static Parser<Object> |
Parsers.ANY_TOKEN
A Parser that consumes a token. |
static Parser<String> |
Scanners.DEC_INTEGER
Scanner for a decimal number. |
static Parser<Long> |
Terminals.LongLiteral.DEC_TOKENIZER
A tokenizer that parses a decimal integer number (valid patterns are: 1, 10, 123 ),
and converts the string to a Long value. |
static Parser<String> |
Scanners.DECIMAL
Scanner for a decimal number. |
static Parser<String> |
Scanners.DOUBLE_QUOTE_STRING
Scanner with a pattern for double quoted string literal. |
static Parser<String> |
Terminals.StringLiteral.DOUBLE_QUOTE_TOKENIZER
A tokenizer that parses double quoted string literal (escaped by '\' ),
and transforms the quoted content by applying escape characters. |
static Parser<?> |
Parsers.EOF
Parser that succeeds only if EOF is met. |
static Parser<Void> |
Scanners.HASKELL_BLOCK_COMMENT
Scanner for haskell style block comment. |
static Parser<Void> |
Scanners.HASKELL_DELIMITER
Scanner for the haskell style delimiter of tokens. |
static Parser<Void> |
Scanners.HASKELL_LINE_COMMENT
Scanner for haskell style line comment. |
static Parser<String> |
Scanners.HEX_INTEGER
Scanner for a hexadecimal number. |
static Parser<Long> |
Terminals.LongLiteral.HEX_TOKENIZER
A tokenizer that parses a hex integer number (valid patterns are: 0x1, 0Xff, 0xFe1 etc.), and converts the string to a Long value. |
static Parser<String> |
Scanners.IDENTIFIER
Scanner for a regular identifier, that starts with either an underscore or an alpha character, followed by 0 or more alphanumeric characters. |
static Parser<Integer> |
Parsers.INDEX
A Parser that retrieves the current index in the source. |
static Parser<String> |
Scanners.INTEGER
Scanner for an integer. |
static Parser<Void> |
Scanners.JAVA_BLOCK_COMMENT
Scanner for c++/java style block comment. |
static Parser<Void> |
Scanners.JAVA_DELIMITER
Scanner for the c++/java style delimiter of tokens. |
static Parser<Void> |
Scanners.JAVA_LINE_COMMENT
Scanner for c++/java style line comment. |
static Parser<String> |
Scanners.OCT_INTEGER
Scanner for a octal number. |
static Parser<Long> |
Terminals.LongLiteral.OCT_TOKENIZER
A tokenizer that parses a octal integer number (valid patterns are: 0, 07, 017, 0371 etc.), and converts the string to a Long value. |
static Parser<Character> |
Terminals.CharLiteral.PARSER
Parser that recognizes Character tokens. |
static Parser<String> |
Terminals.StringLiteral.PARSER
Parser that recognizes String tokens. |
static Parser<Long> |
Terminals.LongLiteral.PARSER
Parser that recognizes Long tokens. |
static Parser<String> |
Terminals.IntegerLiteral.PARSER
Parser that recognizes Tokens.Fragment tokens tagged as Tokens.Tag.INTEGER . |
static Parser<String> |
Terminals.DecimalLiteral.PARSER
Parser that recognizes Tokens.Fragment tokens tagged as Tokens.Tag.DECIMAL . |
static Parser<Tokens.ScientificNotation> |
Terminals.ScientificNumberLiteral.PARSER
Parser that recognies Tokens.ScientificNotation tokens. |
static Parser<String> |
Terminals.Identifier.PARSER
Parser that recognizes identifier tokens. |
static Parser<String> |
Terminals.RESERVED
Parser that recognizes reserved word tokens. |
static Parser<String> |
Scanners.SCIENTIFIC_NOTATION
Scanner for a scientific notation. |
static Parser<String> |
Scanners.SINGLE_QUOTE_CHAR
Scanner for a c/c++/java style character literal. |
static Parser<String> |
Scanners.SINGLE_QUOTE_STRING
Scanner with a pattern for SQL style string literal. |
static Parser<Character> |
Terminals.CharLiteral.SINGLE_QUOTE_TOKENIZER
A tokenizer that parses single quoted character literal (escaped by '\' ),
and then converts the character to a Character token. |
static Parser<String> |
Terminals.StringLiteral.SINGLE_QUOTE_TOKENIZER
A tokenizer that parses single quoted string literal (single quote is escaped with another single quote), and transforms the quoted content by applying escape characters. |
static Parser<Void> |
Scanners.SQL_BLOCK_COMMENT
Scanner for SQL style block comment. |
static Parser<Void> |
Scanners.SQL_DELIMITER
Scanner for the SQL style delimiter of tokens. |
static Parser<Void> |
Scanners.SQL_LINE_COMMENT
Scanner for SQL style line comment. |
static Parser<Long> |
Terminals.LongLiteral.TOKENIZER
A tokenizer that parses decimal, hex, and octal numbers and converts the string to a Long value. |
static Parser<Tokens.Fragment> |
Terminals.IntegerLiteral.TOKENIZER
A tokenizer that parses a integer number (valid patterns are: 0, 00, 1, 10 )
and returns a Tokens.Fragment token tagged as Tokens.Tag.INTEGER . |
static Parser<Tokens.Fragment> |
Terminals.DecimalLiteral.TOKENIZER
A tokenizer that parses a decimal number (valid patterns are: 1, 2.3, 00, 0., .23 )
and returns a Tokens.Fragment token tagged as Tokens.Tag.DECIMAL . |
static Parser<Tokens.ScientificNotation> |
Terminals.ScientificNumberLiteral.TOKENIZER
A tokenizer that parses a scientific notation and converts the string to a Tokens.ScientificNotation value. |
static Parser<Tokens.Fragment> |
Terminals.Identifier.TOKENIZER
A tokenizer that parses any identifier and returns a Tokens.Fragment token tagged as
Tokens.Tag.IDENTIFIER . |
static Parser<Void> |
Scanners.WHITESPACES
A scanner that scans greedily for 1 or more whitespace characters. |
static Parser<Void> |
Indentation.WHITESPACES
A Parser that recognizes 1 or more whitespace characters on the same line. |
Methods in org.codehaus.jparsec that return Parser | ||
---|---|---|
static
|
Parsers.always()
Parser that always succeeds. |
|
static Parser<Void> |
Scanners.among(String chars)
A scanner that succeeds and consumes the current character if it equals to any character in chars . |
|
static Parser<Void> |
Scanners.among(String chars,
String name)
Deprecated. Use Patterns.among(chars).toScanner(name) . |
|
static Parser<Object[]> |
Parsers.array(Parser<?>... parsers)
A Parser that sequentially runs parsers one by one and collects the return
values in an array. |
|
Parser<List<T>> |
Parser.atLeast(int min)
A Parser that runs this parser greedily for at least min times. |
|
Parser<T> |
Parser.atomic()
A Parser that undoes any partial match if this fails. |
|
Parser<T> |
Parser.between(Parser<?> before,
Parser<?> after)
A Parser that runs this between before and after . |
|
static
|
Parsers.between(Parser<?> before,
Parser<T> parser,
Parser<?> after)
Equivalent to between(Parser, Parser) . |
|
static Parser<Void> |
Scanners.blockComment(Parser<Void> begin,
Parser<Void> end,
Parser<?> commented)
A scanner for a non-nestable block comment that starts with begin and ends with
end . |
|
static Parser<Void> |
Scanners.blockComment(String begin,
String end)
A scanner for non-nested block comment that starts with begin and ends with
end . |
|
static Parser<Void> |
Scanners.blockComment(String begin,
String end,
Pattern commented)
A scanner for a non-nestable block comment that starts with begin and ends with
end . |
|
Parser<T> |
OperatorTable.build(Parser<? extends T> operand)
Builds a Parser based on information in this OperatorTable . |
|
|
Parser.cast()
Casts this to a Parser of type R . |
|
static
|
Parsers.constant(T v)
A Parser that always returns v regardless of input. |
|
Parser<List<T>> |
Parser.endBy(Parser<?> delim)
A Parser that runs this for 0 or more times delimited and terminated by delim . |
|
Parser<List<T>> |
Parser.endBy1(Parser<?> delim)
A Parser that runs this for 1 or more times delimited and terminated by delim . |
|
static
|
Parsers.expect(String name)
A Parser that fails and reports that name is logically expected. |
|
static
|
Parsers.fail(String message)
A Parser that always fails with message . |
|
Parser<Boolean> |
Parser.fails()
A Parser that returns true if this fails, false otherwise. |
|
Parser<T> |
Parser.followedBy(Parser<?> parser)
A Parser that sequentially executes this and then parser , whose return value is ignored. |
|
static Parser<String> |
Terminals.fragment(Object... tags)
Returns a Parser that recognizes Tokens.Fragment token values
tagged with one of tags . |
|
Parser<T> |
Parser.from(Parser<?> tokenizer,
Parser<Void> delim)
A Parser that takes as input the tokens returned by tokenizer delimited by
delim , and runs this to parse the tokens. |
|
Parser<T> |
Parser.from(Parser<? extends Collection<Token>> lexer)
A Parser that takes as input the Token collection returned by lexer ,
and runs this to parse the tokens. |
|
static Parser<String> |
Terminals.identifier()
Returns a Parser that recognizes identifiers (a.k.a words, variable names etc). |
|
|
Parser.ifelse(Map<? super T,? extends Parser<? extends R>> consequence,
Parser<? extends R> alternative)
A Parser that runs consequence if this succeeds, or alternative otherwise. |
|
|
Parser.ifelse(Parser<? extends R> consequence,
Parser<? extends R> alternative)
A Parser that runs consequence if this succeeds, or alternative otherwise. |
|
Parser<Token> |
Indentation.indent()
A Parser that recognizes the generated indent token. |
|
Parser<T> |
Parser.infixl(Parser<? extends Map2<? super T,? super T,? extends T>> op)
A Parser for left-associative infix operator. |
|
Parser<T> |
Parser.infixn(Parser<? extends Map2<? super T,? super T,? extends T>> op)
A Parser that parses non-associative infix operator. |
|
Parser<T> |
Parser.infixr(Parser<? extends Map2<? super T,? super T,? extends T>> op)
A Parser for right-associative infix operator. |
|
static Parser<Void> |
Scanners.isChar(char ch)
A scanner that succeeds and consumes the current character if it is equal to ch . |
|
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.isChar(char ch,
String name)
Deprecated. Use Scanners.isChar(char) instead
or use Patterns.isChar(ch).toScanner(name) . |
|
Parser<T> |
Parser.label(String name)
A Parser that reports reports an error about name expected, if this fails with no partial
match. |
|
Parser<T> |
Parser.Reference.lazy()
A Parser that delegates to the parser object referenced by this during parsing time. |
|
Parser<List<Token>> |
Parser.lexer(Parser<?> delim)
A Parser that greedily runs this repeatedly, and ignores the pattern recognized by delim
before and after each occurrence. |
|
Parser<List<Token>> |
Indentation.lexer(Parser<?> tokenizer,
Parser<?> delim)
A Parser that greedily runs tokenizer , and translates line feed characters
('\n' ) to indent and outdent tokens. |
|
static Parser<Void> |
Scanners.lineComment(String begin)
A scanner that succeeds and consumes all the characters until the '\n' character
if the current input starts with the string literal begin . |
|
static
|
Parsers.list(Iterable<? extends Parser<? extends T>> parsers)
A Parser that sequentially runs parsers one by one and collects the return
values in a List . |
|
static
|
Parsers.longer(Parser<? extends T> p1,
Parser<? extends T> p2)
A Parser that runs both p1 and p2 and selects the longer match. |
|
static
|
Parsers.longest(Iterable<? extends Parser<? extends T>> parsers)
A Parser that runs every element of parsers and selects the longest match. |
|
static
|
Parsers.longest(Parser<? extends T>... parsers)
A Parser that runs every element of parsers and selects the longest match. |
|
Parser<List<T>> |
Parser.many()
p.many() is equivalent to p* in EBNF. |
|
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.many(Pattern pattern,
String name)
Deprecated. Use pattern.many().toScanner(name) . |
|
Parser<List<T>> |
Parser.many1()
p.many1() is equivalent to p+ in EBNF. |
|
static Parser<Void> |
Scanners.many1(CharPredicate predicate)
A scanner that scans greedily for 1 or more characters that satisfies the given CharPredicate. |
|
static Parser<Void> |
Scanners.many1(Pattern pattern,
String name)
Deprecated. Use pattern.many1().toScanner(name) . |
|
|
Parser.map(Map<? super T,? extends R> map)
A Parser that runs this parser and transforms the return value using map . |
|
static Parser<Void> |
Scanners.nestableBlockComment(Parser<?> begin,
Parser<?> end,
Parser<?> commented)
A scanner for a nestable block comment that starts with begin and ends with
end . |
|
static Parser<Void> |
Scanners.nestableBlockComment(String begin,
String end)
A scanner for a nestable block comment that starts with begin and ends with
end . |
|
static Parser<Void> |
Scanners.nestableBlockComment(String begin,
String end,
Pattern commented)
A scanner for a nestable block comment that starts with begin and ends with
end . |
|
static Parser<Void> |
Scanners.nestedScanner(Parser<?> outer,
Parser<Void> inner)
A scanner that after character level outer succeeds,
subsequently feeds the recognized characters to inner for a nested scanning. |
|
static
|
Parsers.never()
Parser that always fails. |
|
|
Parser.next(Map<? super T,? extends Parser<? extends To>> map)
A Parser that executes this , maps the result using map to another Parser object
to be executed as the next step. |
|
|
Parser.next(Parser<R> parser)
A Parser that sequentially executes this and then parser . |
|
Parser<?> |
Parser.not()
A Parser that fails if this succeeds. |
|
Parser<?> |
Parser.not(String unexpected)
A Parser that fails if this succeeds. |
|
static Parser<Void> |
Scanners.notAmong(String chars)
A scanner that succeeds and consumes the current character if it is not equal to any character in chars . |
|
static Parser<Void> |
Scanners.notAmong(String chars,
String name)
Deprecated. Use Patterns.among(chars).not().toScanner(name) ,
or isChar(CharPredicates.notAmong(chars), name) . |
|
static Parser<Void> |
Scanners.notChar(char ch)
A scanner that succeeds and consumes the current character if it is not equal to ch . |
|
static Parser<Void> |
Scanners.notChar(char ch,
String name)
Deprecated. Use Scanners.notChar(char) . |
|
Parser<T> |
Parser.notFollowedBy(Parser<?> parser)
A Parser that succeeds if this succeeds and the pattern recognized by parser isn't
following. |
|
Parser<T> |
Parser.optional()
p.optional() is equivalent to p? in EBNF. |
|
Parser<T> |
Parser.optional(T defaultValue)
A Parser that returns defaultValue if this fails with no partial match. |
|
static
|
Parsers.or(Iterable<? extends Parser<? extends T>> alternatives)
A Parser that tries each alternative parser in alternatives . |
|
static
|
Parsers.or(Parser<? extends T>... alternatives)
A Parser that tries each alternative parser in alternatives . |
|
Parser<T> |
Parser.or(Parser<? extends T> alternative)
p1.or(p2) is equivalent to p1 | p2 in EBNF. |
|
static
|
Parsers.or(Parser<? extends T> p1,
Parser<? extends T> p2)
A Parser that tries 2 alternative parser objects. |
|
static
|
Parsers.or(Parser<? extends T> p1,
Parser<? extends T> p2,
Parser<? extends T> p3)
A Parser that tries 3 alternative parser objects. |
|
static
|
Parsers.or(Parser<? extends T> p1,
Parser<? extends T> p2,
Parser<? extends T> p3,
Parser<? extends T> p4)
A Parser that tries 4 alternative parser objects. |
|
static
|
Parsers.or(Parser<? extends T> p1,
Parser<? extends T> p2,
Parser<? extends T> p3,
Parser<? extends T> p4,
Parser<? extends T> p5)
A Parser that tries 5 alternative parser objects. |
|
static
|
Parsers.or(Parser<? extends T> p1,
Parser<? extends T> p2,
Parser<? extends T> p3,
Parser<? extends T> p4,
Parser<? extends T> p5,
Parser<? extends T> p6)
A Parser that tries 6 alternative parser objects. |
|
static
|
Parsers.or(Parser<? extends T> p1,
Parser<? extends T> p2,
Parser<? extends T> p3,
Parser<? extends T> p4,
Parser<? extends T> p5,
Parser<? extends T> p6,
Parser<? extends T> p7)
A Parser that tries 7 alternative parser objects. |
|
static
|
Parsers.or(Parser<? extends T> p1,
Parser<? extends T> p2,
Parser<? extends T> p3,
Parser<? extends T> p4,
Parser<? extends T> p5,
Parser<? extends T> p6,
Parser<? extends T> p7,
Parser<? extends T> p8)
A Parser that tries 8 alternative parser objects. |
|
static
|
Parsers.or(Parser<? extends T> p1,
Parser<? extends T> p2,
Parser<? extends T> p3,
Parser<? extends T> p4,
Parser<? extends T> p5,
Parser<? extends T> p6,
Parser<? extends T> p7,
Parser<? extends T> p8,
Parser<? extends T> p9)
A Parser that tries 9 alternative parser objects. |
|
Parser<Token> |
Indentation.outdent()
A Parser that recognizes the generated outdent token. |
|
static
|
Parsers.pair(Parser<? extends A> p1,
Parser<? extends B> p2)
A Parser that sequentially runs p1 and p2 and collects the results in a
Pair object. |
|
static Parser<Void> |
Scanners.pattern(Pattern pattern,
String name)
Deprecated. Use pattern.toScanner(name) . |
|
Parser<T> |
Parser.peek()
A Parser that runs this and undoes any input consumption if succeeds. |
|
Parser<T> |
Parser.postfix(Parser<? extends Map<? super T,? extends T>> op)
A Parser that runs this and then runs op for 0 or more times greedily. |
|
Parser<T> |
Parser.prefix(Parser<? extends Map<? super T,? extends T>> op)
A Parser that runs op for 0 or more times greedily, then runs this . |
|
static Parser<String> |
Scanners.quoted(char begin,
char end)
A scanner for a quoted string that starts with character begin and ends with character
end . |
|
static Parser<String> |
Scanners.quoted(Parser<Void> begin,
Parser<Void> end,
Parser<?> quoted)
Deprecated. Use Parsers.sequence(begin, quoted.skipMany(), end).source() . |
|
Parser<T> |
Parser.reluctantBetween(Parser<?> before,
Parser<?> after)
Deprecated. This method probably only works in the simplest cases. And it's a character-level parser only. Use it at your own risk. It may be deleted later when we find a better way. |
|
|
Parser.retn(R value)
A Parser that executes this , and returns value if succeeds. |
|
static Parser<?> |
Parsers.runnable(Runnable runnable)
Deprecated. |
|
Parser<List<T>> |
Parser.sepBy(Parser<?> delim)
A Parser that runs this 0 or more times separated by delim . |
|
Parser<List<T>> |
Parser.sepBy1(Parser<?> delim)
A Parser that runs this 1 or more times separated by delim . |
|
Parser<List<T>> |
Parser.sepEndBy(Parser<?> delim)
A Parser that runs this for 0 ore more times separated and optionally terminated by delim . |
|
Parser<List<T>> |
Parser.sepEndBy1(Parser<?> delim)
A Parser that runs this for 1 ore more times separated and optionally terminated by delim . |
|
static Parser<Object> |
Parsers.sequence(Iterable<? extends Parser<?>> parsers)
A Parser that runs parsers sequentially and discards the return values. |
|
static Parser<Object> |
Parsers.sequence(Parser<?>... parsers)
A Parser that runs parsers sequentially and discards the return values. |
|
static
|
Parsers.sequence(Parser<?> p1,
Parser<?> p2,
Parser<?> p3,
Parser<?> p4,
Parser<T> p5)
A Parser that runs 5 parser objects sequentially. |
|
static
|
Parsers.sequence(Parser<?> p1,
Parser<?> p2,
Parser<?> p3,
Parser<T> p4)
A Parser that runs 4 parser objects sequentially. |
|
static
|
Parsers.sequence(Parser<?> p1,
Parser<?> p2,
Parser<T> p3)
A Parser that runs 3 parser objects sequentially. |
|
static
|
Parsers.sequence(Parser<?> p1,
Parser<T> p2)
A Parser that runs 2 parser objects sequentially. |
|
static
|
Parsers.sequence(Parser<A> p1,
Parser<B> p2,
Map2<? super A,? super B,? extends T> map)
A Parser that runs p1 and p2 sequentially
and transforms the return values using map . |
|
static
|
Parsers.sequence(Parser<A> p1,
Parser<B> p2,
Parser<C> p3,
Map3<? super A,? super B,? super C,? extends T> map)
A Parser that runs 3 parser objects sequentially and transforms the return values
using map . |
|
static
|
Parsers.sequence(Parser<A> p1,
Parser<B> p2,
Parser<C> p3,
Parser<D> p4,
Map4<? super A,? super B,? super C,? super D,? extends T> map)
A Parser that runs 4 parser objects sequentially and transforms the return values
using map . |
|
static
|
Parsers.sequence(Parser<A> p1,
Parser<B> p2,
Parser<C> p3,
Parser<D> p4,
Parser<E> p5,
Map5<? super A,? super B,? super C,? super D,? super E,? extends T> map)
A Parser that runs 5 parser objects sequentially and transforms the return values
using map . |
|
static
|
Parsers.shorter(Parser<? extends T> p1,
Parser<? extends T> p2)
A Parser that runs both p1 and p2 and selects the shorter match. |
|
static
|
Parsers.shortest(Iterable<? extends Parser<? extends T>> parsers)
A Parser that runs every element of parsers and selects the shortest match. |
|
static
|
Parsers.shortest(Parser<? extends T>... parsers)
A Parser that runs every element of parsers and selects the shortest match. |
|
Parser<Void> |
Parser.skipAtLeast(int min)
A Parser that runs this parser greedily for at least min times and ignores the return
values. |
|
Parser<Void> |
Parser.skipMany()
p.skipMany() is equivalent to p* in EBNF. |
|
Parser<Void> |
Parser.skipMany1()
p.skipMany1() is equivalent to p+ in EBNF. |
|
Parser<Void> |
Parser.skipTimes(int n)
A Parser that sequentially runs this for n times and ignores the return values. |
|
Parser<Void> |
Parser.skipTimes(int min,
int max)
A Parser that runs this parser for at least min times and up to max times, with
all the return values ignored. |
|
Parser<String> |
Parser.source()
A Parser that returns the matched string in the original source. |
|
static Parser<Void> |
Scanners.string(String str)
Matches the input against the specified string. |
|
static Parser<Void> |
Scanners.string(String str,
String name)
Deprecated. Use Patterns.string(str).toScanner(name) . |
|
static Parser<Void> |
Scanners.stringCaseInsensitive(String str)
A scanner that matches the input against the specified string case insensitively. |
|
static Parser<Void> |
Scanners.stringCaseInsensitive(String str,
String name)
Deprecated. Use Patterns.stringCaseInsensitive(str).toScanner(name) . |
|
Parser<Boolean> |
Parser.succeeds()
A Parser that returns true if this succeeds, false otherwise. |
|
Parser<List<T>> |
Parser.times(int n)
A Parser that runs this for n times and collects the return values in a List . |
|
Parser<List<T>> |
Parser.times(int min,
int max)
A Parser that runs this parser for at least min times and up to max times. |
|
Parser<Token> |
Parser.token()
A Parser that runs this and wraps the return value in a Token . |
|
static
|
Parsers.token(TokenMap<? extends T> fromToken)
Checks the current token with the fromToken object. |
|
static
|
Parsers.tokenType(Class<? extends T> type,
String name)
Checks whether the current token value is of type , in which case, the token value is
returned and parse succeeds. |
|
static
|
Parsers.tuple(Parser<? extends A> p1,
Parser<? extends B> p2)
A Parser that sequentially runs p1 and p2 and collects the results in a
Pair object. |
|
static
|
Parsers.tuple(Parser<? extends A> p1,
Parser<? extends B> p2,
Parser<? extends C> p3)
A Parser that sequentially runs 3 parser objects and collects the results in a
Tuple3 object. |
|
static
|
Parsers.tuple(Parser<? extends A> p1,
Parser<? extends B> p2,
Parser<? extends C> p3,
Parser<? extends D> p4)
A Parser that sequentially runs 4 parser objects and collects the results in a
Tuple4 object. |
|
static
|
Parsers.tuple(Parser<? extends A> p1,
Parser<? extends B> p2,
Parser<? extends C> p3,
Parser<? extends D> p4,
Parser<? extends E> p5)
A Parser that sequentially runs 5 parser objects and collects the results in a
Tuple5 object. |
|
static
|
Parsers.unexpected(String name)
A Parser that fails and reports that name is logically unexpected. |
|
Parser<List<T>> |
Parser.until(Parser<?> parser)
A Parser that matches this parser zero or many times
until the given parser succeeds. |
|
Parser<WithSource<T>> |
Parser.withSource()
A Parser that returns both parsed object and matched string. |
Methods in org.codehaus.jparsec with parameters of type Parser | ||
---|---|---|
static Parser<Object[]> |
Parsers.array(Parser<?>... parsers)
A Parser that sequentially runs parsers one by one and collects the return
values in an array. |
|
Parser<T> |
Parser.between(Parser<?> before,
Parser<?> after)
A Parser that runs this between before and after . |
|
Parser<T> |
Parser.between(Parser<?> before,
Parser<?> after)
A Parser that runs this between before and after . |
|
static
|
Parsers.between(Parser<?> before,
Parser<T> parser,
Parser<?> after)
Equivalent to between(Parser, Parser) . |
|
static
|
Parsers.between(Parser<?> before,
Parser<T> parser,
Parser<?> after)
Equivalent to between(Parser, Parser) . |
|
static
|
Parsers.between(Parser<?> before,
Parser<T> parser,
Parser<?> after)
Equivalent to between(Parser, Parser) . |
|
static Parser<Void> |
Scanners.blockComment(Parser<Void> begin,
Parser<Void> end,
Parser<?> commented)
A scanner for a non-nestable block comment that starts with begin and ends with
end . |
|
static Parser<Void> |
Scanners.blockComment(Parser<Void> begin,
Parser<Void> end,
Parser<?> commented)
A scanner for a non-nestable block comment that starts with begin and ends with
end . |
|
static Parser<Void> |
Scanners.blockComment(Parser<Void> begin,
Parser<Void> end,
Parser<?> commented)
A scanner for a non-nestable block comment that starts with begin and ends with
end . |
|
Parser<T> |
OperatorTable.build(Parser<? extends T> operand)
Builds a Parser based on information in this OperatorTable . |
|
static Terminals |
Terminals.caseInsensitive(Parser<String> wordScanner,
String[] ops,
String[] keywords)
Deprecated. Use operators(ops)
.words(wordScanner)
.caseInsensitiveKeywords(keywords)
.build() instead. |
|
static Terminals |
Terminals.caseInsensitive(Parser<String> wordScanner,
String[] ops,
String[] keywords,
Map<String,?> wordMap)
Deprecated. Use operators(ops)
.words(wordScanner)
.tokenizeWordsWith(wordMap)
.caseInsensitiveKeywords(keywords)
.build() instead. |
|
static Terminals |
Terminals.caseSensitive(Parser<String> wordScanner,
String[] ops,
String[] keywords)
Deprecated. Use operators(ops)
.words(wordScanner)
.keywords(keywords)
.build() instead. |
|
static Terminals |
Terminals.caseSensitive(Parser<String> wordScanner,
String[] ops,
String[] keywords,
Map<String,?> wordMap)
Deprecated. Use operators(ops)
.words(wordScanner)
.tokenizeWordsWith(wordMap)
.keywords(keywords)
.build() instead. |
|
Parser<List<T>> |
Parser.endBy(Parser<?> delim)
A Parser that runs this for 0 or more times delimited and terminated by delim . |
|
Parser<List<T>> |
Parser.endBy1(Parser<?> delim)
A Parser that runs this for 1 or more times delimited and terminated by delim . |
|
Parser<T> |
Parser.followedBy(Parser<?> parser)
A Parser that sequentially executes this and then parser , whose return value is ignored. |
|
Parser<T> |
Parser.from(Parser<?> tokenizer,
Parser<Void> delim)
A Parser that takes as input the tokens returned by tokenizer delimited by
delim , and runs this to parse the tokens. |
|
Parser<T> |
Parser.from(Parser<?> tokenizer,
Parser<Void> delim)
A Parser that takes as input the tokens returned by tokenizer delimited by
delim , and runs this to parse the tokens. |
|
Parser<T> |
Parser.from(Parser<? extends Collection<Token>> lexer)
A Parser that takes as input the Token collection returned by lexer ,
and runs this to parse the tokens. |
|
|
Parser.ifelse(Map<? super T,? extends Parser<? extends R>> consequence,
Parser<? extends R> alternative)
A Parser that runs consequence if this succeeds, or alternative otherwise. |
|
|
Parser.ifelse(Parser<? extends R> consequence,
Parser<? extends R> alternative)
A Parser that runs consequence if this succeeds, or alternative otherwise. |
|
|
Parser.ifelse(Parser<? extends R> consequence,
Parser<? extends R> alternative)
A Parser that runs consequence if this succeeds, or alternative otherwise. |
|
Parser<T> |
Parser.infixl(Parser<? extends Map2<? super T,? super T,? extends T>> op)
A Parser for left-associative infix operator. |
|
OperatorTable<T> |
OperatorTable.infixl(Parser<? extends Map2<? super T,? super T,? extends T>> parser,
int precedence)
Adds an infix left-associative binary operator. |
|
Parser<T> |
Parser.infixn(Parser<? extends Map2<? super T,? super T,? extends T>> op)
A Parser that parses non-associative infix operator. |
|
OperatorTable<T> |
OperatorTable.infixn(Parser<? extends Map2<? super T,? super T,? extends T>> parser,
int precedence)
Adds an infix non-associative binary operator. |
|
Parser<T> |
Parser.infixr(Parser<? extends Map2<? super T,? super T,? extends T>> op)
A Parser for right-associative infix operator. |
|
OperatorTable<T> |
OperatorTable.infixr(Parser<? extends Map2<? super T,? super T,? extends T>> parser,
int precedence)
Adds an infix right-associative binary operator. |
|
Parser<List<Token>> |
Parser.lexer(Parser<?> delim)
A Parser that greedily runs this repeatedly, and ignores the pattern recognized by delim
before and after each occurrence. |
|
Parser<List<Token>> |
Indentation.lexer(Parser<?> tokenizer,
Parser<?> delim)
A Parser that greedily runs tokenizer , and translates line feed characters
('\n' ) to indent and outdent tokens. |
|
Parser<List<Token>> |
Indentation.lexer(Parser<?> tokenizer,
Parser<?> delim)
A Parser that greedily runs tokenizer , and translates line feed characters
('\n' ) to indent and outdent tokens. |
|
static
|
Parsers.longer(Parser<? extends T> p1,
Parser<? extends T> p2)
A Parser that runs both p1 and p2 and selects the longer match. |
|
static
|
Parsers.longer(Parser<? extends T> p1,
Parser<? extends T> p2)
A Parser that runs both p1 and p2 and selects the longer match. |
|
static
|
Parsers.longest(Parser<? extends T>... parsers)
A Parser that runs every element of parsers and selects the longest match. |
|
static Parser<Void> |
Scanners.nestableBlockComment(Parser<?> begin,
Parser<?> end,
Parser<?> commented)
A scanner for a nestable block comment that starts with begin and ends with
end . |
|
static Parser<Void> |
Scanners.nestableBlockComment(Parser<?> begin,
Parser<?> end,
Parser<?> commented)
A scanner for a nestable block comment that starts with begin and ends with
end . |
|
static Parser<Void> |
Scanners.nestableBlockComment(Parser<?> begin,
Parser<?> end,
Parser<?> commented)
A scanner for a nestable block comment that starts with begin and ends with
end . |
|
static Parser<Void> |
Scanners.nestedScanner(Parser<?> outer,
Parser<Void> inner)
A scanner that after character level outer succeeds,
subsequently feeds the recognized characters to inner for a nested scanning. |
|
static Parser<Void> |
Scanners.nestedScanner(Parser<?> outer,
Parser<Void> inner)
A scanner that after character level outer succeeds,
subsequently feeds the recognized characters to inner for a nested scanning. |
|
|
Parser.next(Parser<R> parser)
A Parser that sequentially executes this and then parser . |
|
Parser<T> |
Parser.notFollowedBy(Parser<?> parser)
A Parser that succeeds if this succeeds and the pattern recognized by parser isn't
following. |
|
static
|
Parsers.or(Parser<? extends T>... alternatives)
A Parser that tries each alternative parser in alternatives . |
|
Parser<T> |
Parser.or(Parser<? extends T> alternative)
p1.or(p2) is equivalent to p1 | p2 in EBNF. |
|
static
|
Parsers.or(Parser<? extends T> p1,
Parser<? extends T> p2)
A Parser that tries 2 alternative parser objects. |
|
static
|
Parsers.or(Parser<? extends T> p1,
Parser<? extends T> p2)
A Parser that tries 2 alternative parser objects. |
|
static
|
Parsers.or(Parser<? extends T> p1,
Parser<? extends T> p2,
Parser<? extends T> p3)
A Parser that tries 3 alternative parser objects. |
|
static
|
Parsers.or(Parser<? extends T> p1,
Parser<? extends T> p2,
Parser<? extends T> p3)
A Parser that tries 3 alternative parser objects. |
|
static
|
Parsers.or(Parser<? extends T> p1,
Parser<? extends T> p2,
Parser<? extends T> p3)
A Parser that tries 3 alternative parser objects. |
|
static
|
Parsers.or(Parser<? extends T> p1,
Parser<? extends T> p2,
Parser<? extends T> p3,
Parser<? extends T> p4)
A Parser that tries 4 alternative parser objects. |
|
static
|
Parsers.or(Parser<? extends T> p1,
Parser<? extends T> p2,
Parser<? extends T> p3,
Parser<? extends T> p4)
A Parser that tries 4 alternative parser objects. |
|
static
|
Parsers.or(Parser<? extends T> p1,
Parser<? extends T> p2,
Parser<? extends T> p3,
Parser<? extends T> p4)
A Parser that tries 4 alternative parser objects. |
|
static
|
Parsers.or(Parser<? extends T> p1,
Parser<? extends T> p2,
Parser<? extends T> p3,
Parser<? extends T> p4)
A Parser that tries 4 alternative parser objects. |
|
static
|
Parsers.or(Parser<? extends T> p1,
Parser<? extends T> p2,
Parser<? extends T> p3,
Parser<? extends T> p4,
Parser<? extends T> p5)
A Parser that tries 5 alternative parser objects. |
|
static
|
Parsers.or(Parser<? extends T> p1,
Parser<? extends T> p2,
Parser<? extends T> p3,
Parser<? extends T> p4,
Parser<? extends T> p5)
A Parser that tries 5 alternative parser objects. |
|
static
|
Parsers.or(Parser<? extends T> p1,
Parser<? extends T> p2,
Parser<? extends T> p3,
Parser<? extends T> p4,
Parser<? extends T> p5)
A Parser that tries 5 alternative parser objects. |
|
static
|
Parsers.or(Parser<? extends T> p1,
Parser<? extends T> p2,
Parser<? extends T> p3,
Parser<? extends T> p4,
Parser<? extends T> p5)
A Parser that tries 5 alternative parser objects. |
|
static
|
Parsers.or(Parser<? extends T> p1,
Parser<? extends T> p2,
Parser<? extends T> p3,
Parser<? extends T> p4,
Parser<? extends T> p5)
A Parser that tries 5 alternative parser objects. |
|
static
|
Parsers.or(Parser<? extends T> p1,
Parser<? extends T> p2,
Parser<? extends T> p3,
Parser<? extends T> p4,
Parser<? extends T> p5,
Parser<? extends T> p6)
A Parser that tries 6 alternative parser objects. |
|
static
|
Parsers.or(Parser<? extends T> p1,
Parser<? extends T> p2,
Parser<? extends T> p3,
Parser<? extends T> p4,
Parser<? extends T> p5,
Parser<? extends T> p6)
A Parser that tries 6 alternative parser objects. |
|
static
|
Parsers.or(Parser<? extends T> p1,
Parser<? extends T> p2,
Parser<? extends T> p3,
Parser<? extends T> p4,
Parser<? extends T> p5,
Parser<? extends T> p6)
A Parser that tries 6 alternative parser objects. |
|
static
|
Parsers.or(Parser<? extends T> p1,
Parser<? extends T> p2,
Parser<? extends T> p3,
Parser<? extends T> p4,
Parser<? extends T> p5,
Parser<? extends T> p6)
A Parser that tries 6 alternative parser objects. |
|
static
|
Parsers.or(Parser<? extends T> p1,
Parser<? extends T> p2,
Parser<? extends T> p3,
Parser<? extends T> p4,
Parser<? extends T> p5,
Parser<? extends T> p6)
A Parser that tries 6 alternative parser objects. |
|
static
|
Parsers.or(Parser<? extends T> p1,
Parser<? extends T> p2,
Parser<? extends T> p3,
Parser<? extends T> p4,
Parser<? extends T> p5,
Parser<? extends T> p6)
A Parser that tries 6 alternative parser objects. |
|
static
|
Parsers.or(Parser<? extends T> p1,
Parser<? extends T> p2,
Parser<? extends T> p3,
Parser<? extends T> p4,
Parser<? extends T> p5,
Parser<? extends T> p6,
Parser<? extends T> p7)
A Parser that tries 7 alternative parser objects. |
|
static
|
Parsers.or(Parser<? extends T> p1,
Parser<? extends T> p2,
Parser<? extends T> p3,
Parser<? extends T> p4,
Parser<? extends T> p5,
Parser<? extends T> p6,
Parser<? extends T> p7)
A Parser that tries 7 alternative parser objects. |
|
static
|
Parsers.or(Parser<? extends T> p1,
Parser<? extends T> p2,
Parser<? extends T> p3,
Parser<? extends T> p4,
Parser<? extends T> p5,
Parser<? extends T> p6,
Parser<? extends T> p7)
A Parser that tries 7 alternative parser objects. |
|
static
|
Parsers.or(Parser<? extends T> p1,
Parser<? extends T> p2,
Parser<? extends T> p3,
Parser<? extends T> p4,
Parser<? extends T> p5,
Parser<? extends T> p6,
Parser<? extends T> p7)
A Parser that tries 7 alternative parser objects. |
|
static
|
Parsers.or(Parser<? extends T> p1,
Parser<? extends T> p2,
Parser<? extends T> p3,
Parser<? extends T> p4,
Parser<? extends T> p5,
Parser<? extends T> p6,
Parser<? extends T> p7)
A Parser that tries 7 alternative parser objects. |
|
static
|
Parsers.or(Parser<? extends T> p1,
Parser<? extends T> p2,
Parser<? extends T> p3,
Parser<? extends T> p4,
Parser<? extends T> p5,
Parser<? extends T> p6,
Parser<? extends T> p7)
A Parser that tries 7 alternative parser objects. |
|
static
|
Parsers.or(Parser<? extends T> p1,
Parser<? extends T> p2,
Parser<? extends T> p3,
Parser<? extends T> p4,
Parser<? extends T> p5,
Parser<? extends T> p6,
Parser<? extends T> p7)
A Parser that tries 7 alternative parser objects. |
|
static
|
Parsers.or(Parser<? extends T> p1,
Parser<? extends T> p2,
Parser<? extends T> p3,
Parser<? extends T> p4,
Parser<? extends T> p5,
Parser<? extends T> p6,
Parser<? extends T> p7,
Parser<? extends T> p8)
A Parser that tries 8 alternative parser objects. |
|
static
|
Parsers.or(Parser<? extends T> p1,
Parser<? extends T> p2,
Parser<? extends T> p3,
Parser<? extends T> p4,
Parser<? extends T> p5,
Parser<? extends T> p6,
Parser<? extends T> p7,
Parser<? extends T> p8)
A Parser that tries 8 alternative parser objects. |
|
static
|
Parsers.or(Parser<? extends T> p1,
Parser<? extends T> p2,
Parser<? extends T> p3,
Parser<? extends T> p4,
Parser<? extends T> p5,
Parser<? extends T> p6,
Parser<? extends T> p7,
Parser<? extends T> p8)
A Parser that tries 8 alternative parser objects. |
|
static
|
Parsers.or(Parser<? extends T> p1,
Parser<? extends T> p2,
Parser<? extends T> p3,
Parser<? extends T> p4,
Parser<? extends T> p5,
Parser<? extends T> p6,
Parser<? extends T> p7,
Parser<? extends T> p8)
A Parser that tries 8 alternative parser objects. |
|
static
|
Parsers.or(Parser<? extends T> p1,
Parser<? extends T> p2,
Parser<? extends T> p3,
Parser<? extends T> p4,
Parser<? extends T> p5,
Parser<? extends T> p6,
Parser<? extends T> p7,
Parser<? extends T> p8)
A Parser that tries 8 alternative parser objects. |
|
static
|
Parsers.or(Parser<? extends T> p1,
Parser<? extends T> p2,
Parser<? extends T> p3,
Parser<? extends T> p4,
Parser<? extends T> p5,
Parser<? extends T> p6,
Parser<? extends T> p7,
Parser<? extends T> p8)
A Parser that tries 8 alternative parser objects. |
|
static
|
Parsers.or(Parser<? extends T> p1,
Parser<? extends T> p2,
Parser<? extends T> p3,
Parser<? extends T> p4,
Parser<? extends T> p5,
Parser<? extends T> p6,
Parser<? extends T> p7,
Parser<? extends T> p8)
A Parser that tries 8 alternative parser objects. |
|
static
|
Parsers.or(Parser<? extends T> p1,
Parser<? extends T> p2,
Parser<? extends T> p3,
Parser<? extends T> p4,
Parser<? extends T> p5,
Parser<? extends T> p6,
Parser<? extends T> p7,
Parser<? extends T> p8)
A Parser that tries 8 alternative parser objects. |
|
static
|
Parsers.or(Parser<? extends T> p1,
Parser<? extends T> p2,
Parser<? extends T> p3,
Parser<? extends T> p4,
Parser<? extends T> p5,
Parser<? extends T> p6,
Parser<? extends T> p7,
Parser<? extends T> p8,
Parser<? extends T> p9)
A Parser that tries 9 alternative parser objects. |
|
static
|
Parsers.or(Parser<? extends T> p1,
Parser<? extends T> p2,
Parser<? extends T> p3,
Parser<? extends T> p4,
Parser<? extends T> p5,
Parser<? extends T> p6,
Parser<? extends T> p7,
Parser<? extends T> p8,
Parser<? extends T> p9)
A Parser that tries 9 alternative parser objects. |
|
static
|
Parsers.or(Parser<? extends T> p1,
Parser<? extends T> p2,
Parser<? extends T> p3,
Parser<? extends T> p4,
Parser<? extends T> p5,
Parser<? extends T> p6,
Parser<? extends T> p7,
Parser<? extends T> p8,
Parser<? extends T> p9)
A Parser that tries 9 alternative parser objects. |
|
static
|
Parsers.or(Parser<? extends T> p1,
Parser<? extends T> p2,
Parser<? extends T> p3,
Parser<? extends T> p4,
Parser<? extends T> p5,
Parser<? extends T> p6,
Parser<? extends T> p7,
Parser<? extends T> p8,
Parser<? extends T> p9)
A Parser that tries 9 alternative parser objects. |
|
static
|
Parsers.or(Parser<? extends T> p1,
Parser<? extends T> p2,
Parser<? extends T> p3,
Parser<? extends T> p4,
Parser<? extends T> p5,
Parser<? extends T> p6,
Parser<? extends T> p7,
Parser<? extends T> p8,
Parser<? extends T> p9)
A Parser that tries 9 alternative parser objects. |
|
static
|
Parsers.or(Parser<? extends T> p1,
Parser<? extends T> p2,
Parser<? extends T> p3,
Parser<? extends T> p4,
Parser<? extends T> p5,
Parser<? extends T> p6,
Parser<? extends T> p7,
Parser<? extends T> p8,
Parser<? extends T> p9)
A Parser that tries 9 alternative parser objects. |
|
static
|
Parsers.or(Parser<? extends T> p1,
Parser<? extends T> p2,
Parser<? extends T> p3,
Parser<? extends T> p4,
Parser<? extends T> p5,
Parser<? extends T> p6,
Parser<? extends T> p7,
Parser<? extends T> p8,
Parser<? extends T> p9)
A Parser that tries 9 alternative parser objects. |
|
static
|
Parsers.or(Parser<? extends T> p1,
Parser<? extends T> p2,
Parser<? extends T> p3,
Parser<? extends T> p4,
Parser<? extends T> p5,
Parser<? extends T> p6,
Parser<? extends T> p7,
Parser<? extends T> p8,
Parser<? extends T> p9)
A Parser that tries 9 alternative parser objects. |
|
static
|
Parsers.or(Parser<? extends T> p1,
Parser<? extends T> p2,
Parser<? extends T> p3,
Parser<? extends T> p4,
Parser<? extends T> p5,
Parser<? extends T> p6,
Parser<? extends T> p7,
Parser<? extends T> p8,
Parser<? extends T> p9)
A Parser that tries 9 alternative parser objects. |
|
static
|
Parsers.pair(Parser<? extends A> p1,
Parser<? extends B> p2)
A Parser that sequentially runs p1 and p2 and collects the results in a
Pair object. |
|
static
|
Parsers.pair(Parser<? extends A> p1,
Parser<? extends B> p2)
A Parser that sequentially runs p1 and p2 and collects the results in a
Pair object. |
|
Parser<T> |
Parser.postfix(Parser<? extends Map<? super T,? extends T>> op)
A Parser that runs this and then runs op for 0 or more times greedily. |
|
OperatorTable<T> |
OperatorTable.postfix(Parser<? extends Map<? super T,? extends T>> parser,
int precedence)
Adds a postfix unary operator. |
|
Parser<T> |
Parser.prefix(Parser<? extends Map<? super T,? extends T>> op)
A Parser that runs op for 0 or more times greedily, then runs this . |
|
OperatorTable<T> |
OperatorTable.prefix(Parser<? extends Map<? super T,? extends T>> parser,
int precedence)
Adds a prefix unary operator. |
|
static Parser<String> |
Scanners.quoted(Parser<Void> begin,
Parser<Void> end,
Parser<?> quoted)
Deprecated. Use Parsers.sequence(begin, quoted.skipMany(), end).source() . |
|
static Parser<String> |
Scanners.quoted(Parser<Void> begin,
Parser<Void> end,
Parser<?> quoted)
Deprecated. Use Parsers.sequence(begin, quoted.skipMany(), end).source() . |
|
static Parser<String> |
Scanners.quoted(Parser<Void> begin,
Parser<Void> end,
Parser<?> quoted)
Deprecated. Use Parsers.sequence(begin, quoted.skipMany(), end).source() . |
|
Parser<T> |
Parser.reluctantBetween(Parser<?> before,
Parser<?> after)
Deprecated. This method probably only works in the simplest cases. And it's a character-level parser only. Use it at your own risk. It may be deleted later when we find a better way. |
|
Parser<T> |
Parser.reluctantBetween(Parser<?> before,
Parser<?> after)
Deprecated. This method probably only works in the simplest cases. And it's a character-level parser only. Use it at your own risk. It may be deleted later when we find a better way. |
|
Parser<List<T>> |
Parser.sepBy(Parser<?> delim)
A Parser that runs this 0 or more times separated by delim . |
|
Parser<List<T>> |
Parser.sepBy1(Parser<?> delim)
A Parser that runs this 1 or more times separated by delim . |
|
Parser<List<T>> |
Parser.sepEndBy(Parser<?> delim)
A Parser that runs this for 0 ore more times separated and optionally terminated by delim . |
|
Parser<List<T>> |
Parser.sepEndBy1(Parser<?> delim)
A Parser that runs this for 1 ore more times separated and optionally terminated by delim . |
|
static Parser<Object> |
Parsers.sequence(Parser<?>... parsers)
A Parser that runs parsers sequentially and discards the return values. |
|
static
|
Parsers.sequence(Parser<?> p1,
Parser<?> p2,
Parser<?> p3,
Parser<?> p4,
Parser<T> p5)
A Parser that runs 5 parser objects sequentially. |
|
static
|
Parsers.sequence(Parser<?> p1,
Parser<?> p2,
Parser<?> p3,
Parser<?> p4,
Parser<T> p5)
A Parser that runs 5 parser objects sequentially. |
|
static
|
Parsers.sequence(Parser<?> p1,
Parser<?> p2,
Parser<?> p3,
Parser<?> p4,
Parser<T> p5)
A Parser that runs 5 parser objects sequentially. |
|
static
|
Parsers.sequence(Parser<?> p1,
Parser<?> p2,
Parser<?> p3,
Parser<?> p4,
Parser<T> p5)
A Parser that runs 5 parser objects sequentially. |
|
static
|
Parsers.sequence(Parser<?> p1,
Parser<?> p2,
Parser<?> p3,
Parser<?> p4,
Parser<T> p5)
A Parser that runs 5 parser objects sequentially. |
|
static
|
Parsers.sequence(Parser<?> p1,
Parser<?> p2,
Parser<?> p3,
Parser<T> p4)
A Parser that runs 4 parser objects sequentially. |
|
static
|
Parsers.sequence(Parser<?> p1,
Parser<?> p2,
Parser<?> p3,
Parser<T> p4)
A Parser that runs 4 parser objects sequentially. |
|
static
|
Parsers.sequence(Parser<?> p1,
Parser<?> p2,
Parser<?> p3,
Parser<T> p4)
A Parser that runs 4 parser objects sequentially. |
|
static
|
Parsers.sequence(Parser<?> p1,
Parser<?> p2,
Parser<?> p3,
Parser<T> p4)
A Parser that runs 4 parser objects sequentially. |
|
static
|
Parsers.sequence(Parser<?> p1,
Parser<?> p2,
Parser<T> p3)
A Parser that runs 3 parser objects sequentially. |
|
static
|
Parsers.sequence(Parser<?> p1,
Parser<?> p2,
Parser<T> p3)
A Parser that runs 3 parser objects sequentially. |
|
static
|
Parsers.sequence(Parser<?> p1,
Parser<?> p2,
Parser<T> p3)
A Parser that runs 3 parser objects sequentially. |
|
static
|
Parsers.sequence(Parser<?> p1,
Parser<T> p2)
A Parser that runs 2 parser objects sequentially. |
|
static
|
Parsers.sequence(Parser<?> p1,
Parser<T> p2)
A Parser that runs 2 parser objects sequentially. |
|
static
|
Parsers.sequence(Parser<A> p1,
Parser<B> p2,
Map2<? super A,? super B,? extends T> map)
A Parser that runs p1 and p2 sequentially
and transforms the return values using map . |
|
static
|
Parsers.sequence(Parser<A> p1,
Parser<B> p2,
Map2<? super A,? super B,? extends T> map)
A Parser that runs p1 and p2 sequentially
and transforms the return values using map . |
|
static
|
Parsers.sequence(Parser<A> p1,
Parser<B> p2,
Parser<C> p3,
Map3<? super A,? super B,? super C,? extends T> map)
A Parser that runs 3 parser objects sequentially and transforms the return values
using map . |
|
static
|
Parsers.sequence(Parser<A> p1,
Parser<B> p2,
Parser<C> p3,
Map3<? super A,? super B,? super C,? extends T> map)
A Parser that runs 3 parser objects sequentially and transforms the return values
using map . |
|
static
|
Parsers.sequence(Parser<A> p1,
Parser<B> p2,
Parser<C> p3,
Map3<? super A,? super B,? super C,? extends T> map)
A Parser that runs 3 parser objects sequentially and transforms the return values
using map . |
|
static
|
Parsers.sequence(Parser<A> p1,
Parser<B> p2,
Parser<C> p3,
Parser<D> p4,
Map4<? super A,? super B,? super C,? super D,? extends T> map)
A Parser that runs 4 parser objects sequentially and transforms the return values
using map . |
|
static
|
Parsers.sequence(Parser<A> p1,
Parser<B> p2,
Parser<C> p3,
Parser<D> p4,
Map4<? super A,? super B,? super C,? super D,? extends T> map)
A Parser that runs 4 parser objects sequentially and transforms the return values
using map . |
|
static
|
Parsers.sequence(Parser<A> p1,
Parser<B> p2,
Parser<C> p3,
Parser<D> p4,
Map4<? super A,? super B,? super C,? super D,? extends T> map)
A Parser that runs 4 parser objects sequentially and transforms the return values
using map . |
|
static
|
Parsers.sequence(Parser<A> p1,
Parser<B> p2,
Parser<C> p3,
Parser<D> p4,
Map4<? super A,? super B,? super C,? super D,? extends T> map)
A Parser that runs 4 parser objects sequentially and transforms the return values
using map . |
|
static
|
Parsers.sequence(Parser<A> p1,
Parser<B> p2,
Parser<C> p3,
Parser<D> p4,
Parser<E> p5,
Map5<? super A,? super B,? super C,? super D,? super E,? extends T> map)
A Parser that runs 5 parser objects sequentially and transforms the return values
using map . |
|
static
|
Parsers.sequence(Parser<A> p1,
Parser<B> p2,
Parser<C> p3,
Parser<D> p4,
Parser<E> p5,
Map5<? super A,? super B,? super C,? super D,? super E,? extends T> map)
A Parser that runs 5 parser objects sequentially and transforms the return values
using map . |
|
static
|
Parsers.sequence(Parser<A> p1,
Parser<B> p2,
Parser<C> p3,
Parser<D> p4,
Parser<E> p5,
Map5<? super A,? super B,? super C,? super D,? super E,? extends T> map)
A Parser that runs 5 parser objects sequentially and transforms the return values
using map . |
|
static
|
Parsers.sequence(Parser<A> p1,
Parser<B> p2,
Parser<C> p3,
Parser<D> p4,
Parser<E> p5,
Map5<? super A,? super B,? super C,? super D,? super E,? extends T> map)
A Parser that runs 5 parser objects sequentially and transforms the return values
using map . |
|
static
|
Parsers.sequence(Parser<A> p1,
Parser<B> p2,
Parser<C> p3,
Parser<D> p4,
Parser<E> p5,
Map5<? super A,? super B,? super C,? super D,? super E,? extends T> map)
A Parser that runs 5 parser objects sequentially and transforms the return values
using map . |
|
static
|
Parsers.shorter(Parser<? extends T> p1,
Parser<? extends T> p2)
A Parser that runs both p1 and p2 and selects the shorter match. |
|
static
|
Parsers.shorter(Parser<? extends T> p1,
Parser<? extends T> p2)
A Parser that runs both p1 and p2 and selects the shorter match. |
|
static
|
Parsers.shortest(Parser<? extends T>... parsers)
A Parser that runs every element of parsers and selects the shortest match. |
|
static
|
Parsers.tuple(Parser<? extends A> p1,
Parser<? extends B> p2)
A Parser that sequentially runs p1 and p2 and collects the results in a
Pair object. |
|
static
|
Parsers.tuple(Parser<? extends A> p1,
Parser<? extends B> p2)
A Parser that sequentially runs p1 and p2 and collects the results in a
Pair object. |
|
static
|
Parsers.tuple(Parser<? extends A> p1,
Parser<? extends B> p2,
Parser<? extends C> p3)
A Parser that sequentially runs 3 parser objects and collects the results in a
Tuple3 object. |
|
static
|
Parsers.tuple(Parser<? extends A> p1,
Parser<? extends B> p2,
Parser<? extends C> p3)
A Parser that sequentially runs 3 parser objects and collects the results in a
Tuple3 object. |
|
static
|
Parsers.tuple(Parser<? extends A> p1,
Parser<? extends B> p2,
Parser<? extends C> p3)
A Parser that sequentially runs 3 parser objects and collects the results in a
Tuple3 object. |
|
static
|
Parsers.tuple(Parser<? extends A> p1,
Parser<? extends B> p2,
Parser<? extends C> p3,
Parser<? extends D> p4)
A Parser that sequentially runs 4 parser objects and collects the results in a
Tuple4 object. |
|
static
|
Parsers.tuple(Parser<? extends A> p1,
Parser<? extends B> p2,
Parser<? extends C> p3,
Parser<? extends D> p4)
A Parser that sequentially runs 4 parser objects and collects the results in a
Tuple4 object. |
|
static
|
Parsers.tuple(Parser<? extends A> p1,
Parser<? extends B> p2,
Parser<? extends C> p3,
Parser<? extends D> p4)
A Parser that sequentially runs 4 parser objects and collects the results in a
Tuple4 object. |
|
static
|
Parsers.tuple(Parser<? extends A> p1,
Parser<? extends B> p2,
Parser<? extends C> p3,
Parser<? extends D> p4)
A Parser that sequentially runs 4 parser objects and collects the results in a
Tuple4 object. |
|
static
|
Parsers.tuple(Parser<? extends A> p1,
Parser<? extends B> p2,
Parser<? extends C> p3,
Parser<? extends D> p4,
Parser<? extends E> p5)
A Parser that sequentially runs 5 parser objects and collects the results in a
Tuple5 object. |
|
static
|
Parsers.tuple(Parser<? extends A> p1,
Parser<? extends B> p2,
Parser<? extends C> p3,
Parser<? extends D> p4,
Parser<? extends E> p5)
A Parser that sequentially runs 5 parser objects and collects the results in a
Tuple5 object. |
|
static
|
Parsers.tuple(Parser<? extends A> p1,
Parser<? extends B> p2,
Parser<? extends C> p3,
Parser<? extends D> p4,
Parser<? extends E> p5)
A Parser that sequentially runs 5 parser objects and collects the results in a
Tuple5 object. |
|
static
|
Parsers.tuple(Parser<? extends A> p1,
Parser<? extends B> p2,
Parser<? extends C> p3,
Parser<? extends D> p4,
Parser<? extends E> p5)
A Parser that sequentially runs 5 parser objects and collects the results in a
Tuple5 object. |
|
static
|
Parsers.tuple(Parser<? extends A> p1,
Parser<? extends B> p2,
Parser<? extends C> p3,
Parser<? extends D> p4,
Parser<? extends E> p5)
A Parser that sequentially runs 5 parser objects and collects the results in a
Tuple5 object. |
|
Parser<List<T>> |
Parser.until(Parser<?> parser)
A Parser that matches this parser zero or many times
until the given parser succeeds. |
|
Terminals.Builder |
Terminals.words(Parser<String> wordScanner)
Starts to build a new Terminals instance that recognizes words not already recognized
by this Terminals instance (typically operators). |
Method parameters in org.codehaus.jparsec with type arguments of type Parser | ||
---|---|---|
|
Parser.ifelse(Map<? super T,? extends Parser<? extends R>> consequence,
Parser<? extends R> alternative)
A Parser that runs consequence if this succeeds, or alternative otherwise. |
|
static
|
Parsers.list(Iterable<? extends Parser<? extends T>> parsers)
A Parser that sequentially runs parsers one by one and collects the return
values in a List . |
|
static
|
Parsers.longest(Iterable<? extends Parser<? extends T>> parsers)
A Parser that runs every element of parsers and selects the longest match. |
|
|
Parser.next(Map<? super T,? extends Parser<? extends To>> map)
A Parser that executes this , maps the result using map to another Parser object
to be executed as the next step. |
|
static
|
Parsers.or(Iterable<? extends Parser<? extends T>> alternatives)
A Parser that tries each alternative parser in alternatives . |
|
static Parser<Object> |
Parsers.sequence(Iterable<? extends Parser<?>> parsers)
A Parser that runs parsers sequentially and discards the return values. |
|
static
|
Parsers.shortest(Iterable<? extends Parser<? extends T>> parsers)
A Parser that runs every element of parsers and selects the shortest match. |
Uses of Parser in org.codehaus.jparsec.misc |
---|
Methods in org.codehaus.jparsec.misc that return Parser | |
---|---|
static Parser<?> |
Mapper._(Parser<?> parser)
Wraps parser so that it will be skipped when applied in Mapper.sequence(Parser[]) ,
Mapper.prefix(Parser[]) or Mapper.postfix(Parser[]) . |
Parser<Binary<T>> |
Mapper.binary()
A Parser that returns a Binary instance that invokes the underlying
map method or curried constructor with the two parameters of the
Map2.map(Object, Object) method. |
Parser<Binary<T>> |
Mapper.infix(Parser<?>... operator)
A Parser that runs operator sequentially and returns a Binary instance,
which will pass along its first parameter, followed by the return values of operator ,
followed by its second parameter to the underlying map method or curried constructor. |
Parser<Binary<T>> |
Mapper.infix(Parser<?> operator)
A Parser that runs operator and returns a Binary instance,
which will pass along its first parameter, followed by the return value of operator ,
followed by its second parameter to the underlying map method or curried constructor. |
Parser<Unary<T>> |
Mapper.postfix(Parser<?>... operator)
A Parser that runs operator sequentially and returns a Unary instance,
which will pass along its only parameter followed by the return values of operator
to the underlying map method or curried constructor. |
Parser<Unary<T>> |
Mapper.postfix(Parser<?> operator)
A Parser that runs operator and returns a Unary instance,
which will pass along its only parameter followed by the return value of operator
to the underlying map method or curried constructor. |
Parser<Unary<T>> |
Mapper.prefix(Parser<?>... operator)
A Parser that runs operator sequentially and returns a Unary instance,
which will pass along the return values of operator followed by its only parameter
to the underlying map method or curried constructor. |
Parser<Unary<T>> |
Mapper.prefix(Parser<?> operator)
A Parser that runs operator and returns a Unary instance,
which will pass along the return value of operator followed by its only parameter
to the underlying map method or curried constructor. |
Parser<T> |
Mapper.sequence(Parser<?>... parsers)
A Parser that sequentially runs parsers and invokes the underlying
map method or curried constructor using the returned values. |
Parser<Unary<T>> |
Mapper.unary()
A Parser that returns a Unary instance that invokes the underlying
map method or curried constructor with the only parameter of the
Map.map(Object) method. |
Methods in org.codehaus.jparsec.misc with parameters of type Parser | |
---|---|
static Parser<?> |
Mapper._(Parser<?> parser)
Wraps parser so that it will be skipped when applied in Mapper.sequence(Parser[]) ,
Mapper.prefix(Parser[]) or Mapper.postfix(Parser[]) . |
Parser<Binary<T>> |
Mapper.infix(Parser<?>... operator)
A Parser that runs operator sequentially and returns a Binary instance,
which will pass along its first parameter, followed by the return values of operator ,
followed by its second parameter to the underlying map method or curried constructor. |
Parser<Binary<T>> |
Mapper.infix(Parser<?> operator)
A Parser that runs operator and returns a Binary instance,
which will pass along its first parameter, followed by the return value of operator ,
followed by its second parameter to the underlying map method or curried constructor. |
Parser<Unary<T>> |
Mapper.postfix(Parser<?>... operator)
A Parser that runs operator sequentially and returns a Unary instance,
which will pass along its only parameter followed by the return values of operator
to the underlying map method or curried constructor. |
Parser<Unary<T>> |
Mapper.postfix(Parser<?> operator)
A Parser that runs operator and returns a Unary instance,
which will pass along its only parameter followed by the return value of operator
to the underlying map method or curried constructor. |
Parser<Unary<T>> |
Mapper.prefix(Parser<?>... operator)
A Parser that runs operator sequentially and returns a Unary instance,
which will pass along the return values of operator followed by its only parameter
to the underlying map method or curried constructor. |
Parser<Unary<T>> |
Mapper.prefix(Parser<?> operator)
A Parser that runs operator and returns a Unary instance,
which will pass along the return value of operator followed by its only parameter
to the underlying map method or curried constructor. |
Parser<T> |
Mapper.sequence(Parser<?>... parsers)
A Parser that sequentially runs parsers and invokes the underlying
map method or curried constructor using the returned values. |
Uses of Parser in org.codehaus.jparsec.pattern |
---|
Methods in org.codehaus.jparsec.pattern that return Parser | |
---|---|
Parser<Void> |
Pattern.toScanner(String name)
Returns a scanner parser using this pattern. |
|
||||||||||
PREV NEXT | FRAMES NO FRAMES |