|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r52988 - trunk/boost/spirit/home/lex/lexer/lexertl
From: hartmut.kaiser_at_[hidden]
Date: 2009-05-14 09:16:24
Author: hkaiser
Date: 2009-05-14 09:16:23 EDT (Thu, 14 May 2009)
New Revision: 52988
URL: http://svn.boost.org/trac/boost/changeset/52988
Log:
Spirit: Fixed a problem in static lexer generator
Text files modified:
trunk/boost/spirit/home/lex/lexer/lexertl/generate_static.hpp | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
Modified: trunk/boost/spirit/home/lex/lexer/lexertl/generate_static.hpp
==============================================================================
--- trunk/boost/spirit/home/lex/lexer/lexertl/generate_static.hpp (original)
+++ trunk/boost/spirit/home/lex/lexer/lexertl/generate_static.hpp 2009-05-14 09:16:23 EDT (Thu, 14 May 2009)
@@ -32,7 +32,7 @@
generate_cpp_state_names (boost::lexer::basic_rules<Char> const& rules_
, std::ostream &os_, char const* name_suffix = "")
{
- // we need to re-sort the state names in ascending order if the state
+ // we need to re-sort the state names in ascending order of the state
// ids, filling possible gaps in between later
typedef typename
boost::lexer::basic_rules<Char>::string_size_t_map::const_iterator
@@ -54,7 +54,8 @@
typedef typename reverse_state_map_type::iterator iterator;
iterator rend = reverse_state_map.end();
std::size_t last_id = 0;
- for (iterator rit = reverse_state_map.begin(); rit != rend; ++rit)
+ for (iterator rit = reverse_state_map.begin(); rit != rend;
+ ++rit, ++last_id)
{
for (/**/; last_id < (*rit).first; ++last_id)
{
@@ -107,7 +108,7 @@
os_ << "#include <boost/spirit/home/support/detail/lexer/char_traits.hpp>\n\n";
os_ << "// the generated table of state names and the tokenizer have to be\n"
- "// defined in the boost::spirit::lex::static namespace\n";
+ "// defined in the boost::spirit::lex::lexertl::static_ namespace\n";
os_ << "namespace boost { namespace spirit { namespace lex { "
"namespace lexertl { namespace static_ {\n\n";
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