| Commit message (Collapse) | Author | Age |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The table based state change was too complex to make guesses why it's
getting slow and too fragile, as in modifying the amount of
states/actions were slowing down, even though, they were not used.
Rewrite the state + action change exactly how it's in [1] with respect
to our modifications/C1, etc. The new implementation is generally faster
than the previous one and is easier for compiler to reason about and
generate more efficient structures.
Also, the structure got way simpler to follow, since it matches the
spec pretty much exactly.
[1] - https://vt100.net/emu/dec_ansi_parser
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch overhauls the `Parser::advance` API to operate on byte slices
instead of individual bytes, which allows for additional performance
optimizations.
VTE does not support C1 escapes and C0 escapes always start with an
escape character. This makes it possible to simplify processing if a
byte stream is determined to not contain any escapes. The `memchr` crate
provides a battle-tested implementation for SIMD-accelerated byte
searches, which is why this implementation makes use of it.
VTE also only supports UTF8 characters in the ground state, which means
that the new non-escape parsing path is able to rely completely on STD's
`str::from_utf8` since `memchr` gives us the full length of the plain
text character buffer. This allows us to completely remove `utf8parse`
and all related code.
We also make use of `memchr` in the synchronized escape handling in
`ansi.rs`, since it relies heavily on scanning large amounts of text for
the extension/termination escape sequences.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Even though the ST terminator is the only officially supported
terminator, some applications still rely on BEL to work properly. Both
have been supported historically, however there was no way for the
terminal to tell which terminator was used.
Since OSC escapes frequently offer the `?` parameter to query for the
current format, some applications expect the response terminator to
match the request terminator. To make it possible to support this, the
osc_dispatcher is now informed when the BEL terminator was used.
Since the C1 ST terminator was not yet supported for OSC escapes,
support for it has also been added.
|
| | |
|
|
|
This renames the generate_state_changes proc macro to include the `vte_`
prefix, since it's not useful to anyone other than our `vte` crate.
|