Re: Not able to use x3::skip(skipper)[some recursive rule] in its rule definition
Larry Evans <[email protected]>
| Newsgroups | gmane.comp.parsers.spirit.general |
|---|---|
| Message-ID | <[email protected]> |
On 07/25/2017 09:54 AM, Larry Evans wrote: > On 07/25/2017 09:18 AM, Han Wang wrote: >> Hi Larry, >> >> I think we cannot just change make_context to make_unique_context here >> in x3::skip_directive. If there already is a skipper in the context >> (x3::space e.g), the new skipper (ruleComment) will be ignored >> (because x3::make_unique_context will simply return the original >> context). >> > [snip] > Good catch. I had assumed that context<ID,val,NEXT> was a dictionary > with only 1 value for given ID. However, I guess there could be > several entries where ID==skipper_tag and only the 1st one is retrieved > by the context.get<ID_>(ID_) member function. I guess there's some > method to pop the top value with given ID off the context stack. > > In that case, I've no idea how to solve the problem. > > Sorry :( > > -regards, > Larry > I kept trying and *maybe* this: https://github.com/cppljevans/spirit/blob/get_rhs/include/boost/spirit/home/x3/directive/skip.hpp#L85 will solve problem. It did successfully compile & run your test program. HTH. -regards, Larry ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot