|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectgnu.regexp.RESyntax
public class RESyntax
An RESyntax specifies the way a regular expression will be compiled. This class provides a number of predefined useful constants for emulating popular regular expression syntaxes. Additionally the user may construct his or her own syntax, using any combination of the syntax bit constants. The syntax is an optional argument to any of the matching methods on class RE.
| Field Summary | |
|---|---|
static int |
RE_BACKSLASH_ESCAPE_IN_LISTS
Syntax bit. |
static int |
RE_BK_PLUS_QM
Syntax bit. |
static int |
RE_CHAR_CLASS_ESC_IN_LISTS
Syntax bit. |
static int |
RE_CHAR_CLASS_ESCAPES
Syntax bit. |
static int |
RE_CHAR_CLASSES
Syntax bit. |
static int |
RE_COMMENTS
Syntax bit. |
static int |
RE_CONTEXT_INDEP_ANCHORS
Syntax bit. |
static int |
RE_CONTEXT_INDEP_OPS
Syntax bit. |
static int |
RE_CONTEXT_INVALID_OPS
Syntax bit. |
static int |
RE_DOT_NEWLINE
Syntax bit. |
static int |
RE_DOT_NOT_NULL
Syntax bit. |
static int |
RE_HAT_LISTS_NOT_NEWLINE
Syntax bit. |
static int |
RE_INTERVALS
Syntax bit. |
static int |
RE_LIMITED_OPS
Syntax bit. |
static int |
RE_LOOKAHEAD
Syntax bit. |
static int |
RE_NEWLINE_ALT
Syntax bit. |
static int |
RE_NO_BK_BRACES
Syntax bit. |
static int |
RE_NO_BK_PARENS
Syntax bit. |
static int |
RE_NO_BK_REFS
Syntax bit. |
static int |
RE_NO_BK_VBAR
Syntax bit. |
static int |
RE_NO_EMPTY_RANGES
Syntax bit. |
static int |
RE_PURE_GROUPING
Syntax bit. |
static int |
RE_STINGY_OPS
Syntax bit. |
static int |
RE_STRING_ANCHORS
Syntax bit. |
static RESyntax |
RE_SYNTAX_AWK
Predefined syntax. |
static RESyntax |
RE_SYNTAX_ED
Predefined syntax. |
static RESyntax |
RE_SYNTAX_EGREP
Predefined syntax. |
static RESyntax |
RE_SYNTAX_EMACS
Predefined syntax. |
static RESyntax |
RE_SYNTAX_GREP
Predefined syntax. |
static RESyntax |
RE_SYNTAX_PERL4
Predefined syntax. |
static RESyntax |
RE_SYNTAX_PERL4_S
Predefined syntax. |
static RESyntax |
RE_SYNTAX_PERL5
Predefined syntax. |
static RESyntax |
RE_SYNTAX_PERL5_S
Predefined syntax. |
static RESyntax |
RE_SYNTAX_POSIX_AWK
Predefined syntax. |
static RESyntax |
RE_SYNTAX_POSIX_BASIC
Predefined syntax. |
static RESyntax |
RE_SYNTAX_POSIX_EGREP
Predefined syntax. |
static RESyntax |
RE_SYNTAX_POSIX_EXTENDED
Predefined syntax. |
static RESyntax |
RE_SYNTAX_POSIX_MINIMAL_BASIC
Predefined syntax. |
static RESyntax |
RE_SYNTAX_POSIX_MINIMAL_EXTENDED
Predefined syntax. |
static RESyntax |
RE_SYNTAX_SED
Predefined syntax. |
static int |
RE_UNMATCHED_RIGHT_PAREN_ORD
Syntax bit. |
| Constructor Summary | |
|---|---|
RESyntax()
Construct a new syntax object with all bits turned off. |
|
RESyntax(RESyntax other)
Construct a new syntax object with all bits set the same as the other syntax. |
|
| Method Summary | |
|---|---|
RESyntax |
clear(int index)
Clear a given bit in this syntax. |
boolean |
get(int index)
Check if a given bit is set in this syntax. |
String |
getLineSeparator()
Returns the currently active line separator string. |
RESyntax |
makeFinal()
Called internally when constructing predefined syntaxes so their interpretation cannot vary. |
RESyntax |
set(int index)
Set a given bit in this syntax. |
RESyntax |
setLineSeparator(String aSeparator)
Changes the line separator string for regular expressions created using this RESyntax. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int RE_BACKSLASH_ESCAPE_IN_LISTS
Backslash is an escape character in lists.
public static final int RE_BK_PLUS_QM
Use \? instead of ? and \+ instead of +.
public static final int RE_CHAR_CLASSES
POSIX character classes ([:...:]) in lists are allowed.
public static final int RE_CONTEXT_INDEP_ANCHORS
^ and $ are special everywhere. Not implemented.
public static final int RE_CONTEXT_INDEP_OPS
Repetition operators are only special in valid positions. Not implemented.
public static final int RE_CONTEXT_INVALID_OPS
Repetition and alternation operators are invalid at start and end of pattern and other places. Not implemented.
public static final int RE_DOT_NEWLINE
Match-any-character operator (.) matches a newline.
public static final int RE_DOT_NOT_NULL
Match-any-character operator (.) does not match a null.
public static final int RE_INTERVALS
Intervals ({x}, {x,}, {x,y}) are allowed.
public static final int RE_LIMITED_OPS
No alternation (|), match one-or-more (+), or match zero-or-one (?) operators.
public static final int RE_NEWLINE_ALT
public static final int RE_NO_BK_BRACES
Intervals use { } instead of \{ \}
public static final int RE_NO_BK_PARENS
Grouping uses ( ) instead of \( \).
public static final int RE_NO_BK_REFS
Backreferences not allowed.
public static final int RE_NO_BK_VBAR
Alternation uses | instead of \|
public static final int RE_NO_EMPTY_RANGES
public static final int RE_UNMATCHED_RIGHT_PAREN_ORD
An unmatched right parenthesis (')' or '\)', depending on RE_NO_BK_PARENS) will throw an exception when compiling.
public static final int RE_HAT_LISTS_NOT_NEWLINE
public static final int RE_STINGY_OPS
Stingy matching is allowed (+?, *?, ??, {x,y}?).
public static final int RE_CHAR_CLASS_ESCAPES
Allow character class escapes (\d, \D, \s, \S, \w, \W).
public static final int RE_PURE_GROUPING
Allow use of (?:xxx) grouping (subexpression is not saved).
public static final int RE_LOOKAHEAD
public static final int RE_STRING_ANCHORS
Allow beginning- and end-of-string anchors (\A, \Z).
public static final int RE_COMMENTS
Allow embedded comments, (#comment), as in Perl5.
public static final int RE_CHAR_CLASS_ESC_IN_LISTS
public static final RESyntax RE_SYNTAX_AWK
public static final RESyntax RE_SYNTAX_ED
public static final RESyntax RE_SYNTAX_EGREP
public static final RESyntax RE_SYNTAX_EMACS
public static final RESyntax RE_SYNTAX_GREP
public static final RESyntax RE_SYNTAX_POSIX_AWK
public static final RESyntax RE_SYNTAX_POSIX_BASIC
public static final RESyntax RE_SYNTAX_POSIX_EGREP
public static final RESyntax RE_SYNTAX_POSIX_EXTENDED
public static final RESyntax RE_SYNTAX_POSIX_MINIMAL_BASIC
public static final RESyntax RE_SYNTAX_POSIX_MINIMAL_EXTENDED
public static final RESyntax RE_SYNTAX_SED
public static final RESyntax RE_SYNTAX_PERL4
public static final RESyntax RE_SYNTAX_PERL4_S
public static final RESyntax RE_SYNTAX_PERL5
public static final RESyntax RE_SYNTAX_PERL5_S
| Constructor Detail |
|---|
public RESyntax()
public RESyntax(RESyntax other)
| Method Detail |
|---|
public RESyntax makeFinal()
public boolean get(int index)
public RESyntax set(int index)
index - the constant (RESyntax.RE_xxx) bit to set.
public RESyntax clear(int index)
index - the constant (RESyntax.RE_xxx) bit to clear.
public RESyntax setLineSeparator(String aSeparator)
public String getLineSeparator()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||