TextMate 语言解析器在哪里?
有谁知道 TextMate 用于语法突出显示的代码隐藏在哪里?如果没有,你知道他们如何解析他们的语言语法,或者你会如何解析他们的语言语法吗?
那就太棒了。
谢谢! 槊
Does anyone know where the code TextMate uses for syntax highlighting is burried? If not, do you know how they parse their language syntaxes, or how you would parse their language syntaxes?
That would be awesome to look into.
Thanks!
Lance
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我相信 TextMate 使用 Antlr 进行解析。 在包装内查找它。 Antlr 有一个 Objective-C 目标,但这并不意味着 Allen Odgaard 选择了该特定语言,但它是考虑到 TextMate 是一个 Cocoa 应用程序,这种可能性很大。
Antlr 的创建者 Terrence Parr 写了两本关于/使用 Antlr 的书:
权威的 Antlr 参考
语言实现模式
如果您有兴趣,两者都值得一读当然,最终应该继续阅读《龙》一书,但是这些书以及 Antlr 将让您快速入门。
I believe TextMate uses Antlr for parsing. Look for it inside the package. Antlr has an Objective-C target, but this doesn't mean that Allen Odgaard chose that particular language, but it is highly likely, given that TextMate is a Cocoa application.
Terrence Parr, the creator of Antlr, has written two books on/using Antlr:
The Definitive Antlr Reference
Language Implementation Patterns
Both are worth reading if you are interested in parsing, etc.... Of course, one should eventually move on to the dragon book,, but these books, along with Antlr, will allow you to get moving quickly.