On 10 Mar 2010, at 12:48, Timothy Stafford Larkin wrote: > You don't need to change the file extension, just a build setting. Change > "Compile Sources As" from "According to file type" to "Objective C".
I find that confusing, especially when you have multiple yacc files to maintain. Some of them are in C, some in ObjC, C++, etc With the file-extention you see without opening what kind of language it uses. Filip > > Also, I've found that "@" as in @"String Constant" produces Bison confusion. > I use a #define so that I can write AT"String Constant". > > Tim Larkin > Abstract Tools > > On Mar 9, 2010, at 6:33 PM, Graham Cox wrote: > >> >> On 10/03/2010, at 9:00 AM, Thomas Wetmore wrote: >> >>> Yacc (and Bison) convert yacc files into C files. Instead I would like to >>> generate Objective-C files so I can use Cocoa containers classes and >>> NSString to get Unicode for free. I do see that bison can generate C++ >>> instead of C. Does anyone know whether there is any version of yacc or >>> bison that has been modified to generate Objective-C? Or if there is any >>> other parser generator available that can generate Objective-C. >> >> >> I haven't tried it, so this might be nonsense, but I think that YACC simply >> copies the emitted code from the source file to the final C file. That means >> that could be Objective-C code - you'd only need to change the file >> extension from .c to .m to compile it. As long as the emitted code is the >> only Objective-C and therefore not required to be parsed by YACC, I reckon >> it ought to work. >> >> --Graham >> >> >> _______________________________________________ >> >> Cocoa-dev mailing list ([email protected]) >> >> Please do not post admin requests or moderator comments to the list. >> Contact the moderators at cocoa-dev-admins(at)lists.apple.com >> >> Help/Unsubscribe/Update your Subscription: >> http://lists.apple.com/mailman/options/cocoa-dev/tsl1%40cornell.edu >> >> This email sent to [email protected] > > _______________________________________________ > > Cocoa-dev mailing list ([email protected]) > > Please do not post admin requests or moderator comments to the list. > Contact the moderators at cocoa-dev-admins(at)lists.apple.com > > Help/Unsubscribe/Update your Subscription: > http://lists.apple.com/mailman/options/cocoa-dev/filip%40code2develop.com > > This email sent to [email protected] _______________________________________________ Cocoa-dev mailing list ([email protected]) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [email protected]
