|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r78352 - trunk/libs/spirit/example/lex
From: jamin.hanson_at_[hidden]
Date: 2012-05-06 10:28:43
Author: ben_hanson
Date: 2012-05-06 10:28:42 EDT (Sun, 06 May 2012)
New Revision: 78352
URL: http://svn.boost.org/trac/boost/changeset/78352
Log:
Changed '*' to '+', as per lex example in the comment.
Text files modified:
trunk/libs/spirit/example/lex/print_numbers.cpp | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
Modified: trunk/libs/spirit/example/lex/print_numbers.cpp
==============================================================================
--- trunk/libs/spirit/example/lex/print_numbers.cpp (original)
+++ trunk/libs/spirit/example/lex/print_numbers.cpp 2012-05-06 10:28:42 EDT (Sun, 06 May 2012)
@@ -44,7 +44,7 @@
print_numbers_tokens()
: print_numbers_tokens::base_type(lex::match_flags::match_not_dot_newline)
{
- this->self = lex::token_def<int>("[0-9]*") | ".|\n";
+ this->self = lex::token_def<int>("[0-9]+") | ".|\n";
}
};
@@ -58,7 +58,7 @@
: print_numbers_grammar::base_type(start)
{
// we just know, that the token ids get assigned starting min_token_id
- // so, "[0-9]*" gets the id 'min_token_id' and ".|\n" gets the id
+ // so, "[0-9]+" gets the id 'min_token_id' and ".|\n" gets the id
// 'min_token_id+1'.
start = *( qi::token(lex::min_token_id) [ std::cout << _1 << "\n" ]
| qi::token(lex::min_token_id+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