mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Patch for John Camelon:
CORE Minimized the number of objects being returned from Parser callbacks. Fixed CModelBuilder to handle errors better. Reorganized the DOM Hierarchy to ensure that nodes were added to the tree on End() callbacks. Fixed defect 36247(). TESTS Added DOMTests::testBug36247().
This commit is contained in:
parent
34564166f4
commit
1408e4cd83
21 changed files with 278 additions and 302 deletions
|
@ -20,8 +20,9 @@ public class ASMDefinition extends Declaration {
|
||||||
|
|
||||||
final private String assemblyCode;
|
final private String assemblyCode;
|
||||||
|
|
||||||
public ASMDefinition( String code )
|
public ASMDefinition( IScope scope, String code )
|
||||||
{
|
{
|
||||||
|
super( scope );
|
||||||
assemblyCode = code;
|
assemblyCode = code;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -63,9 +63,8 @@ public class DOMBuilder implements IParserCallback
|
||||||
/**
|
/**
|
||||||
* @see org.eclipse.cdt.internal.core.newparser.IParserCallback#classSpecifierName()
|
* @see org.eclipse.cdt.internal.core.newparser.IParserCallback#classSpecifierName()
|
||||||
*/
|
*/
|
||||||
public Object classSpecifierName(Object classSpecifier) {
|
public void classSpecifierName(Object classSpecifier) {
|
||||||
((ClassSpecifier)classSpecifier).setName(currName);
|
((ClassSpecifier)classSpecifier).setName(currName);
|
||||||
return classSpecifier;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -95,15 +94,14 @@ public class DOMBuilder implements IParserCallback
|
||||||
/**
|
/**
|
||||||
* @see org.eclipse.cdt.internal.core.newparser.IParserCallback#declaratorId(org.eclipse.cdt.internal.core.newparser.Token)
|
* @see org.eclipse.cdt.internal.core.newparser.IParserCallback#declaratorId(org.eclipse.cdt.internal.core.newparser.Token)
|
||||||
*/
|
*/
|
||||||
public Object declaratorId(Object declarator) {
|
public void declaratorId(Object declarator) {
|
||||||
((Declarator)declarator).setName(currName);
|
((Declarator)declarator).setName(currName);
|
||||||
return declarator;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see org.eclipse.cdt.internal.core.newparser.IParserCallback#declSpecifier(org.eclipse.cdt.internal.core.newparser.Token)
|
* @see org.eclipse.cdt.internal.core.newparser.IParserCallback#declSpecifier(org.eclipse.cdt.internal.core.newparser.Token)
|
||||||
*/
|
*/
|
||||||
public Object simpleDeclSpecifier(Object Container, Token specifier) {
|
public void simpleDeclSpecifier(Object Container, Token specifier) {
|
||||||
DeclSpecifier.Container decl = (DeclSpecifier.Container)Container;
|
DeclSpecifier.Container decl = (DeclSpecifier.Container)Container;
|
||||||
DeclSpecifier declSpec = decl.getDeclSpecifier();
|
DeclSpecifier declSpec = decl.getDeclSpecifier();
|
||||||
if( declSpec == null )
|
if( declSpec == null )
|
||||||
|
@ -113,7 +111,6 @@ public class DOMBuilder implements IParserCallback
|
||||||
}
|
}
|
||||||
|
|
||||||
declSpec.setType( specifier );
|
declSpec.setType( specifier );
|
||||||
return decl;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -173,8 +170,7 @@ public class DOMBuilder implements IParserCallback
|
||||||
* @see org.eclipse.cdt.internal.core.newparser.IParserCallback#simpleDeclarationBegin(org.eclipse.cdt.internal.core.newparser.Token)
|
* @see org.eclipse.cdt.internal.core.newparser.IParserCallback#simpleDeclarationBegin(org.eclipse.cdt.internal.core.newparser.Token)
|
||||||
*/
|
*/
|
||||||
public Object simpleDeclarationBegin(Object container, Token firstToken) {
|
public Object simpleDeclarationBegin(Object container, Token firstToken) {
|
||||||
SimpleDeclaration decl = new SimpleDeclaration();
|
SimpleDeclaration decl = new SimpleDeclaration((IScope)container);
|
||||||
((IScope)container).addDeclaration(decl);
|
|
||||||
if( container instanceof IAccessable )
|
if( container instanceof IAccessable )
|
||||||
decl.setAccessSpecifier(new AccessSpecifier( ((IAccessable)container).getVisibility() ));
|
decl.setAccessSpecifier(new AccessSpecifier( ((IAccessable)container).getVisibility() ));
|
||||||
((IOffsetable)decl).setStartingOffset( firstToken.getOffset() );
|
((IOffsetable)decl).setStartingOffset( firstToken.getOffset() );
|
||||||
|
@ -185,8 +181,14 @@ public class DOMBuilder implements IParserCallback
|
||||||
* @see org.eclipse.cdt.internal.core.newparser.IParserCallback#simpleDeclarationEnd(org.eclipse.cdt.internal.core.newparser.Token)
|
* @see org.eclipse.cdt.internal.core.newparser.IParserCallback#simpleDeclarationEnd(org.eclipse.cdt.internal.core.newparser.Token)
|
||||||
*/
|
*/
|
||||||
public void simpleDeclarationEnd(Object declaration, Token lastToken) {
|
public void simpleDeclarationEnd(Object declaration, Token lastToken) {
|
||||||
IOffsetable offsetable = (IOffsetable)declaration;
|
SimpleDeclaration decl = (SimpleDeclaration)declaration;
|
||||||
offsetable.setTotalLength( lastToken.getOffset() + lastToken.getLength() - offsetable.getStartingOffset());
|
IOffsetable offsetable = (IOffsetable)decl;
|
||||||
|
// TODO Kludge solve me!
|
||||||
|
if( lastToken != null )
|
||||||
|
offsetable.setTotalLength( lastToken.getOffset() + lastToken.getLength() - offsetable.getStartingOffset());
|
||||||
|
else
|
||||||
|
offsetable.setTotalLength( 0 );
|
||||||
|
decl.getOwnerScope().addDeclaration(decl);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -231,14 +233,13 @@ public class DOMBuilder implements IParserCallback
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public Object baseSpecifierVirtual( Object baseSpecifier, boolean virtual )
|
public void baseSpecifierVirtual( Object baseSpecifier, boolean virtual )
|
||||||
{
|
{
|
||||||
BaseSpecifier bs = (BaseSpecifier)baseSpecifier;
|
BaseSpecifier bs = (BaseSpecifier)baseSpecifier;
|
||||||
bs.setVirtual( virtual );
|
bs.setVirtual( virtual );
|
||||||
return bs;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public Object baseSpecifierVisibility( Object baseSpecifier, Token visibility )
|
public void baseSpecifierVisibility( Object baseSpecifier, Token visibility )
|
||||||
{
|
{
|
||||||
int access = AccessSpecifier.v_public;
|
int access = AccessSpecifier.v_public;
|
||||||
switch( visibility.type )
|
switch( visibility.type )
|
||||||
|
@ -257,25 +258,24 @@ public class DOMBuilder implements IParserCallback
|
||||||
}
|
}
|
||||||
|
|
||||||
((BaseSpecifier)baseSpecifier).setAccess(access);
|
((BaseSpecifier)baseSpecifier).setAccess(access);
|
||||||
return baseSpecifier;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public Object baseSpecifierName( Object baseSpecifier )
|
public void baseSpecifierName( Object baseSpecifier )
|
||||||
{
|
{
|
||||||
((BaseSpecifier)baseSpecifier).setName(currName);
|
((BaseSpecifier)baseSpecifier).setName(currName);
|
||||||
return baseSpecifier;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public Object parameterDeclarationBegin( Object container )
|
public Object parameterDeclarationBegin( Object container )
|
||||||
{
|
{
|
||||||
IScope clause = (IScope)container;
|
IScope clause = (IScope)container;
|
||||||
ParameterDeclaration pd = new ParameterDeclaration();
|
ParameterDeclaration pd = new ParameterDeclaration(clause);
|
||||||
clause.addDeclaration( pd );
|
|
||||||
return pd;
|
return pd;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void parameterDeclarationEnd( Object declaration ){
|
public void parameterDeclarationEnd( Object declaration ){
|
||||||
|
ParameterDeclaration d = (ParameterDeclaration)declaration;
|
||||||
|
d.getOwnerScope().addDeclaration(d);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* @see org.eclipse.cdt.internal.core.newparser.IParserCallback#declaratorAbort(java.lang.Object, java.lang.Object)
|
* @see org.eclipse.cdt.internal.core.newparser.IParserCallback#declaratorAbort(java.lang.Object, java.lang.Object)
|
||||||
|
@ -314,8 +314,7 @@ public class DOMBuilder implements IParserCallback
|
||||||
/**
|
/**
|
||||||
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#classSpecifierSafe(java.lang.Object)
|
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#classSpecifierSafe(java.lang.Object)
|
||||||
*/
|
*/
|
||||||
public Object classSpecifierSafe(Object classSpecifier) {
|
public void classSpecifierSafe(Object classSpecifier) {
|
||||||
return classSpecifier;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -352,19 +351,17 @@ public class DOMBuilder implements IParserCallback
|
||||||
/**
|
/**
|
||||||
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#elaboratedTypeSpecifierName(java.lang.Object)
|
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#elaboratedTypeSpecifierName(java.lang.Object)
|
||||||
*/
|
*/
|
||||||
public Object elaboratedTypeSpecifierName(Object elab) {
|
public void elaboratedTypeSpecifierName(Object elab) {
|
||||||
((ElaboratedTypeSpecifier)elab).setName( currName );
|
((ElaboratedTypeSpecifier)elab).setName( currName );
|
||||||
return elab;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#simpleDeclSpecifierName(java.lang.Object)
|
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#simpleDeclSpecifierName(java.lang.Object)
|
||||||
*/
|
*/
|
||||||
public Object simpleDeclSpecifierName(Object declaration) {
|
public void simpleDeclSpecifierName(Object declaration) {
|
||||||
DeclSpecifier.Container decl = (DeclSpecifier.Container)declaration;
|
DeclSpecifier.Container decl = (DeclSpecifier.Container)declaration;
|
||||||
DeclSpecifier declSpec = decl.getDeclSpecifier();
|
DeclSpecifier declSpec = decl.getDeclSpecifier();
|
||||||
declSpec.setName( currName );
|
declSpec.setName( currName );
|
||||||
return declSpec;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
@ -376,7 +373,7 @@ public class DOMBuilder implements IParserCallback
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#classMemberVisibility(java.lang.Object, org.eclipse.cdt.internal.core.parser.Token)
|
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#classMemberVisibility(java.lang.Object, org.eclipse.cdt.internal.core.parser.Token)
|
||||||
*/
|
*/
|
||||||
public Object classMemberVisibility(Object classSpecifier, Token visibility) {
|
public void classMemberVisibility(Object classSpecifier, Token visibility) {
|
||||||
ClassSpecifier spec = (ClassSpecifier)classSpecifier;
|
ClassSpecifier spec = (ClassSpecifier)classSpecifier;
|
||||||
switch( visibility.getType() )
|
switch( visibility.getType() )
|
||||||
{
|
{
|
||||||
|
@ -390,7 +387,6 @@ public class DOMBuilder implements IParserCallback
|
||||||
spec.setVisibility( AccessSpecifier.v_private );
|
spec.setVisibility( AccessSpecifier.v_private );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return spec;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
@ -414,15 +410,14 @@ public class DOMBuilder implements IParserCallback
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#pointerOperatorName(java.lang.Object)
|
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#pointerOperatorName(java.lang.Object)
|
||||||
*/
|
*/
|
||||||
public Object pointerOperatorName(Object ptrOperator) {
|
public void pointerOperatorName(Object ptrOperator) {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return ptrOperator;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#pointerOperatorType(java.lang.Object, org.eclipse.cdt.internal.core.parser.Token)
|
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#pointerOperatorType(java.lang.Object, org.eclipse.cdt.internal.core.parser.Token)
|
||||||
*/
|
*/
|
||||||
public Object pointerOperatorType(Object ptrOperator, Token type) {
|
public void pointerOperatorType(Object ptrOperator, Token type) {
|
||||||
PointerOperator ptrOp = (PointerOperator)ptrOperator;
|
PointerOperator ptrOp = (PointerOperator)ptrOperator;
|
||||||
switch( type.getType() )
|
switch( type.getType() )
|
||||||
{
|
{
|
||||||
|
@ -435,13 +430,12 @@ public class DOMBuilder implements IParserCallback
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return ptrOp;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#pointerOperatorCVModifier(java.lang.Object, org.eclipse.cdt.internal.core.parser.Token)
|
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#pointerOperatorCVModifier(java.lang.Object, org.eclipse.cdt.internal.core.parser.Token)
|
||||||
*/
|
*/
|
||||||
public Object pointerOperatorCVModifier(Object ptrOperator, Token modifier) {
|
public void pointerOperatorCVModifier(Object ptrOperator, Token modifier) {
|
||||||
PointerOperator ptrOp = (PointerOperator)ptrOperator;
|
PointerOperator ptrOp = (PointerOperator)ptrOperator;
|
||||||
switch( modifier.getType() )
|
switch( modifier.getType() )
|
||||||
{
|
{
|
||||||
|
@ -454,13 +448,12 @@ public class DOMBuilder implements IParserCallback
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return ptrOp;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#declaratorCVModifier(java.lang.Object, org.eclipse.cdt.internal.core.parser.Token)
|
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#declaratorCVModifier(java.lang.Object, org.eclipse.cdt.internal.core.parser.Token)
|
||||||
*/
|
*/
|
||||||
public Object declaratorCVModifier(Object declarator, Token modifier) {
|
public void declaratorCVModifier(Object declarator, Token modifier) {
|
||||||
Declarator decl = (Declarator)declarator;
|
Declarator decl = (Declarator)declarator;
|
||||||
switch( modifier.getType() )
|
switch( modifier.getType() )
|
||||||
{
|
{
|
||||||
|
@ -473,7 +466,7 @@ public class DOMBuilder implements IParserCallback
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return decl;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
@ -498,20 +491,18 @@ public class DOMBuilder implements IParserCallback
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#exceptionSpecificationTypename(java.lang.Object)
|
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#exceptionSpecificationTypename(java.lang.Object)
|
||||||
*/
|
*/
|
||||||
public Object declaratorThrowExceptionName(Object declarator )
|
public void declaratorThrowExceptionName(Object declarator )
|
||||||
{
|
{
|
||||||
Declarator decl = (Declarator)declarator;
|
Declarator decl = (Declarator)declarator;
|
||||||
decl.getExceptionSpecifier().addTypeName( currName );
|
decl.getExceptionSpecifier().addTypeName( currName );
|
||||||
return decl;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#declaratorThrowsException(java.lang.Object)
|
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#declaratorThrowsException(java.lang.Object)
|
||||||
*/
|
*/
|
||||||
public Object declaratorThrowsException(Object declarator) {
|
public void declaratorThrowsException(Object declarator) {
|
||||||
Declarator decl = (Declarator)declarator;
|
Declarator decl = (Declarator)declarator;
|
||||||
decl.getExceptionSpecifier().setThrowsException(true);
|
decl.getExceptionSpecifier().setThrowsException(true);
|
||||||
return decl;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
@ -529,10 +520,9 @@ public class DOMBuilder implements IParserCallback
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#namespaceDeclarationId(java.lang.Object)
|
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#namespaceDeclarationId(java.lang.Object)
|
||||||
*/
|
*/
|
||||||
public Object namespaceDefinitionId(Object namespace) {
|
public void namespaceDefinitionId(Object namespace) {
|
||||||
NamespaceDefinition ns = (NamespaceDefinition)namespace;
|
NamespaceDefinition ns = (NamespaceDefinition)namespace;
|
||||||
ns.setName( currName );
|
ns.setName( currName );
|
||||||
return ns;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
@ -579,10 +569,9 @@ public class DOMBuilder implements IParserCallback
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#usingDirectiveNamespaceId(java.lang.Object)
|
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#usingDirectiveNamespaceId(java.lang.Object)
|
||||||
*/
|
*/
|
||||||
public Object usingDirectiveNamespaceId(Object dir) {
|
public void usingDirectiveNamespaceId(Object dir) {
|
||||||
UsingDirective directive = (UsingDirective)dir;
|
UsingDirective directive = (UsingDirective)dir;
|
||||||
directive.setNamespaceName( currName );
|
directive.setNamespaceName( currName );
|
||||||
return directive;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
@ -605,11 +594,10 @@ public class DOMBuilder implements IParserCallback
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#usingDeclarationMapping(java.lang.Object)
|
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#usingDeclarationMapping(java.lang.Object)
|
||||||
*/
|
*/
|
||||||
public Object usingDeclarationMapping(Object decl, boolean isTypename) {
|
public void usingDeclarationMapping(Object decl, boolean isTypename) {
|
||||||
UsingDeclaration declaration = (UsingDeclaration)decl;
|
UsingDeclaration declaration = (UsingDeclaration)decl;
|
||||||
declaration.setMappedName( currName );
|
declaration.setMappedName( currName );
|
||||||
declaration.setTypename( isTypename );
|
declaration.setTypename( isTypename );
|
||||||
return declaration;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
@ -647,10 +635,9 @@ public class DOMBuilder implements IParserCallback
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#enumSpecifierId(java.lang.Object)
|
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#enumSpecifierId(java.lang.Object)
|
||||||
*/
|
*/
|
||||||
public Object enumSpecifierId(Object enumSpec) {
|
public void enumSpecifierId(Object enumSpec) {
|
||||||
EnumerationSpecifier es = (EnumerationSpecifier)enumSpec;
|
EnumerationSpecifier es = (EnumerationSpecifier)enumSpec;
|
||||||
es.setName( currName );
|
es.setName( currName );
|
||||||
return es;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
@ -682,11 +669,10 @@ public class DOMBuilder implements IParserCallback
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#enumDefinitionId(java.lang.Object)
|
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#enumDefinitionId(java.lang.Object)
|
||||||
*/
|
*/
|
||||||
public Object enumeratorId(Object enumDefn) {
|
public void enumeratorId(Object enumDefn) {
|
||||||
EnumeratorDefinition definition = (EnumeratorDefinition)enumDefn;
|
EnumeratorDefinition definition = (EnumeratorDefinition)enumDefn;
|
||||||
definition.setName( currName );
|
definition.setName( currName );
|
||||||
((IOffsetable)enumDefn).setStartingOffset( currName.getStartOffset() );
|
((IOffsetable)enumDefn).setStartingOffset( currName.getStartOffset() );
|
||||||
return definition;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
@ -702,7 +688,7 @@ public class DOMBuilder implements IParserCallback
|
||||||
*/
|
*/
|
||||||
public void asmDefinition(Object container, String assemblyCode) {
|
public void asmDefinition(Object container, String assemblyCode) {
|
||||||
IScope scope = (IScope)container;
|
IScope scope = (IScope)container;
|
||||||
ASMDefinition definition = new ASMDefinition( assemblyCode );
|
ASMDefinition definition = new ASMDefinition( scope, assemblyCode );
|
||||||
scope.addDeclaration( definition );
|
scope.addDeclaration( definition );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -748,10 +734,9 @@ public class DOMBuilder implements IParserCallback
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#constructorChainId(java.lang.Object)
|
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#constructorChainId(java.lang.Object)
|
||||||
*/
|
*/
|
||||||
public Object constructorChainElementId(Object element) {
|
public void constructorChainElementId(Object element) {
|
||||||
ConstructorChainElement ele = (ConstructorChainElement)element;
|
ConstructorChainElement ele = (ConstructorChainElement)element;
|
||||||
ele.setName(currName);
|
ele.setName(currName);
|
||||||
return ele;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
@ -774,15 +759,16 @@ public class DOMBuilder implements IParserCallback
|
||||||
*/
|
*/
|
||||||
public Object explicitInstantiationBegin(Object container) {
|
public Object explicitInstantiationBegin(Object container) {
|
||||||
IScope scope = (IScope)container;
|
IScope scope = (IScope)container;
|
||||||
ExplicitTemplateDeclaration etd = new ExplicitTemplateDeclaration( ExplicitTemplateDeclaration.k_instantiation );
|
ExplicitTemplateDeclaration etd = new ExplicitTemplateDeclaration( scope, ExplicitTemplateDeclaration.k_instantiation );
|
||||||
scope.addDeclaration(etd);
|
|
||||||
return etd;
|
return etd;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#explicitInstantiationEnd(java.lang.Object)
|
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#explicitInstantiationEnd(java.lang.Object)
|
||||||
*/
|
*/
|
||||||
public void explicitInstantiationEnd(Object instantiation) {
|
public void explicitInstantiationEnd(Object instantiation) {
|
||||||
|
ExplicitTemplateDeclaration declaration = (ExplicitTemplateDeclaration)instantiation;
|
||||||
|
declaration.getOwnerScope().addDeclaration(declaration);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
@ -790,8 +776,7 @@ public class DOMBuilder implements IParserCallback
|
||||||
*/
|
*/
|
||||||
public Object explicitSpecializationBegin(Object container) {
|
public Object explicitSpecializationBegin(Object container) {
|
||||||
IScope scope = (IScope)container;
|
IScope scope = (IScope)container;
|
||||||
ExplicitTemplateDeclaration etd = new ExplicitTemplateDeclaration( ExplicitTemplateDeclaration.k_specialization);
|
ExplicitTemplateDeclaration etd = new ExplicitTemplateDeclaration( scope, ExplicitTemplateDeclaration.k_specialization);
|
||||||
scope.addDeclaration(etd);
|
|
||||||
return etd;
|
return etd;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -799,15 +784,16 @@ public class DOMBuilder implements IParserCallback
|
||||||
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#explicitSpecializationEnd(java.lang.Object)
|
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#explicitSpecializationEnd(java.lang.Object)
|
||||||
*/
|
*/
|
||||||
public void explicitSpecializationEnd(Object instantiation) {
|
public void explicitSpecializationEnd(Object instantiation) {
|
||||||
|
ExplicitTemplateDeclaration etd = (ExplicitTemplateDeclaration)instantiation;
|
||||||
|
etd.getOwnerScope().addDeclaration(etd);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#declaratorPureVirtual(java.lang.Object)
|
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#declaratorPureVirtual(java.lang.Object)
|
||||||
*/
|
*/
|
||||||
public Object declaratorPureVirtual(Object declarator) {
|
public void declaratorPureVirtual(Object declarator) {
|
||||||
Declarator d = (Declarator)declarator;
|
Declarator d = (Declarator)declarator;
|
||||||
d.setPureVirtual(true);
|
d.setPureVirtual(true);
|
||||||
return d;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
@ -856,31 +842,30 @@ public class DOMBuilder implements IParserCallback
|
||||||
default:
|
default:
|
||||||
k = 0;
|
k = 0;
|
||||||
}
|
}
|
||||||
TemplateParameter p = new TemplateParameter( k );
|
TemplateParameter p = new TemplateParameter( list, k );
|
||||||
list.addDeclaration(p);
|
|
||||||
return p;
|
return p;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#templateTypeParameterName(java.lang.Object)
|
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#templateTypeParameterName(java.lang.Object)
|
||||||
*/
|
*/
|
||||||
public Object templateTypeParameterName(Object typeParm) {
|
public void templateTypeParameterName(Object typeParm) {
|
||||||
((TemplateParameter)typeParm).setName( currName );
|
((TemplateParameter)typeParm).setName( currName );
|
||||||
return typeParm;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#templateTypeInitialTypeId(java.lang.Object)
|
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#templateTypeInitialTypeId(java.lang.Object)
|
||||||
*/
|
*/
|
||||||
public Object templateTypeParameterInitialTypeId(Object typeParm) {
|
public void templateTypeParameterInitialTypeId(Object typeParm) {
|
||||||
((TemplateParameter)typeParm).setTypeId( currName );
|
((TemplateParameter)typeParm).setTypeId( currName );
|
||||||
return typeParm;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#templateTypeParameterEnd(java.lang.Object)
|
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#templateTypeParameterEnd(java.lang.Object)
|
||||||
*/
|
*/
|
||||||
public void templateTypeParameterEnd(Object typeParm) {
|
public void templateTypeParameterEnd(Object typeParm) {
|
||||||
|
TemplateParameter parameter = (TemplateParameter)typeParm;
|
||||||
|
parameter.getOwnerScope().addDeclaration( parameter );
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
|
|
@ -3,5 +3,19 @@ package org.eclipse.cdt.internal.core.dom;
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
public class Declaration {
|
public class Declaration {
|
||||||
|
|
||||||
|
public Declaration( IScope scope )
|
||||||
|
{
|
||||||
|
ownerScope = scope;
|
||||||
|
}
|
||||||
|
|
||||||
|
private final IScope ownerScope;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public IScope getOwnerScope() {
|
||||||
|
return ownerScope;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,8 +27,9 @@ public class ExplicitTemplateDeclaration extends Declaration implements IScope {
|
||||||
public final static int k_specialization = 1;
|
public final static int k_specialization = 1;
|
||||||
public final static int k_instantiation = 2;
|
public final static int k_instantiation = 2;
|
||||||
|
|
||||||
public ExplicitTemplateDeclaration( int kind )
|
public ExplicitTemplateDeclaration( IScope scope, int kind )
|
||||||
{
|
{
|
||||||
|
super( scope );
|
||||||
this.kind = kind;
|
this.kind = kind;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,8 +4,11 @@ import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A scope contains a set of declarations that are defined in that
|
* A scope contains a set of declarations that are defined
|
||||||
scope. */ public interface IScope {
|
* in that scope.
|
||||||
|
**/
|
||||||
|
|
||||||
|
public interface IScope {
|
||||||
|
|
||||||
public void addDeclaration(Declaration declaration);
|
public void addDeclaration(Declaration declaration);
|
||||||
public List getDeclarations();
|
public List getDeclarations();
|
||||||
|
|
|
@ -23,12 +23,11 @@ import java.util.List;
|
||||||
public class LinkageSpecification extends Declaration implements IScope {
|
public class LinkageSpecification extends Declaration implements IScope {
|
||||||
|
|
||||||
private List declarations = new LinkedList();
|
private List declarations = new LinkedList();
|
||||||
private IScope ownerScope;
|
|
||||||
private String languageLinkage;
|
private String languageLinkage;
|
||||||
|
|
||||||
LinkageSpecification( IScope owner, String linkage )
|
LinkageSpecification( IScope owner, String linkage )
|
||||||
{
|
{
|
||||||
ownerScope = owner;
|
super( owner );
|
||||||
languageLinkage = linkage;
|
languageLinkage = linkage;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -46,12 +45,6 @@ public class LinkageSpecification extends Declaration implements IScope {
|
||||||
return Collections.unmodifiableList( declarations );
|
return Collections.unmodifiableList( declarations );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @return IScope
|
|
||||||
*/
|
|
||||||
public IScope getOwnerScope() {
|
|
||||||
return ownerScope;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return String
|
* @return String
|
||||||
|
|
|
@ -25,14 +25,13 @@ import org.eclipse.cdt.internal.core.parser.Token;
|
||||||
public class NamespaceDefinition extends Declaration implements IScope, IOffsetable {
|
public class NamespaceDefinition extends Declaration implements IScope, IOffsetable {
|
||||||
|
|
||||||
private List declarations = new LinkedList();
|
private List declarations = new LinkedList();
|
||||||
private IScope ownerScope;
|
|
||||||
private Name name = null;
|
private Name name = null;
|
||||||
private int startingOffset = 0, totalLength = 0;
|
private int startingOffset = 0, totalLength = 0;
|
||||||
private Token startToken = null;
|
private Token startToken = null;
|
||||||
|
|
||||||
public NamespaceDefinition( IScope owner )
|
public NamespaceDefinition( IScope owner )
|
||||||
{
|
{
|
||||||
ownerScope = owner;
|
super( owner );
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
@ -58,13 +57,6 @@ public class NamespaceDefinition extends Declaration implements IScope, IOffseta
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @return IScope
|
|
||||||
*/
|
|
||||||
public IScope getOwnerScope() {
|
|
||||||
return ownerScope;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the name.
|
* Sets the name.
|
||||||
* @param name The name to set
|
* @param name The name to set
|
||||||
|
|
|
@ -16,9 +16,14 @@ import java.util.List;
|
||||||
*/
|
*/
|
||||||
public class ParameterDeclaration extends Declaration implements DeclSpecifier.Container, TypeSpecifier.IOwner {
|
public class ParameterDeclaration extends Declaration implements DeclSpecifier.Container, TypeSpecifier.IOwner {
|
||||||
|
|
||||||
DeclSpecifier declSpec = null;
|
private DeclSpecifier declSpec = null;
|
||||||
private TypeSpecifier typeSpecifier;
|
private TypeSpecifier typeSpecifier;
|
||||||
|
|
||||||
|
public ParameterDeclaration( IScope scope )
|
||||||
|
{
|
||||||
|
super( scope );
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the typeSpecifier.
|
* Returns the typeSpecifier.
|
||||||
* @return TypeSpecifier
|
* @return TypeSpecifier
|
||||||
|
|
|
@ -12,6 +12,12 @@ public class SimpleDeclaration extends Declaration implements DeclSpecifier.Cont
|
||||||
private DeclSpecifier declSpec = null;
|
private DeclSpecifier declSpec = null;
|
||||||
private boolean isFunctionDefinition = false;
|
private boolean isFunctionDefinition = false;
|
||||||
|
|
||||||
|
|
||||||
|
public SimpleDeclaration(IScope owner )
|
||||||
|
{
|
||||||
|
super( owner );
|
||||||
|
}
|
||||||
|
|
||||||
public DeclSpecifier getDeclSpecifier()
|
public DeclSpecifier getDeclSpecifier()
|
||||||
{
|
{
|
||||||
if( declSpec == null )
|
if( declSpec == null )
|
||||||
|
|
|
@ -27,13 +27,12 @@ public class TemplateDeclaration extends Declaration implements IScope, IAccessa
|
||||||
private final boolean exported;
|
private final boolean exported;
|
||||||
private AccessSpecifier visibility = null;
|
private AccessSpecifier visibility = null;
|
||||||
private Token firstToken, lastToken;
|
private Token firstToken, lastToken;
|
||||||
private IScope ownerScope;
|
|
||||||
private List declarations = new ArrayList();
|
private List declarations = new ArrayList();
|
||||||
private TemplateParameterList templateParms = null;
|
private TemplateParameterList templateParms = null;
|
||||||
|
|
||||||
public TemplateDeclaration( IScope ownerScope, Token exported )
|
public TemplateDeclaration( IScope ownerScope, Token exported )
|
||||||
{
|
{
|
||||||
this.ownerScope = ownerScope;
|
super( ownerScope );
|
||||||
this.firstToken = exported;
|
this.firstToken = exported;
|
||||||
this.exported = exported.getType() == Token.t_export ? true : false;
|
this.exported = exported.getType() == Token.t_export ? true : false;
|
||||||
}
|
}
|
||||||
|
@ -59,13 +58,6 @@ public class TemplateDeclaration extends Declaration implements IScope, IAccessa
|
||||||
return exported;
|
return exported;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @return IScope
|
|
||||||
*/
|
|
||||||
public IScope getOwnerScope() {
|
|
||||||
return ownerScope;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -26,8 +26,9 @@ public class TemplateParameter extends Declaration implements ITemplateParameter
|
||||||
public final static int k_template = 4;
|
public final static int k_template = 4;
|
||||||
|
|
||||||
|
|
||||||
public TemplateParameter( int kind )
|
public TemplateParameter( IScope scope, int kind )
|
||||||
{
|
{
|
||||||
|
super( scope );
|
||||||
this.kind = kind;
|
this.kind = kind;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,12 +20,11 @@ package org.eclipse.cdt.internal.core.dom;
|
||||||
public class UsingDeclaration extends Declaration {
|
public class UsingDeclaration extends Declaration {
|
||||||
|
|
||||||
private Name mappedName;
|
private Name mappedName;
|
||||||
private IScope ownerScope;
|
|
||||||
boolean isTypename = false;
|
boolean isTypename = false;
|
||||||
|
|
||||||
public UsingDeclaration( IScope owner )
|
public UsingDeclaration( IScope owner )
|
||||||
{
|
{
|
||||||
ownerScope = owner;
|
super( owner );
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* @return String
|
* @return String
|
||||||
|
@ -42,13 +41,6 @@ public class UsingDeclaration extends Declaration {
|
||||||
this.mappedName = mapping;
|
this.mappedName = mapping;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @return IScope
|
|
||||||
*/
|
|
||||||
public IScope getOwnerScope() {
|
|
||||||
return ownerScope;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return boolean
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -20,11 +20,10 @@ package org.eclipse.cdt.internal.core.dom;
|
||||||
public class UsingDirective extends Declaration {
|
public class UsingDirective extends Declaration {
|
||||||
|
|
||||||
private Name namespaceName;
|
private Name namespaceName;
|
||||||
private IScope ownerScope;
|
|
||||||
|
|
||||||
public UsingDirective( IScope owner )
|
public UsingDirective( IScope owner )
|
||||||
{
|
{
|
||||||
ownerScope = owner;
|
super( owner );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -41,12 +40,4 @@ public class UsingDirective extends Declaration {
|
||||||
public void setNamespaceName(Name namespaceName) {
|
public void setNamespaceName(Name namespaceName) {
|
||||||
this.namespaceName = namespaceName;
|
this.namespaceName = namespaceName;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @return IScope
|
|
||||||
*/
|
|
||||||
public IScope getOwnerScope() {
|
|
||||||
return ownerScope;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,9 @@
|
||||||
|
2003-04-11 John Camelon
|
||||||
|
Minimized the number of objects being returned from Parser callbacks.
|
||||||
|
Fixed CModelBuilder to handle errors better.
|
||||||
|
Reorganized the DOM Hierarchy to ensure that nodes were added to the tree on End() callbacks.
|
||||||
|
Fixed defect 36247().
|
||||||
|
|
||||||
2003-04-11 John Camelon
|
2003-04-11 John Camelon
|
||||||
Fixed Bug 36243 DomBuilder Offsetable List
|
Fixed Bug 36243 DomBuilder Offsetable List
|
||||||
|
|
||||||
|
|
|
@ -57,7 +57,7 @@ public class CModelBuilder {
|
||||||
DOMBuilder domBuilder = new DOMBuilder();
|
DOMBuilder domBuilder = new DOMBuilder();
|
||||||
String code = translationUnit.getBuffer().getContents();
|
String code = translationUnit.getBuffer().getContents();
|
||||||
Parser parser = new Parser(code, domBuilder, true);
|
Parser parser = new Parser(code, domBuilder, true);
|
||||||
if( ! parser.parse() ) throw new ParserException( "Parse failure" );
|
parser.parse();
|
||||||
long startTime = System.currentTimeMillis();
|
long startTime = System.currentTimeMillis();
|
||||||
generateModelElements(domBuilder.getTranslationUnit());
|
generateModelElements(domBuilder.getTranslationUnit());
|
||||||
System.out.println("CModel build: "+ ( System.currentTimeMillis() - startTime ) + "ms" );
|
System.out.println("CModel build: "+ ( System.currentTimeMillis() - startTime ) + "ms" );
|
||||||
|
|
|
@ -159,8 +159,7 @@ public class ExpressionEvaluator implements IParserCallback {
|
||||||
/**
|
/**
|
||||||
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#simpleDeclSpecifier(java.lang.Object, org.eclipse.cdt.internal.core.parser.Token)
|
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#simpleDeclSpecifier(java.lang.Object, org.eclipse.cdt.internal.core.parser.Token)
|
||||||
*/
|
*/
|
||||||
public Object simpleDeclSpecifier(Object Container, Token specifier) {
|
public void simpleDeclSpecifier(Object Container, Token specifier) {
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#nameBegin(org.eclipse.cdt.internal.core.parser.Token)
|
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#nameBegin(org.eclipse.cdt.internal.core.parser.Token)
|
||||||
|
@ -181,8 +180,7 @@ public class ExpressionEvaluator implements IParserCallback {
|
||||||
/**
|
/**
|
||||||
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#declaratorId(java.lang.Object)
|
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#declaratorId(java.lang.Object)
|
||||||
*/
|
*/
|
||||||
public Object declaratorId(Object declarator) {
|
public void declaratorId(Object declarator) {
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#declaratorAbort(java.lang.Object, java.lang.Object)
|
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#declaratorAbort(java.lang.Object, java.lang.Object)
|
||||||
|
@ -225,8 +223,7 @@ public class ExpressionEvaluator implements IParserCallback {
|
||||||
/**
|
/**
|
||||||
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#classSpecifierName(java.lang.Object)
|
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#classSpecifierName(java.lang.Object)
|
||||||
*/
|
*/
|
||||||
public Object classSpecifierName(Object classSpecifier) {
|
public void classSpecifierName(Object classSpecifier) {
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#classSpecifierEnd(java.lang.Object)
|
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#classSpecifierEnd(java.lang.Object)
|
||||||
|
@ -242,22 +239,19 @@ public class ExpressionEvaluator implements IParserCallback {
|
||||||
/**
|
/**
|
||||||
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#baseSpecifierName(java.lang.Object)
|
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#baseSpecifierName(java.lang.Object)
|
||||||
*/
|
*/
|
||||||
public Object baseSpecifierName(Object baseSpecifier) {
|
public void baseSpecifierName(Object baseSpecifier) {
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#baseSpecifierVisibility(java.lang.Object, org.eclipse.cdt.internal.core.parser.Token)
|
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#baseSpecifierVisibility(java.lang.Object, org.eclipse.cdt.internal.core.parser.Token)
|
||||||
*/
|
*/
|
||||||
public Object baseSpecifierVisibility(
|
public void baseSpecifierVisibility(
|
||||||
Object baseSpecifier,
|
Object baseSpecifier,
|
||||||
Token visibility) {
|
Token visibility) {
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#baseSpecifierVirtual(java.lang.Object, boolean)
|
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#baseSpecifierVirtual(java.lang.Object, boolean)
|
||||||
*/
|
*/
|
||||||
public Object baseSpecifierVirtual(Object baseSpecifier, boolean virtual) {
|
public void baseSpecifierVirtual(Object baseSpecifier, boolean virtual) {
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#baseSpecifierEnd(java.lang.Object)
|
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#baseSpecifierEnd(java.lang.Object)
|
||||||
|
@ -285,8 +279,7 @@ public class ExpressionEvaluator implements IParserCallback {
|
||||||
/**
|
/**
|
||||||
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#classSpecifierSafe(java.lang.Object)
|
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#classSpecifierSafe(java.lang.Object)
|
||||||
*/
|
*/
|
||||||
public Object classSpecifierSafe(Object classSpecifier) {
|
public void classSpecifierSafe(Object classSpecifier) {
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -305,15 +298,13 @@ public class ExpressionEvaluator implements IParserCallback {
|
||||||
/**
|
/**
|
||||||
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#elaboratedTypeSpecifierName(java.lang.Object)
|
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#elaboratedTypeSpecifierName(java.lang.Object)
|
||||||
*/
|
*/
|
||||||
public Object elaboratedTypeSpecifierName(Object container) {
|
public void elaboratedTypeSpecifierName(Object container) {
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#simpleDeclSpecifierName(java.lang.Object)
|
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#simpleDeclSpecifierName(java.lang.Object)
|
||||||
*/
|
*/
|
||||||
public Object simpleDeclSpecifierName(Object declaration) {
|
public void simpleDeclSpecifierName(Object declaration) {
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
@ -327,10 +318,7 @@ public class ExpressionEvaluator implements IParserCallback {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#classMemberVisibility(java.lang.Object, org.eclipse.cdt.internal.core.parser.Token)
|
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#classMemberVisibility(java.lang.Object, org.eclipse.cdt.internal.core.parser.Token)
|
||||||
*/
|
*/
|
||||||
public Object classMemberVisibility(Object classSpecifier, Token visibility) {
|
public void classMemberVisibility(Object classSpecifier, Token visibility) {
|
||||||
return null;
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
@ -352,37 +340,26 @@ public class ExpressionEvaluator implements IParserCallback {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#pointerOperatorName(java.lang.Object)
|
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#pointerOperatorName(java.lang.Object)
|
||||||
*/
|
*/
|
||||||
public Object pointerOperatorName(Object ptrOperator) {
|
public void pointerOperatorName(Object ptrOperator) {
|
||||||
return null;
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#pointerOperatorType(java.lang.Object, org.eclipse.cdt.internal.core.parser.Token)
|
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#pointerOperatorType(java.lang.Object, org.eclipse.cdt.internal.core.parser.Token)
|
||||||
*/
|
*/
|
||||||
public Object pointerOperatorType(Object ptrOperator, Token type) {
|
public void pointerOperatorType(Object ptrOperator, Token type) {
|
||||||
return null;
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#pointerOperatorCVModifier(java.lang.Object, org.eclipse.cdt.internal.core.parser.Token)
|
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#pointerOperatorCVModifier(java.lang.Object, org.eclipse.cdt.internal.core.parser.Token)
|
||||||
*/
|
*/
|
||||||
public Object pointerOperatorCVModifier(Object ptrOperator, Token modifier) {
|
public void pointerOperatorCVModifier(Object ptrOperator, Token modifier) {
|
||||||
return null;
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#declaratorCVModifier(java.lang.Object, org.eclipse.cdt.internal.core.parser.Token)
|
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#declaratorCVModifier(java.lang.Object, org.eclipse.cdt.internal.core.parser.Token)
|
||||||
*/
|
*/
|
||||||
public Object declaratorCVModifier(Object declarator, Token modifier) {
|
public void declaratorCVModifier(Object declarator, Token modifier) {
|
||||||
return null;
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
@ -403,19 +380,13 @@ public class ExpressionEvaluator implements IParserCallback {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#exceptionSpecificationTypename(java.lang.Object)
|
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#exceptionSpecificationTypename(java.lang.Object)
|
||||||
*/
|
*/
|
||||||
public Object declaratorThrowExceptionName(Object declarator) {
|
public void declaratorThrowExceptionName(Object declarator) {
|
||||||
return null;
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#declaratorThrowsException(java.lang.Object)
|
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#declaratorThrowsException(java.lang.Object)
|
||||||
*/
|
*/
|
||||||
public Object declaratorThrowsException(Object declarator) {
|
public void declaratorThrowsException(Object declarator) {
|
||||||
return null;
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
@ -429,10 +400,7 @@ public class ExpressionEvaluator implements IParserCallback {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#namespaceDeclarationId(java.lang.Object)
|
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#namespaceDeclarationId(java.lang.Object)
|
||||||
*/
|
*/
|
||||||
public Object namespaceDefinitionId(Object namespace) {
|
public void namespaceDefinitionId(Object namespace) {
|
||||||
return null;
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
@ -474,10 +442,7 @@ public class ExpressionEvaluator implements IParserCallback {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#usingDirectiveNamespaceId(java.lang.Object)
|
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#usingDirectiveNamespaceId(java.lang.Object)
|
||||||
*/
|
*/
|
||||||
public Object usingDirectiveNamespaceId(Object container) {
|
public void usingDirectiveNamespaceId(Object container) {
|
||||||
return null;
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
@ -499,10 +464,7 @@ public class ExpressionEvaluator implements IParserCallback {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#usingDeclarationMapping(java.lang.Object)
|
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#usingDeclarationMapping(java.lang.Object)
|
||||||
*/
|
*/
|
||||||
public Object usingDeclarationMapping(Object container, boolean isTypename) {
|
public void usingDeclarationMapping(Object container, boolean isTypename) {
|
||||||
return null;
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
@ -539,10 +501,7 @@ public class ExpressionEvaluator implements IParserCallback {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#enumSpecifierId(java.lang.Object)
|
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#enumSpecifierId(java.lang.Object)
|
||||||
*/
|
*/
|
||||||
public Object enumSpecifierId(Object enumSpec) {
|
public void enumSpecifierId(Object enumSpec) {
|
||||||
return null;
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
@ -572,10 +531,7 @@ public class ExpressionEvaluator implements IParserCallback {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#enumDefinitionId(java.lang.Object)
|
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#enumDefinitionId(java.lang.Object)
|
||||||
*/
|
*/
|
||||||
public Object enumeratorId(Object enumDefn) {
|
public void enumeratorId(Object enumDefn) {
|
||||||
return null;
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
@ -627,8 +583,7 @@ public class ExpressionEvaluator implements IParserCallback {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#constructorChainId(java.lang.Object)
|
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#constructorChainId(java.lang.Object)
|
||||||
*/
|
*/
|
||||||
public Object constructorChainElementId(Object ctor) {
|
public void constructorChainElementId(Object ctor) {
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
@ -673,8 +628,7 @@ public class ExpressionEvaluator implements IParserCallback {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#declaratorPureVirtual(java.lang.Object)
|
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#declaratorPureVirtual(java.lang.Object)
|
||||||
*/
|
*/
|
||||||
public Object declaratorPureVirtual(Object declarator) {
|
public void declaratorPureVirtual(Object declarator) {
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
@ -706,15 +660,13 @@ public class ExpressionEvaluator implements IParserCallback {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#templateTypeParameterName(java.lang.Object)
|
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#templateTypeParameterName(java.lang.Object)
|
||||||
*/
|
*/
|
||||||
public Object templateTypeParameterName(Object typeParm) {
|
public void templateTypeParameterName(Object typeParm) {
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#templateTypeInitialTypeId(java.lang.Object)
|
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#templateTypeInitialTypeId(java.lang.Object)
|
||||||
*/
|
*/
|
||||||
public Object templateTypeParameterInitialTypeId(Object typeParm) {
|
public void templateTypeParameterInitialTypeId(Object typeParm) {
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
|
|
@ -20,8 +20,8 @@ public interface IParserCallback {
|
||||||
public void macro(String macroName, int macroNameOffset, int macroBeginOffset, int macroEndOffset);
|
public void macro(String macroName, int macroNameOffset, int macroBeginOffset, int macroEndOffset);
|
||||||
|
|
||||||
public Object simpleDeclarationBegin(Object Container, Token firstToken);
|
public Object simpleDeclarationBegin(Object Container, Token firstToken);
|
||||||
public Object simpleDeclSpecifier(Object Container, Token specifier);
|
public void simpleDeclSpecifier(Object Container, Token specifier);
|
||||||
public Object simpleDeclSpecifierName( Object declaration );
|
public void simpleDeclSpecifierName( Object declaration );
|
||||||
public void simpleDeclarationEnd(Object declaration, Token lastToken);
|
public void simpleDeclarationEnd(Object declaration, Token lastToken);
|
||||||
|
|
||||||
public Object parameterDeclarationBegin( Object Container );
|
public Object parameterDeclarationBegin( Object Container );
|
||||||
|
@ -31,21 +31,21 @@ public interface IParserCallback {
|
||||||
public void nameEnd(Token lastToken);
|
public void nameEnd(Token lastToken);
|
||||||
|
|
||||||
public Object declaratorBegin(Object container);
|
public Object declaratorBegin(Object container);
|
||||||
public Object declaratorId(Object declarator);
|
public void declaratorId(Object declarator);
|
||||||
public void declaratorAbort( Object container, Object declarator );
|
public void declaratorAbort( Object container, Object declarator );
|
||||||
public Object declaratorPureVirtual( Object declarator );
|
public void declaratorPureVirtual( Object declarator );
|
||||||
public Object declaratorCVModifier( Object declarator, Token modifier );
|
public void declaratorCVModifier( Object declarator, Token modifier );
|
||||||
public Object declaratorThrowsException( Object declarator );
|
public void declaratorThrowsException( Object declarator );
|
||||||
public Object declaratorThrowExceptionName( Object declarator );
|
public void declaratorThrowExceptionName( Object declarator );
|
||||||
public void declaratorEnd(Object declarator);
|
public void declaratorEnd(Object declarator);
|
||||||
|
|
||||||
public Object arrayDeclaratorBegin( Object declarator );
|
public Object arrayDeclaratorBegin( Object declarator );
|
||||||
public void arrayDeclaratorEnd( Object arrayQualifier );
|
public void arrayDeclaratorEnd( Object arrayQualifier );
|
||||||
|
|
||||||
public Object pointerOperatorBegin( Object container );
|
public Object pointerOperatorBegin( Object container );
|
||||||
public Object pointerOperatorType( Object ptrOperator, Token type );
|
public void pointerOperatorType( Object ptrOperator, Token type );
|
||||||
public Object pointerOperatorName( Object ptrOperator );
|
public void pointerOperatorName( Object ptrOperator );
|
||||||
public Object pointerOperatorCVModifier( Object ptrOperator, Token modifier );
|
public void pointerOperatorCVModifier( Object ptrOperator, Token modifier );
|
||||||
public void pointerOperatorAbort( Object ptrOperator );
|
public void pointerOperatorAbort( Object ptrOperator );
|
||||||
public void pointerOperatorEnd( Object ptrOperator );
|
public void pointerOperatorEnd( Object ptrOperator );
|
||||||
|
|
||||||
|
@ -56,16 +56,16 @@ public interface IParserCallback {
|
||||||
public void functionBodyEnd(Object functionBody);
|
public void functionBodyEnd(Object functionBody);
|
||||||
|
|
||||||
public Object classSpecifierBegin(Object container, Token classKey);
|
public Object classSpecifierBegin(Object container, Token classKey);
|
||||||
public Object classSpecifierName(Object classSpecifier);
|
public void classSpecifierName(Object classSpecifier);
|
||||||
public void classSpecifierAbort( Object classSpecifier );
|
public void classSpecifierAbort( Object classSpecifier );
|
||||||
public Object classSpecifierSafe( Object classSpecifier );
|
public void classSpecifierSafe( Object classSpecifier );
|
||||||
public Object classMemberVisibility( Object classSpecifier, Token visibility );
|
public void classMemberVisibility( Object classSpecifier, Token visibility );
|
||||||
public void classSpecifierEnd(Object classSpecifier, Token closingBrace );
|
public void classSpecifierEnd(Object classSpecifier, Token closingBrace );
|
||||||
|
|
||||||
public Object baseSpecifierBegin( Object containingClassSpec );
|
public Object baseSpecifierBegin( Object containingClassSpec );
|
||||||
public Object baseSpecifierName( Object baseSpecifier );
|
public void baseSpecifierName( Object baseSpecifier );
|
||||||
public Object baseSpecifierVisibility( Object baseSpecifier, Token visibility );
|
public void baseSpecifierVisibility( Object baseSpecifier, Token visibility );
|
||||||
public Object baseSpecifierVirtual( Object baseSpecifier, boolean virtual );
|
public void baseSpecifierVirtual( Object baseSpecifier, boolean virtual );
|
||||||
public void baseSpecifierEnd( Object baseSpecifier );
|
public void baseSpecifierEnd( Object baseSpecifier );
|
||||||
|
|
||||||
public Object expressionBegin( Object container );
|
public Object expressionBegin( Object container );
|
||||||
|
@ -75,11 +75,11 @@ public interface IParserCallback {
|
||||||
public void expressionEnd(Object expression );
|
public void expressionEnd(Object expression );
|
||||||
|
|
||||||
public Object elaboratedTypeSpecifierBegin( Object container, Token classKey );
|
public Object elaboratedTypeSpecifierBegin( Object container, Token classKey );
|
||||||
public Object elaboratedTypeSpecifierName( Object elab );
|
public void elaboratedTypeSpecifierName( Object elab );
|
||||||
public void elaboratedTypeSpecifierEnd( Object elab );
|
public void elaboratedTypeSpecifierEnd( Object elab );
|
||||||
|
|
||||||
public Object namespaceDefinitionBegin( Object container, Token namespace );
|
public Object namespaceDefinitionBegin( Object container, Token namespace );
|
||||||
public Object namespaceDefinitionId( Object namespace );
|
public void namespaceDefinitionId( Object namespace );
|
||||||
public void namespaceDefinitionAbort( Object namespace );
|
public void namespaceDefinitionAbort( Object namespace );
|
||||||
public void namespaceDefinitionEnd( Object namespace, Token closingBrace );
|
public void namespaceDefinitionEnd( Object namespace, Token closingBrace );
|
||||||
|
|
||||||
|
@ -87,22 +87,22 @@ public interface IParserCallback {
|
||||||
public void linkageSpecificationEnd( Object linkageSpec );
|
public void linkageSpecificationEnd( Object linkageSpec );
|
||||||
|
|
||||||
public Object usingDirectiveBegin( Object container );
|
public Object usingDirectiveBegin( Object container );
|
||||||
public Object usingDirectiveNamespaceId( Object directive );
|
public void usingDirectiveNamespaceId( Object directive );
|
||||||
public void usingDirectiveAbort( Object directive );
|
public void usingDirectiveAbort( Object directive );
|
||||||
public void usingDirectiveEnd( Object directive );
|
public void usingDirectiveEnd( Object directive );
|
||||||
|
|
||||||
public Object usingDeclarationBegin( Object container );
|
public Object usingDeclarationBegin( Object container );
|
||||||
public Object usingDeclarationMapping( Object declaration, boolean isTypeName );
|
public void usingDeclarationMapping( Object declaration, boolean isTypeName );
|
||||||
public void usingDeclarationAbort( Object declaration );
|
public void usingDeclarationAbort( Object declaration );
|
||||||
public void usingDeclarationEnd( Object declaration );
|
public void usingDeclarationEnd( Object declaration );
|
||||||
|
|
||||||
public Object enumSpecifierBegin( Object container, Token enumKey );
|
public Object enumSpecifierBegin( Object container, Token enumKey );
|
||||||
public Object enumSpecifierId( Object enumSpec );
|
public void enumSpecifierId( Object enumSpec );
|
||||||
public void enumSpecifierAbort( Object enumSpec );
|
public void enumSpecifierAbort( Object enumSpec );
|
||||||
public void enumSpecifierEnd( Object enumSpec, Token closingBrace );
|
public void enumSpecifierEnd( Object enumSpec, Token closingBrace );
|
||||||
|
|
||||||
public Object enumeratorBegin( Object enumSpec );
|
public Object enumeratorBegin( Object enumSpec );
|
||||||
public Object enumeratorId( Object enumDefn );
|
public void enumeratorId( Object enumDefn );
|
||||||
public void enumeratorEnd( Object enumDefn, Token lastToken );
|
public void enumeratorEnd( Object enumDefn, Token lastToken );
|
||||||
|
|
||||||
public void asmDefinition( Object container, String assemblyCode );
|
public void asmDefinition( Object container, String assemblyCode );
|
||||||
|
@ -112,7 +112,7 @@ public interface IParserCallback {
|
||||||
public void constructorChainEnd( Object ctor );
|
public void constructorChainEnd( Object ctor );
|
||||||
|
|
||||||
public Object constructorChainElementBegin( Object ctor );
|
public Object constructorChainElementBegin( Object ctor );
|
||||||
public Object constructorChainElementId( Object element );
|
public void constructorChainElementId( Object element );
|
||||||
public void constructorChainElementEnd( Object element );
|
public void constructorChainElementEnd( Object element );
|
||||||
|
|
||||||
public Object constructorChainElementExpressionListElementBegin( Object element );
|
public Object constructorChainElementExpressionListElementBegin( Object element );
|
||||||
|
@ -132,9 +132,9 @@ public interface IParserCallback {
|
||||||
public void templateParameterListEnd( Object parameterList );
|
public void templateParameterListEnd( Object parameterList );
|
||||||
|
|
||||||
public Object templateTypeParameterBegin( Object templDecl, Token kind );
|
public Object templateTypeParameterBegin( Object templDecl, Token kind );
|
||||||
public Object templateTypeParameterName( Object typeParm );
|
public void templateTypeParameterName( Object typeParm );
|
||||||
public void templateTypeParameterAbort( Object typeParm );
|
public void templateTypeParameterAbort( Object typeParm );
|
||||||
public Object templateTypeParameterInitialTypeId( Object typeParm );
|
public void templateTypeParameterInitialTypeId( Object typeParm );
|
||||||
public void templateTypeParameterEnd( Object typeParm );
|
public void templateTypeParameterEnd( Object typeParm );
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,15 +43,14 @@ public class NullParserCallback implements IParserCallback {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#simpleDeclSpecifier(java.lang.Object, org.eclipse.cdt.internal.core.parser.Token)
|
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#simpleDeclSpecifier(java.lang.Object, org.eclipse.cdt.internal.core.parser.Token)
|
||||||
*/
|
*/
|
||||||
public Object simpleDeclSpecifier(Object Container, Token specifier) {
|
public void simpleDeclSpecifier(Object Container, Token specifier) {
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#simpleDeclSpecifierName(java.lang.Object)
|
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#simpleDeclSpecifierName(java.lang.Object)
|
||||||
*/
|
*/
|
||||||
public Object simpleDeclSpecifierName(Object declaration) {
|
public void simpleDeclSpecifierName(Object declaration) {
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
@ -95,8 +94,8 @@ public class NullParserCallback implements IParserCallback {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#declaratorId(java.lang.Object)
|
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#declaratorId(java.lang.Object)
|
||||||
*/
|
*/
|
||||||
public Object declaratorId(Object declarator) {
|
public void declaratorId(Object declarator) {
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
@ -108,15 +107,13 @@ public class NullParserCallback implements IParserCallback {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#declaratorCVModifier(java.lang.Object, org.eclipse.cdt.internal.core.parser.Token)
|
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#declaratorCVModifier(java.lang.Object, org.eclipse.cdt.internal.core.parser.Token)
|
||||||
*/
|
*/
|
||||||
public Object declaratorCVModifier(Object declarator, Token modifier) {
|
public void declaratorCVModifier(Object declarator, Token modifier) {
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#declaratorThrowExceptionName(java.lang.Object)
|
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#declaratorThrowExceptionName(java.lang.Object)
|
||||||
*/
|
*/
|
||||||
public Object declaratorThrowExceptionName(Object exceptionSpec) {
|
public void declaratorThrowExceptionName(Object exceptionSpec) {
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
@ -148,22 +145,19 @@ public class NullParserCallback implements IParserCallback {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#pointerOperatorType(java.lang.Object, org.eclipse.cdt.internal.core.parser.Token)
|
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#pointerOperatorType(java.lang.Object, org.eclipse.cdt.internal.core.parser.Token)
|
||||||
*/
|
*/
|
||||||
public Object pointerOperatorType(Object ptrOperator, Token type) {
|
public void pointerOperatorType(Object ptrOperator, Token type) {
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#pointerOperatorName(java.lang.Object)
|
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#pointerOperatorName(java.lang.Object)
|
||||||
*/
|
*/
|
||||||
public Object pointerOperatorName(Object ptrOperator) {
|
public void pointerOperatorName(Object ptrOperator) {
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#pointerOperatorCVModifier(java.lang.Object, org.eclipse.cdt.internal.core.parser.Token)
|
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#pointerOperatorCVModifier(java.lang.Object, org.eclipse.cdt.internal.core.parser.Token)
|
||||||
*/
|
*/
|
||||||
public Object pointerOperatorCVModifier(Object ptrOperator, Token modifier) {
|
public void pointerOperatorCVModifier(Object ptrOperator, Token modifier) {
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
@ -208,8 +202,7 @@ public class NullParserCallback implements IParserCallback {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#classSpecifierName(java.lang.Object)
|
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#classSpecifierName(java.lang.Object)
|
||||||
*/
|
*/
|
||||||
public Object classSpecifierName(Object classSpecifier) {
|
public void classSpecifierName(Object classSpecifier) {
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
@ -221,15 +214,14 @@ public class NullParserCallback implements IParserCallback {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#classSpecifierSafe(java.lang.Object)
|
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#classSpecifierSafe(java.lang.Object)
|
||||||
*/
|
*/
|
||||||
public Object classSpecifierSafe(Object classSpecifier) {
|
public void classSpecifierSafe(Object classSpecifier) {
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#classMemberVisibility(java.lang.Object, org.eclipse.cdt.internal.core.parser.Token)
|
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#classMemberVisibility(java.lang.Object, org.eclipse.cdt.internal.core.parser.Token)
|
||||||
*/
|
*/
|
||||||
public Object classMemberVisibility(Object classSpecifier, Token visibility) {
|
public void classMemberVisibility(Object classSpecifier, Token visibility) {
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
@ -248,22 +240,19 @@ public class NullParserCallback implements IParserCallback {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#baseSpecifierName(java.lang.Object)
|
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#baseSpecifierName(java.lang.Object)
|
||||||
*/
|
*/
|
||||||
public Object baseSpecifierName(Object baseSpecifier) {
|
public void baseSpecifierName(Object baseSpecifier) {
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#baseSpecifierVisibility(java.lang.Object, org.eclipse.cdt.internal.core.parser.Token)
|
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#baseSpecifierVisibility(java.lang.Object, org.eclipse.cdt.internal.core.parser.Token)
|
||||||
*/
|
*/
|
||||||
public Object baseSpecifierVisibility(Object baseSpecifier, Token visibility) {
|
public void baseSpecifierVisibility(Object baseSpecifier, Token visibility) {
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#baseSpecifierVirtual(java.lang.Object, boolean)
|
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#baseSpecifierVirtual(java.lang.Object, boolean)
|
||||||
*/
|
*/
|
||||||
public Object baseSpecifierVirtual(Object baseSpecifier, boolean virtual) {
|
public void baseSpecifierVirtual(Object baseSpecifier, boolean virtual) {
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
@ -313,8 +302,7 @@ public class NullParserCallback implements IParserCallback {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#elaboratedTypeSpecifierName(java.lang.Object)
|
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#elaboratedTypeSpecifierName(java.lang.Object)
|
||||||
*/
|
*/
|
||||||
public Object elaboratedTypeSpecifierName(Object elab) {
|
public void elaboratedTypeSpecifierName(Object elab) {
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
@ -326,8 +314,7 @@ public class NullParserCallback implements IParserCallback {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#declaratorThrowsException(java.lang.Object)
|
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#declaratorThrowsException(java.lang.Object)
|
||||||
*/
|
*/
|
||||||
public Object declaratorThrowsException(Object declarator) {
|
public void declaratorThrowsException(Object declarator) {
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
@ -340,8 +327,7 @@ public class NullParserCallback implements IParserCallback {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#namespaceDeclarationId(java.lang.Object)
|
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#namespaceDeclarationId(java.lang.Object)
|
||||||
*/
|
*/
|
||||||
public Object namespaceDefinitionId(Object namespace) {
|
public void namespaceDefinitionId(Object namespace) {
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
@ -380,8 +366,7 @@ public class NullParserCallback implements IParserCallback {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#usingDirectiveNamespaceId(java.lang.Object)
|
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#usingDirectiveNamespaceId(java.lang.Object)
|
||||||
*/
|
*/
|
||||||
public Object usingDirectiveNamespaceId(Object container) {
|
public void usingDirectiveNamespaceId(Object container) {
|
||||||
return null;
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -405,8 +390,7 @@ public class NullParserCallback implements IParserCallback {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#usingDeclarationMapping(java.lang.Object)
|
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#usingDeclarationMapping(java.lang.Object)
|
||||||
*/
|
*/
|
||||||
public Object usingDeclarationMapping(Object container, boolean isTypename) {
|
public void usingDeclarationMapping(Object container, boolean isTypename) {
|
||||||
return null;
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -439,8 +423,7 @@ public class NullParserCallback implements IParserCallback {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#enumSpecifierId(java.lang.Object)
|
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#enumSpecifierId(java.lang.Object)
|
||||||
*/
|
*/
|
||||||
public Object enumSpecifierId(Object enumSpec) {
|
public void enumSpecifierId(Object enumSpec) {
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
@ -465,8 +448,7 @@ public class NullParserCallback implements IParserCallback {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#enumDefinitionId(java.lang.Object)
|
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#enumDefinitionId(java.lang.Object)
|
||||||
*/
|
*/
|
||||||
public Object enumeratorId(Object enumDefn) {
|
public void enumeratorId(Object enumDefn) {
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
@ -516,8 +498,7 @@ public class NullParserCallback implements IParserCallback {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#constructorChainId(java.lang.Object)
|
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#constructorChainId(java.lang.Object)
|
||||||
*/
|
*/
|
||||||
public Object constructorChainElementId(Object ctor) {
|
public void constructorChainElementId(Object ctor) {
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
@ -562,8 +543,7 @@ public class NullParserCallback implements IParserCallback {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#declaratorPureVirtual(java.lang.Object)
|
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#declaratorPureVirtual(java.lang.Object)
|
||||||
*/
|
*/
|
||||||
public Object declaratorPureVirtual(Object declarator) {
|
public void declaratorPureVirtual(Object declarator) {
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
@ -595,15 +575,13 @@ public class NullParserCallback implements IParserCallback {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#templateTypeParameterName(java.lang.Object)
|
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#templateTypeParameterName(java.lang.Object)
|
||||||
*/
|
*/
|
||||||
public Object templateTypeParameterName(Object typeParm) {
|
public void templateTypeParameterName(Object typeParm) {
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#templateTypeInitialTypeId(java.lang.Object)
|
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#templateTypeInitialTypeId(java.lang.Object)
|
||||||
*/
|
*/
|
||||||
public Object templateTypeParameterInitialTypeId(Object typeParm) {
|
public void templateTypeParameterInitialTypeId(Object typeParm) {
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
|
|
@ -149,7 +149,7 @@ c, quick);
|
||||||
if( LT(1) == Token.tIDENTIFIER || LT(1) == Token.tCOLONCOLON )
|
if( LT(1) == Token.tIDENTIFIER || LT(1) == Token.tCOLONCOLON )
|
||||||
{
|
{
|
||||||
name();
|
name();
|
||||||
try{ directive = callback.usingDirectiveNamespaceId( directive );} catch( Exception e ) {}
|
try{ callback.usingDirectiveNamespaceId( directive );} catch( Exception e ) {}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -185,7 +185,7 @@ c, quick);
|
||||||
{
|
{
|
||||||
// optional :: and nested classes handled in name
|
// optional :: and nested classes handled in name
|
||||||
name();
|
name();
|
||||||
try{ usingDeclaration = callback.usingDeclarationMapping( usingDeclaration, typeName ); } catch( Exception e ) {}
|
try{ callback.usingDeclarationMapping( usingDeclaration, typeName ); } catch( Exception e ) {}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -355,12 +355,12 @@ c, quick);
|
||||||
if( LT(1) == Token.tIDENTIFIER ) // optional identifier
|
if( LT(1) == Token.tIDENTIFIER ) // optional identifier
|
||||||
{
|
{
|
||||||
identifier();
|
identifier();
|
||||||
try { currentTemplateParm = callback.templateTypeParameterName( currentTemplateParm );} catch( Exception e ) {}
|
try { callback.templateTypeParameterName( currentTemplateParm );} catch( Exception e ) {}
|
||||||
if( LT(1) == Token.tASSIGN ) // optional = type-id
|
if( LT(1) == Token.tASSIGN ) // optional = type-id
|
||||||
{
|
{
|
||||||
consume( Token.tASSIGN );
|
consume( Token.tASSIGN );
|
||||||
identifier(); // type-id
|
identifier(); // type-id
|
||||||
try{ currentTemplateParm = callback.templateTypeParameterInitialTypeId( currentTemplateParm ); }catch( Exception e ) {}
|
try{ callback.templateTypeParameterInitialTypeId( currentTemplateParm ); }catch( Exception e ) {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
try{ callback.templateTypeParameterEnd( currentTemplateParm ); } catch( Exception e ) {}
|
try{ callback.templateTypeParameterEnd( currentTemplateParm ); } catch( Exception e ) {}
|
||||||
|
@ -383,12 +383,12 @@ c, quick);
|
||||||
if( LT(1) == Token.tIDENTIFIER ) // optional identifier
|
if( LT(1) == Token.tIDENTIFIER ) // optional identifier
|
||||||
{
|
{
|
||||||
identifier();
|
identifier();
|
||||||
try{ newTemplateParm = callback.templateTypeParameterName( newTemplateParm );} catch( Exception e ) {}
|
try{ callback.templateTypeParameterName( newTemplateParm );} catch( Exception e ) {}
|
||||||
if( LT(1) == Token.tASSIGN ) // optional = type-id
|
if( LT(1) == Token.tASSIGN ) // optional = type-id
|
||||||
{
|
{
|
||||||
consume( Token.tASSIGN );
|
consume( Token.tASSIGN );
|
||||||
name();
|
name();
|
||||||
try{ newTemplateParm = callback.templateTypeParameterInitialTypeId( newTemplateParm );} catch( Exception e ) {}
|
try{ callback.templateTypeParameterInitialTypeId( newTemplateParm );} catch( Exception e ) {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
try{ callback.templateTypeParameterEnd( newTemplateParm );} catch( Exception e ) {}
|
try{ callback.templateTypeParameterEnd( newTemplateParm );} catch( Exception e ) {}
|
||||||
|
@ -475,7 +475,7 @@ c, quick);
|
||||||
if( LT(1) == Token.tIDENTIFIER )
|
if( LT(1) == Token.tIDENTIFIER )
|
||||||
{
|
{
|
||||||
name();
|
name();
|
||||||
try{ namespace = callback.namespaceDefinitionId( namespace );} catch( Exception e ) {}
|
try{ callback.namespaceDefinitionId( namespace );} catch( Exception e ) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
if( LT(1) == Token.tLBRACE )
|
if( LT(1) == Token.tLBRACE )
|
||||||
|
@ -571,7 +571,7 @@ c, quick);
|
||||||
try{ callback.functionBodyEnd(function );} catch( Exception e ) {}
|
try{ callback.functionBodyEnd(function );} catch( Exception e ) {}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
throw backtrack;
|
||||||
}
|
}
|
||||||
|
|
||||||
try{ callback.simpleDeclarationEnd(simpleDecl, lastToken);} catch( Exception e ) {}
|
try{ callback.simpleDeclarationEnd(simpleDecl, lastToken);} catch( Exception e ) {}
|
||||||
|
@ -590,7 +590,7 @@ c, quick);
|
||||||
Object constructorChainElement = null;
|
Object constructorChainElement = null;
|
||||||
try{ constructorChainElement = callback.constructorChainElementBegin( constructorChain );} catch( Exception e ) {}
|
try{ constructorChainElement = callback.constructorChainElementBegin( constructorChain );} catch( Exception e ) {}
|
||||||
name();
|
name();
|
||||||
try{ constructorChainElement = callback.constructorChainElementId(constructorChainElement);} catch( Exception e) {}
|
try{ callback.constructorChainElementId(constructorChainElement);} catch( Exception e) {}
|
||||||
|
|
||||||
consume( Token.tLPAREN );
|
consume( Token.tLPAREN );
|
||||||
|
|
||||||
|
@ -679,7 +679,7 @@ c, quick);
|
||||||
case Token.t_friend:
|
case Token.t_friend:
|
||||||
case Token.t_const:
|
case Token.t_const:
|
||||||
case Token.t_volatile:
|
case Token.t_volatile:
|
||||||
try{ decl = callback.simpleDeclSpecifier(decl, consume());} catch( Exception e ) {}
|
try{ callback.simpleDeclSpecifier(decl, consume());} catch( Exception e ) {}
|
||||||
break;
|
break;
|
||||||
case Token.t_signed:
|
case Token.t_signed:
|
||||||
case Token.t_unsigned:
|
case Token.t_unsigned:
|
||||||
|
@ -693,7 +693,7 @@ c, quick);
|
||||||
case Token.t_double:
|
case Token.t_double:
|
||||||
case Token.t_void:
|
case Token.t_void:
|
||||||
encounteredRawType = true;
|
encounteredRawType = true;
|
||||||
try{ decl = callback.simpleDeclSpecifier(decl, consume());} catch( Exception e ) {}
|
try{ callback.simpleDeclSpecifier(decl, consume());} catch( Exception e ) {}
|
||||||
break;
|
break;
|
||||||
case Token.t_typename:
|
case Token.t_typename:
|
||||||
consume( Token.t_typename );
|
consume( Token.t_typename );
|
||||||
|
@ -707,11 +707,12 @@ c, quick);
|
||||||
// handle nested later:
|
// handle nested later:
|
||||||
if ((parm && !encounteredRawType) || (!encounteredRawType && LT(2) != Token.tCOLONCOLON && LT(2) != Token.tLPAREN))
|
if ((parm && !encounteredRawType) || (!encounteredRawType && LT(2) != Token.tCOLONCOLON && LT(2) != Token.tLPAREN))
|
||||||
{
|
{
|
||||||
if( ! encounteredTypename )
|
if( ! encounteredTypename || ( LT(2) == Token.tIDENTIFIER &&
|
||||||
|
( LT(3) == Token.tLPAREN || LT(3) == Token.tASSIGN ) || LT(2) == Token.tSTAR ) )
|
||||||
{
|
{
|
||||||
try{ decl = callback.simpleDeclSpecifier(decl,LA(1));} catch( Exception e ) {}
|
try{ callback.simpleDeclSpecifier(decl,LA(1));} catch( Exception e ) {}
|
||||||
name();
|
name();
|
||||||
try{ decl = callback.simpleDeclSpecifierName( decl );} catch( Exception e ) {}
|
try{ callback.simpleDeclSpecifierName( decl );} catch( Exception e ) {}
|
||||||
encounteredTypename = true;
|
encounteredTypename = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -731,8 +732,10 @@ c, quick);
|
||||||
Object elab = null;
|
Object elab = null;
|
||||||
try{ elab = callback.elaboratedTypeSpecifierBegin( decl, consume() );} catch( Exception e ) {}
|
try{ elab = callback.elaboratedTypeSpecifierBegin( decl, consume() );} catch( Exception e ) {}
|
||||||
name();
|
name();
|
||||||
try{ elab = callback.elaboratedTypeSpecifierName( elab ); } catch( Exception e ) {}
|
try{
|
||||||
try{ callback.elaboratedTypeSpecifierEnd( elab );} catch( Exception e ) {}
|
callback.elaboratedTypeSpecifierName( elab );
|
||||||
|
callback.elaboratedTypeSpecifierEnd( elab );
|
||||||
|
} catch( Exception e ) {}
|
||||||
encounteredTypename = true;
|
encounteredTypename = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -748,8 +751,10 @@ c, quick);
|
||||||
Object elab = null;
|
Object elab = null;
|
||||||
try{ elab = callback.elaboratedTypeSpecifierBegin( decl, consume() ); } catch( Exception e ) {}
|
try{ elab = callback.elaboratedTypeSpecifierBegin( decl, consume() ); } catch( Exception e ) {}
|
||||||
name();
|
name();
|
||||||
try{ elab = callback.elaboratedTypeSpecifierName( elab );} catch( Exception e ) {}
|
try{
|
||||||
try{ callback.elaboratedTypeSpecifierEnd( elab );} catch( Exception e ) {}
|
callback.elaboratedTypeSpecifierName( elab );
|
||||||
|
callback.elaboratedTypeSpecifierEnd( elab );
|
||||||
|
} catch( Exception e ) {}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -912,7 +917,7 @@ c, quick);
|
||||||
switch (LT(1)) {
|
switch (LT(1)) {
|
||||||
case Token.t_const:
|
case Token.t_const:
|
||||||
case Token.t_volatile:
|
case Token.t_volatile:
|
||||||
try{ ptrOp = callback.pointerOperatorCVModifier( ptrOp, consume() ); } catch( Exception e ) {}
|
try{ callback.pointerOperatorCVModifier( ptrOp, consume() ); } catch( Exception e ) {}
|
||||||
return ptrOp;
|
return ptrOp;
|
||||||
default:
|
default:
|
||||||
throw backtrack;
|
throw backtrack;
|
||||||
|
@ -1072,14 +1077,14 @@ c, quick);
|
||||||
callback.nameEnd( toSend );
|
callback.nameEnd( toSend );
|
||||||
} catch( Exception e ) {}
|
} catch( Exception e ) {}
|
||||||
|
|
||||||
try{ declarator = callback.declaratorId(declarator);} catch( Exception e ) {}
|
try{ callback.declaratorId(declarator);} catch( Exception e ) {}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
name();
|
name();
|
||||||
try{ declarator = callback.declaratorId(declarator);} catch( Exception e ) {}
|
try{ callback.declaratorId(declarator);} catch( Exception e ) {}
|
||||||
}
|
}
|
||||||
catch( Backtrack bt )
|
catch( Backtrack bt )
|
||||||
{
|
{
|
||||||
|
@ -1135,7 +1140,7 @@ c, quick);
|
||||||
callback.nameEnd( end );
|
callback.nameEnd( end );
|
||||||
} catch( Exception e ) {}
|
} catch( Exception e ) {}
|
||||||
|
|
||||||
try{ declarator = callback.declaratorId(declarator);} catch( Exception e ) {}
|
try{ callback.declaratorId(declarator);} catch( Exception e ) {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -1189,13 +1194,13 @@ c, quick);
|
||||||
// const-volatile marker on the method
|
// const-volatile marker on the method
|
||||||
if( LT(1) == Token.t_const || LT(1) == Token.t_volatile )
|
if( LT(1) == Token.t_const || LT(1) == Token.t_volatile )
|
||||||
{
|
{
|
||||||
try{ declarator = callback.declaratorCVModifier( declarator, consume() );} catch( Exception e ) {}
|
try{ callback.declaratorCVModifier( declarator, consume() );} catch( Exception e ) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
//check for throws clause here
|
//check for throws clause here
|
||||||
if( LT(1) == Token.t_throw )
|
if( LT(1) == Token.t_throw )
|
||||||
{
|
{
|
||||||
try{ declarator = callback.declaratorThrowsException( declarator );} catch( Exception e ) {}
|
try{ callback.declaratorThrowsException( declarator );} catch( Exception e ) {}
|
||||||
consume(); // throw
|
consume(); // throw
|
||||||
consume( Token.tLPAREN );// (
|
consume( Token.tLPAREN );// (
|
||||||
boolean done = false;
|
boolean done = false;
|
||||||
|
@ -1210,7 +1215,7 @@ c, quick);
|
||||||
case Token.tIDENTIFIER:
|
case Token.tIDENTIFIER:
|
||||||
//TODO this is not exactly right - should be type-id rather than just a name
|
//TODO this is not exactly right - should be type-id rather than just a name
|
||||||
name();
|
name();
|
||||||
try{ declarator = callback.declaratorThrowExceptionName( declarator );} catch( Exception e ) {}
|
try{ callback.declaratorThrowExceptionName( declarator );} catch( Exception e ) {}
|
||||||
break;
|
break;
|
||||||
case Token.tCOMMA:
|
case Token.tCOMMA:
|
||||||
consume();
|
consume();
|
||||||
|
@ -1228,7 +1233,7 @@ c, quick);
|
||||||
{
|
{
|
||||||
consume( Token.tASSIGN);
|
consume( Token.tASSIGN);
|
||||||
consume( Token.tINTEGER);
|
consume( Token.tINTEGER);
|
||||||
try{ declarator = callback.declaratorPureVirtual( declarator ); } catch( Exception e ) { }
|
try{ callback.declaratorPureVirtual( declarator ); } catch( Exception e ) { }
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1279,7 +1284,7 @@ c, quick);
|
||||||
try{ ptrOp = callback.pointerOperatorBegin( owner );} catch( Exception e ) {}
|
try{ ptrOp = callback.pointerOperatorBegin( owner );} catch( Exception e ) {}
|
||||||
|
|
||||||
if (t == Token.tAMPER) {
|
if (t == Token.tAMPER) {
|
||||||
try{ ptrOp = callback.pointerOperatorType( ptrOp, consume(Token.tAMPER) ); } catch( Exception e ) {}
|
try{ callback.pointerOperatorType( ptrOp, consume(Token.tAMPER) ); } catch( Exception e ) {}
|
||||||
try{ callback.pointerOperatorEnd( ptrOp );} catch( Exception e ) {}
|
try{ callback.pointerOperatorEnd( ptrOp );} catch( Exception e ) {}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1295,9 +1300,9 @@ c, quick);
|
||||||
|
|
||||||
if (t == Token.tSTAR) {
|
if (t == Token.tSTAR) {
|
||||||
if( hasName )
|
if( hasName )
|
||||||
try{ ptrOp = callback.pointerOperatorName( ptrOp );} catch( Exception e ) {}
|
try{ callback.pointerOperatorName( ptrOp );} catch( Exception e ) {}
|
||||||
|
|
||||||
try{ ptrOp = callback.pointerOperatorType( ptrOp, consume());} catch( Exception e ) {}
|
try{ callback.pointerOperatorType( ptrOp, consume());} catch( Exception e ) {}
|
||||||
|
|
||||||
for (;;) {
|
for (;;) {
|
||||||
try {
|
try {
|
||||||
|
@ -1337,7 +1342,7 @@ c, quick);
|
||||||
if( LT(1) == Token.tIDENTIFIER )
|
if( LT(1) == Token.tIDENTIFIER )
|
||||||
{
|
{
|
||||||
identifier();
|
identifier();
|
||||||
try{ enumSpecifier = callback.enumSpecifierId( enumSpecifier );} catch( Exception e ) {}
|
try{ callback.enumSpecifierId( enumSpecifier );} catch( Exception e ) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
if( LT(1) == Token.tLBRACE )
|
if( LT(1) == Token.tLBRACE )
|
||||||
|
@ -1352,7 +1357,7 @@ c, quick);
|
||||||
defn = null;
|
defn = null;
|
||||||
try{ defn = callback.enumeratorBegin( enumSpecifier );} catch( Exception e ) {}
|
try{ defn = callback.enumeratorBegin( enumSpecifier );} catch( Exception e ) {}
|
||||||
identifier();
|
identifier();
|
||||||
try{ defn = callback.enumeratorId( defn ); } catch( Exception e ) {}
|
try{ callback.enumeratorId( defn ); } catch( Exception e ) {}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1417,7 +1422,7 @@ c, quick);
|
||||||
// class name
|
// class name
|
||||||
if (LT(1) == Token.tIDENTIFIER) {
|
if (LT(1) == Token.tIDENTIFIER) {
|
||||||
className();
|
className();
|
||||||
try{ classSpec = callback.classSpecifierName(classSpec);} catch( Exception e ){}
|
try{ callback.classSpecifierName(classSpec);} catch( Exception e ){}
|
||||||
}
|
}
|
||||||
|
|
||||||
if( LT(1) != Token.tCOLON && LT(1) != Token.tLBRACE )
|
if( LT(1) != Token.tCOLON && LT(1) != Token.tLBRACE )
|
||||||
|
@ -1429,7 +1434,7 @@ c, quick);
|
||||||
throw backtrack;
|
throw backtrack;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
try{ classSpec = callback.classSpecifierSafe( classSpec ); } catch( Exception e ){}
|
try{ callback.classSpecifierSafe( classSpec ); } catch( Exception e ){}
|
||||||
|
|
||||||
// base clause
|
// base clause
|
||||||
if (LT(1) == Token.tCOLON) {
|
if (LT(1) == Token.tCOLON) {
|
||||||
|
@ -1448,7 +1453,7 @@ c, quick);
|
||||||
case Token.t_public:
|
case Token.t_public:
|
||||||
case Token.t_protected:
|
case Token.t_protected:
|
||||||
case Token.t_private:
|
case Token.t_private:
|
||||||
try{ classSpec = callback.classMemberVisibility( classSpec, consume() );} catch( Exception e ){}
|
try{ callback.classMemberVisibility( classSpec, consume() );} catch( Exception e ){}
|
||||||
consume(Token.tCOLON);
|
consume(Token.tCOLON);
|
||||||
break;
|
break;
|
||||||
case Token.tRBRACE:
|
case Token.tRBRACE:
|
||||||
|
@ -1478,17 +1483,17 @@ c, quick);
|
||||||
switch (LT(1)) {
|
switch (LT(1)) {
|
||||||
case Token.t_virtual:
|
case Token.t_virtual:
|
||||||
consume(Token.t_virtual);
|
consume(Token.t_virtual);
|
||||||
try{ baseSpecifier = callback.baseSpecifierVirtual( baseSpecifier, true ); } catch( Exception e ){}
|
try{ callback.baseSpecifierVirtual( baseSpecifier, true ); } catch( Exception e ){}
|
||||||
break;
|
break;
|
||||||
case Token.t_public:
|
case Token.t_public:
|
||||||
case Token.t_protected:
|
case Token.t_protected:
|
||||||
case Token.t_private:
|
case Token.t_private:
|
||||||
try { baseSpecifier = callback.baseSpecifierVisibility( baseSpecifier, consume() );} catch( Exception e ){}
|
try { callback.baseSpecifierVisibility( baseSpecifier, consume() );} catch( Exception e ){}
|
||||||
break;
|
break;
|
||||||
case Token.tCOLONCOLON:
|
case Token.tCOLONCOLON:
|
||||||
case Token.tIDENTIFIER:
|
case Token.tIDENTIFIER:
|
||||||
name();
|
name();
|
||||||
try { baseSpecifier = callback.baseSpecifierName( baseSpecifier ); } catch( Exception e ){}
|
try { callback.baseSpecifierName( baseSpecifier ); } catch( Exception e ){}
|
||||||
break;
|
break;
|
||||||
case Token.tCOMMA:
|
case Token.tCOMMA:
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -1,3 +1,6 @@
|
||||||
|
2003-04-11 John Camelon
|
||||||
|
Added DOMTests::testBug36247().
|
||||||
|
|
||||||
2003-04-11 Andrew Niefer
|
2003-04-11 Andrew Niefer
|
||||||
Moved ScannerFailedTest::testBug36316 to ScannerTestCase::testBug36316
|
Moved ScannerFailedTest::testBug36316 to ScannerTestCase::testBug36316
|
||||||
Added ScannerFailedTest::testBug36047
|
Added ScannerFailedTest::testBug36047
|
||||||
|
|
|
@ -1231,6 +1231,62 @@ public class DOMTests extends TestCase {
|
||||||
TranslationUnit tu = parse( "A::A():B( (char *)0 ){}", true );
|
TranslationUnit tu = parse( "A::A():B( (char *)0 ){}", true );
|
||||||
assertEquals( tu.getDeclarations().size(), 1 );
|
assertEquals( tu.getDeclarations().size(), 1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void testBug36247() throws Exception
|
||||||
|
{
|
||||||
|
Writer code = new StringWriter();
|
||||||
|
code.write( "class A {\n" );
|
||||||
|
code.write( "INLINE_DEF int f ();\n" );
|
||||||
|
code.write( "INLINE_DEF A g ();" );
|
||||||
|
code.write( "INLINE_DEF A * h ();" );
|
||||||
|
code.write( "};" );
|
||||||
|
TranslationUnit tu = parse(code.toString());
|
||||||
|
assertEquals( tu.getDeclarations().size(),1 );
|
||||||
|
SimpleDeclaration classDeclaration = (SimpleDeclaration)tu.getDeclarations().get(0);
|
||||||
|
assertEquals( classDeclaration.getDeclarators().size(), 0 );
|
||||||
|
assertEquals( classDeclaration.getDeclSpecifier().getType(), DeclSpecifier.t_type );
|
||||||
|
ClassSpecifier classSpec = (ClassSpecifier)classDeclaration.getTypeSpecifier();
|
||||||
|
PointerOperator po =null;
|
||||||
|
int number = 3;
|
||||||
|
assertEquals( classSpec.getDeclarations().size(), number );
|
||||||
|
for( int i = 0; i < number; ++i )
|
||||||
|
{
|
||||||
|
SimpleDeclaration subDeclaration = (SimpleDeclaration)classSpec.getDeclarations().get(i);
|
||||||
|
assertEquals( subDeclaration.getDeclarators().size(), 1 );
|
||||||
|
Declarator functionDeclarator = (Declarator)subDeclaration.getDeclarators().get(0);
|
||||||
|
assertNotNull( functionDeclarator.getParms());
|
||||||
|
assertEquals( 0, functionDeclarator.getParms().getDeclarations().size() );
|
||||||
|
List pointerOperators = functionDeclarator.getPointerOperators();
|
||||||
|
switch( i )
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
assertEquals( subDeclaration.getDeclSpecifier().getType(), DeclSpecifier.t_int );
|
||||||
|
assertEquals( functionDeclarator.getName().toString(), "f" );
|
||||||
|
assertEquals( pointerOperators.size(), 0 );
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
assertEquals( subDeclaration.getDeclSpecifier().getType(), DeclSpecifier.t_type );
|
||||||
|
assertEquals( subDeclaration.getDeclSpecifier().getTypeName(), "A");
|
||||||
|
assertEquals( functionDeclarator.getName().toString(), "g" );
|
||||||
|
assertEquals( pointerOperators.size(), 0 );
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
assertEquals( subDeclaration.getDeclSpecifier().getType(), DeclSpecifier.t_type );
|
||||||
|
assertEquals( subDeclaration.getDeclSpecifier().getTypeName(), "A");
|
||||||
|
assertEquals( functionDeclarator.getName().toString(), "h" );
|
||||||
|
assertEquals( pointerOperators.size(), 1 );
|
||||||
|
po = (PointerOperator)pointerOperators.get(0);
|
||||||
|
assertFalse( po.isConst() );
|
||||||
|
assertFalse( po.isVolatile() );
|
||||||
|
assertEquals( po.getType(), PointerOperator.t_pointer );
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue