Parse/tokenize objective-c with objective-c (iPhone)

孤人 提交于 2019-12-11 10:32:34

问题


What are the options available of parsing and/or tokenizing Objective-C on iPhone?

Essentially I'm thinking of parsing/tokenizing enough to power syntax highlighting and autocompletion at somewhat the same level as Xcode does.


回答1:


I know the topic is old, but this might help someone else.

Apple already provides the (very nice) CFStringTokenizer, with support for multiple languages. Here's a good presentation on that, including sample code. In case tokenization is enough, that should do it.

If parsing is required however (it shouldn't for syntax highlight) there's ParseKit or C-based solutions, such as YACC.

Best.



来源:https://stackoverflow.com/questions/11675661/parse-tokenize-objective-c-with-objective-c-iphone

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!