diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/CoreModel.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/CoreModel.java
index b6eda1977bf..313cc76e9e2 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/CoreModel.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/CoreModel.java
@@ -376,7 +376,6 @@ public class CoreModel {
return null;
}
-
/**
* Return true if project has C nature.
*/
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTCompositeTypeSpecifier.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTCompositeTypeSpecifier.java
index c4c407f62a7..329de465334 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTCompositeTypeSpecifier.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTCompositeTypeSpecifier.java
@@ -17,7 +17,6 @@ package org.eclipse.cdt.core.dom.ast;
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface IASTCompositeTypeSpecifier extends IASTDeclSpecifier, IASTNameOwner, IASTDeclarationListOwner {
-
/**
* TYPE_NAME
represents the relationship between an
* IASTCompositeTypeSpecifier
and its IASTName
.
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTElaboratedTypeSpecifier.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTElaboratedTypeSpecifier.java
index 9b6f7879f84..4bb8807777f 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTElaboratedTypeSpecifier.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTElaboratedTypeSpecifier.java
@@ -17,7 +17,6 @@ package org.eclipse.cdt.core.dom.ast;
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface IASTElaboratedTypeSpecifier extends IASTDeclSpecifier, IASTNameOwner {
-
/**
* Enumeration.
*/
@@ -39,17 +38,16 @@ public interface IASTElaboratedTypeSpecifier extends IASTDeclSpecifier, IASTName
public static final int k_last = k_union;
/**
- * Get the kind.
+ * Returns the kind.
*
* @return int (kind).
*/
public int getKind();
/**
- * Set the kind.
+ * Sets the kind.
*
- * @param value
- * int (kind)
+ * @param value int (kind)
*/
public void setKind(int value);
@@ -61,14 +59,14 @@ public interface IASTElaboratedTypeSpecifier extends IASTDeclSpecifier, IASTName
"IASTElaboratedTypeSpecifier.TYPE_NAME - IASTName for IASTElaboratedTypeSpecifier"); //$NON-NLS-1$
/**
- * Get the name.
+ * Returns the name.
*
* @return IASTName
*/
public IASTName getName();
/**
- * Set the name.
+ * Sets the name.
*
* @param name
* IASTName
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTEnumerationSpecifier.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTEnumerationSpecifier.java
index db16a75e72f..f61564f2c8d 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTEnumerationSpecifier.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTEnumerationSpecifier.java
@@ -6,7 +6,7 @@
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * John Camelon (IBM Rational Software) - Initial API and implementation
+ * John Camelon (IBM Rational Software) - Initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.core.dom.ast;
@@ -17,7 +17,6 @@ package org.eclipse.cdt.core.dom.ast;
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface IASTEnumerationSpecifier extends IASTDeclSpecifier, IASTNameOwner {
-
/**
* This interface represents an enumerator member of an enum specifier.
*
@@ -59,14 +58,14 @@ public interface IASTEnumerationSpecifier extends IASTDeclSpecifier, IASTNameOwn
"IASTEnumerator.ENUMERATOR_VALUE - IASTExpression (value) for IASTEnumerator"); //$NON-NLS-1$
/**
- * Set enumerator value.
+ * Sets enumerator value.
*
* @param expression
*/
public void setValue(IASTExpression expression);
/**
- * Get enumerator value.
+ * Returns enumerator value.
*
* @return IASTExpression
value
*/
@@ -95,7 +94,7 @@ public interface IASTEnumerationSpecifier extends IASTDeclSpecifier, IASTNameOwn
"IASTEnumerationSpecifier.ENUMERATOR - nested IASTEnumerator for IASTEnumerationSpecifier"); //$NON-NLS-1$
/**
- * Add an enumerator.
+ * Adds an enumerator.
*
* @param enumerator
* IASTEnumerator
@@ -103,7 +102,7 @@ public interface IASTEnumerationSpecifier extends IASTDeclSpecifier, IASTNameOwn
public void addEnumerator(IASTEnumerator enumerator);
/**
- * Get enumerators.
+ * Returns enumerators.
*
* @return IASTEnumerator []
array
*/
@@ -117,7 +116,7 @@ public interface IASTEnumerationSpecifier extends IASTDeclSpecifier, IASTNameOwn
"IASTEnumerationSpecifier.ENUMERATION_NAME - IASTName for IASTEnumerationSpecifier"); //$NON-NLS-1$
/**
- * Set the enum's name.
+ * Sets the enum's name.
*
* @param name
*/
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTNamedTypeSpecifier.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTNamedTypeSpecifier.java
index 06079daeb77..2b4063958e9 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTNamedTypeSpecifier.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTNamedTypeSpecifier.java
@@ -6,7 +6,7 @@
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * Doug Schaefer (IBM) - Initial API and implementation
+ * Doug Schaefer (IBM) - Initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.core.dom.ast;
@@ -18,11 +18,9 @@ package org.eclipse.cdt.core.dom.ast;
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface IASTNamedTypeSpecifier extends IASTDeclSpecifier, IASTNameOwner {
-
/**
* NAME
describes the relationship between an
- * IASTNamedTypeSpecifier
and its nested
- * IASTName
.
+ * IASTNamedTypeSpecifier
and its nested IASTName
.
*/
public static final ASTNodeProperty NAME = new ASTNodeProperty("IASTNamedTypeSpecifier.NAME - IASTName for IASTNamedTypeSpecifier"); //$NON-NLS-1$
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTSimpleDeclSpecifier.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTSimpleDeclSpecifier.java
index aa2cf3b3561..b10654669a4 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTSimpleDeclSpecifier.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTSimpleDeclSpecifier.java
@@ -6,9 +6,9 @@
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * Doug Schaefer (IBM) - Initial API and implementation
- * Markus Schorn (Wind River Systems)
- * Sergey Prigogin (Google)
+ * Doug Schaefer (IBM) - Initial API and implementation
+ * Markus Schorn (Wind River Systems)
+ * Sergey Prigogin (Google)
*******************************************************************************/
package org.eclipse.cdt.core.dom.ast;
@@ -27,7 +27,6 @@ public interface IASTSimpleDeclSpecifier extends IASTDeclSpecifier {
public static final ASTNodeProperty DECLTYPE_EXPRESSION = new ASTNodeProperty(
"IASTSimpleDeclSpecifier.EXPRESSION [IASTExpression]"); //$NON-NLS-1$
-
/**
* Used for omitted declaration specifiers. E.g. for declaration of constructors,
* or in plain c, where this defaults to an integer.
@@ -109,7 +108,7 @@ public interface IASTSimpleDeclSpecifier extends IASTDeclSpecifier {
public IASTSimpleDeclSpecifier copy();
/**
- * This returns the built-in type for the declaration. The type is then
+ * Returns the built-in type for the declaration. The type is then
* refined by qualifiers for signed/unsigned and short/long. The type could
* also be unspecified which usually means int.
*/
@@ -231,5 +230,4 @@ public interface IASTSimpleDeclSpecifier extends IASTDeclSpecifier {
*/
@Deprecated
public static final int t_last = t_double; // used only in subclasses
-
}
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/c/ICASTDeclSpecifier.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/c/ICASTDeclSpecifier.java
index 14ba0dc05b3..6828ff1c0a7 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/c/ICASTDeclSpecifier.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/c/ICASTDeclSpecifier.java
@@ -6,8 +6,8 @@
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * Doug Schaefer (IBM) - Initial API and implementation
- * Markus Schorn (Wind River Systems)
+ * Doug Schaefer (IBM) - Initial API and implementation
+ * Markus Schorn (Wind River Systems)
*******************************************************************************/
package org.eclipse.cdt.core.dom.ast.c;
@@ -20,11 +20,9 @@ import org.eclipse.cdt.core.dom.ast.IASTDeclSpecifier;
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface ICASTDeclSpecifier extends IASTDeclSpecifier {
-
/**
* @since 5.1
*/
@Override
public ICASTDeclSpecifier copy();
-
}
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTDeclSpecifier.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTDeclSpecifier.java
index 16567e54292..0374605f39b 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTDeclSpecifier.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTDeclSpecifier.java
@@ -6,8 +6,8 @@
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * Doug Schaefer (IBM) - Initial API and implementation
- * Markus Schorn (Wind River Systems)
+ * Doug Schaefer (IBM) - Initial API and implementation
+ * Markus Schorn (Wind River Systems)
*******************************************************************************/
package org.eclipse.cdt.core.dom.ast.cpp;
@@ -20,7 +20,6 @@ import org.eclipse.cdt.core.dom.ast.IASTDeclSpecifier;
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface ICPPASTDeclSpecifier extends IASTDeclSpecifier {
-
// A declaration in C++ can be a friend declaration
/**
* Is this a friend declaration?
@@ -30,10 +29,9 @@ public interface ICPPASTDeclSpecifier extends IASTDeclSpecifier {
public boolean isFriend();
/**
- * Set this to be a friend declaration true/false.
+ * Sets this to be a friend declaration true/false.
*
- * @param value
- * boolean
+ * @param value the new value
*/
public void setFriend(boolean value);
@@ -45,10 +43,9 @@ public interface ICPPASTDeclSpecifier extends IASTDeclSpecifier {
public boolean isVirtual();
/**
- * Set this declaration to be virutal.
+ * Sets this declaration to be virtual.
*
- * @param value
- * boolean
+ * @param value the new value
*/
public void setVirtual(boolean value);
@@ -60,10 +57,9 @@ public interface ICPPASTDeclSpecifier extends IASTDeclSpecifier {
public boolean isExplicit();
/**
- * Set this to be an explicit constructor.
+ * Sets this to be an explicit constructor.
*
- * @param value
- * boolean
+ * @param value the new value
*/
public void setExplicit(boolean value);
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/gnu/cpp/IGPPASTDeclSpecifier.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/gnu/cpp/IGPPASTDeclSpecifier.java
index 9650c5cfc63..5e4a6535109 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/gnu/cpp/IGPPASTDeclSpecifier.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/gnu/cpp/IGPPASTDeclSpecifier.java
@@ -6,7 +6,7 @@
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * John Camelon (IBM) - Initial API and implementation
+ * John Camelon (IBM) - Initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.core.dom.ast.gnu.cpp;
@@ -21,7 +21,6 @@ import org.eclipse.cdt.core.dom.ast.IASTDeclSpecifier;
*/
@Deprecated
public interface IGPPASTDeclSpecifier extends IASTDeclSpecifier {
-
/**
* @since 5.1
*/
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTBaseDeclSpecifier.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTBaseDeclSpecifier.java
index 189abc2122c..a987b133687 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTBaseDeclSpecifier.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTBaseDeclSpecifier.java
@@ -6,8 +6,8 @@
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * John Camelon (IBM) - Initial API and implementation
- * Markus Schorn (Wind River Systems)
+ * John Camelon (IBM) - Initial API and implementation
+ * Markus Schorn (Wind River Systems)
*******************************************************************************/
package org.eclipse.cdt.internal.core.dom.parser.cpp;
@@ -19,7 +19,6 @@ import org.eclipse.cdt.internal.core.model.ASTStringUtil;
* Base for all c++ declaration specifiers
*/
public abstract class CPPASTBaseDeclSpecifier extends ASTNode implements ICPPASTDeclSpecifier {
-
private boolean friend;
private boolean inline;
private boolean isConst;
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTElaboratedTypeSpecifier.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTElaboratedTypeSpecifier.java
index a849ef06555..a730058492d 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTElaboratedTypeSpecifier.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTElaboratedTypeSpecifier.java
@@ -6,7 +6,7 @@
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * IBM - Initial API and implementation
+ * IBM - Initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.internal.core.dom.parser.cpp;
@@ -27,7 +27,6 @@ import org.eclipse.cdt.internal.core.dom.parser.IASTInternalNameOwner;
*/
public class CPPASTElaboratedTypeSpecifier extends CPPASTBaseDeclSpecifier
implements ICPPASTElaboratedTypeSpecifier, IASTInternalNameOwner {
-
private int kind;
private IASTName name;
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTEnumerationSpecifier.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTEnumerationSpecifier.java
index 9da28755ffa..f91b784b2f8 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTEnumerationSpecifier.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTEnumerationSpecifier.java
@@ -6,8 +6,8 @@
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * John Camelon (IBM) - Initial API and implementation
- * Markus Schorn (Wind River Systems)
+ * John Camelon (IBM) - Initial API and implementation
+ * Markus Schorn (Wind River Systems)
*******************************************************************************/
package org.eclipse.cdt.internal.core.dom.parser.cpp;
@@ -24,16 +24,15 @@ import org.eclipse.cdt.internal.core.dom.parser.IASTInternalEnumerationSpecifier
*/
public class CPPASTEnumerationSpecifier extends CPPASTBaseDeclSpecifier
implements IASTInternalEnumerationSpecifier, ICPPASTEnumerationSpecifier {
-
private boolean fIsScoped;
private boolean fIsOpaque;
private IASTName fName;
private ICPPASTDeclSpecifier fBaseType;
- private IASTEnumerator[] fItems = null;
- private int fItemPos=-1;
+ private IASTEnumerator[] fItems;
+ private int fItemPos= -1;
- private boolean fValuesComputed= false;
+ private boolean fValuesComputed;
private CPPEnumScope fScope;
public CPPASTEnumerationSpecifier() {
@@ -52,8 +51,9 @@ public class CPPASTEnumerationSpecifier extends CPPASTBaseDeclSpecifier
@Override
public CPPASTEnumerationSpecifier copy(CopyStyle style) {
- CPPASTEnumerationSpecifier copy = new CPPASTEnumerationSpecifier(fIsScoped, fName == null
- ? null : fName.copy(style), fBaseType == null ? null : fBaseType.copy(style));
+ CPPASTEnumerationSpecifier copy =
+ new CPPASTEnumerationSpecifier(fIsScoped, fName == null ? null : fName.copy(style),
+ fBaseType == null ? null : fBaseType.copy(style));
copy.fIsOpaque = fIsOpaque;
for (IASTEnumerator enumerator : getEnumerators())
copy.addEnumerator(enumerator == null ? null : enumerator.copy(style));
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTNamedTypeSpecifier.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTNamedTypeSpecifier.java
index e95210e6519..4f9fe0081af 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTNamedTypeSpecifier.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTNamedTypeSpecifier.java
@@ -6,8 +6,8 @@
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * John Camelon (IBM) - Initial API and implementation
- * Bryan Wilkinson (QNX)
+ * John Camelon (IBM) - Initial API and implementation
+ * Bryan Wilkinson (QNX)
*******************************************************************************/
package org.eclipse.cdt.internal.core.dom.parser.cpp;
@@ -26,12 +26,10 @@ import org.eclipse.cdt.core.dom.ast.cpp.ICPPNamespace;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateTypeParameter;
import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPSemantics;
-public class CPPASTNamedTypeSpecifier extends CPPASTBaseDeclSpecifier implements
- ICPPASTNamedTypeSpecifier, ICPPASTCompletionContext {
-
+public class CPPASTNamedTypeSpecifier extends CPPASTBaseDeclSpecifier
+ implements ICPPASTNamedTypeSpecifier, ICPPASTCompletionContext {
private boolean typename;
private IASTName name;
-
public CPPASTNamedTypeSpecifier() {
}
@@ -47,8 +45,8 @@ public class CPPASTNamedTypeSpecifier extends CPPASTBaseDeclSpecifier implements
@Override
public CPPASTNamedTypeSpecifier copy(CopyStyle style) {
- CPPASTNamedTypeSpecifier copy = new CPPASTNamedTypeSpecifier(name == null ? null
- : name.copy(style));
+ CPPASTNamedTypeSpecifier copy =
+ new CPPASTNamedTypeSpecifier(name == null ? null : name.copy(style));
copyBaseDeclSpec(copy);
copy.typename = typename;
if (style == CopyStyle.withLocations) {
@@ -73,7 +71,6 @@ public class CPPASTNamedTypeSpecifier extends CPPASTBaseDeclSpecifier implements
return name;
}
-
@Override
public void setName(IASTName name) {
assertNotFrozen();
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTSimpleDeclSpecifier.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTSimpleDeclSpecifier.java
index 66ff6e4d8e1..bf020df8804 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTSimpleDeclSpecifier.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTSimpleDeclSpecifier.java
@@ -6,8 +6,8 @@
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * John Camelon (IBM) - Initial API and implementation
- * Markus Schorn (Wind River Systems)
+ * John Camelon (IBM) - Initial API and implementation
+ * Markus Schorn (Wind River Systems)
*******************************************************************************/
package org.eclipse.cdt.internal.core.dom.parser.cpp;
@@ -18,16 +18,16 @@ import org.eclipse.cdt.core.dom.ast.IBasicType.Kind;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTSimpleDeclSpecifier;
import org.eclipse.cdt.internal.core.dom.parser.IASTAmbiguityParent;
-public class CPPASTSimpleDeclSpecifier extends CPPASTBaseDeclSpecifier implements ICPPASTSimpleDeclSpecifier,
- IASTAmbiguityParent {
+public class CPPASTSimpleDeclSpecifier extends CPPASTBaseDeclSpecifier
+ implements ICPPASTSimpleDeclSpecifier, IASTAmbiguityParent {
private int type;
private boolean isSigned;
private boolean isUnsigned;
private boolean isShort;
private boolean isLong;
private boolean isLonglong;
- private boolean isComplex=false;
- private boolean isImaginary=false;
+ private boolean isComplex;
+ private boolean isImaginary;
private IASTExpression fDeclTypeExpression;
@Override
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/token/KeywordSets.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/token/KeywordSets.java
index 86cdeedf82b..20553a044b5 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/token/KeywordSets.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/token/KeywordSets.java
@@ -6,8 +6,8 @@
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * John Camelon (IBM Rational Software) - Initial API and implementation
- * Markus Schorn (Wind River Systems)
+ * John Camelon (IBM Rational Software) - Initial API and implementation
+ * Markus Schorn (Wind River Systems)
*******************************************************************************/
package org.eclipse.cdt.internal.core.parser.token;
@@ -24,42 +24,40 @@ import org.eclipse.cdt.core.parser.ParserLanguage;
public class KeywordSets {
- public static Set getKeywords( KeywordSetKey kind, ParserLanguage language )
- {
- if( kind == KeywordSetKey.EMPTY )
+ public static Set getKeywords(KeywordSetKey kind, ParserLanguage language) {
+ if (kind == KeywordSetKey.EMPTY)
return EMPTY_TABLE;
- if( kind == KeywordSetKey.DECL_SPECIFIER_SEQUENCE )
- return DECL_SPECIFIER_SEQUENCE_TABLE.get( language );
- if( kind == KeywordSetKey.DECLARATION )
- return DECLARATION_TABLE.get( language );
- if( kind == KeywordSetKey.STATEMENT )
- return STATEMENT_TABLE.get( language );
- if( kind == KeywordSetKey.BASE_SPECIFIER )
+ if (kind == KeywordSetKey.DECL_SPECIFIER_SEQUENCE)
+ return DECL_SPECIFIER_SEQUENCE_TABLE.get(language);
+ if (kind == KeywordSetKey.DECLARATION)
+ return DECLARATION_TABLE.get(language);
+ if (kind == KeywordSetKey.STATEMENT)
+ return STATEMENT_TABLE.get(language);
+ if (kind == KeywordSetKey.BASE_SPECIFIER)
return BASE_SPECIFIER_CPP;
- if( kind == KeywordSetKey.MEMBER )
- {
- if( language == ParserLanguage.CPP )
+ if (kind == KeywordSetKey.MEMBER) {
+ if (language == ParserLanguage.CPP)
return CLASS_MEMBER;
return EMPTY_TABLE;
}
- if( kind == KeywordSetKey.POST_USING )
+ if (kind == KeywordSetKey.POST_USING)
return POST_USING_CPP;
- if( kind == KeywordSetKey.FUNCTION_MODIFIER )
- return FUNCTION_MODIFIER_TABLE.get( language );
- if( kind == KeywordSetKey.NAMESPACE_ONLY )
+ if (kind == KeywordSetKey.FUNCTION_MODIFIER)
+ return FUNCTION_MODIFIER_TABLE.get(language);
+ if (kind == KeywordSetKey.NAMESPACE_ONLY)
return NAMESPACE_ONLY_SET;
- if( kind == KeywordSetKey.MACRO )
+ if (kind == KeywordSetKey.MACRO)
return MACRO_ONLY;
- if( kind == KeywordSetKey.PP_DIRECTIVE )
- return PP_DIRECTIVES_TABLE.get( language );
- if( kind == KeywordSetKey.EXPRESSION )
- return EXPRESSION_TABLE.get( language );
- if( kind == KeywordSetKey.ALL )
- return ALL_TABLE.get( language );
- if( kind == KeywordSetKey.KEYWORDS )
- return KEYWORDS_TABLE.get( language );
- if( kind == KeywordSetKey.TYPES )
- return TYPES_TABLE.get( language );
+ if (kind == KeywordSetKey.PP_DIRECTIVE)
+ return PP_DIRECTIVES_TABLE.get(language);
+ if (kind == KeywordSetKey.EXPRESSION)
+ return EXPRESSION_TABLE.get(language);
+ if (kind == KeywordSetKey.ALL)
+ return ALL_TABLE.get(language);
+ if (kind == KeywordSetKey.KEYWORDS)
+ return KEYWORDS_TABLE.get(language);
+ if (kind == KeywordSetKey.TYPES)
+ return TYPES_TABLE.get(language);
//TODO finish this
return null;
}
@@ -67,209 +65,192 @@ public class KeywordSets {
private static final Set EMPTY_TABLE = new HashSet(0);
private static final Set NAMESPACE_ONLY_SET;
- static
- {
+ static {
NAMESPACE_ONLY_SET = new HashSet(1);
- NAMESPACE_ONLY_SET.add(Keywords.NAMESPACE );
+ NAMESPACE_ONLY_SET.add(Keywords.NAMESPACE);
}
private static final Set MACRO_ONLY;
- static
- {
+ static {
MACRO_ONLY = new HashSet(1);
- MACRO_ONLY.add("defined()" ); //$NON-NLS-1$
+ MACRO_ONLY.add("defined()"); //$NON-NLS-1$
}
-
-
+
private static final Set DECL_SPECIFIER_SEQUENCE_C;
- static
- {
+ static {
DECL_SPECIFIER_SEQUENCE_C = new TreeSet();
- DECL_SPECIFIER_SEQUENCE_C.add( Keywords.INLINE );
- DECL_SPECIFIER_SEQUENCE_C.add( Keywords.AUTO);
- DECL_SPECIFIER_SEQUENCE_C.add( Keywords.REGISTER);
- DECL_SPECIFIER_SEQUENCE_C.add( Keywords.STATIC);
- DECL_SPECIFIER_SEQUENCE_C.add( Keywords.EXTERN);
- DECL_SPECIFIER_SEQUENCE_C.add( Keywords.MUTABLE);
- DECL_SPECIFIER_SEQUENCE_C.add( Keywords.TYPEDEF);
- DECL_SPECIFIER_SEQUENCE_C.add( Keywords.CONST);
- DECL_SPECIFIER_SEQUENCE_C.add( Keywords.VOLATILE);
- DECL_SPECIFIER_SEQUENCE_C.add( Keywords.SIGNED);
- DECL_SPECIFIER_SEQUENCE_C.add( Keywords.UNSIGNED);
- DECL_SPECIFIER_SEQUENCE_C.add( Keywords.SHORT);
- DECL_SPECIFIER_SEQUENCE_C.add( Keywords.LONG);
- DECL_SPECIFIER_SEQUENCE_C.add( Keywords._COMPLEX);
- DECL_SPECIFIER_SEQUENCE_C.add( Keywords._IMAGINARY);
- DECL_SPECIFIER_SEQUENCE_C.add( Keywords.CHAR);
- DECL_SPECIFIER_SEQUENCE_C.add( Keywords._BOOL);
- DECL_SPECIFIER_SEQUENCE_C.add( Keywords.INT);
- DECL_SPECIFIER_SEQUENCE_C.add( Keywords.FLOAT);
- DECL_SPECIFIER_SEQUENCE_C.add( Keywords.DOUBLE);
- DECL_SPECIFIER_SEQUENCE_C.add( Keywords.VOID);
- DECL_SPECIFIER_SEQUENCE_C.add( Keywords.STRUCT);
- DECL_SPECIFIER_SEQUENCE_C.add( Keywords.UNION);
- DECL_SPECIFIER_SEQUENCE_C.add( Keywords.ENUM);
+ DECL_SPECIFIER_SEQUENCE_C.add(Keywords.INLINE);
+ DECL_SPECIFIER_SEQUENCE_C.add(Keywords.AUTO);
+ DECL_SPECIFIER_SEQUENCE_C.add(Keywords.REGISTER);
+ DECL_SPECIFIER_SEQUENCE_C.add(Keywords.STATIC);
+ DECL_SPECIFIER_SEQUENCE_C.add(Keywords.EXTERN);
+ DECL_SPECIFIER_SEQUENCE_C.add(Keywords.MUTABLE);
+ DECL_SPECIFIER_SEQUENCE_C.add(Keywords.TYPEDEF);
+ DECL_SPECIFIER_SEQUENCE_C.add(Keywords.CONST);
+ DECL_SPECIFIER_SEQUENCE_C.add(Keywords.VOLATILE);
+ DECL_SPECIFIER_SEQUENCE_C.add(Keywords.SIGNED);
+ DECL_SPECIFIER_SEQUENCE_C.add(Keywords.UNSIGNED);
+ DECL_SPECIFIER_SEQUENCE_C.add(Keywords.SHORT);
+ DECL_SPECIFIER_SEQUENCE_C.add(Keywords.LONG);
+ DECL_SPECIFIER_SEQUENCE_C.add(Keywords._COMPLEX);
+ DECL_SPECIFIER_SEQUENCE_C.add(Keywords._IMAGINARY);
+ DECL_SPECIFIER_SEQUENCE_C.add(Keywords.CHAR);
+ DECL_SPECIFIER_SEQUENCE_C.add(Keywords._BOOL);
+ DECL_SPECIFIER_SEQUENCE_C.add(Keywords.INT);
+ DECL_SPECIFIER_SEQUENCE_C.add(Keywords.FLOAT);
+ DECL_SPECIFIER_SEQUENCE_C.add(Keywords.DOUBLE);
+ DECL_SPECIFIER_SEQUENCE_C.add(Keywords.VOID);
+ DECL_SPECIFIER_SEQUENCE_C.add(Keywords.STRUCT);
+ DECL_SPECIFIER_SEQUENCE_C.add(Keywords.UNION);
+ DECL_SPECIFIER_SEQUENCE_C.add(Keywords.ENUM);
}
private static final Set DECL_SPECIFIER_SEQUENCE_CPP;
- static
- {
+ static {
DECL_SPECIFIER_SEQUENCE_CPP = new TreeSet();
// add all of C then remove the ones we don't need
- DECL_SPECIFIER_SEQUENCE_CPP.addAll( DECL_SPECIFIER_SEQUENCE_C );
- DECL_SPECIFIER_SEQUENCE_CPP.remove( Keywords._COMPLEX);
- DECL_SPECIFIER_SEQUENCE_CPP.remove( Keywords._IMAGINARY);
- DECL_SPECIFIER_SEQUENCE_CPP.remove( Keywords._BOOL);
+ DECL_SPECIFIER_SEQUENCE_CPP.addAll(DECL_SPECIFIER_SEQUENCE_C);
+ DECL_SPECIFIER_SEQUENCE_CPP.remove(Keywords._COMPLEX);
+ DECL_SPECIFIER_SEQUENCE_CPP.remove(Keywords._IMAGINARY);
+ DECL_SPECIFIER_SEQUENCE_CPP.remove(Keywords._BOOL);
// CPP specific stuff
- DECL_SPECIFIER_SEQUENCE_CPP.add( Keywords.WCHAR_T);
- DECL_SPECIFIER_SEQUENCE_CPP.add( Keywords.CHAR16_T);
- DECL_SPECIFIER_SEQUENCE_CPP.add( Keywords.CHAR32_T);
+ DECL_SPECIFIER_SEQUENCE_CPP.add(Keywords.WCHAR_T);
+ DECL_SPECIFIER_SEQUENCE_CPP.add(Keywords.CHAR16_T);
+ DECL_SPECIFIER_SEQUENCE_CPP.add(Keywords.CHAR32_T);
- DECL_SPECIFIER_SEQUENCE_CPP.add( Keywords.VIRTUAL);
- DECL_SPECIFIER_SEQUENCE_CPP.add( Keywords.MUTABLE);
- DECL_SPECIFIER_SEQUENCE_CPP.add( Keywords.EXPLICIT);
- DECL_SPECIFIER_SEQUENCE_CPP.add( Keywords.FRIEND);
- DECL_SPECIFIER_SEQUENCE_CPP.add( Keywords.BOOL);
- DECL_SPECIFIER_SEQUENCE_CPP.add( Keywords.TYPENAME);
- DECL_SPECIFIER_SEQUENCE_CPP.add( Keywords.CLASS);
+ DECL_SPECIFIER_SEQUENCE_CPP.add(Keywords.VIRTUAL);
+ DECL_SPECIFIER_SEQUENCE_CPP.add(Keywords.MUTABLE);
+ DECL_SPECIFIER_SEQUENCE_CPP.add(Keywords.EXPLICIT);
+ DECL_SPECIFIER_SEQUENCE_CPP.add(Keywords.FRIEND);
+ DECL_SPECIFIER_SEQUENCE_CPP.add(Keywords.BOOL);
+ DECL_SPECIFIER_SEQUENCE_CPP.add(Keywords.TYPENAME);
+ DECL_SPECIFIER_SEQUENCE_CPP.add(Keywords.CLASS);
}
- private static final Map> DECL_SPECIFIER_SEQUENCE_TABLE;
- static
- {
- DECL_SPECIFIER_SEQUENCE_TABLE = new HashMap>();
- DECL_SPECIFIER_SEQUENCE_TABLE.put( ParserLanguage.CPP, DECL_SPECIFIER_SEQUENCE_CPP );
- DECL_SPECIFIER_SEQUENCE_TABLE.put( ParserLanguage.C, DECL_SPECIFIER_SEQUENCE_C );
+ private static final Map> DECL_SPECIFIER_SEQUENCE_TABLE;
+ static {
+ DECL_SPECIFIER_SEQUENCE_TABLE = new HashMap>();
+ DECL_SPECIFIER_SEQUENCE_TABLE.put(ParserLanguage.CPP, DECL_SPECIFIER_SEQUENCE_CPP);
+ DECL_SPECIFIER_SEQUENCE_TABLE.put(ParserLanguage.C, DECL_SPECIFIER_SEQUENCE_C);
}
private static final Set DECLARATION_CPP;
- static
- {
+ static {
DECLARATION_CPP = new TreeSet();
- DECLARATION_CPP.addAll( DECL_SPECIFIER_SEQUENCE_CPP );
- DECLARATION_CPP.add( Keywords.ASM );
- DECLARATION_CPP.add( Keywords.TEMPLATE );
- DECLARATION_CPP.add( Keywords.USING );
- DECLARATION_CPP.add( Keywords.NAMESPACE );
- DECLARATION_CPP.add( Keywords.EXPORT );
- DECLARATION_CPP.add( Keywords.STATIC_ASSERT );
+ DECLARATION_CPP.addAll(DECL_SPECIFIER_SEQUENCE_CPP);
+ DECLARATION_CPP.add(Keywords.ASM);
+ DECLARATION_CPP.add(Keywords.TEMPLATE);
+ DECLARATION_CPP.add(Keywords.USING);
+ DECLARATION_CPP.add(Keywords.NAMESPACE);
+ DECLARATION_CPP.add(Keywords.EXPORT);
+ DECLARATION_CPP.add(Keywords.STATIC_ASSERT);
}
private static final Set DECLARATION_C;
- static
- {
+ static {
DECLARATION_C = new TreeSet();
- DECLARATION_C.addAll(DECL_SPECIFIER_SEQUENCE_C );
- DECLARATION_C.add(Keywords.ASM );
+ DECLARATION_C.addAll(DECL_SPECIFIER_SEQUENCE_C);
+ DECLARATION_C.add(Keywords.ASM);
}
- private static final Map> DECLARATION_TABLE;
- static
- {
- DECLARATION_TABLE = new HashMap>();
- DECLARATION_TABLE.put( ParserLanguage.CPP, DECLARATION_CPP );
- DECLARATION_TABLE.put( ParserLanguage.C, DECLARATION_C );
+ private static final Map> DECLARATION_TABLE;
+ static {
+ DECLARATION_TABLE = new HashMap>(2);
+ DECLARATION_TABLE.put(ParserLanguage.CPP, DECLARATION_CPP);
+ DECLARATION_TABLE.put(ParserLanguage.C, DECLARATION_C);
}
private static final Set EXPRESSION_C;
- static
- {
+ static {
EXPRESSION_C = new TreeSet();
- EXPRESSION_C.add( Keywords.CHAR );
- EXPRESSION_C.add( Keywords.SHORT);
- EXPRESSION_C.add( Keywords.INT);
- EXPRESSION_C.add( Keywords.LONG);
- EXPRESSION_C.add( Keywords.SIGNED);
- EXPRESSION_C.add( Keywords.UNSIGNED);
- EXPRESSION_C.add( Keywords.FLOAT);
- EXPRESSION_C.add( Keywords.DOUBLE);
- EXPRESSION_C.add( Keywords.SIZEOF );
-
+ EXPRESSION_C.add(Keywords.CHAR);
+ EXPRESSION_C.add(Keywords.SHORT);
+ EXPRESSION_C.add(Keywords.INT);
+ EXPRESSION_C.add(Keywords.LONG);
+ EXPRESSION_C.add(Keywords.SIGNED);
+ EXPRESSION_C.add(Keywords.UNSIGNED);
+ EXPRESSION_C.add(Keywords.FLOAT);
+ EXPRESSION_C.add(Keywords.DOUBLE);
+ EXPRESSION_C.add(Keywords.SIZEOF);
}
private static final Set EXPRESSION_CPP;
- static
- {
+ static {
EXPRESSION_CPP = new TreeSet(EXPRESSION_C);
- EXPRESSION_CPP.add( Keywords.BOOL );
- EXPRESSION_CPP.add( Keywords.CHAR16_T );
- EXPRESSION_CPP.add( Keywords.CHAR32_T );
- EXPRESSION_CPP.add( Keywords.WCHAR_T );
- EXPRESSION_CPP.add( Keywords.NEW );
- EXPRESSION_CPP.add( Keywords.DELETE );
- EXPRESSION_CPP.add( Keywords.TYPENAME );
- EXPRESSION_CPP.add( Keywords.DYNAMIC_CAST );
- EXPRESSION_CPP.add( Keywords.STATIC_CAST );
- EXPRESSION_CPP.add( Keywords.REINTERPRET_CAST );
- EXPRESSION_CPP.add( Keywords.CONST_CAST );
- EXPRESSION_CPP.add( Keywords.TYPEID );
- EXPRESSION_CPP.add( Keywords.TRUE );
- EXPRESSION_CPP.add( Keywords.FALSE );
- EXPRESSION_CPP.add( Keywords.THIS );
- EXPRESSION_CPP.add( Keywords.OPERATOR );
- EXPRESSION_CPP.add( Keywords.THROW );
+ EXPRESSION_CPP.add(Keywords.BOOL);
+ EXPRESSION_CPP.add(Keywords.CHAR16_T);
+ EXPRESSION_CPP.add(Keywords.CHAR32_T);
+ EXPRESSION_CPP.add(Keywords.WCHAR_T);
+ EXPRESSION_CPP.add(Keywords.NEW);
+ EXPRESSION_CPP.add(Keywords.DELETE);
+ EXPRESSION_CPP.add(Keywords.TYPENAME);
+ EXPRESSION_CPP.add(Keywords.DYNAMIC_CAST);
+ EXPRESSION_CPP.add(Keywords.STATIC_CAST);
+ EXPRESSION_CPP.add(Keywords.REINTERPRET_CAST);
+ EXPRESSION_CPP.add(Keywords.CONST_CAST);
+ EXPRESSION_CPP.add(Keywords.TYPEID);
+ EXPRESSION_CPP.add(Keywords.TRUE);
+ EXPRESSION_CPP.add(Keywords.FALSE);
+ EXPRESSION_CPP.add(Keywords.THIS);
+ EXPRESSION_CPP.add(Keywords.OPERATOR);
+ EXPRESSION_CPP.add(Keywords.THROW);
}
- private static final Map> EXPRESSION_TABLE;
- static
- {
- EXPRESSION_TABLE = new HashMap>();
- EXPRESSION_TABLE.put( ParserLanguage.CPP, EXPRESSION_CPP );
- EXPRESSION_TABLE.put( ParserLanguage.C, EXPRESSION_C );
+ private static final Map> EXPRESSION_TABLE;
+ static {
+ EXPRESSION_TABLE = new HashMap>(2);
+ EXPRESSION_TABLE.put(ParserLanguage.CPP, EXPRESSION_CPP);
+ EXPRESSION_TABLE.put(ParserLanguage.C, EXPRESSION_C);
}
private static final Set STATEMENT_C;
- static
- {
+ static {
STATEMENT_C= new TreeSet();
- STATEMENT_C.addAll( DECLARATION_C );
- STATEMENT_C.addAll( EXPRESSION_C );
- STATEMENT_C.add( Keywords.FOR );
- STATEMENT_C.add( Keywords.BREAK );
- STATEMENT_C.add( Keywords.CASE );
- STATEMENT_C.add( Keywords.GOTO );
- STATEMENT_C.add( Keywords.SWITCH );
- STATEMENT_C.add( Keywords.WHILE );
- STATEMENT_C.add( Keywords.IF);
- STATEMENT_C.add( Keywords.CONTINUE);
- STATEMENT_C.add( Keywords.DEFAULT);
- STATEMENT_C.add( Keywords.RETURN);
- STATEMENT_C.add( Keywords.ELSE);
- STATEMENT_C.add( Keywords.DO);
+ STATEMENT_C.addAll(DECLARATION_C);
+ STATEMENT_C.addAll(EXPRESSION_C);
+ STATEMENT_C.add(Keywords.FOR);
+ STATEMENT_C.add(Keywords.BREAK);
+ STATEMENT_C.add(Keywords.CASE);
+ STATEMENT_C.add(Keywords.GOTO);
+ STATEMENT_C.add(Keywords.SWITCH);
+ STATEMENT_C.add(Keywords.WHILE);
+ STATEMENT_C.add(Keywords.IF);
+ STATEMENT_C.add(Keywords.CONTINUE);
+ STATEMENT_C.add(Keywords.DEFAULT);
+ STATEMENT_C.add(Keywords.RETURN);
+ STATEMENT_C.add(Keywords.ELSE);
+ STATEMENT_C.add(Keywords.DO);
}
private static final Set STATEMENT_CPP;
- static
- {
- STATEMENT_CPP = new TreeSet( DECLARATION_CPP );
- STATEMENT_CPP.addAll( EXPRESSION_CPP );
- STATEMENT_CPP.add( Keywords.TRY );
- STATEMENT_CPP.add( Keywords.FOR );
- STATEMENT_CPP.add( Keywords.BREAK );
- STATEMENT_CPP.add( Keywords.CASE );
- STATEMENT_CPP.add( Keywords.CATCH );
- STATEMENT_CPP.add( Keywords.GOTO );
- STATEMENT_CPP.add( Keywords.SWITCH );
- STATEMENT_CPP.add( Keywords.WHILE );
- STATEMENT_CPP.add( Keywords.IF);
- STATEMENT_CPP.add( Keywords.CONTINUE);
- STATEMENT_CPP.add( Keywords.DEFAULT);
- STATEMENT_CPP.add( Keywords.RETURN);
- STATEMENT_CPP.add( Keywords.ELSE);
- STATEMENT_CPP.add( Keywords.DO);
+ static {
+ STATEMENT_CPP = new TreeSet(DECLARATION_CPP);
+ STATEMENT_CPP.addAll(EXPRESSION_CPP);
+ STATEMENT_CPP.add(Keywords.TRY);
+ STATEMENT_CPP.add(Keywords.FOR);
+ STATEMENT_CPP.add(Keywords.BREAK);
+ STATEMENT_CPP.add(Keywords.CASE);
+ STATEMENT_CPP.add(Keywords.CATCH);
+ STATEMENT_CPP.add(Keywords.GOTO);
+ STATEMENT_CPP.add(Keywords.SWITCH);
+ STATEMENT_CPP.add(Keywords.WHILE);
+ STATEMENT_CPP.add(Keywords.IF);
+ STATEMENT_CPP.add(Keywords.CONTINUE);
+ STATEMENT_CPP.add(Keywords.DEFAULT);
+ STATEMENT_CPP.add(Keywords.RETURN);
+ STATEMENT_CPP.add(Keywords.ELSE);
+ STATEMENT_CPP.add(Keywords.DO);
}
- private static final Map> STATEMENT_TABLE;
- static
- {
- STATEMENT_TABLE = new HashMap>();
- STATEMENT_TABLE.put( ParserLanguage.CPP, STATEMENT_CPP);
- STATEMENT_TABLE.put( ParserLanguage.C, STATEMENT_C );
+ private static final Map> STATEMENT_TABLE;
+ static {
+ STATEMENT_TABLE = new HashMap>();
+ STATEMENT_TABLE.put(ParserLanguage.CPP, STATEMENT_CPP);
+ STATEMENT_TABLE.put(ParserLanguage.C, STATEMENT_C);
}
private static final Set BASE_SPECIFIER_CPP;
- static
- {
+ static {
BASE_SPECIFIER_CPP = new TreeSet();
BASE_SPECIFIER_CPP.add(Keywords.PUBLIC);
BASE_SPECIFIER_CPP.add(Keywords.PROTECTED);
@@ -278,8 +259,7 @@ public class KeywordSets {
}
private static final Set CLASS_MEMBER;
- static
- {
+ static {
CLASS_MEMBER = new TreeSet(DECL_SPECIFIER_SEQUENCE_CPP);
CLASS_MEMBER.add(Keywords.PUBLIC);
CLASS_MEMBER.add(Keywords.PROTECTED);
@@ -287,8 +267,7 @@ public class KeywordSets {
}
private static final Set POST_USING_CPP;
- static
- {
+ static {
POST_USING_CPP = new TreeSet();
POST_USING_CPP.add(Keywords.NAMESPACE);
POST_USING_CPP.add(Keywords.TYPENAME);
@@ -297,26 +276,23 @@ public class KeywordSets {
private static final Set FUNCTION_MODIFIER_C = EMPTY_TABLE;
private static final Set FUNCTION_MODIFIER_CPP;
- static
- {
- FUNCTION_MODIFIER_CPP = new TreeSet( FUNCTION_MODIFIER_C );
+ static {
+ FUNCTION_MODIFIER_CPP = new TreeSet(FUNCTION_MODIFIER_C);
- FUNCTION_MODIFIER_CPP.add( Keywords.THROW);
- FUNCTION_MODIFIER_CPP.add( Keywords.TRY );
- FUNCTION_MODIFIER_CPP.add( Keywords.VOLATILE );
+ FUNCTION_MODIFIER_CPP.add(Keywords.THROW);
+ FUNCTION_MODIFIER_CPP.add(Keywords.TRY);
+ FUNCTION_MODIFIER_CPP.add(Keywords.VOLATILE);
}
- private static final Map> FUNCTION_MODIFIER_TABLE;
- static
- {
- FUNCTION_MODIFIER_TABLE= new HashMap>(2);
- FUNCTION_MODIFIER_TABLE.put( ParserLanguage.CPP, FUNCTION_MODIFIER_CPP );
- FUNCTION_MODIFIER_TABLE.put( ParserLanguage.C, FUNCTION_MODIFIER_C );
+ private static final Map> FUNCTION_MODIFIER_TABLE;
+ static {
+ FUNCTION_MODIFIER_TABLE= new HashMap>(2);
+ FUNCTION_MODIFIER_TABLE.put(ParserLanguage.CPP, FUNCTION_MODIFIER_CPP);
+ FUNCTION_MODIFIER_TABLE.put(ParserLanguage.C, FUNCTION_MODIFIER_C);
}
private static final Set PP_DIRECTIVES_C;
- static
- {
+ static {
PP_DIRECTIVES_C = new TreeSet();
PP_DIRECTIVES_C.add(Directives.POUND_BLANK);
PP_DIRECTIVES_C.add(Directives.POUND_DEFINE);
@@ -334,11 +310,9 @@ public class KeywordSets {
PP_DIRECTIVES_C.add(Directives._PRAGMA);
PP_DIRECTIVES_C.add(Directives.DEFINED);
}
-
private static final Set PP_DIRECTIVES_CPP;
- static
- {
+ static {
PP_DIRECTIVES_CPP = new TreeSet();
PP_DIRECTIVES_CPP.add(Directives.POUND_BLANK);
PP_DIRECTIVES_CPP.add(Directives.POUND_DEFINE);
@@ -358,307 +332,295 @@ public class KeywordSets {
}
private static final Set ALL_C;
- static
- {
+ static {
ALL_C = new TreeSet(PP_DIRECTIVES_CPP);
- ALL_C.add( Keywords.AUTO);
- ALL_C.add( Keywords.BREAK);
- ALL_C.add( Keywords.CASE);
- ALL_C.add( Keywords.CHAR);
- ALL_C.add( Keywords.CONST);
- ALL_C.add( Keywords.CONTINUE);
- ALL_C.add( Keywords.DEFAULT);
- ALL_C.add( Keywords.DELETE);
- ALL_C.add( Keywords.DO);
- ALL_C.add( Keywords.DOUBLE);
- ALL_C.add( Keywords.ELSE);
- ALL_C.add( Keywords.ENUM);
- ALL_C.add( Keywords.EXTERN);
- ALL_C.add( Keywords.FLOAT);
- ALL_C.add( Keywords.FOR);
- ALL_C.add( Keywords.GOTO);
- ALL_C.add( Keywords.IF);
- ALL_C.add( Keywords.INLINE);
- ALL_C.add( Keywords.INT);
- ALL_C.add( Keywords.LONG);
- ALL_C.add( Keywords.REGISTER);
- ALL_C.add( Keywords.RESTRICT);
- ALL_C.add( Keywords.RETURN);
- ALL_C.add( Keywords.SHORT);
- ALL_C.add( Keywords.SIGNED);
- ALL_C.add( Keywords.SIZEOF);
- ALL_C.add( Keywords.STATIC);
- ALL_C.add( Keywords.STRUCT);
- ALL_C.add( Keywords.SWITCH);
- ALL_C.add( Keywords.TYPEDEF);
- ALL_C.add( Keywords.UNION);
- ALL_C.add( Keywords.UNSIGNED);
- ALL_C.add( Keywords.VOID);
- ALL_C.add( Keywords.VOLATILE);
- ALL_C.add( Keywords.WHILE);
- ALL_C.add( Keywords._BOOL);
- ALL_C.add( Keywords._COMPLEX);
- ALL_C.add( Keywords._IMAGINARY);
+ ALL_C.add(Keywords.AUTO);
+ ALL_C.add(Keywords.BREAK);
+ ALL_C.add(Keywords.CASE);
+ ALL_C.add(Keywords.CHAR);
+ ALL_C.add(Keywords.CONST);
+ ALL_C.add(Keywords.CONTINUE);
+ ALL_C.add(Keywords.DEFAULT);
+ ALL_C.add(Keywords.DELETE);
+ ALL_C.add(Keywords.DO);
+ ALL_C.add(Keywords.DOUBLE);
+ ALL_C.add(Keywords.ELSE);
+ ALL_C.add(Keywords.ENUM);
+ ALL_C.add(Keywords.EXTERN);
+ ALL_C.add(Keywords.FLOAT);
+ ALL_C.add(Keywords.FOR);
+ ALL_C.add(Keywords.GOTO);
+ ALL_C.add(Keywords.IF);
+ ALL_C.add(Keywords.INLINE);
+ ALL_C.add(Keywords.INT);
+ ALL_C.add(Keywords.LONG);
+ ALL_C.add(Keywords.REGISTER);
+ ALL_C.add(Keywords.RESTRICT);
+ ALL_C.add(Keywords.RETURN);
+ ALL_C.add(Keywords.SHORT);
+ ALL_C.add(Keywords.SIGNED);
+ ALL_C.add(Keywords.SIZEOF);
+ ALL_C.add(Keywords.STATIC);
+ ALL_C.add(Keywords.STRUCT);
+ ALL_C.add(Keywords.SWITCH);
+ ALL_C.add(Keywords.TYPEDEF);
+ ALL_C.add(Keywords.UNION);
+ ALL_C.add(Keywords.UNSIGNED);
+ ALL_C.add(Keywords.VOID);
+ ALL_C.add(Keywords.VOLATILE);
+ ALL_C.add(Keywords.WHILE);
+ ALL_C.add(Keywords._BOOL);
+ ALL_C.add(Keywords._COMPLEX);
+ ALL_C.add(Keywords._IMAGINARY);
}
private static final Set ALL_CPP;
- static
- {
+ static {
ALL_CPP = new TreeSet(PP_DIRECTIVES_CPP);
- ALL_CPP.add( Keywords.AND );
- ALL_CPP.add( Keywords.AND_EQ);
- ALL_CPP.add( Keywords.ASM);
- ALL_CPP.add( Keywords.AUTO);
- ALL_CPP.add( Keywords.BITAND);
- ALL_CPP.add( Keywords.BITOR);
- ALL_CPP.add( Keywords.BOOL);
- ALL_CPP.add( Keywords.BREAK);
- ALL_CPP.add( Keywords.CASE);
- ALL_CPP.add( Keywords.CATCH);
- ALL_CPP.add( Keywords.CHAR);
- ALL_CPP.add( Keywords.CHAR16_T);
- ALL_CPP.add( Keywords.CHAR32_T);
- ALL_CPP.add( Keywords.CLASS);
- ALL_CPP.add( Keywords.COMPL);
- ALL_CPP.add( Keywords.CONST);
- ALL_CPP.add( Keywords.CONST_CAST);
- ALL_CPP.add( Keywords.CONTINUE);
- ALL_CPP.add( Keywords.DECLTYPE);
- ALL_CPP.add( Keywords.DEFAULT);
- ALL_CPP.add( Keywords.DELETE);
- ALL_CPP.add( Keywords.DO);
- ALL_CPP.add( Keywords.DOUBLE);
- ALL_CPP.add( Keywords.DYNAMIC_CAST);
- ALL_CPP.add( Keywords.ELSE);
- ALL_CPP.add( Keywords.ENUM);
- ALL_CPP.add( Keywords.EXPLICIT);
- ALL_CPP.add( Keywords.EXPORT);
- ALL_CPP.add( Keywords.EXTERN);
- ALL_CPP.add( Keywords.FALSE);
- ALL_CPP.add( Keywords.FLOAT);
- ALL_CPP.add( Keywords.FOR);
- ALL_CPP.add( Keywords.FRIEND);
- ALL_CPP.add( Keywords.GOTO);
- ALL_CPP.add( Keywords.IF);
- ALL_CPP.add( Keywords.INLINE);
- ALL_CPP.add( Keywords.INT);
- ALL_CPP.add( Keywords.LONG);
- ALL_CPP.add( Keywords.MUTABLE);
- ALL_CPP.add( Keywords.NAMESPACE);
- ALL_CPP.add( Keywords.NEW);
- ALL_CPP.add( Keywords.NOT);
- ALL_CPP.add( Keywords.NOT_EQ);
- ALL_CPP.add( Keywords.NULLPTR);
- ALL_CPP.add( Keywords.OPERATOR);
- ALL_CPP.add( Keywords.OR);
- ALL_CPP.add( Keywords.OR_EQ);
- ALL_CPP.add( Keywords.PRIVATE);
- ALL_CPP.add( Keywords.PROTECTED);
- ALL_CPP.add( Keywords.PUBLIC);
- ALL_CPP.add( Keywords.REGISTER);
- ALL_CPP.add( Keywords.REINTERPRET_CAST);
- ALL_CPP.add( Keywords.RETURN);
- ALL_CPP.add( Keywords.SHORT);
- ALL_CPP.add( Keywords.SIGNED);
- ALL_CPP.add( Keywords.SIZEOF);
- ALL_CPP.add( Keywords.STATIC);
- ALL_CPP.add( Keywords.STATIC_ASSERT);
- ALL_CPP.add( Keywords.STATIC_CAST);
- ALL_CPP.add( Keywords.STRUCT);
- ALL_CPP.add( Keywords.SWITCH);
- ALL_CPP.add( Keywords.TEMPLATE);
- ALL_CPP.add( Keywords.THIS);
- ALL_CPP.add( Keywords.THROW);
- ALL_CPP.add( Keywords.TRUE);
- ALL_CPP.add( Keywords.TRY);
- ALL_CPP.add( Keywords.TYPEDEF);
- ALL_CPP.add( Keywords.TYPEID);
- ALL_CPP.add( Keywords.TYPENAME);
- ALL_CPP.add( Keywords.UNION);
- ALL_CPP.add( Keywords.UNSIGNED);
- ALL_CPP.add( Keywords.USING);
- ALL_CPP.add( Keywords.VIRTUAL);
- ALL_CPP.add( Keywords.VOID);
- ALL_CPP.add( Keywords.VOLATILE);
- ALL_CPP.add( Keywords.WCHAR_T);
- ALL_CPP.add( Keywords.WHILE);
- ALL_CPP.add( Keywords.XOR);
- ALL_CPP.add( Keywords.XOR_EQ);
-
+ ALL_CPP.add(Keywords.AND);
+ ALL_CPP.add(Keywords.AND_EQ);
+ ALL_CPP.add(Keywords.ASM);
+ ALL_CPP.add(Keywords.AUTO);
+ ALL_CPP.add(Keywords.BITAND);
+ ALL_CPP.add(Keywords.BITOR);
+ ALL_CPP.add(Keywords.BOOL);
+ ALL_CPP.add(Keywords.BREAK);
+ ALL_CPP.add(Keywords.CASE);
+ ALL_CPP.add(Keywords.CATCH);
+ ALL_CPP.add(Keywords.CHAR);
+ ALL_CPP.add(Keywords.CHAR16_T);
+ ALL_CPP.add(Keywords.CHAR32_T);
+ ALL_CPP.add(Keywords.CLASS);
+ ALL_CPP.add(Keywords.COMPL);
+ ALL_CPP.add(Keywords.CONST);
+ ALL_CPP.add(Keywords.CONST_CAST);
+ ALL_CPP.add(Keywords.CONTINUE);
+ ALL_CPP.add(Keywords.DECLTYPE);
+ ALL_CPP.add(Keywords.DEFAULT);
+ ALL_CPP.add(Keywords.DELETE);
+ ALL_CPP.add(Keywords.DO);
+ ALL_CPP.add(Keywords.DOUBLE);
+ ALL_CPP.add(Keywords.DYNAMIC_CAST);
+ ALL_CPP.add(Keywords.ELSE);
+ ALL_CPP.add(Keywords.ENUM);
+ ALL_CPP.add(Keywords.EXPLICIT);
+ ALL_CPP.add(Keywords.EXPORT);
+ ALL_CPP.add(Keywords.EXTERN);
+ ALL_CPP.add(Keywords.FALSE);
+ ALL_CPP.add(Keywords.FLOAT);
+ ALL_CPP.add(Keywords.FOR);
+ ALL_CPP.add(Keywords.FRIEND);
+ ALL_CPP.add(Keywords.GOTO);
+ ALL_CPP.add(Keywords.IF);
+ ALL_CPP.add(Keywords.INLINE);
+ ALL_CPP.add(Keywords.INT);
+ ALL_CPP.add(Keywords.LONG);
+ ALL_CPP.add(Keywords.MUTABLE);
+ ALL_CPP.add(Keywords.NAMESPACE);
+ ALL_CPP.add(Keywords.NEW);
+ ALL_CPP.add(Keywords.NOT);
+ ALL_CPP.add(Keywords.NOT_EQ);
+ ALL_CPP.add(Keywords.NULLPTR);
+ ALL_CPP.add(Keywords.OPERATOR);
+ ALL_CPP.add(Keywords.OR);
+ ALL_CPP.add(Keywords.OR_EQ);
+ ALL_CPP.add(Keywords.PRIVATE);
+ ALL_CPP.add(Keywords.PROTECTED);
+ ALL_CPP.add(Keywords.PUBLIC);
+ ALL_CPP.add(Keywords.REGISTER);
+ ALL_CPP.add(Keywords.REINTERPRET_CAST);
+ ALL_CPP.add(Keywords.RETURN);
+ ALL_CPP.add(Keywords.SHORT);
+ ALL_CPP.add(Keywords.SIGNED);
+ ALL_CPP.add(Keywords.SIZEOF);
+ ALL_CPP.add(Keywords.STATIC);
+ ALL_CPP.add(Keywords.STATIC_ASSERT);
+ ALL_CPP.add(Keywords.STATIC_CAST);
+ ALL_CPP.add(Keywords.STRUCT);
+ ALL_CPP.add(Keywords.SWITCH);
+ ALL_CPP.add(Keywords.TEMPLATE);
+ ALL_CPP.add(Keywords.THIS);
+ ALL_CPP.add(Keywords.THROW);
+ ALL_CPP.add(Keywords.TRUE);
+ ALL_CPP.add(Keywords.TRY);
+ ALL_CPP.add(Keywords.TYPEDEF);
+ ALL_CPP.add(Keywords.TYPEID);
+ ALL_CPP.add(Keywords.TYPENAME);
+ ALL_CPP.add(Keywords.UNION);
+ ALL_CPP.add(Keywords.UNSIGNED);
+ ALL_CPP.add(Keywords.USING);
+ ALL_CPP.add(Keywords.VIRTUAL);
+ ALL_CPP.add(Keywords.VOID);
+ ALL_CPP.add(Keywords.VOLATILE);
+ ALL_CPP.add(Keywords.WCHAR_T);
+ ALL_CPP.add(Keywords.WHILE);
+ ALL_CPP.add(Keywords.XOR);
+ ALL_CPP.add(Keywords.XOR_EQ);
}
- private static final Map> ALL_TABLE;
- static
- {
- ALL_TABLE = new HashMap>( 2 );
- ALL_TABLE.put( ParserLanguage.C, ALL_C );
- ALL_TABLE.put( ParserLanguage.CPP, ALL_CPP );
+
+ private static final Map> ALL_TABLE;
+ static {
+ ALL_TABLE = new HashMap>(2);
+ ALL_TABLE.put(ParserLanguage.C, ALL_C);
+ ALL_TABLE.put(ParserLanguage.CPP, ALL_CPP);
}
private static final Set KEYWORDS_CPP;
- static
- {
+ static {
KEYWORDS_CPP = new TreeSet();
- KEYWORDS_CPP.add( Keywords.AND );
- KEYWORDS_CPP.add( Keywords.AND_EQ );
- KEYWORDS_CPP.add( Keywords.ASM );
- KEYWORDS_CPP.add( Keywords.AUTO );
- KEYWORDS_CPP.add( Keywords.BITAND );
- KEYWORDS_CPP.add( Keywords.BITOR );
- KEYWORDS_CPP.add( Keywords.BREAK );
- KEYWORDS_CPP.add( Keywords.CASE );
- KEYWORDS_CPP.add( Keywords.CATCH );
- KEYWORDS_CPP.add( Keywords.CLASS );
- KEYWORDS_CPP.add( Keywords.COMPL );
- KEYWORDS_CPP.add( Keywords.CONST );
- KEYWORDS_CPP.add( Keywords.CONST_CAST );
- KEYWORDS_CPP.add( Keywords.CONTINUE );
- KEYWORDS_CPP.add( Keywords.DECLTYPE);
- KEYWORDS_CPP.add( Keywords.DEFAULT );
- KEYWORDS_CPP.add( Keywords.DELETE );
- KEYWORDS_CPP.add( Keywords.DO );
- KEYWORDS_CPP.add( Keywords.DYNAMIC_CAST );
- KEYWORDS_CPP.add( Keywords.ELSE );
- KEYWORDS_CPP.add( Keywords.ENUM );
- KEYWORDS_CPP.add( Keywords.EXPLICIT );
- KEYWORDS_CPP.add( Keywords.EXPORT );
- KEYWORDS_CPP.add( Keywords.EXTERN );
- KEYWORDS_CPP.add( Keywords.FALSE );
- KEYWORDS_CPP.add( Keywords.FOR );
- KEYWORDS_CPP.add( Keywords.FRIEND );
- KEYWORDS_CPP.add( Keywords.GOTO );
- KEYWORDS_CPP.add( Keywords.IF );
- KEYWORDS_CPP.add( Keywords.INLINE );
- KEYWORDS_CPP.add( Keywords.MUTABLE );
- KEYWORDS_CPP.add( Keywords.NAMESPACE );
- KEYWORDS_CPP.add( Keywords.NEW );
- KEYWORDS_CPP.add( Keywords.NOT );
- KEYWORDS_CPP.add( Keywords.NOT_EQ );
- KEYWORDS_CPP.add( Keywords.NULLPTR );
- KEYWORDS_CPP.add( Keywords.OPERATOR );
- KEYWORDS_CPP.add( Keywords.OR );
- KEYWORDS_CPP.add( Keywords.OR_EQ );
- KEYWORDS_CPP.add( Keywords.PRIVATE );
- KEYWORDS_CPP.add( Keywords.PROTECTED );
- KEYWORDS_CPP.add( Keywords.PUBLIC );
- KEYWORDS_CPP.add( Keywords.REGISTER );
- KEYWORDS_CPP.add( Keywords.REINTERPRET_CAST );
- KEYWORDS_CPP.add( Keywords.RESTRICT );
- KEYWORDS_CPP.add( Keywords.RETURN );
- KEYWORDS_CPP.add( Keywords.SIZEOF );
- KEYWORDS_CPP.add( Keywords.STATIC );
- KEYWORDS_CPP.add( Keywords.STATIC_ASSERT );
- KEYWORDS_CPP.add( Keywords.STATIC_CAST );
- KEYWORDS_CPP.add( Keywords.STRUCT );
- KEYWORDS_CPP.add( Keywords.SWITCH );
- KEYWORDS_CPP.add( Keywords.TEMPLATE );
- KEYWORDS_CPP.add( Keywords.THIS );
- KEYWORDS_CPP.add( Keywords.THROW );
- KEYWORDS_CPP.add( Keywords.TRUE );
- KEYWORDS_CPP.add( Keywords.TRY );
- KEYWORDS_CPP.add( Keywords.TYPEDEF );
- KEYWORDS_CPP.add( Keywords.TYPEID );
- KEYWORDS_CPP.add( Keywords.TYPENAME );
- KEYWORDS_CPP.add( Keywords.UNION );
- KEYWORDS_CPP.add( Keywords.USING );
- KEYWORDS_CPP.add( Keywords.VIRTUAL );
- KEYWORDS_CPP.add( Keywords.VOLATILE );
- KEYWORDS_CPP.add( Keywords.WHILE );
- KEYWORDS_CPP.add( Keywords.XOR );
- KEYWORDS_CPP.add( Keywords.XOR_EQ );
-
+ KEYWORDS_CPP.add(Keywords.AND);
+ KEYWORDS_CPP.add(Keywords.AND_EQ);
+ KEYWORDS_CPP.add(Keywords.ASM);
+ KEYWORDS_CPP.add(Keywords.AUTO);
+ KEYWORDS_CPP.add(Keywords.BITAND);
+ KEYWORDS_CPP.add(Keywords.BITOR);
+ KEYWORDS_CPP.add(Keywords.BREAK);
+ KEYWORDS_CPP.add(Keywords.CASE);
+ KEYWORDS_CPP.add(Keywords.CATCH);
+ KEYWORDS_CPP.add(Keywords.CLASS);
+ KEYWORDS_CPP.add(Keywords.COMPL);
+ KEYWORDS_CPP.add(Keywords.CONST);
+ KEYWORDS_CPP.add(Keywords.CONST_CAST);
+ KEYWORDS_CPP.add(Keywords.CONTINUE);
+ KEYWORDS_CPP.add(Keywords.DECLTYPE);
+ KEYWORDS_CPP.add(Keywords.DEFAULT);
+ KEYWORDS_CPP.add(Keywords.DELETE);
+ KEYWORDS_CPP.add(Keywords.DO);
+ KEYWORDS_CPP.add(Keywords.DYNAMIC_CAST);
+ KEYWORDS_CPP.add(Keywords.ELSE);
+ KEYWORDS_CPP.add(Keywords.ENUM);
+ KEYWORDS_CPP.add(Keywords.EXPLICIT);
+ KEYWORDS_CPP.add(Keywords.EXPORT);
+ KEYWORDS_CPP.add(Keywords.EXTERN);
+ KEYWORDS_CPP.add(Keywords.FALSE);
+ KEYWORDS_CPP.add(Keywords.FOR);
+ KEYWORDS_CPP.add(Keywords.FRIEND);
+ KEYWORDS_CPP.add(Keywords.GOTO);
+ KEYWORDS_CPP.add(Keywords.IF);
+ KEYWORDS_CPP.add(Keywords.INLINE);
+ KEYWORDS_CPP.add(Keywords.MUTABLE);
+ KEYWORDS_CPP.add(Keywords.NAMESPACE);
+ KEYWORDS_CPP.add(Keywords.NEW);
+ KEYWORDS_CPP.add(Keywords.NOT);
+ KEYWORDS_CPP.add(Keywords.NOT_EQ);
+ KEYWORDS_CPP.add(Keywords.NULLPTR);
+ KEYWORDS_CPP.add(Keywords.OPERATOR);
+ KEYWORDS_CPP.add(Keywords.OR);
+ KEYWORDS_CPP.add(Keywords.OR_EQ);
+ KEYWORDS_CPP.add(Keywords.PRIVATE);
+ KEYWORDS_CPP.add(Keywords.PROTECTED);
+ KEYWORDS_CPP.add(Keywords.PUBLIC);
+ KEYWORDS_CPP.add(Keywords.REGISTER);
+ KEYWORDS_CPP.add(Keywords.REINTERPRET_CAST);
+ KEYWORDS_CPP.add(Keywords.RESTRICT);
+ KEYWORDS_CPP.add(Keywords.RETURN);
+ KEYWORDS_CPP.add(Keywords.SIZEOF);
+ KEYWORDS_CPP.add(Keywords.STATIC);
+ KEYWORDS_CPP.add(Keywords.STATIC_ASSERT);
+ KEYWORDS_CPP.add(Keywords.STATIC_CAST);
+ KEYWORDS_CPP.add(Keywords.STRUCT);
+ KEYWORDS_CPP.add(Keywords.SWITCH);
+ KEYWORDS_CPP.add(Keywords.TEMPLATE);
+ KEYWORDS_CPP.add(Keywords.THIS);
+ KEYWORDS_CPP.add(Keywords.THROW);
+ KEYWORDS_CPP.add(Keywords.TRUE);
+ KEYWORDS_CPP.add(Keywords.TRY);
+ KEYWORDS_CPP.add(Keywords.TYPEDEF);
+ KEYWORDS_CPP.add(Keywords.TYPEID);
+ KEYWORDS_CPP.add(Keywords.TYPENAME);
+ KEYWORDS_CPP.add(Keywords.UNION);
+ KEYWORDS_CPP.add(Keywords.USING);
+ KEYWORDS_CPP.add(Keywords.VIRTUAL);
+ KEYWORDS_CPP.add(Keywords.VOLATILE);
+ KEYWORDS_CPP.add(Keywords.WHILE);
+ KEYWORDS_CPP.add(Keywords.XOR);
+ KEYWORDS_CPP.add(Keywords.XOR_EQ);
}
private static Set KEYWORDS_C;
- static
- {
+ static {
KEYWORDS_C = new TreeSet();
- KEYWORDS_C.add( Keywords.ASM );
- KEYWORDS_C.add( Keywords.AUTO );
- KEYWORDS_C.add( Keywords.BREAK );
- KEYWORDS_C.add( Keywords.CASE );
- KEYWORDS_C.add( Keywords.CONST );
- KEYWORDS_C.add( Keywords.CONTINUE );
- KEYWORDS_C.add( Keywords.DEFAULT );
- KEYWORDS_C.add( Keywords.DO );
- KEYWORDS_C.add( Keywords.ELSE );
- KEYWORDS_C.add( Keywords.ENUM );
- KEYWORDS_C.add( Keywords.EXTERN );
- KEYWORDS_C.add( Keywords.FOR );
- KEYWORDS_C.add( Keywords.GOTO );
- KEYWORDS_C.add( Keywords.IF );
- KEYWORDS_C.add( Keywords.INLINE );
- KEYWORDS_C.add( Keywords.REGISTER );
- KEYWORDS_C.add( Keywords.RETURN );
- KEYWORDS_C.add( Keywords.RESTRICT );
- KEYWORDS_C.add( Keywords.SIZEOF );
- KEYWORDS_C.add( Keywords.STATIC );
- KEYWORDS_C.add( Keywords.STRUCT );
- KEYWORDS_C.add( Keywords.SWITCH );
- KEYWORDS_C.add( Keywords.TYPEDEF );
- KEYWORDS_C.add( Keywords.UNION );
- KEYWORDS_C.add( Keywords.VOLATILE );
- KEYWORDS_C.add( Keywords.WHILE );
+ KEYWORDS_C.add(Keywords.ASM);
+ KEYWORDS_C.add(Keywords.AUTO);
+ KEYWORDS_C.add(Keywords.BREAK);
+ KEYWORDS_C.add(Keywords.CASE);
+ KEYWORDS_C.add(Keywords.CONST);
+ KEYWORDS_C.add(Keywords.CONTINUE);
+ KEYWORDS_C.add(Keywords.DEFAULT);
+ KEYWORDS_C.add(Keywords.DO);
+ KEYWORDS_C.add(Keywords.ELSE);
+ KEYWORDS_C.add(Keywords.ENUM);
+ KEYWORDS_C.add(Keywords.EXTERN);
+ KEYWORDS_C.add(Keywords.FOR);
+ KEYWORDS_C.add(Keywords.GOTO);
+ KEYWORDS_C.add(Keywords.IF);
+ KEYWORDS_C.add(Keywords.INLINE);
+ KEYWORDS_C.add(Keywords.REGISTER);
+ KEYWORDS_C.add(Keywords.RETURN);
+ KEYWORDS_C.add(Keywords.RESTRICT);
+ KEYWORDS_C.add(Keywords.SIZEOF);
+ KEYWORDS_C.add(Keywords.STATIC);
+ KEYWORDS_C.add(Keywords.STRUCT);
+ KEYWORDS_C.add(Keywords.SWITCH);
+ KEYWORDS_C.add(Keywords.TYPEDEF);
+ KEYWORDS_C.add(Keywords.UNION);
+ KEYWORDS_C.add(Keywords.VOLATILE);
+ KEYWORDS_C.add(Keywords.WHILE);
}
-
-
- private static final Map> KEYWORDS_TABLE;
- static
- {
- KEYWORDS_TABLE = new HashMap>(2);
- KEYWORDS_TABLE.put( ParserLanguage.C, KEYWORDS_C );
- KEYWORDS_TABLE.put( ParserLanguage.CPP, KEYWORDS_CPP );
+ private static final Map> KEYWORDS_TABLE;
+ static {
+ KEYWORDS_TABLE = new HashMap>(2);
+ KEYWORDS_TABLE.put(ParserLanguage.C, KEYWORDS_C);
+ KEYWORDS_TABLE.put(ParserLanguage.CPP, KEYWORDS_CPP);
}
private static final Set TYPES_C;
- static
- {
+ static {
TYPES_C = new TreeSet();
- TYPES_C.add( Keywords.CHAR );
- TYPES_C.add( Keywords.DOUBLE );
- TYPES_C.add( Keywords.FLOAT );
- TYPES_C.add( Keywords.INT );
- TYPES_C.add( Keywords.LONG );
- TYPES_C.add( Keywords.SHORT );
- TYPES_C.add( Keywords.SIGNED );
- TYPES_C.add( Keywords.UNSIGNED );
- TYPES_C.add( Keywords.VOID );
- TYPES_C.add( Keywords._BOOL );
- TYPES_C.add( Keywords._COMPLEX );
- TYPES_C.add( Keywords._IMAGINARY );
+ TYPES_C.add(Keywords.CHAR);
+ TYPES_C.add(Keywords.DOUBLE);
+ TYPES_C.add(Keywords.FLOAT);
+ TYPES_C.add(Keywords.INT);
+ TYPES_C.add(Keywords.LONG);
+ TYPES_C.add(Keywords.SHORT);
+ TYPES_C.add(Keywords.SIGNED);
+ TYPES_C.add(Keywords.UNSIGNED);
+ TYPES_C.add(Keywords.VOID);
+ TYPES_C.add(Keywords._BOOL);
+ TYPES_C.add(Keywords._COMPLEX);
+ TYPES_C.add(Keywords._IMAGINARY);
}
+
private static final Set TYPES_CPP;
- static
- {
+ static {
TYPES_CPP = new TreeSet();
- TYPES_CPP.add( Keywords.BOOL );
- TYPES_CPP.add( Keywords.CHAR );
- TYPES_CPP.add( Keywords.CHAR16_T );
- TYPES_CPP.add( Keywords.CHAR32_T );
- TYPES_CPP.add( Keywords.DOUBLE );
- TYPES_CPP.add( Keywords.FLOAT );
- TYPES_CPP.add( Keywords.INT );
- TYPES_CPP.add( Keywords.LONG );
- TYPES_CPP.add( Keywords.SHORT );
- TYPES_CPP.add( Keywords.SIGNED );
- TYPES_CPP.add( Keywords.UNSIGNED );
- TYPES_CPP.add( Keywords.VOID );
- TYPES_CPP.add( Keywords.WCHAR_T );
+ TYPES_CPP.add(Keywords.BOOL);
+ TYPES_CPP.add(Keywords.CHAR);
+ TYPES_CPP.add(Keywords.CHAR16_T);
+ TYPES_CPP.add(Keywords.CHAR32_T);
+ TYPES_CPP.add(Keywords.DOUBLE);
+ TYPES_CPP.add(Keywords.FLOAT);
+ TYPES_CPP.add(Keywords.INT);
+ TYPES_CPP.add(Keywords.LONG);
+ TYPES_CPP.add(Keywords.SHORT);
+ TYPES_CPP.add(Keywords.SIGNED);
+ TYPES_CPP.add(Keywords.UNSIGNED);
+ TYPES_CPP.add(Keywords.VOID);
+ TYPES_CPP.add(Keywords.WCHAR_T);
}
- private static Map> TYPES_TABLE;
- static
- {
- TYPES_TABLE = new HashMap>( 2 );
- TYPES_TABLE.put( ParserLanguage.C, TYPES_C );
- TYPES_TABLE.put( ParserLanguage.CPP, TYPES_CPP );
+ private static Map> TYPES_TABLE;
+ static {
+ TYPES_TABLE = new HashMap>(2);
+ TYPES_TABLE.put(ParserLanguage.C, TYPES_C);
+ TYPES_TABLE.put(ParserLanguage.CPP, TYPES_CPP);
}
- private static Map> PP_DIRECTIVES_TABLE;
- static
- {
- PP_DIRECTIVES_TABLE = new HashMap>( 2 );
- PP_DIRECTIVES_TABLE.put( ParserLanguage.C, PP_DIRECTIVES_C );
- PP_DIRECTIVES_TABLE.put( ParserLanguage.CPP, PP_DIRECTIVES_CPP );
+ private static Map> PP_DIRECTIVES_TABLE;
+ static {
+ PP_DIRECTIVES_TABLE = new HashMap>(2);
+ PP_DIRECTIVES_TABLE.put(ParserLanguage.C, PP_DIRECTIVES_C);
+ PP_DIRECTIVES_TABLE.put(ParserLanguage.CPP, PP_DIRECTIVES_CPP);
}
}