src/jdk/nashorn/internal/runtime/regexp/joni/constants/Reduce.java

changeset 275
a92be4c0063b
parent 274
aa1b6e8c51a0
parent 273
98798a6336de
child 276
1d5a8f1f416e
     1.1 --- a/src/jdk/nashorn/internal/runtime/regexp/joni/constants/Reduce.java	Fri May 17 14:30:22 2013 -0300
     1.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.3 @@ -1,61 +0,0 @@
     1.4 -/*
     1.5 - * Permission is hereby granted, free of charge, to any person obtaining a copy of
     1.6 - * this software and associated documentation files (the "Software"), to deal in
     1.7 - * the Software without restriction, including without limitation the rights to
     1.8 - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
     1.9 - * of the Software, and to permit persons to whom the Software is furnished to do
    1.10 - * so, subject to the following conditions:
    1.11 - *
    1.12 - * The above copyright notice and this permission notice shall be included in all
    1.13 - * copies or substantial portions of the Software.
    1.14 - *
    1.15 - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    1.16 - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    1.17 - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
    1.18 - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    1.19 - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
    1.20 - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
    1.21 - * SOFTWARE.
    1.22 - */
    1.23 -package jdk.nashorn.internal.runtime.regexp.joni.constants;
    1.24 -
    1.25 -import static jdk.nashorn.internal.runtime.regexp.joni.constants.Reduce.ReduceType.A;
    1.26 -import static jdk.nashorn.internal.runtime.regexp.joni.constants.Reduce.ReduceType.AQ;
    1.27 -import static jdk.nashorn.internal.runtime.regexp.joni.constants.Reduce.ReduceType.ASIS;
    1.28 -import static jdk.nashorn.internal.runtime.regexp.joni.constants.Reduce.ReduceType.DEL;
    1.29 -import static jdk.nashorn.internal.runtime.regexp.joni.constants.Reduce.ReduceType.PQ_Q;
    1.30 -import static jdk.nashorn.internal.runtime.regexp.joni.constants.Reduce.ReduceType.P_QQ;
    1.31 -import static jdk.nashorn.internal.runtime.regexp.joni.constants.Reduce.ReduceType.QQ;
    1.32 -
    1.33 -public interface Reduce {
    1.34 -
    1.35 -    enum ReduceType {
    1.36 -        ASIS,       /* as is */
    1.37 -        DEL,        /* delete parent */
    1.38 -        A,          /* to '*'    */
    1.39 -        AQ,         /* to '*?'   */
    1.40 -        QQ,         /* to '??'   */
    1.41 -        P_QQ,       /* to '+)??' */
    1.42 -        PQ_Q,       /* to '+?)?' */
    1.43 -    }
    1.44 -
    1.45 -    final ReduceType[][]REDUCE_TABLE = {
    1.46 -      {DEL,     A,      A,      QQ,     AQ,     ASIS}, /* '?'  */
    1.47 -      {DEL,     DEL,    DEL,    P_QQ,   P_QQ,   DEL},  /* '*'  */
    1.48 -      {A,       A,      DEL,    ASIS,   P_QQ,   DEL},  /* '+'  */
    1.49 -      {DEL,     AQ,     AQ,     DEL,    AQ,     AQ},   /* '??' */
    1.50 -      {DEL,     DEL,    DEL,    DEL,    DEL,    DEL},  /* '*?' */
    1.51 -      {ASIS,    PQ_Q,   DEL,    AQ,     AQ,     DEL}   /* '+?' */
    1.52 -    };
    1.53 -
    1.54 -
    1.55 -    final String PopularQStr[] = new String[] {
    1.56 -        "?", "*", "+", "??", "*?", "+?"
    1.57 -    };
    1.58 -
    1.59 -    String ReduceQStr[]= new String[] {
    1.60 -        "", "", "*", "*?", "??", "+ and ??", "+? and ?"
    1.61 -    };
    1.62 -
    1.63 -}
    1.64 -

mercurial