Skip to main content



      Home
Home » Language IDEs » C / C++ IDE (CDT) » Difference between Scanner2 and DOMScanner
Difference between Scanner2 and DOMScanner [message #202281] Thu, 27 September 2007 03:02 Go to next message
Eclipse UserFriend
Originally posted by: qkevin.chen.gmail.com

Anyone knows the difference between

org.eclipse.cdt.internal.core.parser.scanner2.Scanner2
and
org.eclipse.cdt.internal.core.parser.scanner2.DOMScanner?

Which should I use if I want to parse a C source to obtain the AST?

Thanks.

Kevin
Re: Difference between Scanner2 and DOMScanner [message #202427 is a reply to message #202281] Tue, 02 October 2007 11:49 Go to previous message
Eclipse UserFriend
Kevin Chen wrote:
> Anyone knows the difference between
>
> org.eclipse.cdt.internal.core.parser.scanner2.Scanner2
> and
> org.eclipse.cdt.internal.core.parser.scanner2.DOMScanner?
>
> Which should I use if I want to parse a C source to obtain the AST?
>

Scanner2 is a preprocessor/lexer used with the obsolete "old" parser in
org.eclipse.cdt.core.parser.*
DOMScanner is a preprocessor/lexer used with the "new" DOM parser in
org/eclipse.cdt.core.dom.*

BTW, neither of them produce an AST. This is done by the parser.

Anyway, the recommended method to obtain an AST is by using
ITranslationUnit.getAST().

HTH
--
Anton Leherbauer
Wind River CDT Team, Austria
Previous Topic:Headless C builds?
Next Topic:Lost indexer project specific setting
Goto Forum:
  


Current Time: Sun May 11 10:07:13 EDT 2025

Powered by FUDForum. Page generated in 0.03073 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top