-
Notifications
You must be signed in to change notification settings - Fork 159
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
x3::eps with a semantic action breaks parsing into structs #659
Comments
Semantic actions on a rule definition inhibit automatic attribute propagation. See: |
So, the function of |
Okay, found it in the documentation of Qi. https://www.boost.org/doc/libs/1_75_0/libs/spirit/doc/html/spirit/qi/reference/nonterminal/rule.html |
jktjkt
pushed a commit
to CESNET/netconf-cli
that referenced
this issue
Mar 8, 2021
There are actually two fixes: the first one is a direct fix to the linked issue. The attribute of the rule for switch was wrong. I'm not sure how I missed that, but OK, now we have tests. The other bug: For some reason, the completion generator prevented the symbol table parser from running and the value inside the resulting switch_ was undefined. Asserting the attribute of the completion generator seems to solve the issue. I thought this would have something to do with the fact that I'm using single member fusion structs. However, the bug still persisted even when converting them into non-fusion structs (as suggested in the first issue). At some point, all single-member fusion structs should be converted into non-fusion structs, but because it doesn't solve my problem, I won't be doing it now. Issue: boostorg/spirit#463 Issue: boostorg/spirit#659 Issue: https://tree.taiga.io/project/jktjkt-netconf-cli/issue/218 Change-Id: I364b32b76741c198808cc2b3c5027913162d0703
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, I'm trying to get rid of fusion stuff in my single-element structs as suggested in #463.
While doing that, I found a bug with semantic actions, where the struct doesn't get correctly filled with the value. This is how to reproduce.
My
operator=
actually never gets called. I'm not sure I implemented it correctly. Is this really a bug or am I doing something wrong?I have also tried adding another member into the struct and use BOOST_FUSION_ADAPT_STRUCT and the bug is still there: https://gist.github.com/syyyr/94f7f9a0b65e8d4a81eb7a55be8e62ff
Boost version: 1.75.0
The text was updated successfully, but these errors were encountered: