Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r53606 - in trunk: boost/spirit/home/lex/lexer/lexertl libs/spirit/test/lex
From: hartmut.kaiser_at_[hidden]
Date: 2009-06-03 14:39:13


Author: hkaiser
Date: 2009-06-03 14:39:13 EDT (Wed, 03 Jun 2009)
New Revision: 53606
URL: http://svn.boost.org/trac/boost/changeset/53606

Log:
Spirit: updated implementation for latest lexertl changes (tests fail, though, because of a problem in lexertl)
Text files modified:
   trunk/boost/spirit/home/lex/lexer/lexertl/lexer.hpp | 4 ++--
   trunk/libs/spirit/test/lex/test.hpp | 22 +++++++++++-----------
   2 files changed, 13 insertions(+), 13 deletions(-)

Modified: trunk/boost/spirit/home/lex/lexer/lexertl/lexer.hpp
==============================================================================
--- trunk/boost/spirit/home/lex/lexer/lexertl/lexer.hpp (original)
+++ trunk/boost/spirit/home/lex/lexer/lexertl/lexer.hpp 2009-06-03 14:39:13 EDT (Wed, 03 Jun 2009)
@@ -286,7 +286,7 @@
         {
             add_state(state);
             initialized_dfa_ = false;
- rules_.add(state, tokset.get_rules());
+ rules_.add("*", tokset.get_rules(), state);
         }
 
         // Allow to associate a whole lexer instance with another lexer
@@ -299,7 +299,7 @@
         {
             add_state(state);
             initialized_dfa_ = false;
- rules_.add(state, lexer_def.get_rules());
+ rules_.add("*", lexer_def.get_rules(), state);
         }
 
         // interface for pattern definition management

Modified: trunk/libs/spirit/test/lex/test.hpp
==============================================================================
--- trunk/libs/spirit/test/lex/test.hpp (original)
+++ trunk/libs/spirit/test/lex/test.hpp 2009-06-03 14:39:13 EDT (Wed, 03 Jun 2009)
@@ -29,7 +29,7 @@
 
     ///////////////////////////////////////////////////////////////////////////
     display_type const display = {};
-
+
     ///////////////////////////////////////////////////////////////////////////
     template <typename Iterator>
     inline boost::iterator_range<Iterator> const&
@@ -37,14 +37,14 @@
     {
         return itp;
     }
-
+
     template <typename Iterator, BOOST_VARIANT_ENUM_PARAMS(typename T)>
     inline boost::iterator_range<Iterator> const&
     get_iterpair(boost::variant<BOOST_VARIANT_ENUM_PARAMS(T)> const& v)
     {
         return boost::get<boost::iterator_range<Iterator> >(v);
     }
-
+
     ///////////////////////////////////////////////////////////////////////////
     template <typename Lexer, typename Char>
     inline bool
@@ -53,31 +53,31 @@
     {
         typedef typename Lexer::iterator_type iterator_type;
         typedef std::basic_string<Char> string_type;
-
+
         string_type str(input);
         typename string_type::iterator it = str.begin();
-
+
         iterator_type first = lex.begin(it, str.end());
         iterator_type last = lex.end();
-
+
         bool r = true;
-
+
         if (NULL != state) {
             std::size_t stateid = lex.map_state(state);
             r = r && (static_cast<unsigned>(~0) != stateid);
             first.set_state(stateid);
         }
-
+
         r = r && lex;
         r = r && first != last;
-
+
         if (token_id != 0)
             r = r && (*first).id() == token_id;
         else
             r = r && (*first).id() != 0;
-
+
         using namespace boost;
-
+
         typedef typename Lexer::iterator_type::base_iterator_type iterator;
         typedef iterator_range<iterator> iterpair_type;
         iterpair_type const& ip = get_iterpair<iterator>((*first).value());


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