Re: Incompatible skipper type?
Michael Powell <[email protected]> Fri, 11 Jan 2019 10:35:00 -0500
| Newsgroups | gmane.comp.parsers.spirit.general |
|---|---|
| Message-ID | <CAMEoF_Fq80Q6zOWc-5=S1L7uYcEj8nOyZp_iwwmsjaAFPDXTrQ@mail.gmail.com> |
On Fri, Jan 11, 2019 at 4:32 AM Seth <[email protected]> wrote: > > Op 10-01-19 om 22:22 schreef Michael Powell: > > struct json_grammar : qi::grammar<It, value_t(), Skipper> { > > using iterator_type = It; > > using skipper_type = Skipper; > > using char_rule_type = qi::rule<It, char()>; > > json_grammar() : json_grammar::base_type(value_) { > > // ... > > } > > The code shown doesn't reproduce the error, so it's not the start rule. > > In that case, it must be one of the rule definitions that calls a nested > rule without the correct skipper. (Calling a rule that doesn't declare a > skipper makes it implicitly a lexeme, see > https://stackoverflow.com/questions/17072987/boost-spirit-skipper-issues/17073965#17073965 > for more interactions of `skip[]`, `no_skip[]`, `lexeme[]` and even > `raw[]`). I suppose it would make some sense, then, that the atomic elements of the grammar, the floats, integers, even string literals, would themselves require no skippage. On the other hand, the more complex aspects of the grammar, the members, objects, arrays, and so forth, those would require skippage. > Minimal self-contained version of your code: > http://coliru.stacked-crooked.com/a/df0a1c28c6ce3cc0 Thanks so much. I'll have a look.