Skip to content

Implement proper VT100 parser #2

@bitc

Description

@bitc

The current parser is a bit adhoc and doesn't handle invalid escape sequences well.

Here is a document that explains how to implement a proper parser using a state machine: https://vt100.net/emu/dec_ansi_parser

Here is a TypeScript implementation I found: https://github.com/xtermjs/xterm.js/blob/522c8bf3afcc296f7586c21b097025fe3626dc32/src/common/parser/EscapeSequenceParser.ts#L201

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions