xterm
[VSoRC/.git] / node_modules / xterm / src / common / parser / Constants.ts
1 /**
2  * Copyright (c) 2017 The xterm.js authors. All rights reserved.
3  * @license MIT
4  */
5
6 /**
7  * Internal states of EscapeSequenceParser.
8  */
9 export const enum ParserState {
10   GROUND = 0,
11   ESCAPE = 1,
12   ESCAPE_INTERMEDIATE = 2,
13   CSI_ENTRY = 3,
14   CSI_PARAM = 4,
15   CSI_INTERMEDIATE = 5,
16   CSI_IGNORE = 6,
17   SOS_PM_APC_STRING = 7,
18   OSC_STRING = 8,
19   DCS_ENTRY = 9,
20   DCS_PARAM = 10,
21   DCS_IGNORE = 11,
22   DCS_INTERMEDIATE = 12,
23   DCS_PASSTHROUGH = 13
24 }
25
26 /**
27 * Internal actions of EscapeSequenceParser.
28 */
29 export const enum ParserAction {
30   IGNORE = 0,
31   ERROR = 1,
32   PRINT = 2,
33   EXECUTE = 3,
34   OSC_START = 4,
35   OSC_PUT = 5,
36   OSC_END = 6,
37   CSI_DISPATCH = 7,
38   PARAM = 8,
39   COLLECT = 9,
40   ESC_DISPATCH = 10,
41   CLEAR = 11,
42   DCS_HOOK = 12,
43   DCS_PUT = 13,
44   DCS_UNHOOK = 14
45 }
46
47 /**
48  * Internal states of OscParser.
49  */
50 export const enum OscState {
51   START = 0,
52   ID = 1,
53   PAYLOAD = 2,
54   ABORT = 3
55 }
56
57 // payload limit for OSC and DCS
58 export const PAYLOAD_LIMIT = 10000000;