Uses of Class
org.jparsec.pattern.Pattern
-
Packages that use Pattern Package Description org.jparsec Provides core Parser implementations for parser combinator logic.org.jparsec.examples.java.parser org.jparsec.pattern Provides Pattern implementations for use by character level scanners. -
-
Uses of Pattern in org.jparsec
Fields in org.jparsec declared as Pattern Modifier and Type Field Description (package private) static 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 PatternIndentation. LINE_CONTINUATIONAPatternobject that matches a line continuation.Methods in org.jparsec that return Pattern Modifier and Type Method Description private 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 Pattern Modifier and Type Method Description static Parser<java.lang.Void>Scanners. blockComment(java.lang.String begin, java.lang.String end, Pattern commented)A scanner for a non-nestable block comment that starts withbeginand ends withend.static Parser<java.lang.Void>Scanners. many(Pattern pattern, java.lang.String name)Deprecated.Usepattern.many().toScanner(name).static Parser<java.lang.Void>Scanners. many1(Pattern pattern, java.lang.String name)Deprecated.Usepattern.many1().toScanner(name).static Parser<java.lang.Void>Scanners. nestableBlockComment(java.lang.String begin, java.lang.String end, Pattern commented)A scanner for a nestable block comment that starts withbeginand ends withend.static Parser<java.lang.Void>Scanners. pattern(Pattern pattern, java.lang.String name)Deprecated.Usepattern.toScanner(name). -
Uses of Pattern in org.jparsec.examples.java.parser
Fields in org.jparsec.examples.java.parser declared as Pattern Modifier and Type Field Description static 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 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.pattern Modifier and Type Class Description (package private) classLowerBoundedPattern(package private) classManyPattern(package private) classNotPattern(package private) classOptionalPattern(package private) classOrPattern(package private) classPeekPattern(package private) classRepeatCharPredicatePattern(package private) classRepeatPattern(package private) classSequencePattern(package private) classUpperBoundedPatternFields in org.jparsec.pattern declared as Pattern Modifier and Type Field Description static PatternPatterns. ALWAYSAPatternthat always matches with match length0.static PatternPatterns. ANY_CHARAPatternthat matches any character and only mismatches for an empty string.static PatternPatterns. DEC_INTEGERAPatternobject that matches a decimal integer, which starts with a non-zero digit and is followed by 0 or more digits.static PatternPatterns. DECIMALAPatternobject that matches a decimal number that could start with a decimal point or a digit.static PatternPatterns. EOFAPatternobject that matches if the input has no character left.static PatternPatterns. ESCAPEDAPatternobject that succeeds with match length2if there are at least 2 characters in the input and the first character is'\'.static PatternPatterns. FRACTIONAPatternobject that matches a decimal point and one or more digits after it.static PatternPatterns. HEX_INTEGERAPatternobject that matches a hex integer, which starts with a0xor0X, and is followed by one or more hex digits.static PatternPatterns. INTEGERAPatternobject that matches an integer.static PatternPatterns. NEVERstatic PatternPatterns. OCT_INTEGERAPatternobject that matches an octal integer that starts with a0and is followed by 0 or more[0 - 7]characters.private PatternLowerBoundedPattern. patternprivate PatternManyPattern. patternprivate PatternOptionalPattern. patternprivate PatternRepeatPattern. patternprivate PatternUpperBoundedPattern. patternprivate Pattern[]OrPattern. patternsprivate Pattern[]SequencePattern. patternsprivate PatternNotPattern. ppprivate PatternPeekPattern. ppstatic PatternPatterns. REGEXP_MODIFIERSAPatternobject that matches regular expression modifiers, which is a list of alpha characters.static PatternPatterns. REGEXP_PATTERNAPatternobject that matches any regular expression pattern string in the form of/some pattern here/.static PatternPatterns. SCIENTIFIC_NOTATIONstatic PatternPatterns. STRICT_DECIMALAPatternobject that matches a decimal number that has at least one digit before the decimal point.static 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 Pattern Modifier and Type Method Description static PatternPatterns. among(java.lang.String chars)Returns aPatternobject that matches if the current character in the input is equal to any character inchars, in which case1is returned as match length.static PatternPatterns. and(Pattern... patterns)Returns aPatternthat matches if all ofpatternsmatches, in which case, the maximum match length is returned.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.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.PatternPattern. ifelse(Pattern consequence, Pattern alternative)ReturnsPatternobject that, if this pattern matches, matches the remaining input againstconsequencepattern, or otherwise matches againstalternativepattern.private static PatternPattern. ifElse(Pattern cond, Pattern consequence, Pattern alternative)static 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(java.lang.String begin)Returns aPatternobject that matches a line comment started bybeginand ended byEOForLF(the line feed character).static PatternPatterns. longer(Pattern p1, Pattern p2)static PatternPatterns. longest(Pattern... patterns)Returns aPatternthat tries all ofpatterns, and picks the one with the longest match length.PatternPattern. many()Returns aPatternobject that matches this pattern for 0 or more times.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.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.PatternPattern. next(Pattern next)(package private) static PatternPatterns. nextWithEmpty(Pattern left, Pattern right)PatternPattern. not()Returns aPatternobject that only matches if this pattern mismatches, 0 is returned otherwise.static PatternPatterns. not(Pattern pattern)static PatternPatterns. notString(java.lang.String string)Returns aPatternobject that matches if the input has at least 1 character and doesn't matchstring.static PatternPatterns. notStringCaseInsensitive(java.lang.String string)Returns aPatternobject that matches if the input has at least 1 character and doesn't matchstringcase insensitively.PatternPattern. optional()Returns aPatternobject that matches with 0 length even ifthismismatches.(package private) static PatternPatterns. optional(Pattern pp)PatternPattern. or(Pattern p2)static PatternPatterns. or(Pattern... patterns)Returns aPatternthat matches if any ofpatternsmatches, in which case, the first match length is returned.(package private) static PatternPatterns. orWithoutEmpty(Pattern left, Pattern right)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 PatternPatterns. regex(java.lang.String s)Adapts a regular expression pattern string to aPattern.static PatternPatterns. regex(java.util.regex.Pattern p)Adapts a regular expression pattern to aPattern.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 PatternPatterns. sequence(Pattern... patterns)Returns aPatternobject that matches the input againstpatternssequentially.static PatternPatterns. shorter(Pattern p1, Pattern p2)static PatternPatterns. shortest(Pattern... patterns)Returns aPatternthat tries all ofpatterns, and picks the one with the shortest match length.PatternPattern. some(int max)Deprecated.UseatMost(int)instead.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 PatternPatterns. string(java.lang.String string)Returns aPatternobject that matchesstringliterally.static PatternPatterns. stringCaseInsensitive(java.lang.String string)Returns aPatternobject that matchesstringcase insensitively.PatternPattern. times(int n)ReturnsPatternobject that matches the input against this pattern forntimes.PatternPattern. times(int min, int max)private static PatternPattern. times(Pattern pp, int min, int max)static 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 Pattern Modifier and Type Method Description static PatternPatterns. and(Pattern... patterns)Returns aPatternthat matches if all ofpatternsmatches, in which case, the maximum match length is returned.PatternPattern. ifelse(Pattern consequence, Pattern alternative)ReturnsPatternobject that, if this pattern matches, matches the remaining input againstconsequencepattern, or otherwise matches againstalternativepattern.private static PatternPattern. ifElse(Pattern cond, Pattern consequence, Pattern alternative)static PatternPatterns. longer(Pattern p1, Pattern p2)static PatternPatterns. longest(Pattern... patterns)Returns aPatternthat tries all ofpatterns, and picks the one with the longest match length.(package private) static intManyPattern. matchMany(Pattern pattern, java.lang.CharSequence src, int len, int from, int acc)(package private) static intRepeatPattern. matchRepeat(int n, Pattern pattern, java.lang.CharSequence src, int len, int from, int acc)(package private) static intUpperBoundedPattern. matchSome(int max, Pattern pattern, java.lang.CharSequence src, int len, int from, int acc)PatternPattern. next(Pattern next)(package private) static PatternPatterns. nextWithEmpty(Pattern left, Pattern right)static PatternPatterns. not(Pattern pattern)(package private) static PatternPatterns. optional(Pattern pp)PatternPattern. or(Pattern p2)static PatternPatterns. or(Pattern... patterns)Returns aPatternthat matches if any ofpatternsmatches, in which case, the first match length is returned.(package private) static PatternPatterns. orWithoutEmpty(Pattern left, Pattern right)static PatternPatterns. sequence(Pattern... patterns)Returns aPatternobject that matches the input againstpatternssequentially.static PatternPatterns. shorter(Pattern p1, Pattern p2)static PatternPatterns. shortest(Pattern... patterns)Returns aPatternthat tries all ofpatterns, and picks the one with the shortest match length.private static PatternPattern. times(Pattern pp, int min, int max)Constructors in org.jparsec.pattern with parameters of type Pattern Constructor Description LowerBoundedPattern(int min, Pattern pattern)ManyPattern(Pattern pattern)NotPattern(Pattern pp)OptionalPattern(Pattern pattern)OrPattern(Pattern... patterns)PeekPattern(Pattern pp)RepeatPattern(int n, Pattern pattern)SequencePattern(Pattern... patterns)UpperBoundedPattern(int max, Pattern pattern)
-