Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] ILinkage?

I don't think its possible to add support for Objective-C without making at least some minor enhancements to core CDT. For example Obj-C adds the #import preprocessor directive. Support for that will probably have to be added directly to CPreprocessor in CDT with a flag in IScannerExtensionConfiguration to turn it on.

Alex, another thing you may want to consider from the parsing side is using the LR C parser as a base for Objective-C parsing. I used it as a base for writing the UPC parser. I skimmed the apple docs and they say that objective-c is fully compatible with C. So by reusing the LR C parser you get a nice chunk of functionality for free including parsing the C subset of the language and bindings to the CDT preprocessor. Its been designed so that extending it to support new syntax should be easy (in theory). This is just a thought worth considering, there may be good reasons to write a parser from scratch, I'm not sure. And of course the AST is a different story....


Mike Kucera
Software Developer
IBM Eclipse CDT Team
mkucera@xxxxxxxxxx

Inactive hide details for Alex Blewitt ---02/20/2009 03:38:27 PM---I'll file an enhancement but I thought the idea of doing objAlex Blewitt ---02/20/2009 03:38:27 PM---I'll file an enhancement but I thought the idea of doing objc dev outside of CDT HEAD was to avoid any objc references until su


From:

Alex Blewitt <alex.blewitt@xxxxxxxxx>

To:

"CDT General developers list." <cdt-dev@xxxxxxxxxxx>

Cc:

"CDT General developers list." <cdt-dev@xxxxxxxxxxx>

Date:

02/20/2009 03:38 PM

Subject:

Re: [cdt-dev] ILinkage?




I'll file an enhancement but I thought the idea of doing objc dev outside of CDT HEAD was to avoid any objc references until such time as it had built up momentum?

A bigger concern, then, is what of the PDOM code which is all .internal. (including some interfaces). Aren't the ILinkage and PDOM fairly coupled? They appeared to be from my cursorary glancing.

Alex

Sent from my (new) iPhone


On 20 Feb 2009, at 08:43, "Schorn, Markus" <
Markus.Schorn@xxxxxxxxxxxxx> wrote:
      You cannot add a new linkage kind from outside of CDT. The very basic reason for that is that otherwise we cannot maintain unique integer constants for linkages. If you need one for ObjectiveC, we'll add it to ILinkage.
      Please open an enhancement request for it.

      ILinkage is no longer marked as experimental in 6.0. I don't expect AbstractCLikeLanguage to change either.
      If you use it, we can also make it non-experimental (just open an enhancement request).

      Markus.



      From: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of Alex Blewitt
      Sent:
      Friday, February 20, 2009 2:43 AM
      To:
      cdt-dev@xxxxxxxxxxx
      Subject:
      [cdt-dev] ILinkage?
      Importance:
      Low

      I'm starting to play around with the internals of CDT, and I've come across the following whilst creating a subclass of AbstractCLikeLanguage and the ILinkage that's referred to from it:

      AbstractCLikeLanguage:
      * <strong>EXPERIMENTAL</strong>. This class or interface has been added as
      * part of a work in progress. There is no guarantee that this API will work or
      * that it will remain the same. Please do not use this API without consulting
      * with the CDT team.
      * @since 5.0


      ILinkage.java
      /**
      * Represents a linkage in the AST or the index.
      * <p>
      * <strong>EXPERIMENTAL</strong>. This class or interface has been added as
      * part of a work in progress. There is no guarantee that this API will
      * work or that it will remain the same. Please do not use this API without
      * consulting with the CDT team.
      * </p>
      * @since 4.0
      */

      This seems to be defined as the set {c,cpp,fortran} in the interface (and the implementing class is internal). How would I go about setting up a name for Objective-C, or can I simply return 'none' at this point? I'm somewhat playing in the dark to get a feel of how it fits together right now, but given that it had these in the comments I figured I'd do the honours. However, given that CDT is working on 5.1 (at least, that's the version it shows in Eclipse right now; 5.1.0.200902xxxx - will that be bumped to 6.0 later?) I was wondering how experimental these things are anyway ...

      Alex
      _______________________________________________
      cdt-dev mailing list

      cdt-dev@xxxxxxxxxxx
      https://dev.eclipse.org/mailman/listinfo/cdt-dev_______________________________________________
      cdt-dev mailing list
      cdt-dev@xxxxxxxxxxx
      https://dev.eclipse.org/mailman/listinfo/cdt-dev


GIF image

GIF image


Back to the top