使用Objective-C解析/标记Objective-C(iPhone) [英] Parse/tokenize objective-c with objective-c (iPhone)
问题描述
在iPhone上解析和/或标记化Objective-C有哪些可用选项?
What are the options available of parsing and/or tokenizing Objective-C on iPhone?
本质上,我正在考虑对语法的解析/标记化,使其足以在与Xcode相同的级别上增强语法高亮和自动补全功能.
Essentially I'm thinking of parsing/tokenizing enough to power syntax highlighting and autocompletion at somewhat the same level as Xcode does.
推荐答案
我知道这个话题很旧,但这可能会对其他人有所帮助.
I know the topic is old, but this might help someone else.
Apple已经提供了(非常好) CFStringTokenizer ,并支持多种语言. 在此对此进行了很好的介绍,包括示例代码.如果令牌化足够,那就应该这样做.
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.
但是,如果需要解析(不应突出显示语法),则可以使用 ParseKit 或基于C解决方案,例如 YACC .
If parsing is required however (it shouldn't for syntax highlight) there's ParseKit or C-based solutions, such as YACC.
最好.
这篇关于使用Objective-C解析/标记Objective-C(iPhone)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!