is there some trick to have an epsilon_p as a root_node?
so id like this grammar to work:
Code:expression_0 = expression_1 >> *(root_node_d[epsilon_p] >> expression_2) //!!! doesnt work ; expression_1 = expression_2 >> *( (root_node_d[ch_p('+')] >> expression_2) // works perfectly (root_node_d[ch_p('-')] >> expression_2) ); expression_2 = identifier | value | inner_node_d['(' >> expression_0 >> ')'] ; expression = expression_0 ;
unfortunately, there is no root node created for the rule expression_0.
so instead of building the abstract syntax tree for
"a b c d"
the tree is built as:Code: / \d  / \  c / \ a b
Code: / | | \ a b c d