Skip to content

proposal: switch to DEC/ANSI compliant escape sequence parser #1395

@jerch

Description

@jerch

Since the current main parser does not cover some well defined exceptional escape code conditions I want to propose to switch over to this reference parser https://vt100.net/emu/dec_ansi_parser, which covers 99% of the DEC terminal sequences up to the vt500 series.

I've done a JS implementation years ago that could be adopted to xterm.js (https://github.com/netzkolchose/node-ansiparser). It is based on a FSM approach, adoption should be straight forward with a parser-terminal interface. The FSM could be extended to support pluggable custom escape codes. Speed should be no concern (runs at 80MB/s average, with minor tweaks at 100MB/s).

Switching over to that parser would raise the DEC/ANSI compatibility to almost 100%.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type/enhancementFeatures or improvements to existing features

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions