2 // Copyright (c) 2007-2009 Ben Hanson (http://www.benhanson.net/)
4 // Distributed under the Boost Software License, Version 1.0. (See accompanying
5 // file licence_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6 #ifndef BOOST_LEXER_RE_TOKENISER_STATE_HPP
7 #define BOOST_LEXER_RE_TOKENISER_STATE_HPP
9 #include "../../consts.hpp"
11 #include "../../size_t.hpp"
20 template<typename CharT>
21 struct basic_re_tokeniser_state
23 const CharT * const _start;
24 const CharT * const _end;
27 std::stack<regex_flags> _flags_stack;
31 bool _seen_BOL_assertion;
32 bool _seen_EOL_assertion;
34 basic_re_tokeniser_state (const CharT *start_, const CharT * const end_,
35 const regex_flags flags_, const std::locale locale_) :
43 _seen_BOL_assertion (false),
44 _seen_EOL_assertion (false)
48 // prevent VC++ 7.1 warning:
49 const basic_re_tokeniser_state &operator =
50 (const basic_re_tokeniser_state &rhs_)
56 _locale = rhs_._locale;
57 _paren_count = rhs_._paren_count;
58 _in_string = rhs_._in_string;
59 _seen_BOL_assertion = rhs_._seen_BOL_assertion;
60 _seen_EOL_assertion = rhs_._seen_EOL_assertion;
64 inline bool next (CharT &ch_)
79 inline void increment ()
84 inline std::size_t index ()
86 return _curr - _start;
In the beginning the Universe was created. This has made a lot of
people very angry and has been widely regarded as a bad move.
Douglas Adams