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 (requires dot-parse artifact)
-
Uses of Parser.OrEmpty in com.google.common.labs.parse
Methods in com.google.common.labs.parse that return Parser.OrEmptyModifier and TypeMethodDescriptionThe current parser enclosed betweenprefixandsuffix, both allowed to be empty.Parser.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)ruleshould be matched literally even ifparseSkipping()orskipping()is called.Parser.optional()Starts a fluent chain for matching the current parser optionally.Parser.OrEmpty.optionallyFollowedBy(String suffix) The current optional (or zero-or-more) parser may optionally be followed bysuffix.Matches ifthisorthatmatches.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 matchesleftthenright, with both allowed to be optional, and then combines the results using thecombinerfunction.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 consecutivecharsToMatchzero 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.zeroOrMoreDelimited(Parser<A> first, Parser<B>.OrEmpty second, String delimiter, BiCollector<? super A, ? super B, R> collector) Appliesfirstand the optionalsecondpattern in order, for zero or more times, collecting the results using the providedBiCollector.Parser.zeroOrMoreDelimited(Parser<A> first, Parser<B> second, String delimiter, BiCollector<? super A, ? super B, R> collector) Appliesfirstandsecondpatterns in order, for zero or more times, collecting the results using the providedBiCollector.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 TypeMethodDescriptionReturns a parser that matchesthispattern enclosed betweenprefixandsuffix, both allowed to be empty.The current parser enclosed betweenprefixandsuffix, both allowed to be empty.Parser.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)ruleshould be matched literally even ifparseSkipping()orskipping()is called.Matches ifthisorthatmatches.Parser.sequence(Parser<A>.OrEmpty left, Parser<B>.OrEmpty right, BiFunction<? super A, ? super B, ? extends C> combiner) Sequentially matchesleftthenright, with both allowed to be optional, and then combines the results using thecombinerfunction.static <A,B, C> Parser <C> Parser.sequence(Parser<A> left, Parser<B>.OrEmpty right, BiFunction<? super A, ? super B, ? extends C> combiner) Sequentially matchesleftthenright(which is allowed to be optional), and then combines the results using thecombinerfunction.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.Parser.zeroOrMoreDelimited(Parser<A> first, Parser<B>.OrEmpty second, String delimiter, BiCollector<? super A, ? super B, R> collector) Appliesfirstand the optionalsecondpattern in order, for zero or more times, collecting the results using the providedBiCollector.