Hi,

thanks for the example. Unfortunately, I believe my problem is somewhat more
complicated. With your example, statements are all of the same type (except for
comments, but these are skipped anyway). I'd like to parse more general statements.
These may be specified in any order. I thought I could accomplish the 'any order' thing
by using an abstract base type 'Statement' to derive specialized statements from.
By parsing statement blocks into std::vectors using something like

r_block %= *r_statement; // rule is declared to parse into std::vector<Statement>
r_statement = r_statementType0 | r_statementType1 | .. | r_statementTypeN;

I would like to retrieve a list of these statements. Problem is that I don't no how to
'BOOST_FUSION_ADAPT_STRUCT()' the hierarchy.

Cheers, Stefan

On 12/15/2011 06:14 PM, mark pashley wrote:
Here is an example parser that I wrote based on the tutorials that you should
be able to adapt...

http://softobjects.co.uk/mediawiki-1.16.0/index.php/Boost::Spirit_Config_File_Parser

hope it helps

--
View this message in context: http://boost.2283326.n4.nabble.com/Parsing-statements-from-ascii-files-in-arbitrary-order-into-hierarchies-of-structs-using-boost-spirit-tp4199965p4200823.html
Sent from the Boost - Users mailing list archive at Nabble.com.
_______________________________________________
Boost-users mailing list
Boost-users@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users