#10746 closed Bugs (invalid)
Compiler error for valid boost::spirit::qi grammar
Reported by: | Owned by: | Joel de Guzman | |
---|---|---|---|
Milestone: | To Be Determined | Component: | spirit |
Version: | Boost 1.56.0 | Severity: | Showstopper |
Keywords: | Cc: |
Description
Due to #8630 I wanted to write a uuid parser using boost::spirit::qi.
It failed with a compiler error. (Tested on g++ 4.8.2 and clang++ 3.5 on Linux amd64)
Attachments (1)
Change History (5)
by , 8 years ago
Attachment: | uuidparser.cc added |
---|
comment:1 by , 8 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
It's not a bug. You hit the limits. You can adjust phoenix limits, but I suggest writing a better grammar without semantic actions. It can be done. Go ask the mailing list: https://lists.sourceforge.net/lists/listinfo/spirit-general.
I'm closing his one.
comment:2 by , 8 years ago
So it is a bug in the documentation because I cannot find this limit. :-/
follow-up: 4 comment:3 by , 8 years ago
Sorry about that. Yes you are probably right, it is a documentation bug.
And let me correct myself, it's a fusion limit, not a phoenix limit. Just define #define FUSION_MAX_VECTOR_SIZE 20 before anything else, and you are good.
This limit is documented here: http://www.boost.org/doc/libs/1_57_0/libs/fusion/doc/html/fusion/container/vector.html
This should probably be linked to in Spirit. Feel free to issue another ticket, or better yet, submit a doc patch/PR.
comment:4 by , 8 years ago
Replying to djowel:
And let me correct myself, it's a fusion limit, not a phoenix limit. Just define #define FUSION_MAX_VECTOR_SIZE 20 before anything else, and you are good.
Okay, thanks for you fast answer. I try to circumvent the limit and hope for a boost version that supports real variadic templates so such limits will vanish. :-)
This limit is documented here: http://www.boost.org/doc/libs/1_57_0/libs/fusion/doc/html/fusion/container/vector.html
I never heard of "fusion" before (except in the compiler error message) so I didn't know of such limits.
This should probably be linked to in Spirit. Feel free to issue another ticket, or better yet, submit a doc patch/PR.
Done: #10752 :-)
Lars R.
Provokes the compiler error if line 32 is enabled