2 // Copyright (c) 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_INTERNALS_HPP
7 #define BOOST_LEXER_INTERNALS_HPP
9 #include "containers/ptr_vector.hpp"
19 typedef std::vector<std::size_t> size_t_vector;
20 typedef ptr_vector<size_t_vector> size_t_vector_vector;
22 size_t_vector_vector _lookup;
23 size_t_vector _dfa_alphabet;
24 size_t_vector_vector _dfa;
25 bool _seen_BOL_assertion;
26 bool _seen_EOL_assertion;
29 _seen_BOL_assertion (false),
30 _seen_EOL_assertion (false)
37 _dfa_alphabet.clear ();
39 _seen_BOL_assertion = false;
40 _seen_EOL_assertion = false;
43 void swap (internals &internals_)
45 _lookup->swap (*internals_._lookup);
46 _dfa_alphabet.swap (internals_._dfa_alphabet);
47 _dfa->swap (*internals_._dfa);
48 std::swap (_seen_BOL_assertion, internals_._seen_BOL_assertion);
49 std::swap (_seen_EOL_assertion, internals_._seen_EOL_assertion);
53 internals (const internals &); // No copy construction.
54 internals &operator = (const internals &); // No assignment.