3

I have looked at the following software tools:

ANTLR seems the most straight-forward, however its documentation is lacking. Ragel looks possible, too, but I do not see an easy way to convert BNF into its syntax.

What other tools are available that can take BNF input and generate a corresponding, Unicode-friendly, cross-platform, standalone, C++ parser?

Many thanks for all suggestions.

Edit: Changed Objective-C requirement to C++.

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
Dave Jarvis
  • 30,436
  • 41
  • 178
  • 315
  • You should also consider time performance while selecting the tool. – sand Jan 25 '10 at 04:24
  • You should look at: http://stackoverflow.com/questions/1961604/how-much-time-would-it-take-to-write-a-c-compiler-using-flex-yacc/ – kyoryu Jan 25 '10 at 07:08

4 Answers4

5

Try boost.spirit 2.

The boost spirit user list is very active and answers are quick from the authors.

Dave Jarvis
  • 30,436
  • 41
  • 178
  • 315
t.g.
  • 1,719
  • 2
  • 14
  • 25
3

TDParseKit! (Most specifically, this page on Objective-C parser generation with BNF grammars)

Dave DeLong
  • 242,470
  • 58
  • 448
  • 498
1

Have you looked at QLALR? It is a creative Friday project from QtDF. I have not tried it personally, but the trolls seems to be pragmatic about their approach to problems, so I guess this is too.

e8johan
  • 2,899
  • 17
  • 20
1

You can try GOLD Parser! It's a great tool for parsing and generating. With a simple UI, all what you need to do is to provide a valid grammar file and select your favored programming languages for your output code.

anhldbk
  • 4,559
  • 5
  • 29
  • 37