Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Parser Generator for Objective C?

I've been advised to use a Parser Generator to create a parser for my domain specific language.

Ideally I'd like it to output an objective-C parser and take BNF input to describe the language.

There seems to be very little choice.. is it possible to use one of the more popular Parser Generators with objective C?

Thanks!

like image 630
FBryant87 Avatar asked Jul 16 '11 22:07

FBryant87


1 Answers

Code generation is not the “true way” in dynamic languages like Objective-C. Anything that can be achieved by a parser generator can be achieved at runtime. So, I'd suggest you try something like ParseKit, which will take a BNF-like grammar, and give you various delegate hooks you can implement to construct your parser.

Check out this tutorial for more details.

like image 129
Jonathan Sterling Avatar answered Oct 22 '22 09:10

Jonathan Sterling