提升精神和提升凤凰问题
一个。是否可以定义使用传递到规则中的参数默认构造 Spirit 规则的局部变量?我有具有循环依赖关系的 AST 构建器对象,我想使用对父级的引用来初始化子级,父级通过引用传递 子解析器的规则。示例:规则<迭代器、void(Parent & p)、locals
注意:有多种方法可以实现我上面想要的功能。我只对上面提到的特定方法感兴趣,因为这是最干净的方法。
两个。如何将指针传递给懒惰的凤凰占位符?它不可能像&_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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
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.