Thanks to the help from user 'sehe' I'm now at the point where I can compile my ast.
(Please see here: https://stackoverflow.com/a/29301655/1835623 )
Now one of the data fields extracted from JEDEC file I need to parse looks like this:
"12345 0000100101010111010110101011010"
I already built a parser to consume these kind of fields:
std::string input("12345 010101010101010101010");
std::string::iterator st = input.begin();
qi::parse(st, input.end(), qi::ulong_ >> ' ' >> *qi::char_("01"));
Obviously not that complicated. Now my problem is that I want to assign the ulong_ and the binary string to some local variables using a semantic action. This is what I did:
using boost::phoenix::ref;
std::string input("12345 010101010101010101010");
std::string::iterator st = input.begin();
uint32_t idx;
std::string sequence;
qi::parse(st, input.end(),
qi::ulong_[ref(idx) = qi::_1] >>
' ' >>
*qi::char_("01")[ref(sequence) += qi::_2]);
But unfortunately this doesn't even compile and the error message I get is not helpful (at least to me)? I guess it's something simple... but I'm hopelessly stuck now. :-(
Does someone have an idea what I'm doing wrong?