[antlr-interest] Fwd: ObjectiveC grammar

forumer at smartmobili.com forumer at smartmobili.com
Sat Feb 11 06:02:15 PST 2012


Hi,

 From what I understand it's an objective-c backend and allows to 
generate objc code from a ANTLR grammar.
Cannot see any objc grammar but maybe I don't fully understand this 
project.



Le 11.02.2012 13:56, Eric a écrit :
> ---------- Forwarded message ----------
> From: Eric <>
> Date: Sat, Feb 11, 2012 at 7:49 AM
> Subject: Re: [antlr-interest] ObjectiveC grammar
> To:
>
>
> Hi,
>
> Based on the comment in ObjectiveC.g from the github location you 
> noted
>
> /**
> * ObjectiveC version 2
> * based on an LL ansic grammars and
> * and ObjectiveC grammar found in Learning Object C
> *
> * It's a Work in progress, most of the .h file can be parsed
> * June 2008 Cedric Cuche
> **/
>
> I would consider it incomplete and contact Cedric Cuche for details.
>
> There seems to be another ObjectiveC grammar by Alan Condit. It is in 
> the
> ANTLR 3.4 download as ObjC
>
> See: 
> http://www.antlr.org/wiki/display/ANTLR3/ANTLR3+Objective-C+Target
>
> Hope that helps,
>
> Eric
>
> On Sat, Feb 11, 2012 at 4:48 AM, <> wrote:
>
>> Hi,
>>
>> I am new to antlr and for the moment I have started to watch the 
>> great
>> video tutorials by Scott Stanchfield.
>> TO start working with antlr I would like to parse objective-c and I
>> have downloaded grammar from Cedric Cuche,
>> however when I try to parse very simple example I got some errors :
>>
>> //
>> //  SimpleCar.h
>> //  CarClassTest
>> //
>> //
>>
>> #import <Cocoa/Cocoa.h>
>>
>>
>> @interface SimpleCar : NSObject {
>>
>>        NSString* make;
>>        NSString* model;
>>        NSNumber* vin;
>>
>> }
>>
>> // set methods
>> - (void) setVin:   (NSNumber*)newVin;
>> - (void) setMake:  (NSString*)newMake;
>> - (void) setModel: (NSString*)newModel;
>>
>> // convenience method
>> - (void) setMake: (NSString*)newMake andModel: (NSString*)newModel;
>>
>> // get methods
>> - (NSString*) make;
>> - (NSString*) model;
>> - (NSNumber*) vin;
>>
>> @end
>>
>>
>> Inside eclipse with the antlr plugin installed, interpreter tells me 
>> :
>>
>> Failed predicate exception : line 2:0 rule translation_unit failed:
>> {can't deal with predicated yet}?
>>
>> The project is located here :
>> 
>> https://github.com/smartmobili/parsing/tree/master/ObjectiveC/antlr-objc
>>
>> What am I doing wrong ?
>>
>> Thanks
>>
>>
>>
>> List: http://www.antlr.org/mailman/listinfo/antlr-interest
>> Unsubscribe:
>> 
>> http://www.antlr.org/mailman/options/antlr-interest/your-email-address
>>
>
> List: http://www.antlr.org/mailman/listinfo/antlr-interest
> Unsubscribe:
> 
> http://www.antlr.org/mailman/options/antlr-interest/your-email-address



More information about the antlr-interest mailing list