Re: Qi lexeme only taking the first word
Michael Powell <[email protected]> Tue, 6 Nov 2018 19:08:18 -0500
| Newsgroups | gmane.comp.parsers.spirit.general |
|---|---|
| Message-ID | <CAMEoF_Ho-swBTvEh0m6cKQU+6bh1sbBW1vm1aNV0ohAXrK1mXA@mail.gmail.com> |
On Tue, Nov 6, 2018 at 6:32 PM Dan Bloomquist <[email protected]> wrote: > > Michael Powell wrote: > > > >> For instance, parsing "two.oranges.red.test", I receive back "two" in the AST. > >> > >> Perhaps I should defer specifying the lexeme part of id until later? > > I elaborated a little on the "simple" full id sub-grammar, but I > > cannot repro using the GCC compiler. I'm wondering if this has > > anything to do with the VS2017 fpos issue? > > > > http://coliru.stacked-crooked.com/a/adeb42ce2f19b0fd > > > > Or there may be insufficient context in the web compiler to adequately demo. > > > > As I may be one of the few that uses vs2017 here, the code you posted at > crook.com finishes with: > > Parse succeeded > one1.apples2.first3.test I got a repro: http://coliru.stacked-crooked.com/a/069a44296240be7e Although the reasons as to why I do not know. It is a difference in attribute synthesis. When full_id synthesizes a std::string(), the conversion to full_id_t() "just works" magically. I'm guessing by happy accident based on the std::string val being the only member (adaptation, etc). But when I change the synthesis to be its "true" type, that is, AST::full_id_t(), suddenly I see the same behavior. Really and truly, I do not know why. Everything else being equal why would one approach be any different than the other? Anyone with some Spirit, Fusion, AST, insights? Thanks! For now, I'll run with it as has been exposed here, but it's a bit troubling to me not knowing the difference. > For me. > Best, Dan. > > > > _______________________________________________ > Spirit-general mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/spirit-general