parser

package
v0.0.0-...-e93052f Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2022 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	YaaiLexerACTOR              = 1
	YaaiLexerFOR                = 2
	YaaiLexerFUNC               = 3
	YaaiLexerINIT               = 4
	YaaiLexerINTERFACE          = 5
	YaaiLexerPACKAGE            = 6
	YaaiLexerRECEIVE            = 7
	YaaiLexerSELF               = 8
	YaaiLexerSTRUCT             = 9
	YaaiLexerTYPE               = 10
	YaaiLexerUNHANDLED          = 11
	YaaiLexerVAR                = 12
	YaaiLexerT_INT              = 13
	YaaiLexerT_INT32            = 14
	YaaiLexerT_INT64            = 15
	YaaiLexerT_UINT             = 16
	YaaiLexerT_UINT32           = 17
	YaaiLexerT_UINT64           = 18
	YaaiLexerT_FLOAT32          = 19
	YaaiLexerT_FLOAT64          = 20
	YaaiLexerT_STRING           = 21
	YaaiLexerIDENTIFIER         = 22
	YaaiLexerSTRING_LITERAL     = 23
	YaaiLexerNUMERIC_LITERAL    = 24
	YaaiLexerFLOAT_LITERAL      = 25
	YaaiLexerVAR_INITIALIZER    = 26
	YaaiLexerASSIGNMENT         = 27
	YaaiLexerINCR               = 28
	YaaiLexerDECR               = 29
	YaaiLexerPLUS_EQUAL         = 30
	YaaiLexerMINUS_EQUAL        = 31
	YaaiLexerEQUAL_EQUAL        = 32
	YaaiLexerNOT_EQUAL          = 33
	YaaiLexerLESS_THAN_EQUAL    = 34
	YaaiLexerGREATER_THAN_EQUAL = 35
	YaaiLexerLESS_THAN          = 36
	YaaiLexerGREATER_THAN       = 37
	YaaiLexerL_BRACKET          = 38
	YaaiLexerR_BRACKET          = 39
	YaaiLexerL_PAREN            = 40
	YaaiLexerR_PAREN            = 41
	YaaiLexerDOT                = 42
	YaaiLexerPLUS               = 43
	YaaiLexerMINUS              = 44
	YaaiLexerSTAR               = 45
	YaaiLexerF_SLASH            = 46
	YaaiLexerCOMMA              = 47
	YaaiLexerNB_WS              = 48
	YaaiLexerLINE_COMMENT       = 49
	YaaiLexerEOS                = 50
)

YaaiLexer tokens.

View Source
const (
	YaaiEOF                = antlr.TokenEOF
	YaaiACTOR              = 1
	YaaiFOR                = 2
	YaaiFUNC               = 3
	YaaiINIT               = 4
	YaaiINTERFACE          = 5
	YaaiPACKAGE            = 6
	YaaiRECEIVE            = 7
	YaaiSELF               = 8
	YaaiSTRUCT             = 9
	YaaiTYPE               = 10
	YaaiUNHANDLED          = 11
	YaaiVAR                = 12
	YaaiT_INT              = 13
	YaaiT_INT32            = 14
	YaaiT_INT64            = 15
	YaaiT_UINT             = 16
	YaaiT_UINT32           = 17
	YaaiT_UINT64           = 18
	YaaiT_FLOAT32          = 19
	YaaiT_FLOAT64          = 20
	YaaiT_STRING           = 21
	YaaiIDENTIFIER         = 22
	YaaiSTRING_LITERAL     = 23
	YaaiNUMERIC_LITERAL    = 24
	YaaiFLOAT_LITERAL      = 25
	YaaiVAR_INITIALIZER    = 26
	YaaiASSIGNMENT         = 27
	YaaiINCR               = 28
	YaaiDECR               = 29
	YaaiPLUS_EQUAL         = 30
	YaaiMINUS_EQUAL        = 31
	YaaiEQUAL_EQUAL        = 32
	YaaiNOT_EQUAL          = 33
	YaaiLESS_THAN_EQUAL    = 34
	YaaiGREATER_THAN_EQUAL = 35
	YaaiLESS_THAN          = 36
	YaaiGREATER_THAN       = 37
	YaaiL_BRACKET          = 38
	YaaiR_BRACKET          = 39
	YaaiL_PAREN            = 40
	YaaiR_PAREN            = 41
	YaaiDOT                = 42
	YaaiPLUS               = 43
	YaaiMINUS              = 44
	YaaiSTAR               = 45
	YaaiF_SLASH            = 46
	YaaiCOMMA              = 47
	YaaiNB_WS              = 48
	YaaiLINE_COMMENT       = 49
	YaaiEOS                = 50
)

Yaai tokens.

View Source
const (
	YaaiRULE_file          = 0
	YaaiRULE_packageClause = 1
	YaaiRULE_varDecl       = 2
	YaaiRULE_varAssignment = 3
	YaaiRULE_varInit       = 4
	YaaiRULE_type_         = 5
	YaaiRULE_builtinType   = 6
	YaaiRULE_expression    = 7
	YaaiRULE_eos           = 8
)

Yaai rules.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseYaaiListener

type BaseYaaiListener struct{}

BaseYaaiListener is a complete listener for a parse tree produced by Yaai.

func (*BaseYaaiListener) EnterBuiltinType

func (s *BaseYaaiListener) EnterBuiltinType(ctx *BuiltinTypeContext)

EnterBuiltinType is called when production builtinType is entered.

func (*BaseYaaiListener) EnterEos

func (s *BaseYaaiListener) EnterEos(ctx *EosContext)

EnterEos is called when production eos is entered.

func (*BaseYaaiListener) EnterEveryRule

func (s *BaseYaaiListener) EnterEveryRule(ctx antlr.ParserRuleContext)

EnterEveryRule is called when any rule is entered.

func (*BaseYaaiListener) EnterExpression

func (s *BaseYaaiListener) EnterExpression(ctx *ExpressionContext)

EnterExpression is called when production expression is entered.

func (*BaseYaaiListener) EnterFile

func (s *BaseYaaiListener) EnterFile(ctx *FileContext)

EnterFile is called when production file is entered.

func (*BaseYaaiListener) EnterPackageClause

func (s *BaseYaaiListener) EnterPackageClause(ctx *PackageClauseContext)

EnterPackageClause is called when production packageClause is entered.

func (*BaseYaaiListener) EnterType_

func (s *BaseYaaiListener) EnterType_(ctx *Type_Context)

EnterType_ is called when production type_ is entered.

func (*BaseYaaiListener) EnterVarAssignment

func (s *BaseYaaiListener) EnterVarAssignment(ctx *VarAssignmentContext)

EnterVarAssignment is called when production varAssignment is entered.

func (*BaseYaaiListener) EnterVarDecl

func (s *BaseYaaiListener) EnterVarDecl(ctx *VarDeclContext)

EnterVarDecl is called when production varDecl is entered.

func (*BaseYaaiListener) EnterVarInit

func (s *BaseYaaiListener) EnterVarInit(ctx *VarInitContext)

EnterVarInit is called when production varInit is entered.

func (*BaseYaaiListener) ExitBuiltinType

func (s *BaseYaaiListener) ExitBuiltinType(ctx *BuiltinTypeContext)

ExitBuiltinType is called when production builtinType is exited.

func (*BaseYaaiListener) ExitEos

func (s *BaseYaaiListener) ExitEos(ctx *EosContext)

ExitEos is called when production eos is exited.

func (*BaseYaaiListener) ExitEveryRule

func (s *BaseYaaiListener) ExitEveryRule(ctx antlr.ParserRuleContext)

ExitEveryRule is called when any rule is exited.

func (*BaseYaaiListener) ExitExpression

func (s *BaseYaaiListener) ExitExpression(ctx *ExpressionContext)

ExitExpression is called when production expression is exited.

func (*BaseYaaiListener) ExitFile

func (s *BaseYaaiListener) ExitFile(ctx *FileContext)

ExitFile is called when production file is exited.

func (*BaseYaaiListener) ExitPackageClause

func (s *BaseYaaiListener) ExitPackageClause(ctx *PackageClauseContext)

ExitPackageClause is called when production packageClause is exited.

func (*BaseYaaiListener) ExitType_

func (s *BaseYaaiListener) ExitType_(ctx *Type_Context)

ExitType_ is called when production type_ is exited.

func (*BaseYaaiListener) ExitVarAssignment

func (s *BaseYaaiListener) ExitVarAssignment(ctx *VarAssignmentContext)

ExitVarAssignment is called when production varAssignment is exited.

func (*BaseYaaiListener) ExitVarDecl

func (s *BaseYaaiListener) ExitVarDecl(ctx *VarDeclContext)

ExitVarDecl is called when production varDecl is exited.

func (*BaseYaaiListener) ExitVarInit

func (s *BaseYaaiListener) ExitVarInit(ctx *VarInitContext)

ExitVarInit is called when production varInit is exited.

func (*BaseYaaiListener) VisitErrorNode

func (s *BaseYaaiListener) VisitErrorNode(node antlr.ErrorNode)

VisitErrorNode is called when an error node is visited.

func (*BaseYaaiListener) VisitTerminal

func (s *BaseYaaiListener) VisitTerminal(node antlr.TerminalNode)

VisitTerminal is called when a terminal node is visited.

type BuiltinTypeContext

type BuiltinTypeContext struct {
	*antlr.BaseParserRuleContext
	// contains filtered or unexported fields
}

func NewBuiltinTypeContext

func NewBuiltinTypeContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *BuiltinTypeContext

func NewEmptyBuiltinTypeContext

func NewEmptyBuiltinTypeContext() *BuiltinTypeContext

func (*BuiltinTypeContext) EnterRule

func (s *BuiltinTypeContext) EnterRule(listener antlr.ParseTreeListener)

func (*BuiltinTypeContext) ExitRule

func (s *BuiltinTypeContext) ExitRule(listener antlr.ParseTreeListener)

func (*BuiltinTypeContext) GetParser

func (s *BuiltinTypeContext) GetParser() antlr.Parser

func (*BuiltinTypeContext) GetRuleContext

func (s *BuiltinTypeContext) GetRuleContext() antlr.RuleContext

func (*BuiltinTypeContext) IsBuiltinTypeContext

func (*BuiltinTypeContext) IsBuiltinTypeContext()

func (*BuiltinTypeContext) T_FLOAT32

func (s *BuiltinTypeContext) T_FLOAT32() antlr.TerminalNode

func (*BuiltinTypeContext) T_FLOAT64

func (s *BuiltinTypeContext) T_FLOAT64() antlr.TerminalNode

func (*BuiltinTypeContext) T_INT

func (*BuiltinTypeContext) T_INT32

func (s *BuiltinTypeContext) T_INT32() antlr.TerminalNode

func (*BuiltinTypeContext) T_INT64

func (s *BuiltinTypeContext) T_INT64() antlr.TerminalNode

func (*BuiltinTypeContext) T_STRING

func (s *BuiltinTypeContext) T_STRING() antlr.TerminalNode

func (*BuiltinTypeContext) T_UINT

func (*BuiltinTypeContext) T_UINT32

func (s *BuiltinTypeContext) T_UINT32() antlr.TerminalNode

func (*BuiltinTypeContext) T_UINT64

func (s *BuiltinTypeContext) T_UINT64() antlr.TerminalNode

func (*BuiltinTypeContext) ToStringTree

func (s *BuiltinTypeContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string

type EosContext

type EosContext struct {
	*antlr.BaseParserRuleContext
	// contains filtered or unexported fields
}

func NewEmptyEosContext

func NewEmptyEosContext() *EosContext

func NewEosContext

func NewEosContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *EosContext

func (*EosContext) EOF

func (s *EosContext) EOF() antlr.TerminalNode

func (*EosContext) EOS

func (s *EosContext) EOS() antlr.TerminalNode

func (*EosContext) EnterRule

func (s *EosContext) EnterRule(listener antlr.ParseTreeListener)

func (*EosContext) ExitRule

func (s *EosContext) ExitRule(listener antlr.ParseTreeListener)

func (*EosContext) GetParser

func (s *EosContext) GetParser() antlr.Parser

func (*EosContext) GetRuleContext

func (s *EosContext) GetRuleContext() antlr.RuleContext

func (*EosContext) IsEosContext

func (*EosContext) IsEosContext()

func (*EosContext) ToStringTree

func (s *EosContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string

type ExpressionContext

type ExpressionContext struct {
	*antlr.BaseParserRuleContext
	// contains filtered or unexported fields
}

func NewEmptyExpressionContext

func NewEmptyExpressionContext() *ExpressionContext

func NewExpressionContext

func NewExpressionContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ExpressionContext

func (*ExpressionContext) EnterRule

func (s *ExpressionContext) EnterRule(listener antlr.ParseTreeListener)

func (*ExpressionContext) ExitRule

func (s *ExpressionContext) ExitRule(listener antlr.ParseTreeListener)

func (*ExpressionContext) FLOAT_LITERAL

func (s *ExpressionContext) FLOAT_LITERAL() antlr.TerminalNode

func (*ExpressionContext) GetParser

func (s *ExpressionContext) GetParser() antlr.Parser

func (*ExpressionContext) GetRuleContext

func (s *ExpressionContext) GetRuleContext() antlr.RuleContext

func (*ExpressionContext) IsExpressionContext

func (*ExpressionContext) IsExpressionContext()

func (*ExpressionContext) NUMERIC_LITERAL

func (s *ExpressionContext) NUMERIC_LITERAL() antlr.TerminalNode

func (*ExpressionContext) STRING_LITERAL

func (s *ExpressionContext) STRING_LITERAL() antlr.TerminalNode

func (*ExpressionContext) ToStringTree

func (s *ExpressionContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string

type FileContext

type FileContext struct {
	*antlr.BaseParserRuleContext
	// contains filtered or unexported fields
}

func NewEmptyFileContext

func NewEmptyFileContext() *FileContext

func NewFileContext

func NewFileContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *FileContext

func (*FileContext) EOF

func (s *FileContext) EOF() antlr.TerminalNode

func (*FileContext) EnterRule

func (s *FileContext) EnterRule(listener antlr.ParseTreeListener)

func (*FileContext) ExitRule

func (s *FileContext) ExitRule(listener antlr.ParseTreeListener)

func (*FileContext) GetParser

func (s *FileContext) GetParser() antlr.Parser

func (*FileContext) GetRuleContext

func (s *FileContext) GetRuleContext() antlr.RuleContext

func (*FileContext) IsFileContext

func (*FileContext) IsFileContext()

func (*FileContext) PackageClause

func (s *FileContext) PackageClause() IPackageClauseContext

func (*FileContext) ToStringTree

func (s *FileContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string

type IBuiltinTypeContext

type IBuiltinTypeContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// IsBuiltinTypeContext differentiates from other interfaces.
	IsBuiltinTypeContext()
}

IBuiltinTypeContext is an interface to support dynamic dispatch.

type IEosContext

type IEosContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// IsEosContext differentiates from other interfaces.
	IsEosContext()
}

IEosContext is an interface to support dynamic dispatch.

type IExpressionContext

type IExpressionContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// IsExpressionContext differentiates from other interfaces.
	IsExpressionContext()
}

IExpressionContext is an interface to support dynamic dispatch.

type IFileContext

type IFileContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// IsFileContext differentiates from other interfaces.
	IsFileContext()
}

IFileContext is an interface to support dynamic dispatch.

type IPackageClauseContext

type IPackageClauseContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// GetPackageName returns the packageName token.
	GetPackageName() antlr.Token

	// SetPackageName sets the packageName token.
	SetPackageName(antlr.Token)

	// IsPackageClauseContext differentiates from other interfaces.
	IsPackageClauseContext()
}

IPackageClauseContext is an interface to support dynamic dispatch.

type IType_Context

type IType_Context interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// IsType_Context differentiates from other interfaces.
	IsType_Context()
}

IType_Context is an interface to support dynamic dispatch.

type IVarAssignmentContext

type IVarAssignmentContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// IsVarAssignmentContext differentiates from other interfaces.
	IsVarAssignmentContext()
}

IVarAssignmentContext is an interface to support dynamic dispatch.

type IVarDeclContext

type IVarDeclContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// IsVarDeclContext differentiates from other interfaces.
	IsVarDeclContext()
}

IVarDeclContext is an interface to support dynamic dispatch.

type IVarInitContext

type IVarInitContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// IsVarInitContext differentiates from other interfaces.
	IsVarInitContext()
}

IVarInitContext is an interface to support dynamic dispatch.

type PackageClauseContext

type PackageClauseContext struct {
	*antlr.BaseParserRuleContext
	// contains filtered or unexported fields
}

func NewEmptyPackageClauseContext

func NewEmptyPackageClauseContext() *PackageClauseContext

func NewPackageClauseContext

func NewPackageClauseContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *PackageClauseContext

func (*PackageClauseContext) EnterRule

func (s *PackageClauseContext) EnterRule(listener antlr.ParseTreeListener)

func (*PackageClauseContext) Eos

func (*PackageClauseContext) ExitRule

func (s *PackageClauseContext) ExitRule(listener antlr.ParseTreeListener)

func (*PackageClauseContext) GetPackageName

func (s *PackageClauseContext) GetPackageName() antlr.Token

func (*PackageClauseContext) GetParser

func (s *PackageClauseContext) GetParser() antlr.Parser

func (*PackageClauseContext) GetRuleContext

func (s *PackageClauseContext) GetRuleContext() antlr.RuleContext

func (*PackageClauseContext) IDENTIFIER

func (s *PackageClauseContext) IDENTIFIER() antlr.TerminalNode

func (*PackageClauseContext) IsPackageClauseContext

func (*PackageClauseContext) IsPackageClauseContext()

func (*PackageClauseContext) PACKAGE

func (*PackageClauseContext) SetPackageName

func (s *PackageClauseContext) SetPackageName(v antlr.Token)

func (*PackageClauseContext) ToStringTree

func (s *PackageClauseContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string

type Type_Context

type Type_Context struct {
	*antlr.BaseParserRuleContext
	// contains filtered or unexported fields
}

func NewEmptyType_Context

func NewEmptyType_Context() *Type_Context

func NewType_Context

func NewType_Context(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Type_Context

func (*Type_Context) BuiltinType

func (s *Type_Context) BuiltinType() IBuiltinTypeContext

func (*Type_Context) EnterRule

func (s *Type_Context) EnterRule(listener antlr.ParseTreeListener)

func (*Type_Context) ExitRule

func (s *Type_Context) ExitRule(listener antlr.ParseTreeListener)

func (*Type_Context) GetParser

func (s *Type_Context) GetParser() antlr.Parser

func (*Type_Context) GetRuleContext

func (s *Type_Context) GetRuleContext() antlr.RuleContext

func (*Type_Context) IsType_Context

func (*Type_Context) IsType_Context()

func (*Type_Context) ToStringTree

func (s *Type_Context) ToStringTree(ruleNames []string, recog antlr.Recognizer) string

type VarAssignmentContext

type VarAssignmentContext struct {
	*antlr.BaseParserRuleContext
	// contains filtered or unexported fields
}

func NewEmptyVarAssignmentContext

func NewEmptyVarAssignmentContext() *VarAssignmentContext

func NewVarAssignmentContext

func NewVarAssignmentContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *VarAssignmentContext

func (*VarAssignmentContext) ASSIGNMENT

func (s *VarAssignmentContext) ASSIGNMENT() antlr.TerminalNode

func (*VarAssignmentContext) EnterRule

func (s *VarAssignmentContext) EnterRule(listener antlr.ParseTreeListener)

func (*VarAssignmentContext) Eos

func (*VarAssignmentContext) ExitRule

func (s *VarAssignmentContext) ExitRule(listener antlr.ParseTreeListener)

func (*VarAssignmentContext) Expression

func (s *VarAssignmentContext) Expression() IExpressionContext

func (*VarAssignmentContext) GetParser

func (s *VarAssignmentContext) GetParser() antlr.Parser

func (*VarAssignmentContext) GetRuleContext

func (s *VarAssignmentContext) GetRuleContext() antlr.RuleContext

func (*VarAssignmentContext) IsVarAssignmentContext

func (*VarAssignmentContext) IsVarAssignmentContext()

func (*VarAssignmentContext) ToStringTree

func (s *VarAssignmentContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string

type VarDeclContext

type VarDeclContext struct {
	*antlr.BaseParserRuleContext
	// contains filtered or unexported fields
}

func NewEmptyVarDeclContext

func NewEmptyVarDeclContext() *VarDeclContext

func NewVarDeclContext

func NewVarDeclContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *VarDeclContext

func (*VarDeclContext) EnterRule

func (s *VarDeclContext) EnterRule(listener antlr.ParseTreeListener)

func (*VarDeclContext) Eos

func (s *VarDeclContext) Eos() IEosContext

func (*VarDeclContext) ExitRule

func (s *VarDeclContext) ExitRule(listener antlr.ParseTreeListener)

func (*VarDeclContext) GetParser

func (s *VarDeclContext) GetParser() antlr.Parser

func (*VarDeclContext) GetRuleContext

func (s *VarDeclContext) GetRuleContext() antlr.RuleContext

func (*VarDeclContext) IDENTIFIER

func (s *VarDeclContext) IDENTIFIER() antlr.TerminalNode

func (*VarDeclContext) IsVarDeclContext

func (*VarDeclContext) IsVarDeclContext()

func (*VarDeclContext) ToStringTree

func (s *VarDeclContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string

func (*VarDeclContext) Type_

func (s *VarDeclContext) Type_() IType_Context

func (*VarDeclContext) VAR

func (*VarDeclContext) VarAssignment

func (s *VarDeclContext) VarAssignment() IVarAssignmentContext

type VarInitContext

type VarInitContext struct {
	*antlr.BaseParserRuleContext
	// contains filtered or unexported fields
}

func NewEmptyVarInitContext

func NewEmptyVarInitContext() *VarInitContext

func NewVarInitContext

func NewVarInitContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *VarInitContext

func (*VarInitContext) EnterRule

func (s *VarInitContext) EnterRule(listener antlr.ParseTreeListener)

func (*VarInitContext) Eos

func (s *VarInitContext) Eos() IEosContext

func (*VarInitContext) ExitRule

func (s *VarInitContext) ExitRule(listener antlr.ParseTreeListener)

func (*VarInitContext) Expression

func (s *VarInitContext) Expression() IExpressionContext

func (*VarInitContext) GetParser

func (s *VarInitContext) GetParser() antlr.Parser

func (*VarInitContext) GetRuleContext

func (s *VarInitContext) GetRuleContext() antlr.RuleContext

func (*VarInitContext) IDENTIFIER

func (s *VarInitContext) IDENTIFIER() antlr.TerminalNode

func (*VarInitContext) IsVarInitContext

func (*VarInitContext) IsVarInitContext()

func (*VarInitContext) ToStringTree

func (s *VarInitContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string

func (*VarInitContext) VAR_INITIALIZER

func (s *VarInitContext) VAR_INITIALIZER() antlr.TerminalNode

type Yaai

type Yaai struct {
	*antlr.BaseParser
}

func NewYaai

func NewYaai(input antlr.TokenStream) *Yaai

NewYaai produces a new parser instance for the optional input antlr.TokenStream.

The *Yaai instance produced may be reused by calling the SetInputStream method. The initial parser configuration is expensive to construct, and the object is not thread-safe; however, if used within a Golang sync.Pool, the construction cost amortizes well and the objects can be used in a thread-safe manner.

func (*Yaai) BuiltinType

func (p *Yaai) BuiltinType() (localctx IBuiltinTypeContext)

func (*Yaai) Eos

func (p *Yaai) Eos() (localctx IEosContext)

func (*Yaai) Expression

func (p *Yaai) Expression() (localctx IExpressionContext)

func (*Yaai) File

func (p *Yaai) File() (localctx IFileContext)

func (*Yaai) PackageClause

func (p *Yaai) PackageClause() (localctx IPackageClauseContext)

func (*Yaai) Type_

func (p *Yaai) Type_() (localctx IType_Context)

func (*Yaai) VarAssignment

func (p *Yaai) VarAssignment() (localctx IVarAssignmentContext)

func (*Yaai) VarDecl

func (p *Yaai) VarDecl() (localctx IVarDeclContext)

func (*Yaai) VarInit

func (p *Yaai) VarInit() (localctx IVarInitContext)

type YaaiLexer

type YaaiLexer struct {
	*antlr.BaseLexer
	// contains filtered or unexported fields
}

func NewYaaiLexer

func NewYaaiLexer(input antlr.CharStream) *YaaiLexer

NewYaaiLexer produces a new lexer instance for the optional input antlr.CharStream.

The *YaaiLexer instance produced may be reused by calling the SetInputStream method. The initial lexer configuration is expensive to construct, and the object is not thread-safe; however, if used within a Golang sync.Pool, the construction cost amortizes well and the objects can be used in a thread-safe manner.

type YaaiListener

type YaaiListener interface {
	antlr.ParseTreeListener

	// EnterFile is called when entering the file production.
	EnterFile(c *FileContext)

	// EnterPackageClause is called when entering the packageClause production.
	EnterPackageClause(c *PackageClauseContext)

	// EnterVarDecl is called when entering the varDecl production.
	EnterVarDecl(c *VarDeclContext)

	// EnterVarAssignment is called when entering the varAssignment production.
	EnterVarAssignment(c *VarAssignmentContext)

	// EnterVarInit is called when entering the varInit production.
	EnterVarInit(c *VarInitContext)

	// EnterType_ is called when entering the type_ production.
	EnterType_(c *Type_Context)

	// EnterBuiltinType is called when entering the builtinType production.
	EnterBuiltinType(c *BuiltinTypeContext)

	// EnterExpression is called when entering the expression production.
	EnterExpression(c *ExpressionContext)

	// EnterEos is called when entering the eos production.
	EnterEos(c *EosContext)

	// ExitFile is called when exiting the file production.
	ExitFile(c *FileContext)

	// ExitPackageClause is called when exiting the packageClause production.
	ExitPackageClause(c *PackageClauseContext)

	// ExitVarDecl is called when exiting the varDecl production.
	ExitVarDecl(c *VarDeclContext)

	// ExitVarAssignment is called when exiting the varAssignment production.
	ExitVarAssignment(c *VarAssignmentContext)

	// ExitVarInit is called when exiting the varInit production.
	ExitVarInit(c *VarInitContext)

	// ExitType_ is called when exiting the type_ production.
	ExitType_(c *Type_Context)

	// ExitBuiltinType is called when exiting the builtinType production.
	ExitBuiltinType(c *BuiltinTypeContext)

	// ExitExpression is called when exiting the expression production.
	ExitExpression(c *ExpressionContext)

	// ExitEos is called when exiting the eos production.
	ExitEos(c *EosContext)
}

YaaiListener is a complete listener for a parse tree produced by Yaai.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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