|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.basex.query.regex.parse.RegExParser
public class RegExParser
A parser for XSD regular expressions.
Field Summary | |
---|---|
Token |
jj_nt
Next token. |
Token |
token
Current token. |
TokenManager |
token_source
User defined Token Manager. |
Fields inherited from interface org.basex.query.regex.parse.RegExParserConstants |
---|
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 Summary | |
---|---|
RegExParser(byte[] regex,
boolean strip,
boolean all,
boolean multi)
Constructor. |
|
RegExParser(TokenManager tm)
Constructor with user supplied Token Manager. |
Method Summary | |
---|---|
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 java.util.regex.Pattern |
parse(byte[] regex,
byte[] mod,
boolean ext,
InputInfo ii)
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public TokenManager token_source
public Token token
public Token jj_nt
Constructor Detail |
---|
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)
Method Detail |
---|
public static java.util.regex.Pattern parse(byte[] regex, byte[] mod, boolean ext, InputInfo ii) throws QueryException
Pattern
.
regex
- regular expression to parsemod
- modifiersext
- XQuery 3.0 syntaxii
- input info
QueryException
- 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()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |