简体   繁体   English

提升精神,提升凤凰问题

[英]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

1) There is no way of doing this, although it's a nice idea and worth investigating. 1)没有办法做到这一点,虽然这是一个好主意,值得研究。 2) Answered here 3) The mini-review of Phoenix V3 has ended March 2nd, the results have been published here . 2)回答这里 3)凤凰V3的迷你审查已经结束3月2日,该成果已发表在这里

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在使用boost :: spirit :: karma生成时避免boost :: phoenix - How to avoid boost::phoenix when generating with boost::spirit::karma boost :: phoenix :: at_c是否有替代boost :: spirit :: qi :: grammar的替代方法 - Is there an alternative for boost::phoenix::at_c in combination with boost::spirit::qi::grammar 在boost :: spirit :: qi的语义动作中,boost :: phoenix :: bind和boost :: phoenix :: actors存在问题 - Problems with boost::phoenix::bind and boost::phoenix::actors in a semantic action for boost::spirit::qi Boost.Spirit.Lex中Phoenix占位符_val错误:( - Error with Phoenix placeholder _val in Boost.Spirit.Lex :( 提升qi :: grammar不使用spirit / phoenix更新valuetype - boost qi::grammar not updating valuetype using spirit/phoenix c++ 函数式编程 ( boost::phoenix &amp;&amp; boost::spirit) 测试指针占位符中的空指针 - c++ functional programming ( boost::phoenix && boost::spirit) testing for null-ptrs in pointer placeholders Boost Spirit:错误 C2664,无法转换 'const boost::phoenix::actor<eval> '到'字符'</eval> - Boost Spirit: Error C2664, Cannot convert 'const boost::phoenix::actor<Eval>' to 'char' Boost.Spirit语法。 属性和_val问题 - Boost.Spirit Grammar. Attributes and _val Questions 通过源提升精神解析 - boost spirit parse with the source 跟踪boost :: spirit的位置 - Trace the position of boost::spirit
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM