On Sat, Apr 3, 2010 at 9:40 PM, philip tucker
Hello,
I have a Spirit program that fails with a segmentation fault and I can't see why. I hope you can help.
I'm starting from a simplified version of struct.cpp, known to work. I want to abstract the identifier grammar into its own struct and use that instead of the inline grammar for an identifier. The problem code is attached.
What have I done wrong?
Thanks as always for your patient, expert, and helpful comments.
P.S.
I'm running boost_1_42_0 with
gcc -v: Using built-in specs. Target: i686-apple-darwin9 Configured with: /var/tmp/gcc_42/gcc_42-5574~1/src/configure --disable-checking --enable-werror --prefix=/usr --mandir=/usr/share/man --enable-languages=c,objc,c++,obj-c++ --program-transform-name=/^[cg][^.-]*$/s/$/-4.2/ --with-slibdir=/usr/lib --build=i686-apple-darwin9 --with-gxx-include-dir=/usr/include/c++/4.0.0 --host=i686-apple-darwin9 --target=i686-apple-darwin9 Thread model: posix gcc version 4.2.1 (Apple Inc. build 5574)
on
Model Name: iMac Model Identifier: iMac9,1 Processor Name: Intel Core 2 Duo Processor Speed: 2.66 GHz Number Of Processors: 1 Total Number Of Cores: 2 L2 Cache: 6 MB Memory: 2 GB Bus Speed: 1.07 GHz Boot ROM Version: IM91.008D.B08 SMC Version (system): 1.44f0
P.S.S
If you want the coredump, let me know.
I cannot run it right now, not at home, but first of all, you can
change the id grammar to this (will run and compile faster):
template <typename Iterator>
struct id_grammar : qi::grammar