开发者

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. 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


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜