开始使用Helvetia

发布于 2024-12-15 15:45:01 字数 204 浏览 1 评论 0原文

我愿意开始将我的语言嵌入Helvetia,但我真的不知道从哪里开始。 几周前,我使用 Petit Parser 编写了解析部分。 我想嵌入类似于以下的代码,例如 Helvetia 页面中的 sql 示例:

main ()
{
Put(Red)
Move(North)
}

我期待一些比 Helvetia 示例更简单的指南:P

I am willing to start embedding my language into Helvetia, but i dont really know where to start.
Some weeks ago i wrote the parsing part using Petit Parser.
I would like to embed code similar to the following, like the sql example in Helvetia page:

main ()
{
Put(Red)
Move(North)
}

I look forward some guide more simple :P than the Helvetia examples

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

残月升风 2024-12-22 15:45:02

Helvetia 发行版中包含各种示例,它们完全符合您的要求并且您可能想要研究:

  • Cutie-Helvetia-Automaton 使用低级 Helvetia 基础设施进行集成CUAutomatonGrammar 中定义的一种自动机语言。

  • Cutie-LanguageBoxes-SQL 使用高级语言框基础结构将 LBSqlGrammar 中定义的 SQL 嵌入到 Smalltalk 中。

There are various examples included with the distribution of Helvetia that do exactly what you are asking for and that you might want to study:

  • Cutie-Helvetia-Automaton uses the low-level Helvetia infrastructure to integrate an automaton language defined in CUAutomatonGrammar.

  • Cutie-LanguageBoxes-SQL uses the high-level language boxes infrastructure to embed SQL defined in LBSqlGrammar into Smalltalk.

爺獨霸怡葒院 2024-12-22 15:45:02

您可以查看

http://scg.unibe.ch/research/helvetia

特别是语言框 (6) 和嵌入语言而不破坏工具 (&) 上的 SCG 链接更详细地解释了如何使用 helvetia

http://www.lukas-renggli.ch/blog/phd-defend

You could look into

http://scg.unibe.ch/research/helvetia

particularly the publications in the SCG link on Language Boxes (6) and Embedding Languages without breaking tools (&) explain how to use helvetia in more detail

http://www.lukas-renggli.ch/blog/phd-defended

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文