sed

package
v0.0.0-...-cda90ea Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2015 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ADDRESS_LINE = iota
	ADDRESS_RANGE
	ADDRESS_TO_END_OF_FILE
	ADDRESS_LAST_LINE
	ADDRESS_REGEX
)

Variables

View Source
var (
	WrongNumberOfCommandParameters error = errors.New("Wrong number of parameters for command")
	UnknownScriptCommand           error = errors.New("Unknown script command")
	InvalidSCommandFlag            error = errors.New("Invalid flag for s command")
	RegularExpressionExpected      error = errors.New("Expected a regular expression, got zero length string")
	UnterminatedRegularExpression  error = errors.New("Unterminated regular expression")
	NoSupportForTwoAddress         error = errors.New("This command doesn't support an address range or to end of file")
	NotImplemented                 error = errors.New("This command command hasn't been implemented yet")
)

Functions

func Main

func Main()

func NewACmd

func NewACmd(s *Sed, line []byte, addr *address) (*a_cmd, error)

func NewBCmd

func NewBCmd(pieces [][]byte, addr *address) (*b_cmd, error)

func NewCCmd

func NewCCmd(s *Sed, line []byte, addr *address) (*c_cmd, error)

func NewDCmd

func NewDCmd(pieces [][]byte, addr *address) (*d_cmd, error)

func NewEqlCmd

func NewEqlCmd(pieces [][]byte, addr *address) (*eql_cmd, error)

func NewGCmd

func NewGCmd(pieces [][]byte, addr *address) (*g_cmd, error)

func NewHCmd

func NewHCmd(pieces [][]byte, addr *address) (*h_cmd, error)

func NewICmd

func NewICmd(s *Sed, line []byte, addr *address) (*i_cmd, error)

func NewNCmd

func NewNCmd(pieces [][]byte, addr *address) (*n_cmd, error)

func NewPCmd

func NewPCmd(pieces [][]byte, addr *address) (*p_cmd, error)

func NewQCmd

func NewQCmd(pieces [][]byte, addr *address) (c *q_cmd, err error)

func NewRCmd

func NewRCmd(line []byte, addr *address) (*r_cmd, error)

func NewSCmd

func NewSCmd(pieces [][]byte, addr *address) (c *s_cmd, err error)

Types

type Address

type Address interface {
	// contains filtered or unexported methods
}

type Cmd

type Cmd interface {
	fmt.Stringer
	// contains filtered or unexported methods
}

func NewCmd

func NewCmd(s *Sed, line []byte) (Cmd, error)

type Sed

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

func (*Sed) Init

func (s *Sed) Init()

Jump to

Keyboard shortcuts

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