mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-08 16:55:38 +02:00
Patch for John Camelon:
- see ChangeLogs
This commit is contained in:
parent
ef11178134
commit
f4b27bf0ee
10 changed files with 269 additions and 109 deletions
|
@ -1,48 +1,48 @@
|
|||
2003-03-11 John Camelon
|
||||
added ChangeLog to parser directory
|
||||
updated IParserCallback (and all implementors) for expressions
|
||||
removed inheritance relationship between ExpressionEvaluator and NullParserCallback
|
||||
removed redundant assignmentOperator() calls in Parser::initDeclarator
|
||||
removed class util.DeclarationSpecifier, merged Container interface into util.DeclSpecifier
|
||||
organized imports on the parser folder
|
||||
* dom/org/eclipse/cdt/internal/core/dom/DOMBuilder.java
|
||||
* dom/org/eclipse/cdt/internal/core/dom/Declarator.java
|
||||
* dom/org/eclipse/cdt/internal/core/dom/ParameterDeclaration.java
|
||||
* dom/org/eclipse/cdt/internal/core/dom/SimpleDeclaration.java
|
||||
* parser/org/eclipse/cdt/internal/core/model/NewModelBuilder.java
|
||||
* parser/org/eclipse/cdt/internal/core/model/Parameter.java
|
||||
* parser/org/eclipse/cdt/internal/core/model/SimpleDeclarationWrapper.java
|
||||
* parser/org/eclipse/cdt/internal/core/parser/ExpressionEvaluator.java
|
||||
* parser/org/eclipse/cdt/internal/core/parser/IParserCallback.java
|
||||
* parser/org/eclipse/cdt/internal/core/parser/NullParserCallback.java
|
||||
* parser/org/eclipse/cdt/internal/core/parser/Parser.java
|
||||
* parser/org/eclipse/cdt/internal/core/parser/util/DeclSpecifier.java
|
||||
|
||||
2003-03-10 John Camelon
|
||||
added in support for detecting and reporting circular inclusions
|
||||
added optimization by caching inclusion directories
|
||||
added macro pasting capabilities
|
||||
updated inclusion searching algorithm for local inclusions
|
||||
|
||||
2003-03-07 John Camelon
|
||||
fixed initDeclarators for the outline view.
|
||||
|
||||
2003-03-06 Doug Schaefer
|
||||
Some minor fixes to get constructors/destructors parsing as well as some minor clean up and robustness.
|
||||
|
||||
2003-03-06 John Camelon
|
||||
added quickParse heuristic to Scanner for handling #if conditionals to avoid throwing
|
||||
ScannerExceptions on undefined preprocessor symbols
|
||||
added minimal enum support to Parser (though not to DOM or CModel)
|
||||
|
||||
2003-03-06 Andrew Niefer
|
||||
Implementation of Namespaces & using directives in new parser's symbol table
|
||||
|
||||
2003-03-05 Doug Schaefer
|
||||
Some minor fixes to the parser.
|
||||
|
||||
2003-03-04 Doug Schaefer
|
||||
Added Parser in the "parser" source folder in cdt.core
|
||||
Preference in the C/C++ preference page to enable/disable use of the new parser (disabled by default)
|
||||
Start on the DOM which we are using to test the parser (source folder "dom")
|
||||
Start on a new Model Builder for creating CElements using the new parser (currently in source folder "parser")
|
||||
2003-03-11 John Camelon
|
||||
added ChangeLog to parser directory
|
||||
updated IParserCallback (and all implementors) for expressions
|
||||
removed inheritance relationship between ExpressionEvaluator and NullParserCallback
|
||||
removed redundant assignmentOperator() calls in Parser::initDeclarator
|
||||
removed class util.DeclarationSpecifier, merged Container interface into util.DeclSpecifier
|
||||
organized imports on the parser folder
|
||||
* dom/org/eclipse/cdt/internal/core/dom/DOMBuilder.java
|
||||
* dom/org/eclipse/cdt/internal/core/dom/Declarator.java
|
||||
* dom/org/eclipse/cdt/internal/core/dom/ParameterDeclaration.java
|
||||
* dom/org/eclipse/cdt/internal/core/dom/SimpleDeclaration.java
|
||||
* parser/org/eclipse/cdt/internal/core/model/NewModelBuilder.java
|
||||
* parser/org/eclipse/cdt/internal/core/model/Parameter.java
|
||||
* parser/org/eclipse/cdt/internal/core/model/SimpleDeclarationWrapper.java
|
||||
* parser/org/eclipse/cdt/internal/core/parser/ExpressionEvaluator.java
|
||||
* parser/org/eclipse/cdt/internal/core/parser/IParserCallback.java
|
||||
* parser/org/eclipse/cdt/internal/core/parser/NullParserCallback.java
|
||||
* parser/org/eclipse/cdt/internal/core/parser/Parser.java
|
||||
* parser/org/eclipse/cdt/internal/core/parser/util/DeclSpecifier.java
|
||||
|
||||
2003-03-10 John Camelon
|
||||
added in support for detecting and reporting circular inclusions
|
||||
added optimization by caching inclusion directories
|
||||
added macro pasting capabilities
|
||||
updated inclusion searching algorithm for local inclusions
|
||||
|
||||
2003-03-07 John Camelon
|
||||
fixed initDeclarators for the outline view.
|
||||
|
||||
2003-03-06 Doug Schaefer
|
||||
Some minor fixes to get constructors/destructors parsing as well as some minor clean up and robustness.
|
||||
|
||||
2003-03-06 John Camelon
|
||||
added quickParse heuristic to Scanner for handling #if conditionals to avoid throwing
|
||||
ScannerExceptions on undefined preprocessor symbols
|
||||
added minimal enum support to Parser (though not to DOM or CModel)
|
||||
|
||||
2003-03-06 Andrew Niefer
|
||||
Implementation of Namespaces & using directives in new parser's symbol table
|
||||
|
||||
2003-03-05 Doug Schaefer
|
||||
Some minor fixes to the parser.
|
||||
|
||||
2003-03-04 Doug Schaefer
|
||||
Added Parser in the "parser" source folder in cdt.core
|
||||
Preference in the C/C++ preference page to enable/disable use of the new parser (disabled by default)
|
||||
Start on the DOM which we are using to test the parser (source folder "dom")
|
||||
Start on a new Model Builder for creating CElements using the new parser (currently in source folder "parser")
|
||||
|
|
|
@ -17,7 +17,6 @@ import org.eclipse.cdt.core.model.ICElement;
|
|||
import org.eclipse.cdt.internal.core.parser.IParserCallback;
|
||||
import org.eclipse.cdt.internal.core.parser.Token;
|
||||
import org.eclipse.cdt.internal.core.parser.util.DeclSpecifier;
|
||||
import org.eclipse.cdt.internal.core.parser.util.DeclarationSpecifier;
|
||||
import org.eclipse.cdt.internal.core.parser.util.Name;
|
||||
|
||||
public class NewModelBuilder implements IParserCallback {
|
||||
|
@ -86,7 +85,7 @@ public class NewModelBuilder implements IParserCallback {
|
|||
* @see org.eclipse.cdt.core.newparser.IParserCallback#beginDeclarator()
|
||||
*/
|
||||
public Object declaratorBegin(Object container) {
|
||||
DeclarationSpecifier.Container declSpec = (DeclarationSpecifier.Container)container;
|
||||
DeclSpecifier.Container declSpec = (DeclSpecifier.Container)container;
|
||||
List declarators = declSpec.getDeclarators();
|
||||
Declarator declarator =new Declarator();
|
||||
declarators.add( declarator );
|
||||
|
@ -294,11 +293,23 @@ org.eclipse.cdt.internal.core.newparser.IParserCallback#beginSimpleDeclaration(T
|
|||
* @see org.eclipse.cdt.internal.core.newparser.IParserCallback#declaratorAbort(java.lang.Object, java.lang.Object)
|
||||
*/
|
||||
public void declaratorAbort(Object container, Object declarator) {
|
||||
DeclarationSpecifier.Container declSpec = (DeclarationSpecifier.Container)container;
|
||||
DeclSpecifier.Container declSpec = (DeclSpecifier.Container)container;
|
||||
Declarator toBeRemoved =(Declarator)declarator;
|
||||
declSpec.removeDeclarator( toBeRemoved );
|
||||
toBeRemoved = null;
|
||||
currName = null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#expressionBegin(java.lang.Object)
|
||||
*/
|
||||
public Object expressionBegin(Object container) {
|
||||
return null;
|
||||
}
|
||||
/**
|
||||
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#expressionEnd(java.lang.Object)
|
||||
*/
|
||||
public void expressionEnd(Object expression) {
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -4,7 +4,6 @@ import java.util.LinkedList;
|
|||
import java.util.List;
|
||||
|
||||
import org.eclipse.cdt.internal.core.parser.util.DeclSpecifier;
|
||||
import org.eclipse.cdt.internal.core.parser.util.DeclarationSpecifier;
|
||||
|
||||
/**
|
||||
* @author jcamelon
|
||||
|
@ -14,16 +13,16 @@ import org.eclipse.cdt.internal.core.parser.util.DeclarationSpecifier;
|
|||
* To enable and disable the creation of type comments go to
|
||||
* Window>Preferences>Java>Code Generation.
|
||||
*/
|
||||
public class Parameter extends DeclSpecifier implements DeclarationSpecifier.Container
|
||||
public class Parameter extends DeclSpecifier implements DeclSpecifier.Container
|
||||
{
|
||||
DeclarationSpecifier declSpec = null;
|
||||
DeclSpecifier declSpec = null;
|
||||
|
||||
/**
|
||||
* @see org.eclipse.cdt.internal.core.dom.DeclarationSpecifier.CElementWrapper#getDeclSpecifier()
|
||||
*/
|
||||
public DeclarationSpecifier getDeclSpecifier() {
|
||||
public DeclSpecifier getDeclSpecifier() {
|
||||
if( declSpec == null )
|
||||
declSpec = new DeclarationSpecifier();
|
||||
declSpec = new DeclSpecifier();
|
||||
|
||||
return declSpec;
|
||||
}
|
||||
|
@ -31,7 +30,7 @@ public class Parameter extends DeclSpecifier implements DeclarationSpecifier.Con
|
|||
/**
|
||||
* @see org.eclipse.cdt.internal.core.dom.DeclarationSpecifier.CElementWrapper#setDeclSpecifier(org.eclipse.cdt.internal.core.dom.DeclarationSpecifier)
|
||||
*/
|
||||
public void setDeclSpecifier(DeclarationSpecifier in) {
|
||||
public void setDeclSpecifier(DeclSpecifier in) {
|
||||
declSpec = in;
|
||||
}
|
||||
private List declarators = new LinkedList();
|
||||
|
|
|
@ -6,7 +6,6 @@ import java.util.List;
|
|||
import org.eclipse.cdt.core.model.IStructure;
|
||||
import org.eclipse.cdt.core.model.ITranslationUnit;
|
||||
import org.eclipse.cdt.internal.core.parser.util.DeclSpecifier;
|
||||
import org.eclipse.cdt.internal.core.parser.util.DeclarationSpecifier;
|
||||
|
||||
/**
|
||||
* @author jcamelon
|
||||
|
@ -16,7 +15,7 @@ import org.eclipse.cdt.internal.core.parser.util.DeclarationSpecifier;
|
|||
* To enable and disable the creation of type comments go to
|
||||
* Window>Preferences>Java>Code Generation.
|
||||
*/
|
||||
public class SimpleDeclarationWrapper extends DeclSpecifier implements DeclarationSpecifier.Container, ICElementWrapper {
|
||||
public class SimpleDeclarationWrapper extends DeclSpecifier implements DeclSpecifier.Container, ICElementWrapper {
|
||||
|
||||
private CElement element = null;
|
||||
private CElement parent = null;
|
||||
|
@ -137,14 +136,14 @@ public class SimpleDeclarationWrapper extends DeclSpecifier implements Declarati
|
|||
return declarators;
|
||||
}
|
||||
|
||||
DeclarationSpecifier declSpec = null;
|
||||
DeclSpecifier declSpec = null;
|
||||
|
||||
/**
|
||||
* @see org.eclipse.cdt.internal.core.dom.DeclarationSpecifier.CElementWrapper#getDeclSpecifier()
|
||||
*/
|
||||
public DeclarationSpecifier getDeclSpecifier() {
|
||||
public DeclSpecifier getDeclSpecifier() {
|
||||
if( declSpec == null )
|
||||
declSpec = new DeclarationSpecifier();
|
||||
declSpec = new DeclSpecifier();
|
||||
|
||||
return declSpec;
|
||||
}
|
||||
|
@ -152,7 +151,7 @@ public class SimpleDeclarationWrapper extends DeclSpecifier implements Declarati
|
|||
/**
|
||||
* @see org.eclipse.cdt.internal.core.dom.DeclarationSpecifier.CElementWrapper#setDeclSpecifier(org.eclipse.cdt.internal.core.dom.DeclarationSpecifier)
|
||||
*/
|
||||
public void setDeclSpecifier(DeclarationSpecifier in) {
|
||||
public void setDeclSpecifier(DeclSpecifier in) {
|
||||
declSpec = in;
|
||||
}
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ package org.eclipse.cdt.internal.core.parser;
|
|||
import java.util.EmptyStackException;
|
||||
import java.util.Stack;
|
||||
|
||||
public class ExpressionEvaluator extends NullParserCallback {
|
||||
public class ExpressionEvaluator implements IParserCallback {
|
||||
|
||||
public class ExpressionException extends Exception {
|
||||
public ExpressionException(String msg) {
|
||||
|
@ -108,5 +108,165 @@ public class ExpressionEvaluator extends NullParserCallback {
|
|||
public Object getResult() throws EmptyStackException {
|
||||
return stack.peek();
|
||||
}
|
||||
/**
|
||||
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#translationUnitBegin()
|
||||
*/
|
||||
public Object translationUnitBegin() {
|
||||
return null;
|
||||
}
|
||||
/**
|
||||
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#translationUnitEnd(java.lang.Object)
|
||||
*/
|
||||
public void translationUnitEnd(Object unit) {
|
||||
}
|
||||
/**
|
||||
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#inclusionBegin(java.lang.String, int)
|
||||
*/
|
||||
public void inclusionBegin(String includeFile, int offset) {
|
||||
}
|
||||
/**
|
||||
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#inclusionEnd()
|
||||
*/
|
||||
public void inclusionEnd() {
|
||||
}
|
||||
/**
|
||||
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#macro(java.lang.String, int)
|
||||
*/
|
||||
public void macro(String macroName, int offset) {
|
||||
}
|
||||
/**
|
||||
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#simpleDeclarationBegin(java.lang.Object)
|
||||
*/
|
||||
public Object simpleDeclarationBegin(Object Container) {
|
||||
return null;
|
||||
}
|
||||
/**
|
||||
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#simpleDeclarationEnd(java.lang.Object)
|
||||
*/
|
||||
public void simpleDeclarationEnd(Object declaration) {
|
||||
}
|
||||
/**
|
||||
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#parameterDeclarationBegin(java.lang.Object)
|
||||
*/
|
||||
public Object parameterDeclarationBegin(Object Container) {
|
||||
return null;
|
||||
}
|
||||
/**
|
||||
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#parameterDeclarationEnd(java.lang.Object)
|
||||
*/
|
||||
public void parameterDeclarationEnd(Object declaration) {
|
||||
}
|
||||
/**
|
||||
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#simpleDeclSpecifier(java.lang.Object, org.eclipse.cdt.internal.core.parser.Token)
|
||||
*/
|
||||
public void simpleDeclSpecifier(Object Container, Token specifier) {
|
||||
}
|
||||
/**
|
||||
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#nameBegin(org.eclipse.cdt.internal.core.parser.Token)
|
||||
*/
|
||||
public void nameBegin(Token firstToken) {
|
||||
}
|
||||
/**
|
||||
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#nameEnd(org.eclipse.cdt.internal.core.parser.Token)
|
||||
*/
|
||||
public void nameEnd(Token lastToken) {
|
||||
}
|
||||
/**
|
||||
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#declaratorBegin(java.lang.Object)
|
||||
*/
|
||||
public Object declaratorBegin(Object container) {
|
||||
return null;
|
||||
}
|
||||
/**
|
||||
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#declaratorId(java.lang.Object)
|
||||
*/
|
||||
public void declaratorId(Object declarator) {
|
||||
}
|
||||
/**
|
||||
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#declaratorAbort(java.lang.Object, java.lang.Object)
|
||||
*/
|
||||
public void declaratorAbort(Object container, Object declarator) {
|
||||
}
|
||||
/**
|
||||
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#declaratorEnd(java.lang.Object)
|
||||
*/
|
||||
public void declaratorEnd(Object declarator) {
|
||||
}
|
||||
/**
|
||||
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#argumentsBegin(java.lang.Object)
|
||||
*/
|
||||
public Object argumentsBegin(Object declarator) {
|
||||
return null;
|
||||
}
|
||||
/**
|
||||
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#argumentsEnd(java.lang.Object)
|
||||
*/
|
||||
public void argumentsEnd(Object parameterDeclarationClause) {
|
||||
}
|
||||
/**
|
||||
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#functionBodyBegin()
|
||||
*/
|
||||
public void functionBodyBegin() {
|
||||
}
|
||||
/**
|
||||
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#functionBodyEnd()
|
||||
*/
|
||||
public void functionBodyEnd() {
|
||||
}
|
||||
/**
|
||||
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#classSpecifierBegin(java.lang.Object, org.eclipse.cdt.internal.core.parser.Token)
|
||||
*/
|
||||
public Object classSpecifierBegin(Object container, Token classKey) {
|
||||
return null;
|
||||
}
|
||||
/**
|
||||
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#classSpecifierName(java.lang.Object)
|
||||
*/
|
||||
public void classSpecifierName(Object classSpecifier) {
|
||||
}
|
||||
/**
|
||||
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#classSpecifierEnd(java.lang.Object)
|
||||
*/
|
||||
public void classSpecifierEnd(Object classSpecifier) {
|
||||
}
|
||||
/**
|
||||
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#baseSpecifierBegin(java.lang.Object)
|
||||
*/
|
||||
public Object baseSpecifierBegin(Object containingClassSpec) {
|
||||
return null;
|
||||
}
|
||||
/**
|
||||
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#baseSpecifierName(java.lang.Object)
|
||||
*/
|
||||
public void baseSpecifierName(Object baseSpecifier) {
|
||||
}
|
||||
/**
|
||||
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#baseSpecifierVisibility(java.lang.Object, org.eclipse.cdt.internal.core.parser.Token)
|
||||
*/
|
||||
public void baseSpecifierVisibility(
|
||||
Object baseSpecifier,
|
||||
Token visibility) {
|
||||
}
|
||||
/**
|
||||
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#baseSpecifierVirtual(java.lang.Object, boolean)
|
||||
*/
|
||||
public void baseSpecifierVirtual(Object baseSpecifier, boolean virtual) {
|
||||
}
|
||||
/**
|
||||
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#baseSpecifierEnd(java.lang.Object)
|
||||
*/
|
||||
public void baseSpecifierEnd(Object baseSpecifier) {
|
||||
}
|
||||
/**
|
||||
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#expressionBegin(java.lang.Object)
|
||||
*/
|
||||
public Object expressionBegin(Object container) {
|
||||
return null;
|
||||
}
|
||||
/**
|
||||
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#expressionEnd(java.lang.Object)
|
||||
*/
|
||||
public void expressionEnd(Object expression) {
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -37,7 +37,6 @@ public interface IParserCallback {
|
|||
|
||||
public Object argumentsBegin( Object declarator );
|
||||
public void argumentsEnd(Object parameterDeclarationClause);
|
||||
|
||||
|
||||
public void functionBodyBegin();
|
||||
public void functionBodyEnd();
|
||||
|
@ -52,6 +51,8 @@ public interface IParserCallback {
|
|||
public void baseSpecifierVirtual( Object baseSpecifier, boolean virtual );
|
||||
public void baseSpecifierEnd( Object baseSpecifier );
|
||||
|
||||
public Object expressionBegin( Object container );
|
||||
public void expressionOperator(Token operator) throws Exception;
|
||||
public void expressionTerminal(Token terminal) throws Exception;
|
||||
public void expressionEnd(Object expression );
|
||||
}
|
||||
|
|
|
@ -172,4 +172,16 @@ public class NullParserCallback implements IParserCallback {
|
|||
public void declaratorAbort(Object container, Object declarator) {
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#expressionBegin(java.lang.Object)
|
||||
*/
|
||||
public Object expressionBegin(Object container) {
|
||||
return null;
|
||||
}
|
||||
/**
|
||||
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#expressionEnd(java.lang.Object)
|
||||
*/
|
||||
public void expressionEnd(Object expression) {
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -437,16 +437,6 @@ c, quick);
|
|||
// doNothing
|
||||
}
|
||||
|
||||
// assignmentExpression || { initializerList , } || { }
|
||||
try
|
||||
{
|
||||
assignmentExpression();
|
||||
}
|
||||
catch( Backtrack b )
|
||||
{
|
||||
// doNothing
|
||||
}
|
||||
|
||||
if (LT(1) == Token.tLBRACE) {
|
||||
// for now, just consume to matching brace
|
||||
consume();
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
package org.eclipse.cdt.internal.core.parser.util;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.eclipse.cdt.internal.core.parser.Token;
|
||||
|
||||
/**
|
||||
|
@ -141,19 +143,19 @@ public class DeclSpecifier {
|
|||
setVolatile(true);
|
||||
break;
|
||||
case Token.t_char:
|
||||
setType(DeclarationSpecifier.t_char);
|
||||
setType(DeclSpecifier.t_char);
|
||||
break;
|
||||
case Token.t_wchar_t:
|
||||
setType(DeclarationSpecifier.t_wchar_t);
|
||||
setType(DeclSpecifier.t_wchar_t);
|
||||
break;
|
||||
case Token.t_bool:
|
||||
setType(DeclarationSpecifier.t_bool);
|
||||
setType(DeclSpecifier.t_bool);
|
||||
break;
|
||||
case Token.t_short:
|
||||
setShort(true);
|
||||
break;
|
||||
case Token.t_int:
|
||||
setType(DeclarationSpecifier.t_int);
|
||||
setType(DeclSpecifier.t_int);
|
||||
break;
|
||||
case Token.t_long:
|
||||
setLong(true);
|
||||
|
@ -165,16 +167,16 @@ public class DeclSpecifier {
|
|||
setUnsigned(true);
|
||||
break;
|
||||
case Token.t_float:
|
||||
setType(DeclarationSpecifier.t_float);
|
||||
setType(DeclSpecifier.t_float);
|
||||
break;
|
||||
case Token.t_double:
|
||||
setType(DeclarationSpecifier.t_double);
|
||||
setType(DeclSpecifier.t_double);
|
||||
break;
|
||||
case Token.t_void:
|
||||
setType(DeclarationSpecifier.t_void);
|
||||
setType(DeclSpecifier.t_void);
|
||||
break;
|
||||
case Token.tIDENTIFIER:
|
||||
setType(DeclarationSpecifier.t_type);
|
||||
setType(DeclSpecifier.t_type);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -188,4 +190,16 @@ public class DeclSpecifier {
|
|||
return declSpecifierSeq & typeMask;
|
||||
}
|
||||
|
||||
public interface Container {
|
||||
|
||||
public DeclSpecifier getDeclSpecifier();
|
||||
|
||||
public void setDeclSpecifier( DeclSpecifier in );
|
||||
|
||||
public void addDeclarator(Object declarator);
|
||||
public void removeDeclarator( Object declarator );
|
||||
public List getDeclarators();
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -1,26 +0,0 @@
|
|||
package org.eclipse.cdt.internal.core.parser.util;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author jcamelon
|
||||
*
|
||||
* To change this generated comment edit the template variable "typecomment":
|
||||
* Window>Preferences>Java>Templates.
|
||||
* To enable and disable the creation of type comments go to
|
||||
* Window>Preferences>Java>Code Generation.
|
||||
*/
|
||||
public class DeclarationSpecifier extends DeclSpecifier {
|
||||
|
||||
public interface Container {
|
||||
|
||||
public DeclarationSpecifier getDeclSpecifier();
|
||||
|
||||
public void setDeclSpecifier( DeclarationSpecifier in );
|
||||
|
||||
public void addDeclarator(Object declarator);
|
||||
public void removeDeclarator( Object declarator );
|
||||
public List getDeclarators();
|
||||
|
||||
};
|
||||
}
|
Loading…
Add table
Reference in a new issue