实现元语言编译为 PHP 的最佳方式

发布于 2024-08-23 09:04:17 字数 285 浏览 1 评论 0原文

一段时间以来,我一直在研究可以编译为 PHP 的元语言的规范/kitchensink。现在我想开始建造这个东西。在我使用 PHP_Lexergenerator 和 PHP_Parsergenerator 实现小型 DSL 之前,它们工作得很好,但我以前从未构建过如此规模的任何东西。如果您有任何反馈/建议/经验,我将不胜感激!

我将规范粘贴到 http://pastebin.com/613mFGsB

I've been working on the specification / kitchensink for a meta language that can compile down to PHP for some time now. Now I want to begin building the thing. Before I have implemented tiny DSL's using PHP_Lexergenerator and PHP_Parsergenerator and they have worked very well but I have never build anything this scale before. I would appreciate any feedback / suggestions / experiences you may have greatly!

I pasted the spec at http://pastebin.com/613mFGsB.

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

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

发布评论

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

评论(3

虫児飞 2024-08-30 09:04:18

无论如何,不​​要让其他人的类似项目阻止您这样做。无论您在这个项目上取得了多大的进展,您从这个项目中真正得到的是对编码和解析的进一步理解。如果您只是加入现有项目,您将无法深入获得这些知识。

我还想指出,如果 Linux、Ubuntu 等最初的制造者只是“跳上”别人类似项目的船,那么它们就永远不会存在。不要害怕自己创造东西,有时伟大就是从中产生的。

Don't let similar projects by other people stop you from doing this anyways. No matter how far you get with this, what you'll really get out of this project is a further understanding of coding and parsing. You won't gain this knowledge as in depth if you simply join an existing project.

I'd also like to point out, things like Linux, Ubuntu, etc would have never existing if their original makers simply "jumped on the boat" of somebody else's similar project. Don't be afraid to make things yourself, sometimes greatness comes out of it.

南冥有猫 2024-08-30 09:04:18

Haxe 是一种以 PHP 为编译目标的语言。这似乎与您想要实现的目标相似。这是OSS,所以你可以看看他们是怎么做的。

Haxe is a language that implements PHP as a compilation target. It seems similar to what you're trying to achieve. It's OSS, so you could take a look at how they do it.

寻找一个思念的角度 2024-08-30 09:04:18

pihipi 是一个有趣的例子,但现在我已经杀死了它。所以请查看 Haxe:Haxe 是一种以 PHP 为编译目标的语言。这似乎与您想要实现的目标相似。这是OSS,所以你可以看看他们是怎么做的。

pihipi was an interesting example of this, but now I've killed it. So check out Haxe: Haxe is a language that implements PHP as a compilation target. It seems similar to what you're trying to achieve. It's OSS, so you could take a look at how they do it.

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