How can I use polymorphic attributes with boost::spirit::qi parsers?
Spirit is a lot friendlier to compiletime-polymorphism typedef variant<Command1, Command2, Command3> Command; But, let’s suppose you really want to do the old-fashioned polymorphism thing… Just newing-up the polymorphic objects on the fly during parsing, however, is a sure-fire way to make your parser bloated with semantic actions create lot of memory leaks on back-tracking in … Read more