Package org.kohsuke.rngom.ast.builder

Examples of org.kohsuke.rngom.ast.builder.ElementAnnotationBuilder


    throw new Error("Missing return statement in function");
  }

  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("\n" + mungeComment(t.image), makeLocation(t), null);
    }
    {if (true) return eab.makeElementAnnotation();}
    throw new Error("Missing return statement in function");
  }
View Full Code Here


  }

  final public ParsedElementAnnotation PrefixedAnnotationElement(boolean nested) throws ParseException {
  CommentList comments = getComments();
  Token t;
  ElementAnnotationBuilder eab;
    t = jj_consume_token(PREFIXED_NAME);
    String qn = t.image;
    int colon = qn.indexOf(':');
    String prefix = qn.substring(0, colon);
    String ns = lookupPrefix(prefix, t);
    if (ns == this.inheritedNs) {
      error("inherited_annotation_namespace", t);
      ns = "";
    }
    else if (!nested && ns.equals(WellKnownNamespaces.RELAX_NG)) {
      error("relax_ng_namespace", t);
      ns = "";
    }
    else {
      if (ns.length() == 0)
        prefix = null;
    }
    eab = sb.makeElementAnnotationBuilder(ns, qn.substring(colon + 1), prefix,
                                          makeLocation(t), comments, getContext());
    AnnotationElementContent(eab);
    {if (true) return eab.makeElementAnnotation();}
    throw new Error("Missing return statement in function");
  }
View Full Code Here

  }

  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");
  }
View Full Code Here

  }

  final public ParsedElementAnnotation IdentifierAnnotationElement() throws ParseException {
  CommentList comments = getComments();
  LocatedString name;
  ElementAnnotationBuilder eab;
    name = Identifier();
    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");
  }
View Full Code Here

    throw new Error("Missing return statement in function");
  }

  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");
  }
View Full Code Here

  }

  final public ParsedElementAnnotation PrefixedAnnotationElement(boolean nested) throws ParseException {
  CommentList comments = getComments();
  Token t;
  ElementAnnotationBuilder eab;
    t = jj_consume_token(PREFIXED_NAME);
    String qn = t.image;
    int colon = qn.indexOf(':');
    String prefix = qn.substring(0, colon);
    String ns = lookupPrefix(prefix, t);
    if (ns == this.inheritedNs) {
      error("inherited_annotation_namespace", t);
      ns = "";
    }
    else if (!nested && ns.equals(WellKnownNamespaces.RELAX_NG)) {
      error("relax_ng_namespace", t);
      ns = "";
    }
    else {
      if (ns.length() == 0)
        prefix = null;
    }
    eab = sb.makeElementAnnotationBuilder(ns, qn.substring(colon + 1), prefix,
                                          makeLocation(t), comments, getContext());
    AnnotationElementContent(eab);
    {if (true) return eab.makeElementAnnotation();}
    throw new Error("Missing return statement in function");
  }
View Full Code Here

  }

  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");
  }
View Full Code Here

  }

  final public ParsedElementAnnotation IdentifierAnnotationElement() throws ParseException {
  CommentList comments = getComments();
  LocatedString name;
  ElementAnnotationBuilder eab;
    name = Identifier();
    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");
  }
View Full Code Here

TOP

Related Classes of org.kohsuke.rngom.ast.builder.ElementAnnotationBuilder

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.