VaKeR CYBER ARMY
Logo of a company Server : Apache/2.4.41 (Ubuntu)
System : Linux absol.cf 5.4.0-198-generic #218-Ubuntu SMP Fri Sep 27 20:18:53 UTC 2024 x86_64
User : www-data ( 33)
PHP Version : 7.4.33
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Directory :  /usr/include/boost/spirit/home/support/detail/lexer/conversion/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //usr/include/boost/spirit/home/support/detail/lexer/conversion/char_state_machine.hpp
// char_state_machine.hpp
// Copyright (c) 2007-2009 Ben Hanson (http://www.benhanson.net/)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file licence_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_LEXER_CHAR_STATE_MACHINE_HPP
#define BOOST_LEXER_CHAR_STATE_MACHINE_HPP

#include "../consts.hpp"
#include <map>
#include "../size_t.hpp"
#include "../string_token.hpp"
#include <vector>

namespace boost
{
namespace lexer
{
namespace detail
{
template<typename CharT>
struct basic_char_state_machine
{
    struct state
    {
        typedef basic_string_token<CharT> string_token;
        typedef std::map<std::size_t, string_token> size_t_string_token_map;
        typedef std::pair<std::size_t, string_token> size_t_string_token_pair;

        bool _end_state;
        std::size_t _id;
        std::size_t _unique_id;
        std::size_t _state;
        std::size_t _bol_index;
        std::size_t _eol_index;
        size_t_string_token_map _transitions;

        state () :
            _end_state (false),
            _id (0),
            _unique_id (npos),
            _state (0),
            _bol_index (npos),
            _eol_index (npos)
        {
        }
    };

    typedef std::vector<state> state_vector;
    typedef std::vector<state_vector> state_vector_vector;

    state_vector_vector _sm_vector;

    bool empty () const
    {
        return _sm_vector.empty ();
    }

    void clear ()
    {
        _sm_vector.clear ();
    }

    void swap (basic_char_state_machine &csm_)
    {
        _sm_vector.swap (csm_._sm_vector);
    }
};

typedef basic_char_state_machine<char> char_state_machine;
typedef basic_char_state_machine<wchar_t> wchar_state_machine;

}
}
}

#endif

VaKeR 2022