Re: X3 employee example with semantic actions
Larry Evans <[email protected]> Fri, 1 Jun 2018 22:43:52 -0500
| Newsgroups | gmane.comp.parsers.spirit.general |
|---|---|
| Message-ID | <[email protected]> |
On 06/01/2018 10:19 PM, Larry Evans wrote: > On 06/01/2018 05:54 PM, Larry Evans wrote: >> On 06/01/2018 05:09 PM, Larry Evans wrote: > [snip] >>> OOPS :( >>> I failed to notice the printout of the attribute after parse >>> did not reflect the input to the parse. >>> >>> I'm now trying to figure out why that's so. >>> >>> I guess that was your main concern. >>> [snip] >> >> Specifying the rule default attribute, force_attribute=true, changed >> the output so that it reflected the input for me. IOW: >> >> x3::rule<employee_id, ast::employee, true> const >> employee = "employee"; >> >> See if that doesn't get you better results. >> > > Although making force_attribute=true gets correct result, I don't > understand why. In addition, when the semantic actions are removed, > then it works when force_attribute=false. > > That seems very counter-intuitive. Is it a bug? OOPS. No. Searching mailing list turns up mentions of it. See post with headings: From: Seth <[email protected]> Newsgroups: gmane.comp.parsers.spirit.general Subject: Re: How to force attribute propagation in x3 when using semantic actions Date: Fri, 15 Dec 2017 15:53:09 +0100 ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Spirit-general mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/spirit-general