From 0ce4a707ab7219e9ddb15141d8f4a4ce46d3ee2a Mon Sep 17 00:00:00 2001 From: John Camelon Date: Fri, 16 Apr 2004 18:34:39 +0000 Subject: [PATCH]
Patch for Dave Daoust
Modified Scanner Performance by
1. Moved ScannerContext sentinal to ContextStack
2. Delay Stringizing macro parameter until needed
3. Removed the sentinal from the scanner constructor --- .../parser/ChangeLog-parser | 2842 +++++++++-------- .../org/eclipse/cdt/core/parser/IScanner.java | 2 + .../core/parser/scanner/ContextStack.java | 205 +- .../core/parser/scanner/IScannerContext.java | 23 +- .../parser/scanner/LimitedScannerContext.java | 2 +- .../internal/core/parser/scanner/Scanner.java | 94 +- .../core/parser/scanner/ScannerContext.java | 10 +- 7 files changed, 1583 insertions(+), 1595 deletions(-) diff --git a/core/org.eclipse.cdt.core/parser/ChangeLog-parser b/core/org.eclipse.cdt.core/parser/ChangeLog-parser index f2cf6cbd029..939e1c0d504 100644 --- a/core/org.eclipse.cdt.core/parser/ChangeLog-parser +++ b/core/org.eclipse.cdt.core/parser/ChangeLog-parser @@ -1,1414 +1,1428 @@ -2004-04-15 Andrew Niefer - fixed https://bugs.eclipse.org/bugs/show_bug.cgi?id=58492 - -2004-04-15 John Camelon - Partial fix for https://bugs.eclipse.org/bugs/show_bug.cgi?id=39697 - -2004-04-15 John Camelon - Fixed https://bugs.eclipse.org/bugs/show_bug.cgi?id=58175 - -2004-04-15 Andrew Niefer - fixed https://bugs.eclipse.org/bugs/show_bug.cgi?id=57791 - Parser infinite loop - -2004-04-14 John Camelon - Fixed https://bugs.eclipse.org/bugs/show_bug.cgi?id=52253 - -2004-04-14 John Camelon - Fixed https://bugs.eclipse.org/bugs/show_bug.cgi?id=44249 - Fixed https://bugs.eclipse.org/bugs/show_bug.cgi?id=52004 - -2004-04-14 John Camelon - Fixed https://bugs.eclipse.org/bugs/show_bug.cgi?id=58500 - Fixed https://bugs.eclipse.org/bugs/show_bug.cgi?id=58178 - -2004-04-14 Andrew Niefer - friends in the AST (bugs 45235 & 53759 ) - - added acceptFriendDeclaration to ISourceElementRequestor - - added isFriendDeclaration to IASTAbstractTypeSpecifierDeclaration - - modified isFriend on IASTFunction - - functions, methods & abstractTypeSpecifierDeclarations callback with acceptFriendDeclaration - instead of their normal accept* if isFriend() or isFriendDeclaration() is true. - - added getFriends to IASTClassSpecifier - -2004-04-13 Andrew Niefer - fixed https://bugs.eclipse.org/bugs/show_bug.cgi?id=46246 - modified symbol table sorting to use a collator instead of String.compare() - -2004-04-11 John Camelon - Fixed https://bugs.eclipse.org/bugs/show_bug.cgi?id=55785. - Fix required update to ISourceElementRequestor interface : clients updated accordingly. - -2004-04-11 John Camelon - Updated errorhandling in Parser::translationUnit(). - -2004-04-10 John Camelon - Removed unused methods from IToken. - Restructured Token implementation to be more memory efficient. - Tightened up visibility of different members in the implementation. - Added TokenFactory construct to isolate Token clients from the particulars of which IToken implementation to instantiate. - -2004-04-10 John Camelon - Partial fix for https://bugs.eclipse.org/bugs/show_bug.cgi?id=57898 - -2004-04-09 Andrew Niefer - handle NPE during template argument deduction - fix bug in definitions of certain template member templates (fixes a ClassCastException encountered in ) - -2004-04-09 Andrew Niefer - fixed https://bugs.eclipse.org/bugs/show_bug.cgi?id=57754 - Fixed problems found after parsing iostream with discovered symbols, once 57754 was fixed: - fixed some problems with explicit specializations - handle using declarations of templates - handle typedefs in ASTCompleteParseFactory.queryIsTypeName - fixed instantiating constructors - -2004-04-08 John Camelon - Fixed https://bugs.eclipse.org/bugs/show_bug.cgi?id=57800. - -2004-04-07 John Camelon - Fixed https://bugs.eclipse.org/bugs/show_bug.cgi?id=50808. - Provided partial fix for https://bugs.eclipse.org/bugs/show_bug.cgi?id=50807. - Provided partial fix for https://bugs.eclipse.org/bugs/show_bug.cgi?id=52988. - Introduced EMPTY_STRING, a single constant that replaced > 100'S O literal "" in the code. - Updated IASTCompletionNode interface to provide better support for FUNCTION_REFERENCE and CONSTRUCTOR_REFERENCE. - Implemented IASTTypeId.getFullSignature() for both QUICK_PARSE and COMPLETE_PARSE. - Tweaked ASTNode.lookup() so that it would work for FUNCTION_REFERENCE. - -2004-04-07 Andrew Niefer - fix lookup in parents when the parent is a deferred template instance, enables content assist on list (from ) - -2004-04-07 Andrew Niefer - fix bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=44338 - -2004-04-07 Andrew Niefer - small changes to get through iostream under standard make with discovered symbols - - check null pointer in GCCScannerExtension.handlePreprocessorDirective, the null is probably a symptom of whatever - is giving us an unbalanced preprocessor directive - - catch exceptions during our 3rd attempt at a template argument in ExpressionParser.templateArgumentList - -2004-04-07 John Camelon - Provided a partial fix for https://bugs.eclipse.org/bugs/show_bug.cgi?id=50152 - Updated IExpressionParser::expression() interface necessitated by this fix, and updated its clients appropriately. - -2004-04-06 David Daoust - Removed some temporary objects that the scanner was producing. - Fixed small bug in GCCScannerExtension. - -2004-04-06 Andrew Niefer - Small changes to help with template parsing - - report line numbers with some problems - - don't throw on SEMANTIC_INVALID_TYPE while doing templates - - handle some NPEs - -2004-04-06 Andrew Niefer - fix bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=47625 - -2004-04-06 John Camelon - Fixed https://bugs.eclipse.org/bugs/show_bug.cgi?id=39704 - Fixed https://bugs.eclipse.org/bugs/show_bug.cgi?id=29060 - -2004-04-06 John Camelon - Fixed https://bugs.eclipse.org/bugs/show_bug.cgi?id=47797 - -2004-04-05 Andrew Niefer - - performance improvements originally from Dave Daoust: - - create new TraceUtil to handle logging trace messages - - postpone building Problem message until it is asked for - - only ask for problem message if it will actually be traced - - added more problem strings for problems coming from the symbol table - - added CompleteParseASTFactory.shouldThrowException, so we can ignore certain problems - encountered while parsing templates - - fix NPEs caused by bad type info objects - -2004-04-05 John Camelon - Fixed NPE in CompleteParseASTFactory::createUsingDeclaration(). - -2004-04-05 John Camelon - Fixed https://bugs.eclipse.org/bugs/show_bug.cgi?id=54029 - -2004-04-04 John Camelon - Fixed https://bugs.eclipse.org/bugs/show_bug.cgi?id=56516 - Fixed https://bugs.eclipse.org/bugs/show_bug.cgi?id=53786 - -2004-04-02 Andrew Niefer - - partial handling template explicit instantiations - - bug 56834 - Symbols not available until end of parameter list, fixed for templates using temporary code block - - change IASTFactory.createTemplateParameter to take an IASTTypeId for the default value - - handle instantiating templates using default value that is a deferred instance - -2004-04-02 John Camelon - Updated SelectionSearch to work for functions, variables with initializers, etc. - Fixed https://bugs.eclipse.org/bugs/show_bug.cgi?id=39705 - Fixed https://bugs.eclipse.org/bugs/show_bug.cgi?id=44336 - Fixed https://bugs.eclipse.org/bugs/show_bug.cgi?id=36770 - Partial fix for https://bugs.eclipse.org/bugs/show_bug.cgi?id=51428 - Fixed https://bugs.eclipse.org/bugs/show_bug.cgi?id=39694 - -2004-03-30 John Camelon - Partial fix for Bug 56614 - Content Assist] Global variables do not appear in a global completion list - -2004-03-29 Andrew Niefer - fixed bug 56620 - Outline view stops on error on last line of block - (errorHandling() goes to far) - -2004-03-29 John Camelon - Fixed Bug 56517 - Preprocessor skipping doesn't ignore the contents of string literals. - -2004-03-28 John Camelon - Remove warnings. - -2004-03-26 Andrew Niefer - - handle template template parameters - -2004-03-26 Andrew Niefer - -report references to symbols used in a template-id. - - - -2004-03-25 Andrew Niefer - -modify IASTFactory.createField & .createVariable to take ITokenDuple's for the name - -modify ITokenDuple to support manipulating TokenDuples that have template arguments in them - -fix NullPointer & ClassCast exceptions found while parsing - -2004-03-25 Hoda Amer - Joined effort with Bogdan: Added a parserTimeout() method to ISourceElementRequestor - and the ability for the parser to timeout. - -2004-03-23 Andrew Niefer - -fix recursive loop leading to StackOverFlowException during template instantiation - -fix copy constructors for templated classes - -fix bug 55673 - -2004-03-22 Andrew Niefer - -handling of Typedefs - -handle unbalanced preprocessor condition in scanner - -fix concurrent modification exception while processing unresolved references in a Class Specifier - -report correct owner class for templated methods - -some work on template explicit specializations - -handle templated class forward declarations - -2004-03-18 Andrew Niefer - parsing template-ids: enables clas template partial specializations and fixes 54778 indirectly - - add ITokenDuple.getTemplateIdArgLists - - Added ExpressionParser.templateArgumentList & ExpressionParser.consumeTemplateArguments - - modifications to ExpressionParser & Parser to parse template argument lists - - modified lookups to lookup with template-id if the token duple has argument lists - - modified TemplateFactory to handle partial specializations - -2004-03-17 Andrew Niefer - fix bug 55163 - - in for-init-statement, try expression-statement before simple-declaration since if it actually is a statement instead of a - declaration, the simple-declaration fails hard and can actually enter an infinite loop. - -2004-03-16 Dave Daoust - refactor scanner for performance improvements - -changes to accountForUndo, now named readFromStream - -changes to checking for valid macros - -2004-03-15 Andrew Niefer - Templates: - - added ISourceElementRequestor.acceptTemplateParameterReference - - added throws ASTSemanticException to IASTFactory.createTemplateDeclaration & createTemplateParameter - - IASTTemplateDeclaration extends IASTScope, IASTTemplateParameter extends ISourceElementCallbackDelegate - - modified DeclarationWrapper.createASTNode & createMethodASTNode to handle member templates - - Add functionality to ASTTemplateDeclaration - - implemented CompleteParseASTFactory.createTemplateDeclaration & createTemplateParameter - - changes to symbol table to make it easier for the parser to use - -2004-03-12 Andrew Niefer - handle case causing NPE in CompleteParseASTFactory.createElaboratedTypeSpecifier - -2004-03-12 Andrew Niefer - bug 54639 fix NPE in CompleteParseASTFactory.cloneSimpleTypeSymbol - -2004-03-11 John Camelon - Refactoring of Scanner to allow reuse in GCCScannerExtension - -2004-03-10 John Camelon - Further performance improvements in Scanner. - -2004-03-09 Andrew Niefer - bug 52948 - modified CompleteParseASTFactory.createTypedef() to set the typeSymbol of the typedef symbol - modified TypeFilter to handle LookupKind.TYPES and LookupKind.TYPEDEFS - -2004-03-09 John Camelon - Put back the work to reconcile relative paths w/IResource readers which was lost upon merge. - -2004-03-09 Dave Daoust - Removed the Strings associated with constant value tokens and keywords -- it looks cleaner, and reduces the number of objects created (only by 30 to 40 K) (about 2% quicker) - Buffered the File I/O associated with reading inclusions. - Restructured the scanner into a large case statement with a few - helper functions -- this is the start of removing the strings (or - providing a preallocated buffer for string manipulation) (about 2% quicker) - -2004-03-04 Andrew Niefer - bug 53213 externalize strings - -2004-03-03 John Camelon - Refactored parser for further content assist work. - -2004-03-03 John Camelon - Added some trace statements to CompleteParseASTFactory. - Cleaned up usage of Enum.getValue() wrt encapsulation of enumerator value. - Refactored CompleteParseASTFactory for correctness and abstraction. - Added preliminary IProblem support to CompleteParseASTFactory. - Added (commented out unfortunately) assertions into CompleteParseASTFactory. - Updated IASTUsingDeclaration to return an Iterator for declarations mapped rather than just a single declaration. - -2004-03-01 Andrew Niefer - bug 52695 : ast.complete.IASTClassSpecifier#getDeclarations returns an empty iterator - - take ASTNode.SymbolIterator and move it to org.eclipse.cdt.internal.core.parser.ast - - hook up ASTScope.getDeclarations to IContainerSymbol.getContentsIterator() using SymbolIterator - - create ExtensibleSymbol to implement IExtensibleSymbol and derive BasicSymbol, UsingDeclarationSymbol and UsingDirectiveSymbol from it. - - -2004-02-26 Andrew Niefer - mark strings that don't need to be externalized for translation - -2004-02-25 Bogdan Gheorghe - Added a check to make sure that the parser is in the top context before throwing - an EOF exception in SeletionParser. - -2004-02-25 John Camelon - Fixed Bug 43051 : Search: cannot specify relative search paths - Fixed Bug 45140 : refactor IScanner to allow use of Readers of IResource - -2004-02-25 John Camelon - Updated Scanner to allow for invalid identifier names despite C++'s best efforts at maintaining its honour. - -2004-02-24 John Camelon - Refactoring Scanner.handleInclusion to be more modular. - -2004-02-24 Andrew Niefer - Template Explicit Specializations (bug 51485) - adding basic symbol table functionality for non-nested template specializations - -2004-02-24 John Camelon - Fixed https://bugs.eclipse.org/bugs/show_bug.cgi?id=52823 - -2004-02-24 John Camelon - Partial Fix for Bug 52534 - Selection Search offset limit reached is broken - -2004-02-18 Andrew Niefer - added IUsingDeclarationSymbol and UsingDeclarationSymbol - changed IContainerSymbol.addUsingDeclaration to return a IUsingDeclarationSymbol - -2004-02-17 Andrew Niefer - bug 52111 : added IContainerSymbol.removeSymbol() which is implemented as ContainerSymbol.removeSymbol() - -2004-02-16 Andrew Niefer - bug 52120 document symbol table use of ParserSymbolTableException - also clean up a couple of exceptions - -2004-02-12 Andrew Niefer - Fixed up symbol table handling of const & volatile - fixed bug 47628 - signed char is parsed as char - fixed bug 47636 - char* and char[] are treated as different types - fixed bug 45697 - Parser/Symbol table: Mismatched declaration & definition - -2004-02-12 John Camelon - Removed IASTCompletionKind.SCOPED_REFERENCE as it was obsolete. - Did preliminary work to support content assist within qualified names. - -2004-02-11 John Camelon - Restructured Parser implementation to allow for better support of Selection Search. - Restructured Parser implementation to allow for separation between parsing expressions (Scanner) and complete C/C++ source. - -2004-02-10 John Camelon - Workaround for Bug 51502 - Parser spins on particular file (Scalability) - -2004-02-10 Andrew Niefer - Templates in the symbol table (org.eclipse.cdt.internal.core.parser.pst) - ITemplateFactory.java - ITemplateSymbol.java - DeferredTemplateInstance.java - ParserSymbolTableError.java - TemplateEngine.java - TemplateFactory.java - TemplateSymbol.java - Most of the other main symbol table files (BasicSymbol, ContainerSymbol, etc) were modified - -2004-02-10 John Camelon - Fixed Bug 51302 - Content Assist: No completion list available following namespace declaration. - -2004-02-10 John Camelon - Refactored Parser.java to allow inline small functions and tightened the signatures for statement(). - Refactored Scanner.java to allow for data to be encapsulated to allow for IScannerExtension to act upon it. - Partially fixed Bug 47628 - signed char is parsed as char (affects the outline view) - -2004-02-08 John Camelon - Added support for inline method x-references. - Fixed Bug 44340 - Inline functions fail to resolve references - Fixed Bug 51243 - Content Assist in an empty document causes a NPE - -2004-02-06 Andrew Niefer - fixed bug51260 - Content Assist: Completion inside a class method silently fails with a ClassCastException - filter symbols without attached AST nodes out of the completion results so the iterator doesn't sometimes return null. - -2004-02-04 John Camelon - Added preliminary (crude) bSelectionParser IParser implementation for SELECTION_PARSE clients. - -2004-02-01 John Camelon - Added CompletionKind.UNREACHABLE_CODE to IASTCompletionNode. - Updated Scanner to handle unreachable code scenarios in content assist. - Added Directives class to centralize preprocessor directive strings. - Added keyword completion for preprocessor lines that start with #. - -2004-01-30 John Camelon - Partial fix for Bug 47752 - Outline does not recognize functions with full body try/catch blocks - -2004-01-30 John Camelon - Updated Scanner to allow for more robust completion in #if directives. - -2004-01-30 John Camelon - Fixed Bug 50487 - Wrong completion kind and prefix after "#ifdef" - -2004-01-29 Hoda Amer - Removed CompletionKind.KEYWORD. - -2004-01-29 John Camelon - Fixed 50642 - Wrong completion kind when declaring an argument type - Updated using declarations for more accurate keywords and closure. - -2004-01-29 Hoda Amer - Put CompletionKind.FUNCTION_REFERENCE back. - -2004-01-28 John Camelon - Fixed Bug 50821 - Freezes when opening / saving .c file - -2004-01-28 John Camelon - Fixed Bug 50711 - Wrong completion kind in a new expression - -2004-01-28 John Camelon - Updated Scanner to add ANSI built-in defined macros for C and C++. - Updated GCCScannerExtension to add GCC specific defined macros for C++. - Added factory infrastructure to allow for C/C++ dialect extensions to be added and contained. - Added IASTExpressionExtension w/implementation to allow for GCC specific leniency on evaluating expressions. - -2004-01-28 Andrew Niefer - Fixed bug#50729: Visibility is incorrectly decided in inheritance - -2004-01-27 John Camelon - Refactored parser to allow for cleaner content assist implementation. - Removed IASTCompletionNode.CompletionKind.STATEMENT_START as it is redundant. - Fixed bug 50640 - Wrong completion kind when expecting an exception - Fixed bug 50471 - Wrong completion kind after the "using" keyword - Fixed bug 50621 - Wrong completion kind in a class declaration - -2004-01-17 Hoda Amer - Added IASTCompletionNode.CompletionKind.New_Type_Reference - for a completion kind after a new expression. - -2004-01-27 Andrew Niefer - Updates to handle _Bool - - modified CompleteParseASTFactory.getParameterTypeInfo - CompleteParseASTFactory.createReference - CompleteParseASTFactory.usualArithmeticConversions - CompleteParseASTFactory.getTypeKind - Parser.typeId - TypeFilter.shouldAccept - TypeInfo.equals - -2004-01-26 John Camelon - Added traceLogs into Scanner. - Fixed Bug 46402 : expression evaluation error on branch not taken - Added beginning of IScannerExtension and GCCScannerExtension support for gcc specific aspects. - Added separate Scanner log category for tracing and updated clients to use it. - -2004-01-26 Andrew Niefer - Handle the C types _Complex, _Imaginary, _Bool, & long long int: - modified ParserSymbolTable.promotion() & conversion() - added TypeInfo.isLongLong - modified TypeInfo.canHold() - -2004-01-23 John Camelon - Added support for content assist in the scanner.. - -2004-01-22 John Camelon - Added token, scanner and problem subpackages to org.eclipse.cdt.internal.core.parser. - -2004-01-22 Hoda Amer - Solved a small problem in the ASTCompleteParseASTFactory sent to me by Dave. - -2004-01-20 John Camelon - Added traceLog() call into Scanner.handleProblem() and updated ParserFactory.createPreprocessor() for extra error handling. - -2004-01-20 John Camelon - Tidied up Scanner implementation for unused fields, inefficient String manipulations and redundant parameters. - -2004-01-19 John Camelon - Added IToken.getLineNumber() to facilitate adding line numbers to AST. - Added line number support into IASTOffsetableElement. Updated all implementations to use this. - Updated Parser and IASTFactory to populate IASTOffsetableElement with the values retrieved from IToken. - Removed IScanner.getLineNumberForOffset(). - -2004-01-16 Andrew Niefer - Created IExtensibleSymbol, which is a new base class for the symbol interfaces - Created IUsingDirectiveSymbol and UsingDirectiveSymbol - Modified ASTUsingDirective to use IUsingDirectiveSymbol - Modified CompleteParseASTFactory.createUsingDirective - Added IContainerSymbol.getContentsIterator() - Implemented getContentsIterator in ContainerSymbol - -2004-01-16 John Camelon - Changed IASTNode.LookupException to IASTNode.LookupError. - Updated IASTElaboratedTypeSpecifier to remove redundant extends relationships. - -2004-01-15 Andrew Niefer - Modified symbol table constructor to take a ParseMode as a parameter. - Modified symbol table to use a TreeMap instead of HashMap when ParseMode is CONTEXTUAL_PARSE - Modified ASTNode.lookup to throw ASTNotImplementedException if called when ParseMode is not CONTEXTUAL_PARSE - -2004-01-15 Hoda Amer - -2004-01-15 John Camelon - Renamed IASTNode.LookupResult IASTNode.ILookupResult. - Introduced new ParseError exception for contextual parse() methods. - Renamed ParserFactoryException ParserFactoryError. - Replaced ParserNotImplementedException with a variant of ParseError. - Updated IScanner & IParser to not reference OffsetLimitReachedException explicitly. - Renamed ParserMode.CONTEXTUAL_PARSE to COMPLETION_PARSE. - Cleaned up IMacroDescriptor and made Scanner definitions table consistent. - Added IScanner.getDefinitions() to return the entire Map of definitions to a client. - Removed most of the warnings from parser source directory. - Removed the unused SyntaxErrorException. - Provided partial fix for Bug 44370 IASTMacro requires more information for clients. - -2004-01-12 John Camelon - Fixed bug 48909 - Wrong completion node after a . or an -> - Fixed bug 49702 - Wrong completion kind sent in const/dest and code blocks - Added new CompletionKind - STATEMENT_START to indicate the beginning of a statement line. - -2004-01-08 Andrew Niefer - fixing bug 43110 - Parser support needed for functions with ellipses - Added IParameterizedSymbol.setHasVariableArgs() & hasVariableArgs() - Modified ParserSymbolTable.resolveFunction & reduceToViable - Modified CompleteParseASTFactory.createMethod & createFunction - -2004-01-08 Andrew Niefer - Fixing 48307 - PST: Friendship needs to be handled better - Added IDerivableContainerSymbol.lookupFunctionForFriendship. - Modified IASTFactory.createMethod to take an ITokenDuple for the method name. - Added LookupType.FORFRIENDSHIP and use it in LookupElement. - Modified CompleteParseASTFactory.createMethod to handle friend functions. - -2004-01-06 Andrew Niefer - For Content Assist, support lookup using LookupKind.THIS (lookup in the class of the this pointer ) - Fix bug where forward declared method/functions appeared twice in the content assist lookup results. - -2004-01-06 John Camelon - Renamed IToken::tELIPSE to IToken::tELLIPSIS - Partially fixed Bug 43110 : Parser support needed for functions with ellipses - -2004-01-05 John Camelon - Removed warnings. - Moved StructuralParseCallback from model to parser directory to facilitate building the parser standalone. - -2003-12-31 Hoda Amer - - Changed ASTUtil.getType to include parameter initializer clause in returned string. - -2003-12-22 Hoda Amer - Content Assist Work : Returned the results size of the IASTNode lookup - to help in determining the scope relevance - - Added the variable type to a search match result to be compatible with the - results found by the completion engine - -2003-12-17 Andrew Niefer - Content Assist work: - - change parser & symbol table to handle handle friend classes - - change visibility filtering to check for friendship - - fix finding function parameters in prefix lookup - -2003-12-17 Hoda Amer - Content Assist work : Integrated with Parser and Symbol table modifications - -2003-12-15 Andrew Niefer - Changed IASTNode.lookup to take the context as a parameter - created ASTNode to implement IASTNode, ASTSymbolOwner extends it. - Set Completion Scope for statements - Set Completion context for . and -> expressions - -2003-12-15 Hoda Amer - Fixed [Bug 47234] new ParserMode required for a better CModel : - - Added a core plugin preference to build the CModel in Structural mode - - Added StructuralParseCallBack class - - Added lists of declarations to AST Scopes in the complete AST - -2003-12-12 John Camelon - Added preliminary keyword support into IASTCompletionNode::getKeywords(). - Refactored parser to put keyword string literals in one utility class. - -2003-12-11 John Camelon - Added OffsetLimitReachedException and restructured Parser exceptions. - Continued support for code assist/selection search parser. - Ensured all source in parser/ have copyright notices. - -2003-12-09 Andrew Niefer - -created TypeFilter to support support filtering of what kind of symbols to find (for prefix lookup 48306) - -added IContainerSymbol.isVisible for bug 48294 - -2003-12-09 Hoda Amer - Modified IASTCompletionNode.CompletionKind - modified IASTNode.LookupKind - Changed IASTScope to extend IASTNode - -2003-15-09 John Camelon - Fixed Bug 47234 : new ParserMode required for a better CModel - Updated IASTCompletionNode to include a scope as well as a context. - Begun parser updates to support code assist & selection search. - -2003-12-05 John Camelon - Broke the Parser up into separate classes per ParserMode. - -2003-12-04 John Camelon - Removed some warnings. - Fixed Bug 39678 : Scanner doesn't support concatenation of different-type string literals (GCC) - Refactored ScannerContext to use constructors rather than initializers. - Refactored IScannerContext to use enumeration-esque kinds. - Added code assist/selection search support to Scanner. - -2003-12-03 Andrew Niefer - - Symbol table - modify prefix lookup handling of ambiguities - - fix up qualified lookup - - add IContainerSymbol.lookupMethodForDefinition - - Parser - modify Complete parse AST factory to use the correct lookups in different situations - - Created a LookupType enum to specify what kind of lookup is needed (Qualified, unqualified, for definition) - - -2003-11-27 Andrew Niefer - fix bug 47264: Parse fails when using struct s foo; and int s; in function bodies - -2003-11-18 Andrew Niefer - Refactor PST: Split Declaration into 4 classes : ContainerSymbol, DerivableContainerSymbol, ParameterizedContainerSymbol, - SpecializedSymbol. Move these along with BasicSymbol & TemplateInstance to no longer be nested in ParserSymbolTable. - -2003-11-13 Hoda Amer - Changed the getExpressionResultType() in the complete factory to return - an object of type ExpressionResult. - Solved bug#44342: Failure to dereference function calls after a . or an -> - -2003-11-07 John Camelon - Fixed Bug 39554 : _Pragma directive is not supported (ANSI C99) - -2003-11-06 John Camelon - Removed one last remainder of core.model.Util in parser to unbreak 2.0 build. - -2003-11-05 John Camelon - Fixed Bug 44838 : exception when resolving parameter references in a constructor - Fixed Bug 46165 : fields referenced in constructor chains are not called back upon - Fixed Bug 45551 : Macro replacement in #include directives - -2003-11-05 John Camelon - Cleaned up the ParserFactory interface to check for validity of input arguments. - Moved NullSourceElementRequestor and ScannerInfo to public interface as requested. - Restructured code so that no Eclipse/CDT source outside the parser source directory is used. - Updated parser clients to use new ParserFactory (stand-alone parser work item). - -2003-11-05 John Camelon - Removed warnings from parser source tree. - Removed preliminary task tags support to clean up parser interfaces and implementation. - Added preliminary IProblem support to - -2003-11-03 John Camelon - Added in preliminary interface for code completion mode. - -2003-10-28 Andrew Niefer - Fixed Bug 44925 : Search: Elaborated type specifier - Patially fixed Bug 44510 : C/C++ Search gives wrong results - -2003-10-24 John Camelon - Fixed Bug 45476 : preprocessor macro "defined" not handled correctly - Fixed Bug 45477 : macro redefines prevent further parsing - -2003-10-24 John Camelon - Fixed Bug 39542 : Parser fails on 'struct' parameter types - Fixed Bug 39549 : Designated initializers are not supported (ANSI C99) - Fixed Bug 39551 : Complex and imaginary numbers are not supported (ANSI C99) - -2003-10-21 John Camelon - Fixed Bug 40007 : Parser reports success when it fails - Fixed Bug 44305 : Scanner/preprocessor fails on conditionals using hexidecimal - Fixed Bug 41935 : parser provides wrong name on namespace aliases - Fixed Bug 39525 : Parser fails on expressions that take address of overloaded operators - Fixed Bug 45287 : Scanner does not accept character sequence literals - Fixed Bug 36550 : Error recovery with unterminated string is weak - Fixed Bug 41063 : Remove unused K&R C support from ANSI Parser - Fixed Bug 39528 : Function try-blocks are not supported by the parser (ANSI C++) - Fixed Bug 39538 : Parser fails on explicit instantiation of templated operators - Fixed Bug 39536 : Parser fails on templated constructors/conversion operators - Refactored Scanner to make it easier to debug. - -2003-10-01 John Camelon - Fixed Bug 43987 : Search results: Declaration of class not highlighted when selected - Fixed Bug 43997 : Search results: selection includes preceding whitespace - Fixed Bug 44034 : Scanner failure on #undef - -2003-10-01 Andrew Niefer - bug43951 - search on ctor declarations returns definition too. - PST changes: - - modify lookupConstructor to copy the constructor list before resolving on it - - modify checkUserDefinedConversionSequence the same way - - modify isValidFunctionOverload to check for forward declarations - -2003-10-01 Bogdan Gheorghe - Modified CDT log dump in Parser.fetchToken to include error message - -2003-10-01 Andrew Niefer - bug43450 - Scanner needs to handle include paths that contain quotes - -2003-09-30 Bogdan Gheorghe - Added CDT log dump in Parser.fetchToken to catch HandleInclusion failures - -2003-09-30 John Camelon - Fixed Bug 43503 : Search:f_SD_01 cannot be found in ManyClasses20 Project - Fixed Bug 43680 : Fix Parser Error Handling - -2003-09-30 Hoda Amer - -Solution to [Bug 43053] require reference cleanup for expressions - Added purgeReferences() at the end of ASTExpression::acceptElement() - -2003-09-30 Andrew Niefer - PST changes for bug 43503 - parser needs to know the different between ambiguous functions - and no functions when no parameter information is provided - - throw r_UnableToResolveFunction if we have more than 1 function and no parameter info was given - - handle this case in addUsingDeclaration. - * note that r_UnableToResolveFunction doesn't necessarily mean ambiguous if we had enough information - -2003-09-29 Hoda Amer - Solution to bug#43679 : Exceptions in indexer - -2003-09-29 Andrew Niefer - fixed bug 43834 : Empty Parameter list and parameter list taking one void do not match - -2003-09-29 John Camelon - Continued work on Bug 43062 : Outline is confused on operator methods containing spaces - Partial fix for Bug 43680 : Fix Parser Error Handling - -2003-09-26 John Camelon - Fixed Bug 43644 : 6 triangle icons appearing in outline viewer when typing an error - Fixed Bug 43062 : Outline is confused on operator methods containing spaces - Fixed Bug 39531 : Problems with type conversion operators - -2003-09-25 Hoda Amer - - Last part of solution to bug#42453: Expression result types not computed - Added the handling of POSTFIX_TYPENAME_IDENTIFIER - Completed bug#43221: POSTFIX_TYPENAME_IDENTIFIER not implemented - - Solution to bug#43644 : 6 triangle icons appearing in outline viewer when typing ... - -2003-09-24 Hoda Amer - Partial solution to bug#42453: Expression result types not computed - Added the handling of the NEW_TYPEID, CASTEXPRESSION, POSTFIX_DYNAMIC_CAST, - POSTFIX_REINTERPRET_CAST, POSTFIX_STATIC_CAST, and POSTFIX_CONST_CAST - -2003-09-25 John Camelon - Partial fix for Bug 43221 : POSTFIX_TYPENAME_IDENTIFIER not implemented - -2003-09-24 John Camelon - Fixed Bug 43106 : Symbol Table support needed to resolve types - Fixed Bug 43375 : isExtern not returning true for extern declarations - -2003-09-23 John Camelon - Fixed Bug 43084 : need to restructure TypeId to allow dynamic_cast<> type expression references. - Fixed Bug 39504 : sizeof-expressions are not handled properly - -2003-09-23 Hoda Amer - Solution to bug#43373: No reference to static member in definition - Solution to bug#43371: constructor incorrectly marked private - -2003-09-18 Andrew Niefer - - modified Symbol table interfaces to use Lists & Maps instead of LinkedList and HashMap - - fixed warnings in ParserSymbolTable - - fixed bug43106 - Symbol Table support needed to resolve types - - fixed bug43156 - require ability to add implicit inheritance copy constructor - - fixed bug43159 - TypeInfo.equals() not working properly - - fixed bug43238 - Postfix_Subscript expressions confuse function resolution - -2003-09-16 Andrew Niefer - - added setThrowExceptionOnBadCharacterRead to IScanner to help with wildcard bug43063 - -2003-09-17 Hoda Amer - In completeParseASTFactory.getExpressionResultType(): Added the support - for expression types: PM_DOTSTAR, PM_ARROWSTAR, CONDITIONALEXPRESSION - -2003-09-16 John Camelon - Implement CompleteParse IASTFunction::previouslyDeclared(). - -2003-09-16 Hoda Amer - In completeParseASTFactory.getExpressionResultType(): Added the support - for expression type PRIMARY_THIS. - In createMethod(): changed the scope of a method definition to point to - the parent class. - -2003-09-15 John Camelon - Fixed Bug 39556 : 'restrict' qualifier is not supported (ANSI C99) - Fixed Bug 43126 : ISourceElementRequestor.acceptParameterReference accesses internal class - Fixed Bug 43062 : Outline is confused on operator methods containing spaces - Cleaned up some warnings in the parser. - -2003-09-15 Andrew Niefer - bug43106 - added getConditionalOperand to ParserSymbolTable - -2003-09-15 John Camelon - Partially fixed Bug 42979 : Cannot search for operator overloaders - -2003-09-12 Hoda Amer - In completeParseASTFactory.getExpressionResultType() - - Added the handling of some more expression types. - See CompleteParseASTExpressionTest for details. - -2003-09-12 John Camelon - Fixed Bug 42985 : Search: Qualified function call is treated as a declaration - Fixed Bug 40419 : parser fails on heavily templated expressions - -2003-09-12 John Camelon - Fixed Bug 43013 : IASTParameterDeclaration does not derive from IASTOffsetableNamedElement - -2003-09-12 Andrew Niefer - Fixed some NPEs in ParserSymbolTable.getFlatTypeInfo - Added some comments and created some constants to help clarify ranking of conversion sequences - -2003-09-11 John Camelon - Fixed Bug 42840 : Search: Cannot find things after double declarations - Fixed Bug 42798 : Selected #include off by 1 char - Fixed Bug 42872 : dynamic cast not parsed properly - Partially fixed Bug 39504 : sizeof-expressions are not handled properly - Updated SourceElementRequestor callbacks to include IASTParameterReference callbacks. - -2003-09-09 Hoda Amer - - Solved the double reference problem - - solution to bugs #42822, #42823, & #42822B - -2003-09-09 John Camelon - Updated ScannerException to be more precise and include more information. - Updated Parser to be more careful of how it handles particular Scanner errors in COMPLETE_PARSE mode. - -2003-09-08 Bogdan Gheorghe - Added ScannerExceptions in Preprocessor.java to PDE Error - Log - -2003-09-09 Hoda Amer - Added more IASTExpression.Kind handling to CompleteParseASTFactory.getExpressionResultType() - -2003-09-08 John Camelon - Made scoping support more robust in CompleteParse mode. - Refactored ISourceElementRequestor (enter|exit)CodeBlock() to take IASTCodeScope rather than IASTScope. - Removed the now obsolete DOM. -` Added enumerator references to ISourceElementRequestor. - -2003-09-08 Andrew Niefer - - Created ParserLanguage.java - - Updated Factories to take language as parameter when create scanner & parser - - Updated Parser, Scanner & ParserSymbolTable to take language in their constructor - -2003-09-05 Hoda Amer - - Added references to variables with pointers in solution - of bug#42453:Expression result types not computed - - -2003-09-05 John Camelon - Continue to add support for parsing within function bodies. - Add workaround for 1.2 for inline function declaration-before-use chicken-and-egg. - -2003-09-05 John Camelon - Fixed NPE on nested declarations in code blocks. - -2003-09-04 John Camelon - First pass of parsing function bodies with X-Reference information. - Updated IASTFactory/ISourceElementRequestor to include IASTCodeScope - constructs, clients should keep this in mind and update their implementations. - -2003-09-04 Andrew Niefer - Fix bug42541 - Anonymous structures cause NPE in full parse - -2003-09-03 Andrew Niefer - fix bug in PST that prevents > 2 constructors - -2003-09-03 John Camelon - Fixed bug41445 - QualifiedLookup succeeds where it should fail. - -2003-09-02 Andrew Niefer - bug41935 - Modifications to PST to allow for namespace aliases - -2003-08-28 John Camelon - Fixed bug39535 - Parser fails on namesapce aliases - -2003-08-26 Bogdan Gheorghe - Added parser constant to all debugLog tracing statements. - -2003-08-25 John Camelon - Fixed bug39526 - Parser doesn't handle initializers correctly. - Fixed bug41520 - FullParse : Constructor Initializer is mistaken as function prototype - -2003-08-25 John Camelon - Fixed Bug 39530 - More problems with initializers. - Fixed Bug 37424 - Crash when opening big files - Refactored pointerOperators & cvQualifiers to not throw backtracks in optional case. - Added tracing support to cdt.core plugin via .options file. - -2003-08-14 John Camelon - Removed warnings from SymbolTable & QuickParseCallback (removing implicit accessor generation). - Made IASTElaboratedTypeSpecifier derive from IASTOffsetableNamedElement (as it should). - -2003-08-14 John Camelon - Added X-Reference support for ArrayModifiers and Exception Specifications. - Fixed Bug 41551 - HandleInclusion always throws ScannerException on local includes. - -2003-08-13 John Camelon - Added constructor expression support for variables. - Added constructor chain x-reference support for methods. - -2003-08-13 John Camelon - Added Expression x-reference support into Parser. - -2003-08-12 John Camelon - Added X-Ref/Elaborated type support w/element requestor callbacks. - -2003-08-11 John Camelon - Added Complete Parse support for ASM Definitions. - Added isVolatile() to abstract declarations. - Added Complte Parse support for elaborated types / forward declaration of classes. - Fixed some robustness issues. - -2003-08-05 Andrew Niefer - - Refactor symbol table functions to start with lower case letters - - Added better constructor support : - IDerivableContainerSymbol.addConstructor - IDerivableContainerSymbol.lookupConstructor - IDerivableContainerSymbol.getConstructors - - Changed ParserSymbolTableException.r_Unspecified to r_InternalError - - implicit user-defined conversion sequences now only use constructors not marked explicit - - user-defined conversion sequences are now only applied at most once (12.3-4 in spec) - -2003-07-31 Andrew Niefer - Added better support to the parser symbol table for forward declarations - -2003-07-31 Victor Mozgin - Fixed PR 39540 : Parser fails on const qualifier after class specifier. - -2003-07-30 Victor Mozgin - Fixed PR 39532 : Parser fails on fully-qualified class names. - -2003-07-29 John Camelon - Updated AST to better represent pointers to functions/methods. - Implemented typedef declaration/x-ref infrastructure. - -2003-07-29 Victor Mozgin - Fixed PR 39546 : Parser fails on 'signed' casts. - -2003-07-28 John Camelon - Fixed Bug 40842 - Parser: NPE while parsing class declaration in full parse mode - Fixed Bug 40843 - Parser: failParse doesn't set parsePassed = false on EOF. - Fixed Miscellaneous overrides issues involving parameters & functions. - -2003-07-28 John Camelon - Fixed Bug 40730 : Parser is not searching the include path for #include"" - -2003-07-28 Victor Mozgin - Fixed PR 39537 : Parser fails if template parameters contain '>' or '<' characters. - -2003-07-25 Victor Mozgin - Fixed PR 39553 : Macros are not expanded in #include statements. - -2003-07-24 John Camelon - Added COMPLETE_PARSE support for Method and Field declarations and cross-references. - Fixed some small ParserSymbolTable bugs. - Added support for linkage specification under COMPLETE_PARSE. - -2003-07-24 John Camelon - Added CompleteParse - UsingDirective & UsingDeclarations w/namespace/class/field variable references. - Added CompleteParse support for enumeration specifiers and references in variables & fields. - Stubbed out other Scopes/Declarations for COMPLETE_PARSE mode to allow indexer team to switch over ASAP. - -2003-07-22 John Camelon - Added in preliminary support for Field/Variable w/cross references on their types. - -2003-07-21 John Camelon - Addded in support for BaseSpecifier & class/namespace reference callbacks upon those. - -2003-07-21 John Camelon - Fleshed out basic declarations for FullParse AST. - Fixed Bug 40554 - Fields coming back as Vars - Fixed Bug 40555 - Methods come back as Functions - -2003-07-18 John Camelon - Added ISourceElementCallbackDelegate interface for AST constructs to allow the Parser to delegate callback's to the nodes themselves. - Got rid of ParserMode.STRUCTURAL_PARSE for the time being. - Removed org.eclipse.cdt.internal.core.parser.ast.full. - Created org.eclipse.cdt.internal.core.parser.ast.complete. - Updated ParserFactory.createScanner() to force the user to provide a callback and a ParserMode. - Introduced ASTSemanticException for COMPLETE_PARSE mode. - Fleshed out preliminary IASTReference interfaces and added callbacks to ISourceElementRequestor. - Removed acceptElaboratedTypeSpecifier() from ISourceElementRequestor. - -2003-07-18 John Camelon - Removed DeclaratorDuple as it was obsolete. - Fixed offsets in quickParse's IASTTypedefDeclaration implementation. - Fixed Bug 40436 - Fully Qualified Names Needed (for Indexer/Search features) - -2003-07-17 John Camelon - Removed IParserCallback. - Partially converted DOM to ISourceElementRequestor (requires refactoring of CModelBuilder & StuctureComparator modules in near future). - Completely finished ISourceElementRequestor/IASTFactory work for QuickParse mode. - Added pointer to methods/functions into AST callback structure. - Restructured AST class hierarchy. - Removed the old IParserCallback return Objects from every Parser method. - -2003-07-17 Victor Mozgin - Added support for digraphs and trigraphs. - Added support for hex floating point literals. - Fixed stack overflow problem with string literals concatenation. - Fixed problem with token pasting in macros. - This solves PR 39523, 39550, 39552. - -2003-07-15 Victor Mozgin - Fixed PR 39349 : Scanner fails on long long literals. - Fixed PR 39544 : Scanner fails on wide char literals. - -2003-07-10 John Camelon - Added in template support to IAST hierarchy. - Updated instantiation & specialization hierarchy. - Removed ASTTemplateDeclarationType. - Added full requestor callbacks for fields, variables, functions, methods & typedefs. - -2003-07-08 John Camelon - Filled out IASTMethod & IASTFunction & added implementations. - Updated IScanner, clients & implementations to use IScannerInfo. - Finished SimpleDeclaration porting to new architecture, only thing left is templates. - -2003-07-07 John Camelon - Bug 39652 - AST: Nested Classes incorrectly report null qualified Names - Fuller specification of Field/Method interfaces. - -2003-07-04 John Camelon - Fixed NPE in Parser::declarator(). - Bug 39652 - AST: Nested Classes incorrectly report null qualified Names - -2003-07-04 Victor Mozgin - Added CTaskTagsReconciler. - Extended ParserFactory with createProblemReporter() and createTranslationResult(). - -2003-07-02 Victor Mozgin - Fixed PR 39501 : Parser problems with throw clauses. - -2003-06-30 John Camelon - Further restructuring of Parser for ISourceElementRequestor. - Added interfaces/implementation for Simple Declarations. - Cleaned up DOM's representation of Constructor chains. - -2003-06-28 John Camelon - Completed Quickparse expression representation. - Updated ExpressionEvaluation and associated tests. - -2003-06-26 John Camelon - Update IASTExpression. - Move Parser.Backtrack and Parser.EndOfFile to external interface. - -2003-06-26 Victor Mozgin - Task tags support in C/C++ comments (initial revision). - Infrastructure to support problem reporting during translation. - Additional infrastructure for options/preferences handling. - -2003-06-25 John Camelon - Fixed bug39348 - sizeof elaborated types fail in parsing expression - -2003-06-25 John Camelon - Create new interface and support for calculating lineNumber/offset mapping. - Updated IASTClassSpecifier for qualified name query. - Began structuring expressions and declarators in Parser for ISourceElementRequestor. - Updated other packages to use new interfaces. - -2003-06-24 John Camelon - Updates for ISourceElementRequestor - elaborated types & enumerations. - -2003-06-23 John Camelon - Updating SimpleDeclarations to move towards new Callback structure. - -2003-06-23 John Camelon - Updated Factory infrastructure, constructors, etc. - Introduced Preprocessor class for transitive closure calc. client. - -2003-06-20 Victor Mozgin - Fixed PR 36463 : Offsets of macros are incorrect. - -2003-06-17 Victor Mozgin - Implemented correct handling of nested declarators in CModelBuilder. - Added proper support for function pointers as parameters. - This fixes PR 38921 and 39002. - -2003-06-16 Victor Mozgin - Implemented support for old K&R-style C function declarations. - Added oldKRParametersBegin() and oldKRParametersEnd() to IParserCallback. - Added getParameterTypes() with support of K&R to CModelBuilder. - Fixed ExpressionEvaluator and NullSourceElementRequestor for additions to IParserCallback. - Added handling of K&R syntax to the parser. - This fixes PR 7541, 35320 and 38434. - -2003-06-14 Victor Mozgin - Fixed handling of parameter lists for typedefs for functions. - More errorhandling in CModelBuilder. - Added handling of pointers to members. - Added handling of declarations for nested scopes (like A::B::C). - This fixes PR 36290, 36931 and partially 38920. - -2003-06-13 John Camelon - Added Class/Base infrastructure to public interfaces & requestor callback. - Moved many internal interfaces to external packages. - Organized imports. - -2003-06-13 Victor Mozgin - Renamed NullParserCallback into NullSourceElementRequester. - NullSourceElementRequester now dummy-implements both IParserCallback and ISourceElementRequester. - -2003-06-13 John Camelon - Merged ParserSymbolTable branch back into HEAD. - -2003-06-12 John Camelon - Get rest of JUnit tests working, will merge back to HEAD branch. - -2003-06-12 John Camelon - Introduction of ASTFactory strategy, some restructuring of packages and interfaces. - -2003-06-10 John Camelon - Futher pursuit of the golden hammer, symbol table integration. - -2003-06-09 John Camelon - First step in replacing IParserCallback with ISourceElementRequestor. - -2003-06-05 Andrew Niefer - Begin implementation of functions for template specializations: deduceTemplateArgument, - classTemplateSpecializationToFunctionTemplate, transformFunctionTemplateForOrdering - -2003-06-09 Victor Mozgin - Fixed for conversion operator declarations. - This fixes PR 36769 (finally) and PR 38657. - -2003-06-09 Victor Mozgin - Fixed Bug 36932 - RTS: Parser fails on "new" in ctor initializer - Improved handling of new-expressions: placements, arrays and - multiple parameters in initializers are now parsed. - -2003-06-09 Victor Mozgin - Fixed Bug 36701 - Scanner looses non-token chars while macro stringizing - -2003-06-07 Victor Mozgin - Fixes for templated constructor/destructor/operator declarations. - This fixed PR 36766, 36767, 36769 (STL parsing problems). - -2003-06-06 Victor Mozgin - Fixed Bug 38065 - Scanner skipped backslashes inside the code - -2003-06-05 John Camelon - Fix Bug 38380 "Include" class public methods fails JUnit tests - -2003-05-29 Andrew Niefer - new Class eType for stronger type safety in TypeInfo - new class PtrOp for better handling of pointer operators and cv qualifiers - new class TemplateInstance to support templates - Start of implementation for templates & specializations - -2003-05-29 John Camelon - Remove all AST components. - -2003-05-26 John Camelon - Rollback PST/Parser integration. - -2003-05-13 Andrew Niefer - Moved symbol table to org.eclipse.cdt.internal.core.pst - Created interface for symbol table: ISymbol, IContainerSymbol, IDerivableContainerSymbol, - IParameterizedSymbol, and ISpecializedSymbol. These are all implemented by Declaration - The symbol table itself uses this interface instead of using its Declaration directly - (with the exception of the undo command framework) - -2003-05-08 Andrew Niefer - Added a basic command structure to support rollbacks - -2003-05-06 John Camelon - Further integration of SymbolTable into Parser, some refactoring. - -2003-05-05 John Camelon/Andrew Niefer - Added Symboltable infrastructure into main parser. - -2003-05-05 Andrew Niefer - Structural changes to ParserSymbolTable: - - moved TypeInfo & Declaration inside ParserSymbolTable - - removed the stack & push/pop/peek - - moved nonstatic add/lookup fuctions from the table to Declaration - - began undo framework: added AddDeclarationCommand - -2003-05-01 Andrew Niefer - Fixed Bug 36287 - Parser failure with new CDT 1.1 parser - Fixed Bug 37011 - Scanner: #define A "//" not properly handled - -2003-04-30 John Camelon - Added some Javadoc to IParser.java and Parser.java. - -2003-04-28 John Camelon - Fixed Bug 37019 - RTS: Parser fails on variable defn using constructor - Fixed Bug 36767 - STL Testing: Parser is confused and goes into template function body - -2003-04-28 John Camelon - Partial fix for Bug37002 - Order of Offsetables is wrong - -2003-04-27 John Camelon - Partial fix for Bug 36932 - RTS: Parser fails on "new" in ctor initializer - Fixed Bug 36704 - Problem parsing Loki's Reference Typelist.h - Fixed Bug 36699 - Problem parsing Loki's Reference SmartPtr.h Impl - Fixed Bug 36691 - Problem parsing Loki's Reference HierarchyGenerators.h Impl - -2003-04-25 Andrew Niefer - Fixed bug36771 - Outline view shows include with no name - Fixed bug36714 - Parser fails on initial assignment using floating-suffix - Revisted bug36816 - Incomplete #include stops outline view - -2003-04-25 John Camelon - Fixed bug36852 - outline window doesn't show all functions - Fixed bug36764 - Bit fields cause parse errors - Fixed bug36702 - Parser error when having function pointers as parameters - -2003-04-24 John Camelon - Fixed Bug36799 STL Testing: Parser fails on Variable Definition - -2003-04-24 John Camelon - Fixed bug36693 - Problem parsing Loki's Reference SmallObj.cpp Impl - Fixed bug36696 - Problem parsing Loki's Reference SmartPtr.h Impl - Improved our error handling robustness. - Fixed bug36713 - Parser fails on definitions of pointers to functions - Fixed Dave's performance test parse failure. - Fixed bug36811 - The using directive causes parser to fail - Fixed bug36794 - ClassCastException for A template with no parameters - -2003-04-24 Andrew Niefer - Fixed Bug36816 Scanner infinite loop on incomplete #include - Fixed Bug36255 Parser hangs/goes infinite - -2003-04-21 John Camelon - Revisited bug36247 Parser confused by symbols #defined elsewhere - Fixed Bug36708 Problem parsing Loki's Reference TypeTraits.h - Fixed Bug36690 Problem parsing Loki's Reference Functor.h Implementation - Fixed Bug36692 Problem parsing Loki's Reference Singleton.h Impl - Fixed Bug36703 Problem parsing Loki's Reference TypeInfo.h Impl - Fixed Bug36689 Problem parsing Loki's Reference AbstractFactory.h Implementation - Fixed Bug36707 Problem parsing Loki's Reference TypeManip.h - -2003-04-21 Andrew Niefer - Fixed Bug36475 - Scanner does not concatenate strings - Fixed Bug36509 - Scanner turns strings into identifiers when expanding macros - Fixed Bug36521 - Scanner gets confused over commas in function like macros - Fixed Bug36695 - Scanner looses escaping on chars (ie '\4' to '4') - -2003-04-20 John Camelon - Fixed Bug36551 Bad parse on attached file. - Partial Fix for Bug36631 remove linear search algorithm from OffsetMapping - Some debunking of line numbers. - -2003-04-17 John Camelon - Fixed error in Elaborated Enumeration Types. - Fixed Bug36559 - Parsing Templates... - Fixed Bug36634 - Enum start line error - -2003-04-16 John Camelon - Fixed Bug36532 - Hang on partial template definition. - Fixed Bug36432 - Trying to open attached source code hangs Eclipse. - Fixed Bug36594 - Parser Stack Overflow on unaryExpression - Fixed Bug36600 - Elaborated Enumerated Types Parse Incorrectly. - -2003-04-15 John Camelon - Fixed bug36434 - Broken outline in winbase.h - Partial Fix for bug36379 - The parser to set Line informations when scanning. - Fixed CModelManager to include header files with .H extension as C++ headers. - Fixed bug36448 - Parser fails for C programs containing C++ keywords as identifiers - -2003-04-15 Andrew Niefer - Added scanner support to fix Bug36047 - -2003-04-13 John Camelon - Minor cleanup of callbacks due to removal of NewModelBuilder. - Added parser support to partially fix bug36416 & bug36294. Also added minimal C-Model support for these fixes. - -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 - Fixed Bug 36243 DomBuilder Offsetable List - -2003-04-10 John Camelon - Fixed Bug36237 Parser fails on casts in ctor initializer. - Added AccessSpecifier to TemplateDeclaration. - -2003-04-10 John Camelon - Updated callbacks and parser to add offset information to template declarations, - thus making TemplateDeclaration implement IOffsetable. - -2003-04-09 John Camelon - Removed all the old Code Model Builder source that was no longer being used (NewModelBuilder.java, etc.). - Moved all the files in parser.util directory to the dom. - Organized imports. - Fixed bug36250 Parser ignores functions with default parameters that have no name. - Fixed bug36240 Parser incorrectly parses operator= - Fixed bug36254 Parser doesn't recognize unsigned as a type by itself. - -2003-04-09 John Camelon - Added timing printout for CModelTests. - Provided partial fix for bug36255 to get past infinite loop, will leave defect open. - Fixed bug36045 (Again). - Fixed bug36287. - -2003-04-06 Andrew Niefer - Added ParserSymbolTable::Cost and used it to fix up the conversion sequence ranking - -2003-04-06 John Camelon - Fixed defect 36073. - Fixed error handling for unterminated strings in Scanner. - Significantly updated callback structure to better suite the nature of the Code Model. - Updated all callbacks and parser to accommodate altered callbacks. - -2003-04-04 John Camelon - Fixed defect 35939. Proper CElement::pos() is set on Simple Declarations, - Class Specifications, Namespaces, Enumerations and Enumerators, Macros and Inclusions. - -2003-04-03 John Camelon - Fixed defects 36019, 36020, 36045. - Finished template declarations and their callbacks for the DOM (not the Code Model). - -2003-04-01 John Camelon - Updated Scanner to convert control-characters to ' '. - Fixed logic error in SimpleDeclarationWrapper. - Added operator support to grammar. - Fixed Name.toString() to support non-qualified yet multi-part names. - -2003-04-01 Andrew Niefer - Parser Symbol Table, modified lookup with respect to resolving ambiguous names, - reducing the number of temporary lists/sets. Modified adding using declarations - to properly support overloaded functions. Added initial support for user defined - conversion sequences when resolving overloaded functions. - -2003-04-01 John Camelon - Fixed bug35906 - Udated Scanner to not puke on certain control characters. - -2003-03-31 John Camelon - Fixed unsigned short SimpleDeclarations not showing up in the outline view. - Fixed default visibilities for structs in outline view. - Fixed bug35892. - Added icon-less typedefs and enums to the outline view. - Fixed NPEs relating to anonymous structs, unions, enums in outline view. - -2003-03-31 Andrew Niefer - Parser Symbol Table, better support for function resolution with pointers and - references as parameters. Also support for typedefs as function parameters - -2003-03-31 John Camelon - Updated NewModelBuilder to work for ElaboratedTypeSpecifiers, PointerOperators, Const Methods. - Fixed bug35878. - -2003-03-31 John Camelon - Updated Scanner to work for Strings literals like L"this string" - Updated Scanner to work for floating points literals. - Updated Scanner to be more forgiving on errors in QuickScan mode. - Got template instantiation and specialization working (w/callbacks and DOM). - Updated Parser/Callbacks for handle pure virtual function declarations. - Added callback support for some template declarations (not all branches). - -2003-03-28 John Camelon - Added AccessSpecifier and ClassKind to parser.util package and refactored callbacks. - Better encapsulated ExceptionSpecification in the DOM. - Updated DOM structures to return unmodifiable collections. - Added callback support for asmdefinitions. - Added callback support for constructor initializer chains. - Fixed bug 35781 and updated parser to catch all exceptions from callbacks to ensure best-effort parsing. - Removed Main.java from Parser package. - -2003-03-26 Andrew Niefer - Moved type information and ParameterInfo from Declaration into util.TypeInfo - Initial implementation of standard conversion sequences for function resolution - -2003-03-24 John Camelon - Added callback support for namespace definitions. - Updated Parser exception hierarchy. - Added callback support for linkage specifications. - Added callback support for using declarations and directives. - -2003-03-23 John Camelon - Added callback support for class member visibility. - Added callback support for pointer and reference operators on declarators. - Added callback support for throws clauses an const operations. - Added callback support for array declarators. - -2003-03-20 Andrew Niefer - Parser Symbol Table updates for: - * friends - * "this" pointer - * enumerators - * Argument dependent lookup - * adding parameters to functions & function overloading - -2003-03-19 John Camelon - Updated Parser method visibility to solidify external interface. - Solved and removed TODO's from Scanner implementation. - Updated Parser and callbacks to handle basic expressions. - -2003-03-18 John Camelon - Updated IParserCallback (and implementations) to add a typeName to DeclSpecifier. - Updated IParserCallback and NewModelBuilder to distinguish between Function declarations and definitions. - -2003-03-17 Doug Schaefer - Changed EOF to be a Backtrack exception instead of a token so simplify - error handling. - -2003-03-13 John Camelon - Moved ## token to IScanner from Scanner. - Updated IParserCallback and implementations to deal with Elaborated Type Specifiers. - Moved IScope into the internal DOM package. - -2003-03-11 John Camelon - added ChangeLog to parser directory - updated IParserCallback (and all implementors) for expressions - removed inheritance relationship between ExpressionEvaluator and NullParserCallback - removed redundant assignmentOperator() calls in Parser::initDeclarator - removed class util.DeclarationSpecifier, merged Container interface into util.DeclSpecifier - organized imports on the parser folder - * dom/org/eclipse/cdt/internal/core/dom/DOMBuilder.java - * dom/org/eclipse/cdt/internal/core/dom/Declarator.java - * dom/org/eclipse/cdt/internal/core/dom/ParameterDeclaration.java - * dom/org/eclipse/cdt/internal/core/dom/SimpleDeclaration.java - * parser/org/eclipse/cdt/internal/core/model/NewModelBuilder.java - * parser/org/eclipse/cdt/internal/core/model/Parameter.java - * parser/org/eclipse/cdt/internal/core/model/SimpleDeclarationWrapper.java - * parser/org/eclipse/cdt/internal/core/parser/ExpressionEvaluator.java - * parser/org/eclipse/cdt/internal/core/parser/IParserCallback.java - * parser/org/eclipse/cdt/internal/core/parser/NullParserCallback.java - * parser/org/eclipse/cdt/internal/core/parser/Parser.java - * parser/org/eclipse/cdt/internal/core/parser/util/DeclSpecifier.java - -2003-03-10 John Camelon - added in support for detecting and reporting circular inclusions - added optimization by caching inclusion directories - added macro pasting capabilities - updated inclusion searching algorithm for local inclusions - -2003-03-07 John Camelon - fixed initDeclarators for the outline view. - -2003-03-06 Doug Schaefer - Some minor fixes to get constructors/destructors parsing as well as some minor clean up and robustness. - -2003-03-06 John Camelon - added quickParse heuristic to Scanner for handling #if conditionals to avoid throwing - ScannerExceptions on undefined preprocessor symbols - added minimal enum support to Parser (though not to DOM or CModel) - -2003-03-06 Andrew Niefer - Implementation of Namespaces & using directives in new parser's symbol table - -2003-03-05 Doug Schaefer - Some minor fixes to the parser. - -2003-03-04 Doug Schaefer - Added Parser in the "parser" source folder in cdt.core - Preference in the C/C++ preference page to enable/disable use of the new parser (disabled by default) - Start on the DOM which we are using to test the parser (source folder "dom") - Start on a new Model Builder for creating CElements using the new parser (currently in source folder "parser") +2004-04-15 David Daoust + Modified Scanner Performance by + 1. Moved ScannerContext sentinal to ContextStack + 2. Delay Stringizing macro parameter until needed + 3. Removed the sentinal from the scanner constructor + + Effect on #include + + total bytes objs time(ms)tokens + orig 59905960 1455079 1593 83812 + move sentinel 53824616 1262428 1462 83812 + delay stringizing 40868312 950355 1322 83812 + remove sentinal 38598848 910909 1312 83812 + +2004-04-15 Andrew Niefer + fixed https://bugs.eclipse.org/bugs/show_bug.cgi?id=58492 + +2004-04-15 John Camelon + Partial fix for https://bugs.eclipse.org/bugs/show_bug.cgi?id=39697 + +2004-04-15 John Camelon + Fixed https://bugs.eclipse.org/bugs/show_bug.cgi?id=58175 + +2004-04-15 Andrew Niefer + fixed https://bugs.eclipse.org/bugs/show_bug.cgi?id=57791 - Parser infinite loop + +2004-04-14 John Camelon + Fixed https://bugs.eclipse.org/bugs/show_bug.cgi?id=52253 + +2004-04-14 John Camelon + Fixed https://bugs.eclipse.org/bugs/show_bug.cgi?id=44249 + Fixed https://bugs.eclipse.org/bugs/show_bug.cgi?id=52004 + +2004-04-14 John Camelon + Fixed https://bugs.eclipse.org/bugs/show_bug.cgi?id=58500 + Fixed https://bugs.eclipse.org/bugs/show_bug.cgi?id=58178 + +2004-04-14 Andrew Niefer + friends in the AST (bugs 45235 & 53759 ) + - added acceptFriendDeclaration to ISourceElementRequestor + - added isFriendDeclaration to IASTAbstractTypeSpecifierDeclaration + - modified isFriend on IASTFunction + - functions, methods & abstractTypeSpecifierDeclarations callback with acceptFriendDeclaration + instead of their normal accept* if isFriend() or isFriendDeclaration() is true. + - added getFriends to IASTClassSpecifier + +2004-04-13 Andrew Niefer + fixed https://bugs.eclipse.org/bugs/show_bug.cgi?id=46246 + modified symbol table sorting to use a collator instead of String.compare() + +2004-04-11 John Camelon + Fixed https://bugs.eclipse.org/bugs/show_bug.cgi?id=55785. + Fix required update to ISourceElementRequestor interface : clients updated accordingly. + +2004-04-11 John Camelon + Updated errorhandling in Parser::translationUnit(). + +2004-04-10 John Camelon + Removed unused methods from IToken. + Restructured Token implementation to be more memory efficient. + Tightened up visibility of different members in the implementation. + Added TokenFactory construct to isolate Token clients from the particulars of which IToken implementation to instantiate. + +2004-04-10 John Camelon + Partial fix for https://bugs.eclipse.org/bugs/show_bug.cgi?id=57898 + +2004-04-09 Andrew Niefer + handle NPE during template argument deduction + fix bug in definitions of certain template member templates (fixes a ClassCastException encountered in ) + +2004-04-09 Andrew Niefer + fixed https://bugs.eclipse.org/bugs/show_bug.cgi?id=57754 + Fixed problems found after parsing iostream with discovered symbols, once 57754 was fixed: + fixed some problems with explicit specializations + handle using declarations of templates + handle typedefs in ASTCompleteParseFactory.queryIsTypeName + fixed instantiating constructors + +2004-04-08 John Camelon + Fixed https://bugs.eclipse.org/bugs/show_bug.cgi?id=57800. + +2004-04-07 John Camelon + Fixed https://bugs.eclipse.org/bugs/show_bug.cgi?id=50808. + Provided partial fix for https://bugs.eclipse.org/bugs/show_bug.cgi?id=50807. + Provided partial fix for https://bugs.eclipse.org/bugs/show_bug.cgi?id=52988. + Introduced EMPTY_STRING, a single constant that replaced > 100'S O literal "" in the code. + Updated IASTCompletionNode interface to provide better support for FUNCTION_REFERENCE and CONSTRUCTOR_REFERENCE. + Implemented IASTTypeId.getFullSignature() for both QUICK_PARSE and COMPLETE_PARSE. + Tweaked ASTNode.lookup() so that it would work for FUNCTION_REFERENCE. + +2004-04-07 Andrew Niefer + fix lookup in parents when the parent is a deferred template instance, enables content assist on list (from ) + +2004-04-07 Andrew Niefer + fix bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=44338 + +2004-04-07 Andrew Niefer + small changes to get through iostream under standard make with discovered symbols + - check null pointer in GCCScannerExtension.handlePreprocessorDirective, the null is probably a symptom of whatever + is giving us an unbalanced preprocessor directive + - catch exceptions during our 3rd attempt at a template argument in ExpressionParser.templateArgumentList + +2004-04-07 John Camelon + Provided a partial fix for https://bugs.eclipse.org/bugs/show_bug.cgi?id=50152 + Updated IExpressionParser::expression() interface necessitated by this fix, and updated its clients appropriately. + +2004-04-06 David Daoust + Removed some temporary objects that the scanner was producing. + Fixed small bug in GCCScannerExtension. + +2004-04-06 Andrew Niefer + Small changes to help with template parsing + - report line numbers with some problems + - don't throw on SEMANTIC_INVALID_TYPE while doing templates + - handle some NPEs + +2004-04-06 Andrew Niefer + fix bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=47625 + +2004-04-06 John Camelon + Fixed https://bugs.eclipse.org/bugs/show_bug.cgi?id=39704 + Fixed https://bugs.eclipse.org/bugs/show_bug.cgi?id=29060 + +2004-04-06 John Camelon + Fixed https://bugs.eclipse.org/bugs/show_bug.cgi?id=47797 + +2004-04-05 Andrew Niefer + - performance improvements originally from Dave Daoust: + - create new TraceUtil to handle logging trace messages + - postpone building Problem message until it is asked for + - only ask for problem message if it will actually be traced + - added more problem strings for problems coming from the symbol table + - added CompleteParseASTFactory.shouldThrowException, so we can ignore certain problems + encountered while parsing templates + - fix NPEs caused by bad type info objects + +2004-04-05 John Camelon + Fixed NPE in CompleteParseASTFactory::createUsingDeclaration(). + +2004-04-05 John Camelon + Fixed https://bugs.eclipse.org/bugs/show_bug.cgi?id=54029 + +2004-04-04 John Camelon + Fixed https://bugs.eclipse.org/bugs/show_bug.cgi?id=56516 + Fixed https://bugs.eclipse.org/bugs/show_bug.cgi?id=53786 + +2004-04-02 Andrew Niefer + - partial handling template explicit instantiations + - bug 56834 - Symbols not available until end of parameter list, fixed for templates using temporary code block + - change IASTFactory.createTemplateParameter to take an IASTTypeId for the default value + - handle instantiating templates using default value that is a deferred instance + +2004-04-02 John Camelon + Updated SelectionSearch to work for functions, variables with initializers, etc. + Fixed https://bugs.eclipse.org/bugs/show_bug.cgi?id=39705 + Fixed https://bugs.eclipse.org/bugs/show_bug.cgi?id=44336 + Fixed https://bugs.eclipse.org/bugs/show_bug.cgi?id=36770 + Partial fix for https://bugs.eclipse.org/bugs/show_bug.cgi?id=51428 + Fixed https://bugs.eclipse.org/bugs/show_bug.cgi?id=39694 + +2004-03-30 John Camelon + Partial fix for Bug 56614 - Content Assist] Global variables do not appear in a global completion list + +2004-03-29 Andrew Niefer + fixed bug 56620 - Outline view stops on error on last line of block + (errorHandling() goes to far) + +2004-03-29 John Camelon + Fixed Bug 56517 - Preprocessor skipping doesn't ignore the contents of string literals. + +2004-03-28 John Camelon + Remove warnings. + +2004-03-26 Andrew Niefer + - handle template template parameters + +2004-03-26 Andrew Niefer + -report references to symbols used in a template-id. + + + +2004-03-25 Andrew Niefer + -modify IASTFactory.createField & .createVariable to take ITokenDuple's for the name + -modify ITokenDuple to support manipulating TokenDuples that have template arguments in them + -fix NullPointer & ClassCast exceptions found while parsing + +2004-03-25 Hoda Amer + Joined effort with Bogdan: Added a parserTimeout() method to ISourceElementRequestor + and the ability for the parser to timeout. + +2004-03-23 Andrew Niefer + -fix recursive loop leading to StackOverFlowException during template instantiation + -fix copy constructors for templated classes + -fix bug 55673 + +2004-03-22 Andrew Niefer + -handling of Typedefs + -handle unbalanced preprocessor condition in scanner + -fix concurrent modification exception while processing unresolved references in a Class Specifier + -report correct owner class for templated methods + -some work on template explicit specializations + -handle templated class forward declarations + +2004-03-18 Andrew Niefer + parsing template-ids: enables clas template partial specializations and fixes 54778 indirectly + - add ITokenDuple.getTemplateIdArgLists + - Added ExpressionParser.templateArgumentList & ExpressionParser.consumeTemplateArguments + - modifications to ExpressionParser & Parser to parse template argument lists + - modified lookups to lookup with template-id if the token duple has argument lists + - modified TemplateFactory to handle partial specializations + +2004-03-17 Andrew Niefer + fix bug 55163 + - in for-init-statement, try expression-statement before simple-declaration since if it actually is a statement instead of a + declaration, the simple-declaration fails hard and can actually enter an infinite loop. + +2004-03-16 Dave Daoust + refactor scanner for performance improvements + -changes to accountForUndo, now named readFromStream + -changes to checking for valid macros + +2004-03-15 Andrew Niefer + Templates: + - added ISourceElementRequestor.acceptTemplateParameterReference + - added throws ASTSemanticException to IASTFactory.createTemplateDeclaration & createTemplateParameter + - IASTTemplateDeclaration extends IASTScope, IASTTemplateParameter extends ISourceElementCallbackDelegate + - modified DeclarationWrapper.createASTNode & createMethodASTNode to handle member templates + - Add functionality to ASTTemplateDeclaration + - implemented CompleteParseASTFactory.createTemplateDeclaration & createTemplateParameter + - changes to symbol table to make it easier for the parser to use + +2004-03-12 Andrew Niefer + handle case causing NPE in CompleteParseASTFactory.createElaboratedTypeSpecifier + +2004-03-12 Andrew Niefer + bug 54639 fix NPE in CompleteParseASTFactory.cloneSimpleTypeSymbol + +2004-03-11 John Camelon + Refactoring of Scanner to allow reuse in GCCScannerExtension + +2004-03-10 John Camelon + Further performance improvements in Scanner. + +2004-03-09 Andrew Niefer + bug 52948 + modified CompleteParseASTFactory.createTypedef() to set the typeSymbol of the typedef symbol + modified TypeFilter to handle LookupKind.TYPES and LookupKind.TYPEDEFS + +2004-03-09 John Camelon + Put back the work to reconcile relative paths w/IResource readers which was lost upon merge. + +2004-03-09 Dave Daoust + Removed the Strings associated with constant value tokens and keywords -- it looks cleaner, and reduces the number of objects created (only by 30 to 40 K) (about 2% quicker) + Buffered the File I/O associated with reading inclusions. + Restructured the scanner into a large case statement with a few + helper functions -- this is the start of removing the strings (or + providing a preallocated buffer for string manipulation) (about 2% quicker) + +2004-03-04 Andrew Niefer + bug 53213 externalize strings + +2004-03-03 John Camelon + Refactored parser for further content assist work. + +2004-03-03 John Camelon + Added some trace statements to CompleteParseASTFactory. + Cleaned up usage of Enum.getValue() wrt encapsulation of enumerator value. + Refactored CompleteParseASTFactory for correctness and abstraction. + Added preliminary IProblem support to CompleteParseASTFactory. + Added (commented out unfortunately) assertions into CompleteParseASTFactory. + Updated IASTUsingDeclaration to return an Iterator for declarations mapped rather than just a single declaration. + +2004-03-01 Andrew Niefer + bug 52695 : ast.complete.IASTClassSpecifier#getDeclarations returns an empty iterator + - take ASTNode.SymbolIterator and move it to org.eclipse.cdt.internal.core.parser.ast + - hook up ASTScope.getDeclarations to IContainerSymbol.getContentsIterator() using SymbolIterator + - create ExtensibleSymbol to implement IExtensibleSymbol and derive BasicSymbol, UsingDeclarationSymbol and UsingDirectiveSymbol from it. + + +2004-02-26 Andrew Niefer + mark strings that don't need to be externalized for translation + +2004-02-25 Bogdan Gheorghe + Added a check to make sure that the parser is in the top context before throwing + an EOF exception in SeletionParser. + +2004-02-25 John Camelon + Fixed Bug 43051 : Search: cannot specify relative search paths + Fixed Bug 45140 : refactor IScanner to allow use of Readers of IResource + +2004-02-25 John Camelon + Updated Scanner to allow for invalid identifier names despite C++'s best efforts at maintaining its honour. + +2004-02-24 John Camelon + Refactoring Scanner.handleInclusion to be more modular. + +2004-02-24 Andrew Niefer + Template Explicit Specializations (bug 51485) + adding basic symbol table functionality for non-nested template specializations + +2004-02-24 John Camelon + Fixed https://bugs.eclipse.org/bugs/show_bug.cgi?id=52823 + +2004-02-24 John Camelon + Partial Fix for Bug 52534 - Selection Search offset limit reached is broken + +2004-02-18 Andrew Niefer + added IUsingDeclarationSymbol and UsingDeclarationSymbol + changed IContainerSymbol.addUsingDeclaration to return a IUsingDeclarationSymbol + +2004-02-17 Andrew Niefer + bug 52111 : added IContainerSymbol.removeSymbol() which is implemented as ContainerSymbol.removeSymbol() + +2004-02-16 Andrew Niefer + bug 52120 document symbol table use of ParserSymbolTableException + also clean up a couple of exceptions + +2004-02-12 Andrew Niefer + Fixed up symbol table handling of const & volatile + fixed bug 47628 - signed char is parsed as char + fixed bug 47636 - char* and char[] are treated as different types + fixed bug 45697 - Parser/Symbol table: Mismatched declaration & definition + +2004-02-12 John Camelon + Removed IASTCompletionKind.SCOPED_REFERENCE as it was obsolete. + Did preliminary work to support content assist within qualified names. + +2004-02-11 John Camelon + Restructured Parser implementation to allow for better support of Selection Search. + Restructured Parser implementation to allow for separation between parsing expressions (Scanner) and complete C/C++ source. + +2004-02-10 John Camelon + Workaround for Bug 51502 - Parser spins on particular file (Scalability) + +2004-02-10 Andrew Niefer + Templates in the symbol table (org.eclipse.cdt.internal.core.parser.pst) + ITemplateFactory.java + ITemplateSymbol.java + DeferredTemplateInstance.java + ParserSymbolTableError.java + TemplateEngine.java + TemplateFactory.java + TemplateSymbol.java + Most of the other main symbol table files (BasicSymbol, ContainerSymbol, etc) were modified + +2004-02-10 John Camelon + Fixed Bug 51302 - Content Assist: No completion list available following namespace declaration. + +2004-02-10 John Camelon + Refactored Parser.java to allow inline small functions and tightened the signatures for statement(). + Refactored Scanner.java to allow for data to be encapsulated to allow for IScannerExtension to act upon it. + Partially fixed Bug 47628 - signed char is parsed as char (affects the outline view) + +2004-02-08 John Camelon + Added support for inline method x-references. + Fixed Bug 44340 - Inline functions fail to resolve references + Fixed Bug 51243 - Content Assist in an empty document causes a NPE + +2004-02-06 Andrew Niefer + fixed bug51260 - Content Assist: Completion inside a class method silently fails with a ClassCastException + filter symbols without attached AST nodes out of the completion results so the iterator doesn't sometimes return null. + +2004-02-04 John Camelon + Added preliminary (crude) bSelectionParser IParser implementation for SELECTION_PARSE clients. + +2004-02-01 John Camelon + Added CompletionKind.UNREACHABLE_CODE to IASTCompletionNode. + Updated Scanner to handle unreachable code scenarios in content assist. + Added Directives class to centralize preprocessor directive strings. + Added keyword completion for preprocessor lines that start with #. + +2004-01-30 John Camelon + Partial fix for Bug 47752 - Outline does not recognize functions with full body try/catch blocks + +2004-01-30 John Camelon + Updated Scanner to allow for more robust completion in #if directives. + +2004-01-30 John Camelon + Fixed Bug 50487 - Wrong completion kind and prefix after "#ifdef" + +2004-01-29 Hoda Amer + Removed CompletionKind.KEYWORD. + +2004-01-29 John Camelon + Fixed 50642 - Wrong completion kind when declaring an argument type + Updated using declarations for more accurate keywords and closure. + +2004-01-29 Hoda Amer + Put CompletionKind.FUNCTION_REFERENCE back. + +2004-01-28 John Camelon + Fixed Bug 50821 - Freezes when opening / saving .c file + +2004-01-28 John Camelon + Fixed Bug 50711 - Wrong completion kind in a new expression + +2004-01-28 John Camelon + Updated Scanner to add ANSI built-in defined macros for C and C++. + Updated GCCScannerExtension to add GCC specific defined macros for C++. + Added factory infrastructure to allow for C/C++ dialect extensions to be added and contained. + Added IASTExpressionExtension w/implementation to allow for GCC specific leniency on evaluating expressions. + +2004-01-28 Andrew Niefer + Fixed bug#50729: Visibility is incorrectly decided in inheritance + +2004-01-27 John Camelon + Refactored parser to allow for cleaner content assist implementation. + Removed IASTCompletionNode.CompletionKind.STATEMENT_START as it is redundant. + Fixed bug 50640 - Wrong completion kind when expecting an exception + Fixed bug 50471 - Wrong completion kind after the "using" keyword + Fixed bug 50621 - Wrong completion kind in a class declaration + +2004-01-17 Hoda Amer + Added IASTCompletionNode.CompletionKind.New_Type_Reference + for a completion kind after a new expression. + +2004-01-27 Andrew Niefer + Updates to handle _Bool + - modified CompleteParseASTFactory.getParameterTypeInfo + CompleteParseASTFactory.createReference + CompleteParseASTFactory.usualArithmeticConversions + CompleteParseASTFactory.getTypeKind + Parser.typeId + TypeFilter.shouldAccept + TypeInfo.equals + +2004-01-26 John Camelon + Added traceLogs into Scanner. + Fixed Bug 46402 : expression evaluation error on branch not taken + Added beginning of IScannerExtension and GCCScannerExtension support for gcc specific aspects. + Added separate Scanner log category for tracing and updated clients to use it. + +2004-01-26 Andrew Niefer + Handle the C types _Complex, _Imaginary, _Bool, & long long int: + modified ParserSymbolTable.promotion() & conversion() + added TypeInfo.isLongLong + modified TypeInfo.canHold() + +2004-01-23 John Camelon + Added support for content assist in the scanner.. + +2004-01-22 John Camelon + Added token, scanner and problem subpackages to org.eclipse.cdt.internal.core.parser. + +2004-01-22 Hoda Amer + Solved a small problem in the ASTCompleteParseASTFactory sent to me by Dave. + +2004-01-20 John Camelon + Added traceLog() call into Scanner.handleProblem() and updated ParserFactory.createPreprocessor() for extra error handling. + +2004-01-20 John Camelon + Tidied up Scanner implementation for unused fields, inefficient String manipulations and redundant parameters. + +2004-01-19 John Camelon + Added IToken.getLineNumber() to facilitate adding line numbers to AST. + Added line number support into IASTOffsetableElement. Updated all implementations to use this. + Updated Parser and IASTFactory to populate IASTOffsetableElement with the values retrieved from IToken. + Removed IScanner.getLineNumberForOffset(). + +2004-01-16 Andrew Niefer + Created IExtensibleSymbol, which is a new base class for the symbol interfaces + Created IUsingDirectiveSymbol and UsingDirectiveSymbol + Modified ASTUsingDirective to use IUsingDirectiveSymbol + Modified CompleteParseASTFactory.createUsingDirective + Added IContainerSymbol.getContentsIterator() + Implemented getContentsIterator in ContainerSymbol + +2004-01-16 John Camelon + Changed IASTNode.LookupException to IASTNode.LookupError. + Updated IASTElaboratedTypeSpecifier to remove redundant extends relationships. + +2004-01-15 Andrew Niefer + Modified symbol table constructor to take a ParseMode as a parameter. + Modified symbol table to use a TreeMap instead of HashMap when ParseMode is CONTEXTUAL_PARSE + Modified ASTNode.lookup to throw ASTNotImplementedException if called when ParseMode is not CONTEXTUAL_PARSE + +2004-01-15 Hoda Amer + +2004-01-15 John Camelon + Renamed IASTNode.LookupResult IASTNode.ILookupResult. + Introduced new ParseError exception for contextual parse() methods. + Renamed ParserFactoryException ParserFactoryError. + Replaced ParserNotImplementedException with a variant of ParseError. + Updated IScanner & IParser to not reference OffsetLimitReachedException explicitly. + Renamed ParserMode.CONTEXTUAL_PARSE to COMPLETION_PARSE. + Cleaned up IMacroDescriptor and made Scanner definitions table consistent. + Added IScanner.getDefinitions() to return the entire Map of definitions to a client. + Removed most of the warnings from parser source directory. + Removed the unused SyntaxErrorException. + Provided partial fix for Bug 44370 IASTMacro requires more information for clients. + +2004-01-12 John Camelon + Fixed bug 48909 - Wrong completion node after a . or an -> + Fixed bug 49702 - Wrong completion kind sent in const/dest and code blocks + Added new CompletionKind - STATEMENT_START to indicate the beginning of a statement line. + +2004-01-08 Andrew Niefer + fixing bug 43110 - Parser support needed for functions with ellipses + Added IParameterizedSymbol.setHasVariableArgs() & hasVariableArgs() + Modified ParserSymbolTable.resolveFunction & reduceToViable + Modified CompleteParseASTFactory.createMethod & createFunction + +2004-01-08 Andrew Niefer + Fixing 48307 - PST: Friendship needs to be handled better + Added IDerivableContainerSymbol.lookupFunctionForFriendship. + Modified IASTFactory.createMethod to take an ITokenDuple for the method name. + Added LookupType.FORFRIENDSHIP and use it in LookupElement. + Modified CompleteParseASTFactory.createMethod to handle friend functions. + +2004-01-06 Andrew Niefer + For Content Assist, support lookup using LookupKind.THIS (lookup in the class of the this pointer ) + Fix bug where forward declared method/functions appeared twice in the content assist lookup results. + +2004-01-06 John Camelon + Renamed IToken::tELIPSE to IToken::tELLIPSIS + Partially fixed Bug 43110 : Parser support needed for functions with ellipses + +2004-01-05 John Camelon + Removed warnings. + Moved StructuralParseCallback from model to parser directory to facilitate building the parser standalone. + +2003-12-31 Hoda Amer + - Changed ASTUtil.getType to include parameter initializer clause in returned string. + +2003-12-22 Hoda Amer + Content Assist Work : Returned the results size of the IASTNode lookup + to help in determining the scope relevance + - Added the variable type to a search match result to be compatible with the + results found by the completion engine + +2003-12-17 Andrew Niefer + Content Assist work: + - change parser & symbol table to handle handle friend classes + - change visibility filtering to check for friendship + - fix finding function parameters in prefix lookup + +2003-12-17 Hoda Amer + Content Assist work : Integrated with Parser and Symbol table modifications + +2003-12-15 Andrew Niefer + Changed IASTNode.lookup to take the context as a parameter + created ASTNode to implement IASTNode, ASTSymbolOwner extends it. + Set Completion Scope for statements + Set Completion context for . and -> expressions + +2003-12-15 Hoda Amer + Fixed [Bug 47234] new ParserMode required for a better CModel : + - Added a core plugin preference to build the CModel in Structural mode + - Added StructuralParseCallBack class + - Added lists of declarations to AST Scopes in the complete AST + +2003-12-12 John Camelon + Added preliminary keyword support into IASTCompletionNode::getKeywords(). + Refactored parser to put keyword string literals in one utility class. + +2003-12-11 John Camelon + Added OffsetLimitReachedException and restructured Parser exceptions. + Continued support for code assist/selection search parser. + Ensured all source in parser/ have copyright notices. + +2003-12-09 Andrew Niefer + -created TypeFilter to support support filtering of what kind of symbols to find (for prefix lookup 48306) + -added IContainerSymbol.isVisible for bug 48294 + +2003-12-09 Hoda Amer + Modified IASTCompletionNode.CompletionKind + modified IASTNode.LookupKind + Changed IASTScope to extend IASTNode + +2003-15-09 John Camelon + Fixed Bug 47234 : new ParserMode required for a better CModel + Updated IASTCompletionNode to include a scope as well as a context. + Begun parser updates to support code assist & selection search. + +2003-12-05 John Camelon + Broke the Parser up into separate classes per ParserMode. + +2003-12-04 John Camelon + Removed some warnings. + Fixed Bug 39678 : Scanner doesn't support concatenation of different-type string literals (GCC) + Refactored ScannerContext to use constructors rather than initializers. + Refactored IScannerContext to use enumeration-esque kinds. + Added code assist/selection search support to Scanner. + +2003-12-03 Andrew Niefer + - Symbol table - modify prefix lookup handling of ambiguities + - fix up qualified lookup + - add IContainerSymbol.lookupMethodForDefinition + - Parser - modify Complete parse AST factory to use the correct lookups in different situations + - Created a LookupType enum to specify what kind of lookup is needed (Qualified, unqualified, for definition) + + +2003-11-27 Andrew Niefer + fix bug 47264: Parse fails when using struct s foo; and int s; in function bodies + +2003-11-18 Andrew Niefer + Refactor PST: Split Declaration into 4 classes : ContainerSymbol, DerivableContainerSymbol, ParameterizedContainerSymbol, + SpecializedSymbol. Move these along with BasicSymbol & TemplateInstance to no longer be nested in ParserSymbolTable. + +2003-11-13 Hoda Amer + Changed the getExpressionResultType() in the complete factory to return + an object of type ExpressionResult. + Solved bug#44342: Failure to dereference function calls after a . or an -> + +2003-11-07 John Camelon + Fixed Bug 39554 : _Pragma directive is not supported (ANSI C99) + +2003-11-06 John Camelon + Removed one last remainder of core.model.Util in parser to unbreak 2.0 build. + +2003-11-05 John Camelon + Fixed Bug 44838 : exception when resolving parameter references in a constructor + Fixed Bug 46165 : fields referenced in constructor chains are not called back upon + Fixed Bug 45551 : Macro replacement in #include directives + +2003-11-05 John Camelon + Cleaned up the ParserFactory interface to check for validity of input arguments. + Moved NullSourceElementRequestor and ScannerInfo to public interface as requested. + Restructured code so that no Eclipse/CDT source outside the parser source directory is used. + Updated parser clients to use new ParserFactory (stand-alone parser work item). + +2003-11-05 John Camelon + Removed warnings from parser source tree. + Removed preliminary task tags support to clean up parser interfaces and implementation. + Added preliminary IProblem support to + +2003-11-03 John Camelon + Added in preliminary interface for code completion mode. + +2003-10-28 Andrew Niefer + Fixed Bug 44925 : Search: Elaborated type specifier + Patially fixed Bug 44510 : C/C++ Search gives wrong results + +2003-10-24 John Camelon + Fixed Bug 45476 : preprocessor macro "defined" not handled correctly + Fixed Bug 45477 : macro redefines prevent further parsing + +2003-10-24 John Camelon + Fixed Bug 39542 : Parser fails on 'struct' parameter types + Fixed Bug 39549 : Designated initializers are not supported (ANSI C99) + Fixed Bug 39551 : Complex and imaginary numbers are not supported (ANSI C99) + +2003-10-21 John Camelon + Fixed Bug 40007 : Parser reports success when it fails + Fixed Bug 44305 : Scanner/preprocessor fails on conditionals using hexidecimal + Fixed Bug 41935 : parser provides wrong name on namespace aliases + Fixed Bug 39525 : Parser fails on expressions that take address of overloaded operators + Fixed Bug 45287 : Scanner does not accept character sequence literals + Fixed Bug 36550 : Error recovery with unterminated string is weak + Fixed Bug 41063 : Remove unused K&R C support from ANSI Parser + Fixed Bug 39528 : Function try-blocks are not supported by the parser (ANSI C++) + Fixed Bug 39538 : Parser fails on explicit instantiation of templated operators + Fixed Bug 39536 : Parser fails on templated constructors/conversion operators + Refactored Scanner to make it easier to debug. + +2003-10-01 John Camelon + Fixed Bug 43987 : Search results: Declaration of class not highlighted when selected + Fixed Bug 43997 : Search results: selection includes preceding whitespace + Fixed Bug 44034 : Scanner failure on #undef + +2003-10-01 Andrew Niefer + bug43951 - search on ctor declarations returns definition too. + PST changes: + - modify lookupConstructor to copy the constructor list before resolving on it + - modify checkUserDefinedConversionSequence the same way + - modify isValidFunctionOverload to check for forward declarations + +2003-10-01 Bogdan Gheorghe + Modified CDT log dump in Parser.fetchToken to include error message + +2003-10-01 Andrew Niefer + bug43450 - Scanner needs to handle include paths that contain quotes + +2003-09-30 Bogdan Gheorghe + Added CDT log dump in Parser.fetchToken to catch HandleInclusion failures + +2003-09-30 John Camelon + Fixed Bug 43503 : Search:f_SD_01 cannot be found in ManyClasses20 Project + Fixed Bug 43680 : Fix Parser Error Handling + +2003-09-30 Hoda Amer + -Solution to [Bug 43053] require reference cleanup for expressions + Added purgeReferences() at the end of ASTExpression::acceptElement() + +2003-09-30 Andrew Niefer + PST changes for bug 43503 - parser needs to know the different between ambiguous functions + and no functions when no parameter information is provided + - throw r_UnableToResolveFunction if we have more than 1 function and no parameter info was given + - handle this case in addUsingDeclaration. + * note that r_UnableToResolveFunction doesn't necessarily mean ambiguous if we had enough information + +2003-09-29 Hoda Amer + Solution to bug#43679 : Exceptions in indexer + +2003-09-29 Andrew Niefer + fixed bug 43834 : Empty Parameter list and parameter list taking one void do not match + +2003-09-29 John Camelon + Continued work on Bug 43062 : Outline is confused on operator methods containing spaces + Partial fix for Bug 43680 : Fix Parser Error Handling + +2003-09-26 John Camelon + Fixed Bug 43644 : 6 triangle icons appearing in outline viewer when typing an error + Fixed Bug 43062 : Outline is confused on operator methods containing spaces + Fixed Bug 39531 : Problems with type conversion operators + +2003-09-25 Hoda Amer + - Last part of solution to bug#42453: Expression result types not computed + Added the handling of POSTFIX_TYPENAME_IDENTIFIER + Completed bug#43221: POSTFIX_TYPENAME_IDENTIFIER not implemented + - Solution to bug#43644 : 6 triangle icons appearing in outline viewer when typing ... + +2003-09-24 Hoda Amer + Partial solution to bug#42453: Expression result types not computed + Added the handling of the NEW_TYPEID, CASTEXPRESSION, POSTFIX_DYNAMIC_CAST, + POSTFIX_REINTERPRET_CAST, POSTFIX_STATIC_CAST, and POSTFIX_CONST_CAST + +2003-09-25 John Camelon + Partial fix for Bug 43221 : POSTFIX_TYPENAME_IDENTIFIER not implemented + +2003-09-24 John Camelon + Fixed Bug 43106 : Symbol Table support needed to resolve types + Fixed Bug 43375 : isExtern not returning true for extern declarations + +2003-09-23 John Camelon + Fixed Bug 43084 : need to restructure TypeId to allow dynamic_cast<> type expression references. + Fixed Bug 39504 : sizeof-expressions are not handled properly + +2003-09-23 Hoda Amer + Solution to bug#43373: No reference to static member in definition + Solution to bug#43371: constructor incorrectly marked private + +2003-09-18 Andrew Niefer + - modified Symbol table interfaces to use Lists & Maps instead of LinkedList and HashMap + - fixed warnings in ParserSymbolTable + - fixed bug43106 - Symbol Table support needed to resolve types + - fixed bug43156 - require ability to add implicit inheritance copy constructor + - fixed bug43159 - TypeInfo.equals() not working properly + - fixed bug43238 - Postfix_Subscript expressions confuse function resolution + +2003-09-16 Andrew Niefer + - added setThrowExceptionOnBadCharacterRead to IScanner to help with wildcard bug43063 + +2003-09-17 Hoda Amer + In completeParseASTFactory.getExpressionResultType(): Added the support + for expression types: PM_DOTSTAR, PM_ARROWSTAR, CONDITIONALEXPRESSION + +2003-09-16 John Camelon + Implement CompleteParse IASTFunction::previouslyDeclared(). + +2003-09-16 Hoda Amer + In completeParseASTFactory.getExpressionResultType(): Added the support + for expression type PRIMARY_THIS. + In createMethod(): changed the scope of a method definition to point to + the parent class. + +2003-09-15 John Camelon + Fixed Bug 39556 : 'restrict' qualifier is not supported (ANSI C99) + Fixed Bug 43126 : ISourceElementRequestor.acceptParameterReference accesses internal class + Fixed Bug 43062 : Outline is confused on operator methods containing spaces + Cleaned up some warnings in the parser. + +2003-09-15 Andrew Niefer + bug43106 - added getConditionalOperand to ParserSymbolTable + +2003-09-15 John Camelon + Partially fixed Bug 42979 : Cannot search for operator overloaders + +2003-09-12 Hoda Amer + In completeParseASTFactory.getExpressionResultType() + - Added the handling of some more expression types. + See CompleteParseASTExpressionTest for details. + +2003-09-12 John Camelon + Fixed Bug 42985 : Search: Qualified function call is treated as a declaration + Fixed Bug 40419 : parser fails on heavily templated expressions + +2003-09-12 John Camelon + Fixed Bug 43013 : IASTParameterDeclaration does not derive from IASTOffsetableNamedElement + +2003-09-12 Andrew Niefer + Fixed some NPEs in ParserSymbolTable.getFlatTypeInfo + Added some comments and created some constants to help clarify ranking of conversion sequences + +2003-09-11 John Camelon + Fixed Bug 42840 : Search: Cannot find things after double declarations + Fixed Bug 42798 : Selected #include off by 1 char + Fixed Bug 42872 : dynamic cast not parsed properly + Partially fixed Bug 39504 : sizeof-expressions are not handled properly + Updated SourceElementRequestor callbacks to include IASTParameterReference callbacks. + +2003-09-09 Hoda Amer + - Solved the double reference problem + - solution to bugs #42822, #42823, & #42822B + +2003-09-09 John Camelon + Updated ScannerException to be more precise and include more information. + Updated Parser to be more careful of how it handles particular Scanner errors in COMPLETE_PARSE mode. + +2003-09-08 Bogdan Gheorghe + Added ScannerExceptions in Preprocessor.java to PDE Error + Log + +2003-09-09 Hoda Amer + Added more IASTExpression.Kind handling to CompleteParseASTFactory.getExpressionResultType() + +2003-09-08 John Camelon + Made scoping support more robust in CompleteParse mode. + Refactored ISourceElementRequestor (enter|exit)CodeBlock() to take IASTCodeScope rather than IASTScope. + Removed the now obsolete DOM. +` Added enumerator references to ISourceElementRequestor. + +2003-09-08 Andrew Niefer + - Created ParserLanguage.java + - Updated Factories to take language as parameter when create scanner & parser + - Updated Parser, Scanner & ParserSymbolTable to take language in their constructor + +2003-09-05 Hoda Amer + - Added references to variables with pointers in solution + of bug#42453:Expression result types not computed + + +2003-09-05 John Camelon + Continue to add support for parsing within function bodies. + Add workaround for 1.2 for inline function declaration-before-use chicken-and-egg. + +2003-09-05 John Camelon + Fixed NPE on nested declarations in code blocks. + +2003-09-04 John Camelon + First pass of parsing function bodies with X-Reference information. + Updated IASTFactory/ISourceElementRequestor to include IASTCodeScope + constructs, clients should keep this in mind and update their implementations. + +2003-09-04 Andrew Niefer + Fix bug42541 - Anonymous structures cause NPE in full parse + +2003-09-03 Andrew Niefer + fix bug in PST that prevents > 2 constructors + +2003-09-03 John Camelon + Fixed bug41445 - QualifiedLookup succeeds where it should fail. + +2003-09-02 Andrew Niefer + bug41935 - Modifications to PST to allow for namespace aliases + +2003-08-28 John Camelon + Fixed bug39535 - Parser fails on namesapce aliases + +2003-08-26 Bogdan Gheorghe + Added parser constant to all debugLog tracing statements. + +2003-08-25 John Camelon + Fixed bug39526 - Parser doesn't handle initializers correctly. + Fixed bug41520 - FullParse : Constructor Initializer is mistaken as function prototype + +2003-08-25 John Camelon + Fixed Bug 39530 - More problems with initializers. + Fixed Bug 37424 - Crash when opening big files + Refactored pointerOperators & cvQualifiers to not throw backtracks in optional case. + Added tracing support to cdt.core plugin via .options file. + +2003-08-14 John Camelon + Removed warnings from SymbolTable & QuickParseCallback (removing implicit accessor generation). + Made IASTElaboratedTypeSpecifier derive from IASTOffsetableNamedElement (as it should). + +2003-08-14 John Camelon + Added X-Reference support for ArrayModifiers and Exception Specifications. + Fixed Bug 41551 - HandleInclusion always throws ScannerException on local includes. + +2003-08-13 John Camelon + Added constructor expression support for variables. + Added constructor chain x-reference support for methods. + +2003-08-13 John Camelon + Added Expression x-reference support into Parser. + +2003-08-12 John Camelon + Added X-Ref/Elaborated type support w/element requestor callbacks. + +2003-08-11 John Camelon + Added Complete Parse support for ASM Definitions. + Added isVolatile() to abstract declarations. + Added Complte Parse support for elaborated types / forward declaration of classes. + Fixed some robustness issues. + +2003-08-05 Andrew Niefer + - Refactor symbol table functions to start with lower case letters + - Added better constructor support : + IDerivableContainerSymbol.addConstructor + IDerivableContainerSymbol.lookupConstructor + IDerivableContainerSymbol.getConstructors + - Changed ParserSymbolTableException.r_Unspecified to r_InternalError + - implicit user-defined conversion sequences now only use constructors not marked explicit + - user-defined conversion sequences are now only applied at most once (12.3-4 in spec) + +2003-07-31 Andrew Niefer + Added better support to the parser symbol table for forward declarations + +2003-07-31 Victor Mozgin + Fixed PR 39540 : Parser fails on const qualifier after class specifier. + +2003-07-30 Victor Mozgin + Fixed PR 39532 : Parser fails on fully-qualified class names. + +2003-07-29 John Camelon + Updated AST to better represent pointers to functions/methods. + Implemented typedef declaration/x-ref infrastructure. + +2003-07-29 Victor Mozgin + Fixed PR 39546 : Parser fails on 'signed' casts. + +2003-07-28 John Camelon + Fixed Bug 40842 - Parser: NPE while parsing class declaration in full parse mode + Fixed Bug 40843 - Parser: failParse doesn't set parsePassed = false on EOF. + Fixed Miscellaneous overrides issues involving parameters & functions. + +2003-07-28 John Camelon + Fixed Bug 40730 : Parser is not searching the include path for #include"" + +2003-07-28 Victor Mozgin + Fixed PR 39537 : Parser fails if template parameters contain '>' or '<' characters. + +2003-07-25 Victor Mozgin + Fixed PR 39553 : Macros are not expanded in #include statements. + +2003-07-24 John Camelon + Added COMPLETE_PARSE support for Method and Field declarations and cross-references. + Fixed some small ParserSymbolTable bugs. + Added support for linkage specification under COMPLETE_PARSE. + +2003-07-24 John Camelon + Added CompleteParse - UsingDirective & UsingDeclarations w/namespace/class/field variable references. + Added CompleteParse support for enumeration specifiers and references in variables & fields. + Stubbed out other Scopes/Declarations for COMPLETE_PARSE mode to allow indexer team to switch over ASAP. + +2003-07-22 John Camelon + Added in preliminary support for Field/Variable w/cross references on their types. + +2003-07-21 John Camelon + Addded in support for BaseSpecifier & class/namespace reference callbacks upon those. + +2003-07-21 John Camelon + Fleshed out basic declarations for FullParse AST. + Fixed Bug 40554 - Fields coming back as Vars + Fixed Bug 40555 - Methods come back as Functions + +2003-07-18 John Camelon + Added ISourceElementCallbackDelegate interface for AST constructs to allow the Parser to delegate callback's to the nodes themselves. + Got rid of ParserMode.STRUCTURAL_PARSE for the time being. + Removed org.eclipse.cdt.internal.core.parser.ast.full. + Created org.eclipse.cdt.internal.core.parser.ast.complete. + Updated ParserFactory.createScanner() to force the user to provide a callback and a ParserMode. + Introduced ASTSemanticException for COMPLETE_PARSE mode. + Fleshed out preliminary IASTReference interfaces and added callbacks to ISourceElementRequestor. + Removed acceptElaboratedTypeSpecifier() from ISourceElementRequestor. + +2003-07-18 John Camelon + Removed DeclaratorDuple as it was obsolete. + Fixed offsets in quickParse's IASTTypedefDeclaration implementation. + Fixed Bug 40436 - Fully Qualified Names Needed (for Indexer/Search features) + +2003-07-17 John Camelon + Removed IParserCallback. + Partially converted DOM to ISourceElementRequestor (requires refactoring of CModelBuilder & StuctureComparator modules in near future). + Completely finished ISourceElementRequestor/IASTFactory work for QuickParse mode. + Added pointer to methods/functions into AST callback structure. + Restructured AST class hierarchy. + Removed the old IParserCallback return Objects from every Parser method. + +2003-07-17 Victor Mozgin + Added support for digraphs and trigraphs. + Added support for hex floating point literals. + Fixed stack overflow problem with string literals concatenation. + Fixed problem with token pasting in macros. + This solves PR 39523, 39550, 39552. + +2003-07-15 Victor Mozgin + Fixed PR 39349 : Scanner fails on long long literals. + Fixed PR 39544 : Scanner fails on wide char literals. + +2003-07-10 John Camelon + Added in template support to IAST hierarchy. + Updated instantiation & specialization hierarchy. + Removed ASTTemplateDeclarationType. + Added full requestor callbacks for fields, variables, functions, methods & typedefs. + +2003-07-08 John Camelon + Filled out IASTMethod & IASTFunction & added implementations. + Updated IScanner, clients & implementations to use IScannerInfo. + Finished SimpleDeclaration porting to new architecture, only thing left is templates. + +2003-07-07 John Camelon + Bug 39652 - AST: Nested Classes incorrectly report null qualified Names + Fuller specification of Field/Method interfaces. + +2003-07-04 John Camelon + Fixed NPE in Parser::declarator(). + Bug 39652 - AST: Nested Classes incorrectly report null qualified Names + +2003-07-04 Victor Mozgin + Added CTaskTagsReconciler. + Extended ParserFactory with createProblemReporter() and createTranslationResult(). + +2003-07-02 Victor Mozgin + Fixed PR 39501 : Parser problems with throw clauses. + +2003-06-30 John Camelon + Further restructuring of Parser for ISourceElementRequestor. + Added interfaces/implementation for Simple Declarations. + Cleaned up DOM's representation of Constructor chains. + +2003-06-28 John Camelon + Completed Quickparse expression representation. + Updated ExpressionEvaluation and associated tests. + +2003-06-26 John Camelon + Update IASTExpression. + Move Parser.Backtrack and Parser.EndOfFile to external interface. + +2003-06-26 Victor Mozgin + Task tags support in C/C++ comments (initial revision). + Infrastructure to support problem reporting during translation. + Additional infrastructure for options/preferences handling. + +2003-06-25 John Camelon + Fixed bug39348 - sizeof elaborated types fail in parsing expression + +2003-06-25 John Camelon + Create new interface and support for calculating lineNumber/offset mapping. + Updated IASTClassSpecifier for qualified name query. + Began structuring expressions and declarators in Parser for ISourceElementRequestor. + Updated other packages to use new interfaces. + +2003-06-24 John Camelon + Updates for ISourceElementRequestor - elaborated types & enumerations. + +2003-06-23 John Camelon + Updating SimpleDeclarations to move towards new Callback structure. + +2003-06-23 John Camelon + Updated Factory infrastructure, constructors, etc. + Introduced Preprocessor class for transitive closure calc. client. + +2003-06-20 Victor Mozgin + Fixed PR 36463 : Offsets of macros are incorrect. + +2003-06-17 Victor Mozgin + Implemented correct handling of nested declarators in CModelBuilder. + Added proper support for function pointers as parameters. + This fixes PR 38921 and 39002. + +2003-06-16 Victor Mozgin + Implemented support for old K&R-style C function declarations. + Added oldKRParametersBegin() and oldKRParametersEnd() to IParserCallback. + Added getParameterTypes() with support of K&R to CModelBuilder. + Fixed ExpressionEvaluator and NullSourceElementRequestor for additions to IParserCallback. + Added handling of K&R syntax to the parser. + This fixes PR 7541, 35320 and 38434. + +2003-06-14 Victor Mozgin + Fixed handling of parameter lists for typedefs for functions. + More errorhandling in CModelBuilder. + Added handling of pointers to members. + Added handling of declarations for nested scopes (like A::B::C). + This fixes PR 36290, 36931 and partially 38920. + +2003-06-13 John Camelon + Added Class/Base infrastructure to public interfaces & requestor callback. + Moved many internal interfaces to external packages. + Organized imports. + +2003-06-13 Victor Mozgin + Renamed NullParserCallback into NullSourceElementRequester. + NullSourceElementRequester now dummy-implements both IParserCallback and ISourceElementRequester. + +2003-06-13 John Camelon + Merged ParserSymbolTable branch back into HEAD. + +2003-06-12 John Camelon + Get rest of JUnit tests working, will merge back to HEAD branch. + +2003-06-12 John Camelon + Introduction of ASTFactory strategy, some restructuring of packages and interfaces. + +2003-06-10 John Camelon + Futher pursuit of the golden hammer, symbol table integration. + +2003-06-09 John Camelon + First step in replacing IParserCallback with ISourceElementRequestor. + +2003-06-05 Andrew Niefer + Begin implementation of functions for template specializations: deduceTemplateArgument, + classTemplateSpecializationToFunctionTemplate, transformFunctionTemplateForOrdering + +2003-06-09 Victor Mozgin + Fixed for conversion operator declarations. + This fixes PR 36769 (finally) and PR 38657. + +2003-06-09 Victor Mozgin + Fixed Bug 36932 - RTS: Parser fails on "new" in ctor initializer + Improved handling of new-expressions: placements, arrays and + multiple parameters in initializers are now parsed. + +2003-06-09 Victor Mozgin + Fixed Bug 36701 - Scanner looses non-token chars while macro stringizing + +2003-06-07 Victor Mozgin + Fixes for templated constructor/destructor/operator declarations. + This fixed PR 36766, 36767, 36769 (STL parsing problems). + +2003-06-06 Victor Mozgin + Fixed Bug 38065 - Scanner skipped backslashes inside the code + +2003-06-05 John Camelon + Fix Bug 38380 "Include" class public methods fails JUnit tests + +2003-05-29 Andrew Niefer + new Class eType for stronger type safety in TypeInfo + new class PtrOp for better handling of pointer operators and cv qualifiers + new class TemplateInstance to support templates + Start of implementation for templates & specializations + +2003-05-29 John Camelon + Remove all AST components. + +2003-05-26 John Camelon + Rollback PST/Parser integration. + +2003-05-13 Andrew Niefer + Moved symbol table to org.eclipse.cdt.internal.core.pst + Created interface for symbol table: ISymbol, IContainerSymbol, IDerivableContainerSymbol, + IParameterizedSymbol, and ISpecializedSymbol. These are all implemented by Declaration + The symbol table itself uses this interface instead of using its Declaration directly + (with the exception of the undo command framework) + +2003-05-08 Andrew Niefer + Added a basic command structure to support rollbacks + +2003-05-06 John Camelon + Further integration of SymbolTable into Parser, some refactoring. + +2003-05-05 John Camelon/Andrew Niefer + Added Symboltable infrastructure into main parser. + +2003-05-05 Andrew Niefer + Structural changes to ParserSymbolTable: + - moved TypeInfo & Declaration inside ParserSymbolTable + - removed the stack & push/pop/peek + - moved nonstatic add/lookup fuctions from the table to Declaration + - began undo framework: added AddDeclarationCommand + +2003-05-01 Andrew Niefer + Fixed Bug 36287 - Parser failure with new CDT 1.1 parser + Fixed Bug 37011 - Scanner: #define A "//" not properly handled + +2003-04-30 John Camelon + Added some Javadoc to IParser.java and Parser.java. + +2003-04-28 John Camelon + Fixed Bug 37019 - RTS: Parser fails on variable defn using constructor + Fixed Bug 36767 - STL Testing: Parser is confused and goes into template function body + +2003-04-28 John Camelon + Partial fix for Bug37002 - Order of Offsetables is wrong + +2003-04-27 John Camelon + Partial fix for Bug 36932 - RTS: Parser fails on "new" in ctor initializer + Fixed Bug 36704 - Problem parsing Loki's Reference Typelist.h + Fixed Bug 36699 - Problem parsing Loki's Reference SmartPtr.h Impl + Fixed Bug 36691 - Problem parsing Loki's Reference HierarchyGenerators.h Impl + +2003-04-25 Andrew Niefer + Fixed bug36771 - Outline view shows include with no name + Fixed bug36714 - Parser fails on initial assignment using floating-suffix + Revisted bug36816 - Incomplete #include stops outline view + +2003-04-25 John Camelon + Fixed bug36852 - outline window doesn't show all functions + Fixed bug36764 - Bit fields cause parse errors + Fixed bug36702 - Parser error when having function pointers as parameters + +2003-04-24 John Camelon + Fixed Bug36799 STL Testing: Parser fails on Variable Definition + +2003-04-24 John Camelon + Fixed bug36693 - Problem parsing Loki's Reference SmallObj.cpp Impl + Fixed bug36696 - Problem parsing Loki's Reference SmartPtr.h Impl + Improved our error handling robustness. + Fixed bug36713 - Parser fails on definitions of pointers to functions + Fixed Dave's performance test parse failure. + Fixed bug36811 - The using directive causes parser to fail + Fixed bug36794 - ClassCastException for A template with no parameters + +2003-04-24 Andrew Niefer + Fixed Bug36816 Scanner infinite loop on incomplete #include + Fixed Bug36255 Parser hangs/goes infinite + +2003-04-21 John Camelon + Revisited bug36247 Parser confused by symbols #defined elsewhere + Fixed Bug36708 Problem parsing Loki's Reference TypeTraits.h + Fixed Bug36690 Problem parsing Loki's Reference Functor.h Implementation + Fixed Bug36692 Problem parsing Loki's Reference Singleton.h Impl + Fixed Bug36703 Problem parsing Loki's Reference TypeInfo.h Impl + Fixed Bug36689 Problem parsing Loki's Reference AbstractFactory.h Implementation + Fixed Bug36707 Problem parsing Loki's Reference TypeManip.h + +2003-04-21 Andrew Niefer + Fixed Bug36475 - Scanner does not concatenate strings + Fixed Bug36509 - Scanner turns strings into identifiers when expanding macros + Fixed Bug36521 - Scanner gets confused over commas in function like macros + Fixed Bug36695 - Scanner looses escaping on chars (ie '\4' to '4') + +2003-04-20 John Camelon + Fixed Bug36551 Bad parse on attached file. + Partial Fix for Bug36631 remove linear search algorithm from OffsetMapping + Some debunking of line numbers. + +2003-04-17 John Camelon + Fixed error in Elaborated Enumeration Types. + Fixed Bug36559 - Parsing Templates... + Fixed Bug36634 - Enum start line error + +2003-04-16 John Camelon + Fixed Bug36532 - Hang on partial template definition. + Fixed Bug36432 - Trying to open attached source code hangs Eclipse. + Fixed Bug36594 - Parser Stack Overflow on unaryExpression + Fixed Bug36600 - Elaborated Enumerated Types Parse Incorrectly. + +2003-04-15 John Camelon + Fixed bug36434 - Broken outline in winbase.h + Partial Fix for bug36379 - The parser to set Line informations when scanning. + Fixed CModelManager to include header files with .H extension as C++ headers. + Fixed bug36448 - Parser fails for C programs containing C++ keywords as identifiers + +2003-04-15 Andrew Niefer + Added scanner support to fix Bug36047 + +2003-04-13 John Camelon + Minor cleanup of callbacks due to removal of NewModelBuilder. + Added parser support to partially fix bug36416 & bug36294. Also added minimal C-Model support for these fixes. + +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 + Fixed Bug 36243 DomBuilder Offsetable List + +2003-04-10 John Camelon + Fixed Bug36237 Parser fails on casts in ctor initializer. + Added AccessSpecifier to TemplateDeclaration. + +2003-04-10 John Camelon + Updated callbacks and parser to add offset information to template declarations, + thus making TemplateDeclaration implement IOffsetable. + +2003-04-09 John Camelon + Removed all the old Code Model Builder source that was no longer being used (NewModelBuilder.java, etc.). + Moved all the files in parser.util directory to the dom. + Organized imports. + Fixed bug36250 Parser ignores functions with default parameters that have no name. + Fixed bug36240 Parser incorrectly parses operator= + Fixed bug36254 Parser doesn't recognize unsigned as a type by itself. + +2003-04-09 John Camelon + Added timing printout for CModelTests. + Provided partial fix for bug36255 to get past infinite loop, will leave defect open. + Fixed bug36045 (Again). + Fixed bug36287. + +2003-04-06 Andrew Niefer + Added ParserSymbolTable::Cost and used it to fix up the conversion sequence ranking + +2003-04-06 John Camelon + Fixed defect 36073. + Fixed error handling for unterminated strings in Scanner. + Significantly updated callback structure to better suite the nature of the Code Model. + Updated all callbacks and parser to accommodate altered callbacks. + +2003-04-04 John Camelon + Fixed defect 35939. Proper CElement::pos() is set on Simple Declarations, + Class Specifications, Namespaces, Enumerations and Enumerators, Macros and Inclusions. + +2003-04-03 John Camelon + Fixed defects 36019, 36020, 36045. + Finished template declarations and their callbacks for the DOM (not the Code Model). + +2003-04-01 John Camelon + Updated Scanner to convert control-characters to ' '. + Fixed logic error in SimpleDeclarationWrapper. + Added operator support to grammar. + Fixed Name.toString() to support non-qualified yet multi-part names. + +2003-04-01 Andrew Niefer + Parser Symbol Table, modified lookup with respect to resolving ambiguous names, + reducing the number of temporary lists/sets. Modified adding using declarations + to properly support overloaded functions. Added initial support for user defined + conversion sequences when resolving overloaded functions. + +2003-04-01 John Camelon + Fixed bug35906 + Udated Scanner to not puke on certain control characters. + +2003-03-31 John Camelon + Fixed unsigned short SimpleDeclarations not showing up in the outline view. + Fixed default visibilities for structs in outline view. + Fixed bug35892. + Added icon-less typedefs and enums to the outline view. + Fixed NPEs relating to anonymous structs, unions, enums in outline view. + +2003-03-31 Andrew Niefer + Parser Symbol Table, better support for function resolution with pointers and + references as parameters. Also support for typedefs as function parameters + +2003-03-31 John Camelon + Updated NewModelBuilder to work for ElaboratedTypeSpecifiers, PointerOperators, Const Methods. + Fixed bug35878. + +2003-03-31 John Camelon + Updated Scanner to work for Strings literals like L"this string" + Updated Scanner to work for floating points literals. + Updated Scanner to be more forgiving on errors in QuickScan mode. + Got template instantiation and specialization working (w/callbacks and DOM). + Updated Parser/Callbacks for handle pure virtual function declarations. + Added callback support for some template declarations (not all branches). + +2003-03-28 John Camelon + Added AccessSpecifier and ClassKind to parser.util package and refactored callbacks. + Better encapsulated ExceptionSpecification in the DOM. + Updated DOM structures to return unmodifiable collections. + Added callback support for asmdefinitions. + Added callback support for constructor initializer chains. + Fixed bug 35781 and updated parser to catch all exceptions from callbacks to ensure best-effort parsing. + Removed Main.java from Parser package. + +2003-03-26 Andrew Niefer + Moved type information and ParameterInfo from Declaration into util.TypeInfo + Initial implementation of standard conversion sequences for function resolution + +2003-03-24 John Camelon + Added callback support for namespace definitions. + Updated Parser exception hierarchy. + Added callback support for linkage specifications. + Added callback support for using declarations and directives. + +2003-03-23 John Camelon + Added callback support for class member visibility. + Added callback support for pointer and reference operators on declarators. + Added callback support for throws clauses an const operations. + Added callback support for array declarators. + +2003-03-20 Andrew Niefer + Parser Symbol Table updates for: + * friends + * "this" pointer + * enumerators + * Argument dependent lookup + * adding parameters to functions & function overloading + +2003-03-19 John Camelon + Updated Parser method visibility to solidify external interface. + Solved and removed TODO's from Scanner implementation. + Updated Parser and callbacks to handle basic expressions. + +2003-03-18 John Camelon + Updated IParserCallback (and implementations) to add a typeName to DeclSpecifier. + Updated IParserCallback and NewModelBuilder to distinguish between Function declarations and definitions. + +2003-03-17 Doug Schaefer + Changed EOF to be a Backtrack exception instead of a token so simplify + error handling. + +2003-03-13 John Camelon + Moved ## token to IScanner from Scanner. + Updated IParserCallback and implementations to deal with Elaborated Type Specifiers. + Moved IScope into the internal DOM package. + +2003-03-11 John Camelon + added ChangeLog to parser directory + updated IParserCallback (and all implementors) for expressions + removed inheritance relationship between ExpressionEvaluator and NullParserCallback + removed redundant assignmentOperator() calls in Parser::initDeclarator + removed class util.DeclarationSpecifier, merged Container interface into util.DeclSpecifier + organized imports on the parser folder + * dom/org/eclipse/cdt/internal/core/dom/DOMBuilder.java + * dom/org/eclipse/cdt/internal/core/dom/Declarator.java + * dom/org/eclipse/cdt/internal/core/dom/ParameterDeclaration.java + * dom/org/eclipse/cdt/internal/core/dom/SimpleDeclaration.java + * parser/org/eclipse/cdt/internal/core/model/NewModelBuilder.java + * parser/org/eclipse/cdt/internal/core/model/Parameter.java + * parser/org/eclipse/cdt/internal/core/model/SimpleDeclarationWrapper.java + * parser/org/eclipse/cdt/internal/core/parser/ExpressionEvaluator.java + * parser/org/eclipse/cdt/internal/core/parser/IParserCallback.java + * parser/org/eclipse/cdt/internal/core/parser/NullParserCallback.java + * parser/org/eclipse/cdt/internal/core/parser/Parser.java + * parser/org/eclipse/cdt/internal/core/parser/util/DeclSpecifier.java + +2003-03-10 John Camelon + added in support for detecting and reporting circular inclusions + added optimization by caching inclusion directories + added macro pasting capabilities + updated inclusion searching algorithm for local inclusions + +2003-03-07 John Camelon + fixed initDeclarators for the outline view. + +2003-03-06 Doug Schaefer + Some minor fixes to get constructors/destructors parsing as well as some minor clean up and robustness. + +2003-03-06 John Camelon + added quickParse heuristic to Scanner for handling #if conditionals to avoid throwing + ScannerExceptions on undefined preprocessor symbols + added minimal enum support to Parser (though not to DOM or CModel) + +2003-03-06 Andrew Niefer + Implementation of Namespaces & using directives in new parser's symbol table + +2003-03-05 Doug Schaefer + Some minor fixes to the parser. + +2003-03-04 Doug Schaefer + Added Parser in the "parser" source folder in cdt.core + Preference in the C/C++ preference page to enable/disable use of the new parser (disabled by default) + Start on the DOM which we are using to test the parser (source folder "dom") + Start on a new Model Builder for creating CElements using the new parser (currently in source folder "parser") diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/parser/IScanner.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/parser/IScanner.java index fa284cfd0e1..9417d41da1e 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/parser/IScanner.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/parser/IScanner.java @@ -3,6 +3,7 @@ package org.eclipse.cdt.core.parser; import java.util.Map; import org.eclipse.cdt.core.parser.ast.IASTFactory; +import org.eclipse.cdt.internal.core.parser.scanner.IScannerContext; /** * @author jcamelon @@ -48,5 +49,6 @@ public interface IScanner extends IFilenameProvider { * @return */ public boolean isOnTopContext(); + public void setScannerContext(IScannerContext context); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/ContextStack.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/ContextStack.java index a812970c977..871fdbc1b1b 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/ContextStack.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/ContextStack.java @@ -13,16 +13,12 @@ package org.eclipse.cdt.internal.core.parser.scanner; import java.io.IOException; import java.io.Reader; -import java.util.HashSet; -import java.util.LinkedList; -import java.util.Set; -import java.util.Stack; import org.eclipse.cdt.core.parser.IParserLogService; import org.eclipse.cdt.core.parser.IProblem; +import org.eclipse.cdt.core.parser.IScanner; import org.eclipse.cdt.core.parser.ISourceElementRequestor; import org.eclipse.cdt.core.parser.ast.IASTInclusion; -import org.eclipse.cdt.internal.core.parser.scanner.IScannerContext.ContextKind; import org.eclipse.cdt.internal.core.parser.util.TraceUtil; /** @@ -33,34 +29,85 @@ import org.eclipse.cdt.internal.core.parser.util.TraceUtil; */ public class ContextStack { + private static class SentinelContext implements IScannerContext { + public int read() throws IOException { return '\n'; } + public String getFilename() { return ""; } + public int getMacroOffset() { return -1; } + public int getMacroLength() { return -1; } + public int getOffset() { return 0; } + public int getRelativeOffset() { return 0; } + public Reader getReader() { return null; } + public void pushUndo(int undo) { } + public int getKind() { return IScannerContext.ContextKind.SENTINEL; } + public void setKind(int kind) { } + public IASTInclusion getExtension() { return null; } + public void setExtension(IASTInclusion ext) { } + public int getLine() { return -1; } + public int undoStackSize() { return 0; } + public int popUndo() { return '\n'; } + } private final IParserLogService log; - private Scanner scanner; + private int current_size = 8; + + private IScannerContext [] cs = new IScannerContext[current_size];; + private int cs_pos = 0; - public ContextStack( Scanner s, IParserLogService l ) { - scanner = s; + + private static IScannerContext sentinel = new SentinelContext(); + + private IScanner scanner; + + private final void cs_push(IScannerContext c) { + try { + cs[cs_pos++] = c;; + } + catch (ArrayIndexOutOfBoundsException a) + { + int new_size = current_size*2; + IScannerContext [] new_cs = new IScannerContext[new_size]; + + for (int i = 0; i < current_size; i++) { + new_cs[i] = cs[i]; + } + + new_cs[current_size] = c; + current_size = new_size; + cs = new_cs; + } + scanner.setScannerContext(c); + } + private final IScannerContext cs_pop() { + IScannerContext context = cs[--cs_pos]; + scanner.setScannerContext((cs_pos == 0) ? sentinel : cs[cs_pos -1]); + return context; + } + + public ContextStack( IScanner scanner, IParserLogService l ) { log = l; + this.scanner = scanner; + cs_push(sentinel); + scanner.setScannerContext(sentinel); } - public void updateContext(Reader reader, String filename, ContextKind type, IASTInclusion inclusion, ISourceElementRequestor requestor) throws ContextException { + public void updateContext(Reader reader, String filename, int type, IASTInclusion inclusion, ISourceElementRequestor requestor) throws ContextException { updateContext(reader, filename, type, inclusion, requestor, -1, -1); } - public void updateContext(Reader reader, String filename, ContextKind type, IASTInclusion inclusion, ISourceElementRequestor requestor, int macroOffset, int macroLength) throws ContextException + public void updateContext(Reader reader, String filename, int type, IASTInclusion inclusion, ISourceElementRequestor requestor, int macroOffset, int macroLength) throws ContextException { int startLine = 1; // If we expand a macro within a macro, then keep offsets of the top-level one, // as only the top level macro identifier is properly positioned if (type == IScannerContext.ContextKind.MACROEXPANSION) { - if (currentContext.getKind() == IScannerContext.ContextKind.MACROEXPANSION) { - macroOffset = currentContext.getMacroOffset(); - macroLength = currentContext.getMacroLength(); + if (getCurrentContext().getKind() == IScannerContext.ContextKind.MACROEXPANSION) { + macroOffset = getCurrentContext().getMacroOffset(); + macroLength = getCurrentContext().getMacroLength(); } - startLine = currentContext.getLine(); + startLine = getCurrentContext().getLine(); } - undoStack.clear(); IScannerContext context = new ScannerContext( reader, filename, type, null, macroOffset, macroLength, startLine ); context.setExtension(inclusion); push( context, requestor ); @@ -68,70 +115,45 @@ public class ContextStack { protected void push( IScannerContext context, ISourceElementRequestor requestor ) throws ContextException { - if( context.getKind() == IScannerContext.ContextKind.INCLUSION ) - { - if( !inclusions.add( context.getFilename() ) ) + if( context.getKind() == IScannerContext.ContextKind.INCLUSION ) { + if( isCircularInclusion( context.getFilename() ) ) throw new ContextException( IProblem.PREPROCESSOR_CIRCULAR_INCLUSION ); TraceUtil.outputTrace(log, "Scanner::ContextStack: entering inclusion ", null, context.getFilename(), null, null ); //$NON-NLS-1$ context.getExtension().enterScope( requestor ); - - } else if( context.getKind() == IScannerContext.ContextKind.MACROEXPANSION ) - { - if( !defines.add( context.getFilename() ) ) - throw new ContextException( IProblem.PREPROCESSOR_INVALID_MACRO_DEFN ); - } - if( currentContext != null ) - contextStack.push(currentContext); + } - currentContext = context; - if( context.getKind() == IScannerContext.ContextKind.TOP ) - topContext = context; +// This could be replaced with a check for shouldExpandMacro -- but it is called by +// the scanner before this point +// else if( context.getKind() == IScannerContext.ContextKind.MACROEXPANSION ) +// { +// if( !defines.add( context.getFilename() ) ) +// throw new ContextException( IProblem.PREPROCESSOR_INVALID_MACRO_DEFN ); +// } + cs_push(context); } public boolean rollbackContext(ISourceElementRequestor requestor) { + IScannerContext context = getCurrentContext(); try { - currentContext.getReader().close(); + context.getReader().close(); } catch (IOException ie) { TraceUtil.outputTrace( log, "ContextStack : Error closing reader "); //$NON-NLS-1$ } - if( currentContext.getKind() == IScannerContext.ContextKind.INCLUSION ) + if( context.getKind() == IScannerContext.ContextKind.INCLUSION ) { - TraceUtil.outputTrace(log, "Scanner::ContextStack: ending inclusion ", null, currentContext.getFilename(), null, null); //$NON-NLS-1$ - inclusions.remove( currentContext.getFilename() ); - currentContext.getExtension().exitScope( requestor ); - } else if( currentContext.getKind() == IScannerContext.ContextKind.MACROEXPANSION ) - { - defines.remove( currentContext.getFilename() ); + TraceUtil.outputTrace(log, "Scanner::ContextStack: ending inclusion ", null, context.getFilename(), null, null); //$NON-NLS-1$ + context.getExtension().exitScope( requestor ); } - - undoStack.addFirst( currentContext ); - - if (contextStack.isEmpty()) { - currentContext = null; - return false; - } - - currentContext = (ScannerContext) contextStack.pop(); - return true; + cs_pop(); + return cs_pos != 0; } - public void undoRollback( IScannerContext undoTo, ISourceElementRequestor requestor ) throws ContextException { - if( currentContext == undoTo ){ - return; - } - - int size = undoStack.size(); - if( size > 0 ) - { - for( int i = size; i > 0; i-- ) - { - push( (IScannerContext) undoStack.removeFirst(), requestor ); - - if( currentContext == undoTo ) - break; - } + public void undoRollback( IScannerContext undoTo, ISourceElementRequestor requestor ) { + while (getCurrentContext() != undoTo ) { + //cs_pos++; + scanner.setScannerContext(cs[cs_pos++]); } } @@ -147,58 +169,43 @@ public class ContextStack { */ protected boolean shouldExpandDefinition( String symbol ) { - return !defines.contains( symbol ); + for(int i = cs_pos-1; i >= 0; i--) + if (cs[i].getKind() == IScannerContext.ContextKind.MACROEXPANSION + && cs[i].getFilename().equals(symbol)) + return false; + return true; } - public IScannerContext getCurrentContext(){ - return currentContext; + protected boolean isCircularInclusion( String symbol ) + { + for(int i = cs_pos-1; i >= 0; i--) + if (cs[i].getKind() == IScannerContext.ContextKind.INCLUSION && + cs[i].getFilename().equals(symbol)) + return true; + return false; } - private IScannerContext currentContext, topContext; - private Stack contextStack = new Stack(); - private LinkedList undoStack = new LinkedList(); - private Set inclusions = new HashSet(); - private Set defines = new HashSet(); - - /** - * @return - */ - public IScannerContext getTopContext() { - return topContext; + public final IScannerContext getCurrentContext(){ + //return (cs_pos == 0) ? sentinel : cs[cs_pos -1]; + return cs[cs_pos -1]; } public IScannerContext getMostRelevantFileContext() { - if( currentContext != null ) + IScannerContext context = sentinel; + for( int i = cs_pos - 1; i >= 0; --i ) { - if( currentContext.getKind() == IScannerContext.ContextKind.TOP ) return currentContext; - if( currentContext.getKind() == IScannerContext.ContextKind.INCLUSION ) return currentContext; - } - - IScannerContext context = null; - for( int i = contextStack.size() - 1; i >= 0; --i ) - { - context = (IScannerContext)contextStack.get(i); - if( context.getKind() == IScannerContext.ContextKind.INCLUSION || context.getKind() == IScannerContext.ContextKind.TOP ) + context = cs[i]; + if( context.getKind() == IScannerContext.ContextKind.INCLUSION + || context.getKind() == IScannerContext.ContextKind.TOP ) break; - if( i == 0 ) context = null; } - return context; } public int getCurrentLineNumber() { - return getMostRelevantFileContext() != null ? getMostRelevantFileContext().getLine() : -1; - } - - public int getTopFileLineNumber() - { - return topContext.getLine(); - } - - public Scanner getScanner() - { - return scanner; + return getMostRelevantFileContext().getLine(); } + } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/IScannerContext.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/IScannerContext.java index 8e2f9cda8e4..fe414fe675a 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/IScannerContext.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/IScannerContext.java @@ -2,7 +2,6 @@ package org.eclipse.cdt.internal.core.parser.scanner; import java.io.IOException; import java.io.Reader; -import org.eclipse.cdt.core.parser.Enum; import org.eclipse.cdt.core.parser.ast.IASTInclusion; /** * @author jcamelon @@ -11,20 +10,12 @@ import org.eclipse.cdt.core.parser.ast.IASTInclusion; public interface IScannerContext { - public static class ContextKind extends Enum + public static class ContextKind { - public static ContextKind SENTINEL = new ContextKind( 0 ); - public static ContextKind TOP = new ContextKind( 1 ); - public static ContextKind INCLUSION = new ContextKind( 2 ); - public static ContextKind MACROEXPANSION = new ContextKind( 3 ); - - /** - * @param enumValue - */ - protected ContextKind(int enumValue) { - super(enumValue); - // - } + public static int SENTINEL = 0; + public static int TOP = 1; + public static int INCLUSION = 2; + public static int MACROEXPANSION = 3; } /** @@ -67,8 +58,8 @@ public interface IScannerContext { public int popUndo(); public void pushUndo(int undo); - public ContextKind getKind(); - public void setKind( ContextKind kind ); + public int getKind(); + public void setKind( int kind ); public IASTInclusion getExtension(); public void setExtension( IASTInclusion ext ); diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/LimitedScannerContext.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/LimitedScannerContext.java index e727f6780f4..00034b32cd1 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/LimitedScannerContext.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/LimitedScannerContext.java @@ -30,7 +30,7 @@ public class LimitedScannerContext * @param object * @param offsetLimit */ - public LimitedScannerContext(Scanner scanner, Reader reader, String string, ContextKind kind, int offsetLimit) { + public LimitedScannerContext(Scanner scanner, Reader reader, String string, int kind, int offsetLimit) { super( reader, string, kind, null ); this.scanner = scanner; limit = offsetLimit; diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/Scanner.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/Scanner.java index f12e764d2e3..92ca7dd4d92 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/Scanner.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/Scanner.java @@ -80,6 +80,11 @@ public class Scanner implements IScanner { private static final int NO_OFFSET_LIMIT = -1; private int offsetLimit = NO_OFFSET_LIMIT; private boolean limitReached = false; + private IScannerContext currentContext; + + public void setScannerContext(IScannerContext context) { + currentContext = context; + } protected void handleProblem( int problemID, String argument, int beginningOffset, boolean warning, boolean error ) throws ScannerException { @@ -117,18 +122,6 @@ public class Scanner implements IScanner { scannerData.setDefinitions( definitions ); scannerData.setIncludePathNames( includePaths ); scannerData.setASTFactory( ParserFactory.createASTFactory( this, scannerData.getParserMode(), language ) ); - try { - //this is a hack to get around a sudden EOF experience - scannerData.getContextStack().push( - new ScannerContext( - new StringReader("\n"), //$NON-NLS-1$ - START, - ScannerContext.ContextKind.SENTINEL, null), requestor); - - } catch( ContextException ce ) { - //won't happen since we aren't adding an include or a macro - } - } public Scanner(Reader reader, String filename, IScannerInfo info, ISourceElementRequestor requestor, ParserMode parserMode, ParserLanguage language, IParserLogService log, IScannerExtension extension, List workingCopies ) { @@ -140,19 +133,6 @@ public class Scanner implements IScanner { ((GCCScannerExtension)scannerExtension).setScannerData( scannerData ); scannerData.setASTFactory( ParserFactory.createASTFactory( this, scannerData.getParserMode(), language ) ); - try { - //this is a hack to get around a sudden EOF experience - scannerData.getContextStack().push( - new ScannerContext( - new StringReader("\n"), //$NON-NLS-1$ - START, - ScannerContext.ContextKind.SENTINEL, null), requestor); - - } catch( ContextException ce ) { - //won't happen since we aren't adding an include or a macro - // assert false - } - TraceUtil.outputTrace(log, "Scanner constructed with the following configuration:"); //$NON-NLS-1$ TraceUtil.outputTrace(log, "\tPreprocessor definitions from IScannerInfo: "); //$NON-NLS-1$ @@ -546,7 +526,7 @@ public class Scanner implements IScanner { } else // local inclusion { - duple = ScannerUtility.createReaderDuple( new File( scannerData.getContextStack().getCurrentContext().getFilename() ).getParentFile().getAbsolutePath(), fileName, scannerData.getClientRequestor(), scannerData.getWorkingCopies() ); + duple = ScannerUtility.createReaderDuple( new File( currentContext.getFilename() ).getParentFile().getAbsolutePath(), fileName, scannerData.getClientRequestor(), scannerData.getWorkingCopies() ); if( duple != null ) break totalLoop; useIncludePaths = true; @@ -599,7 +579,7 @@ public class Scanner implements IScanner { File includeFile = null; if( !useIncludePaths ) { // local inclusion is checked first - String currentFilename = scannerData.getContextStack().getCurrentContext().getFilename(); + String currentFilename = currentContext.getFilename(); File currentIncludeFile = new File( currentFilename ); String parentDirectory = currentIncludeFile.getParentFile().getAbsolutePath(); currentIncludeFile = null; @@ -723,9 +703,9 @@ public class Scanner implements IScanner { private int getChar( boolean insideString ) throws ScannerException { int c = NOCHAR; - lastContext = scannerData.getContextStack().getCurrentContext(); + lastContext = currentContext; - if (lastContext == null) + if (lastContext.getKind() == IScannerContext.ContextKind.SENTINEL) // past the end of file return c; @@ -845,7 +825,7 @@ public class Scanner implements IScanner { { int c; try { - c = scannerData.getContextStack().getCurrentContext().read(); + c = currentContext.read(); } catch (IOException e) { c = NOCHAR; @@ -857,22 +837,16 @@ public class Scanner implements IScanner { if (scannerData.getContextStack().rollbackContext(scannerData.getClientRequestor()) == false) return NOCHAR; - if (scannerData.getContextStack().getCurrentContext().undoStackSize() != 0 ) - return scannerData.getContextStack().getCurrentContext().popUndo(); + if (currentContext.undoStackSize() != 0 ) + return currentContext.popUndo(); return readFromStream(); } final void ungetChar(int c) throws ScannerException{ - scannerData.getContextStack().getCurrentContext().pushUndo(c); - try - { - scannerData.getContextStack().undoRollback( lastContext, scannerData.getClientRequestor() ); - } - catch (ContextException e) - { - handleProblem( e.getId(), scannerData.getContextStack().getCurrentContext().getFilename(), getCurrentOffset(), false, true ); - } + currentContext.pushUndo(c); + scannerData.getContextStack().undoRollback( lastContext, scannerData.getClientRequestor() ); + } protected boolean lookAheadForTokenPasting() throws ScannerException @@ -898,7 +872,7 @@ public class Scanner implements IScanner { protected void consumeUntilOutOfMacroExpansion() throws ScannerException { - while( scannerData.getContextStack().getCurrentContext().getKind() == IScannerContext.ContextKind.MACROEXPANSION ) + while( currentContext.getKind() == IScannerContext.ContextKind.MACROEXPANSION ) getChar(); } @@ -933,7 +907,7 @@ public class Scanner implements IScanner { } catch (ContextException e) { - handleProblem( e.getId(), scannerData.getContextStack().getCurrentContext().getFilename(), getCurrentOffset(), false, true ); + handleProblem( e.getId(), currentContext.getFilename(), getCurrentOffset(), false, true ); } storageBuffer = null; return true; @@ -1172,7 +1146,7 @@ public class Scanner implements IScanner { public IToken processPreprocessor() throws ScannerException, EndOfFileException { int c; - int beginningOffset = scannerData.getContextStack().getCurrentContext().getOffset() - 1; + int beginningOffset = currentContext.getOffset() - 1; int beginningLine = scannerData.getContextStack().getCurrentLineNumber(); // we are allowed arbitrary whitespace after the '#' and before the rest of the text @@ -2511,10 +2485,11 @@ public class Scanner implements IScanner { c = getChar(); } - if (c == NOCHAR && !isLimitReached() ) - handleProblem( IProblem.SCANNER_UNEXPECTED_EOF, null, getCurrentOffset(), false, true ); - else if( c== NOCHAR ) // limit reached - handleInvalidCompletion(); + if ( state != 2) + if (c == NOCHAR && !isLimitReached() ) + handleProblem( IProblem.SCANNER_UNEXPECTED_EOF, null, getCurrentOffset(), false, true ); + else if( c== NOCHAR ) // limit reached + handleInvalidCompletion(); ungetChar(c); @@ -2686,7 +2661,7 @@ public class Scanner implements IScanner { protected void poundDefine(int beginning, int beginningLine ) throws ScannerException, EndOfFileException { // definition String key = getNextIdentifier(); - int offset = scannerData.getContextStack().getCurrentContext().getOffset() - key.length() - scannerData.getContextStack().getCurrentContext().undoStackSize(); + int offset = currentContext.getOffset() - key.length() - currentContext.undoStackSize(); int nameLine = scannerData.getContextStack().getCurrentLineNumber(); // store the previous definition to check against later @@ -2718,16 +2693,13 @@ public class Scanner implements IScanner { handleProblem( IProblem.PREPROCESSOR_INVALID_MACRO_DEFN, potentialErrorMessage.toString(), beginning, false, true); return; } - } else if( c == '\r' || c == '\n' ){ + } else if( c == '\r' || c == '\n' || c == NOCHAR ){ StringBuffer potentialErrorMessage = new StringBuffer( POUND_DEFINE ); potentialErrorMessage.append( buffer ); potentialErrorMessage.append( '\\'); potentialErrorMessage.append( (char)c ); handleProblem( IProblem.PREPROCESSOR_INVALID_MACRO_DEFN, potentialErrorMessage.toString(), beginning, false, true ); return; - } else if( c == NOCHAR ){ - handleProblem( IProblem.SCANNER_UNEXPECTED_EOF, null, beginning, false, true ); - return; } buffer.append((char) c); @@ -2826,7 +2798,7 @@ public class Scanner implements IScanner { try { - scannerData.getASTFactory().createMacro( key, beginning, beginningLine, offset, offset + key.length(), nameLine, scannerData.getContextStack().getCurrentContext().getOffset(), scannerData.getContextStack().getCurrentLineNumber(), descriptor ).acceptElement( scannerData.getClientRequestor() ); + scannerData.getASTFactory().createMacro( key, beginning, beginningLine, offset, offset + key.length(), nameLine, currentContext.getOffset(), scannerData.getContextStack().getCurrentLineNumber(), descriptor ).acceptElement( scannerData.getClientRequestor() ); } catch (Exception e) { @@ -2959,7 +2931,7 @@ public class Scanner implements IScanner { } catch (ContextException e) { - handleProblem( e.getId(), scannerData.getContextStack().getCurrentContext().getFilename(), getCurrentOffset(), false, true ); + handleProblem( e.getId(), currentContext.getFilename(), getCurrentOffset(), false, true ); consumeUntilOutOfMacroExpansion(); return; } @@ -2990,7 +2962,7 @@ public class Scanner implements IScanner { String betweenTheBrackets = buffer.toString().trim(); Vector parameterValues = getMacroParameters(betweenTheBrackets, false); - Vector parameterValuesForStringizing = getMacroParameters(betweenTheBrackets, true); + Vector parameterValuesForStringizing = null; SimpleToken t = null; // create a string that represents what needs to be tokenized @@ -3025,6 +2997,8 @@ public class Scanner implements IScanner { } else if (t.getType() == tPOUND) { //next token should be a parameter which needs to be turned into //a string literal + if( parameterValuesForStringizing == null) + parameterValuesForStringizing = getMacroParameters(betweenTheBrackets, true); t = (SimpleToken) tokens.get( ++i ); int index = parameterNames.indexOf(t.getImage()); if( index == -1 ){ @@ -3109,7 +3083,7 @@ public class Scanner implements IScanner { } catch (ContextException e) { - handleProblem( e.getId(), scannerData.getContextStack().getCurrentContext().getFilename(), getCurrentOffset(), false, true ); + handleProblem( e.getId(), currentContext.getFilename(), getCurrentOffset(), false, true ); consumeUntilOutOfMacroExpansion(); return; } @@ -3199,7 +3173,7 @@ public class Scanner implements IScanner { * @see org.eclipse.cdt.core.parser.IScanner#isOnTopContext() */ public boolean isOnTopContext() { - return ( scannerData.getContextStack().getCurrentContext() == scannerData.getContextStack().getTopContext() ); + return ( currentContext.getKind() == IScannerContext.ContextKind.TOP ); } /* (non-Javadoc) * @see org.eclipse.cdt.core.parser.IFilenameProvider#getCurrentFilename() */ @@ -3215,8 +3189,8 @@ public class Scanner implements IScanner { public String toString() { StringBuffer buffer = new StringBuffer(); buffer.append( "Scanner @"); //$NON-NLS-1$ - if( scannerData.getContextStack().getCurrentContext() != null ) - buffer.append( scannerData.getContextStack().getCurrentContext().toString()); + if( currentContext != null ) + buffer.append( currentContext.toString()); else buffer.append( "EOF"); //$NON-NLS-1$ return buffer.toString(); diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/ScannerContext.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/ScannerContext.java index d4e226bfb4d..2488100cf6f 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/ScannerContext.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/ScannerContext.java @@ -23,12 +23,12 @@ public class ScannerContext implements IScannerContext private int macroLength = -1; private int line = 1; private int offset; - private ContextKind kind; + private int kind; /* (non-Javadoc) * @see org.eclipse.cdt.internal.core.parser.IScannerContext#initialize(Reader, String, int, IASTInclusion, int, int, int) */ - public ScannerContext(Reader r, String f, ContextKind k, IASTInclusion i, int mO, int mL, int l) + public ScannerContext(Reader r, String f, int k, IASTInclusion i, int mO, int mL, int l) { reader = r; filename = f; @@ -43,7 +43,7 @@ public class ScannerContext implements IScannerContext /* (non-Javadoc) * @see org.eclipse.cdt.internal.core.parser.IScannerContext#initialize(Reader, String, int, IASTInclusion) */ - public ScannerContext(Reader r, String f, ContextKind k, IASTInclusion i) + public ScannerContext(Reader r, String f, int k, IASTInclusion i) { this(r, f, k, i, -1, -1, 1); } @@ -151,7 +151,7 @@ public class ScannerContext implements IScannerContext * Returns the kind. * @return int */ - public ContextKind getKind() { + public int getKind() { return kind; } @@ -159,7 +159,7 @@ public class ScannerContext implements IScannerContext * Sets the kind. * @param kind The kind to set */ - public void setKind(ContextKind kind) { + public void setKind(int kind) { this.kind = kind; } /* (non-Javadoc)