|
Boost-Commit : |
From: hartmut.kaiser_at_[hidden]
Date: 2008-05-30 20:43:26
Author: hkaiser
Date: 2008-05-30 20:43:25 EDT (Fri, 30 May 2008)
New Revision: 45967
URL: http://svn.boost.org/trac/boost/changeset/45967
Log:
Spirit.Lex: Fixed remaining compilation errors in lexer examples.
Text files modified:
trunk/boost/spirit/home/lex/lexer/lexertl/lexertl_functor.hpp | 5 ++---
trunk/libs/spirit/example/lex/word_count_functor.flex | 1 +
trunk/libs/spirit/example/lex/word_count_functor_flex.cpp | 1 +
3 files changed, 4 insertions(+), 3 deletions(-)
Modified: trunk/boost/spirit/home/lex/lexer/lexertl/lexertl_functor.hpp
==============================================================================
--- trunk/boost/spirit/home/lex/lexer/lexertl/lexertl_functor.hpp (original)
+++ trunk/boost/spirit/home/lex/lexer/lexertl/lexertl_functor.hpp 2008-05-30 20:43:25 EDT (Fri, 30 May 2008)
@@ -90,6 +90,7 @@
{
typedef Data<Iterator, mpl::false_, mpl::false_> base_type;
typedef std::size_t state_type;
+ typedef typename base_type::char_type char_type;
// initialize the shared data
template <typename IterData>
@@ -130,9 +131,7 @@
typedef Data<Iterator, mpl::false_, HasState> base_type;
typedef iterator_range<Iterator> iterpair_type;
- typedef typename
- boost::detail::iterator_traits<Iterator>::value_type
- char_type;
+ typedef typename base_type::char_type char_type;
typedef void functor_type(iterpair_type, std::size_t, bool&, Data&);
typedef boost::function<functor_type> functor_wrapper_type;
Modified: trunk/libs/spirit/example/lex/word_count_functor.flex
==============================================================================
--- trunk/libs/spirit/example/lex/word_count_functor.flex (original)
+++ trunk/libs/spirit/example/lex/word_count_functor.flex 2008-05-30 20:43:25 EDT (Fri, 30 May 2008)
@@ -44,6 +44,7 @@
} while (EOF != tok);
printf("lines: %d, words: %d, characters: %d\n", l, w, c);
fclose(yyin);
+ return 0;
}
extern "C" int yywrap()
Modified: trunk/libs/spirit/example/lex/word_count_functor_flex.cpp
==============================================================================
--- trunk/libs/spirit/example/lex/word_count_functor_flex.cpp (original)
+++ trunk/libs/spirit/example/lex/word_count_functor_flex.cpp 2008-05-30 20:43:25 EDT (Fri, 30 May 2008)
@@ -1561,6 +1561,7 @@
} while (EOF != tok);
printf("lines: %d, words: %d, characters: %d\n", l, w, c);
fclose(yyin);
+ return 0;
}
extern "C" int yywrap()
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