yacc

package
v0.0.0-...-99bab9e Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2020 License: Apache-2.0 Imports: 13 Imported by: 2

Documentation

Overview

Generated by golex

Index

Constants

View Source
const Character_literal = 57349
View Source
const DefNotFound int = 10005
View Source
const ErrorMustbeAnInt = 10008
View Source
const ErrorNoScopingAllowed = 10009
View Source
const ErrorOnAddTypedefDcl = 10006
View Source
const ErrorTypeisNull = 10007
View Source
const Hex_literal = 57348
View Source
const Identifier = 57346
View Source
const IdlExprEofCode = 1
View Source
const IdlExprErrCode = 2
View Source
const IdlExprFlag = -1000
View Source
const IdlExprInitialStackSize = 16
View Source
const IdlExprLast = 205
View Source
const IdlExprPrivate = 57344
View Source
const Integer_literal = 57347
View Source
const NoCtx int = 99998
View Source
const NoLex int = 99999
View Source
const RwMitchAlpha = 57354
View Source
const RwMitchBitField = 57355
View Source
const RwMitchByte = 57356
View Source
const RwMitchDate = 57357
View Source
const RwMitchPrice04 = 57359
View Source
const RwMitchPrice08 = 57360
View Source
const RwMitchTime = 57358
View Source
const RwMitchUInt08 = 57361
View Source
const RwMitchUInt16 = 57362
View Source
const RwMitchUInt32 = 57363
View Source
const RwMitchUInt64 = 57364
View Source
const Rwenum = 57351
View Source
const Rwstruct = 57352
View Source
const Rwtypedef = 57353
View Source
const Scope = 57350
View Source
const TypeNotAvailable = 10010

Variables

View Source
var (
	IdlExprDebug        = 0
	IdlExprErrorVerbose = false
)
View Source
var EOF int = -1
View Source
var INITIAL yystartcondition = 0
View Source
var IdlExprAct = [...]int{}/* 205 elements not displayed */
View Source
var IdlExprChk = [...]int{}/* 116 elements not displayed */
View Source
var IdlExprDef = [...]int{}/* 116 elements not displayed */
View Source
var IdlExprErrorMessages = [...]struct {
	state int
	token int
	msg   string
}{}
View Source
var IdlExprExca = [...]int{
	-1, 1,
	1, -1,
	-2, 0,
}
View Source
var IdlExprPact = [...]int{}/* 116 elements not displayed */
View Source
var IdlExprPgo = [...]int{

	0, 0, 3, 10, 8, 9, 151, 150, 2, 149,
	96, 148, 6, 147, 146, 144, 124, 132, 131, 130,
	129, 87, 128, 126, 111, 1, 5, 4, 109, 107,
	7,
}
View Source
var IdlExprR1 = [...]int{

	0, 15, 17, 17, 16, 12, 5, 6, 6, 7,
	7, 7, 3, 3, 3, 2, 2, 4, 18, 18,
	9, 11, 11, 11, 11, 11, 11, 11, 11, 11,
	11, 10, 10, 14, 13, 21, 21, 19, 20, 20,
	20, 20, 8, 8, 22, 27, 27, 28, 29, 29,
	30, 1, 24, 23, 23, 23, 26, 26, 26, 25,
	25, 25,
}
View Source
var IdlExprR2 = [...]int{

	0, 1, 1, 2, 2, 1, 1, 2, 1, 1,
	1, 1, 1, 1, 3, 1, 1, 1, 1, 1,
	1, 4, 1, 1, 1, 1, 1, 1, 1, 1,
	1, 1, 1, 1, 18, 1, 1, 1, 5, 4,
	10, 9, 3, 2, 5, 1, 3, 2, 1, 2,
	3, 1, 2, 2, 2, 2, 1, 1, 3, 3,
	1, 3,
}
View Source
var IdlExprStatenames = [...]string{}
View Source
var IdlExprTok1 = [...]int{}/* 127 elements not displayed */
View Source
var IdlExprTok2 = [...]int{

	2, 3, 4, 5, 6, 7, 8, 9, 10, 11,
	12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
	22,
}
View Source
var IdlExprTok3 = [...]int{
	0,
}
View Source
var IdlExprToknames = [...]string{
	"$end",
	"error",
	"$unk",
	"Identifier",
	"Integer_literal",
	"Hex_literal",
	"Character_literal",
	"Scope",
	"Rwenum",
	"Rwstruct",
	"Rwtypedef",
	"RwMitchAlpha",
	"RwMitchBitField",
	"RwMitchByte",
	"RwMitchDate",
	"RwMitchTime",
	"RwMitchPrice04",
	"RwMitchPrice08",
	"RwMitchUInt08",
	"RwMitchUInt16",
	"RwMitchUInt32",
	"RwMitchUInt64",
	"';'",
	"'-'",
	"'+'",
	"'~'",
	"'('",
	"')'",
	"'<'",
	"'>'",
	"','",
	"'{'",
	"'}'",
	"'['",
	"']'",
	"'='",
}
View Source
var YY_START yystartcondition = INITIAL

Functions

func AddTypeDclToContext

func AddTypeDclToContext(idlExprlex IdlExprLexer, typeDecl interfaces.IDefinitionDeclaration) error

func AddTypedefDcl

func AddTypedefDcl(idlExprlex IdlExprLexer, typeDecl interfaces.ITypeDeclaration) error

func GetExportValue

func GetExportValue(value interfaces.IConstantValue) string

func GetIdlExprContext

func GetIdlExprContext(item IdlExprLexer) (*ctx.IdlExprContext, error)

func IdlExprErrorMessage

func IdlExprErrorMessage(state, lookAhead int) string

func IdlExprParse

func IdlExprParse(IdlExprlex IdlExprLexer) int

func IdlExprStatname

func IdlExprStatname(s int) string

func IdlExprTokname

func IdlExprTokname(c int) string

func IdlExprlex1

func IdlExprlex1(lex IdlExprLexer, lval *IdlExprSymType) (char, token int)

func Newstruct_forward_dcl

func Newstruct_forward_dcl() interfaces.IDefinitionDeclaration

func SendError

func SendError(item IdlExprLexer, msg string)

Types

type Declarator

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

func NewDeclarator

func NewDeclarator(identifier string, defaultValue interfaces.IConstantValue) *Declarator

func (*Declarator) ClearNext

func (self *Declarator) ClearNext()

func (*Declarator) DefaultValue

func (self *Declarator) DefaultValue() interfaces.IConstantValue

func (*Declarator) GetNext

func (self *Declarator) GetNext() interfaces.IDeclarator

func (*Declarator) Identifier

func (self *Declarator) Identifier() string

func (*Declarator) MarshalJSON

func (self *Declarator) MarshalJSON() ([]byte, error)

func (*Declarator) Next

func (self *Declarator) Next() interfaces.IDeclarator

func (*Declarator) SetNext

func (self *Declarator) SetNext(next interfaces.IDeclarator)

func (*Declarator) String

func (receiver *Declarator) String() string

type EnumDecl

type EnumDecl struct {
	Type       string                            `json:"Type"`
	Identifier string                            `json:"Identifier"`
	Next       interfaces.IDefinitionDeclaration `json:"-"`
	Decls      []interfaces.IDeclarator
}

func NewEnumDcl

func NewEnumDcl(identifier string) *EnumDecl

func (*EnumDecl) AddMember

func (self *EnumDecl) AddMember(decl interfaces.IDeclarator)

func (*EnumDecl) ClearNext

func (self *EnumDecl) ClearNext()

func (*EnumDecl) DefaultValue

func (self *EnumDecl) DefaultValue() string

func (*EnumDecl) GetName

func (self *EnumDecl) GetName() string

func (*EnumDecl) GetNext

func (self *EnumDecl) GetNext() interfaces.IDefinitionDeclaration

func (*EnumDecl) GetPackageName

func (self *EnumDecl) GetPackageName() (bool, string, string)

func (*EnumDecl) GetScopeName

func (self *EnumDecl) GetScopeName() string

func (*EnumDecl) GetSequenceCount

func (self *EnumDecl) GetSequenceCount() (bool, int)

func (*EnumDecl) GetStreamFunctionName

func (self *EnumDecl) GetStreamFunctionName() string

func (*EnumDecl) Kind

func (self *EnumDecl) Kind() interfaces.Kind

func (*EnumDecl) Predefined

func (self *EnumDecl) Predefined() bool

func (*EnumDecl) SetNext

func (self *EnumDecl) SetNext(typeSpec interfaces.IDefinitionDeclaration)

type IdlExprLex

type IdlExprLex struct {
	InputStream io.Reader
	// contains filtered or unexported fields
}

func GetIdlExprLex

func GetIdlExprLex(item IdlExprLexer) (*IdlExprLex, error)

func NewIdlExprLex

func NewIdlExprLex(
	inputStream io.Reader,
	IdlExprContext *ctx.IdlExprContext) (*IdlExprLex, error)

func (*IdlExprLex) Error

func (x *IdlExprLex) Error(s string)

func (*IdlExprLex) Lex

func (x *IdlExprLex) Lex(value *IdlExprSymType) int

type IdlExprLexer

type IdlExprLexer interface {
	Lex(lval *IdlExprSymType) int
	Error(s string)
}

type IdlExprParser

type IdlExprParser interface {
	Parse(IdlExprLexer) int
	Lookahead() int
}

func IdlExprNewParser

func IdlExprNewParser() IdlExprParser

type IdlExprParserImpl

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

func (*IdlExprParserImpl) Lookahead

func (p *IdlExprParserImpl) Lookahead() int

func (*IdlExprParserImpl) Parse

func (IdlExprrcvr *IdlExprParserImpl) Parse(IdlExprlex IdlExprLexer) int

type IdlExprSymType

type IdlExprSymType struct {
	Identifier   string
	IntegerValue int64
	StringValue  string
	FloatValue   float64
	ConstValue   interfaces.IConstantValue
	BoolValue    bool

	Member                *Member
	Declarator            interfaces.IDeclarator
	DefinedType           interfaces.IDefinedType
	DefinitionDeclaration interfaces.IDefinitionDeclaration
	Specification         []interfaces.IDefinitionDeclaration
	// contains filtered or unexported fields
}

type Member

type Member struct {
	DefinedType interfaces.IDefinedType
	Declarator  interfaces.IDeclarator
	Next        *Member
}

func NewMember

func NewMember(type_spec interfaces.IDefinedType, declarator interfaces.IDeclarator, next *Member) *Member

func (*Member) MarshalJSON

func (self *Member) MarshalJSON() ([]byte, error)

type MitchMessageDefinition

type MitchMessageDefinition struct {
	Type       string                            `json:"Type"`
	Identifier string                            `json:"Identifier"`
	Members    []*Member                         `json:"Members"`
	Next       interfaces.IDefinitionDeclaration `json:"-"`

	MessageLength uint16
	MessageType   byte
}

func NewMitchMessageDefinition

func NewMitchMessageDefinition(identifier string, MessageLength int64, MessageType int64) *MitchMessageDefinition

func (*MitchMessageDefinition) AddMember

func (self *MitchMessageDefinition) AddMember(typeSpec interfaces.IDefinedType, declarator interfaces.IDeclarator)

func (*MitchMessageDefinition) ClearNext

func (self *MitchMessageDefinition) ClearNext()

func (*MitchMessageDefinition) DefaultValue

func (self *MitchMessageDefinition) DefaultValue() string

func (*MitchMessageDefinition) GetName

func (self *MitchMessageDefinition) GetName() string

func (*MitchMessageDefinition) GetNext

func (*MitchMessageDefinition) GetPackageName

func (self *MitchMessageDefinition) GetPackageName() (bool, string, string)

func (*MitchMessageDefinition) GetScopeName

func (self *MitchMessageDefinition) GetScopeName() string

func (*MitchMessageDefinition) GetSequenceCount

func (self *MitchMessageDefinition) GetSequenceCount() (bool, int)

func (*MitchMessageDefinition) GetStreamFunctionName

func (self *MitchMessageDefinition) GetStreamFunctionName() string

func (*MitchMessageDefinition) HasMessageInformation

func (self *MitchMessageDefinition) HasMessageInformation() bool

func (*MitchMessageDefinition) Kind

func (self *MitchMessageDefinition) Kind() interfaces.Kind

func (*MitchMessageDefinition) Predefined

func (self *MitchMessageDefinition) Predefined() bool

func (*MitchMessageDefinition) SetNext

func (*MitchMessageDefinition) String

func (self *MitchMessageDefinition) String() string

type ScopeName

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

func NewScopeName

func NewScopeName(name string) *ScopeName

func (*ScopeName) GetData

func (self *ScopeName) GetData() interface{}

func (*ScopeName) GetName

func (self *ScopeName) GetName() string

type TypeDeclarator

type TypeDeclarator struct {
	DefinedTyped interfaces.IDefinedType
	Declarator   interfaces.IDeclarator
	// contains filtered or unexported fields
}

func Newtypedef_dcl

func Newtypedef_dcl(definedTyped interfaces.IDefinedType, declarator interfaces.IDeclarator) *TypeDeclarator

func (*TypeDeclarator) ClearNext

func (self *TypeDeclarator) ClearNext()

func (*TypeDeclarator) DefaultValue

func (self *TypeDeclarator) DefaultValue() string

func (*TypeDeclarator) GetDeclarator

func (self *TypeDeclarator) GetDeclarator() interfaces.IDeclarator

func (*TypeDeclarator) GetDefinedTyped

func (self *TypeDeclarator) GetDefinedTyped() interfaces.IDefinedType

func (*TypeDeclarator) GetName

func (self *TypeDeclarator) GetName() string

func (*TypeDeclarator) GetNext

func (*TypeDeclarator) GetPackageName

func (self *TypeDeclarator) GetPackageName() (bool, string, string)

func (*TypeDeclarator) GetScopeName

func (self *TypeDeclarator) GetScopeName() string

func (*TypeDeclarator) GetSequenceCount

func (self *TypeDeclarator) GetSequenceCount() (bool, int)

func (*TypeDeclarator) GetStreamFunctionName

func (self *TypeDeclarator) GetStreamFunctionName() string

func (*TypeDeclarator) Kind

func (self *TypeDeclarator) Kind() interfaces.Kind

func (*TypeDeclarator) Predefined

func (self *TypeDeclarator) Predefined() bool

func (*TypeDeclarator) SetNext

func (self *TypeDeclarator) SetNext(typeSpec interfaces.IDefinitionDeclaration)

Jump to

Keyboard shortcuts

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