[英]Boost Spirit and Boost Phoenix questions
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.
我有AST构建器对象具有循环依赖关系,我想通过引用父对象来初始化子对象,父对象通过引用传递给子解析器的规则。 Example:
rule< Iterator, void(Parent & p), locals<child> > child_parser;
示例:
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
它不能像
&_r1
或&arg1
那么简单
Note: This question has been asked seperately here , you could answer it there. 注意:这个问题已经被问seperately 在这里 ,你能回答它。
three. 三。 How is the lambda / phoenix merger going, any idea when the merger will take place ?
如果合并将会发生,那么lambda / phoenix合并的情况如何?
ps, thanks in advance for answering my question Hartmut :D ps,提前感谢回答我的问题Hartmut:D
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.