开发者

What are the standard grammar parsers for iOS?

Does iOS for iPad and iPhone have support for a parser? In particular, is lex/yacc or flex/bison available for iOS development? Does xcode4 have a nativ开发者_运维知识库ely supported library? (I could generate my grammar via lex/yacc and then take the *.c files and put them in my project, but I was hoping for more tightly supported libraries.)

Any ideas?


lex, yacc, flex, and bison all come with the Mac/iOS developer tools. Xcode has built-in rules for processing .l files with flex and .y files with bison, and it automatically compiles the generated .c files with your project. If you use .lm or .ym file extensions, it will generate .m files, allowing you to use actions written in Objective-C.

A sample use case is available at

https://github.com/dgkris/ObjectiveC-STL-Parser/tree/master/STLParser

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜