1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-01 03:18:11 +00:00
serenity/Userland/DevTools
Daniel Bertalan be519022c3 LibVT: Implement new ANSI escape sequence parser
This commit replaces the former, hand-written parser with a new one that
can be generated automatically according to a state change diagram.

The new `EscapeSequenceParser` class provides a more ergonomic interface
to dealing with escape sequences. This interface has been inspired by
Alacritty's [vte library](https://github.com/alacritty/vte/).

I tried to avoid changing the application logic inside the `Terminal`
class. While this code has not been thoroughly tested, I can't find
regressions in the basic command line utilities or `vttest`.

`Terminal` now displays nicer debug messages when it encounters an
unknown escape sequence. Defensive programming and bounds checks have
been added where we access parameters, and as a result, we can now
endure 4-5 seconds of `cat /dev/urandom`. :D

We generate EscapeSequenceStateMachine.h when building the in-kernel
LibVT, and we assume that the file is already in place when the userland
library is being built. This will probably cause problems later on, but
I can't find a way to do it nicely.
2021-05-16 11:50:56 +02:00
..
HackStudio CppLanguageServer: Fix syntax of a test case program 2021-05-15 23:28:50 +02:00
Inspector Inspector: Don't check that target has pledged "accept" 2021-05-13 23:28:40 +02:00
IPCCompiler IPCCompiler: Fix declaration of static functions 2021-05-14 22:24:02 +02:00
Playground Userland: Tighten a *lot* of pledges! :^) 2021-05-13 23:28:40 +02:00
Profiler Profiler: Mark model columns as non-sortable 2021-05-14 17:17:17 +02:00
StateMachineGenerator LibVT: Implement new ANSI escape sequence parser 2021-05-16 11:50:56 +02:00
UserspaceEmulator Userland+LibCore: Update FileWatcher + its users for InodeWatcher 2.0 2021-05-12 22:38:20 +02:00
CMakeLists.txt DevTools: Move to Userland/DevTools/ 2021-01-12 12:18:55 +01:00