From 94c9f73ec0a33de03d9bc838f39f57b15b2cf414 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Mon, 16 May 2022 11:26:06 -0700 Subject: [PATCH] update comments clarifying changes to state table from vt100.net --- src/terminal/parse_table.zig | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/terminal/parse_table.zig b/src/terminal/parse_table.zig index 415ffe443..6f0ea46a6 100644 --- a/src/terminal/parse_table.zig +++ b/src/terminal/parse_table.zig @@ -1,5 +1,17 @@ //! The primary export of this file is "table", which contains a //! comptime-generated state transition table for VT emulation. +//! +//! This is based on the vt100.net state machine: +//! https://vt100.net/emu/dec_ansi_parser +//! But has some modifications: +//! +//! * utf8 state introduced to detect UTF8-encoded sequences. The +//! actual handling back OUT of the utf8 state is done manualy in the +//! parser. +//! +//! * csi_param accepts the colon character (':') since the SGR command +//! accepts colon as a valid parameter value. +//! const std = @import("std"); const builtin = @import("builtin");