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

The following examples show how to use com.sun.xml.internal.rngom.ast.om.ParsedElementAnnotation. 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 jdk8u60 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 #2
Source File: CompactSyntax.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
final public ParsedElementAnnotation AnnotationElementNotKeyword() throws ParseException {
ParsedElementAnnotation a;
  switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
  case PREFIXED_NAME:
    a = PrefixedAnnotationElement(false);
    break;
  case IDENTIFIER:
  case ESCAPED_IDENTIFIER:
    a = IdentifierAnnotationElement();
    break;
  default:
    jj_la1[62] = jj_gen;
    jj_consume_token(-1);
    throw new ParseException();
  }
  {if (true) return a;}
  throw new Error("Missing return statement in function");
}
 
Example #3
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 #4
Source File: CompactSyntax.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
final public ParsedElementAnnotation AnnotationElementNotKeyword() throws ParseException {
ParsedElementAnnotation a;
  switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
  case PREFIXED_NAME:
    a = PrefixedAnnotationElement(false);
    break;
  case IDENTIFIER:
  case ESCAPED_IDENTIFIER:
    a = IdentifierAnnotationElement();
    break;
  default:
    jj_la1[62] = jj_gen;
    jj_consume_token(-1);
    throw new ParseException();
  }
  {if (true) return a;}
  throw new Error("Missing return statement in function");
}
 
Example #5
Source File: SchemaParser.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
@Override
void endForeignChild(ParsedElementAnnotation ea) {
    if (nameClassWasAttribute || childPatterns != null || nameClass == null) {
        super.endForeignChild(ea);
    } else {
        nameClass = nameClassBuilder.annotateAfter(nameClass, ea);
    }
}
 
Example #6
Source File: CompactSyntax.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
final public ParsedElementAnnotation UnprefixedAnnotationElement() throws ParseException {
CommentList comments = getComments();
LocatedString name;
ElementAnnotationBuilder eab;
  name = UnprefixedName();
  eab = sb.makeElementAnnotationBuilder("", name.getString(), null,
                                        name.getLocation(), comments, getContext());
  AnnotationElementContent(eab);
  {if (true) return eab.makeElementAnnotation();}
  throw new Error("Missing return statement in function");
}
 
Example #7
Source File: NameClassBuilderHost.java    From openjdk-jdk8u 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 #8
Source File: SchemaParser.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
@Override
void endForeignChild(ParsedElementAnnotation ea) {
    if (nNameClasses == 0) {
        super.endForeignChild(ea);
    } else {
        nameClasses[nNameClasses - 1] = nameClassBuilder.annotateAfter(nameClasses[nNameClasses - 1], ea);
    }
}
 
Example #9
Source File: CompactSyntax.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
final public ParsedPattern AnnotatedPrimaryExpr(boolean topLevel, Scope scope, Token[] except) throws ParseException {
Annotations a;
ParsedPattern p;
ParsedElementAnnotation e;
Token t;
  a = Annotations();
  p = PrimaryExpr(topLevel, scope, a, except);
  label_5:
  while (true) {
    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    case FANNOTATE:
      ;
      break;
    default:
      jj_la1[18] = jj_gen;
      break label_5;
    }
    t = jj_consume_token(FANNOTATE);
    e = AnnotationElement(false);
     if (topLevel)
       error("top_level_follow_annotation", t);
     else
       p = sb.annotateAfter(p, e);
  }
  {if (true) return p;}
  throw new Error("Missing return statement in function");
}
 
Example #10
Source File: SchemaParser.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
@Override
void endForeignChild(ParsedElementAnnotation ea) {
    if (nameClassWasAttribute || childPatterns != null || nameClass == null) {
        super.endForeignChild(ea);
    } else {
        nameClass = nameClassBuilder.annotateAfter(nameClass, ea);
    }
}
 
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: SchemaParser.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
@Override
void endForeignChild(ParsedElementAnnotation ea) {
    // Harshit : Annotation handling should always be taken care of, irrespective of childPatterns being null or not.
    super.endForeignChild(ea);
    if (childPatterns != null) {
        int idx = childPatterns.size() - 1;
        childPatterns.set(idx, schemaBuilder.annotateAfter(childPatterns.get(idx), ea));
    }
}
 
Example #13
Source File: CompactSyntax.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
final public void GrammarComponent(GrammarSection section, Scope scope) throws ParseException {
ParsedElementAnnotation e;
Annotations a;
  a = Annotations();
  switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
  case 5:
  case IDENTIFIER:
  case ESCAPED_IDENTIFIER:
    Definition(section, scope, a);
    break;
  case 7:
    Include(section, scope, a);
    break;
  case 6:
    Div(section, scope, a);
    break;
  default:
    jj_la1[38] = jj_gen;
    jj_consume_token(-1);
    throw new ParseException();
  }
  label_14:
  while (true) {
    if (jj_2_4(2)) {
      ;
    } else {
      break label_14;
    }
    e = AnnotationElementNotKeyword();
                                                  section.topLevelAnnotation(e);
  }
}
 
Example #14
Source File: CompactSyntax.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
final public Annotations GrammarBody(GrammarSection section, Scope scope, Annotations a) throws ParseException {
ParsedElementAnnotation e;
  label_12:
  while (true) {
    if (jj_2_3(2)) {
      ;
    } else {
      break label_12;
    }
    e = AnnotationElementNotKeyword();
   if (a == null) a = sb.makeAnnotations(null, getContext()); a.addElement(e);
  }
  label_13:
  while (true) {
    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    case 1:
    case 5:
    case 6:
    case 7:
    case DOCUMENTATION:
    case DOCUMENTATION_AFTER_SINGLE_LINE_COMMENT:
    case IDENTIFIER:
    case ESCAPED_IDENTIFIER:
      ;
      break;
    default:
      jj_la1[37] = jj_gen;
      break label_13;
    }
    GrammarComponent(section, scope);
  }
  {if (true) return a;}
  throw new Error("Missing return statement in function");
}
 
Example #15
Source File: SchemaBuilderHost.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
public ParsedPattern annotateAfter(ParsedPattern _p,
    ParsedElementAnnotation _e) throws BuildException {

    ParsedPatternHost p = (ParsedPatternHost) _p;
    ParsedElementAnnotationHost e = (ParsedElementAnnotationHost) _e;
    return new ParsedPatternHost(
        lhs.annotateAfter(p.lhs, e.lhs),
        rhs.annotateAfter(p.rhs, e.rhs));
}
 
Example #16
Source File: CompactSyntax.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
final public Annotations IncludeBody(GrammarSection section, Scope scope, Annotations a) throws ParseException {
ParsedElementAnnotation e;
  label_15:
  while (true) {
    if (jj_2_5(2)) {
      ;
    } else {
      break label_15;
    }
    e = AnnotationElementNotKeyword();
   if (a == null) a = sb.makeAnnotations(null, getContext()); a.addElement(e);
  }
  label_16:
  while (true) {
    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    case 1:
    case 5:
    case 6:
    case DOCUMENTATION:
    case DOCUMENTATION_AFTER_SINGLE_LINE_COMMENT:
    case IDENTIFIER:
    case ESCAPED_IDENTIFIER:
      ;
      break;
    default:
      jj_la1[42] = jj_gen;
      break label_16;
    }
    IncludeComponent(section, scope);
  }
  {if (true) return a;}
  throw new Error("Missing return statement in function");
}
 
Example #17
Source File: CompactSyntax.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
final public Annotations IncludeBody(GrammarSection section, Scope scope, Annotations a) throws ParseException {
ParsedElementAnnotation e;
  label_15:
  while (true) {
    if (jj_2_5(2)) {
      ;
    } else {
      break label_15;
    }
    e = AnnotationElementNotKeyword();
   if (a == null) a = sb.makeAnnotations(null, getContext()); a.addElement(e);
  }
  label_16:
  while (true) {
    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    case 1:
    case 5:
    case 6:
    case DOCUMENTATION:
    case DOCUMENTATION_AFTER_SINGLE_LINE_COMMENT:
    case IDENTIFIER:
    case ESCAPED_IDENTIFIER:
      ;
      break;
    default:
      jj_la1[42] = jj_gen;
      break label_16;
    }
    IncludeComponent(section, scope);
  }
  {if (true) return a;}
  throw new Error("Missing return statement in function");
}
 
Example #18
Source File: CompactSyntax.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
final public ParsedElementAnnotation UnprefixedAnnotationElement() throws ParseException {
CommentList comments = getComments();
LocatedString name;
ElementAnnotationBuilder eab;
  name = UnprefixedName();
  eab = sb.makeElementAnnotationBuilder("", name.getString(), null,
                                        name.getLocation(), comments, getContext());
  AnnotationElementContent(eab);
  {if (true) return eab.makeElementAnnotation();}
  throw new Error("Missing return statement in function");
}
 
Example #19
Source File: SchemaParser.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
@Override
void endForeignChild(ParsedElementAnnotation ea) {
    if (nameClassWasAttribute || childPatterns != null || nameClass == null) {
        super.endForeignChild(ea);
    } else {
        nameClass = nameClassBuilder.annotateAfter(nameClass, ea);
    }
}
 
Example #20
Source File: CompactSyntax.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
final public ParsedElementAnnotation AnnotationElement(boolean nested) throws ParseException {
ParsedElementAnnotation a;
  switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
  case PREFIXED_NAME:
    a = PrefixedAnnotationElement(nested);
    break;
  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:
    a = UnprefixedAnnotationElement();
    break;
  default:
    jj_la1[61] = jj_gen;
    jj_consume_token(-1);
    throw new ParseException();
  }
  {if (true) return a;}
  throw new Error("Missing return statement in function");
}
 
Example #21
Source File: CompactSyntax.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
final public void GrammarComponent(GrammarSection section, Scope scope) throws ParseException {
ParsedElementAnnotation e;
Annotations a;
  a = Annotations();
  switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
  case 5:
  case IDENTIFIER:
  case ESCAPED_IDENTIFIER:
    Definition(section, scope, a);
    break;
  case 7:
    Include(section, scope, a);
    break;
  case 6:
    Div(section, scope, a);
    break;
  default:
    jj_la1[38] = jj_gen;
    jj_consume_token(-1);
    throw new ParseException();
  }
  label_14:
  while (true) {
    if (jj_2_4(2)) {
      ;
    } else {
      break label_14;
    }
    e = AnnotationElementNotKeyword();
                                                  section.topLevelAnnotation(e);
  }
}
 
Example #22
Source File: CompactSyntax.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
final public void IncludeComponent(GrammarSection section, Scope scope) throws ParseException {
ParsedElementAnnotation e;
Annotations a;
  a = Annotations();
  switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
  case 5:
  case IDENTIFIER:
  case ESCAPED_IDENTIFIER:
    Definition(section, scope, a);
    break;
  case 6:
    IncludeDiv(section, scope, a);
    break;
  default:
    jj_la1[43] = jj_gen;
    jj_consume_token(-1);
    throw new ParseException();
  }
  label_17:
  while (true) {
    if (jj_2_6(2)) {
      ;
    } else {
      break label_17;
    }
    e = AnnotationElementNotKeyword();
                                                  section.topLevelAnnotation(e);
  }
}
 
Example #23
Source File: SchemaBuilderHost.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
public ParsedPattern annotateAfter(ParsedPattern _p,
    ParsedElementAnnotation _e) throws BuildException {

    ParsedPatternHost p = (ParsedPatternHost) _p;
    ParsedElementAnnotationHost e = (ParsedElementAnnotationHost) _e;
    return new ParsedPatternHost(
        lhs.annotateAfter(p.lhs, e.lhs),
        rhs.annotateAfter(p.rhs, e.rhs));
}
 
Example #24
Source File: CompactSyntax.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
final public ParsedElementAnnotation Documentation() throws ParseException {
CommentList comments = getComments();
ElementAnnotationBuilder eab;
Token t;
  switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
  case DOCUMENTATION:
    t = jj_consume_token(DOCUMENTATION);
    break;
  case DOCUMENTATION_AFTER_SINGLE_LINE_COMMENT:
    t = jj_consume_token(DOCUMENTATION_AFTER_SINGLE_LINE_COMMENT);
    break;
  default:
    jj_la1[54] = jj_gen;
    jj_consume_token(-1);
    throw new ParseException();
  }
  eab = sb.makeElementAnnotationBuilder(WellKnownNamespaces.RELAX_NG_COMPATIBILITY_ANNOTATIONS,
                                        "documentation",
                                        getCompatibilityPrefix(),
                                        makeLocation(t),
                                        comments,
                                        getContext());
  eab.addText(mungeComment(t.image), makeLocation(t), null);
  label_19:
  while (true) {
    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    case DOCUMENTATION_CONTINUE:
      ;
      break;
    default:
      jj_la1[55] = jj_gen;
      break label_19;
    }
    t = jj_consume_token(DOCUMENTATION_CONTINUE);
                                eab.addText("\u005cn" + mungeComment(t.image), makeLocation(t), null);
  }
  {if (true) return eab.makeElementAnnotation();}
  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 void IncludeComponent(GrammarSection section, Scope scope) throws ParseException {
ParsedElementAnnotation e;
Annotations a;
  a = Annotations();
  switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
  case 5:
  case IDENTIFIER:
  case ESCAPED_IDENTIFIER:
    Definition(section, scope, a);
    break;
  case 6:
    IncludeDiv(section, scope, a);
    break;
  default:
    jj_la1[43] = jj_gen;
    jj_consume_token(-1);
    throw new ParseException();
  }
  label_17:
  while (true) {
    if (jj_2_6(2)) {
      ;
    } else {
      break label_17;
    }
    e = AnnotationElementNotKeyword();
                                                  section.topLevelAnnotation(e);
  }
}
 
Example #26
Source File: CompactSyntax.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
final public Annotations IncludeBody(GrammarSection section, Scope scope, Annotations a) throws ParseException {
ParsedElementAnnotation e;
  label_15:
  while (true) {
    if (jj_2_5(2)) {
      ;
    } else {
      break label_15;
    }
    e = AnnotationElementNotKeyword();
   if (a == null) a = sb.makeAnnotations(null, getContext()); a.addElement(e);
  }
  label_16:
  while (true) {
    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    case 1:
    case 5:
    case 6:
    case DOCUMENTATION:
    case DOCUMENTATION_AFTER_SINGLE_LINE_COMMENT:
    case IDENTIFIER:
    case ESCAPED_IDENTIFIER:
      ;
      break;
    default:
      jj_la1[42] = jj_gen;
      break label_16;
    }
    IncludeComponent(section, scope);
  }
  {if (true) return a;}
  throw new Error("Missing return statement in function");
}
 
Example #27
Source File: SchemaParser.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
@Override
void endForeignChild(ParsedElementAnnotation ea) {
    if (nameClassWasAttribute || childPatterns != null || nameClass == null) {
        super.endForeignChild(ea);
    } else {
        nameClass = nameClassBuilder.annotateAfter(nameClass, ea);
    }
}
 
Example #28
Source File: GrammarBuilderImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
public void topLevelAnnotation(ParsedElementAnnotation ea) throws BuildException {
    // Harshit : Fixed issue in handling of annotations
    if (additionalElementAnnotations==null) {
        additionalElementAnnotations = new ArrayList<Element>();
    }
    additionalElementAnnotations.add(((ElementWrapper)ea).element);
    if (grammar.annotation==null) {
        grammar.annotation = new DAnnotation();
    }
    grammar.annotation.contents.addAll(additionalElementAnnotations);
}
 
Example #29
Source File: CompactSyntax.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
final public ParsedPattern AnnotatedPrimaryExpr(boolean topLevel, Scope scope, Token[] except) throws ParseException {
Annotations a;
ParsedPattern p;
ParsedElementAnnotation e;
Token t;
  a = Annotations();
  p = PrimaryExpr(topLevel, scope, a, except);
  label_5:
  while (true) {
    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    case FANNOTATE:
      ;
      break;
    default:
      jj_la1[18] = jj_gen;
      break label_5;
    }
    t = jj_consume_token(FANNOTATE);
    e = AnnotationElement(false);
     if (topLevel)
       error("top_level_follow_annotation", t);
     else
       p = sb.annotateAfter(p, e);
  }
  {if (true) return p;}
  throw new Error("Missing return statement in function");
}
 
Example #30
Source File: CompactSyntax.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
final public ParsedElementAnnotation Documentation() throws ParseException {
CommentList comments = getComments();
ElementAnnotationBuilder eab;
Token t;
  switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
  case DOCUMENTATION:
    t = jj_consume_token(DOCUMENTATION);
    break;
  case DOCUMENTATION_AFTER_SINGLE_LINE_COMMENT:
    t = jj_consume_token(DOCUMENTATION_AFTER_SINGLE_LINE_COMMENT);
    break;
  default:
    jj_la1[54] = jj_gen;
    jj_consume_token(-1);
    throw new ParseException();
  }
  eab = sb.makeElementAnnotationBuilder(WellKnownNamespaces.RELAX_NG_COMPATIBILITY_ANNOTATIONS,
                                        "documentation",
                                        getCompatibilityPrefix(),
                                        makeLocation(t),
                                        comments,
                                        getContext());
  eab.addText(mungeComment(t.image), makeLocation(t), null);
  label_19:
  while (true) {
    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    case DOCUMENTATION_CONTINUE:
      ;
      break;
    default:
      jj_la1[55] = jj_gen;
      break label_19;
    }
    t = jj_consume_token(DOCUMENTATION_CONTINUE);
                                eab.addText("\u005cn" + mungeComment(t.image), makeLocation(t), null);
  }
  {if (true) return eab.makeElementAnnotation();}
  throw new Error("Missing return statement in function");
}