|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r53260 - in trunk/boost/spirit/home: lex/lexer/lexertl support/detail/lexer
From: hartmut.kaiser_at_[hidden]
Date: 2009-05-25 17:43:43
Author: hkaiser
Date: 2009-05-25 17:43:42 EDT (Mon, 25 May 2009)
New Revision: 53260
URL: http://svn.boost.org/trac/boost/changeset/53260
Log:
Spirit: minor changes to lexer API
Text files modified:
trunk/boost/spirit/home/lex/lexer/lexertl/lexer.hpp | 8 ++++----
trunk/boost/spirit/home/lex/lexer/lexertl/static_lexer.hpp | 5 +----
trunk/boost/spirit/home/support/detail/lexer/rules.hpp | 5 +----
3 files changed, 6 insertions(+), 12 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-05-25 17:43:42 EDT (Mon, 25 May 2009)
@@ -282,11 +282,11 @@
// Allow a token_set to be associated with this lexer instance. This
// copies all token definitions of the right hand side into this lexer
// instance.
- std::size_t add_token(char_type const* state, token_set const& tokset)
+ void add_token(char_type const* state, token_set const& tokset)
{
add_state(state);
initialized_dfa_ = false;
- return rules_.add(state, tokset.get_rules());
+ rules_.add(state, tokset.get_rules());
}
// Allow to associate a whole lexer instance with another lexer
@@ -294,12 +294,12 @@
// lexer into this instance.
template <typename Token_, typename Iterator_, typename Functor_
, typename TokenSet_>
- std::size_t add_token(char_type const* state
+ void add_token(char_type const* state
, lexer<Token_, Iterator_, Functor_, TokenSet_> const& lexer_def)
{
add_state(state);
initialized_dfa_ = false;
- return rules_.add(state, lexer_def.get_rules());
+ rules_.add(state, lexer_def.get_rules());
}
// interface for pattern definition management
Modified: trunk/boost/spirit/home/lex/lexer/lexertl/static_lexer.hpp
==============================================================================
--- trunk/boost/spirit/home/lex/lexer/lexertl/static_lexer.hpp (original)
+++ trunk/boost/spirit/home/lex/lexer/lexertl/static_lexer.hpp 2009-05-25 17:43:42 EDT (Mon, 25 May 2009)
@@ -248,10 +248,7 @@
{
return unique_id<id_type>::get();
}
- std::size_t add_token(char_type const* state, token_set& tokset)
- {
- return unique_id<id_type>::get();
- }
+ void add_token(char_type const* state, token_set& tokset) {}
// interface for pattern definition management
void add_pattern (char_type const* state, string_type const& name
Modified: trunk/boost/spirit/home/support/detail/lexer/rules.hpp
==============================================================================
--- trunk/boost/spirit/home/support/detail/lexer/rules.hpp (original)
+++ trunk/boost/spirit/home/support/detail/lexer/rules.hpp 2009-05-25 17:43:42 EDT (Mon, 25 May 2009)
@@ -297,9 +297,8 @@
return add (curr_state_, regex_, id_, new_state_, true);
}
- std::size_t add (const CharT *curr_state_, const basic_rules &rules_)
+ void add (const CharT *curr_state_, const basic_rules &rules_)
{
- const std::size_t counter_ = next_unique_id();
const string_pair_deque ¯os_ = rules_.macrodeque ();
typename string_pair_deque::const_iterator macro_iter_ =
macros_.begin ();
@@ -341,8 +340,6 @@
detail::dot<CharT>::str(), true, *uid_iter_);
}
}
-
- return counter_;
}
const string_size_t_map &statemap () const
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