![]() |
Vcsn
2.3a
Be Rational
|
Represent alphabets whose "letters" are plain chars. More...
#include <char.hh>
Public Types | |
using | letter_t = char |
using | word_t = std::string |
Public Member Functions | |
word_t | to_word (const letter_t l) const |
Convert to word. More... | |
const word_t & | to_word (const word_t &l) const |
Convert to word. More... | |
word_t | mul (const letter_t l, const letter_t r) const |
Concatenation. More... | |
word_t | mul (const word_t &l, const letter_t r) const |
Concatenation. More... | |
word_t | mul (const letter_t l, const word_t &r) const |
Concatenation. More... | |
word_t | mul (const word_t &l, const word_t &r) const |
Concatenation. More... | |
word_t | delimit (const word_t &w) const |
Add the special character first and last. More... | |
word_t | undelimit (const word_t &w) const |
Remove first and last characters, that must be "special". More... | |
word_t | transpose (const word_t &w) const |
Mirror label. More... | |
letter_t | transpose (letter_t l) const |
Mirror label. More... | |
bool | is_letter (const letter_t) const |
Whether is a letter. More... | |
bool | is_letter (const word_t &w) const |
Whether is a single-letter word. More... | |
std::ostream & | print (const letter_t l, std::ostream &o, format fmt={}) const |
Print a letter. More... | |
std::ostream & | print (const word_t &w, std::ostream &o, format fmt={}) const |
Print a word. More... | |
Static Public Member Functions | |
static symbol | sname () |
static word_t | empty_word () |
One. More... | |
static bool | is_empty_word (const word_t &w) |
Whether is one. More... | |
static bool | equal (const letter_t l, const letter_t r) |
Whether l == r. More... | |
static bool | equal (const word_t &l, const word_t &r) |
Whether l == r. More... | |
static bool | less (const letter_t l, const letter_t r) |
Whether l < r. More... | |
static bool | less (const word_t &l, const word_t &r) |
Whether l < r. More... | |
static constexpr letter_t | one_letter () |
The reserved letter used to forge the "one" label (the unit, the identity). More... | |
static letter_t | get_letter (std::istream &i, bool quoted=true) |
Read one letter from i. More... | |
template<typename T = letter_t> | |
static T | special () |
Special character, used to label transitions from pre() and to post(). More... | |
Static Private Member Functions | |
static constexpr letter_t | special_letter () |
The reserved letter used to forge the labels for initial and final transitions. More... | |
using vcsn::char_letters::letter_t = char |
using vcsn::char_letters::word_t = std::string |
Add the special character first and last.
Definition at line 81 of file char.hh.
References mul(), and special_letter().
|
inlinestatic |
|
inlinestatic |
Read one letter from i.
Either a single char, or a "letter" enclosed in single-quotes.
Definition at line 181 of file char.hh.
References vcsn::eat(), vcsn::get_char(), and vcsn::res.
|
inlinestatic |
|
inline |
|
inline |
Concatenation.
Definition at line 44 of file char.hh.
References one_letter().
Referenced by delimit().
Concatenation.
Definition at line 61 of file char.hh.
References one_letter().
Concatenation.
Definition at line 68 of file char.hh.
References one_letter().
|
inlinestatic |
|
inlinestatic |
|
static |
Special character, used to label transitions from pre() and to post().
|
inlinestaticprivate |
The reserved letter used to forge the labels for initial and final transitions.
Use the public special() interface.
The value is chosen to put subliminal transitions last when sorted. Requires unsigned comparison.
Definition at line 175 of file char.hh.
Referenced by delimit(), and undelimit().
Remove first and last characters, that must be "special".
Definition at line 87 of file char.hh.
References special_letter().