Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [cdt-dev] c99 parser build

This is all up and running and looks good but one thing I've noticed
when using the UPC plugin is that the 'shared' qualifier is not shown in
the outline view, whereas the other built-in qualifiers such as const
and volatile are. Is this outside the scope of the parser?


-----Original Message-----
From: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx]
On Behalf Of Michael Wrighton
Sent: 11 July 2007 09:58
To: CDT General developers list.
Cc: cdt-dev-bounces@xxxxxxxxxxx
Subject: RE: [cdt-dev] c99 parser build

Ok sorted now, yeah I had the whole c99 directory checked out
originally.

-----Original Message-----
From: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx]
On Behalf Of Mike Kucera
Sent: 10 July 2007 18:30
To: CDT General developers list.
Cc: CDT General developers list.; cdt-dev-bounces@xxxxxxxxxxx
Subject: RE: [cdt-dev] c99 parser build

Um, I'm not exactly sure, maybe Chris can answer this better. I think if
you have the source for CDT and the C99 stuff then you shouldn't need to
install it from the update site.

The problem might be that you haven't checked out the C99 plugins
properly.
You have to go to the org.eclipse.cdt/C99 directory and checkout each
individual plugin from there, so that then show up as top level projects
in
your workspace. Otherwise if you just checkout org.eclipse.cdt then it
won't work (I think).


Mike Kucera
Software Developer
IBM CDT Team, Toronto
mkucera@xxxxxxxxxx


 

             "Michael

             Wrighton"

             <mikew@clearspeed
To 
             .com>                     "CDT General developers list."

             Sent by:                  <cdt-dev@xxxxxxxxxxx>

             cdt-dev-bounces@e
cc 
             clipse.org

 
Subject 
                                       RE: [cdt-dev] c99 parser build

             07/10/2007 12:58

             PM

 

 

             Please respond to

               "CDT General

             developers list."

             <cdt-dev@eclipse.

                   org>

 

 





Ok cool, that shouldn't be a problem. Just a quick question with regards
to running - do I need to install c99, upc etc properly from the update
site even though I have the source? I ask because I can't see c99 in the
language mappings dialog when I run?

-----Original Message-----
From: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx]
On Behalf Of Mike Kucera
Sent: 10 July 2007 17:49
To: CDT General developers list.
Subject: RE: [cdt-dev] c99 parser build

Yes, the LPG based parser is designed to be extensible so that its easy
to
do exactly the types of things that you said you need to do.

The only issue is that the LPG based stuff should be considered
experimental right now, there is going to be quite a bit of API churn as
I
decouple the preprocessor and add support for C++. If you want to keep
synchronized to HEAD you are going to have to keep up with my changes.

I do appreciate any feedback you would have on how the experience of
extending the parser could be made better/easier. I'll try to answer any
questions you have.

These docs here are meant to be an intro to parsing in CDT:
http://wiki.eclipse.org/CDT/designs. Also take a look at the UPC plugin
which is built as an extension to the C99 plugin.

Mike Kucera
Software Developer
IBM CDT Team, Toronto
mkucera@xxxxxxxxxx





             "Michael

             Wrighton"

             <mikew@clearspeed
To
             .com>                     "CDT General developers list."

             Sent by:                  <cdt-dev@xxxxxxxxxxx>

             cdt-dev-bounces@e
cc
             clipse.org


Subject
                                       RE: [cdt-dev] c99 parser build

             07/10/2007 12:17

             PM





             Please respond to

               "CDT General

             developers list."

             <cdt-dev@eclipse.

                   org>









Thanks. Actually I'm implementing a CDT plugin that supports C but just
with a couple of additional type qualifiers, that's all. But I want
these to be properly displayed in the outline view etc so from what I've
read, using this new LPG mechanism seems like the cleanest way of doing
it.

I had a go using the old method but it looked as though I would have to
extend ASTStringUtil, CmodelBuilder2, TranslationUnit and god knows what
else above that, just to get the new qualifier strings in the AST nodes.

-----Original Message-----
From: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx]
On Behalf Of Mike Kucera
Sent: 10 July 2007 17:07
To: CDT General developers list.
Subject: Re: [cdt-dev] c99 parser build

The code for the C99 parser is in CVS under org.eclipse.cdt/C99.

There are three grammar files in the package
org.eclipse.cdt.internal.core.dom.parser.c99,
1) C99Lexer.g, the grammar file that defines how the character stream
should be lexed into tokens
2) C99Parser.g, specifies the C99 grammar
3) C99ExprEvaluator.g, the preprocessor expression evaluator is itself
implemented as an LPG parser, you can probably ignore this if you are
just
interested in the grammar of C99.

Keep in mind that CDT is an IDE and not a compiler, so our parsers work
differently from what you would expect in a front end for a compiler or
interpreter. In particular we don't keep track of any semantic info
during
the parse and we don't do any type-checking.

Are you implementing an extension to the C spec? or are you implementing
your own language and just using C for inspiration? I'm asking because
if
you are designing a new language from scratch I would heavily advise
against using C as your source for inspiration (and don't even think
about
using the C preprocessor).


Mike Kucera
Software Developer
IBM CDT Team, Toronto
mkucera@xxxxxxxxxx






             "Michael

             Wrighton"

             <mikew@clearspeed
To
             .com>                     "CDT General developers list."

             Sent by:                  <cdt-dev@xxxxxxxxxxx>

             cdt-dev-bounces@e
cc
             clipse.org


Subject
                                       [cdt-dev] c99 parser build

             07/10/2007 11:39

             AM





             Please respond to

               "CDT General

             developers list."

             <cdt-dev@eclipse.

                   org>









Hi,

Could someone tell me how I can build/enable the c99 parser? Really I?m
interested in looking at the source and the c99 grammar file so I can
get
started on my own C-based language. I?ve got the latest CDT checked out
but
all I can see is a rather small org.eclipse.cdt.releng/c99/ directory?

Thanks
Mike Wrighton_______________________________________________
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
_______________________________________________
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
_______________________________________________
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
_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev


Back to the top