Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Parser question

I don't think so. It should be a part of CDT but certainly will not be ready for 2.1 release. I guess when DOM will be implemented, I can switch to its services. Now using of parser looks like an interim solution (keeping in mind that the things supposed to be interim, often end up as permanent:-).

John Camelon wrote:

Is this feature something that will be delivered as part of CDT 2.1? Parser is technically an internal class ...
JohnC
www.eclipse.org/cdt
cdt-dev-admin@xxxxxxxxxxx wrote on 09/08/2004 11:41:33 AM:

Thanks a lot!

John Camelon wrote:

Parser is no longer final. Thanks, JohnC www.eclipse.org/cdt
cdt-dev-admin@xxxxxxxxxxx wrote on 09/08/2004 10:56:03 AM:



It does not allow now, just allowed :-). I need to break code to separate elements like CompleteParser did, but on the other hand, I
need

all preprocessor directives and unknown types exceptions to be
ignored.

For formatter any code is just a text, combined from semantic constructions. Having this element tree (almost like AST tree), formatter can reconstruct source code based on custom rules. Parser
+
scanner don't do this job now, but they have almost everything to do
it.

That's why I'm trying to subclass them to get necessary
functionality.
Alex Chapiro

John Camelon wrote:

The extension mechanism has not yet been completely formalized. How does subclassing the parser allow you to format code?
JohnC
www.eclipse.org/cdt
cdt-dev-admin@xxxxxxxxxxx wrote on 09/08/2004 10:00:27 AM:



Working on default C/C++ formatter, I'm trying to override the
default


implementation of IASTFactoryExtension interface to substitute createSimpleTypeSpecifier and
overrideCreateSimpleTypeSpecifierMethod


methods. To do it before, I inherited from Parser class and
replaced


extensionFactory member ( I didn't like it, but it worked at
least).


Parser is not inheritable now (a final class) and I cannot do it
any


more. Is there any legal way for substitution of default
implementation

of IASTFactoryExtension interface?

Alex Chapiro
_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/cdt-dev
_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/cdt-dev


_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/cdt-dev

.



Back to the top