jaulib v1.3.6
Jau Support Library (C++, Java, ..)
Loading...
Searching...
No Matches
jau::lang::alphabet Class Reference

Base Alphabet Specification providing the alphabet for token_fsm. More...

#include <token_fsm.hpp>

Inheritance diagram for jau::lang::alphabet:
Collaboration diagram for jau::lang::alphabet:

Public Types

typedef code_point_t(* code_point_func) (const char c) noexcept
 
typedef uint16_t code_point_t
 Unsigned int symbol for alphabet code-point type.
 

Public Member Functions

 alphabet (std::string _name, code_point_t _base, code_point_func _cpf) noexcept
 
constexpr code_point_t base () const noexcept
 The fixed base used for this alphabet, i.e.
 
constexpr code_point_t code_point (const char c) const noexcept
 Returns the token of the given character or code_error if not element of this alphabet.
 
constexpr const std::string & name () const noexcept
 Human readable name for this alphabet instance.
 
std::string to_string () const noexcept
 

Static Public Attributes

static constexpr const code_point_t code_error = std::numeric_limits<code_point_t>::max()
 token_error value, denoting an invalid alphabet code-point.
 

Detailed Description

Base Alphabet Specification providing the alphabet for token_fsm.

Implementation delegates static code_point() function.

See also
token_fsm()

Definition at line 75 of file token_fsm.hpp.

Member Typedef Documentation

◆ code_point_t

Unsigned int symbol for alphabet code-point type.

Definition at line 80 of file token_fsm.hpp.

◆ code_point_func

typedef code_point_t(* jau::lang::alphabet::code_point_func) (const char c) noexcept
noexcept

Definition at line 87 of file token_fsm.hpp.

Constructor & Destructor Documentation

◆ alphabet()

jau::lang::alphabet::alphabet ( std::string _name,
code_point_t _base,
code_point_func _cpf )
inlinenoexcept

Definition at line 95 of file token_fsm.hpp.

Here is the caller graph for this function:

Member Function Documentation

◆ name()

const std::string & jau::lang::alphabet::name ( ) const
inlineconstexprnoexcept

Human readable name for this alphabet instance.

Definition at line 99 of file token_fsm.hpp.

Here is the caller graph for this function:

◆ base()

code_point_t jau::lang::alphabet::base ( ) const
inlineconstexprnoexcept

The fixed base used for this alphabet, i.e.

number of token.

Definition at line 102 of file token_fsm.hpp.

Here is the caller graph for this function:

◆ code_point()

code_point_t jau::lang::alphabet::code_point ( const char c) const
inlineconstexprnoexcept

Returns the token of the given character or code_error if not element of this alphabet.

Definition at line 105 of file token_fsm.hpp.

◆ to_string()

std::string jau::lang::alphabet::to_string ( ) const
inlinenoexcept

Definition at line 107 of file token_fsm.hpp.

Member Data Documentation

◆ code_error

const code_point_t jau::lang::alphabet::code_error = std::numeric_limits<code_point_t>::max()
inlinestaticconstexpr

token_error value, denoting an invalid alphabet code-point.

Definition at line 85 of file token_fsm.hpp.


The documentation for this class was generated from the following file: