Greetings! On Thu, 2011-07-21 at 14:53 +0200, Roland Sako wrote: > Hello, > > I am Roland Sako from Geneva in Switzerland. I am currently working on a > project which I need to generate an expression tree > of an Objective-C source code, then I will visit that tree to add extra > instruction in it. > > I just got an Objective-C grammar file from the web > (http://spiny.com/software/objc.g) , but when trying to generate something I > got error "can only show generated grammar for java language". >
I do not think that this grammar is really for ANTLR --- or rather, if it is, it must be run thru some preprocessor in order to transform it into actual ANTLR meta-syntax... that is, i notice the following non-ANTLR stuff (via a quick scan only): begins with a {...} section rather than the keyword 'grammar'. unknown ${declare ...} commands. actions in [ ] no lexer rules! e.g. no rule that starts with upper-case letter. appears to define tokens using regular expressions surrounded with "s. the last 6 or 7 rules in the file are kinda goofy (in ANTLR terms). > All I would need is to generate a Parser that can construct trees from > objectiveC class files. Would it be possible with antlr? the meat of the grammar does appear to be for ANTLR. if you can figure out how to deal with the above non-ANTLRism you are probably well on your way to a working parser. > > Thank you very much. > i don't think i helped very much, sorry. -jbb List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address -- You received this message because you are subscribed to the Google Groups "il-antlr-interest" group. To post to this group, send email to il-antlr-inter...@googlegroups.com. To unsubscribe from this group, send email to il-antlr-interest+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/il-antlr-interest?hl=en.