亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? nativeregexp.java

?? 主要的怎么樣結合java 和 javascript!
?? JAVA
?? 第 1 頁 / 共 5 頁
字號:
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * The contents of this file are subject to the Netscape Public * License Version 1.1 (the "License"); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.mozilla.org/NPL/ * * Software distributed under the License is distributed on an "AS * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or * implied. See the License for the specific language governing * rights and limitations under the License. * * The Original Code is Rhino code, released * May 6, 1998. * * The Initial Developer of the Original Code is Netscape * Communications Corporation.  Portions created by Netscape are * Copyright (C) 1997-1999 Netscape Communications Corporation. All * Rights Reserved. * * Contributor(s): * Norris Boyd * Igor Bukanov * Brendan Eich * Matthias Radestock * * Alternatively, the contents of this file may be used under the * terms of the GNU Public License (the "GPL"), in which case the * provisions of the GPL are applicable instead of those above. * If you wish to allow use of your version of this file only * under the terms of the GPL and not to allow others to use your * version of this file under the NPL, indicate your decision by * deleting the provisions above and replace them with the notice * and other provisions required by the GPL.  If you do not delete * the provisions above, a recipient may use your version of this * file under either the NPL or the GPL. */package org.mozilla.javascript.regexp;import java.io.Serializable;import org.mozilla.javascript.*;/** * This class implements the RegExp native object. * * Revision History: * Implementation in C by Brendan Eich * Initial port to Java by Norris Boyd from jsregexp.c version 1.36 * Merged up to version 1.38, which included Unicode support. * Merged bug fixes in version 1.39. * Merged JSFUN13_BRANCH changes up to 1.32.2.13 * * @author Brendan Eich * @author Norris Boyd */public class NativeRegExp extends IdScriptableObject implements Function{    static final long serialVersionUID = 4965263491464903264L;    private static final Object REGEXP_TAG = new Object();    public static final int JSREG_GLOB = 0x1;       // 'g' flag: global    public static final int JSREG_FOLD = 0x2;       // 'i' flag: fold    public static final int JSREG_MULTILINE = 0x4;  // 'm' flag: multiline    //type of match to perform    public static final int TEST = 0;    public static final int MATCH = 1;    public static final int PREFIX = 2;    private static final boolean debug = false;    private static final byte REOP_EMPTY         = 0;  /* match rest of input against rest of r.e. */    private static final byte REOP_ALT           = 1;  /* alternative subexpressions in kid and next */    private static final byte REOP_BOL           = 2;  /* beginning of input (or line if multiline) */    private static final byte REOP_EOL           = 3;  /* end of input (or line if multiline) */    private static final byte REOP_WBDRY         = 4;  /* match "" at word boundary */    private static final byte REOP_WNONBDRY      = 5;  /* match "" at word non-boundary */    private static final byte REOP_QUANT         = 6;  /* quantified atom: atom{1,2} */    private static final byte REOP_STAR          = 7;  /* zero or more occurrences of kid */    private static final byte REOP_PLUS          = 8;  /* one or more occurrences of kid */    private static final byte REOP_OPT           = 9;  /* optional subexpression in kid */    private static final byte REOP_LPAREN        = 10; /* left paren bytecode: kid is u.num'th sub-regexp */    private static final byte REOP_RPAREN        = 11; /* right paren bytecode */    private static final byte REOP_DOT           = 12; /* stands for any character */    private static final byte REOP_CCLASS        = 13; /* character class: [a-f] */    private static final byte REOP_DIGIT         = 14; /* match a digit char: [0-9] */    private static final byte REOP_NONDIGIT      = 15; /* match a non-digit char: [^0-9] */    private static final byte REOP_ALNUM         = 16; /* match an alphanumeric char: [0-9a-z_A-Z] */    private static final byte REOP_NONALNUM      = 17; /* match a non-alphanumeric char: [^0-9a-z_A-Z] */    private static final byte REOP_SPACE         = 18; /* match a whitespace char */    private static final byte REOP_NONSPACE      = 19; /* match a non-whitespace char */    private static final byte REOP_BACKREF       = 20; /* back-reference (e.g., \1) to a parenthetical */    private static final byte REOP_FLAT          = 21; /* match a flat string */    private static final byte REOP_FLAT1         = 22; /* match a single char */    private static final byte REOP_JUMP          = 23; /* for deoptimized closure loops */    private static final byte REOP_DOTSTAR       = 24; /* optimize .* to use a single opcode */    private static final byte REOP_ANCHOR        = 25; /* like .* but skips left context to unanchored r.e. */    private static final byte REOP_EOLONLY       = 26; /* $ not preceded by any pattern */    private static final byte REOP_UCFLAT        = 27; /* flat Unicode string; len immediate counts chars */    private static final byte REOP_UCFLAT1       = 28; /* single Unicode char */    private static final byte REOP_UCCLASS       = 29; /* Unicode character class, vector of chars to match */    private static final byte REOP_NUCCLASS      = 30; /* negated Unicode character class */    private static final byte REOP_BACKREFi      = 31; /* case-independent REOP_BACKREF */    private static final byte REOP_FLATi         = 32; /* case-independent REOP_FLAT */    private static final byte REOP_FLAT1i        = 33; /* case-independent REOP_FLAT1 */    private static final byte REOP_UCFLATi       = 34; /* case-independent REOP_UCFLAT */    private static final byte REOP_UCFLAT1i      = 35; /* case-independent REOP_UCFLAT1 */    private static final byte REOP_ANCHOR1       = 36; /* first-char discriminating REOP_ANCHOR */    private static final byte REOP_NCCLASS       = 37; /* negated 8-bit character class */    private static final byte REOP_DOTSTARMIN    = 38; /* ungreedy version of REOP_DOTSTAR */    private static final byte REOP_LPARENNON     = 39; /* non-capturing version of REOP_LPAREN */    private static final byte REOP_RPARENNON     = 40; /* non-capturing version of REOP_RPAREN */    private static final byte REOP_ASSERT        = 41; /* zero width positive lookahead assertion */    private static final byte REOP_ASSERT_NOT    = 42; /* zero width negative lookahead assertion */    private static final byte REOP_ASSERTTEST    = 43; /* sentinel at end of assertion child */    private static final byte REOP_ASSERTNOTTEST = 44; /* sentinel at end of !assertion child */    private static final byte REOP_MINIMALSTAR   = 45; /* non-greedy version of * */    private static final byte REOP_MINIMALPLUS   = 46; /* non-greedy version of + */    private static final byte REOP_MINIMALOPT    = 47; /* non-greedy version of ? */    private static final byte REOP_MINIMALQUANT  = 48; /* non-greedy version of {} */    private static final byte REOP_ENDCHILD      = 49; /* sentinel at end of quantifier child */    private static final byte REOP_CLASS         = 50; /* character class with index */    private static final byte REOP_REPEAT        = 51; /* directs execution of greedy quantifier */    private static final byte REOP_MINIMALREPEAT = 52; /* directs execution of non-greedy quantifier */    private static final byte REOP_END           = 53;    public static void init(Context cx, Scriptable scope, boolean sealed)    {        NativeRegExp proto = new NativeRegExp();        proto.re = (RECompiled)compileRE("", null, false);        proto.activatePrototypeMap(MAX_PROTOTYPE_ID);        proto.setParentScope(scope);        proto.setPrototype(getObjectPrototype(scope));        NativeRegExpCtor ctor = new NativeRegExpCtor();        ScriptRuntime.setFunctionProtoAndParent(ctor, scope);        ctor.setImmunePrototypeProperty(proto);        if (sealed) {            proto.sealObject();            ctor.sealObject();        }        defineProperty(scope, "RegExp", ctor, ScriptableObject.DONTENUM);    }    NativeRegExp(Scriptable scope, Object regexpCompiled)    {        this.re = (RECompiled)regexpCompiled;        this.lastIndex = 0;        ScriptRuntime.setObjectProtoAndParent(this, scope);    }    public String getClassName()    {        return "RegExp";    }    public Object call(Context cx, Scriptable scope, Scriptable thisObj,                       Object[] args)    {        return execSub(cx, scope, args, MATCH);    }    public Scriptable construct(Context cx, Scriptable scope, Object[] args)    {        return (Scriptable)execSub(cx, scope, args, MATCH);    }    Scriptable compile(Context cx, Scriptable scope, Object[] args)    {        if (args.length > 0 && args[0] instanceof NativeRegExp) {            if (args.length > 1 && args[1] != Undefined.instance) {                // report error                throw ScriptRuntime.typeError0("msg.bad.regexp.compile");            }            NativeRegExp thatObj = (NativeRegExp) args[0];            this.re = thatObj.re;            this.lastIndex = thatObj.lastIndex;            return this;        }        String s = args.length == 0 ? "" : ScriptRuntime.toString(args[0]);        String global = args.length > 1 && args[1] != Undefined.instance            ? ScriptRuntime.toString(args[1])            : null;        this.re = (RECompiled)compileRE(s, global, false);        this.lastIndex = 0;        return this;    }    public String toString()    {        StringBuffer buf = new StringBuffer();        buf.append('/');        if (re.source.length != 0) {            buf.append(re.source);        } else {            // See bugzilla 226045            buf.append("(?:)");        }        buf.append('/');        if ((re.flags & JSREG_GLOB) != 0)            buf.append('g');        if ((re.flags & JSREG_FOLD) != 0)            buf.append('i');        if ((re.flags & JSREG_MULTILINE) != 0)            buf.append('m');        return buf.toString();    }    NativeRegExp() {  }    private static RegExpImpl getImpl(Context cx)    {        return (RegExpImpl) ScriptRuntime.getRegExpProxy(cx);    }    private Object execSub(Context cx, Scriptable scopeObj,                           Object[] args, int matchType)    {        RegExpImpl reImpl = getImpl(cx);        String str;        if (args.length == 0) {            str = reImpl.input;            if (str == null) {                reportError("msg.no.re.input.for", toString());            }        } else {            str = ScriptRuntime.toString(args[0]);        }        double d = ((re.flags & JSREG_GLOB) != 0) ? lastIndex : 0;        Object rval;        if (d < 0 || str.length() < d) {            lastIndex = 0;            rval = null;        }        else {            int indexp[] = { (int)d };            rval = executeRegExp(cx, scopeObj, reImpl, str, indexp, matchType);            if ((re.flags & JSREG_GLOB) != 0) {                lastIndex = (rval == null || rval == Undefined.instance)                            ? 0 : indexp[0];            }        }        return rval;    }    static Object compileRE(String str, String global, boolean flat)    {        RECompiled regexp = new RECompiled();        regexp.source = str.toCharArray();        int length = str.length();        int flags = 0;        if (global != null) {            for (int i = 0; i < global.length(); i++) {                char c = global.charAt(i);                if (c == 'g') {                    flags |= JSREG_GLOB;                } else if (c == 'i') {                    flags |= JSREG_FOLD;                } else if (c == 'm') {                    flags |= JSREG_MULTILINE;                } else {                    reportError("msg.invalid.re.flag", String.valueOf(c));                }            }        }        regexp.flags = flags;        CompilerState state = new CompilerState(regexp.source, length, flags);        if (flat && length > 0) {if (debug) {System.out.println("flat = \"" + str + "\"");}            state.result = new RENode(REOP_FLAT);            state.result.chr = state.cpbegin[0];            state.result.length = length;            state.result.flatIndex = 0;            state.progLength += 5;        }        else            if (!parseDisjunction(state))                return null;        regexp.program = new byte[state.progLength + 1];        if (state.classCount != 0) {            regexp.classList = new RECharSet[state.classCount];            regexp.classCount = state.classCount;        }        int endPC = emitREBytecode(state, regexp, 0, state.result);        regexp.program[endPC++] = REOP_END;if (debug) {System.out.println("Prog. length = " + endPC);for (int i = 0; i < endPC; i++) {    System.out.print(regexp.program[i]);    if (i < (endPC - 1)) System.out.print(", ");}System.out.println();}        regexp.parenCount = state.parenCount;        // If re starts with literal, init anchorCh accordingly        switch (regexp.program[0]) {        case REOP_UCFLAT1:        case REOP_UCFLAT1i:            regexp.anchorCh = (char)getIndex(regexp.program, 1);            break;        case REOP_FLAT1:        case REOP_FLAT1i:            regexp.anchorCh = (char)(regexp.program[1] & 0xFF);            break;        case REOP_FLAT:        case REOP_FLATi:            int k = getIndex(regexp.program, 1);            regexp.anchorCh = regexp.source[k];            break;        }if (debug) {if (regexp.anchorCh >= 0) {    System.out.println("Anchor ch = '" + (char)regexp.anchorCh + "'");}}        return regexp;    }    static boolean isDigit(char c)    {        return '0' <= c && c <= '9';    }    private static boolean isWord(char c)    {        return Character.isLetter(c) || isDigit(c) || c == '_';    }    private static boolean isLineTerm(char c)    {        return ScriptRuntime.isJSLineTerminator(c);    }    private static boolean isREWhiteSpace(int c)    {

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
精品播放一区二区| 欧美国产一区视频在线观看| 日韩一区二区三区免费观看| 亚洲欧美日韩国产中文在线| 国产成人精品综合在线观看| 日韩欧美综合一区| 亚洲电影一区二区三区| voyeur盗摄精品| 日本一区二区三级电影在线观看| 精品在线一区二区三区| 亚洲欧美中日韩| 成人99免费视频| 自拍偷自拍亚洲精品播放| eeuss鲁片一区二区三区在线看| 欧美一级欧美三级在线观看| 日韩精品成人一区二区三区| 8x福利精品第一导航| 日本不卡123| 久久综合久色欧美综合狠狠| 成人自拍视频在线观看| 亚洲色图19p| 欧美日韩一区在线观看| 亚洲国产精品欧美一二99| 91精品国模一区二区三区| 免费高清视频精品| 一区在线观看视频| 色94色欧美sute亚洲线路一久 | 91麻豆成人久久精品二区三区| 中文字幕精品三区| 色综合天天综合狠狠| 日产精品久久久久久久性色| 久久亚洲春色中文字幕久久久| aaa亚洲精品一二三区| 日韩黄色一级片| 国产精品久久夜| 久久一夜天堂av一区二区三区| 色成人在线视频| 懂色av一区二区在线播放| 天天色天天爱天天射综合| 亚洲视频在线观看三级| 精品国产免费一区二区三区四区 | 日韩精品久久久久久| 亚洲视频狠狠干| 国产欧美日产一区| 91精品蜜臀在线一区尤物| 欧美亚洲丝袜传媒另类| 福利电影一区二区三区| 极品尤物av久久免费看| 日韩国产欧美在线观看| 日本欧美加勒比视频| 91免费小视频| 日韩一区欧美二区| 日韩欧美久久一区| 欧美二区在线观看| 欧美精品第一页| 日韩欧美一区在线| 这里只有精品视频在线观看| 色综合天天综合色综合av| 不卡电影一区二区三区| 成人精品国产免费网站| 东方aⅴ免费观看久久av| 成人性色生活片| 91美女在线视频| 欧美人与z0zoxxxx视频| 欧美日本一道本| 久久久久综合网| 亚洲激情图片一区| 午夜影院久久久| 狠狠色伊人亚洲综合成人| 精品一区二区三区免费毛片爱| 精品一区二区三区免费| 99久久婷婷国产| 日韩女同互慰一区二区| 国产精品久久久久久亚洲伦| 亚洲精品国产精华液| 久久99深爱久久99精品| 国产一区二区三区四区五区入口| 高清成人在线观看| 欧美乱熟臀69xxxxxx| 久久精品视频在线看| 亚洲欧美激情在线| 另类小说视频一区二区| 91麻豆视频网站| 精品美女一区二区| 亚洲成人精品一区二区| 91一区二区三区在线观看| 日韩精品一区二区三区视频播放| 精品久久一二三区| 午夜视频一区二区三区| 成人综合在线观看| www国产成人免费观看视频 深夜成人网| 亚洲精品在线观看网站| 日韩二区在线观看| 欧美视频一区二区三区在线观看| 国产午夜精品福利| 免费成人结看片| 欧美一级二级在线观看| 一区二区三区日韩欧美| 97se狠狠狠综合亚洲狠狠| 日韩欧美另类在线| 日本不卡高清视频| 91麻豆精品国产无毒不卡在线观看| 国产精品久久久久久福利一牛影视| 久久99国产精品麻豆| 日韩三区在线观看| 美女视频黄久久| 精品日韩一区二区| 精品一区二区国语对白| 久久精品无码一区二区三区| 国产一区二区伦理片| 国产精品美女久久久久久 | 五月天久久比比资源色| 91精品视频网| 国产东北露脸精品视频| 亚洲品质自拍视频| 欧美三级日韩三级国产三级| 一区二区三区欧美久久| 欧美色精品天天在线观看视频| 亚洲成年人影院| 久久色在线观看| 色哟哟日韩精品| 老汉av免费一区二区三区| 国产精品美女一区二区| 欧美精品粉嫩高潮一区二区| 国产69精品久久久久毛片| 中文字幕中文字幕在线一区| 欧美日韩精品二区第二页| 久久er99热精品一区二区| 一区二区三区**美女毛片| 精品国产露脸精彩对白 | 久久精品久久99精品久久| 中文字幕日韩一区| www国产亚洲精品久久麻豆| 91久久精品网| www.日韩在线| 国产一区二区三区国产| 亚洲大片免费看| 国产精品久久久久婷婷| 日韩欧美aaaaaa| 另类欧美日韩国产在线| 日本一区二区视频在线| 在线观看www91| 成人av在线资源网| 国产激情偷乱视频一区二区三区| 日韩高清在线一区| 性做久久久久久| 香蕉久久一区二区不卡无毒影院| 日本一区二区电影| 国产亚洲欧美日韩日本| 精品剧情在线观看| 日韩欧美不卡一区| 久久久久久久性| 久久91精品国产91久久小草| 亚洲成人av一区| 亚洲成人激情自拍| 免费观看一级特黄欧美大片| 日韩专区在线视频| 精品无人码麻豆乱码1区2区 | 日韩一级免费观看| 日韩欧美第一区| 欧美国产成人精品| 中文字幕一区二区三| 亚洲精品写真福利| 天堂午夜影视日韩欧美一区二区| 日日欢夜夜爽一区| 国产成人综合网| 欧美日韩一区二区三区在线| 91麻豆精品国产91久久久更新时间 | 久久99热这里只有精品| 粉嫩久久99精品久久久久久夜| 久久精品国产精品亚洲综合| 成人小视频在线| 欧美军同video69gay| 久久精品水蜜桃av综合天堂| 亚洲人精品一区| 另类专区欧美蜜桃臀第一页| 99精品久久99久久久久| 欧美精品日韩一本| 久久精品欧美一区二区三区不卡| 一区二区三区四区精品在线视频| 欧美a一区二区| 在线观看亚洲精品| 中文字幕av一区二区三区高 | 久久蜜桃av一区二区天堂| 亚洲人成精品久久久久| 成人一区二区三区| 国产精品久久久久久久裸模| 亚洲国产日韩av| 91丨九色porny丨蝌蚪| 国产欧美日韩在线视频| 经典三级一区二区| 精品成人在线观看| 免费看日韩精品| 91精品国产综合久久久久久| 亚洲另类在线视频| 欧美视频在线观看一区| 性久久久久久久| 欧美午夜精品理论片a级按摩| 国产精品高潮呻吟久久| 成人国产精品免费网站|