Live data from Hacker News

Inspect ANSI control codes and escape sequences

ansi.tools

51–52 of 52 posts

Re: Inspect ANSI control codes and escape sequences

#51
post #50
post #29

Earlier quoted context omitted.

There is https://github.com/webpro/ANSI.tools/blob/main/packages/pars... and others

I was thinking of http://artscene.textfiles.com/vt100/torturet.vt >.

The lexer and parser handled it perfectly first try. The HTML renderer had a few issues though, but it's being rendered reasonably well now. The torture test has been added to the package tests and to the website as an example.

Re: Inspect ANSI control codes and escape sequences

#52
post #16

Earlier quoted context omitted.

They are not special cased: https://github.com/webpro/ANSI.tools/blob/main/packages/parser/src/parsers/csi.ts#L12 The comment correctly identifies the 0x30-0x3f range as parameter bytes and the following as intermediate bytes. Both the range and the names for the bytes are matching ECMA-48 Chapter 5.4. But you seem to think that everyone except yourself is incompetent, are you trying to make up for something?

Of course they are. There's a file with all of the special cased constants in, named constants.ts. Your superficial test tested all three of the special cases in the PRIVATE_OPENERS array, which is what the parser.ts code actually checks. DEC's question mark, which is special cased yet further off on its own, is in reality another "private opener", too, and it isn't limited to DEC (e.g. XQTMODKEYS), and neither does…

Some of the issues mentioned in this thread have been improved, including private CSI sequences, default param values, and cancellation + substitution.
Post reply on HN