mirror of
https://github.com/wez/wezterm.git
synced 2024-12-23 13:21:38 +03:00
a249021920
This commit removes the intermediates parameter and collapses it together with the parameters themselves. This allows us to model DECSET (eg: `CSI ? 1 l`) correctly. Previously this would get reported as: ``` params: [1], intermediates: ['?'], code: 'l' ``` but since the intermediates are logically things that precede the code, the canonical interpretation of that would be as if we'd received `CSI 1 ? l`. AFAICT, DECSET isn't conforming to ECMA 48 when it comes to this sequence. That made things a bit of a headache in the CSI parser, so what we do now is to treat intermediates as parameters so that it is much simpler to reason about and match in the CSI parser; we now get: ``` params: ['?', 1], code: 'l', ``` refs: https://github.com/wez/wezterm/issues/955 |
||
---|---|---|
.. | ||
src | ||
Cargo.toml | ||
README.md |
vtparse
This is an implementation of a parser for escape and control sequences. It is based on the DEC ANSI Parser.
It has been modified slightly to support UTF-8 sequences.
vtparse
is the lowest level parser; it categorizes the basic
types of sequences but does not ascribe any semantic meaning
to them.
You may wish to look at termwiz::escape::parser::Parser
in the
termwiz crate if you're looking for semantic
parsing.
Comparison with the vte
crate
vtparse
has support for dynamically sized OSC buffers, which makes
it suitable for processing large escape sequences, such as those
used by the iTerm2
image protocol.