scanner

package
v0.0.0-...-4e6bda9 Latest Latest
Warning

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

Go to latest
Published: May 20, 2018 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

line 1 "scanner/lex.rl"

Index

Constants

View Source
const (
	CoverDelim  = ","
	CoverID     = "Cover:"
	SYSRESTART  = "ERESTARTSYS"
	SignalPlus  = "+++"
	SignalMinus = "---"
)
View Source
const AND = 57358
View Source
const COMMA = 57366
View Source
const DATETIME = 57350
View Source
const DOUBLE = 57355
View Source
const EQUALS = 57373
View Source
const FLAG = 57349
View Source
const IDENTIFIER = 57348
View Source
const INT = 57353
View Source
const IPV4 = 57347
View Source
const LAND = 57361
View Source
const LBRACKET = 57367
View Source
const LBRACKET_SQUARE = 57369
View Source
const LOR = 57359
View Source
const LPAREN = 57371
View Source
const LSHIFT = 57364
View Source
const NOFLAG = 57378
View Source
const NOT = 57362
View Source
const NULL = 57377
View Source
const ONESCOMP = 57363
View Source
const OR = 57357
View Source
const QUESTION = 57356
View Source
const RBRACKET = 57368
View Source
const RBRACKET_SQUARE = 57370
View Source
const RESUMED = 57376
View Source
const RPAREN = 57372
View Source
const RSHIFT = 57365
View Source
const SIGNAL_MINUS = 57352
View Source
const SIGNAL_PLUS = 57351
View Source
const STRING_LITERAL = 57346
View Source
const StraceEofCode = 1
View Source
const StraceErrCode = 2
View Source
const StraceFlag = -1000
View Source
const StraceInitialStackSize = 16
View Source
const StraceLast = 159
View Source
const StracePrivate = 57344
View Source
const TIMES = 57360
View Source
const UINT = 57354
View Source
const UNFINISHED = 57374
View Source
const UNFINISHED_W_COMMA = 57375

Variables

View Source
var (
	StraceDebug        = 0
	StraceErrorVerbose = false
)
View Source
var StraceAct = [...]int{}/* 159 elements not displayed */
View Source
var StraceChk = [...]int{}/* 115 elements not displayed */
View Source
var StraceDef = [...]int{}/* 115 elements not displayed */
View Source
var StraceErrorMessages = [...]struct {
	state int
	token int
	msg   string
}{}
View Source
var StraceExca = [...]int{
	-1, 1,
	1, -1,
	-2, 0,
}
View Source
var StracePact = [...]int{}/* 115 elements not displayed */
View Source
var StracePgo = [...]int{

	0, 156, 155, 0, 154, 153, 152, 151, 1, 3,
	148, 2, 144, 123, 119,
}
View Source
var StraceR1 = [...]int{

	0, 1, 1, 1, 1, 1, 1, 1, 1, 1,
	1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
	14, 14, 11, 11, 11, 11, 11, 11, 11, 11,
	10, 12, 12, 7, 7, 6, 2, 5, 5, 9,
	9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
	9, 9, 4, 4, 8, 13, 3, 3,
}
View Source
var StraceR2 = [...]int{

	0, 4, 5, 5, 5, 5, 8, 8, 6, 6,
	9, 9, 6, 7, 7, 7, 11, 11, 10, 10,
	1, 3, 1, 1, 1, 1, 1, 1, 1, 1,
	4, 4, 1, 3, 2, 3, 3, 1, 1, 1,
	1, 3, 3, 3, 3, 3, 3, 3, 3, 3,
	3, 2, 1, 1, 1, 1, 1, 2,
}
View Source
var StraceStatenames = [...]string{}
View Source
var StraceTok1 = [...]int{

	1,
}
View Source
var StraceTok2 = [...]int{

	2, 3, 4, 5, 6, 7, 8, 9, 10, 11,
	12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
	22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
	32, 33, 34, 35, 36,
}
View Source
var StraceTok3 = [...]int{
	0,
}
View Source
var StraceToknames = [...]string{
	"$end",
	"error",
	"$unk",
	"STRING_LITERAL",
	"IPV4",
	"IDENTIFIER",
	"FLAG",
	"DATETIME",
	"SIGNAL_PLUS",
	"SIGNAL_MINUS",
	"INT",
	"UINT",
	"DOUBLE",
	"QUESTION",
	"OR",
	"AND",
	"LOR",
	"TIMES",
	"LAND",
	"NOT",
	"ONESCOMP",
	"LSHIFT",
	"RSHIFT",
	"COMMA",
	"LBRACKET",
	"RBRACKET",
	"LBRACKET_SQUARE",
	"RBRACKET_SQUARE",
	"LPAREN",
	"RPAREN",
	"EQUALS",
	"UNFINISHED",
	"UNFINISHED_W_COMMA",
	"RESUMED",
	"NULL",
	"NOFLAG",
}

Functions

func Parse

func Parse(filename string) *strace_types.TraceTree

func ParseString

func ParseString(s string) string

func StraceErrorMessage

func StraceErrorMessage(state, lookAhead int) string

func StraceParse

func StraceParse(Stracelex StraceLexer) int

func StraceStatname

func StraceStatname(s int) string

func StraceTokname

func StraceTokname(c int) string

func Stracelex1

func Stracelex1(lex StraceLexer, lval *StraceSymType) (char, token int)

Types

type StraceLexer

type StraceLexer interface {
	Lex(lval *StraceSymType) int
	Error(s string)
}

type StraceParser

type StraceParser interface {
	Parse(StraceLexer) int
	Lookahead() int
}

func StraceNewParser

func StraceNewParser() StraceParser

type StraceParserImpl

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

func (*StraceParserImpl) Lookahead

func (p *StraceParserImpl) Lookahead() int

func (*StraceParserImpl) Parse

func (Stracercvr *StraceParserImpl) Parse(Stracelex StraceLexer) int

type StraceSymType

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

Jump to

Keyboard shortcuts

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