com.sun.xml.internal.rngom.ast.om.ParsedNameClass Java Examples

The following examples show how to use com.sun.xml.internal.rngom.ast.om.ParsedNameClass. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: CompactSyntax.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
final public ParsedNameClass AnyNameExceptClass(int context, Annotations a, Annotations[] pa) throws ParseException {
Token t;
ParsedNameClass nc;
  t = jj_consume_token(25);
  checkAnyName(context, t);
  switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
  case 30:
    nc = ExceptNameClass(context | IN_ANY_NAME);
   nc = ncb.makeAnyName(nc, makeLocation(t), a);
    nc = AnnotateAfter(nc);
    break;
  default:
    jj_la1[36] = jj_gen;
    nc = ncb.makeAnyName(makeLocation(t), a);
    nc = AnnotateAfter(nc);
    nc = NameClassAlternatives(context, nc, pa);
  }
  {if (true) return nc;}
  throw new Error("Missing return statement in function");
}
 
Example #2
Source File: CompactSyntax.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
final public ParsedNameClass AnnotateAfter(ParsedNameClass nc) throws ParseException {
ParsedElementAnnotation e;
  label_10:
  while (true) {
    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    case FANNOTATE:
      ;
      break;
    default:
      jj_la1[29] = jj_gen;
      break label_10;
    }
    jj_consume_token(FANNOTATE);
    e = AnnotationElement(false);
                                             nc = ncb.annotateAfter(nc, e);
  }
  {if (true) return nc;}
  throw new Error("Missing return statement in function");
}
 
Example #3
Source File: CompactSyntax.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
final public ParsedNameClass AnyNameExceptClass(int context, Annotations a, Annotations[] pa) throws ParseException {
Token t;
ParsedNameClass nc;
  t = jj_consume_token(25);
  checkAnyName(context, t);
  switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
  case 30:
    nc = ExceptNameClass(context | IN_ANY_NAME);
   nc = ncb.makeAnyName(nc, makeLocation(t), a);
    nc = AnnotateAfter(nc);
    break;
  default:
    jj_la1[36] = jj_gen;
    nc = ncb.makeAnyName(makeLocation(t), a);
    nc = AnnotateAfter(nc);
    nc = NameClassAlternatives(context, nc, pa);
  }
  {if (true) return nc;}
  throw new Error("Missing return statement in function");
}
 
Example #4
Source File: CompactSyntax.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
final public ParsedNameClass AnnotateAfter(ParsedNameClass nc) throws ParseException {
ParsedElementAnnotation e;
  label_10:
  while (true) {
    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    case FANNOTATE:
      ;
      break;
    default:
      jj_la1[29] = jj_gen;
      break label_10;
    }
    jj_consume_token(FANNOTATE);
    e = AnnotationElement(false);
                                             nc = ncb.annotateAfter(nc, e);
  }
  {if (true) return nc;}
  throw new Error("Missing return statement in function");
}
 
Example #5
Source File: CompactSyntax.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
final public ParsedNameClass NsNameExceptClass(int context, Annotations a, Annotations[] pa) throws ParseException {
LocatedString ns;
ParsedNameClass nc;
  ns = NsName();
  checkNsName(context, ns);
  switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
  case 30:
    nc = ExceptNameClass(context | IN_NS_NAME);
   nc = ncb.makeNsName(ns.getString(), nc, ns.getLocation(), a);
    nc = AnnotateAfter(nc);
    break;
  default:
    jj_la1[35] = jj_gen;
    nc = ncb.makeNsName(ns.getString(), ns.getLocation(), a);
    nc = AnnotateAfter(nc);
    nc = NameClassAlternatives(context, nc, pa);
  }
  {if (true) return nc;}
  throw new Error("Missing return statement in function");
}
 
Example #6
Source File: NameClassBuilderHost.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
public ParsedNameClass annotate(ParsedNameClass _nc, Annotations _anno) throws BuildException {
    ParsedNameClassHost nc = (ParsedNameClassHost) _nc;
    AnnotationsHost anno = cast(_anno);

    return new ParsedNameClassHost(
        lhs.annotate(nc.lhs, anno.lhs),
        rhs.annotate(nc.rhs, anno.rhs) );
}
 
Example #7
Source File: NameClassBuilderHost.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
public ParsedNameClass makeNsName(String ns, ParsedNameClass _except, Location _loc, Annotations _anno) {
    ParsedNameClassHost except = (ParsedNameClassHost) _except;
    LocationHost loc = cast(_loc);
    AnnotationsHost anno = cast(_anno);

    return new ParsedNameClassHost(
        lhs.makeNsName( ns, except.lhs, loc.lhs, anno.lhs ),
        rhs.makeNsName( ns, except.rhs, loc.rhs, anno.rhs ) );
}
 
Example #8
Source File: NameClassBuilderHost.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
public ParsedNameClass makeName(String ns, String localName, String prefix, Location _loc, Annotations _anno) {
    LocationHost loc = cast(_loc);
    AnnotationsHost anno = cast(_anno);

    return new ParsedNameClassHost(
        lhs.makeName( ns, localName, prefix, loc.lhs, anno.lhs ),
        rhs.makeName( ns, localName, prefix, loc.rhs, anno.rhs ) );
}
 
Example #9
Source File: NameClassBuilderHost.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
public ParsedNameClass makeChoice(List _nameClasses, Location _loc, Annotations _anno) {
    List<ParsedNameClass> lnc = new ArrayList<ParsedNameClass>();
    List<ParsedNameClass> rnc = new ArrayList<ParsedNameClass>();
    for( int i=0; i<_nameClasses.size(); i++ ) {
        lnc.add(((ParsedNameClassHost)_nameClasses.get(i)).lhs);
        rnc.add(((ParsedNameClassHost)_nameClasses.get(i)).rhs);
    }
    LocationHost loc = cast(_loc);
    AnnotationsHost anno = cast(_anno);

    return new ParsedNameClassHost(
        lhs.makeChoice( lnc, loc.lhs, anno.lhs ),
        rhs.makeChoice( rnc, loc.rhs, anno.rhs ) );
}
 
Example #10
Source File: NameClassBuilderHost.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
public ParsedNameClass commentAfter(ParsedNameClass _nc, CommentList _comments) throws BuildException {
    ParsedNameClassHost nc = (ParsedNameClassHost) _nc;
    CommentListHost comments = (CommentListHost) _comments;

    return new ParsedNameClassHost(
        lhs.commentAfter(nc.lhs, comments==null?null:comments.lhs),
        rhs.commentAfter(nc.rhs, comments==null?null:comments.rhs));
}
 
Example #11
Source File: NameClassBuilderHost.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
public ParsedNameClass annotateAfter(ParsedNameClass _nc, ParsedElementAnnotation _e) throws BuildException {
    ParsedNameClassHost nc = (ParsedNameClassHost) _nc;
    ParsedElementAnnotationHost e = (ParsedElementAnnotationHost) _e;

    return new ParsedNameClassHost(
        lhs.annotateAfter(nc.lhs, e.lhs),
        rhs.annotateAfter(nc.rhs, e.rhs));
}
 
Example #12
Source File: CompactSyntax.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
final public ParsedNameClass UnprefixedNameClass(int context, Annotations a) throws ParseException {
LocatedString name;
  name = UnprefixedName();
  String ns;
  if ((context & (IN_ATTRIBUTE|IN_ELEMENT)) == IN_ATTRIBUTE)
    ns = "";
  else
    ns = defaultNamespace;
  {if (true) return ncb.makeName(ns, name.getString(), null, name.getLocation(), a);}
  throw new Error("Missing return statement in function");
}
 
Example #13
Source File: NameClassBuilderHost.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
public ParsedNameClass makeNsName(String ns, Location _loc, Annotations _anno) {
    LocationHost loc = cast(_loc);
    AnnotationsHost anno = cast(_anno);

    return new ParsedNameClassHost(
        lhs.makeNsName( ns, loc.lhs, anno.lhs ),
        rhs.makeNsName( ns, loc.rhs, anno.rhs ) );
}
 
Example #14
Source File: SchemaBuilderHost.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
public ParsedPattern makeAttribute(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.makeAttribute(nc.lhs, p.lhs, loc.lhs, anno.lhs),
        rhs.makeAttribute(nc.rhs, p.rhs, loc.rhs, anno.rhs));
}
 
Example #15
Source File: SchemaParser.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
private ParsedNameClass expandName(String name, String ns, Annotations anno) throws SAXException {
    int ic = name.indexOf(':');
    if (ic == -1) {
        return nameClassBuilder.makeName(ns, checkNCName(name), null, null, anno);
    }
    String prefix = checkNCName(name.substring(0, ic));
    String localName = checkNCName(name.substring(ic + 1));
    for (PrefixMapping tem = context.prefixMapping; tem != null; tem = tem.next) {
        if (tem.prefix.equals(prefix)) {
            return nameClassBuilder.makeName(tem.uri, localName, prefix, null, anno);
        }
    }
    error("undefined_prefix", prefix);
    return nameClassBuilder.makeName("", localName, null, null, anno);
}
 
Example #16
Source File: NameClassBuilderHost.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
public ParsedNameClass annotate(ParsedNameClass _nc, Annotations _anno) throws BuildException {
    ParsedNameClassHost nc = (ParsedNameClassHost) _nc;
    AnnotationsHost anno = cast(_anno);

    return new ParsedNameClassHost(
        lhs.annotate(nc.lhs, anno.lhs),
        rhs.annotate(nc.rhs, anno.rhs) );
}
 
Example #17
Source File: CompactSyntax.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
final public ParsedNameClass ExceptNameClass(int context) throws ParseException {
ParsedNameClass nc;
  jj_consume_token(30);
  nc = BasicNameClass(context);
  {if (true) return nc;}
  throw new Error("Missing return statement in function");
}
 
Example #18
Source File: SchemaBuilderHost.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
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));
}
 
Example #19
Source File: NameClassBuilderHost.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
public ParsedNameClass makeAnyName(ParsedNameClass _except, Location _loc, Annotations _anno) {
    ParsedNameClassHost except = (ParsedNameClassHost) _except;
    LocationHost loc = cast(_loc);
    AnnotationsHost anno = cast(_anno);

    return new ParsedNameClassHost(
        lhs.makeAnyName( except.lhs, loc.lhs, anno.lhs ),
        rhs.makeAnyName( except.rhs, loc.rhs, anno.rhs ) );
}
 
Example #20
Source File: NameClassBuilderHost.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
public ParsedNameClass makeNsName(String ns, Location _loc, Annotations _anno) {
    LocationHost loc = cast(_loc);
    AnnotationsHost anno = cast(_anno);

    return new ParsedNameClassHost(
        lhs.makeNsName( ns, loc.lhs, anno.lhs ),
        rhs.makeNsName( ns, loc.rhs, anno.rhs ) );
}
 
Example #21
Source File: CompactSyntax.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
final public ParsedPattern AttributeExpr(Scope scope, Annotations a) throws ParseException {
Token t;
ParsedNameClass nc;
ParsedPattern p;
  t = jj_consume_token(27);
  nc = NameClass(IN_ATTRIBUTE, null);
  jj_consume_token(11);
  p = Expr(false, scope, null, null);
  p = afterComments(p);
  jj_consume_token(12);
  {if (true) return sb.makeAttribute(nc, p, makeLocation(t), a);}
  throw new Error("Missing return statement in function");
}
 
Example #22
Source File: CompactSyntax.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
final public ParsedNameClass PrimaryNameClass(int context, Annotations a) throws ParseException {
ParsedNameClass nc;
  switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
  case 5:
  case 6:
  case 7:
  case 10:
  case 13:
  case 14:
  case 15:
  case 16:
  case 17:
  case 18:
  case 19:
  case 26:
  case 27:
  case 31:
  case 32:
  case 33:
  case 34:
  case 35:
  case 36:
  case IDENTIFIER:
  case ESCAPED_IDENTIFIER:
    nc = UnprefixedNameClass(context, a);
    break;
  case PREFIXED_NAME:
    nc = PrefixedNameClass(a);
    break;
  case 28:
    nc = ParenNameClass(context, a);
    break;
  default:
    jj_la1[33] = jj_gen;
    jj_consume_token(-1);
    throw new ParseException();
  }
  {if (true) return nc;}
  throw new Error("Missing return statement in function");
}
 
Example #23
Source File: NameClassBuilderHost.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
public ParsedNameClass commentAfter(ParsedNameClass _nc, CommentList _comments) throws BuildException {
    ParsedNameClassHost nc = (ParsedNameClassHost) _nc;
    CommentListHost comments = (CommentListHost) _comments;

    return new ParsedNameClassHost(
        lhs.commentAfter(nc.lhs, comments==null?null:comments.lhs),
        rhs.commentAfter(nc.rhs, comments==null?null:comments.rhs));
}
 
Example #24
Source File: CompactSyntax.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
final public ParsedNameClass UnprefixedNameClass(int context, Annotations a) throws ParseException {
LocatedString name;
  name = UnprefixedName();
  String ns;
  if ((context & (IN_ATTRIBUTE|IN_ELEMENT)) == IN_ATTRIBUTE)
    ns = "";
  else
    ns = defaultNamespace;
  {if (true) return ncb.makeName(ns, name.getString(), null, name.getLocation(), a);}
  throw new Error("Missing return statement in function");
}
 
Example #25
Source File: CompactSyntax.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
final public ParsedNameClass PrefixedNameClass(Annotations a) throws ParseException {
Token t;
  t = jj_consume_token(PREFIXED_NAME);
  String qn = t.image;
  int colon = qn.indexOf(':');
  String prefix = qn.substring(0, colon);
  {if (true) return ncb.makeName(lookupPrefix(prefix, t), qn.substring(colon + 1), prefix, makeLocation(t), a);}
  throw new Error("Missing return statement in function");
}
 
Example #26
Source File: SchemaBuilderHost.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
public ParsedPattern makeAttribute(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.makeAttribute(nc.lhs, p.lhs, loc.lhs, anno.lhs),
        rhs.makeAttribute(nc.rhs, p.rhs, loc.rhs, anno.rhs));
}
 
Example #27
Source File: SchemaParser.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
ParsedNameClass makeNameClass() {
    if (except == null) {
        return makeNameClassNoExcept();
    } else {
        return makeNameClassExcept(except);
    }
}
 
Example #28
Source File: SchemaParser.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
@Override
void endChild(ParsedNameClass nc) {
    if (nameClasses == null) {
        nameClasses = new ParsedNameClass[INIT_CHILD_ALLOC];
    } else if (nNameClasses >= nameClasses.length) {
        ParsedNameClass[] newNameClasses = new ParsedNameClass[nameClasses.length * 2];
        System.arraycopy(nameClasses, 0, newNameClasses, 0, nameClasses.length);
        nameClasses = newNameClasses;
    }
    nameClasses[nNameClasses++] = nc;
}
 
Example #29
Source File: SchemaParser.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
@Override
void endChild(ParsedNameClass nc) {
    if (nameClasses == null) {
        nameClasses = new ParsedNameClass[INIT_CHILD_ALLOC];
    } else if (nNameClasses >= nameClasses.length) {
        ParsedNameClass[] newNameClasses = new ParsedNameClass[nameClasses.length * 2];
        System.arraycopy(nameClasses, 0, newNameClasses, 0, nameClasses.length);
        nameClasses = newNameClasses;
    }
    nameClasses[nNameClasses++] = nc;
}
 
Example #30
Source File: SchemaBuilderHost.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
public ParsedPattern makeAttribute(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.makeAttribute(nc.lhs, p.lhs, loc.lhs, anno.lhs),
        rhs.makeAttribute(nc.rhs, p.rhs, loc.rhs, anno.rhs));
}