The context bits both lazy DFAs keep for the byte beside a position (before it forward, after it backward): a newline, an ASCII word byte, or – under word_quit only – a non-ASCII byte, which sets both bits at once since no ASCII byte does.
More...
|
| constexpr bool | is_newline (std::uint8_t ctx) |
| | Whether context ctx says its byte is a newline.
|
| |
| constexpr bool | is_word (std::uint8_t ctx) |
| | Whether context ctx says its byte is an ASCII word byte.
|
| |
| constexpr bool | is_nonascii (std::uint8_t ctx) |
| | Whether context ctx says its byte is not ASCII.
|
| |
| constexpr std::uint8_t | of (std::uint8_t b, bool cr) |
| | The context bits of byte b.
|
| |
|
|
constexpr std::uint8_t | newline {2} |
| | The byte is a newline.
|
| |
|
constexpr std::uint8_t | word {4} |
| | The byte is an ASCII word byte.
|
| |
|
constexpr std::uint8_t | nonascii {6} |
| | The byte is not ASCII (word_quit only).
|
| |
The context bits both lazy DFAs keep for the byte beside a position (before it forward, after it backward): a newline, an ASCII word byte, or – under word_quit only – a non-ASCII byte, which sets both bits at once since no ASCII byte does.
◆ is_newline()
| constexpr bool real::detail::byte_ctx::is_newline |
( |
std::uint8_t |
ctx | ) |
|
|
constexpr |
Whether context ctx says its byte is a newline.
- Parameters
-
- Returns
- True for a newline; false for a non-ASCII byte, which also carries the newline bit.
◆ is_nonascii()
| constexpr bool real::detail::byte_ctx::is_nonascii |
( |
std::uint8_t |
ctx | ) |
|
|
constexpr |
Whether context ctx says its byte is not ASCII.
- Parameters
-
- Returns
- True for a non-ASCII byte under word_quit.
◆ is_word()
| constexpr bool real::detail::byte_ctx::is_word |
( |
std::uint8_t |
ctx | ) |
|
|
constexpr |
Whether context ctx says its byte is an ASCII word byte.
- Parameters
-
- Returns
- True for an ASCII word byte.
◆ of()
| constexpr std::uint8_t real::detail::byte_ctx::of |
( |
std::uint8_t |
b, |
|
|
bool |
cr |
|
) |
| |
|
constexpr |
The context bits of byte b.
- Parameters
-
| [in] | b | The byte. |
| [in] | cr | The program's line assertions are ECMAScript's, which end a line at \r too. |
- Returns
- Its context bits.