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_END_NODE_HPP
7 #define BOOST_LEXER_END_NODE_HPP
10 #include "../../size_t.hpp"
18 class end_node : public node
21 end_node (const std::size_t id_, const std::size_t unique_id_,
22 const std::size_t lexer_state_) :
25 _unique_id (unique_id_),
26 _lexer_state (lexer_state_)
28 node::_firstpos.push_back (this);
29 node::_lastpos.push_back (this);
36 virtual type what_type () const
41 virtual bool traverse (const_node_stack &/*node_stack_*/,
42 bool_stack &/*perform_op_stack_*/) const
47 virtual const node_vector &followpos () const
49 // _followpos is always empty..!
53 virtual bool end_state () const
58 virtual std::size_t id () const
63 virtual std::size_t unique_id () const
68 virtual std::size_t lexer_state () const
75 std::size_t _unique_id;
76 std::size_t _lexer_state;
77 node_vector _followpos;
79 virtual void copy_node (node_ptr_vector &/*node_ptr_vector_*/,
80 node_stack &/*new_node_stack_*/, bool_stack &/*perform_op_stack_*/,
81 bool &/*down_*/) const
83 // Nothing to do, as end_nodes are not copied.
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