Documentation
¶
Index ¶
Constants ¶
View Source
const ( AnywhereState State = 0 CsiEntryState State = 1 CsiIgnoreState State = 2 CsiIntermediateState State = 3 CsiParamState State = 4 DcsEntryState State = 5 DcsIgnoreState State = 6 DcsIntermediateState State = 7 DcsParamState State = 8 DcsPassthroughState State = 9 EscapeState State = 10 EscapeIntermediateState State = 11 GroundState State = 12 OscStringState State = 13 SosPmApcStringState State = 14 Utf8State State = 15 NoneAction Action = 0 ClearAction Action = 1 CollectAction Action = 2 CsiDispatchAction Action = 3 EscDispatchAction Action = 4 ExecuteAction Action = 5 HookAction Action = 6 IgnoreAction Action = 7 OscEndAction Action = 8 OscPutAction Action = 9 OscStartAction Action = 10 ParamAction Action = 11 PrintAction Action = 12 PutAction Action = 13 UnhookAction Action = 14 BeginUtf8Action Action = 15 SosPmApcStartAction Action = 16 SosPmApcPutAction Action = 17 SosPmApcEndAction Action = 18 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Parser ¶
type Parser struct {
// contains filtered or unexported fields
}
Parser represents a state machine.
func (*Parser) Intermediates ¶
Intermediates returns the intermediates
type Performer ¶
type Performer interface {
// Print is called when a print action is performed.
Print(r rune)
// Execute is called when an execute action is performed.
Execute(b byte)
// Put is called when a put action is performed.
Put(b byte)
// Unhook is called when an unhook action is performed.
Unhook()
// Hook is called when a hook action is performed.
Hook(params [][]uint16, intermediates []byte, ignore bool, r rune)
// OscDispatch is called when an osc dispatch action is performed.
OscDispatch(params [][]byte, bellTerminated bool)
// CsiDispatch is called when a csi dispatch action is performed.
CsiDispatch(params [][]uint16, intermediates []byte, ignore bool, r rune)
// EscDispatch is called when an esc dispatch action is performed.
EscDispatch(intermediates []byte, ignore bool, b byte)
// SosPmApcDispatch is called when a SOS/PM/APC sequence is complete.
// kind indicates the type of sequence (SosKind, PmKind, or ApcKind).
// data contains the raw bytes of the sequence payload.
// bellTerminated is true if the sequence was terminated by BEL (0x07).
SosPmApcDispatch(kind SosPmApcKind, data []byte, bellTerminated bool)
}
Performer is an interface for parsing.
type SosPmApcKind ¶ added in v1.0.10
type SosPmApcKind = byte
SosPmApcKind represents the type of SOS/PM/APC sequence.
const ( // SosKind indicates a Start of String sequence (ESC X). SosKind SosPmApcKind = 0 // PmKind indicates a Privacy Message sequence (ESC ^). PmKind SosPmApcKind = 1 // ApcKind indicates an Application Program Command sequence (ESC _). ApcKind SosPmApcKind = 2 )
Click to show internal directories.
Click to hide internal directories.