Boost logo

Boost-Commit :

From: hartmut.kaiser_at_[hidden]
Date: 2008-07-14 22:29:48


Author: hkaiser
Date: 2008-07-14 22:29:47 EDT (Mon, 14 Jul 2008)
New Revision: 47431
URL: http://svn.boost.org/trac/boost/changeset/47431

Log:
Spirit.Lex: Fixed strip_comments example
Text files modified:
   branches/release/libs/spirit/example/lex/strip_comments.cpp | 4 ++--
   1 files changed, 2 insertions(+), 2 deletions(-)

Modified: branches/release/libs/spirit/example/lex/strip_comments.cpp
==============================================================================
--- branches/release/libs/spirit/example/lex/strip_comments.cpp (original)
+++ branches/release/libs/spirit/example/lex/strip_comments.cpp 2008-07-14 22:29:47 EDT (Mon, 14 Jul 2008)
@@ -65,7 +65,7 @@
     void def (Self& self)
     {
         // define tokens and associate them with the lexer
- cppcomment = "//.*\n";
+ cppcomment = "//[^\n]*";
         ccomment = "/\\*";
         endcomment = "\\*/";
         
@@ -110,7 +110,7 @@
                               *token(IDANY) >> tok.endcomment
                           ]
                   | tok.cppcomment
- | token(IDANY)
+ | token(IDANY) [ std::cout << _1 ]
                   )
               ;
     }


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