From 4c07f606df843fa9538555995de95a59a2d4b405 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Fournier?= Date: Tue, 6 Aug 2019 10:35:14 +0200 Subject: [PATCH] Rename token to JavaccToken in pmd-java --- pmd-java/etc/grammar/Java.jjt | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/pmd-java/etc/grammar/Java.jjt b/pmd-java/etc/grammar/Java.jjt index cc4afba736..0ea73f7c3e 100644 --- a/pmd-java/etc/grammar/Java.jjt +++ b/pmd-java/etc/grammar/Java.jjt @@ -301,7 +301,7 @@ class JavaParser { return getToken(1).image.equals("assert"); } - private boolean isPrecededByComment(Token tok) { + private boolean isPrecededByComment(JavaccToken tok) { boolean res = false; while (!res && tok.specialToken != null) { tok = tok.specialToken; @@ -1632,7 +1632,7 @@ void TypeDeclaration(): void ClassOrInterfaceDeclaration(int modifiers): { - Token t = null; + JavaccToken t = null; jjtThis.setModifiers(modifiers); } { @@ -1663,7 +1663,7 @@ void ImplementsList(): void EnumDeclaration(int modifiers): { -Token t; +JavaccToken t; jjtThis.setModifiers(modifiers); } { @@ -1700,7 +1700,7 @@ void TypeParameters(): } void TypeParameter(): -{Token t;} +{JavaccToken t;} { AnnotationList() t= {jjtThis.setImage(t.image);} [ "extends" IntersectionType() ] @@ -1928,7 +1928,7 @@ void AnnotatedClassOrInterfaceType() #void: */ void Type() #void: { - Token t; + JavaccToken t; } { // lookahead to catch arrays of primitive types. @@ -2359,7 +2359,7 @@ void PrimaryExpression() #void : Expressions that may be present at the start of a primary expression. */ void PrimaryPrefix() #void : -{Token savedStart;} +{JavaccToken savedStart;} { Literal() | "this" #ThisExpression @@ -2544,7 +2544,7 @@ boolean LambdaParameterType() #void : } void Literal() #void : -{ Token t;} +{ JavaccToken t;} { NumericLiteral() | StringLiteral() @@ -2555,7 +2555,7 @@ void Literal() #void : void NumericLiteral(): -{ Token t; } +{ JavaccToken t; } { ( t= { jjtThis.setIntLiteral(); } | t= { jjtThis.setFloatLiteral(); } @@ -2678,13 +2678,13 @@ void Statement() #void: } void LabeledStatement() : -{Token t;} +{JavaccToken t;} { t= {jjtThis.setImage(t.image);} ":" Statement() } void Block() : -{Token t;} +{JavaccToken t;} { "{" @@ -2903,13 +2903,13 @@ void ForUpdate() : } void BreakStatement() : -{Token t;} +{JavaccToken t;} { "break" [ LOOKAHEAD( ";") t= {jjtThis.setImage(t.image);} | Expression() ] ";" } void ContinueStatement() : -{Token t;} +{JavaccToken t;} { "continue" [ t= {jjtThis.setImage(t.image);} ] ";" } @@ -3055,7 +3055,7 @@ void MemberValuePairs() #void: } void MemberValuePair(): -{Token t;} +{JavaccToken t;} { t= { jjtThis.setImage(t.image); } "=" MemberValue() } @@ -3127,7 +3127,7 @@ void AnnotationTypeMemberDeclaration(): void AnnotationMethodDeclaration(int modifiers) #MethodDeclaration: { - Token t; + JavaccToken t; jjtThis.setModifiers(modifiers); } { @@ -3150,7 +3150,7 @@ void DefaultValue(): void ModuleDeclaration(): { StringBuilder s = new StringBuilder(); - Token t; + JavaccToken t; } { ( Annotation() )* [LOOKAHEAD({isKeyword("open")}) {jjtThis.setOpen(true);}] LOOKAHEAD({isKeyword("module")}) @@ -3176,7 +3176,7 @@ void ModuleDirective(): void ModuleName(): { StringBuilder s = new StringBuilder(); - Token t; + JavaccToken t; } { t= { s.append(t.image); } @@ -3208,7 +3208,7 @@ String VoidName() #void: */ { StringBuilder s = new StringBuilder(); - Token t; + JavaccToken t; } { t=