方案核心语言规范
我正在学习Scheme,并且我对语言的构建方式特别感兴趣。我试图找到一个关于方案实现的核心语法的很好的描述。我对标准了解不够,但我假设它们都包含宏系统。如果没有,我想阅读一个还包含宏的标准(它们不可能在更简单的方案构造中实现,不是吗?)。
有人对Scheme方言所需的最小语法有很好的参考吗?
只是更新:
我也偶然发现了这一点:http://matt.might。 net/articles/compiling-to-java/#sec1.如果您还添加 define-syntax
和 delay
那么看起来这可能是一个好的开始。
在 R5RS 规范中,以下页面似乎是我正在寻找的内容: 正式语法
I am learning my way around Scheme, and I am especially interested in how the language is constructed. I'm trying to find a nice description of the core syntax for a Scheme implementation. I don't know enough about the standards, but I assume that they all contain macro systems. If not, I'd like to read about a standard that also includes macros (they can't possibly be implemented in simpler Scheme constructs, can they?).
Does anyone have a good reference for the minimal syntax needed for a Scheme dialect?
Just an update:
I also stumbled upon this: http://matt.might.net/articles/compiling-to-java/#sec1. If you also add define-syntax
and delay
then it seems like it might be a good start.
In the R5RS specification, the following page appears to be what I was looking for: formal syntax
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
虽然可能有点枯燥,但您应该仔细阅读 R5RS 规范 或 R6RS 规范。
阅读这些文档实际上并不需要那么长时间,您可以浏览大部分部分,直到需要更多详细信息为止。但任一文档都涵盖了所需的所有最少语法,包括宏。
Although it may be a bit dry, you should read over the R5RS spec or the R6RS spec.
The docs really do not take that long to read through and you can just skim most of the sections until you need more detail. But either document does cover all of the minimal syntax required, including macros.