Skip to content

Need help understanding why actions don't [always] trigger #274

Answered by d-frey
0x8000-0000 asked this question in Q&A
Discussion options

You must be logged in to vote

This is due to the Interleaved-helper not actually generating the type you think it does. You comment suggests it generates

pegtl::seq< rule0, sep, rule1, sep, rule2, sep, ... >

whereas in fact, it generates

pegtl::seq< rule0, sep, interleaved< rule1, rule2, ... > >

and now your specializations for the actions don't match anymore.

You need a different approach, something like:

   // Template to generate rule                                                                                                                     
   // tao::pegtl::seq<Rule0, Separator, Rule1, Separator, Rule2, ... , Separator, RuleN>                                                            
   template< typename

Replies: 3 comments 17 replies

Comment options

You must be logged in to vote
16 replies
@d-frey
Comment options

@0x8000-0000
Comment options

@d-frey
Comment options

@0x8000-0000
Comment options

@d-frey
Comment options

Answer selected by 0x8000-0000
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@0x8000-0000
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants