Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r61581 - trunk/libs/spirit/example/scheme/test/qi
From: hartmut.kaiser_at_[hidden]
Date: 2010-04-26 13:34:50


Author: hkaiser
Date: 2010-04-26 13:34:49 EDT (Mon, 26 Apr 2010)
New Revision: 61581
URL: http://svn.boost.org/trac/boost/changeset/61581

Log:
Spirit: added 'what' string as name to generated rules in Qi compiler
Text files modified:
   trunk/libs/spirit/example/scheme/test/qi/qi_interpreter.cpp | 4 ++++
   1 files changed, 4 insertions(+), 0 deletions(-)

Modified: trunk/libs/spirit/example/scheme/test/qi/qi_interpreter.cpp
==============================================================================
--- trunk/libs/spirit/example/scheme/test/qi/qi_interpreter.cpp (original)
+++ trunk/libs/spirit/example/scheme/test/qi/qi_interpreter.cpp 2010-04-26 13:34:49 EDT (Mon, 26 Apr 2010)
@@ -15,6 +15,7 @@
 
 #include <iostream>
 #include <fstream>
+#include <strstream>
 #include <map>
 
 #include "../../../../test/qi/test.hpp"
@@ -49,6 +50,9 @@
         int new_rule()
         {
             rules[index];
+ std::stringstream str;
+ str << qi::what(expr);
+ rules[index].name(str.str());
             return index++;
         }
 


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk