From d60c00c5ab55bd2c9a21a1c7344229317b868c66 Mon Sep 17 00:00:00 2001 From: Xavier Le Vourch Date: Fri, 13 Oct 2006 02:01:41 +0000 Subject: [PATCH] useless ; in java code removed git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@4634 51baf565-9d33-0410-a72c-fc3788e3496d --- pmd/etc/grammar/Java.jjt | 6 +++--- pmd/src/net/sourceforge/pmd/ast/JavaParser.java | 5 ++--- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/pmd/etc/grammar/Java.jjt b/pmd/etc/grammar/Java.jjt index a46cf845ea..31368de8f5 100644 --- a/pmd/etc/grammar/Java.jjt +++ b/pmd/etc/grammar/Java.jjt @@ -1160,7 +1160,7 @@ Token t; jjtThis.setModifiers(modifiers); } { - t = {; + t = { if (!t.image.equals("enum")) { throw new ParseException("ERROR: expecting enum"); } @@ -1312,7 +1312,7 @@ Token t;} "{" [ LOOKAHEAD(ExplicitConstructorInvocation()) ExplicitConstructorInvocation() ] ( BlockStatement() )* - t = "}" { if (isPrecededByComment(t)) { jjtThis.setContainsComment(); }; } + t = "}" { if (isPrecededByComment(t)) { jjtThis.setContainsComment(); } } } void ExplicitConstructorInvocation() : @@ -1740,7 +1740,7 @@ void LabeledStatement() : void Block() : {Token t;} { - "{" ( BlockStatement() )* t = "}" { if (isPrecededByComment(t)) { jjtThis.setContainsComment(); }; } + "{" ( BlockStatement() )* t = "}" { if (isPrecededByComment(t)) { jjtThis.setContainsComment(); } } } void BlockStatement(): diff --git a/pmd/src/net/sourceforge/pmd/ast/JavaParser.java b/pmd/src/net/sourceforge/pmd/ast/JavaParser.java index 7e38be372f..25648ae08c 100644 --- a/pmd/src/net/sourceforge/pmd/ast/JavaParser.java +++ b/pmd/src/net/sourceforge/pmd/ast/JavaParser.java @@ -585,7 +585,6 @@ jjtree.openNodeScope(jjtn000);Token t; jjtn000.setModifiers(modifiers); try { t = jj_consume_token(IDENTIFIER); - ; if (!t.image.equals("enum")) { {if (true) throw new ParseException("ERROR: expecting enum");} } @@ -1584,7 +1583,7 @@ Token t; t = jj_consume_token(RBRACE); jjtree.closeNodeScope(jjtn000, true); jjtc000 = false; - if (isPrecededByComment(t)) { jjtn000.setContainsComment(); }; + if (isPrecededByComment(t)) { jjtn000.setContainsComment(); } } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); @@ -4074,7 +4073,7 @@ jjtree.openNodeScope(jjtn000);Token t; t = jj_consume_token(RBRACE); jjtree.closeNodeScope(jjtn000, true); jjtc000 = false; - if (isPrecededByComment(t)) { jjtn000.setContainsComment(); }; + if (isPrecededByComment(t)) { jjtn000.setContainsComment(); } } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000);