1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Removed warnings.

This commit is contained in:
John Camelon 2004-04-25 05:30:52 +00:00
parent b87154d43c
commit 94bfaa41cf
14 changed files with 80 additions and 87 deletions

View file

@ -51,22 +51,22 @@ public class ContextualParser extends CompleteParser {
super(scanner, callback, language, log, extension ); super(scanner, callback, language, log, extension );
} }
protected IASTScope scope; protected IASTScope contextualScope;
/** /**
* @return * @return
*/ */
protected IASTScope getCompletionScope() { protected IASTScope getCompletionScope() {
return scope; return contextualScope;
} }
protected CompletionKind kind; protected CompletionKind completionKind;
/** /**
* @return * @return
*/ */
protected IASTCompletionNode.CompletionKind getCompletionKind() { protected IASTCompletionNode.CompletionKind getCompletionKind() {
return kind; return completionKind;
} }
protected IASTNode context; protected IASTNode context;
@ -93,7 +93,7 @@ public class ContextualParser extends CompleteParser {
} }
protected void setCompletionKind(IASTCompletionNode.CompletionKind kind) { protected void setCompletionKind(IASTCompletionNode.CompletionKind kind) {
this.kind = kind; this.completionKind = kind;
} }
/** /**
@ -176,7 +176,7 @@ public class ContextualParser extends CompleteParser {
} }
protected void setCompletionScope(IASTScope scope) { protected void setCompletionScope(IASTScope scope) {
this.scope = scope; this.contextualScope = scope;
} }
/* (non-Javadoc) /* (non-Javadoc)

View file

@ -346,9 +346,9 @@ public class DeclarationWrapper implements IDeclaratorOwner
/** /**
* @param requestor * @param requestor
*/ */
public List createASTNodes(IASTFactory astFactory) throws ASTSemanticException, BacktrackException public List createASTNodes(IASTFactory astFactoryToWorkWith) throws ASTSemanticException, BacktrackException
{ {
this.astFactory = astFactory; this.astFactory = astFactoryToWorkWith;
Iterator i = declarators.iterator(); Iterator i = declarators.iterator();
List l = new ArrayList(); List l = new ArrayList();
while (i.hasNext()) while (i.hasNext())
@ -360,13 +360,11 @@ public class DeclarationWrapper implements IDeclaratorOwner
*/ */
private IASTDeclaration createASTNode(Declarator declarator) throws ASTSemanticException, BacktrackException private IASTDeclaration createASTNode(Declarator declarator) throws ASTSemanticException, BacktrackException
{ {
IASTScope scope = getScope();
boolean isWithinClass = false;//(getScope() instanceof IASTClassSpecifier); //TODO fix this for COMPLETE_PARSE boolean isWithinClass = false;//(getScope() instanceof IASTClassSpecifier); //TODO fix this for COMPLETE_PARSE
if( scope instanceof IASTClassSpecifier ){ if( getScope() instanceof IASTClassSpecifier ){
isWithinClass = true; isWithinClass = true;
} else if ( scope instanceof IASTTemplateDeclaration ){ } else if ( getScope() instanceof IASTTemplateDeclaration ){
isWithinClass = (((IASTTemplateDeclaration)scope).getOwnerScope() instanceof IASTClassSpecifier); isWithinClass = (((IASTTemplateDeclaration)getScope()).getOwnerScope() instanceof IASTClassSpecifier);
} }
boolean isFunction = declarator.isFunction(); boolean isFunction = declarator.isFunction();
@ -445,18 +443,18 @@ public class DeclarationWrapper implements IDeclaratorOwner
convertedParms, convertedParms,
(ASTPointerOperator)i.next()); (ASTPointerOperator)i.next());
ITokenDuple name = ( d.getPointerOperatorNameDuple() != null ) ? new TokenDuple( d.getPointerOperatorNameDuple(), d.getNameDuple() ) : d.getNameDuple(); ITokenDuple nameDuple = ( d.getPointerOperatorNameDuple() != null ) ? new TokenDuple( d.getPointerOperatorNameDuple(), d.getNameDuple() ) : d.getNameDuple();
if( typedef ) if( typedef )
return astFactory.createTypedef(scope, name.toString(), abs, return astFactory.createTypedef(scope, nameDuple.toString(), abs,
getStartingOffset(), getStartingLine(), d getStartingOffset(), getStartingLine(), d
.getNameStartOffset(), d.getNameEndOffset(), d .getNameStartOffset(), d.getNameEndOffset(), d
.getNameLine()); .getNameLine());
else { else {
if( isWithinClass ) if( isWithinClass )
return astFactory.createField( scope, name, auto, d.getInitializerClause(), d.getBitFieldExpression(), abs, mutable, extern, register, staticc, getStartingOffset(), getStartingLine(), d.getNameStartOffset(), d.getNameEndOffset(), d.getNameLine(), d.getConstructorExpression(), ((IASTClassSpecifier)scope).getCurrentVisibilityMode() ); return astFactory.createField( scope, nameDuple, auto, d.getInitializerClause(), d.getBitFieldExpression(), abs, mutable, extern, register, staticc, getStartingOffset(), getStartingLine(), d.getNameStartOffset(), d.getNameEndOffset(), d.getNameLine(), d.getConstructorExpression(), ((IASTClassSpecifier)scope).getCurrentVisibilityMode() );
else else
return astFactory.createVariable( scope, name, auto, d.getInitializerClause(), d.getBitFieldExpression(), abs, mutable, extern, register, staticc, getStartingOffset(), getStartingLine(), d.getNameStartOffset(), d.getNameEndOffset(), d.getNameLine(), d.getConstructorExpression() ); return astFactory.createVariable( scope, nameDuple, auto, d.getInitializerClause(), d.getBitFieldExpression(), abs, mutable, extern, register, staticc, getStartingOffset(), getStartingLine(), d.getNameStartOffset(), d.getNameEndOffset(), d.getNameLine(), d.getConstructorExpression() );
} }
} }

View file

@ -32,7 +32,6 @@ import org.eclipse.cdt.core.parser.ast.gcc.IASTGCCExpression;
import org.eclipse.cdt.core.parser.ast.gcc.IASTGCCSimpleTypeSpecifier; import org.eclipse.cdt.core.parser.ast.gcc.IASTGCCSimpleTypeSpecifier;
import org.eclipse.cdt.core.parser.extension.IParserExtension; import org.eclipse.cdt.core.parser.extension.IParserExtension;
import org.eclipse.cdt.internal.core.parser.Parser.Flags; import org.eclipse.cdt.internal.core.parser.Parser.Flags;
import org.eclipse.cdt.internal.core.parser.ast.complete.gcc.ASTGCCSimpleTypeSpecifier;
import org.eclipse.cdt.internal.core.parser.token.KeywordSets; import org.eclipse.cdt.internal.core.parser.token.KeywordSets;
import org.eclipse.cdt.internal.core.parser.token.KeywordSets.Key; import org.eclipse.cdt.internal.core.parser.token.KeywordSets.Key;
@ -44,8 +43,6 @@ import org.eclipse.cdt.internal.core.parser.token.KeywordSets.Key;
public class GCCParserExtension implements IParserExtension { public class GCCParserExtension implements IParserExtension {
private static final String EMPTY_STRING = "";//$NON-NLS-1$ private static final String EMPTY_STRING = "";//$NON-NLS-1$
protected static BacktrackException backtrack = new BacktrackException();
/* (non-Javadoc) /* (non-Javadoc)
* @see org.eclipse.cdt.core.parser.extension.IParserExtension#isValidCVModifier(org.eclipse.cdt.core.parser.ParserLanguage, int) * @see org.eclipse.cdt.core.parser.extension.IParserExtension#isValidCVModifier(org.eclipse.cdt.core.parser.ParserLanguage, int)
*/ */
@ -266,7 +263,7 @@ public class GCCParserExtension implements IParserExtension {
flags.setEncounteredRawType(true); flags.setEncounteredRawType(true);
Hashtable params = new Hashtable(); Hashtable params = new Hashtable();
params.put( IASTGCCSimpleTypeSpecifier.TYPEOF_EXRESSION, typeOfExpression ); params.put( IASTGCCSimpleTypeSpecifier.TYPEOF_EXRESSION, typeOfExpression );
sdw.setExtensionParameter( ASTGCCSimpleTypeSpecifier.TYPEOF_EXRESSION, typeOfExpression ); sdw.setExtensionParameter( IASTGCCSimpleTypeSpecifier.TYPEOF_EXRESSION, typeOfExpression );
return new GCCDeclSpecifierExtensionResult( startingPoint, data.getLastToken(), flags, params ); return new GCCDeclSpecifierExtensionResult( startingPoint, data.getLastToken(), flags, params );
} }
data.backup( startingPoint ); data.backup( startingPoint );
@ -388,7 +385,7 @@ public class GCCParserExtension implements IParserExtension {
{ {
data.backup( mark ); data.backup( mark );
return null; return null;
} catch( BacktrackException backtrack ) } catch( BacktrackException bt )
{ {
data.backup( mark ); data.backup( mark );
return null; return null;

View file

@ -380,8 +380,8 @@ public abstract class Parser extends ExpressionParser implements IParser
errorHandling(); errorHandling();
} }
// consume the } // consume the }
IToken lastToken = consume(); IToken lastTokenConsumed = consume();
linkage.setEndingOffsetAndLineNumber(lastToken.getEndOffset(), lastToken.getLineNumber()); linkage.setEndingOffsetAndLineNumber(lastTokenConsumed.getEndOffset(), lastTokenConsumed.getLineNumber());
linkage.exitScope( requestor ); linkage.exitScope( requestor );
} }
else // single declaration else // single declaration

View file

@ -28,7 +28,7 @@ import org.eclipse.cdt.core.parser.ast.IASTOffsetableElement;
public class QuickParseCallback extends NullSourceElementRequestor implements IQuickParseCallback public class QuickParseCallback extends NullSourceElementRequestor implements IQuickParseCallback
{ {
protected IASTCompilationUnit compilationUnit = null; protected IASTCompilationUnit compUnit = null;
protected List inclusions = new ArrayList(); protected List inclusions = new ArrayList();
protected List macros = new ArrayList(); protected List macros = new ArrayList();
protected boolean hasNoProblems = true; protected boolean hasNoProblems = true;
@ -45,7 +45,7 @@ public class QuickParseCallback extends NullSourceElementRequestor implements IQ
public Iterator getDeclarations(){ public Iterator getDeclarations(){
try{ try{
return compilationUnit.getDeclarations(); return compUnit.getDeclarations();
} }
catch (ASTNotImplementedException ne ) catch (ASTNotImplementedException ne )
{ {
@ -68,7 +68,7 @@ public class QuickParseCallback extends NullSourceElementRequestor implements IQ
public void exitCompilationUnit( IASTCompilationUnit compilationUnit ) public void exitCompilationUnit( IASTCompilationUnit compilationUnit )
{ {
this.compilationUnit = compilationUnit; this.compUnit = compilationUnit;
} }
public void exitInclusion( IASTInclusion inclusion ) public void exitInclusion( IASTInclusion inclusion )
@ -86,7 +86,7 @@ public class QuickParseCallback extends NullSourceElementRequestor implements IQ
*/ */
public IASTCompilationUnit getCompilationUnit() public IASTCompilationUnit getCompilationUnit()
{ {
return compilationUnit; return compUnit;
} }
public class OffsetableIterator implements Iterator public class OffsetableIterator implements Iterator

View file

@ -180,7 +180,7 @@ public class StructuralParseCallback extends QuickParseCallback{
*/ */
public void exitCompilationUnit(IASTCompilationUnit compilationUnit) { public void exitCompilationUnit(IASTCompilationUnit compilationUnit) {
exitScope(compilationUnit); exitScope(compilationUnit);
this.compilationUnit = compilationUnit; this.compUnit = compilationUnit;
} }
/* (non-Javadoc) /* (non-Javadoc)
@ -195,7 +195,8 @@ public class StructuralParseCallback extends QuickParseCallback{
* @see org.eclipse.cdt.core.parser.IQuickParseCallback#getCompilationUnit() * @see org.eclipse.cdt.core.parser.IQuickParseCallback#getCompilationUnit()
*/ */
public IASTCompilationUnit getCompilationUnit() { public IASTCompilationUnit getCompilationUnit() {
return compilationUnit; } return compUnit;
}
/* (non-Javadoc) /* (non-Javadoc)
* @see org.eclipse.cdt.core.parser.ISourceElementRequestor#exitClassSpecifier(org.eclipse.cdt.core.parser.ast.IASTClassSpecifier) * @see org.eclipse.cdt.core.parser.ISourceElementRequestor#exitClassSpecifier(org.eclipse.cdt.core.parser.ast.IASTClassSpecifier)

View file

@ -134,7 +134,7 @@ public class GCCASTExtension implements IASTFactoryExtension {
public IASTSimpleTypeSpecifier createSimpleTypeSpecifier(ParserSymbolTable pst, IASTScope scope, Type kind, ITokenDuple typeName, boolean isShort, boolean isLong, boolean isSigned, boolean isUnsigned, boolean isTypename, boolean isComplex, boolean isImaginary, boolean isGlobal, Hashtable extensionParms) { public IASTSimpleTypeSpecifier createSimpleTypeSpecifier(ParserSymbolTable pst, IASTScope scope, Type kind, ITokenDuple typeName, boolean isShort, boolean isLong, boolean isSigned, boolean isUnsigned, boolean isTypename, boolean isComplex, boolean isImaginary, boolean isGlobal, Hashtable extensionParms) {
if( kind == IASTGCCSimpleTypeSpecifier.Type.TYPEOF ) if( kind == IASTGCCSimpleTypeSpecifier.Type.TYPEOF )
{ {
ASTExpression typeOfExpression = (ASTExpression) extensionParms.get( ASTGCCSimpleTypeSpecifier.TYPEOF_EXRESSION ); ASTExpression typeOfExpression = (ASTExpression) extensionParms.get( IASTGCCSimpleTypeSpecifier.TYPEOF_EXRESSION );
ISymbol s = pst.newSymbol( EMPTY_STRING ); ISymbol s = pst.newSymbol( EMPTY_STRING );
s.setTypeInfo( typeOfExpression.getResultType().getResult() ); s.setTypeInfo( typeOfExpression.getResultType().getResult() );
return new ASTGCCSimpleTypeSpecifier( s, isTypename, ( typeName == null ? EMPTY_STRING : typeName.toString()), EMPTY_LIST, typeOfExpression ); return new ASTGCCSimpleTypeSpecifier( s, isTypename, ( typeName == null ? EMPTY_STRING : typeName.toString()), EMPTY_LIST, typeOfExpression );

View file

@ -333,7 +333,7 @@ public class ASTClassSpecifier extends ASTScope implements IASTClassSpecifier
* @see org.eclipse.cdt.core.parser.ast.IASTClassSpecifier#getFriends() * @see org.eclipse.cdt.core.parser.ast.IASTClassSpecifier#getFriends()
*/ */
public Iterator getFriends() { public Iterator getFriends() {
IDerivableContainerSymbol symbol = (IDerivableContainerSymbol) getSymbol(); IDerivableContainerSymbol s = (IDerivableContainerSymbol) getSymbol();
return new SymbolIterator( symbol.getFriends().iterator() ); return new SymbolIterator( s.getFriends().iterator() );
} }
} }

View file

@ -42,9 +42,8 @@ public abstract class ASTScope extends ASTSymbol implements IASTScope
*/ */
public Iterator getDeclarations() public Iterator getDeclarations()
{ {
IContainerSymbol symbol = getContainerSymbol(); if( getContainerSymbol() != null ){
if( symbol != null ){ return new SymbolIterator( getContainerSymbol().getContentsIterator() );
return new SymbolIterator( symbol.getContentsIterator() );
} }
return null; return null;
} }

View file

@ -38,8 +38,7 @@ public class ASTTemplateDeclaration extends ASTSymbol implements IASTTemplateDec
private NamedOffsets offsets = new NamedOffsets(); private NamedOffsets offsets = new NamedOffsets();
private ITemplateSymbol getTemplateSymbol(){ private ITemplateSymbol getTemplateSymbol(){
ISymbol symbol = getSymbol(); return (ITemplateSymbol) (( getSymbol() instanceof ITemplateSymbol ) ? getSymbol() : null);
return (ITemplateSymbol) (( symbol instanceof ITemplateSymbol ) ? symbol : null);
} }
/** /**
* *
@ -90,9 +89,9 @@ public class ASTTemplateDeclaration extends ASTSymbol implements IASTTemplateDec
return ( node instanceof IASTDeclaration ) ? (IASTDeclaration)node : null; return ( node instanceof IASTDeclaration ) ? (IASTDeclaration)node : null;
} }
IContainerSymbol owned = getTemplateSymbol().getTemplatedSymbol(); IContainerSymbol ownedSymbol = getTemplateSymbol().getTemplatedSymbol();
if( owned != null && owned.getASTExtension() != null ){ if( ownedSymbol != null && ownedSymbol.getASTExtension() != null ){
ASTNode node = owned.getASTExtension().getPrimaryDeclaration(); ASTNode node = ownedSymbol.getASTExtension().getPrimaryDeclaration();
return ( node instanceof IASTDeclaration ) ? (IASTDeclaration)node : null; return ( node instanceof IASTDeclaration ) ? (IASTDeclaration)node : null;
} }
return null; return null;

View file

@ -639,40 +639,40 @@ public class CompleteParseASTFactory extends BaseASTFactory implements IASTFacto
protected void attachSymbolExtension( IExtensibleSymbol symbol, ASTNode astNode ) protected void attachSymbolExtension( IExtensibleSymbol symbol, ASTNode astNode )
{ {
ISymbolASTExtension extension = new ExtensibleSymbolExtension( symbol, astNode ); ISymbolASTExtension symbolExtension = new ExtensibleSymbolExtension( symbol, astNode );
symbol.setASTExtension( extension ); symbol.setASTExtension( symbolExtension );
} }
protected void attachSymbolExtension( protected void attachSymbolExtension(
ISymbol symbol, ISymbol symbol,
ASTSymbol astSymbol, boolean asDefinition ) ASTSymbol astSymbol, boolean asDefinition )
{ {
ISymbolASTExtension extension = symbol.getASTExtension(); ISymbolASTExtension symbolExtension = symbol.getASTExtension();
if( extension == null ) if( symbolExtension == null )
{ {
if( astSymbol instanceof IASTNamespaceDefinition ) if( astSymbol instanceof IASTNamespaceDefinition )
extension = new NamespaceSymbolExtension( symbol, astSymbol ); symbolExtension = new NamespaceSymbolExtension( symbol, astSymbol );
else if( astSymbol instanceof IASTFunction || astSymbol instanceof IASTMethod || else if( astSymbol instanceof IASTFunction || astSymbol instanceof IASTMethod ||
astSymbol instanceof IASTEnumerationSpecifier || astSymbol instanceof IASTEnumerationSpecifier ||
astSymbol instanceof IASTClassSpecifier || astSymbol instanceof IASTClassSpecifier ||
astSymbol instanceof IASTElaboratedTypeSpecifier ) astSymbol instanceof IASTElaboratedTypeSpecifier )
{ {
extension = new ForewardDeclaredSymbolExtension( symbol, astSymbol ); symbolExtension = new ForewardDeclaredSymbolExtension( symbol, astSymbol );
} }
else if( astSymbol instanceof IASTTemplateDeclaration ){ else if( astSymbol instanceof IASTTemplateDeclaration ){
extension = new TemplateSymbolExtension( symbol, astSymbol ); symbolExtension = new TemplateSymbolExtension( symbol, astSymbol );
} }
else else
{ {
extension = new StandardSymbolExtension( symbol, astSymbol ); symbolExtension = new StandardSymbolExtension( symbol, astSymbol );
} }
symbol.setASTExtension( extension ); symbol.setASTExtension( symbolExtension );
} }
else else
{ {
if( asDefinition ) if( asDefinition )
try { try {
extension.addDefinition( astSymbol ); symbolExtension.addDefinition( astSymbol );
} catch (ExtensionException e) { } catch (ExtensionException e) {
// assert false : ExtensionException.class; // assert false : ExtensionException.class;
} }
@ -3294,8 +3294,8 @@ public class CompleteParseASTFactory extends BaseASTFactory implements IASTFacto
} }
if( context != null ){ if( context != null ){
ISymbolASTExtension extension = context.getASTExtension(); ISymbolASTExtension symbolExtension = context.getASTExtension();
return ( extension != null ) ? extension.getPrimaryDeclaration() : null; return ( symbolExtension != null ) ? symbolExtension.getPrimaryDeclaration() : null;
} }
return null; return null;

View file

@ -49,7 +49,7 @@ public class ContextStack {
private final IParserLogService log; private final IParserLogService log;
private int current_size = 8; private int current_size = 8;
private IScannerContext [] cs = new IScannerContext[current_size];; private IScannerContext [] cs = new IScannerContext[current_size];
private int cs_pos = 0; private int cs_pos = 0;
@ -59,7 +59,7 @@ public class ContextStack {
private final void cs_push(IScannerContext c) { private final void cs_push(IScannerContext c) {
try { try {
cs[cs_pos++] = c;; cs[cs_pos++] = c;
} }
catch (ArrayIndexOutOfBoundsException a) catch (ArrayIndexOutOfBoundsException a)
{ {

View file

@ -646,7 +646,6 @@ public class Scanner implements IScanner {
private static final int NOCHAR = -1; private static final int NOCHAR = -1;
private static final String TEXT = "<text>"; //$NON-NLS-1$ private static final String TEXT = "<text>"; //$NON-NLS-1$
private static final String START = "<initial reader>"; //$NON-NLS-1$
private static final String EXPRESSION = "<expression>"; //$NON-NLS-1$ private static final String EXPRESSION = "<expression>"; //$NON-NLS-1$
private static final String PASTING = "<pasting>"; //$NON-NLS-1$ private static final String PASTING = "<pasting>"; //$NON-NLS-1$

View file

@ -51,38 +51,38 @@ public class KeywordSets {
public static Set getKeywords( Key kind, ParserLanguage language ) public static Set getKeywords( Key kind, ParserLanguage language )
{ {
if( kind == Key.EMPTY ) if( kind == Key.EMPTY )
return EMPTY; return EMPTY_TABLE;
if( kind == Key.DECL_SPECIFIER_SEQUENCE ) if( kind == Key.DECL_SPECIFIER_SEQUENCE )
return (Set) DECL_SPECIFIER_SEQUENCE.get( language ); return (Set) DECL_SPECIFIER_SEQUENCE_TABLE.get( language );
if( kind == Key.DECLARATION ) if( kind == Key.DECLARATION )
return (Set) DECLARATION.get( language ); return (Set) DECLARATION_TABLE.get( language );
if( kind == Key.STATEMENT ) if( kind == Key.STATEMENT )
return (Set) STATEMENT.get( language ); return (Set) STATEMENT_TABLE.get( language );
if( kind == Key.BASE_SPECIFIER ) if( kind == Key.BASE_SPECIFIER )
return BASE_SPECIFIER_CPP; return BASE_SPECIFIER_CPP;
if( kind == Key.POST_USING ) if( kind == Key.POST_USING )
return POST_USING_CPP; return POST_USING_CPP;
if( kind == Key.FUNCTION_MODIFIER ) if( kind == Key.FUNCTION_MODIFIER )
return (Set) FUNCTION_MODIFIER.get( language ); return (Set) FUNCTION_MODIFIER_TABLE.get( language );
if( kind == Key.NAMESPACE_ONLY ) if( kind == Key.NAMESPACE_ONLY )
return NAMESPACE_ONLY; return NAMESPACE_ONLY_SET;
if( kind == Key.MACRO ) if( kind == Key.MACRO )
return MACRO_ONLY; return MACRO_ONLY;
if( kind == Key.PP_DIRECTIVE ) if( kind == Key.PP_DIRECTIVE )
return PP_DIRECTIVES; return PP_DIRECTIVES;
if( kind == Key.EXPRESSION ) if( kind == Key.EXPRESSION )
return (Set) EXPRESSION.get( language ); return (Set) EXPRESSION_TABLE.get( language );
//TODO finish this //TODO finish this
return null; return null;
} }
private static final Set EMPTY = new HashSet(); private static final Set EMPTY_TABLE = new HashSet();
private static final Set NAMESPACE_ONLY; private static final Set NAMESPACE_ONLY_SET;
static static
{ {
NAMESPACE_ONLY = new HashSet(); NAMESPACE_ONLY_SET = new HashSet();
NAMESPACE_ONLY.add(Keywords.NAMESPACE ); NAMESPACE_ONLY_SET.add(Keywords.NAMESPACE );
} }
private static final Set MACRO_ONLY; private static final Set MACRO_ONLY;
@ -143,12 +143,12 @@ public class KeywordSets {
DECL_SPECIFIER_SEQUENCE_CPP.add( Keywords.CLASS); DECL_SPECIFIER_SEQUENCE_CPP.add( Keywords.CLASS);
} }
private static final Hashtable DECL_SPECIFIER_SEQUENCE; private static final Hashtable DECL_SPECIFIER_SEQUENCE_TABLE;
static static
{ {
DECL_SPECIFIER_SEQUENCE = new Hashtable(); DECL_SPECIFIER_SEQUENCE_TABLE = new Hashtable();
DECL_SPECIFIER_SEQUENCE.put( ParserLanguage.CPP, DECL_SPECIFIER_SEQUENCE_CPP ); DECL_SPECIFIER_SEQUENCE_TABLE.put( ParserLanguage.CPP, DECL_SPECIFIER_SEQUENCE_CPP );
DECL_SPECIFIER_SEQUENCE.put( ParserLanguage.C, DECL_SPECIFIER_SEQUENCE_C ); DECL_SPECIFIER_SEQUENCE_TABLE.put( ParserLanguage.C, DECL_SPECIFIER_SEQUENCE_C );
} }
private static final Set DECLARATION_CPP; private static final Set DECLARATION_CPP;
@ -169,12 +169,12 @@ public class KeywordSets {
// more to come // more to come
} }
private static final Hashtable DECLARATION; private static final Hashtable DECLARATION_TABLE;
static static
{ {
DECLARATION = new Hashtable(); DECLARATION_TABLE = new Hashtable();
DECLARATION.put( ParserLanguage.CPP, DECLARATION_CPP ); DECLARATION_TABLE.put( ParserLanguage.CPP, DECLARATION_CPP );
DECLARATION.put( ParserLanguage.C, DECLARATION_C ); DECLARATION_TABLE.put( ParserLanguage.C, DECLARATION_C );
} }
private static final Set STATEMENT_C; private static final Set STATEMENT_C;
@ -194,12 +194,12 @@ public class KeywordSets {
//TODO finish this //TODO finish this
} }
private static final Hashtable STATEMENT; private static final Hashtable STATEMENT_TABLE;
static static
{ {
STATEMENT = new Hashtable(); STATEMENT_TABLE = new Hashtable();
STATEMENT.put( ParserLanguage.CPP, STATEMENT_CPP); STATEMENT_TABLE.put( ParserLanguage.CPP, STATEMENT_CPP);
STATEMENT.put( ParserLanguage.C, STATEMENT_C ); STATEMENT_TABLE.put( ParserLanguage.C, STATEMENT_C );
} }
private static final Set BASE_SPECIFIER_CPP; private static final Set BASE_SPECIFIER_CPP;
@ -235,12 +235,12 @@ public class KeywordSets {
FUNCTION_MODIFIER_CPP.add( Keywords.VOLATILE ); FUNCTION_MODIFIER_CPP.add( Keywords.VOLATILE );
} }
private static final Hashtable FUNCTION_MODIFIER; private static final Hashtable FUNCTION_MODIFIER_TABLE;
static static
{ {
FUNCTION_MODIFIER= new Hashtable(); FUNCTION_MODIFIER_TABLE= new Hashtable();
FUNCTION_MODIFIER.put( ParserLanguage.CPP, FUNCTION_MODIFIER_CPP ); FUNCTION_MODIFIER_TABLE.put( ParserLanguage.CPP, FUNCTION_MODIFIER_CPP );
FUNCTION_MODIFIER.put( ParserLanguage.C, FUNCTION_MODIFIER_C ); FUNCTION_MODIFIER_TABLE.put( ParserLanguage.C, FUNCTION_MODIFIER_C );
} }
private static final Set PP_DIRECTIVES; private static final Set PP_DIRECTIVES;
@ -299,11 +299,11 @@ public class KeywordSets {
EXPRESSION_CPP.add( Keywords.THROW ); EXPRESSION_CPP.add( Keywords.THROW );
} }
private static final Hashtable EXPRESSION; private static final Hashtable EXPRESSION_TABLE;
static static
{ {
EXPRESSION = new Hashtable(); EXPRESSION_TABLE = new Hashtable();
EXPRESSION.put( ParserLanguage.CPP, EXPRESSION_CPP ); EXPRESSION_TABLE.put( ParserLanguage.CPP, EXPRESSION_CPP );
EXPRESSION.put( ParserLanguage.C, EXPRESSION_C ); EXPRESSION_TABLE.put( ParserLanguage.C, EXPRESSION_C );
} }
} }