On Jun 5, 2011, at 6:12 PM, Thomas Davie wrote:
> On 5 Jun 2011, at 18:22, Jens Alfke wrote:
>> On Jun 5, 2011, at 6:21 AM, Thomas Davie wrote:
>> 
>>> I've just completed firming up the API and documentation for CoreParse.  
>>> CoreParse provides a powerful tokenisation and parsing engine, which uses 
>>> shift-reduce parsing (unlike ParseKit) to support a wide range of context 
>>> free grammars.
>>> 
>>> Parsers can be built quickly and easily using BNF like syntax.
>> 
>> Cool! What advantages does this have over using a more-established tool like 
>> ANTLR? (“An Objective-C API” is an obvious answer, I suppose, but it doesn’t 
>> look that difficult to call into ANTLR-generated C++ code from Obj-C.)
> 
> I've not investigated ANTLR, but you're right, my primary goal was a nice, 
> clean, cocoa-like API in pure Obj-C only API.  The only comparable API that I 
> know of is ParseKit which uses recursive decent, and hence doesn't support a 
> lot of grammars.  By comparison there, I support SLR, LR(1) and LALR(1), so 
> there's rather more coverage.
> 
> I'd really appreciate you taking a look and reporting back if you find any 
> interesting things that ANTLR or other tools does better.

And just a reminder that Yacc/Bison is supported by Xcode with builtin build 
rules and build settings. Yacc/Bison is the original LALR(1) parser generator 
written by Steve Johnson of Bell Labs in the middle 1970's. Apple has cleverly 
set things up so that by using a .ym file instead of a .y file, all semantic 
actions can be written in Objective-C. Other settings are available to allow 
multiple Yacc-generated parsers per executable. It's an ancient tool, but it 
works well.

Tom Wetmore

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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 arch...@mail-archive.com

Reply via email to