Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: Fw: [cdt-dev] Ada in CDT


Your idea is interesting as well. Right now our C and C++ parsers are in Java in with the org.eclipse.cdt.core plugin. I am still concerned about the performance of Java in this situation and have contemplated on and off porting it into C++ in a native dll/so.

The parser produces an AST which can be found in org.eclipse.cdt.core.dom and below. The question I have is whether there is a level of the interfaces that can be extracted and reused in an AST for other languages. The key interfaces used by our UI features include IBinding (representing a logical concept in the language) and IASTName (representing an identifier in the code that declares or refers to an IBinding).
I am trying to figure out how can we fill your AST system with the GPS parser output. This might seems to be possible, we have a parser wich calls a callback each time it discovers an entity, therefore we just would have to make this callback on the Java side.

However, depending on the features that provides the parser, it might be cheaper to implement directly the procedure on the GPS side. For instance, cross references can be completely resolved that way (Eclipse says "the user clicked here, what should I do ?" and GPS answers "propose him to go to the declaration, there"). Are there many language-independent features that could use the AST ?


Back to the top