Markus Werle wrote:
Hi!
While playing around with the examples of the spirit library I feel like I missed some essential points.
Hi Markus, First of all, FYI, Spirit has its own mailing list: Spirit-general@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/spirit-general I'm regularly reading this mailing list but I would want to request that further discussion happen there so that other Spirit users may see your post.
std::string comment_c;
all = ( *cpp_comment[actor_string(comment_c)] | *anychar_p ) ;
Try: all = *(cpp_comment[actor_string(comment_c)] |anychar_p) ; Notice the Star. Also, anychar_p should probably be replaced by your assignment rule.
result = parse (pCComment, all, space_p);
I think it is better to work on the character level rather than the phrase level. I suggest taking out the skip parser "space_p". HTH, -- Joel de Guzman joel at boost-consulting.com http://www.boost-consulting.com http://spirit.sf.net