GNUObjCSourceParser

6 views
Skip to first unread message

Ryan Rusaw

unread,
Jun 20, 2009, 2:15:18 AM6/20/09
to ObjectivEClipse Development Group
I'm not sure entirely what the status of development on this is, but
I've done some work to implement support for the "external-
declarations" section of the ObjC grammar (http://objc.toodarkpark.net/
grammar.html).

Before I continue and work on implementing the rest of the grammar,
I'd like to start some discussion and get some feedback on the cost/
benefits of deriving the ObjC AST directly off of the C AST, or
forking a separate AST as is done for C++ support. A lot of the work
I've done so far is far from "optimal", as I've had to work around
extending the GNUCSource parser where the functionality I've wanted to
extend or modify is embedded in a private method.

Ryan.

Alex Blewitt

unread,
Jun 23, 2009, 8:35:07 AM6/23/09
to objective...@googlegroups.com, ObjectivEClipse Development Group
The parser that exists in the objectiveclipse svn at the moment is
based off the C grammar. One reason for wanting to do this was to get
the source editor support etc.

However, it's pretty primitive at the moment. It can detect objc style
message sends like [foo bar] and [foo bar:expr] but currently doesn't
represent them in the parse tree as I've not got the token/node types
sorted yet. It also understands @interface and @implementation
sections, but only by silently eating everything in between.

With Gallileo just round the corner (tomorrow) I've held off on trying
to come up with patches etc for CDT because they'll be focussed
elsewhere right now. However, once that's out of the way, I hope to
get some of these addressed.

Alex

Sent from my (new) iPhone

Jeffrey Gilbert

unread,
Jun 23, 2009, 8:40:26 AM6/23/09
to objective...@googlegroups.com
Sweetness. Didn't know that was out so soon.
--
Jeffrey Gilbert
http://www.linkedin.com/in/jeffreygilbert

Ryan Rusaw

unread,
Jun 29, 2009, 12:24:15 AM6/29/09
to ObjectivEClipse Development Group
I think I've added support to the parser for everything except a few
ObjectiveC 2.0 features. ie. @properties, @dynamic. @synthesize etc.
There is also an issue with IBindings not being created correctly for
some of the AST interfaces/classes I added that I'd like to fix, but
I'll get to that once I've finished the parser.

I've uploaded a screenshot in the Files section, showing the parsed
AST in the DOMAST view that comes with the org.eclipse.cdt.ui.tests
plugin.

Ryan

Alex Blewitt

unread,
Jun 29, 2009, 4:30:57 AM6/29/09
to objective...@googlegroups.com
Great stuff! Can you attach the code as an issue in http://code.google.com/p/objectiveclipse/issues/list
so I can review/apply the patch?

Alex
Reply all
Reply to author
Forward
0 new messages