public class RegExParser extends Object implements RegExParserConstants
Modifier and Type | Field and Description |
---|---|
Token |
jj_nt
Next token.
|
Token |
token
Current token.
|
TokenManager |
token_source
User defined Token Manager.
|
BACK_REF, BR_CLOSE, BR_OPEN, CAT_ESC, CHAR, COMMA, DIGIT, EOF, LINE_END, LINE_START, MULTI_ESC, NEG, NPAR_OPEN, NUMBER, OR, PAR_CLOSE, PAR_OPEN, PLUS, Q_MARK, QUANT_CLOSE, QUANT_OPEN, SINGLE_ESC, STAR, TO, tokenImage, WILDCARD
Constructor and Description |
---|
RegExParser(byte[] regex,
boolean strip,
boolean all,
boolean multi)
Constructor.
|
RegExParser(TokenManager tm)
Constructor with user supplied Token Manager.
|
Modifier and Type | Method and Description |
---|---|
RegExp |
atom()
Parses the "atom" rule.
|
BackRef |
backReference()
Parses the "backReference" rule.
|
RegExp |
branch()
Parses the "branch" rule.
|
Literal |
Char()
Parses the "Char" rule.
|
RegExp |
charClass()
Parses the "charClass" rule.
|
RegExp |
charClassEsc()
Parses the "charClassEsc" rule.
|
CharClass |
charClassExpr()
Parses the "charClassExpr" rule.
|
int |
charOrEsc()
Parses the "charOrEsc" rule.
|
RegExp |
charRange()
Parses the "charRange" rule.
|
void |
disable_tracing()
Disable tracing.
|
void |
enable_tracing()
Enable tracing.
|
ParseException |
generateParseException()
Generate ParseException.
|
Token |
getNextToken()
Get the next Token.
|
Token |
getToken(int index)
Get the specific Token.
|
RegExp |
parse()
Root production.
|
static Pattern |
parse(byte[] regex,
byte[] mod,
InputInfo ii,
boolean check)
Compiles this regular expression to a
Pattern . |
CharGroup |
posCharGroup()
Parses the "posCharGroup" rule.
|
Quantifier |
quantifier()
Parses the "quantifier" rule.
|
int[] |
quantity()
Parses the "quantity" rule.
|
RegExp |
regExp()
Parses the "regExp" rule.
|
void |
ReInit(TokenManager tm)
Reinitialise.
|
int |
XmlChar()
Parses the "XmlChar" rule.
|
public TokenManager token_source
public Token token
public Token jj_nt
public RegExParser(byte[] regex, boolean strip, boolean all, boolean multi)
regex
- regular expression to parsestrip
- strip whitespace while lexingall
- dot matches allmulti
- multi line searchpublic RegExParser(TokenManager tm)
public static Pattern parse(byte[] regex, byte[] mod, InputInfo ii, boolean check) throws QueryException
Pattern
.regex
- regular expression to parsemod
- modifiersext
- XQuery 3.0 syntaxii
- input infocheck
- check result for empty stringsQueryException
- query exceptionpublic final RegExp parse() throws ParseException
ParseException
- parsing exceptionpublic final RegExp regExp() throws ParseException
ParseException
- parsing exceptionpublic final RegExp branch() throws ParseException
ParseException
- parsing exceptionpublic final Quantifier quantifier() throws ParseException
ParseException
- parsing exceptionpublic final int[] quantity() throws ParseException
ParseException
- parsing exceptionpublic final RegExp atom() throws ParseException
ParseException
- parsing exceptionpublic final Literal Char() throws ParseException
ParseException
- parsing exceptionpublic final BackRef backReference() throws ParseException
ParseException
- parsing exceptionpublic final RegExp charClass() throws ParseException
ParseException
- parsing exceptionpublic final RegExp charClassEsc() throws ParseException
ParseException
- parsing exceptionpublic final CharClass charClassExpr() throws ParseException
ParseException
- parsing exceptionpublic final CharGroup posCharGroup() throws ParseException
ParseException
- parsing exceptionpublic final RegExp charRange() throws ParseException
ParseException
- parsing exceptionpublic final int charOrEsc() throws ParseException
ParseException
- parsing exceptionpublic final int XmlChar() throws ParseException
ParseException
- parsing exceptionpublic void ReInit(TokenManager tm)
public final Token getNextToken()
public final Token getToken(int index)
public ParseException generateParseException()
public final void enable_tracing()
public final void disable_tracing()
Copyright © 2005–2015 BaseX Team. All rights reserved.