Uses of Class
com.google.common.labs.parse.Parser.OrEmpty
Packages that use Parser.OrEmpty
Package
Description
Parser combinator that's free from infinite loop or accidental left recursion
-
Uses of Parser.OrEmpty in com.google.common.labs.parse
Methods in com.google.common.labs.parse that return Parser.OrEmptyModifier and TypeMethodDescriptionParser.OrEmpty.delimitedBy
(String delimiter) The current optional parser repeated and delimited bydelimiter
.Parser.OrEmpty.delimitedBy
(String delimiter, Collector<? super T, ?, R> collector) The current optional parser repeated and delimited bydelimiter
.Parser.OrEmpty.followedBy
(Parser<S>.OrEmpty suffix) The current optional (or zero-or-more) parser may optionally be followed bysuffix
.Specifies that the optional (or zero-or-more)rule
should be matched literally even ifparseSkipping()
orparseToStreamSkipping()
is called.Parser.optional()
Starts a fluent chain for matching the current parser optionally.Starts a fluent chain for matching the current parser optionally.Parser.sequence
(Parser<A>.OrEmpty left, Parser<B>.OrEmpty right, BiFunction<? super A, ? super B, ? extends C> combiner) Sequentially matchesleft
thenright
, with both allowed to be optional, and then combines the results using thecombiner
function.After matching the current optional (or zero-or-more) parser, proceed to matchsuffix
.Parser.zeroOrMore()
Starts a fluent chain for matching the current parser zero or more times.Parser.zeroOrMore
(CharPredicate charsToMatch, String name) Starts a fluent chain for matching consecutivecharsToMatch
zero or more times.Parser.zeroOrMore
(Collector<? super T, A, ? extends R> collector) Starts a fluent chain for matching the current parser zero or more times.Parser.zeroOrMoreDelimitedBy
(String delimiter) Starts a fluent chain for matching the current parser zero or more times, delimited bydelimiter
.Parser.zeroOrMoreDelimitedBy
(String delimiter, Collector<? super T, A, ? extends R> collector) Starts a fluent chain for matching the current parser zero or more times, delimited bydelimiter
.Methods in com.google.common.labs.parse with parameters of type Parser.OrEmptyModifier and TypeMethodDescriptionParser.followedBy
(Parser<X>.OrEmpty suffix) If this parser matches, continue to match the optionalsuffix
.Parser.OrEmpty.followedBy
(Parser<S>.OrEmpty suffix) The current optional (or zero-or-more) parser may optionally be followed bysuffix
.Specifies that the optional (or zero-or-more)rule
should be matched literally even ifparseSkipping()
orparseToStreamSkipping()
is called.Parser.sequence
(Parser<A>.OrEmpty left, Parser<B>.OrEmpty right, BiFunction<? super A, ? super B, ? extends C> combiner) Sequentially matchesleft
thenright
, with both allowed to be optional, and then combines the results using thecombiner
function.static <A,
B, C> Parser <C> Parser.sequence
(Parser<A> left, Parser<B>.OrEmpty right, BiFunction<? super A, ? super B, ? extends C> combiner) Sequentially matchesleft
thenright
(which is allowed to be optional), and then combines the results using thecombiner
function.After matching the current optional (or zero-or-more) parser, proceed to matchsuffix
.final <R> Parser
<R> If this parser matches, applies the given optional (or zero-or-more) parser on the remaining input.