Documentation ¶
Index ¶
- Constants
- Variables
- type Item
- func NewItemAnd(value string, pos pos, line int) Item
- func NewItemAt(value string, pos pos, line int) Item
- func NewItemBitNot(value string, pos pos, line int) Item
- func NewItemCBracket(value string, pos pos, line int) Item
- func NewItemCCurly(value string, pos pos, line int) Item
- func NewItemCSqrt(value string, pos pos, line int) Item
- func NewItemCaret(value string, pos pos, line int) Item
- func NewItemColon(value string, pos pos, line int) Item
- func NewItemComma(value string, pos pos, line int) Item
- func NewItemComment(value string, pos pos, line int) Item
- func NewItemDash(value string, pos pos, line int) Item
- func NewItemDot(value string, pos pos, line int) Item
- func NewItemDotDot(value string, pos pos, line int) Item
- func NewItemEOF(value string, pos pos, line int) Item
- func NewItemEqual(value string, pos pos, line int) Item
- func NewItemEqualEqual(value string, pos pos, line int) Item
- func NewItemGrater(value string, pos pos, line int) Item
- func NewItemGraterEqual(value string, pos pos, line int) Item
- func NewItemHash(value string, pos pos, line int) Item
- func NewItemIdentifier(value string, pos pos, line int) Item
- func NewItemIntNumber(value string, pos pos, line int) Item
- func NewItemKWAll(value string, pos pos, line int) Item
- func NewItemKWAnd(value string, pos pos, line int) Item
- func NewItemKWAny(value string, pos pos, line int) Item
- func NewItemKWAscii(value string, pos pos, line int) Item
- func NewItemKWAt(value string, pos pos, line int) Item
- func NewItemKWCondition(value string, pos pos, line int) Item
- func NewItemKWContains(value string, pos pos, line int) Item
- func NewItemKWEntrypoint(value string, pos pos, line int) Item
- func NewItemKWFalse(value string, pos pos, line int) Item
- func NewItemKWFilesize(value string, pos pos, line int) Item
- func NewItemKWFor(value string, pos pos, line int) Item
- func NewItemKWFullword(value string, pos pos, line int) Item
- func NewItemKWGlobal(value string, pos pos, line int) Item
- func NewItemKWImport(value string, pos pos, line int) Item
- func NewItemKWIn(value string, pos pos, line int) Item
- func NewItemKWInclude(value string, pos pos, line int) Item
- func NewItemKWInt16(value string, pos pos, line int) Item
- func NewItemKWInt16be(value string, pos pos, line int) Item
- func NewItemKWInt32(value string, pos pos, line int) Item
- func NewItemKWInt32be(value string, pos pos, line int) Item
- func NewItemKWInt8(value string, pos pos, line int) Item
- func NewItemKWInt8be(value string, pos pos, line int) Item
- func NewItemKWMatches(value string, pos pos, line int) Item
- func NewItemKWMeta(value string, pos pos, line int) Item
- func NewItemKWNocase(value string, pos pos, line int) Item
- func NewItemKWNot(value string, pos pos, line int) Item
- func NewItemKWOf(value string, pos pos, line int) Item
- func NewItemKWOr(value string, pos pos, line int) Item
- func NewItemKWPrivate(value string, pos pos, line int) Item
- func NewItemKWRule(value string, pos pos, line int) Item
- func NewItemKWStrings(value string, pos pos, line int) Item
- func NewItemKWThem(value string, pos pos, line int) Item
- func NewItemKWTrue(value string, pos pos, line int) Item
- func NewItemKWUint16(value string, pos pos, line int) Item
- func NewItemKWUint16be(value string, pos pos, line int) Item
- func NewItemKWUint32(value string, pos pos, line int) Item
- func NewItemKWUint32be(value string, pos pos, line int) Item
- func NewItemKWUint8(value string, pos pos, line int) Item
- func NewItemKWUint8be(value string, pos pos, line int) Item
- func NewItemKWWide(value string, pos pos, line int) Item
- func NewItemLeftShift(value string, pos pos, line int) Item
- func NewItemLess(value string, pos pos, line int) Item
- func NewItemLessEqual(value string, pos pos, line int) Item
- func NewItemNot(value string, pos pos, line int) Item
- func NewItemNotEqual(value string, pos pos, line int) Item
- func NewItemOBracket(value string, pos pos, line int) Item
- func NewItemOCurly(value string, pos pos, line int) Item
- func NewItemOSqrt(value string, pos pos, line int) Item
- func NewItemPercent(value string, pos pos, line int) Item
- func NewItemPipe(value string, pos pos, line int) Item
- func NewItemPlus(value string, pos pos, line int) Item
- func NewItemQMark(value string, pos pos, line int) Item
- func NewItemRegex(value string, pos pos, line int) Item
- func NewItemRightShift(value string, pos pos, line int) Item
- func NewItemSlash(value string, pos pos, line int) Item
- func NewItemSpace(value string, pos pos, line int) Item
- func NewItemStar(value string, pos pos, line int) Item
- func NewItemString(value string, pos pos, line int) Item
- func NewItemVariable(value string, pos pos, line int) Item
- type ItemAnd
- type ItemAt
- type ItemBitNot
- type ItemCBracket
- type ItemCCurly
- type ItemCSqrt
- type ItemCaret
- type ItemColon
- type ItemComma
- type ItemComment
- type ItemDash
- type ItemDot
- type ItemDotDot
- type ItemEOF
- type ItemEqual
- type ItemEqualEqual
- type ItemGrater
- type ItemGraterEqual
- type ItemHash
- type ItemIdentifier
- type ItemIntNumber
- type ItemKWAll
- type ItemKWAnd
- type ItemKWAny
- type ItemKWAscii
- type ItemKWAt
- type ItemKWCondition
- type ItemKWContains
- type ItemKWEntrypoint
- type ItemKWFalse
- type ItemKWFilesize
- type ItemKWFor
- type ItemKWFullword
- type ItemKWGlobal
- type ItemKWImport
- type ItemKWIn
- type ItemKWInclude
- type ItemKWInt16
- type ItemKWInt16be
- type ItemKWInt32
- type ItemKWInt32be
- type ItemKWInt8
- type ItemKWInt8be
- type ItemKWMatches
- type ItemKWMeta
- type ItemKWNocase
- type ItemKWNot
- type ItemKWOf
- type ItemKWOr
- type ItemKWPrivate
- type ItemKWRule
- type ItemKWStrings
- type ItemKWThem
- type ItemKWTrue
- type ItemKWUint16
- type ItemKWUint16be
- type ItemKWUint32
- type ItemKWUint32be
- type ItemKWUint8
- type ItemKWUint8be
- type ItemKWWide
- type ItemLeftShift
- type ItemLess
- type ItemLessEqual
- type ItemNot
- type ItemNotEqual
- type ItemOBracket
- type ItemOCurly
- type ItemOSqrt
- type ItemPercent
- type ItemPipe
- type ItemPlus
- type ItemQMark
- type ItemRegex
- type ItemRightShift
- type ItemSlash
- type ItemSpace
- type ItemStar
- type ItemString
- type ItemVariable
- type ItemYaGo
- type Lexer
Constants ¶
const EOF = -1
EOF represents a End Of File
Variables ¶
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 ¶
Item interface for all Item in YaGo
func NewItemAnd ¶
NewItemAnd and item constructor
func NewItemBitNot ¶
NewItemBitNot bitwise not item constructor
func NewItemCBracket ¶
NewItemCBracket close bracket item constructor
func NewItemCCurly ¶
NewItemCCurly close curly item constructor
func NewItemCSqrt ¶
NewItemCSqrt close square bracket item constructor
func NewItemCaret ¶
NewItemCaret caret item constructor
func NewItemColon ¶
NewItemColon colon item constructor
func NewItemComma ¶
NewItemComma comma item constructor
func NewItemComment ¶
NewItemComment comment item constructor
func NewItemDash ¶
NewItemDash dash item constructor
func NewItemDot ¶
NewItemDot dot item constructor
func NewItemDotDot ¶
NewItemDotDot dot dot (:) item constructor
func NewItemEOF ¶
NewItemEOF EOF item constructor
func NewItemEqual ¶
NewItemEqual equal item constructor
func NewItemEqualEqual ¶
NewItemEqualEqual equal equal (==) item constructor
func NewItemGrater ¶
NewItemGrater grater than item constructor
func NewItemGraterEqual ¶
NewItemGraterEqual grater equal item constructor
func NewItemHash ¶
NewItemHash hash item constructor
func NewItemIdentifier ¶
NewItemIdentifier identifier item constructor
func NewItemIntNumber ¶
NewItemIntNumber int number item constructor
func NewItemKWAll ¶
NewItemKWAll all keyword item constructor
func NewItemKWAnd ¶
NewItemKWAnd and keyword item constructor
func NewItemKWAny ¶
NewItemKWAny any keyword item constructor
func NewItemKWAscii ¶
NewItemKWAscii ascii keyword item constructor
func NewItemKWAt ¶
NewItemKWAt at keyword item constructor
func NewItemKWCondition ¶
NewItemKWCondition condition keyword item constructor
func NewItemKWContains ¶
NewItemKWContains contains keyword item constructor
func NewItemKWEntrypoint ¶
NewItemKWEntrypoint entrypoint keyword item constructor
func NewItemKWFalse ¶
NewItemKWFalse false keyword item constructor
func NewItemKWFilesize ¶
NewItemKWFilesize filesize keyword item constructor
func NewItemKWFor ¶
NewItemKWFor for keyword item constructor
func NewItemKWFullword ¶
NewItemKWFullword fullword keyword item constructor
func NewItemKWGlobal ¶
NewItemKWGlobal global keyword item constructor
func NewItemKWImport ¶
NewItemKWImport import keyword item constructor
func NewItemKWIn ¶
NewItemKWIn in keyword item constructor
func NewItemKWInclude ¶
NewItemKWInclude include keyword item constructor
func NewItemKWInt16 ¶
NewItemKWInt16 int16 keyword item constructor
func NewItemKWInt16be ¶
NewItemKWInt16be int16be keyword item constructor
func NewItemKWInt32 ¶
NewItemKWInt32 int32 keyword item constructor
func NewItemKWInt32be ¶
NewItemKWInt32be int32be keyword item constructor
func NewItemKWInt8 ¶
NewItemKWInt8 int8 keyword item constructor
func NewItemKWInt8be ¶
NewItemKWInt8be int8be keyword item constructor
func NewItemKWMatches ¶
NewItemKWMatches matches keyword item constructor
func NewItemKWMeta ¶
NewItemKWMeta meta keyword item constructor
func NewItemKWNocase ¶
NewItemKWNocase nocase keyword item constructor
func NewItemKWNot ¶
NewItemKWNot not keyword item constructor
func NewItemKWOf ¶
NewItemKWOf of keyword item constructor
func NewItemKWOr ¶
NewItemKWOr or keyword item constructor
func NewItemKWPrivate ¶
NewItemKWPrivate private keyword item constructor
func NewItemKWRule ¶
NewItemKWRule rule keyword item constructor
func NewItemKWStrings ¶
NewItemKWStrings strings keyword item constructor
func NewItemKWThem ¶
NewItemKWThem them keyword item constructor
func NewItemKWTrue ¶
NewItemKWTrue true keyword item constructor
func NewItemKWUint16 ¶
NewItemKWUint16 uint16 keyword item constructor
func NewItemKWUint16be ¶
NewItemKWUint16be uint16be keyword item constructor
func NewItemKWUint32 ¶
NewItemKWUint32 uint32 keyword item constructor
func NewItemKWUint32be ¶
NewItemKWUint32be uint32be keyword item constructor
func NewItemKWUint8 ¶
NewItemKWUint8 uint8 keyword item constructor
func NewItemKWUint8be ¶
NewItemKWUint8be uint8be keyword item constructor
func NewItemKWWide ¶
NewItemKWWide wide keyword item constructor
func NewItemLeftShift ¶
NewItemLeftShift left shift item constructor
func NewItemLess ¶
NewItemLess less than item constructor
func NewItemLessEqual ¶
NewItemLessEqual less equal item constructor
func NewItemNot ¶
NewItemNot not item constructor
func NewItemNotEqual ¶
NewItemNotEqual not equal (!=) item constructor
func NewItemOBracket ¶
NewItemOBracket open bracket item constructor
func NewItemOCurly ¶
NewItemOCurly open curly item constructor
func NewItemOSqrt ¶
NewItemOSqrt open square bracket item constructor
func NewItemPercent ¶
NewItemPercent percentage item constructor
func NewItemPipe ¶
NewItemPipe pipe item constructor
func NewItemPlus ¶
NewItemPlus plus item constructor
func NewItemQMark ¶
NewItemQMark question mark item constructor
func NewItemRegex ¶
NewItemRegex regex item constructor
func NewItemRightShift ¶
NewItemRightShift right shift item constructor
func NewItemSlash ¶
NewItemSlash slash item constructor
func NewItemSpace ¶
NewItemSpace space item constructor
func NewItemStar ¶
NewItemStar star item constructor
func NewItemString ¶
NewItemString string item constructor
func NewItemVariable ¶
NewItemVariable strings' variable item constructor
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 ItemEqualEqual ¶
type ItemEqualEqual struct {
ItemYaGo
}
ItemEqualEqual represents a equal equal Item
type ItemGraterEqual ¶
type ItemGraterEqual struct {
ItemYaGo
}
ItemGraterEqual represents a grater equal Item
type ItemIdentifier ¶
type ItemIdentifier struct {
ItemYaGo
}
ItemIdentifier represents an identifier Item
type ItemIntNumber ¶
ItemIntNumber represents an integer number Item
func (ItemIntNumber) String ¶
func (it ItemIntNumber) String()
String prints on stdout the item value
type ItemKWAscii ¶
type ItemKWAscii struct {
ItemYaGo
}
ItemKWAscii represents an ascii 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 ItemKWFilesize ¶
type ItemKWFilesize struct {
ItemYaGo
}
ItemKWFilesize represents a filesize 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 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 ItemKWInt8be ¶
type ItemKWInt8be struct {
ItemYaGo
}
ItemKWInt8be represents an int8be keyword Item
type ItemKWMatches ¶
type ItemKWMatches struct {
ItemYaGo
}
ItemKWMatches represents a matches keyword Item
type ItemKWNocase ¶
type ItemKWNocase struct {
ItemYaGo
}
ItemKWNocase represents a nocase keyword Item
type ItemKWPrivate ¶
type ItemKWPrivate struct {
ItemYaGo
}
ItemKWPrivate represents a private keyword Item
type ItemKWStrings ¶
type ItemKWStrings struct {
ItemYaGo
}
ItemKWStrings represents a strings 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 ItemLeftShift ¶
type ItemLeftShift struct {
ItemYaGo
}
ItemLeftShift represents a left shift Item
type ItemLessEqual ¶
type ItemLessEqual struct {
ItemYaGo
}
ItemLessEqual represents a less 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 ItemYaGo ¶
ItemYaGo basic information for each item
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.