public ASTAnnotation run() throws Exception { AnnotationParser parser = new AnnotationParser(new StringReader(annotationExpr)); ASTStart start = parser.Start(); return (ASTAnnotation) start.jjtGetChild(0); } });
final public void MemberValue() throws ParseException { //Token tok; switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case 9: Annotation(); break; case 14: MemberValueArrayInitializer(); break; case STRING: String(); break; case CHARACTER: Char(); break; case IDENTIFIER: Identifier(); break; default: jj_la1[5] = jj_gen; jj_consume_token(-1); throw new ParseException(); } }
jjtree.openNodeScope(jjtn000); try { jj_consume_token(14); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case IDENTIFIER: case CHARACTER: case 9: case 14: MemberValue(); label_2: while (true) { if (jj_2_2(2)) { jj_consume_token(12); MemberValue(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case 12: jj_consume_token(12); break; default: jj_consume_token(15); } catch (Throwable jjte000) { if (jjtc000) {
jjtree.openNodeScope(jjtn000);Token tok; try { jj_consume_token(9); tok = jj_consume_token(IDENTIFIER); jjtn000.setIdentifier(tok.image); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case 10: jj_consume_token(10); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case IDENTIFIER: case CHARACTER: case 9: case 14: if (jj_2_1(2)) { MemberValuePairs(); } else { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case IDENTIFIER: case CHARACTER: case 9: case 14: SingleMemberValue(); break; default: jj_la1[1] = jj_gen; jj_consume_token(-1); throw new ParseException();
final public void MemberValuePair() throws ParseException { /*@bgen(jjtree) MemberValuePair */ ASTMemberValuePair jjtn000 = new ASTMemberValuePair(JJTMEMBERVALUEPAIR); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); //Token specialToken; try { Identifier(); jj_consume_token(13); MemberValue(); } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } if (jjte000 instanceof RuntimeException) { {if (true) throw (RuntimeException)jjte000;} } if (jjte000 instanceof ParseException) { {if (true) throw (ParseException)jjte000;} } {if (true) throw (Error)jjte000;} } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); } } }
jjtree.openNodeScope(jjtn000); try { MemberValuePair(); label_1: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case 12: break label_1; jj_consume_token(12); MemberValuePair();
jjtree.openNodeScope(jjtn000); try { Annotation(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case 7: jj_consume_token(7); break; case 8: jj_consume_token(8); break; case 0: jj_consume_token(0); break; default: jj_la1[0] = jj_gen; jj_consume_token(-1); throw new ParseException();
final public void SingleMemberValue() throws ParseException { /*@bgen(jjtree) SingleMemberValue */ ASTSingleMemberValue jjtn000 = new ASTSingleMemberValue(JJTSINGLEMEMBERVALUE); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); try { MemberValue(); } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } if (jjte000 instanceof RuntimeException) { {if (true) throw (RuntimeException)jjte000;} } if (jjte000 instanceof ParseException) { {if (true) throw (ParseException)jjte000;} } {if (true) throw (Error)jjte000;} } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); } } }
jjtree.openNodeScope(jjtn000);Token tok; try { jj_consume_token(9); tok = jj_consume_token(IDENTIFIER); jjtn000.setIdentifier(tok.image); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case 10: jj_consume_token(10); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case IDENTIFIER: case CHARACTER: case 9: case 14: if (jj_2_1(2)) { MemberValuePairs(); } else { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case IDENTIFIER: case CHARACTER: case 9: case 14: SingleMemberValue(); break; default: jj_la1[1] = jj_gen; jj_consume_token(-1); throw new ParseException();
final public void MemberValuePair() throws ParseException { /*@bgen(jjtree) MemberValuePair */ ASTMemberValuePair jjtn000 = new ASTMemberValuePair(JJTMEMBERVALUEPAIR); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); //Token specialToken; try { Identifier(); jj_consume_token(13); MemberValue(); } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } if (jjte000 instanceof RuntimeException) { {if (true) throw (RuntimeException)jjte000;} } if (jjte000 instanceof ParseException) { {if (true) throw (ParseException)jjte000;} } {if (true) throw (Error)jjte000;} } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); } } }
jjtree.openNodeScope(jjtn000); try { MemberValuePair(); label_1: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case 12: break label_1; jj_consume_token(12); MemberValuePair();
jjtree.openNodeScope(jjtn000); try { Annotation(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case 7: jj_consume_token(7); break; case 8: jj_consume_token(8); break; case 0: jj_consume_token(0); break; default: jj_la1[0] = jj_gen; jj_consume_token(-1); throw new ParseException();
final public void SingleMemberValue() throws ParseException { /*@bgen(jjtree) SingleMemberValue */ ASTSingleMemberValue jjtn000 = new ASTSingleMemberValue(JJTSINGLEMEMBERVALUE); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); try { MemberValue(); } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } if (jjte000 instanceof RuntimeException) { {if (true) throw (RuntimeException)jjte000;} } if (jjte000 instanceof ParseException) { {if (true) throw (ParseException)jjte000;} } {if (true) throw (Error)jjte000;} } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); } } }
final public void MemberValue() throws ParseException { //Token tok; switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case 9: Annotation(); break; case 14: MemberValueArrayInitializer(); break; case STRING: String(); break; case CHARACTER: Char(); break; case IDENTIFIER: Identifier(); break; default: jj_la1[5] = jj_gen; jj_consume_token(-1); throw new ParseException(); } }
public ASTAnnotation run() throws Exception { String expr; if (properties != null && properties.isEmpty() == false) expr = StringPropertyReplacer.replaceProperties(annotationExpr, properties); else if (replace != null && replace) expr = StringPropertyReplacer.replaceProperties(annotationExpr); else expr = annotationExpr; AnnotationParser parser = new AnnotationParser(new StringReader(expr)); ASTStart start = parser.Start(); return (ASTAnnotation)start.jjtGetChild(0); } });
jjtree.openNodeScope(jjtn000); try { jj_consume_token(14); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case IDENTIFIER: case CHARACTER: case 9: case 14: MemberValue(); label_2: while (true) { if (jj_2_2(2)) { jj_consume_token(12); MemberValue(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case 12: jj_consume_token(12); break; default: jj_consume_token(15); } catch (Throwable jjte000) { if (jjtc000) {
public static void main(String args[]) { // System.out.println("----" + args[0]); // StringReader reader = new StringReader(args[0]); System.out.println("Reading from stdin"); AnnotationParser t = new AnnotationParser(System.in); //PointcutExpressionParser t = new PointcutExpressionParser(System.in); try { ASTStart n = t.Start(); AnnotationParserVisitor v = new AnnotationParserTester(); n.jjtAccept(v, null); } catch (Exception e) { System.out.println("Oops."); System.out.println(e.getMessage()); e.printStackTrace(); } } }
public static void main(String args[]) { // System.out.println("----" + args[0]); // StringReader reader = new StringReader(args[0]); System.out.println("Reading from stdin"); AnnotationParser t = new AnnotationParser(System.in); //PointcutExpressionParser t = new PointcutExpressionParser(System.in); try { ASTStart n = t.Start(); AnnotationParserVisitor v = new AnnotationParserTester(); n.jjtAccept(v, null); } catch (Exception e) { System.out.println("Oops."); System.out.println(e.getMessage()); e.printStackTrace(); } } }
AnnotationParser parser = new AnnotationParser(new StringReader(name + value)); try ASTStart start = parser.Start(); ast = (ASTAnnotation) start.jjtGetChild(0);
private AnnotationIntroduction(String expr, String annotationExpr, boolean invisible) { this.invisible = invisible; originalAnnotationExpr = StringPropertyReplacer.replaceProperties(annotationExpr); originalExpression = expr; try { if (AspectManager.verbose && logger.isTraceEnabled()) { logger.trace("Creating annotation from " + originalAnnotationExpr); } AnnotationParser parser = new AnnotationParser(new StringReader(originalAnnotationExpr)); org.jboss.annotation.factory.ast.ASTStart start = parser.Start(); annotation = (ASTAnnotation) start.jjtGetChild(0); } catch (ParseException e) { throw new RuntimeException(annotationExpr, e); //To change body of catch statement use Options | File Templates. } try { TypeExpressionParser parser = new TypeExpressionParser(new StringReader(expr)); target = parser.Start(); } catch (org.jboss.aop.pointcut.ast.ParseException e) { throw new RuntimeException(expr, e); //To change body of catch statement use Options | File Templates. } }