lexic

package
v0.1.9 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2017 License: Apache-2.0 Imports: 7 Imported by: 3

Documentation

Index

Constants

View Source
const EOF = -1

EOF represents a End Of File

Variables

View Source
var ItemType = map[string]string{
	"ItemComment":      "__COMMENT__",
	"ItemEOF":          "__EOF__",
	"ItemIdentifier":   "__IDENTIFIER__",
	"ItemString":       "__STRING__",
	"ItemRegex":        "__REGEX__",
	"ItemIntNumber":    "__INT_NUMBER__",
	"ItemVariable":     "__VARIABLE__",
	"ItemColon":        "__COLON__",
	"ItemEqual":        "__EQUAL__",
	"ItemOCurly":       "__OPEN_CURLY__",
	"ItemCCurly":       "__CLOSE_CURLY__",
	"ItemOSqrt":        "__OPEN_SQRT__",
	"ItemCSqrt":        "__CLOSE_SQRT__",
	"ItemOBracket":     "__OPEN_BRACKET__",
	"ItemCBracket":     "__CLOSE_BRACKET__",
	"ItemPipe":         "__PIPE__",
	"ItemSpace":        "__SPACE__",
	"ItemQMark":        "__QMAKR__",
	"ItemDash":         "__DASH__",
	"ItemPlus":         "__PLUS__",
	"ItemHash":         "__HASH__",
	"ItemDot":          "__DOT__",
	"ItemDotDot":       "__DOT_DOT__",
	"ItemPercent":      "__PERCENT__",
	"ItemAnd":          "__BIT_AND__",
	"ItemLeftShift":    "__LEFT_SHIFT__",
	"ItemRightShift":   "__RIGTH_SHIFT__",
	"ItemBitNot":       "__BIT_NOT__",
	"ItemCaret":        "__CARET__",
	"ItemStar":         "__STAR__",
	"ItemSlash":        "__SLASH__",
	"ItemComma":        "__COMMA__",
	"ItemGrater":       "__GRATER__",
	"ItemLess":         "__LESS__",
	"ItemGraterEqual":  "__GRATER_EQUAL__",
	"ItemLessEqual":    "__LESS_EQUAL__",
	"ItemEqualEqual":   "__EQUAL_EQUAL__",
	"ItemNotEqual":     "__NOT_EQUAL__",
	"ItemNot":          "__NOT__",
	"ItemAt":           "__AT__",
	"ItemKWAll":        "__KW_ALL__",
	"ItemKWAnd":        "__KW_AND__",
	"ItemKWAny":        "__KW_ANY__",
	"ItemKWAscii":      "__KW_ASCII__",
	"ItemKWAt":         "__KW_AT__",
	"ItemKWCondition":  "__KW_CONDITION__",
	"ItemKWContains":   "__KW_CONTAINS__",
	"ItemKWEntrypoint": "__KW_ENTRYPOINT__",
	"ItemKWFalse":      "__KW_FLASE__",
	"ItemKWFilesize":   "__KW_FILESIZE__",
	"ItemKWFullword":   "__KW_FULLWORD__",
	"ItemKWFor":        "__KW_FOR__",
	"ItemKWGlobal":     "__KW_GLOBAL__",
	"ItemKWIn":         "__KW_IN__",
	"ItemKWImport":     "__KW_IMPORT__",
	"ItemKWInclude":    "__KW_INCLUDE__",
	"ItemKWInt8":       "__KW_INT8__",
	"ItemKWInt16":      "__KW_INT16__",
	"ItemKWInt32":      "__KW_INT32__",
	"ItemKWInt8be":     "__KW_INT8BE__",
	"ItemKWInt16be":    "__KW_INT16BE__",
	"ItemKWInt32be":    "__KW_INT32BE__",
	"ItemKWMatches":    "__KW_MATCHES__",
	"ItemKWMeta":       "__KW_META__",
	"ItemKWNocase":     "__KW_NOCASE__",
	"ItemKWNot":        "__KW_NOT__",
	"ItemKWOr":         "__KW_OR__",
	"ItemKWOf":         "__KW_OF__",
	"ItemKWPrivate":    "__KW_PRIVATE__",
	"ItemKWRule":       "__KW_RULE__",
	"ItemKWStrings":    "__KW_STRINGS__",
	"ItemKWThem":       "__KW_THEM__",
	"ItemKWTrue":       "__KW_TRUE__",
	"ItemKWUint8":      "__KW_UINT8__",
	"ItemKWUint16":     "__KW_UINT16__",
	"ItemKWUint32":     "__KW_UINT32__",
	"ItemKWUint8be":    "__KW_UINT8BE__",
	"ItemKWUint16be":   "__KW_UINT16BE__",
	"ItemKWUint32be":   "__KW_UINT32BE__",
	"ItemKWWide":       "__KW_WIDE__",
}

ItemType represents the type of items

Functions

This section is empty.

Types

type Item

type Item interface {
	String()
	GetValue() string
	GetType() string
	GetLine() int
	GetPos() int
}

Item interface for all Item in YaGo

func NewItemAnd

func NewItemAnd(value string, pos pos, line int) Item

NewItemAnd and item constructor

func NewItemAt

func NewItemAt(value string, pos pos, line int) Item

NewItemAt at (@) item constructor

func NewItemBitNot

func NewItemBitNot(value string, pos pos, line int) Item

NewItemBitNot bitwise not item constructor

func NewItemCBracket

func NewItemCBracket(value string, pos pos, line int) Item

NewItemCBracket close bracket item constructor

func NewItemCCurly

func NewItemCCurly(value string, pos pos, line int) Item

NewItemCCurly close curly item constructor

func NewItemCSqrt

func NewItemCSqrt(value string, pos pos, line int) Item

NewItemCSqrt close square bracket item constructor

func NewItemCaret

func NewItemCaret(value string, pos pos, line int) Item

NewItemCaret caret item constructor

func NewItemColon

func NewItemColon(value string, pos pos, line int) Item

NewItemColon colon item constructor

func NewItemComma

func NewItemComma(value string, pos pos, line int) Item

NewItemComma comma item constructor

func NewItemComment

func NewItemComment(value string, pos pos, line int) Item

NewItemComment comment item constructor

func NewItemDash

func NewItemDash(value string, pos pos, line int) Item

NewItemDash dash item constructor

func NewItemDot

func NewItemDot(value string, pos pos, line int) Item

NewItemDot dot item constructor

func NewItemDotDot

func NewItemDotDot(value string, pos pos, line int) Item

NewItemDotDot dot dot (:) item constructor

func NewItemEOF

func NewItemEOF(value string, pos pos, line int) Item

NewItemEOF EOF item constructor

func NewItemEqual

func NewItemEqual(value string, pos pos, line int) Item

NewItemEqual equal item constructor

func NewItemEqualEqual

func NewItemEqualEqual(value string, pos pos, line int) Item

NewItemEqualEqual equal equal (==) item constructor

func NewItemGrater

func NewItemGrater(value string, pos pos, line int) Item

NewItemGrater grater than item constructor

func NewItemGraterEqual

func NewItemGraterEqual(value string, pos pos, line int) Item

NewItemGraterEqual grater equal item constructor

func NewItemHash

func NewItemHash(value string, pos pos, line int) Item

NewItemHash hash item constructor

func NewItemIdentifier

func NewItemIdentifier(value string, pos pos, line int) Item

NewItemIdentifier identifier item constructor

func NewItemIntNumber

func NewItemIntNumber(value string, pos pos, line int) Item

NewItemIntNumber int number item constructor

func NewItemKWAll

func NewItemKWAll(value string, pos pos, line int) Item

NewItemKWAll all keyword item constructor

func NewItemKWAnd

func NewItemKWAnd(value string, pos pos, line int) Item

NewItemKWAnd and keyword item constructor

func NewItemKWAny

func NewItemKWAny(value string, pos pos, line int) Item

NewItemKWAny any keyword item constructor

func NewItemKWAscii

func NewItemKWAscii(value string, pos pos, line int) Item

NewItemKWAscii ascii keyword item constructor

func NewItemKWAt

func NewItemKWAt(value string, pos pos, line int) Item

NewItemKWAt at keyword item constructor

func NewItemKWCondition

func NewItemKWCondition(value string, pos pos, line int) Item

NewItemKWCondition condition keyword item constructor

func NewItemKWContains

func NewItemKWContains(value string, pos pos, line int) Item

NewItemKWContains contains keyword item constructor

func NewItemKWEntrypoint

func NewItemKWEntrypoint(value string, pos pos, line int) Item

NewItemKWEntrypoint entrypoint keyword item constructor

func NewItemKWFalse

func NewItemKWFalse(value string, pos pos, line int) Item

NewItemKWFalse false keyword item constructor

func NewItemKWFilesize

func NewItemKWFilesize(value string, pos pos, line int) Item

NewItemKWFilesize filesize keyword item constructor

func NewItemKWFor

func NewItemKWFor(value string, pos pos, line int) Item

NewItemKWFor for keyword item constructor

func NewItemKWFullword

func NewItemKWFullword(value string, pos pos, line int) Item

NewItemKWFullword fullword keyword item constructor

func NewItemKWGlobal

func NewItemKWGlobal(value string, pos pos, line int) Item

NewItemKWGlobal global keyword item constructor

func NewItemKWImport

func NewItemKWImport(value string, pos pos, line int) Item

NewItemKWImport import keyword item constructor

func NewItemKWIn

func NewItemKWIn(value string, pos pos, line int) Item

NewItemKWIn in keyword item constructor

func NewItemKWInclude

func NewItemKWInclude(value string, pos pos, line int) Item

NewItemKWInclude include keyword item constructor

func NewItemKWInt16

func NewItemKWInt16(value string, pos pos, line int) Item

NewItemKWInt16 int16 keyword item constructor

func NewItemKWInt16be

func NewItemKWInt16be(value string, pos pos, line int) Item

NewItemKWInt16be int16be keyword item constructor

func NewItemKWInt32

func NewItemKWInt32(value string, pos pos, line int) Item

NewItemKWInt32 int32 keyword item constructor

func NewItemKWInt32be

func NewItemKWInt32be(value string, pos pos, line int) Item

NewItemKWInt32be int32be keyword item constructor

func NewItemKWInt8

func NewItemKWInt8(value string, pos pos, line int) Item

NewItemKWInt8 int8 keyword item constructor

func NewItemKWInt8be

func NewItemKWInt8be(value string, pos pos, line int) Item

NewItemKWInt8be int8be keyword item constructor

func NewItemKWMatches

func NewItemKWMatches(value string, pos pos, line int) Item

NewItemKWMatches matches keyword item constructor

func NewItemKWMeta

func NewItemKWMeta(value string, pos pos, line int) Item

NewItemKWMeta meta keyword item constructor

func NewItemKWNocase

func NewItemKWNocase(value string, pos pos, line int) Item

NewItemKWNocase nocase keyword item constructor

func NewItemKWNot

func NewItemKWNot(value string, pos pos, line int) Item

NewItemKWNot not keyword item constructor

func NewItemKWOf

func NewItemKWOf(value string, pos pos, line int) Item

NewItemKWOf of keyword item constructor

func NewItemKWOr

func NewItemKWOr(value string, pos pos, line int) Item

NewItemKWOr or keyword item constructor

func NewItemKWPrivate

func NewItemKWPrivate(value string, pos pos, line int) Item

NewItemKWPrivate private keyword item constructor

func NewItemKWRule

func NewItemKWRule(value string, pos pos, line int) Item

NewItemKWRule rule keyword item constructor

func NewItemKWStrings

func NewItemKWStrings(value string, pos pos, line int) Item

NewItemKWStrings strings keyword item constructor

func NewItemKWThem

func NewItemKWThem(value string, pos pos, line int) Item

NewItemKWThem them keyword item constructor

func NewItemKWTrue

func NewItemKWTrue(value string, pos pos, line int) Item

NewItemKWTrue true keyword item constructor

func NewItemKWUint16

func NewItemKWUint16(value string, pos pos, line int) Item

NewItemKWUint16 uint16 keyword item constructor

func NewItemKWUint16be

func NewItemKWUint16be(value string, pos pos, line int) Item

NewItemKWUint16be uint16be keyword item constructor

func NewItemKWUint32

func NewItemKWUint32(value string, pos pos, line int) Item

NewItemKWUint32 uint32 keyword item constructor

func NewItemKWUint32be

func NewItemKWUint32be(value string, pos pos, line int) Item

NewItemKWUint32be uint32be keyword item constructor

func NewItemKWUint8

func NewItemKWUint8(value string, pos pos, line int) Item

NewItemKWUint8 uint8 keyword item constructor

func NewItemKWUint8be

func NewItemKWUint8be(value string, pos pos, line int) Item

NewItemKWUint8be uint8be keyword item constructor

func NewItemKWWide

func NewItemKWWide(value string, pos pos, line int) Item

NewItemKWWide wide keyword item constructor

func NewItemLeftShift

func NewItemLeftShift(value string, pos pos, line int) Item

NewItemLeftShift left shift item constructor

func NewItemLess

func NewItemLess(value string, pos pos, line int) Item

NewItemLess less than item constructor

func NewItemLessEqual

func NewItemLessEqual(value string, pos pos, line int) Item

NewItemLessEqual less equal item constructor

func NewItemNot

func NewItemNot(value string, pos pos, line int) Item

NewItemNot not item constructor

func NewItemNotEqual

func NewItemNotEqual(value string, pos pos, line int) Item

NewItemNotEqual not equal (!=) item constructor

func NewItemOBracket

func NewItemOBracket(value string, pos pos, line int) Item

NewItemOBracket open bracket item constructor

func NewItemOCurly

func NewItemOCurly(value string, pos pos, line int) Item

NewItemOCurly open curly item constructor

func NewItemOSqrt

func NewItemOSqrt(value string, pos pos, line int) Item

NewItemOSqrt open square bracket item constructor

func NewItemPercent

func NewItemPercent(value string, pos pos, line int) Item

NewItemPercent percentage item constructor

func NewItemPipe

func NewItemPipe(value string, pos pos, line int) Item

NewItemPipe pipe item constructor

func NewItemPlus

func NewItemPlus(value string, pos pos, line int) Item

NewItemPlus plus item constructor

func NewItemQMark

func NewItemQMark(value string, pos pos, line int) Item

NewItemQMark question mark item constructor

func NewItemRegex

func NewItemRegex(value string, pos pos, line int) Item

NewItemRegex regex item constructor

func NewItemRightShift

func NewItemRightShift(value string, pos pos, line int) Item

NewItemRightShift right shift item constructor

func NewItemSlash

func NewItemSlash(value string, pos pos, line int) Item

NewItemSlash slash item constructor

func NewItemSpace

func NewItemSpace(value string, pos pos, line int) Item

NewItemSpace space item constructor

func NewItemStar

func NewItemStar(value string, pos pos, line int) Item

NewItemStar star item constructor

func NewItemString

func NewItemString(value string, pos pos, line int) Item

NewItemString string item constructor

func NewItemVariable

func NewItemVariable(value string, pos pos, line int) Item

NewItemVariable strings' variable item constructor

type ItemAnd

type ItemAnd struct {
	ItemYaGo
}

ItemAnd represents a and Item

type ItemAt

type ItemAt struct {
	ItemYaGo
}

ItemAt represents an at (@) Item

type ItemBitNot

type ItemBitNot struct {
	ItemYaGo
}

ItemBitNot represents a bitwise not Item

type ItemCBracket

type ItemCBracket struct {
	ItemYaGo
}

ItemCBracket represents a close bracket Item

type ItemCCurly

type ItemCCurly struct {
	ItemYaGo
}

ItemCCurly represents a close curly bracket Item

type ItemCSqrt

type ItemCSqrt struct {
	ItemYaGo
}

ItemCSqrt represents a close square bracket Item

type ItemCaret

type ItemCaret struct {
	ItemYaGo
}

ItemCaret represents a caret Item

type ItemColon

type ItemColon struct {
	ItemYaGo
}

ItemColon represents a colon Item

type ItemComma

type ItemComma struct {
	ItemYaGo
}

ItemComma represents a comma Item

type ItemComment

type ItemComment struct {
	ItemYaGo
}

ItemComment represents a comment Item

type ItemDash

type ItemDash struct {
	ItemYaGo
}

ItemDash represents a dash Item

type ItemDot

type ItemDot struct {
	ItemYaGo
}

ItemDot represents a dot Item

type ItemDotDot

type ItemDotDot struct {
	ItemYaGo
}

ItemDotDot represents a dotdot Item

type ItemEOF

type ItemEOF struct {
	ItemYaGo
}

ItemEOF represents a EOF Item

type ItemEqual

type ItemEqual struct {
	ItemYaGo
}

ItemEqual represents a equal Item

type ItemEqualEqual

type ItemEqualEqual struct {
	ItemYaGo
}

ItemEqualEqual represents a equal equal Item

type ItemGrater

type ItemGrater struct {
	ItemYaGo
}

ItemGrater represents a grater than Item

type ItemGraterEqual

type ItemGraterEqual struct {
	ItemYaGo
}

ItemGraterEqual represents a grater equal Item

type ItemHash

type ItemHash struct {
	ItemYaGo
}

ItemHash represents a hash Item

type ItemIdentifier

type ItemIdentifier struct {
	ItemYaGo
}

ItemIdentifier represents an identifier Item

type ItemIntNumber

type ItemIntNumber struct {
	ItemYaGo
	Value int
}

ItemIntNumber represents an integer number Item

func (ItemIntNumber) String

func (it ItemIntNumber) String()

String prints on stdout the item value

type ItemKWAll

type ItemKWAll struct {
	ItemYaGo
}

ItemKWAll represents an all keyword Item

type ItemKWAnd

type ItemKWAnd struct {
	ItemYaGo
}

ItemKWAnd represents an and keyword Item

type ItemKWAny

type ItemKWAny struct {
	ItemYaGo
}

ItemKWAny represents an any keyword Item

type ItemKWAscii

type ItemKWAscii struct {
	ItemYaGo
}

ItemKWAscii represents an ascii keyword Item

type ItemKWAt

type ItemKWAt struct {
	ItemYaGo
}

ItemKWAt represents an at keyword Item

type ItemKWCondition

type ItemKWCondition struct {
	ItemYaGo
}

ItemKWCondition represents a condition keyword Item

type ItemKWContains

type ItemKWContains struct {
	ItemYaGo
}

ItemKWContains represents a contains keyword Item

type ItemKWEntrypoint

type ItemKWEntrypoint struct {
	ItemYaGo
}

ItemKWEntrypoint represents a entrypoint keyword Item

type ItemKWFalse

type ItemKWFalse struct {
	ItemYaGo
}

ItemKWFalse represents a false keyword Item

type ItemKWFilesize

type ItemKWFilesize struct {
	ItemYaGo
}

ItemKWFilesize represents a filesize keyword Item

type ItemKWFor

type ItemKWFor struct {
	ItemYaGo
}

ItemKWFor represents a for keyword Item

type ItemKWFullword

type ItemKWFullword struct {
	ItemYaGo
}

ItemKWFullword represents a fullword keyword Item

type ItemKWGlobal

type ItemKWGlobal struct {
	ItemYaGo
}

ItemKWGlobal represents a global keyword Item

type ItemKWImport

type ItemKWImport struct {
	ItemYaGo
}

ItemKWImport represents an import keyword Item

type ItemKWIn

type ItemKWIn struct {
	ItemYaGo
}

ItemKWIn represents an in keyword Item

type ItemKWInclude

type ItemKWInclude struct {
	ItemYaGo
}

ItemKWInclude represents an include keyword Item

type ItemKWInt16

type ItemKWInt16 struct {
	ItemYaGo
}

ItemKWInt16 represents an int16 keyword Item

type ItemKWInt16be

type ItemKWInt16be struct {
	ItemYaGo
}

ItemKWInt16be represents an int16be keyword Item

type ItemKWInt32

type ItemKWInt32 struct {
	ItemYaGo
}

ItemKWInt32 represents an int32 keyword Item

type ItemKWInt32be

type ItemKWInt32be struct {
	ItemYaGo
}

ItemKWInt32be represents an int32be keyword Item

type ItemKWInt8

type ItemKWInt8 struct {
	ItemYaGo
}

ItemKWInt8 represents an int8 keyword Item

type ItemKWInt8be

type ItemKWInt8be struct {
	ItemYaGo
}

ItemKWInt8be represents an int8be keyword Item

type ItemKWMatches

type ItemKWMatches struct {
	ItemYaGo
}

ItemKWMatches represents a matches keyword Item

type ItemKWMeta

type ItemKWMeta struct {
	ItemYaGo
}

ItemKWMeta represents a meta keyword Item

type ItemKWNocase

type ItemKWNocase struct {
	ItemYaGo
}

ItemKWNocase represents a nocase keyword Item

type ItemKWNot

type ItemKWNot struct {
	ItemYaGo
}

ItemKWNot represents a not keyword Item

type ItemKWOf

type ItemKWOf struct {
	ItemYaGo
}

ItemKWOf represents an of keyword Item

type ItemKWOr

type ItemKWOr struct {
	ItemYaGo
}

ItemKWOr represents an or keyword Item

type ItemKWPrivate

type ItemKWPrivate struct {
	ItemYaGo
}

ItemKWPrivate represents a private keyword Item

type ItemKWRule

type ItemKWRule struct {
	ItemYaGo
}

ItemKWRule represents a rule keyword Item

type ItemKWStrings

type ItemKWStrings struct {
	ItemYaGo
}

ItemKWStrings represents a strings keyword Item

type ItemKWThem

type ItemKWThem struct {
	ItemYaGo
}

ItemKWThem represents a them keyword Item

type ItemKWTrue

type ItemKWTrue struct {
	ItemYaGo
}

ItemKWTrue represents a true keyword Item

type ItemKWUint16

type ItemKWUint16 struct {
	ItemYaGo
}

ItemKWUint16 represents an uint16 keyword Item

type ItemKWUint16be

type ItemKWUint16be struct {
	ItemYaGo
}

ItemKWUint16be represents an uint16be keyword Item

type ItemKWUint32

type ItemKWUint32 struct {
	ItemYaGo
}

ItemKWUint32 represents an uint32 keyword Item

type ItemKWUint32be

type ItemKWUint32be struct {
	ItemYaGo
}

ItemKWUint32be represents an uint32be keyword Item

type ItemKWUint8

type ItemKWUint8 struct {
	ItemYaGo
}

ItemKWUint8 represents an uint8 keyword Item

type ItemKWUint8be

type ItemKWUint8be struct {
	ItemYaGo
}

ItemKWUint8be represents an uint8be keyword Item

type ItemKWWide

type ItemKWWide struct {
	ItemYaGo
}

ItemKWWide represents a wide keyword Item

type ItemLeftShift

type ItemLeftShift struct {
	ItemYaGo
}

ItemLeftShift represents a left shift Item

type ItemLess

type ItemLess struct {
	ItemYaGo
}

ItemLess represents a less than Item

type ItemLessEqual

type ItemLessEqual struct {
	ItemYaGo
}

ItemLessEqual represents a less equal Item

type ItemNot

type ItemNot struct {
	ItemYaGo
}

ItemNotl represents a not Item

type ItemNotEqual

type ItemNotEqual struct {
	ItemYaGo
}

ItemNotlEqual represents a not equal Item

type ItemOBracket

type ItemOBracket struct {
	ItemYaGo
}

ItemOBracket represents an open bracket Item

type ItemOCurly

type ItemOCurly struct {
	ItemYaGo
}

ItemOCurly represents an open curly bracket Item

type ItemOSqrt

type ItemOSqrt struct {
	ItemYaGo
}

ItemOSqrt represents an open square bracket Item

type ItemPercent

type ItemPercent struct {
	ItemYaGo
}

ItemPercent represents a percentage Item

type ItemPipe

type ItemPipe struct {
	ItemYaGo
}

ItemPipe represents a pipe Item

type ItemPlus

type ItemPlus struct {
	ItemYaGo
}

ItemPlus represents a plus Item

type ItemQMark

type ItemQMark struct {
	ItemYaGo
}

ItemQMark represents a question mark Item

type ItemRegex

type ItemRegex struct {
	ItemYaGo
}

ItemRegex represents a identifier Item

type ItemRightShift

type ItemRightShift struct {
	ItemYaGo
}

ItemRightShift right shift

type ItemSlash

type ItemSlash struct {
	ItemYaGo
}

ItemSlash represents a slash Item

type ItemSpace

type ItemSpace struct {
	ItemYaGo
}

ItemSpace represents a space Item

type ItemStar

type ItemStar struct {
	ItemYaGo
}

ItemStar represents a star Item

type ItemString

type ItemString struct {
	ItemYaGo
}

ItemString represents a string Item

type ItemVariable

type ItemVariable struct {
	ItemYaGo
}

ItemVariable represents a variable Item

type ItemYaGo

type ItemYaGo struct {
	Value string
	Typ   string
	Pos   pos
	Line  int
}

ItemYaGo basic information for each item

func (ItemYaGo) GetLine

func (it ItemYaGo) GetLine() int

GetLine returns where the item was found

func (ItemYaGo) GetPos

func (it ItemYaGo) GetPos() int

GetPos returns the item position inside the input

func (ItemYaGo) GetType

func (it ItemYaGo) GetType() string

GetType returns the item type

func (ItemYaGo) GetValue

func (it ItemYaGo) GetValue() string

GetValue return the item value

func (ItemYaGo) String

func (it ItemYaGo) String()

String prints on stdout the item value

type Lexer

type Lexer struct {
	Name    string    // the name of the input; used only for error reports
	Input   string    // the string being scanned
	State   stateFn   // the next lexing function to enter
	Pos     pos       // current position in the input
	Start   pos       // start position of this Item
	Width   pos       // width of last rune read from input
	LastPos pos       // position of most recent Item returned by nextItem
	Items   chan Item // channel of scanned Items
	Line    int       // 1+number of newlines seen
}

Lexer holds the state of the scanner.

func Lex

func Lex(name, input string) *Lexer

Lex creates a new scanner for the input string.

func (*Lexer) NextItem

func (l *Lexer) NextItem() Item

NextItem returns the next Item from the input. Called by the parser, not in the lexing goroutine.

Jump to

Keyboard shortcuts

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