Class RegExpImpl
java.lang.Object
org.htmlunit.corejs.javascript.regexp.RegExpImpl
- All Implemented Interfaces:
RegExpProxy
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Stringprotected SubStringprotected SubStringprotected SubStringprotected booleanprotected SubString[]protected SubStringFields inherited from interface org.htmlunit.corejs.javascript.RegExpProxy
RA_MATCH, RA_REPLACE, RA_REPLACE_ALL, RA_SEARCH -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaction(Context cx, Scriptable scope, Scriptable thisObj, Object[] args, int actionType) compileRegExp(Context cx, String source, String flags) private static NativeRegExpcreateRegExp(Context cx, Scriptable scope, Object[] args, int optarg, boolean forceFlat) private static voiddo_replace(GlobData rdata, Context cx, RegExpImpl regExpImpl) Analog of do_replace in jsstr.cprivate static intfind_split(Context cx, Scriptable scope, String target, String separator, int version, RegExpProxy reProxy, Scriptable re, int[] ip, int[] matchlen, boolean[] matched, String[][] parensp) intfind_split(Context cx, Scriptable scope, String target, String separator, Scriptable reObj, int[] ip, int[] matchlen, boolean[] matched, String[][] parensp) (package private) SubStringgetParenSubString(int i) Analog of REGEXP_PAREN_SUBSTRING in C jsregexp.h.private static SubStringinterpretDollar(Context cx, RegExpImpl res, String da, int dp, int[] skip) booleanisRegExp(Scriptable obj) js_split(Context cx, Scriptable scope, String target, Object[] args) private static voidmatch_glob(GlobData mdata, Context cx, Scriptable scope, int count, RegExpImpl reImpl) private static ObjectmatchOrReplace(Context cx, Scriptable scope, Scriptable thisObj, Object[] args, RegExpImpl reImpl, GlobData data, NativeRegExp re) Analog of C match_or_replace.private static voidreplace_glob(GlobData rdata, Context cx, Scriptable scope, RegExpImpl reImpl, int leftIndex, int leftlen) wrapRegExp(Context cx, Scriptable scope, Object compiled)
-
Field Details
-
input
-
multiline
protected boolean multiline -
parens
-
lastMatch
-
lastParen
-
leftContext
-
rightContext
-
-
Constructor Details
-
RegExpImpl
public RegExpImpl()
-
-
Method Details
-
isRegExp
- Specified by:
isRegExpin interfaceRegExpProxy
-
compileRegExp
- Specified by:
compileRegExpin interfaceRegExpProxy
-
wrapRegExp
- Specified by:
wrapRegExpin interfaceRegExpProxy
-
action
public Object action(Context cx, Scriptable scope, Scriptable thisObj, Object[] args, int actionType) - Specified by:
actionin interfaceRegExpProxy
-
createRegExp
private static NativeRegExp createRegExp(Context cx, Scriptable scope, Object[] args, int optarg, boolean forceFlat) -
matchOrReplace
private static Object matchOrReplace(Context cx, Scriptable scope, Scriptable thisObj, Object[] args, RegExpImpl reImpl, GlobData data, NativeRegExp re) Analog of C match_or_replace. -
find_split
public int find_split(Context cx, Scriptable scope, String target, String separator, Scriptable reObj, int[] ip, int[] matchlen, boolean[] matched, String[][] parensp) - Specified by:
find_splitin interfaceRegExpProxy
-
getParenSubString
Analog of REGEXP_PAREN_SUBSTRING in C jsregexp.h. Assumes zero-based; i.e., for $3, i==2 -
match_glob
private static void match_glob(GlobData mdata, Context cx, Scriptable scope, int count, RegExpImpl reImpl) -
replace_glob
private static void replace_glob(GlobData rdata, Context cx, Scriptable scope, RegExpImpl reImpl, int leftIndex, int leftlen) -
interpretDollar
-
do_replace
Analog of do_replace in jsstr.c -
js_split
- Specified by:
js_splitin interfaceRegExpProxy
-
find_split
private static int find_split(Context cx, Scriptable scope, String target, String separator, int version, RegExpProxy reProxy, Scriptable re, int[] ip, int[] matchlen, boolean[] matched, String[][] parensp)
-