提升精神和提升凤凰问题

发布于 2024-10-20 16:38:46 字数 607 浏览 9 评论 0原文

一个。是否可以定义使用传递到规则中的参数默认构造 Spirit 规则的局部变量?我有具有循环依赖关系的 AST 构建器对象,我想使用对父级的引用来初始化子级,父级通过引用传递 子解析器的规则。示例:规则<迭代器、void(Parent & p)、locals> child_parser;

注意:有多种方法可以实现我上面想要的功能。我只对上面提到的特定方法感兴趣,因为这是最干净的方法。

两个。如何将指针传递给懒惰的凤凰占位符?它不可能像&_r1&arg1那么简单

注意:这个问题已被单独提出这里,你可以在那里回答。

三. lambda / phoenix 合并进展如何,知道合并何时进行吗?

ps,提前感谢您回答我的问题 Hartmut :D

one. Is it possible to define that a spirit rule's local variable be default constructed using a parameter passed into the rule ? I have AST builder objects that have a cyclic dependency, I would like to initialize the child with a reference to the parent, the parent is passed by reference to
the child parser's rule. Example: rule< Iterator, void(Parent & p), locals<child> > child_parser;

Note: there are ways of doing what I want above. I am only interested in the particular approach I have stated above, as it is the cleanest way of doing it.

two. How does one pass a pointer to a lazy phoenix placeholder ? it can't be as simple as &_r1 or &arg1

Note: This question has been asked seperately here, you could answer it there.

three. How is the lambda / phoenix merger going, any idea when the merger will take place ?

p.s., thanks in advance for answering my question Hartmut :D

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

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

发布评论

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

评论(1

成熟的代价 2024-10-27 16:38:46

1)没有办法做到这一点,尽管这是一个好主意并且值得研究。
2)在此处回答
3)Phoenix V3的小评审已于3月2日结束,结果已发布这里

1) There is no way of doing this, although it's a nice idea and worth investigating.
2) Answered here
3) The mini-review of Phoenix V3 has ended March 2nd, the results have been published here.

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