iOS的标准语法解析器是什么? [英] What are the standard grammar parsers for iOS?

查看:67
本文介绍了iOS的标准语法解析器是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

iPad和iPhone的iOS是否支持解析器?尤其是,lex/yacc或flex/bison是否可用于iOS开发? xcode4是否具有本机支持的库? (我可以通过lex/yacc生成语法,然后将* .c文件放入我的项目中,但我希望有更受支持的库.)

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 natively 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.)

有什么想法吗?

推荐答案

lex,yacc,flex和bison都随Mac/iOS开发人员工具一起提供. Xcode具有用于处理带flex的.l文件和带有bison的.y文件的内置规则,并且它会自动将生成的.c文件与您的项目一起编译.如果使用.lm或.ym文件扩展名,它将生成.m文件,使您可以使用用Objective-C编写的操作.

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-解析器/树/主/STLParser

这篇关于iOS的标准语法解析器是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆