Uses of Class
org.jparsec.pattern.Pattern
Packages that use Pattern
Package
Description
Provides core Parser implementations for parser combinator logic.
Provides Pattern implementations for use by character level scanners.
-
Uses of Pattern in org.jparsec
Fields in org.jparsec declared as PatternModifier and TypeFieldDescription(package private) static final PatternIndentation.INLINE_WHITESPACESAPatternobject that matches one or more whitespace characters or line continuations, where the line feed character ('\n') is escaped by the backslash character ('\').(package private) static final PatternIndentation.LINE_CONTINUATIONAPatternobject that matches a line continuation.Methods in org.jparsec that return PatternModifier and TypeMethodDescriptionprivate static PatternScanners.escapedChar(char escape) private static PatternScanners.notChar2(char c1, char c2) Matches a character if the input has at least 1 character, or if the input has at least 2 characters with the first 2 characters not beingc1andc2.Methods in org.jparsec with parameters of type PatternModifier and TypeMethodDescriptionScanners.blockComment(String begin, String end, Pattern commented) A scanner for a non-nestable block comment that starts withbeginand ends withend.Deprecated.Deprecated.Usepattern.many1().toScanner(name).Scanners.nestableBlockComment(String begin, String end, Pattern commented) A scanner for a nestable block comment that starts withbeginand ends withend.Deprecated.Usepattern.toScanner(name). -
Uses of Pattern in org.jparsec.examples.java.parser
Fields in org.jparsec.examples.java.parser declared as PatternModifier and TypeFieldDescriptionstatic final PatternJavaScanners.DEC_INTEGER_PATTERNAPatternobject that matches a decimal integer, which is either '0' or starts with a non-zero digit and is followed by 0 or more digits.static final PatternJavaScanners.OCT_INTEGER_PATTERNAPatternobject that matches an octal integer that starts with a0and is followed by 1 or more[0 - 7]characters. -
Uses of Pattern in org.jparsec.pattern
Subclasses of Pattern in org.jparsec.patternModifier and TypeClassDescription(package private) class(package private) class(package private) class(package private) class(package private) class(package private) class(package private) class(package private) class(package private) class(package private) classFields in org.jparsec.pattern declared as PatternModifier and TypeFieldDescriptionstatic final PatternPatterns.ALWAYSAPatternthat always matches with match length0.static final PatternPatterns.ANY_CHARAPatternthat matches any character and only mismatches for an empty string.static final PatternPatterns.DEC_INTEGERAPatternobject that matches a decimal integer, which starts with a non-zero digit and is followed by 0 or more digits.static final PatternPatterns.DECIMALAPatternobject that matches a decimal number that could start with a decimal point or a digit.static final PatternPatterns.EOFAPatternobject that matches if the input has no character left.static final PatternPatterns.ESCAPEDAPatternobject that succeeds with match length2if there are at least 2 characters in the input and the first character is'\'.static final PatternPatterns.FRACTIONAPatternobject that matches a decimal point and one or more digits after it.static final PatternPatterns.HEX_INTEGERAPatternobject that matches a hex integer, which starts with a0xor0X, and is followed by one or more hex digits.static final PatternPatterns.INTEGERAPatternobject that matches an integer.static final PatternPatterns.NEVERstatic final PatternPatterns.OCT_INTEGERAPatternobject that matches an octal integer that starts with a0and is followed by 0 or more[0 - 7]characters.private final PatternLowerBoundedPattern.patternprivate final PatternManyPattern.patternprivate final PatternOptionalPattern.patternprivate final PatternRepeatPattern.patternprivate final PatternUpperBoundedPattern.patternprivate final Pattern[]OrPattern.patternsprivate final Pattern[]SequencePattern.patternsprivate final PatternNotPattern.ppprivate final PatternPeekPattern.ppstatic final PatternPatterns.REGEXP_MODIFIERSAPatternobject that matches regular expression modifiers, which is a list of alpha characters.static final PatternPatterns.REGEXP_PATTERNAPatternobject that matches any regular expression pattern string in the form of/some pattern here/.static final PatternPatterns.SCIENTIFIC_NOTATIONstatic final PatternPatterns.STRICT_DECIMALAPatternobject that matches a decimal number that has at least one digit before the decimal point.static final PatternPatterns.WORDAPatternobject that matches a standard english word, which starts with either an underscore or an alpha character, followed by 0 or more alphanumeric characters.Methods in org.jparsec.pattern that return PatternModifier and TypeMethodDescriptionstatic PatternReturns aPatternobject that matches if the current character in the input is equal to any character inchars, in which case1is returned as match length.static PatternReturns aPatternthat matches if all ofpatternsmatches, in which case, the maximum match length is returned.final PatternPattern.atLeast(int min) ReturnsPatternobject that matches this pattern for at leastmintimes.static PatternPatterns.atLeast(int min, CharPredicate predicate) Returns aPatternobject that matches if the input starts withminor more characters and all satisfypredicate.final PatternPattern.atMost(int max) ReturnsPatternobject that matches this pattern for up tomaxtimes.static PatternPatterns.atMost(int max, CharPredicate predicate) private static PatternPatterns.getModifiersPattern()private static PatternPatterns.getRegularExpressionPattern()static PatternPatterns.hasAtLeast(int n) Returns aPatternobject that matches if the input has at leastncharacters left.static PatternPatterns.hasExact(int n) Returns aPatternobject that matches if the input has exactlyncharacters left.final PatternReturnsPatternobject that, if this pattern matches, matches the remaining input againstconsequencepattern, or otherwise matches againstalternativepattern.private static Patternstatic PatternPatterns.isChar(char c) Returns aPatternobject that matches if the current character in the input is equal to characterc, in which case1is returned as match length.static PatternPatterns.isChar(CharPredicate predicate) Returns aPatternobject that matches if the current character in the input satisfiespredicate, in which case1is returned as match length.static PatternPatterns.lineComment(String begin) Returns aPatternobject that matches a line comment started bybeginand ended byEOForLF(the line feed character).static Patternstatic PatternReturns aPatternthat tries all ofpatterns, and picks the one with the longest match length.final PatternPattern.many()Returns aPatternobject that matches this pattern for 0 or more times.final PatternPattern.many(int min) Deprecated.UseatLeast(int)instead.static PatternPatterns.many(int min, CharPredicate predicate) Deprecated.UsePatterns.atLeast(int, CharPredicate)instead.static PatternPatterns.many(CharPredicate predicate) Returns aPatternthat matches 0 or more characters satisfyingpredicate.final PatternPattern.many1()Returns aPatternobject that matches this pattern for 1 or more times.static PatternPatterns.many1(CharPredicate predicate) Returns aPatternthat matches 1 or more characters satisfyingpredicate.final Pattern(package private) static PatternPatterns.nextWithEmpty(Pattern left, Pattern right) final PatternPattern.not()Returns aPatternobject that only matches if this pattern mismatches, 0 is returned otherwise.static Patternstatic PatternReturns aPatternobject that matches if the input has at least 1 character and doesn't matchstring.static PatternPatterns.notStringCaseInsensitive(String string) Returns aPatternobject that matches if the input has at least 1 character and doesn't matchstringcase insensitively.final PatternPattern.optional()Returns aPatternobject that matches with 0 length even ifthismismatches.(package private) static Patternfinal Patternstatic PatternReturns aPatternthat matches if any ofpatternsmatches, in which case, the first match length is returned.(package private) static PatternPatterns.orWithoutEmpty(Pattern left, Pattern right) final PatternPattern.peek()ReturnsPatternobject that matches with match length 0 if this Pattern object matches.static PatternPatterns.range(char c1, char c2) Returns aPatternobject that matches if the current character in the input is between characterc1andc2, in which case1is returned as match length.static PatternAdapts a regular expression pattern string to aPattern.static PatternAdapts a regular expression pattern to aPattern.final PatternPattern.repeat(int n) Deprecated.Usetimes(int)instead.static PatternPatterns.repeat(int n, CharPredicate predicate) Returns aPatternobject that matches if the input has at leastncharacters and the firstncharacters all satisfypredicate.static PatternReturns aPatternobject that matches the input againstpatternssequentially.static Patternstatic PatternReturns aPatternthat tries all ofpatterns, and picks the one with the shortest match length.final PatternPattern.some(int max) Deprecated.UseatMost(int)instead.final PatternPattern.some(int min, int max) Deprecated.Usetimes(int, int)instead.static PatternPatterns.some(int min, int max, CharPredicate predicate) Deprecated.UsePatterns.times(int, int, CharPredicate)instead.static PatternPatterns.some(int max, CharPredicate predicate) Deprecated.UsePatterns.atMost(int, CharPredicate)instead.static PatternReturns aPatternobject that matchesstringliterally.static PatternPatterns.stringCaseInsensitive(String string) Returns aPatternobject that matchesstringcase insensitively.final PatternPattern.times(int n) ReturnsPatternobject that matches the input against this pattern forntimes.final PatternPattern.times(int min, int max) private static Patternstatic PatternPatterns.times(int min, int max, CharPredicate predicate) Returns aPatternthat matches at leastminand up tomaxnumber of characters satisfyingpredicate,Methods in org.jparsec.pattern with parameters of type PatternModifier and TypeMethodDescriptionstatic PatternReturns aPatternthat matches if all ofpatternsmatches, in which case, the maximum match length is returned.final PatternReturnsPatternobject that, if this pattern matches, matches the remaining input againstconsequencepattern, or otherwise matches againstalternativepattern.private static Patternstatic Patternstatic PatternReturns aPatternthat tries all ofpatterns, and picks the one with the longest match length.(package private) static intManyPattern.matchMany(Pattern pattern, CharSequence src, int len, int from, int acc) (package private) static intRepeatPattern.matchRepeat(int n, Pattern pattern, CharSequence src, int len, int from, int acc) (package private) static intUpperBoundedPattern.matchSome(int max, Pattern pattern, CharSequence src, int len, int from, int acc) final Pattern(package private) static PatternPatterns.nextWithEmpty(Pattern left, Pattern right) static Pattern(package private) static Patternfinal Patternstatic PatternReturns aPatternthat matches if any ofpatternsmatches, in which case, the first match length is returned.(package private) static PatternPatterns.orWithoutEmpty(Pattern left, Pattern right) static PatternReturns aPatternobject that matches the input againstpatternssequentially.static Patternstatic PatternReturns aPatternthat tries all ofpatterns, and picks the one with the shortest match length.private static PatternConstructors in org.jparsec.pattern with parameters of type PatternModifierConstructorDescription(package private)LowerBoundedPattern(int min, Pattern pattern) (package private)ManyPattern(Pattern pattern) (package private)NotPattern(Pattern pp) (package private)OptionalPattern(Pattern pattern) (package private)PeekPattern(Pattern pp) (package private)RepeatPattern(int n, Pattern pattern) (package private)SequencePattern(Pattern... patterns) (package private)UpperBoundedPattern(int max, Pattern pattern)
pattern.many().toScanner(name).