Is it possible to reuse a Spirit Qi grammar as a Spirit Karma grammar?
问题 I have a Qi grammar definition that I use to parse an input. Later I have a Karma generator to output in a way that should be similar to the input. Is this possible at all? It seem that a parser grammar can be transformed into a generator grammar automatically (??). #include <boost/config/warning_disable.hpp> #include <boost/spirit/include/qi.hpp> #include <boost/spirit/include/karma.hpp> #include <iostream> int main(){ //test input std::string s = "Xx 1.233 pseudo"; //input variables std: