private NameClass afterNameClassComments(NameClass nc) { CommentListImpl comments = getComments(null); if (comments == null) return nc; return sb.commentAfterNameClass(nc, comments); }
private Pattern afterPatternComments(Pattern p) { CommentListImpl comments = getComments(null); if (comments == null) return p; return sb.commentAfterPattern(p, comments); }
private AnnotationsImpl getTopLevelCommentsAsAnnotations() { CommentListImpl comments = getTopLevelComments(); if (comments == null) return null; return sb.makeAnnotations(comments, getContext()); }
case 23: t = jj_consume_token(23); checkExcept(except); p = sb.makeOneOrMore(p, makeLocation(t), null); break; case 24: t = jj_consume_token(24); checkExcept(except); p = sb.makeOptional(p, makeLocation(t), null); break; case 25: t = jj_consume_token(25); checkExcept(except); p = sb.makeZeroOrMore(p, makeLocation(t), null); break; default: error("top_level_follow_annotation", t); else p = sb.annotateAfterPattern(p, e);
p = sb.makeChoice(patterns, makeLocation(t), a); break; case 21: p = sb.makeInterleave(patterns, makeLocation(t), a); break; case 22: p = sb.makeGroup(patterns, makeLocation(t), a); break; default: p = sb.annotatePattern(p, a); else p = sb.makeGroup(patterns, makeLocation(t), a);
final public NameClass OpenNameClass(int context, AnnotationsImpl a) throws ParseException { Token t; LocatedString ns; switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case PREFIX_STAR: ns = NsName(); checkNsName(context, ns); {if (true) return sb.makeNsName(ns.getString(), ns.getLocation(), a);} break; case 25: t = jj_consume_token(25); checkAnyName(context, t); {if (true) return sb.makeAnyName(makeLocation(t), a);} break; default: jj_la1[34] = jj_gen; jj_consume_token(-1); throw new ParseException(); } throw new Error("Missing return statement in function"); }
public CompactSyntax(Reader r, String sourceUri, SchemaBuilder<Pattern, NameClass, Location, ElementAnnotation, CommentListImpl, AnnotationsImpl> sb, ErrorHandler eh) { this(r); this.sourceUri = sourceUri; this.sb = sb; this.eh = eh; // this causes the root pattern to have non-null annotations // which is useful because it gives a context to trang this.topLevelComments = sb.makeCommentList(); }
final public Pattern AttributeExpr(Scope<Pattern, Location, ElementAnnotation, CommentListImpl, AnnotationsImpl> scope, AnnotationsImpl a) throws ParseException { Token t; NameClass nc; Pattern p; t = jj_consume_token(27); nc = NameClass(IN_ATTRIBUTE, null); jj_consume_token(11); p = Expr(false, scope, null, null); p = afterPatternComments(p); jj_consume_token(12); {if (true) return sb.makeAttribute(nc, p, makeLocation(t), a);} throw new Error("Missing return statement in function"); }
final public NameClass AnyNameExceptClass(int context, AnnotationsImpl a, Ref<AnnotationsImpl> ra) throws ParseException { Token t; NameClass 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 = sb.makeAnyName(nc, makeLocation(t), a); nc = AnnotateAfter(nc); break; default: jj_la1[36] = jj_gen; nc = sb.makeAnyName(makeLocation(t), a); nc = AnnotateAfter(nc); nc = NameClassAlternatives(context, nc, ra); } {if (true) return nc;} throw new Error("Missing return statement in function"); }
final public NameClass AnnotateAfter(NameClass nc) throws ParseException { ElementAnnotation 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 = sb.annotateAfterNameClass(nc, e); } {if (true) return nc;} throw new Error("Missing return statement in function"); }
final public Pattern AnnotatedPrimaryExpr(boolean topLevel, Scope<Pattern, Location, ElementAnnotation, CommentListImpl, AnnotationsImpl> scope, Token[] except) throws ParseException { AnnotationsImpl a; Pattern p; ElementAnnotation e; Token t; a = AnnotationsImpl(); 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.annotateAfterPattern(p, e); } {if (true) return p;} throw new Error("Missing return statement in function"); }
case 23: t = jj_consume_token(23); checkExcept(except); p = sb.makeOneOrMore(p, makeLocation(t), null); break; case 24: t = jj_consume_token(24); checkExcept(except); p = sb.makeOptional(p, makeLocation(t), null); break; case 25: t = jj_consume_token(25); checkExcept(except); p = sb.makeZeroOrMore(p, makeLocation(t), null); break; default: error("top_level_follow_annotation", t); else p = sb.annotateAfterPattern(p, e);
p = sb.makeChoice(patterns, makeLocation(t), a); break; case 21: p = sb.makeInterleave(patterns, makeLocation(t), a); break; case 22: p = sb.makeGroup(patterns, makeLocation(t), a); break; default: p = sb.annotatePattern(p, a); else p = sb.makeGroup(patterns, makeLocation(t), a);
final public NameClass OpenNameClass(int context, AnnotationsImpl a) throws ParseException { Token t; LocatedString ns; switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case PREFIX_STAR: ns = NsName(); checkNsName(context, ns); {if (true) return sb.makeNsName(ns.getString(), ns.getLocation(), a);} break; case 25: t = jj_consume_token(25); checkAnyName(context, t); {if (true) return sb.makeAnyName(makeLocation(t), a);} break; default: jj_la1[34] = jj_gen; jj_consume_token(-1); throw new ParseException(); } throw new Error("Missing return statement in function"); }
public CompactSyntax(Reader r, String sourceUri, SchemaBuilder<Pattern, NameClass, Location, ElementAnnotation, CommentListImpl, AnnotationsImpl> sb, ErrorHandler eh) { this(r); this.sourceUri = sourceUri; this.sb = sb; this.eh = eh; // this causes the root pattern to have non-null annotations // which is useful because it gives a context to trang this.topLevelComments = sb.makeCommentList(); }
final public Pattern AttributeExpr(Scope<Pattern, Location, ElementAnnotation, CommentListImpl, AnnotationsImpl> scope, AnnotationsImpl a) throws ParseException { Token t; NameClass nc; Pattern p; t = jj_consume_token(27); nc = NameClass(IN_ATTRIBUTE, null); jj_consume_token(11); p = Expr(false, scope, null, null); p = afterPatternComments(p); jj_consume_token(12); {if (true) return sb.makeAttribute(nc, p, makeLocation(t), a);} throw new Error("Missing return statement in function"); }
final public NameClass AnyNameExceptClass(int context, AnnotationsImpl a, Ref<AnnotationsImpl> ra) throws ParseException { Token t; NameClass 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 = sb.makeAnyName(nc, makeLocation(t), a); nc = AnnotateAfter(nc); break; default: jj_la1[36] = jj_gen; nc = sb.makeAnyName(makeLocation(t), a); nc = AnnotateAfter(nc); nc = NameClassAlternatives(context, nc, ra); } {if (true) return nc;} throw new Error("Missing return statement in function"); }
final public NameClass AnnotateAfter(NameClass nc) throws ParseException { ElementAnnotation 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 = sb.annotateAfterNameClass(nc, e); } {if (true) return nc;} throw new Error("Missing return statement in function"); }
final public Pattern AnnotatedPrimaryExpr(boolean topLevel, Scope<Pattern, Location, ElementAnnotation, CommentListImpl, AnnotationsImpl> scope, Token[] except) throws ParseException { AnnotationsImpl a; Pattern p; ElementAnnotation e; Token t; a = AnnotationsImpl(); 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.annotateAfterPattern(p, e); } {if (true) return p;} throw new Error("Missing return statement in function"); }
case 23: t = jj_consume_token(23); checkExcept(except); p = sb.makeOneOrMore(p, makeLocation(t), null); break; case 24: t = jj_consume_token(24); checkExcept(except); p = sb.makeOptional(p, makeLocation(t), null); break; case 25: t = jj_consume_token(25); checkExcept(except); p = sb.makeZeroOrMore(p, makeLocation(t), null); break; default: error("top_level_follow_annotation", t); else p = sb.annotateAfterPattern(p, e);