Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#10746 closed Bugs (invalid)

Compiler error for valid boost::spirit::qi grammar

Reported by: lars.rohwedder@… 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)

uuidparser.cc (1.7 KB ) - added by lars.rohwedder@… 8 years ago.
Provokes the compiler error if line 32 is enabled

Download all attachments as: .zip

Change History (5)

by lars.rohwedder@…, 8 years ago

Attachment: uuidparser.cc added

Provokes the compiler error if line 32 is enabled

comment:1 by Joel de Guzman, 8 years ago

Resolution: invalid
Status: newclosed

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 anonymous, 8 years ago

So it is a bug in the documentation because I cannot find this limit. :-/

comment:3 by Joel de Guzman, 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.

in reply to:  3 comment:4 by anonymous, 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.

Note: See TracTickets for help on using tickets.