parser

package
v0.0.0-...-54fc8f9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 8, 2015 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ANSI_ICH       = iota + 0x40 // '@', Insert Character
	ANSI_CUU                     // 'A', Cursor Up
	ANSI_CUD                     // 'B', Cursor Down
	ANSI_CUF                     // 'C', Cursor Right
	ANSI_CUB                     // 'D', Cursor Left
	ANSI_CNL                     // 'E', Cursor Next Line
	ANSI_CPL                     // 'F', Cursor Preceiding Line
	ANSI_CHA                     // 'G', Cursor Character Absolute
	ANSI_CUP                     // 'H', Cursor Position
	ANSI_CHT                     // 'I', Cursor Forward Tabulation
	ANSI_ED                      // 'J', Erase in Page
	ANSI_EL                      // 'K', Erase in Line
	ANSI_IL                      // 'L', Insert Line
	ANSI_DL                      // 'M', Delete Line
	ANSI_EF                      // 'N', Erase in Field
	ANSI_EA                      // 'O', Erase in Area
	ANSI_DCH                     // 'P', Delete Character
	ANSI_SSE                     // 'Q, ???
	ANSI_CPR                     // 'R', Active Position Report
	ANSI_SU                      // 'S', Scroll Up
	ANSI_SD                      // 'T', Scroll Down
	ANSI_NP                      // 'U', Next Page
	ANSI_PP                      // 'V', Preceding Page
	ANSI_CTC                     // 'W', Cursor Tabulation Control
	ANSI_ECH                     // 'X', Erase Character
	ANSI_CVT                     // 'Y', Cursor Line Tabulation
	ANSI_CBT                     // 'Z', Cursor Backward Tabulation
	ANSI_SRS                     // '[', Start Reversed String
	ANSI_PTX                     // '\', Paralell Texts
	ANSI_SDS                     // ']', Start Directed String
	ANSI_SIMD                    // '^', Select Implicit Movement Direction
	ANSI_UNDEFINED               // ' ', Unspecified
	ANSI_HPA                     // '`', Character Position Absolute
	ANSI_HPR                     // 'a', Character Position Forward
	ANSI_REP                     // 'b', Repeat
	ANSI_DA                      // 'c', Device Attributes
	ANSI_VPA                     // 'd', Line Position Absolute
	ANSI_VPR                     // 'e', Line Position Forward
	ANSI_HVP                     // 'f', Character and Line Position
	ANSI_TBC                     // 'g', Tabulation Clear
	ANSI_SM                      // 'h', Set Mode
	ANSI_MC                      // 'i', Media Copy
	ANSI_HPB                     // 'j', Character Position Absolute
	ANSI_VPB                     // 'k', Line Position Backward
	ANSI_RM                      // 'l', Reset Mode
	ANSI_SGR                     // 'm', Select Graphic Rendition
	ANSI_DSR                     // 'n', Device Status Report
	ANSI_DAQ                     // 'o', Define Area Qualification
)

ECMA-48 specified Final Bytes of control sequences without intermediate bytes

View Source
const (
	NUL = iota
	SOH
	STX
	ETX
	EOT
	ENQ
	ACK
	BEL
	BS
	TAB
	LF
	VT
	FF
	CR
	SO
	SI
	DLE
	DC1
	DC2
	DC3
	DC4
	NAK
	SYN
	ETB
	CAN
	EM
	SUB
	ESC
	FS
	GS
	RS
	US
	Space

	NL = LF
	NP = FF
)

ASCII escape characters

View Source
const (
	STATE_EXIT = iota
	STATE_TEXT
	STATE_ANSI_WAIT_BRACE
	STATE_ANSI_WAIT_LITERAL
)
View Source
const (
	ANSI_TABSTOP = 8
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ANSI

type ANSI struct {
	Palette color.Palette
	// contains filtered or unexported fields
}

func NewANSI

func NewANSI(w, h int) *ANSI

func (*ANSI) Html

func (p *ANSI) Html() (s string)

func (*ANSI) Parse

func (p *ANSI) Parse(r io.Reader) (err error)

func (*ANSI) String

func (p *ANSI) String() (s string)

type ANSISequence

type ANSISequence struct {
	// contains filtered or unexported fields
}

func NewANSISequence

func NewANSISequence() *ANSISequence

func (*ANSISequence) Buffer

func (s *ANSISequence) Buffer(b byte)

func (*ANSISequence) Flush

func (s *ANSISequence) Flush()

func (*ANSISequence) Int

func (s *ANSISequence) Int(n int) (i int)

func (*ANSISequence) Ints

func (s *ANSISequence) Ints() (i []int)

func (*ANSISequence) Len

func (s *ANSISequence) Len() int

func (*ANSISequence) Reset

func (s *ANSISequence) Reset()

func (*ANSISequence) String

func (s *ANSISequence) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL