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

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? recompiler.java

?? jakarta-regexp-1.5 正則表達(dá)式的源代碼
?? JAVA
?? 第 1 頁(yè) / 共 4 頁(yè)
字號(hào):
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements.  See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */package org.apache.regexp;import java.util.Hashtable;/** * A regular expression compiler class.  This class compiles a pattern string into a * regular expression program interpretable by the RE evaluator class.  The 'recompile' * command line tool uses this compiler to pre-compile regular expressions for use * with RE.  For a description of the syntax accepted by RECompiler and what you can * do with regular expressions, see the documentation for the RE matcher class. * * @see RE * @see recompile * * @author <a href="mailto:jonl@muppetlabs.com">Jonathan Locke</a> * @author <a href="mailto:gholam@xtra.co.nz">Michael McCallum</a> * @version $Id: RECompiler.java 518156 2007-03-14 14:31:26Z vgritsenko $ */public class RECompiler{    // The compiled program    char[] instruction;                                 // The compiled RE 'program' instruction buffer    int lenInstruction;                                 // The amount of the program buffer currently in use    // Input state for compiling regular expression    String pattern;                                     // Input string    int len;                                            // Length of the pattern string    int idx;                                            // Current input index into ac    int parens;                                         // Total number of paren pairs    // Node flags    static final int NODE_NORMAL   = 0;                 // No flags (nothing special)    static final int NODE_NULLABLE = 1;                 // True if node is potentially null    static final int NODE_TOPLEVEL = 2;                 // True if top level expr    // Special types of 'escapes'    static final int ESC_MASK      = 0xffff0;           // Escape complexity mask    static final int ESC_BACKREF   = 0xfffff;           // Escape is really a backreference    static final int ESC_COMPLEX   = 0xffffe;           // Escape isn't really a true character    static final int ESC_CLASS     = 0xffffd;           // Escape represents a whole class of characters    // {m,n} stacks    static final int bracketUnbounded = -1;             // Unbounded value    int bracketMin;                                     // Minimum number of matches    int bracketOpt;                                     // Additional optional matches    // Lookup table for POSIX character class names    static final Hashtable hashPOSIX = new Hashtable();    static    {        hashPOSIX.put("alnum",     new Character(RE.POSIX_CLASS_ALNUM));        hashPOSIX.put("alpha",     new Character(RE.POSIX_CLASS_ALPHA));        hashPOSIX.put("blank",     new Character(RE.POSIX_CLASS_BLANK));        hashPOSIX.put("cntrl",     new Character(RE.POSIX_CLASS_CNTRL));        hashPOSIX.put("digit",     new Character(RE.POSIX_CLASS_DIGIT));        hashPOSIX.put("graph",     new Character(RE.POSIX_CLASS_GRAPH));        hashPOSIX.put("lower",     new Character(RE.POSIX_CLASS_LOWER));        hashPOSIX.put("print",     new Character(RE.POSIX_CLASS_PRINT));        hashPOSIX.put("punct",     new Character(RE.POSIX_CLASS_PUNCT));        hashPOSIX.put("space",     new Character(RE.POSIX_CLASS_SPACE));        hashPOSIX.put("upper",     new Character(RE.POSIX_CLASS_UPPER));        hashPOSIX.put("xdigit",    new Character(RE.POSIX_CLASS_XDIGIT));        hashPOSIX.put("javastart", new Character(RE.POSIX_CLASS_JSTART));        hashPOSIX.put("javapart",  new Character(RE.POSIX_CLASS_JPART));    }    /**     * Constructor.  Creates (initially empty) storage for a regular expression program.     */    public RECompiler()    {        // Start off with a generous, yet reasonable, initial size        instruction = new char[128];        lenInstruction = 0;    }    /**     * Ensures that n more characters can fit in the program buffer.     * If n more can't fit, then the size is doubled until it can.     * @param n Number of additional characters to ensure will fit.     */    void ensure(int n)    {        // Get current program length        int curlen = instruction.length;        // If the current length + n more is too much        if (lenInstruction + n >= curlen)        {            // Double the size of the program array until n more will fit            while (lenInstruction + n >= curlen)            {                curlen *= 2;            }            // Allocate new program array and move data into it            char[] newInstruction = new char[curlen];            System.arraycopy(instruction, 0, newInstruction, 0, lenInstruction);            instruction = newInstruction;        }    }    /**     * Emit a single character into the program stream.     * @param c Character to add     */    void emit(char c)    {        // Make room for character        ensure(1);        // Add character        instruction[lenInstruction++] = c;    }    /**     * Inserts a node with a given opcode and opdata at insertAt.  The node relative next     * pointer is initialized to 0.     * @param opcode Opcode for new node     * @param opdata Opdata for new node (only the low 16 bits are currently used)     * @param insertAt Index at which to insert the new node in the program     */    void nodeInsert(char opcode, int opdata, int insertAt)    {        // Make room for a new node        ensure(RE.nodeSize);        // Move everything from insertAt to the end down nodeSize elements        System.arraycopy(instruction, insertAt, instruction, insertAt + RE.nodeSize, lenInstruction - insertAt);        instruction[insertAt /* + RE.offsetOpcode */] = opcode;        instruction[insertAt    + RE.offsetOpdata   ] = (char) opdata;        instruction[insertAt    + RE.offsetNext     ] = 0;        lenInstruction += RE.nodeSize;    }    /**     * Appends a node to the end of a node chain     * @param node Start of node chain to traverse     * @param pointTo Node to have the tail of the chain point to     */    void setNextOfEnd(int node, int pointTo)    {        // Traverse the chain until the next offset is 0        int next = instruction[node + RE.offsetNext];        // while the 'node' is not the last in the chain        // and the 'node' is not the last in the program.        while ( next != 0 && node < lenInstruction )        {            // if the node we are supposed to point to is in the chain then            // point to the end of the program instead.            // Michael McCallum <gholam@xtra.co.nz>            // FIXME: This is a _hack_ to stop infinite programs.            // I believe that the implementation of the reluctant matches is wrong but            // have not worked out a better way yet.            if (node == pointTo) {                pointTo = lenInstruction;            }            node += next;            next = instruction[node + RE.offsetNext];        }        // if we have reached the end of the program then dont set the pointTo.        // im not sure if this will break any thing but passes all the tests.        if ( node < lenInstruction ) {            // Some patterns result in very large programs which exceed            // capacity of the short used for specifying signed offset of the            // next instruction. Example: a{1638}            int offset = pointTo - node;            if (offset != (short) offset) {                throw new RESyntaxException("Exceeded short jump range.");            }            // Point the last node in the chain to pointTo.            instruction[node + RE.offsetNext] = (char) (short) offset;        }    }    /**     * Adds a new node     * @param opcode Opcode for node     * @param opdata Opdata for node (only the low 16 bits are currently used)     * @return Index of new node in program     */    int node(char opcode, int opdata)    {        // Make room for a new node        ensure(RE.nodeSize);        // Add new node at end        instruction[lenInstruction /* + RE.offsetOpcode */] = opcode;        instruction[lenInstruction    + RE.offsetOpdata   ] = (char) opdata;        instruction[lenInstruction    + RE.offsetNext     ] = 0;        lenInstruction += RE.nodeSize;        // Return index of new node        return lenInstruction - RE.nodeSize;    }    /**     * Throws a new internal error exception     * @exception Error Thrown in the event of an internal error.     */    void internalError() throws Error    {        throw new Error("Internal error!");    }    /**     * Throws a new syntax error exception     * @exception RESyntaxException Thrown if the regular expression has invalid syntax.     */    void syntaxError(String s) throws RESyntaxException    {        throw new RESyntaxException(s);    }    /**     * Match bracket {m,n} expression put results in bracket member variables     * @exception RESyntaxException Thrown if the regular expression has invalid syntax.     */    void bracket() throws RESyntaxException    {        // Current character must be a '{'        if (idx >= len || pattern.charAt(idx++) != '{')        {            internalError();        }        // Next char must be a digit        if (idx >= len || !Character.isDigit(pattern.charAt(idx)))        {            syntaxError("Expected digit");        }        // Get min ('m' of {m,n}) number        StringBuffer number = new StringBuffer();        while (idx < len && Character.isDigit(pattern.charAt(idx)))        {            number.append(pattern.charAt(idx++));        }        try        {            bracketMin = Integer.parseInt(number.toString());        }        catch (NumberFormatException e)        {            syntaxError("Expected valid number");        }        // If out of input, fail        if (idx >= len)        {            syntaxError("Expected comma or right bracket");        }        // If end of expr, optional limit is 0        if (pattern.charAt(idx) == '}')        {            idx++;            bracketOpt = 0;            return;        }        // Must have at least {m,} and maybe {m,n}.        if (idx >= len || pattern.charAt(idx++) != ',')        {            syntaxError("Expected comma");        }        // If out of input, fail        if (idx >= len)        {            syntaxError("Expected comma or right bracket");        }        // If {m,} max is unlimited        if (pattern.charAt(idx) == '}')        {            idx++;            bracketOpt = bracketUnbounded;            return;        }        // Next char must be a digit        if (idx >= len || !Character.isDigit(pattern.charAt(idx)))        {            syntaxError("Expected digit");        }        // Get max number        number.setLength(0);        while (idx < len && Character.isDigit(pattern.charAt(idx)))        {            number.append(pattern.charAt(idx++));        }        try        {            bracketOpt = Integer.parseInt(number.toString()) - bracketMin;        }        catch (NumberFormatException e)        {            syntaxError("Expected valid number");        }        // Optional repetitions must be >= 0        if (bracketOpt < 0)        {            syntaxError("Bad range");        }        // Must have close brace        if (idx >= len || pattern.charAt(idx++) != '}')        {            syntaxError("Missing close brace");        }    }    /**     * Match an escape sequence.  Handles quoted chars and octal escapes as well     * as normal escape characters.  Always advances the input stream by the     * right amount. This code "understands" the subtle difference between an     * octal escape and a backref.  You can access the type of ESC_CLASS or     * ESC_COMPLEX or ESC_BACKREF by looking at pattern[idx - 1].     * @return ESC_* code or character if simple escape     * @exception RESyntaxException Thrown if the regular expression has invalid syntax.     */    int escape() throws RESyntaxException    {        // "Shouldn't" happen        if (pattern.charAt(idx) != '\\')        {            internalError();        }        // Escape shouldn't occur as last character in string!        if (idx + 1 == len)        {            syntaxError("Escape terminates string");        }        // Switch on character after backslash        idx += 2;        char escapeChar = pattern.charAt(idx - 1);        switch (escapeChar)        {            case RE.E_BOUND:            case RE.E_NBOUND:                return ESC_COMPLEX;            case RE.E_ALNUM:

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美国产一区二区| 亚洲精品老司机| 在线观看视频欧美| 国产一区二三区好的| 夜夜嗨av一区二区三区| 久久夜色精品一区| 欧美精品一二三区| 日本道免费精品一区二区三区| 精品亚洲欧美一区| 视频一区免费在线观看| 亚洲色图视频网| 日本一区二区成人| 精品蜜桃在线看| 91精品国模一区二区三区| 色呦呦一区二区三区| 成人涩涩免费视频| 蜜桃视频一区二区| 视频一区欧美精品| 亚洲成av人在线观看| 亚洲精品中文在线影院| 国产精品久久久久久久蜜臀 | 99re热这里只有精品免费视频| 蜜臀av一区二区三区| 午夜a成v人精品| 亚洲自拍另类综合| 亚洲一区免费观看| 一区二区三区精品久久久| 国产精品福利电影一区二区三区四区| 欧美精品一区二区三区蜜臀| 91精品国产高清一区二区三区| 在线观看视频一区二区| 在线中文字幕一区| 欧美在线播放高清精品| 色噜噜狠狠色综合中国| 色综合中文字幕国产| 国产v日产∨综合v精品视频| 国产精品1区2区3区| 国产精品77777竹菊影视小说| 国产一区二区不卡在线| 韩国av一区二区三区| 精品一二三四在线| 国产精品一区三区| 国产成人亚洲精品青草天美| 国产白丝精品91爽爽久久 | 狠狠久久亚洲欧美| 久久狠狠亚洲综合| 狠狠色丁香久久婷婷综合_中| 国产精品资源网站| 国产成人精品三级| 99久久婷婷国产综合精品| 99久久国产综合精品女不卡| 91片黄在线观看| 在线精品视频免费观看| 欧美日韩一区精品| 欧美一区二区三区啪啪| 精品国产91九色蝌蚪| 国产亚洲女人久久久久毛片| 国产精品毛片久久久久久久| 亚洲天堂精品在线观看| 亚洲第一电影网| 精品午夜一区二区三区在线观看 | 欧美体内she精视频| 欧美日韩精品是欧美日韩精品| 91精品欧美综合在线观看最新| 欧美成va人片在线观看| 久久精品日产第一区二区三区高清版| 国产拍欧美日韩视频二区| ●精品国产综合乱码久久久久| 亚洲精品v日韩精品| 视频一区欧美日韩| 国产传媒欧美日韩成人| 色噜噜狠狠成人中文综合| 欧美精品高清视频| 国产欧美一区二区精品秋霞影院 | 国产精品综合一区二区| 97se亚洲国产综合自在线不卡| 欧美丝袜丝交足nylons| 欧美电影免费观看高清完整版在线| 久久久久88色偷偷免费| 一区二区高清在线| 狠狠狠色丁香婷婷综合激情| 色呦呦国产精品| 日韩久久精品一区| 日韩久久一区二区| 美女视频黄 久久| a美女胸又www黄视频久久| 欧美一区二区三区日韩视频| 亚洲欧洲精品一区二区精品久久久 | 午夜精品免费在线观看| 国产精品一二三四五| 欧美色图第一页| 国产偷国产偷精品高清尤物 | 激情六月婷婷综合| 色综合色狠狠综合色| 精品国产污污免费网站入口| 一区二区三区在线视频观看58| 久久99国产精品免费网站| 日本韩国欧美一区二区三区| 久久久久免费观看| 天堂va蜜桃一区二区三区漫画版| 不卡视频在线观看| 日韩女优电影在线观看| 亚洲五月六月丁香激情| 粉嫩一区二区三区在线看| 欧美一区二区三级| 一区二区三区四区视频精品免费| 国产精品综合一区二区| 日韩一区二区精品葵司在线| 亚洲精品成人天堂一二三| 成人午夜在线视频| 精品国产乱码久久久久久久| 性做久久久久久久免费看| 91视频观看视频| 亚洲国产成人私人影院tom| 美国欧美日韩国产在线播放| 精品污污网站免费看| 自拍偷自拍亚洲精品播放| 国产精品亚洲第一| www激情久久| 久久se精品一区二区| 欧美一级午夜免费电影| 午夜视频在线观看一区| 在线亚洲欧美专区二区| 亚洲人亚洲人成电影网站色| 国产91丝袜在线18| 久久蜜桃av一区精品变态类天堂| 蜜桃视频在线观看一区二区| 制服.丝袜.亚洲.中文.综合| 亚洲第一狼人社区| 欧美无乱码久久久免费午夜一区 | **性色生活片久久毛片| 成人免费视频app| 国产精品视频线看| 国产91高潮流白浆在线麻豆| 国产三级一区二区三区| 国产成人av一区二区三区在线 | 337p粉嫩大胆噜噜噜噜噜91av| 日本中文一区二区三区| 欧美一级日韩免费不卡| 奇米色777欧美一区二区| 91精品国产综合久久久久久久 | 日韩欧美亚洲国产精品字幕久久久 | 欧美一区二区福利视频| 奇米一区二区三区av| 欧美大胆一级视频| 激情小说亚洲一区| 国产午夜精品一区二区三区嫩草 | 欧美日韩一区二区在线观看 | 91麻豆国产福利精品| 一区二区三区四区激情| 欧美午夜不卡在线观看免费| 天天综合日日夜夜精品| 欧美一区二区大片| 国产精品自在在线| 1024亚洲合集| 欧美精品自拍偷拍动漫精品| 奇米影视在线99精品| 久久精品一区二区三区四区| 成人黄色小视频在线观看| 中文字幕av一区 二区| 91久久精品日日躁夜夜躁欧美| 午夜欧美视频在线观看 | 中文乱码免费一区二区| 91猫先生在线| 日本不卡的三区四区五区| 国产视频一区在线播放| 色偷偷成人一区二区三区91| 日韩中文字幕区一区有砖一区| 日韩美一区二区三区| 成人开心网精品视频| 亚洲国产美女搞黄色| 久久综合九色综合欧美98| 91免费国产视频网站| 亚洲国产成人va在线观看天堂 | 亚洲国产精品自拍| 精品国产露脸精彩对白| 97久久精品人人做人人爽| 日韩激情一区二区| 国产精品沙发午睡系列990531| 在线观看亚洲成人| 国产成人综合在线| 亚洲小说欧美激情另类| 久久先锋资源网| 在线观看91视频| 国产麻豆精品视频| 亚洲成人中文在线| 欧美国产精品v| 欧美日韩的一区二区| 成人av动漫网站| 精品在线播放免费| 亚洲综合一二区| 欧美国产日韩在线观看| 欧美一级爆毛片| 91精品办公室少妇高潮对白| 国产精品自在在线| 老司机精品视频导航| 亚洲国产成人av网| 亚洲日本在线a| 国产日韩欧美麻豆| 91精品国产91综合久久蜜臀|