const.go

 1package parser
 2
 3// Action is a DEC ANSI parser action.
 4type Action = byte
 5
 6// These are the actions that the parser can take.
 7const (
 8	NoneAction Action = iota
 9	ClearAction
10	CollectAction
11	PrefixAction
12	DispatchAction
13	ExecuteAction
14	StartAction // Start of a data string
15	PutAction   // Put into the data string
16	ParamAction
17	PrintAction
18
19	IgnoreAction = NoneAction
20)
21
22// nolint: unused
23var ActionNames = []string{
24	"NoneAction",
25	"ClearAction",
26	"CollectAction",
27	"PrefixAction",
28	"DispatchAction",
29	"ExecuteAction",
30	"StartAction",
31	"PutAction",
32	"ParamAction",
33	"PrintAction",
34}
35
36// State is a DEC ANSI parser state.
37type State = byte
38
39// These are the states that the parser can be in.
40const (
41	GroundState State = iota
42	CsiEntryState
43	CsiIntermediateState
44	CsiParamState
45	DcsEntryState
46	DcsIntermediateState
47	DcsParamState
48	DcsStringState
49	EscapeState
50	EscapeIntermediateState
51	OscStringState
52	SosStringState
53	PmStringState
54	ApcStringState
55
56	// Utf8State is not part of the DEC ANSI standard. It is used to handle
57	// UTF-8 sequences.
58	Utf8State
59)
60
61// nolint: unused
62var StateNames = []string{
63	"GroundState",
64	"CsiEntryState",
65	"CsiIntermediateState",
66	"CsiParamState",
67	"DcsEntryState",
68	"DcsIntermediateState",
69	"DcsParamState",
70	"DcsStringState",
71	"EscapeState",
72	"EscapeIntermediateState",
73	"OscStringState",
74	"SosStringState",
75	"PmStringState",
76	"ApcStringState",
77	"Utf8State",
78}