Java 类jdk.nashorn.internal.runtime.regexp.joni.ast.StringNode 实例源码

项目:OpenJSharp    文件:ArrayCompiler.java   
private static int compileLengthStringNode(final Node node) {
    final StringNode sn = (StringNode)node;
    if (sn.length() <= 0) {
        return 0;
    }
    final boolean ambig = sn.isAmbig();

    int p, prev;
    p = prev = sn.p;
    final int end = sn.end;
    final char[] chars = sn.chars;
    p++;

    int slen = 1;
    int rlen = 0;

    while (p < end) {
        slen++;
        p++;
    }
    final int r = addCompileStringlength(chars, prev, slen, ambig);
    rlen += r;
    return rlen;
}
项目:OpenJSharp    文件:Compiler.java   
private void compileStringNode(final StringNode node) {
    final StringNode sn = node;
    if (sn.length() <= 0) {
        return;
    }

    final boolean ambig = sn.isAmbig();

    int p, prev;
    p = prev = sn.p;
    final int end = sn.end;
    final char[] chars = sn.chars;
    p++;
    int slen = 1;

    while (p < end) {
        slen++;
        p++;
    }
    addCompileString(chars, prev, slen, ambig);
}
项目:OpenJSharp    文件:Parser.java   
private Node parseExpTkByte(final boolean group) {
    final StringNode node = new StringNode(chars, token.backP, p); // tk_byte:
    while (true) {
        fetchToken();
        if (token.type != TokenType.STRING) {
            break;
        }

        if (token.backP == node.end) {
            node.end = p; // non escaped character, remain shared, just increase shared range
        } else {
            node.cat(chars, token.backP, p); // non continuous string stream, need to COW
        }
    }
    // targetp = node;
    return parseExpRepeat(node, group); // string_end:, goto repeat
}
项目:openjdk-jdk10    文件:ArrayCompiler.java   
private static int compileLengthStringNode(final Node node) {
    final StringNode sn = (StringNode)node;
    if (sn.length() <= 0) {
        return 0;
    }
    final boolean ambig = sn.isAmbig();

    int p, prev;
    p = prev = sn.p;
    final int end = sn.end;
    final char[] chars = sn.chars;
    p++;

    int slen = 1;
    int rlen = 0;

    while (p < end) {
        slen++;
        p++;
    }
    final int r = addCompileStringlength(chars, prev, slen, ambig);
    rlen += r;
    return rlen;
}
项目:openjdk-jdk10    文件:Compiler.java   
private void compileStringNode(final StringNode node) {
    final StringNode sn = node;
    if (sn.length() <= 0) {
        return;
    }

    final boolean ambig = sn.isAmbig();

    int p, prev;
    p = prev = sn.p;
    final int end = sn.end;
    final char[] chars = sn.chars;
    p++;
    int slen = 1;

    while (p < end) {
        slen++;
        p++;
    }
    addCompileString(chars, prev, slen, ambig);
}
项目:openjdk-jdk10    文件:Parser.java   
private Node parseExpTkByte(final boolean group) {
    final StringNode node = new StringNode(chars, token.backP, p); // tk_byte:
    while (true) {
        fetchToken();
        if (token.type != TokenType.STRING) {
            break;
        }

        if (token.backP == node.end) {
            node.end = p; // non escaped character, remain shared, just increase shared range
        } else {
            node.cat(chars, token.backP, p); // non continuous string stream, need to COW
        }
    }
    // targetp = node;
    return parseExpRepeat(node, group); // string_end:, goto repeat
}
项目:openjdk9    文件:ArrayCompiler.java   
private static int compileLengthStringNode(final Node node) {
    final StringNode sn = (StringNode)node;
    if (sn.length() <= 0) {
        return 0;
    }
    final boolean ambig = sn.isAmbig();

    int p, prev;
    p = prev = sn.p;
    final int end = sn.end;
    final char[] chars = sn.chars;
    p++;

    int slen = 1;
    int rlen = 0;

    while (p < end) {
        slen++;
        p++;
    }
    final int r = addCompileStringlength(chars, prev, slen, ambig);
    rlen += r;
    return rlen;
}
项目:openjdk9    文件:Compiler.java   
private void compileStringNode(final StringNode node) {
    final StringNode sn = node;
    if (sn.length() <= 0) {
        return;
    }

    final boolean ambig = sn.isAmbig();

    int p, prev;
    p = prev = sn.p;
    final int end = sn.end;
    final char[] chars = sn.chars;
    p++;
    int slen = 1;

    while (p < end) {
        slen++;
        p++;
    }
    addCompileString(chars, prev, slen, ambig);
}
项目:openjdk9    文件:Parser.java   
private Node parseExpTkByte(final boolean group) {
    final StringNode node = new StringNode(chars, token.backP, p); // tk_byte:
    while (true) {
        fetchToken();
        if (token.type != TokenType.STRING) {
            break;
        }

        if (token.backP == node.end) {
            node.end = p; // non escaped character, remain shared, just increase shared range
        } else {
            node.cat(chars, token.backP, p); // non continuous string stream, need to COW
        }
    }
    // targetp = node;
    return parseExpRepeat(node, group); // string_end:, goto repeat
}
项目:kaziranga    文件:ArrayCompiler.java   
private static int compileLengthStringNode(final Node node) {
    final StringNode sn = (StringNode)node;
    if (sn.length() <= 0) {
        return 0;
    }
    final boolean ambig = sn.isAmbig();

    int p, prev;
    p = prev = sn.p;
    final int end = sn.end;
    final char[] chars = sn.chars;
    p++;

    int slen = 1;
    int rlen = 0;

    while (p < end) {
        slen++;
        p++;
    }
    final int r = addCompileStringlength(chars, prev, slen, ambig);
    rlen += r;
    return rlen;
}
项目:kaziranga    文件:Compiler.java   
private void compileStringNode(final StringNode node) {
    final StringNode sn = node;
    if (sn.length() <= 0) {
        return;
    }

    final boolean ambig = sn.isAmbig();

    int p, prev;
    p = prev = sn.p;
    final int end = sn.end;
    final char[] chars = sn.chars;
    p++;
    int slen = 1;

    while (p < end) {
        slen++;
        p++;
    }
    addCompileString(chars, prev, slen, ambig);
}
项目:kaziranga    文件:Parser.java   
private Node parseExpTkByte(final boolean group) {
    final StringNode node = new StringNode(chars, token.backP, p); // tk_byte:
    while (true) {
        fetchToken();
        if (token.type != TokenType.STRING) {
            break;
        }

        if (token.backP == node.end) {
            node.end = p; // non escaped character, remain shared, just increase shared range
        } else {
            node.cat(chars, token.backP, p); // non continuous string stream, need to COW
        }
    }
    // targetp = node;
    return parseExpRepeat(node, group); // string_end:, goto repeat
}
项目:lookaside_java-1.8.0-openjdk    文件:ArrayCompiler.java   
private static int compileLengthStringNode(final Node node) {
    final StringNode sn = (StringNode)node;
    if (sn.length() <= 0) {
        return 0;
    }
    final boolean ambig = sn.isAmbig();

    int p, prev;
    p = prev = sn.p;
    final int end = sn.end;
    final char[] chars = sn.chars;
    p++;

    int slen = 1;
    int rlen = 0;

    while (p < end) {
        slen++;
        p++;
    }
    final int r = addCompileStringlength(chars, prev, slen, ambig);
    rlen += r;
    return rlen;
}
项目:lookaside_java-1.8.0-openjdk    文件:Compiler.java   
private void compileStringNode(final StringNode node) {
    final StringNode sn = node;
    if (sn.length() <= 0) {
        return;
    }

    final boolean ambig = sn.isAmbig();

    int p, prev;
    p = prev = sn.p;
    final int end = sn.end;
    final char[] chars = sn.chars;
    p++;
    int slen = 1;

    while (p < end) {
        slen++;
        p++;
    }
    addCompileString(chars, prev, slen, ambig);
}
项目:lookaside_java-1.8.0-openjdk    文件:Parser.java   
private Node parseExpTkByte(final boolean group) {
    final StringNode node = new StringNode(chars, token.backP, p); // tk_byte:
    while (true) {
        fetchToken();
        if (token.type != TokenType.STRING) {
            break;
        }

        if (token.backP == node.end) {
            node.end = p; // non escaped character, remain shared, just increase shared range
        } else {
            node.cat(chars, token.backP, p); // non continuous string stream, need to COW
        }
    }
    // targetp = node;
    return parseExpRepeat(node, group); // string_end:, goto repeat
}
项目:jdk8u_nashorn    文件:ArrayCompiler.java   
private static int compileLengthStringNode(final Node node) {
    final StringNode sn = (StringNode)node;
    if (sn.length() <= 0) {
        return 0;
    }
    final boolean ambig = sn.isAmbig();

    int p, prev;
    p = prev = sn.p;
    final int end = sn.end;
    final char[] chars = sn.chars;
    p++;

    int slen = 1;
    int rlen = 0;

    while (p < end) {
        slen++;
        p++;
    }
    final int r = addCompileStringlength(chars, prev, slen, ambig);
    rlen += r;
    return rlen;
}
项目:jdk8u_nashorn    文件:Compiler.java   
private void compileStringNode(final StringNode node) {
    final StringNode sn = node;
    if (sn.length() <= 0) {
        return;
    }

    final boolean ambig = sn.isAmbig();

    int p, prev;
    p = prev = sn.p;
    final int end = sn.end;
    final char[] chars = sn.chars;
    p++;
    int slen = 1;

    while (p < end) {
        slen++;
        p++;
    }
    addCompileString(chars, prev, slen, ambig);
}
项目:jdk8u_nashorn    文件:Parser.java   
private Node parseExpTkByte(final boolean group) {
    final StringNode node = new StringNode(chars, token.backP, p); // tk_byte:
    while (true) {
        fetchToken();
        if (token.type != TokenType.STRING) {
            break;
        }

        if (token.backP == node.end) {
            node.end = p; // non escaped character, remain shared, just increase shared range
        } else {
            node.cat(chars, token.backP, p); // non continuous string stream, need to COW
        }
    }
    // targetp = node;
    return parseExpRepeat(node, group); // string_end:, goto repeat
}
项目:infobip-open-jdk-8    文件:ArrayCompiler.java   
private static int compileLengthStringNode(final Node node) {
    final StringNode sn = (StringNode)node;
    if (sn.length() <= 0) {
        return 0;
    }
    final boolean ambig = sn.isAmbig();

    int p, prev;
    p = prev = sn.p;
    final int end = sn.end;
    final char[] chars = sn.chars;
    p++;

    int slen = 1;
    int rlen = 0;

    while (p < end) {
        slen++;
        p++;
    }
    final int r = addCompileStringlength(chars, prev, slen, ambig);
    rlen += r;
    return rlen;
}
项目:infobip-open-jdk-8    文件:Compiler.java   
private void compileStringNode(final StringNode node) {
    final StringNode sn = node;
    if (sn.length() <= 0) {
        return;
    }

    final boolean ambig = sn.isAmbig();

    int p, prev;
    p = prev = sn.p;
    final int end = sn.end;
    final char[] chars = sn.chars;
    p++;
    int slen = 1;

    while (p < end) {
        slen++;
        p++;
    }
    addCompileString(chars, prev, slen, ambig);
}
项目:infobip-open-jdk-8    文件:Parser.java   
private Node parseExpTkByte(final boolean group) {
    final StringNode node = new StringNode(chars, token.backP, p); // tk_byte:
    while (true) {
        fetchToken();
        if (token.type != TokenType.STRING) {
            break;
        }

        if (token.backP == node.end) {
            node.end = p; // non escaped character, remain shared, just increase shared range
        } else {
            node.cat(chars, token.backP, p); // non continuous string stream, need to COW
        }
    }
    // targetp = node;
    return parseExpRepeat(node, group); // string_end:, goto repeat
}
项目:OLD-OpenJDK8    文件:ArrayCompiler.java   
private int compileLengthStringNode(Node node) {
    StringNode sn = (StringNode)node;
    if (sn.length() <= 0) return 0;
    boolean ambig = sn.isAmbig();

    int p, prev;
    p = prev = sn.p;
    int end = sn.end;
    char[] chars = sn.chars;
    p++;

    int slen = 1;
    int rlen = 0;

    while (p < end) {
        slen++;
        p++;
    }
    int r = addCompileStringlength(chars, prev, slen, ambig);
    rlen += r;
    return rlen;
}
项目:OLD-OpenJDK8    文件:Compiler.java   
private void compileStringNode(StringNode node) {
    StringNode sn = node;
    if (sn.length() <= 0) return;

    boolean ambig = sn.isAmbig();

    int p, prev;
    p = prev = sn.p;
    int end = sn.end;
    char[] chars = sn.chars;
    p++;
    int slen = 1;

    while (p < end) {
        slen++;
        p++;
    }
    addCompileString(chars, prev, slen, ambig);
}
项目:nashorn-backport    文件:ArrayCompiler.java   
private int compileLengthStringNode(Node node) {
    StringNode sn = (StringNode)node;
    if (sn.length() <= 0) return 0;
    boolean ambig = sn.isAmbig();

    int p, prev;
    p = prev = sn.p;
    int end = sn.end;
    char[] chars = sn.chars;
    p++;

    int slen = 1;
    int rlen = 0;

    while (p < end) {
        slen++;
        p++;
    }
    int r = addCompileStringlength(chars, prev, slen, ambig);
    rlen += r;
    return rlen;
}
项目:nashorn-backport    文件:Compiler.java   
private void compileStringNode(StringNode node) {
    StringNode sn = node;
    if (sn.length() <= 0) return;

    boolean ambig = sn.isAmbig();

    int p, prev;
    p = prev = sn.p;
    int end = sn.end;
    char[] chars = sn.chars;
    p++;
    int slen = 1;

    while (p < end) {
        slen++;
        p++;
    }
    addCompileString(chars, prev, slen, ambig);
}
项目:nashorn    文件:ArrayCompiler.java   
private int compileLengthStringNode(Node node) {
    StringNode sn = (StringNode)node;
    if (sn.length() <= 0) return 0;
    boolean ambig = sn.isAmbig();

    int p, prev;
    p = prev = sn.p;
    int end = sn.end;
    char[] chars = sn.chars;
    p++;

    int slen = 1;
    int rlen = 0;

    while (p < end) {
        slen++;
        p++;
    }
    int r = addCompileStringlength(chars, prev, slen, ambig);
    rlen += r;
    return rlen;
}
项目:nashorn    文件:Compiler.java   
private void compileStringNode(StringNode node) {
    StringNode sn = node;
    if (sn.length() <= 0) return;

    boolean ambig = sn.isAmbig();

    int p, prev;
    p = prev = sn.p;
    int end = sn.end;
    char[] chars = sn.chars;
    p++;
    int slen = 1;

    while (p < end) {
        slen++;
        p++;
    }
    addCompileString(chars, prev, slen, ambig);
}
项目:OpenJSharp    文件:Parser.java   
private Node parseExpTkRawByte(final boolean group) {
    // tk_raw_byte:

    // important: we don't use 0xff mask here neither in the compiler
    // (in the template string) so we won't have to mask target
    // strings when comparing against them in the matcher
    final StringNode node = new StringNode((char)token.getC());
    node.setRaw();

    fetchToken();
    node.clearRaw();
    // !goto string_end;!
    return parseExpRepeat(node, group);
}
项目:OpenJSharp    文件:Analyser.java   
private void updateStringNodeCaseFoldMultiByte(final StringNode sn) {
    final char[] ch = sn.chars;
    final int end = sn.end;
    value = sn.p;
    int sp = 0;
    char buf;

    while (value < end) {
        final int ovalue = value;
        buf = EncodingHelper.toLowerCase(ch[value++]);

        if (ch[ovalue] != buf) {

            char[] sbuf = new char[sn.length() << 1];
            System.arraycopy(ch, sn.p, sbuf, 0, ovalue - sn.p);
            value = ovalue;
            while (value < end) {
                buf = EncodingHelper.toLowerCase(ch[value++]);
                if (sp >= sbuf.length) {
                    final char[]tmp = new char[sbuf.length << 1];
                    System.arraycopy(sbuf, 0, tmp, 0, sbuf.length);
                    sbuf = tmp;
                }
                sbuf[sp++] = buf;
            }
            sn.set(sbuf, 0, sp);
            return;
        }
        sp++;
    }
}
项目:OpenJSharp    文件:Analyser.java   
private Node expandCaseFoldMakeRemString(final char[] ch, final int pp, final int end) {
    final StringNode node = new StringNode(ch, pp, end);

    updateStringNodeCaseFold(node);
    node.setAmbig();
    node.setDontGetOptInfo();
    return node;
}
项目:openjdk-jdk10    文件:Parser.java   
private Node parseExpTkRawByte(final boolean group) {
    // tk_raw_byte:

    // important: we don't use 0xff mask here neither in the compiler
    // (in the template string) so we won't have to mask target
    // strings when comparing against them in the matcher
    final StringNode node = new StringNode((char)token.getC());
    node.setRaw();

    fetchToken();
    node.clearRaw();
    // !goto string_end;!
    return parseExpRepeat(node, group);
}
项目:openjdk-jdk10    文件:Analyser.java   
private void updateStringNodeCaseFoldMultiByte(final StringNode sn) {
    final char[] ch = sn.chars;
    final int end = sn.end;
    value = sn.p;
    int sp = 0;
    char buf;

    while (value < end) {
        final int ovalue = value;
        buf = EncodingHelper.toLowerCase(ch[value++]);

        if (ch[ovalue] != buf) {

            char[] sbuf = new char[sn.length() << 1];
            System.arraycopy(ch, sn.p, sbuf, 0, ovalue - sn.p);
            value = ovalue;
            while (value < end) {
                buf = EncodingHelper.toLowerCase(ch[value++]);
                if (sp >= sbuf.length) {
                    final char[]tmp = new char[sbuf.length << 1];
                    System.arraycopy(sbuf, 0, tmp, 0, sbuf.length);
                    sbuf = tmp;
                }
                sbuf[sp++] = buf;
            }
            sn.set(sbuf, 0, sp);
            return;
        }
        sp++;
    }
}
项目:openjdk-jdk10    文件:Analyser.java   
private Node expandCaseFoldMakeRemString(final char[] ch, final int pp, final int end) {
    final StringNode node = new StringNode(ch, pp, end);

    updateStringNodeCaseFold(node);
    node.setAmbig();
    node.setDontGetOptInfo();
    return node;
}
项目:openjdk9    文件:Parser.java   
private Node parseExpTkRawByte(final boolean group) {
    // tk_raw_byte:

    // important: we don't use 0xff mask here neither in the compiler
    // (in the template string) so we won't have to mask target
    // strings when comparing against them in the matcher
    final StringNode node = new StringNode((char)token.getC());
    node.setRaw();

    fetchToken();
    node.clearRaw();
    // !goto string_end;!
    return parseExpRepeat(node, group);
}
项目:openjdk9    文件:Analyser.java   
private void updateStringNodeCaseFoldMultiByte(final StringNode sn) {
    final char[] ch = sn.chars;
    final int end = sn.end;
    value = sn.p;
    int sp = 0;
    char buf;

    while (value < end) {
        final int ovalue = value;
        buf = EncodingHelper.toLowerCase(ch[value++]);

        if (ch[ovalue] != buf) {

            char[] sbuf = new char[sn.length() << 1];
            System.arraycopy(ch, sn.p, sbuf, 0, ovalue - sn.p);
            value = ovalue;
            while (value < end) {
                buf = EncodingHelper.toLowerCase(ch[value++]);
                if (sp >= sbuf.length) {
                    final char[]tmp = new char[sbuf.length << 1];
                    System.arraycopy(sbuf, 0, tmp, 0, sbuf.length);
                    sbuf = tmp;
                }
                sbuf[sp++] = buf;
            }
            sn.set(sbuf, 0, sp);
            return;
        }
        sp++;
    }
}
项目:openjdk9    文件:Analyser.java   
private Node expandCaseFoldMakeRemString(final char[] ch, final int pp, final int end) {
    final StringNode node = new StringNode(ch, pp, end);

    updateStringNodeCaseFold(node);
    node.setAmbig();
    node.setDontGetOptInfo();
    return node;
}
项目:kaziranga    文件:Parser.java   
private Node parseExpTkRawByte(final boolean group) {
    // tk_raw_byte:

    // important: we don't use 0xff mask here neither in the compiler
    // (in the template string) so we won't have to mask target
    // strings when comparing against them in the matcher
    final StringNode node = new StringNode((char)token.getC());
    node.setRaw();

    fetchToken();
    node.clearRaw();
    // !goto string_end;!
    return parseExpRepeat(node, group);
}
项目:kaziranga    文件:Analyser.java   
private void updateStringNodeCaseFoldMultiByte(final StringNode sn) {
    final char[] ch = sn.chars;
    final int end = sn.end;
    value = sn.p;
    int sp = 0;
    char buf;

    while (value < end) {
        final int ovalue = value;
        buf = EncodingHelper.toLowerCase(ch[value++]);

        if (ch[ovalue] != buf) {

            char[] sbuf = new char[sn.length() << 1];
            System.arraycopy(ch, sn.p, sbuf, 0, ovalue - sn.p);
            value = ovalue;
            while (value < end) {
                buf = EncodingHelper.toLowerCase(ch[value++]);
                if (sp >= sbuf.length) {
                    final char[]tmp = new char[sbuf.length << 1];
                    System.arraycopy(sbuf, 0, tmp, 0, sbuf.length);
                    sbuf = tmp;
                }
                sbuf[sp++] = buf;
            }
            sn.set(sbuf, 0, sp);
            return;
        }
        sp++;
    }
}
项目:kaziranga    文件:Analyser.java   
private Node expandCaseFoldMakeRemString(final char[] ch, final int pp, final int end) {
    final StringNode node = new StringNode(ch, pp, end);

    updateStringNodeCaseFold(node);
    node.setAmbig();
    node.setDontGetOptInfo();
    return node;
}
项目:lookaside_java-1.8.0-openjdk    文件:Parser.java   
private Node parseExpTkRawByte(final boolean group) {
    // tk_raw_byte:

    // important: we don't use 0xff mask here neither in the compiler
    // (in the template string) so we won't have to mask target
    // strings when comparing against them in the matcher
    final StringNode node = new StringNode((char)token.getC());
    node.setRaw();

    fetchToken();
    node.clearRaw();
    // !goto string_end;!
    return parseExpRepeat(node, group);
}