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

Java ParsedPattern类代码示例

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

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



ParsedPattern类属于com.sun.xml.internal.rngom.ast.om包,在下文中一共展示了ParsedPattern类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: endGrammar

import com.sun.xml.internal.rngom.ast.om.ParsedPattern; //导入依赖的package包/类
public ParsedPattern endGrammar(Location loc, Annotations anno) throws BuildException {
    for (Enumeration e = defines.keys();
            e.hasMoreElements();) {
        String name = (String) e.nextElement();
        RefPattern rp = (RefPattern) defines.get(name);
        if (rp.getPattern() == null) {
            sb.error("reference_to_undefined", name, rp.getRefLocator());
            rp.setPattern(sb.pb.makeError());
        }
    }
    Pattern start = startRef.getPattern();
    if (start == null) {
        sb.error("missing_start_element", (Locator) loc);
        start = sb.pb.makeError();
    }
    return start;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:18,代码来源:SchemaBuilderImpl.java


示例2: makeInterleave

import com.sun.xml.internal.rngom.ast.om.ParsedPattern; //导入依赖的package包/类
public ParsedPattern makeInterleave(List patterns,
    Location _loc, Annotations _anno) throws BuildException {

    List<ParsedPattern> lp = new ArrayList<ParsedPattern>();
    List<ParsedPattern> rp = new ArrayList<ParsedPattern>();
    for( int i=0; i<patterns.size(); i++ ) {
        lp.add( ((ParsedPatternHost)patterns.get(i)).lhs);
        rp.add( ((ParsedPatternHost)patterns.get(i)).rhs);
    }
    LocationHost loc = cast(_loc);
    AnnotationsHost anno = cast(_anno);

    return new ParsedPatternHost(
        lhs.makeInterleave(lp, loc.lhs, anno.lhs),
        rhs.makeInterleave(rp, loc.rhs, anno.rhs));
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:17,代码来源:SchemaBuilderHost.java


示例3: makeChoice

import com.sun.xml.internal.rngom.ast.om.ParsedPattern; //导入依赖的package包/类
public ParsedPattern makeChoice(List patterns,
    Location _loc, Annotations _anno) throws BuildException {

    List<ParsedPattern> lp = new ArrayList<ParsedPattern>();
    List<ParsedPattern> rp = new ArrayList<ParsedPattern>();
    for( int i=0; i<patterns.size(); i++ ) {
        lp.add( ((ParsedPatternHost)patterns.get(i)).lhs);
        rp.add( ((ParsedPatternHost)patterns.get(i)).rhs);
    }
    LocationHost loc = cast(_loc);
    AnnotationsHost anno = cast(_anno);

    return new ParsedPatternHost(
        lhs.makeChoice(lp, loc.lhs, anno.lhs),
        rhs.makeChoice(rp, loc.rhs, anno.rhs));
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:17,代码来源:SchemaBuilderHost.java


示例4: expandPattern

import com.sun.xml.internal.rngom.ast.om.ParsedPattern; //导入依赖的package包/类
public ParsedPattern expandPattern(ParsedPattern p)
    throws BuildException, IllegalSchemaException {

    // just return the result from the user-given SchemaBuilder
    ParsedPatternHost r = (ParsedPatternHost)super.expandPattern(p);
    return r.rhs;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:8,代码来源:CheckingSchemaBuilder.java


示例5: makeOptional

import com.sun.xml.internal.rngom.ast.om.ParsedPattern; //导入依赖的package包/类
public ParsedPattern makeOptional(ParsedPattern _p, Location _loc,
    Annotations _anno) throws BuildException {

    ParsedPatternHost p = (ParsedPatternHost) _p;
    LocationHost loc = cast(_loc);
    AnnotationsHost anno = cast(_anno);

    return new ParsedPatternHost(
        lhs.makeOptional(p.lhs, loc.lhs, anno.lhs),
        rhs.makeOptional(p.rhs, loc.rhs, anno.rhs));
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:12,代码来源:SchemaBuilderHost.java


示例6: Except

import com.sun.xml.internal.rngom.ast.om.ParsedPattern; //导入依赖的package包/类
final public ParsedPattern Except(Scope scope, Token[] except) throws ParseException {
Annotations a;
ParsedPattern p;
Token t;
Token[] innerExcept = new Token[1];
  t = jj_consume_token(30);
  a = Annotations();
  p = PrimaryExpr(false, scope, a, innerExcept);
  checkExcept(innerExcept);
  except[0] = t;
  {if (true) return p;}
  throw new Error("Missing return statement in function");
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:14,代码来源:CompactSyntax.java


示例7: IdentifierExpr

import com.sun.xml.internal.rngom.ast.om.ParsedPattern; //导入依赖的package包/类
final public ParsedPattern IdentifierExpr(Scope scope, Annotations a) throws ParseException {
LocatedString name;
  name = Identifier();
  if(scope==null) {
    error("ref_outside_grammar",name.getToken());
    {if (true) return sb.makeErrorPattern();}
  } else {
    {if (true) return scope.makeRef(name.getString(), name.getLocation(), a);}
  }
  throw new Error("Missing return statement in function");
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:12,代码来源:CompactSyntax.java


示例8: onAttribute

import com.sun.xml.internal.rngom.ast.om.ParsedPattern; //导入依赖的package包/类
public ParsedPattern onAttribute(DAttributePattern p) {
    return sb.makeAttribute(
        parseNameClass(p.getName()),
        (ParsedPattern)p.getChild().accept(this),
        parseLocation(p),
        parseAnnotation(p) );
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:8,代码来源:PatternParseable.java


示例9: makeRef

import com.sun.xml.internal.rngom.ast.om.ParsedPattern; //导入依赖的package包/类
public ParsedPattern makeRef(String name, Location loc, Annotations anno) throws BuildException {
    RefPattern p = lookup1(name);
    if (p.getRefLocator() == null && loc != null) {
        p.setRefLocator((Locator) loc);
    }
    return p;
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:8,代码来源:SchemaBuilderImpl.java


示例10: makeParentRef

import com.sun.xml.internal.rngom.ast.om.ParsedPattern; //导入依赖的package包/类
public ParsedPattern makeParentRef(String name, Location _loc, Annotations _anno) throws BuildException {
    LocationHost loc = cast(_loc);
    AnnotationsHost anno = cast(_anno);

    return new ParsedPatternHost(
        lhs.makeParentRef(name, loc.lhs, anno.lhs),
        rhs.makeParentRef(name, loc.rhs, anno.rhs));
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:9,代码来源:ScopeHost.java


示例11: makeValue

import com.sun.xml.internal.rngom.ast.om.ParsedPattern; //导入依赖的package包/类
public ParsedPattern makeValue(String datatypeLibrary, String type,
    String value, Context c, String ns, Location _loc, Annotations _anno)
    throws BuildException {
    LocationHost loc = cast(_loc);
    AnnotationsHost anno = cast(_anno);

    return new ParsedPatternHost(
        lhs.makeValue(datatypeLibrary,type,value,c,ns,loc.lhs,anno.lhs),
        rhs.makeValue(datatypeLibrary,type,value,c,ns,loc.rhs,anno.rhs));
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:11,代码来源:SchemaBuilderHost.java


示例12: define

import com.sun.xml.internal.rngom.ast.om.ParsedPattern; //导入依赖的package包/类
public void define(String name, Combine combine, ParsedPattern pattern, Location loc, Annotations anno) throws BuildException {
    if(name==START) {
        grammar.start = (DPattern)pattern;
    } else {
        // TODO: handle combine
        DDefine d = grammar.getOrAdd(name);
        d.setPattern( (DPattern) pattern );
        if (anno!=null) {
            d.annotation = ((Annotation)anno).getResult();
        }
    }
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:13,代码来源:GrammarBuilderImpl.java


示例13: Input

import com.sun.xml.internal.rngom.ast.om.ParsedPattern; //导入依赖的package包/类
final public ParsedPattern Input(Scope scope) throws ParseException {
ParsedPattern p;
  Preamble();
  if (jj_2_1(2147483647)) {
    p = TopLevelGrammar(scope);
  } else {
    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    case 1:
    case 10:
    case 17:
    case 18:
    case 19:
    case 26:
    case 27:
    case 28:
    case 31:
    case 32:
    case 33:
    case 34:
    case 35:
    case 36:
    case DOCUMENTATION:
    case DOCUMENTATION_AFTER_SINGLE_LINE_COMMENT:
    case IDENTIFIER:
    case ESCAPED_IDENTIFIER:
    case PREFIXED_NAME:
    case LITERAL:
      p = Expr(true, scope, null, null);
                                       p = afterComments(p);
      jj_consume_token(0);
      break;
    default:
      jj_la1[0] = jj_gen;
      jj_consume_token(-1);
      throw new ParseException();
    }
  }
  {if (true) return p;}
  throw new Error("Missing return statement in function");
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:41,代码来源:CompactSyntax.java


示例14: onValue

import com.sun.xml.internal.rngom.ast.om.ParsedPattern; //导入依赖的package包/类
public ParsedPattern onValue(DValuePattern p) {
    return sb.makeValue(
        p.getDatatypeLibrary(),
        p.getType(),
        p.getValue(),
        p.getContext(),
        p.getNs(),
        parseLocation(p),
        parseAnnotation(p) );
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:11,代码来源:PatternParseable.java


示例15: makeInterleave

import com.sun.xml.internal.rngom.ast.om.ParsedPattern; //导入依赖的package包/类
public ParsedPattern makeInterleave(List patterns, Location loc, Annotations anno)
        throws BuildException {
    if (patterns.isEmpty()) {
        throw new IllegalArgumentException();
    }
    Pattern result = (Pattern) patterns.get(0);
    for (int i = 1; i < patterns.size(); i++) {
        result = pb.makeInterleave(result, (Pattern) patterns.get(i));
    }
    return result;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:12,代码来源:SchemaBuilderImpl.java


示例16: makePattern

import com.sun.xml.internal.rngom.ast.om.ParsedPattern; //导入依赖的package包/类
ParsedPattern makePattern() throws SAXException {
    if (type == null) {
        return makePattern("", "token");
    } else {
        return makePattern(datatypeLibrary, type);
    }
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:8,代码来源:SchemaParser.java


示例17: onElement

import com.sun.xml.internal.rngom.ast.om.ParsedPattern; //导入依赖的package包/类
public ParsedPattern onElement(DElementPattern p) {
    return sb.makeElement(
        parseNameClass(p.getName()),
        (ParsedPattern)p.getChild().accept(this),
        parseLocation(p),
        parseAnnotation(p) );
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:8,代码来源:PatternParseable.java


示例18: makeGroup

import com.sun.xml.internal.rngom.ast.om.ParsedPattern; //导入依赖的package包/类
public ParsedPattern makeGroup(List patterns, Location loc, Annotations anno)
        throws BuildException {
    if (patterns.isEmpty()) {
        throw new IllegalArgumentException();
    }
    Pattern result = (Pattern) patterns.get(0);
    for (int i = 1; i < patterns.size(); i++) {
        result = pb.makeGroup(result, (Pattern) patterns.get(i));
    }
    return result;
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:12,代码来源:SchemaBuilderImpl.java


示例19: makeElement

import com.sun.xml.internal.rngom.ast.om.ParsedPattern; //导入依赖的package包/类
public ParsedPattern makeElement(ParsedNameClass _nc, ParsedPattern _p,
    Location _loc, Annotations _anno) throws BuildException {

    ParsedNameClassHost nc = (ParsedNameClassHost) _nc;
    ParsedPatternHost p = (ParsedPatternHost) _p;
    LocationHost loc = cast(_loc);
    AnnotationsHost anno = cast(_anno);

    return new ParsedPatternHost(
        lhs.makeElement(nc.lhs, p.lhs, loc.lhs, anno.lhs),
        rhs.makeElement(nc.rhs, p.rhs, loc.rhs, anno.rhs));
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:13,代码来源:SchemaBuilderHost.java


示例20: end

import com.sun.xml.internal.rngom.ast.om.ParsedPattern; //导入依赖的package包/类
void end() throws SAXException {
    ParsedPattern p;
    if (dpb != null) {
        if (except != null) {
            p = dpb.makePattern(except, startLocation, annotations);
        } else {
            p = dpb.makePattern(startLocation, annotations);
        }
    } else {
        p = schemaBuilder.makeErrorPattern();
    }
    // XXX need to capture comments
    parent.endChild(p);
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:15,代码来源:SchemaParser.java



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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