Re: X3 employee example with semantic actions
Larry Evans <[email protected]> Tue, 5 Jun 2018 11:43:22 -0500
| Newsgroups | gmane.comp.parsers.spirit.general |
|---|---|
| Message-ID | <[email protected]> |
On 06/03/2018 09:03 PM, Joel de Guzman wrote:
> On 04/06/2018 5:41 AM, Seth wrote:
>> On 03-06-18 23:34, Maarten Verhage wrote:
>>> Sure I'm willing to learn. But where can I find the compiler examples
>>> you
>>> mentioned?
>>
>> look for `position_tagged` and `annotate_on_success` in e.g.
>> https://github.com/boostorg/spirit/blob/develop/example/x3/rexpr/rexpr_full/rexpr/rexpr_def.hpp
>>
>
> Also check out the new examples (in devel) and the updated docs!
>
> Regards,
Joel,
I was able to build the docs, but only after I'd built quickbook.
Couldn't there be specified a dependency of spirit docs on quickbook.
After reading the docs briefly, I attempted an
as-close-as-possible ast annotation version of:
https://gist.github.com/cppljevans/0f4351f127c2e651d8094877a9510e5a#file-x3-employee-beg_end_attr_actions-cpp
That ast annotation implementation is here:
https://gist.github.com/cppljevans/0f4351f127c2e651d8094877a9510e5a#file-x3-employee-annot_attr-cpp
when run, it shows the attributes includes *both* the delimiters to the
input but also the actual employee::{age,first_name,last_name,salary}
attributes. I thought Maarten was wanting to avoid that,
Maarten, is that right?
-regards,
Larry
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot