Boo 元编程和可扩展性功能的指南?
我有兴趣了解 Boo 更强大的功能,例如语法宏、解析器支持(Ometa?)、编译器管道等。我的印象是这些领域一直在变化,而且记录有些不足。除了研究源代码之外,还有什么好的资源可以学习这些东西吗?
I'm interested in learning about Boo's more powerful features such as syntactic macros, parser support (Ometa?), compiler pipeline, etc. My impression is that these areas have been in flux and somewhat under-documented. Are there any good resources for learning about these things other than studying the source code?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
询问 Code Gardener / boo 作者@rodgrigobamboo!
"boo 元编程工具 I - the ast”。
ask code gardener / boo author @rodgrigobamboo!
"boo metaprogramming facilities I - the ast".
在 Boo 中构建领域特定语言。我得到了一个早期的早期访问版本,并发现它因你提到的“流动”原因而令人沮丧;我最终放弃了。希望从那时起事情已经稳定下来。
There's Building Domain Specific Languages in Boo. I got an early early access edition and found it frustrating for the "flux" reason you mentioned; I finally gave up. Hopefully things have stabilized since then.
欢迎在邮件列表中提问:
http://groups-beta。 google.com/group/boolang?pli=1
Feel free to ask questions on the mailing list:
http://groups-beta.google.com/group/boolang?pli=1
到目前为止,了解 Boo 功能的最佳参考是花大量时间进行测试。需要一段时间才能搞清楚到底发生了什么,但这些测试确实锻炼了所有可用的能力,而且写得很好。
https://github.com/bamboo/boo /blob/master/tests/testcases/macros/macro-1.boo
另外,请注意 boo 的解释器 - booish- 非常出色,如果您不确定测试是如何工作的,您可能应该花时间嘘声刺激它。
http://boo.codehaus.org/Interactive+Interpreter
By far the best reference to see what Boo can do is to spend a bunch of time going through the tests. It takes a while to puzzle out what's going on, but the tests really do flex all of the muscles that are available and are quite well written.
https://github.com/bamboo/boo/blob/master/tests/testcases/macros/macro-1.boo
Also, note that boo's interpretter- booish- is really excellent and if you're not sure how a test works, you should probably spend time in booish prodding at it.
http://boo.codehaus.org/Interactive+Interpreter
我没有广泛浏览这个网站,但看起来它可能有 Boo 的最佳参考:
http://boo.codehaus.org/Tutorials
这部分仍然没有很好的记录,但如果你看一下在 https://github.com/bamboo/boo/wiki/Syntropic-Macros 你可以看到如何制作语法宏。基本上,您必须实现
Boo.Lang.Compiler.IAstMacro
。正确的部分位于 https://github.com/bamboo/boo/wiki /Abstract-Syntax-Tree 但它在很大程度上似乎不完整。
I haven't looked through this site extensively, but it appears it may have the best references for Boo:
http://boo.codehaus.org/Tutorials
This section is still not well documented but if you look at https://github.com/bamboo/boo/wiki/Syntactic-Macros you can see how to make syntactic macros. Basically you have to implement
Boo.Lang.Compiler.IAstMacro
.The correct section is in https://github.com/bamboo/boo/wiki/Abstract-Syntax-Tree but it largely seems incomplete.