• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java ValueException类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中jdk.nashorn.internal.runtime.regexp.joni.exception.ValueException的典型用法代码示例。如果您正苦于以下问题:Java ValueException类的具体用法?Java ValueException怎么用?Java ValueException使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



ValueException类属于jdk.nashorn.internal.runtime.regexp.joni.exception包,在下文中一共展示了ValueException类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: Regex

import jdk.nashorn.internal.runtime.regexp.joni.exception.ValueException; //导入依赖的package包/类
public Regex(final char[] chars, final int p, final int end, final int optionp, final int caseFoldFlag, final Syntax syntax, final WarnCallback warnings) {
    int option = optionp;

    if ((option & (Option.DONT_CAPTURE_GROUP | Option.CAPTURE_GROUP)) ==
        (Option.DONT_CAPTURE_GROUP | Option.CAPTURE_GROUP)) {
        throw new ValueException(ErrorMessages.ERR_INVALID_COMBINATION_OF_OPTIONS);
    }

    if ((option & Option.NEGATE_SINGLELINE) != 0) {
        option |= syntax.options;
        option &= ~Option.SINGLELINE;
    } else {
        option |= syntax.options;
    }

    this.options = option;
    this.caseFoldFlag = caseFoldFlag;
    this.warnings = warnings;

    this.analyser = new Analyser(new ScanEnvironment(this, syntax), chars, p, end);
    this.analyser.compile();

    this.warnings = null;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:25,代码来源:Regex.java


示例2: fetchTokenInCCFor_u

import jdk.nashorn.internal.runtime.regexp.joni.exception.ValueException; //导入依赖的package包/类
private void fetchTokenInCCFor_u() {
    if (!left()) {
        return;
    }
    final int last = p;

    if (syntax.op2EscUHex4()) {
        int num = scanUnsignedHexadecimalNumber(4);
        if (num < 0) {
            throw new ValueException(ERR_TOO_BIG_NUMBER);
        }
        if (p == last) {  /* can't read nothing. */
            num = 0; /* but, it's not error */
        }
        token.type = TokenType.CODE_POINT;
        token.setCode(num);
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:19,代码来源:Lexer.java


示例3: fetchTokenFor_uHex

import jdk.nashorn.internal.runtime.regexp.joni.exception.ValueException; //导入依赖的package包/类
private void fetchTokenFor_uHex() {
    if (!left()) {
        return;
    }
    final int last = p;

    if (syntax.op2EscUHex4()) {
        int num = scanUnsignedHexadecimalNumber(4);
        if (num < 0) {
            throw new ValueException(ERR_TOO_BIG_NUMBER);
        }
        if (p == last) { /* can't read nothing. */
            num = 0; /* but, it's not error */
        }
        token.type = TokenType.CODE_POINT;
        token.setCode(num);
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:19,代码来源:Lexer.java


示例4: fetchTokenFor_digit

import jdk.nashorn.internal.runtime.regexp.joni.exception.ValueException; //导入依赖的package包/类
private void fetchTokenFor_digit() {
    unfetch();
    final int last = p;
    final int num = scanUnsignedNumber();
    if (num < 0 || num > Config.MAX_BACKREF_NUM) { // goto skip_backref
    } else if (syntax.opDecimalBackref() && (num <= env.numMem || num <= 9)) { /* This spec. from GNU regex */
        if (syntax.strictCheckBackref()) {
            if (num > env.numMem || env.memNodes == null || env.memNodes[num] == null) {
                throw new ValueException(ERR_INVALID_BACKREF);
            }
        }
        token.type = TokenType.BACKREF;
        token.setBackrefRef(num);
        return;
    }

    if (c == '8' || c == '9') { /* normal char */ // skip_backref:
        p = last;
        inc();
        return;
    }
    p = last;

    fetchTokenFor_zero(); /* fall through */
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:26,代码来源:Lexer.java


示例5: fetchTokenFor_zero

import jdk.nashorn.internal.runtime.regexp.joni.exception.ValueException; //导入依赖的package包/类
private void fetchTokenFor_zero() {
    if (syntax.opEscOctal3()) {
        final int last = p;
        int num = scanUnsignedOctalNumber(c == '0' ? 2 : 3);
        if (num < 0) {
            throw new ValueException(ERR_TOO_BIG_NUMBER);
        }
        if (p == last) { /* can't read nothing. */
            num = 0; /* but, it's not error */
        }
        token.type = TokenType.RAW_BYTE;
        token.setC(num);
    } else if (c != '0') {
        inc();
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:17,代码来源:Lexer.java


示例6: Regex

import jdk.nashorn.internal.runtime.regexp.joni.exception.ValueException; //导入依赖的package包/类
public Regex(final char[] chars, final int p, final int end, final int optionp, final int caseFoldFlag, final Syntax syntax, final WarnCallback warnings) {
    int option = optionp;

    if ((option & (Option.DONT_CAPTURE_GROUP | Option.CAPTURE_GROUP)) ==
        (Option.DONT_CAPTURE_GROUP | Option.CAPTURE_GROUP)) {
        throw new ValueException(ErrorMessages.ERR_INVALID_COMBINATION_OF_OPTIONS);
    }

    if ((option & Option.NEGATE_SINGLELINE) != 0) {
        option |= syntax.options;
        option &= ~Option.SINGLELINE;
    } else {
        option |= syntax.options;
    }

    this.options = option;
    this.caseFoldFlag = caseFoldFlag;
    this.warnings = warnings;

    new Analyser(new ScanEnvironment(this, syntax), chars, p, end).compile();

    this.warnings = null;
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:24,代码来源:Regex.java


示例7: Regex

import jdk.nashorn.internal.runtime.regexp.joni.exception.ValueException; //导入依赖的package包/类
public Regex(char[] chars, int p, int end, int option, int caseFoldFlag, Syntax syntax, WarnCallback warnings) {

        if ((option & (Option.DONT_CAPTURE_GROUP | Option.CAPTURE_GROUP)) ==
            (Option.DONT_CAPTURE_GROUP | Option.CAPTURE_GROUP)) {
            throw new ValueException(ErrorMessages.ERR_INVALID_COMBINATION_OF_OPTIONS);
        }

        if ((option & Option.NEGATE_SINGLELINE) != 0) {
            option |= syntax.options;
            option &= ~Option.SINGLELINE;
        } else {
            option |= syntax.options;
        }

        this.options = option;
        this.caseFoldFlag = caseFoldFlag;
        this.warnings = warnings;

        this.analyser = new Analyser(new ScanEnvironment(this, syntax), chars, p, end);
        this.analyser.compile();

        this.warnings = null;
    }
 
开发者ID:RedlineResearch,项目名称:OLD-OpenJDK8,代码行数:24,代码来源:Regex.java


示例8: fetchTokenInCCFor_u

import jdk.nashorn.internal.runtime.regexp.joni.exception.ValueException; //导入依赖的package包/类
private void fetchTokenInCCFor_u() {
    if (!left()) return;
    int last = p;

    if (syntax.op2EscUHex4()) {
        int num = scanUnsignedHexadecimalNumber(4);
        if (num < 0) {
            throw new ValueException(ERR_TOO_BIG_NUMBER);
        }
        if (p == last) {  /* can't read nothing. */
            num = 0; /* but, it's not error */
        }
        token.type = TokenType.CODE_POINT;
        token.setCode(num);
    }
}
 
开发者ID:RedlineResearch,项目名称:OLD-OpenJDK8,代码行数:17,代码来源:Lexer.java


示例9: fetchTokenFor_uHex

import jdk.nashorn.internal.runtime.regexp.joni.exception.ValueException; //导入依赖的package包/类
private void fetchTokenFor_uHex() {
    if (!left()) return;
    int last = p;

    if (syntax.op2EscUHex4()) {
        int num = scanUnsignedHexadecimalNumber(4);
        if (num < 0) {
            throw new ValueException(ERR_TOO_BIG_NUMBER);
        }
        if (p == last) { /* can't read nothing. */
            num = 0; /* but, it's not error */
        }
        token.type = TokenType.CODE_POINT;
        token.setCode(num);
    }
}
 
开发者ID:RedlineResearch,项目名称:OLD-OpenJDK8,代码行数:17,代码来源:Lexer.java


示例10: fetchTokenFor_digit

import jdk.nashorn.internal.runtime.regexp.joni.exception.ValueException; //导入依赖的package包/类
private void fetchTokenFor_digit() {
    unfetch();
    int last = p;
    int num = scanUnsignedNumber();
    if (num < 0 || num > Config.MAX_BACKREF_NUM) { // goto skip_backref
    } else if (syntax.opDecimalBackref() && (num <= env.numMem || num <= 9)) { /* This spec. from GNU regex */
        if (syntax.strictCheckBackref()) {
            if (num > env.numMem || env.memNodes == null || env.memNodes[num] == null) {
                throw new ValueException(ERR_INVALID_BACKREF);
            }
        }
        token.type = TokenType.BACKREF;
        token.setBackrefRef(num);
        return;
    }

    if (c == '8' || c == '9') { /* normal char */ // skip_backref:
        p = last;
        inc();
        return;
    }
    p = last;

    fetchTokenFor_zero(); /* fall through */
}
 
开发者ID:RedlineResearch,项目名称:OLD-OpenJDK8,代码行数:26,代码来源:Lexer.java


示例11: fetchTokenFor_zero

import jdk.nashorn.internal.runtime.regexp.joni.exception.ValueException; //导入依赖的package包/类
private void fetchTokenFor_zero() {
    if (syntax.opEscOctal3()) {
        int last = p;
        int num = scanUnsignedOctalNumber(c == '0' ? 2 : 3);
        if (num < 0) {
            throw new ValueException(ERR_TOO_BIG_NUMBER);
        }
        if (p == last) { /* can't read nothing. */
            num = 0; /* but, it's not error */
        }
        token.type = TokenType.RAW_BYTE;
        token.setC(num);
    } else if (c != '0') {
        inc();
    }
}
 
开发者ID:RedlineResearch,项目名称:OLD-OpenJDK8,代码行数:17,代码来源:Lexer.java



注:本文中的jdk.nashorn.internal.runtime.regexp.joni.exception.ValueException类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java BatchConfigurer类代码示例发布时间:2022-05-22
下一篇:
Java EnumerableConvention类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap