parser

package
v0.2.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	NamedLexerSPACES        = 1
	NamedLexerBLOCK_COMMENT = 2
	NamedLexerLINE_COMMENT  = 3
	NamedLexerIN            = 4
	NamedLexerSTRING        = 5
	NamedLexerNUMBER        = 6
	NamedLexerIDENTIFIER    = 7
	NamedLexerDECPARAM      = 8
	NamedLexerOPEN_PAREN    = 9
	NamedLexerCLOSE_PAREN   = 10
	NamedLexerQMARK         = 11
	NamedLexerCOMMA         = 12
	NamedLexerAT            = 13
	NamedLexerCOLON         = 14
	NamedLexerSEMI          = 15
	NamedLexerDOT           = 16
	NamedLexerSTAR          = 17
	NamedLexerANY_SYMBOL    = 18
)

NamedLexer tokens.

View Source
const (
	NamedParserEOF           = antlr.TokenEOF
	NamedParserSPACES        = 1
	NamedParserBLOCK_COMMENT = 2
	NamedParserLINE_COMMENT  = 3
	NamedParserIN            = 4
	NamedParserSTRING        = 5
	NamedParserNUMBER        = 6
	NamedParserIDENTIFIER    = 7
	NamedParserDECPARAM      = 8
	NamedParserOPEN_PAREN    = 9
	NamedParserCLOSE_PAREN   = 10
	NamedParserQMARK         = 11
	NamedParserCOMMA         = 12
	NamedParserAT            = 13
	NamedParserCOLON         = 14
	NamedParserSEMI          = 15
	NamedParserDOT           = 16
	NamedParserSTAR          = 17
	NamedParserANY_SYMBOL    = 18
)

NamedParser tokens.

View Source
const (
	NamedParserRULE_parse           = 0
	NamedParserRULE_stmt            = 1
	NamedParserRULE_inExpr          = 2
	NamedParserRULE_parameter       = 3
	NamedParserRULE_namedParamter   = 4
	NamedParserRULE_qmarkParameter  = 5
	NamedParserRULE_decParameter    = 6
	NamedParserRULE_staticParameter = 7
	NamedParserRULE_anyStmtParts    = 8
)

NamedParser rules.

Variables

This section is empty.

Functions

func NamedLexerInit added in v0.1.6

func NamedLexerInit()

NamedLexerInit initializes any static state used to implement NamedLexer. By default the static state used to implement the lexer is lazily initialized during the first call to NewNamedLexer(). You can call this function if you wish to initialize the static state ahead of time.

func NamedParserInit added in v0.1.6

func NamedParserInit()

NamedParserInit initializes any static state used to implement NamedParser. By default the static state used to implement the parser is lazily initialized during the first call to NewNamedParser(). You can call this function if you wish to initialize the static state ahead of time.

Types

type AnyStmtPartsContext

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

func NewAnyStmtPartsContext

func NewAnyStmtPartsContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *AnyStmtPartsContext

func NewEmptyAnyStmtPartsContext

func NewEmptyAnyStmtPartsContext() *AnyStmtPartsContext

func (*AnyStmtPartsContext) ANY_SYMBOL

func (s *AnyStmtPartsContext) ANY_SYMBOL() antlr.TerminalNode

func (*AnyStmtPartsContext) Accept

func (s *AnyStmtPartsContext) Accept(visitor antlr.ParseTreeVisitor) interface{}

func (*AnyStmtPartsContext) AllIDENTIFIER

func (s *AnyStmtPartsContext) AllIDENTIFIER() []antlr.TerminalNode

func (*AnyStmtPartsContext) CLOSE_PAREN

func (s *AnyStmtPartsContext) CLOSE_PAREN() antlr.TerminalNode

func (*AnyStmtPartsContext) COMMA

func (*AnyStmtPartsContext) DOT

func (*AnyStmtPartsContext) GetParser

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

func (*AnyStmtPartsContext) GetRuleContext

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

func (*AnyStmtPartsContext) IDENTIFIER

func (s *AnyStmtPartsContext) IDENTIFIER(i int) antlr.TerminalNode

func (*AnyStmtPartsContext) IsAnyStmtPartsContext

func (*AnyStmtPartsContext) IsAnyStmtPartsContext()

func (*AnyStmtPartsContext) NUMBER

func (*AnyStmtPartsContext) OPEN_PAREN

func (s *AnyStmtPartsContext) OPEN_PAREN() antlr.TerminalNode

func (*AnyStmtPartsContext) STAR

func (*AnyStmtPartsContext) ToStringTree

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

type BaseNamedVisitor

type BaseNamedVisitor struct {
	*antlr.BaseParseTreeVisitor
}

func (*BaseNamedVisitor) VisitAnyStmtParts

func (v *BaseNamedVisitor) VisitAnyStmtParts(ctx *AnyStmtPartsContext) interface{}

func (*BaseNamedVisitor) VisitDecParameter

func (v *BaseNamedVisitor) VisitDecParameter(ctx *DecParameterContext) interface{}

func (*BaseNamedVisitor) VisitInExpr

func (v *BaseNamedVisitor) VisitInExpr(ctx *InExprContext) interface{}

func (*BaseNamedVisitor) VisitNamedParamter

func (v *BaseNamedVisitor) VisitNamedParamter(ctx *NamedParamterContext) interface{}

func (*BaseNamedVisitor) VisitParameter

func (v *BaseNamedVisitor) VisitParameter(ctx *ParameterContext) interface{}

func (*BaseNamedVisitor) VisitParse

func (v *BaseNamedVisitor) VisitParse(ctx *ParseContext) interface{}

func (*BaseNamedVisitor) VisitQmarkParameter

func (v *BaseNamedVisitor) VisitQmarkParameter(ctx *QmarkParameterContext) interface{}

func (*BaseNamedVisitor) VisitStaticParameter

func (v *BaseNamedVisitor) VisitStaticParameter(ctx *StaticParameterContext) interface{}

func (*BaseNamedVisitor) VisitStmt

func (v *BaseNamedVisitor) VisitStmt(ctx *StmtContext) interface{}

type DecParameterContext

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

func NewDecParameterContext

func NewDecParameterContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *DecParameterContext

func NewEmptyDecParameterContext

func NewEmptyDecParameterContext() *DecParameterContext

func (*DecParameterContext) Accept

func (s *DecParameterContext) Accept(visitor antlr.ParseTreeVisitor) interface{}

func (*DecParameterContext) DECPARAM added in v0.1.3

func (s *DecParameterContext) DECPARAM() antlr.TerminalNode

func (*DecParameterContext) GetParser

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

func (*DecParameterContext) GetRuleContext

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

func (*DecParameterContext) IsDecParameterContext

func (*DecParameterContext) IsDecParameterContext()

func (*DecParameterContext) ToStringTree

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

type IAnyStmtPartsContext

type IAnyStmtPartsContext interface {
	antlr.ParserRuleContext

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

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

IAnyStmtPartsContext is an interface to support dynamic dispatch.

type IDecParameterContext

type IDecParameterContext interface {
	antlr.ParserRuleContext

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

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

IDecParameterContext is an interface to support dynamic dispatch.

type IInExprContext

type IInExprContext interface {
	antlr.ParserRuleContext

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

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

IInExprContext is an interface to support dynamic dispatch.

type INamedParamterContext

type INamedParamterContext interface {
	antlr.ParserRuleContext

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

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

INamedParamterContext is an interface to support dynamic dispatch.

type IParameterContext

type IParameterContext interface {
	antlr.ParserRuleContext

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

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

IParameterContext is an interface to support dynamic dispatch.

type IParseContext

type IParseContext interface {
	antlr.ParserRuleContext

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

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

IParseContext is an interface to support dynamic dispatch.

func Parse

func Parse(src string) IParseContext

type IQmarkParameterContext

type IQmarkParameterContext interface {
	antlr.ParserRuleContext

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

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

IQmarkParameterContext is an interface to support dynamic dispatch.

type IStaticParameterContext

type IStaticParameterContext interface {
	antlr.ParserRuleContext

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

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

IStaticParameterContext is an interface to support dynamic dispatch.

type IStmtContext

type IStmtContext interface {
	antlr.ParserRuleContext

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

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

IStmtContext is an interface to support dynamic dispatch.

type InExprContext

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

func NewEmptyInExprContext

func NewEmptyInExprContext() *InExprContext

func NewInExprContext

func NewInExprContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *InExprContext

func (*InExprContext) Accept

func (s *InExprContext) Accept(visitor antlr.ParseTreeVisitor) interface{}

func (*InExprContext) AllCOMMA

func (s *InExprContext) AllCOMMA() []antlr.TerminalNode

func (*InExprContext) AllParameter

func (s *InExprContext) AllParameter() []IParameterContext

func (*InExprContext) CLOSE_PAREN

func (s *InExprContext) CLOSE_PAREN() antlr.TerminalNode

func (*InExprContext) COMMA

func (s *InExprContext) COMMA(i int) antlr.TerminalNode

func (*InExprContext) GetParser

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

func (*InExprContext) GetRuleContext

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

func (*InExprContext) IN

func (*InExprContext) IsInExprContext

func (*InExprContext) IsInExprContext()

func (*InExprContext) OPEN_PAREN

func (s *InExprContext) OPEN_PAREN() antlr.TerminalNode

func (*InExprContext) Parameter

func (s *InExprContext) Parameter(i int) IParameterContext

func (*InExprContext) ToStringTree

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

type NamedLexer

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

func NewNamedLexer

func NewNamedLexer(input antlr.CharStream) *NamedLexer

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

type NamedParamterContext

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

func NewEmptyNamedParamterContext

func NewEmptyNamedParamterContext() *NamedParamterContext

func NewNamedParamterContext

func NewNamedParamterContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *NamedParamterContext

func (*NamedParamterContext) AT

func (*NamedParamterContext) Accept

func (s *NamedParamterContext) Accept(visitor antlr.ParseTreeVisitor) interface{}

func (*NamedParamterContext) AllDOT

func (s *NamedParamterContext) AllDOT() []antlr.TerminalNode

func (*NamedParamterContext) AllIDENTIFIER

func (s *NamedParamterContext) AllIDENTIFIER() []antlr.TerminalNode

func (*NamedParamterContext) COLON

func (*NamedParamterContext) DOT

func (*NamedParamterContext) GetParser

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

func (*NamedParamterContext) GetRuleContext

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

func (*NamedParamterContext) IDENTIFIER

func (s *NamedParamterContext) IDENTIFIER(i int) antlr.TerminalNode

func (*NamedParamterContext) IsNamedParamterContext

func (*NamedParamterContext) IsNamedParamterContext()

func (*NamedParamterContext) ToStringTree

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

type NamedParser

type NamedParser struct {
	*antlr.BaseParser
}

func NewNamedParser

func NewNamedParser(input antlr.TokenStream) *NamedParser

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

func (*NamedParser) AnyStmtParts

func (p *NamedParser) AnyStmtParts() (localctx IAnyStmtPartsContext)

func (*NamedParser) DecParameter

func (p *NamedParser) DecParameter() (localctx IDecParameterContext)

func (*NamedParser) InExpr

func (p *NamedParser) InExpr() (localctx IInExprContext)

func (*NamedParser) NamedParamter

func (p *NamedParser) NamedParamter() (localctx INamedParamterContext)

func (*NamedParser) Parameter

func (p *NamedParser) Parameter() (localctx IParameterContext)

func (*NamedParser) Parse

func (p *NamedParser) Parse() (localctx IParseContext)

func (*NamedParser) QmarkParameter

func (p *NamedParser) QmarkParameter() (localctx IQmarkParameterContext)

func (*NamedParser) StaticParameter

func (p *NamedParser) StaticParameter() (localctx IStaticParameterContext)

func (*NamedParser) Stmt

func (p *NamedParser) Stmt() (localctx IStmtContext)

type NamedVisitor

type NamedVisitor interface {
	antlr.ParseTreeVisitor

	// Visit a parse tree produced by NamedParser#parse.
	VisitParse(ctx *ParseContext) interface{}

	// Visit a parse tree produced by NamedParser#stmt.
	VisitStmt(ctx *StmtContext) interface{}

	// Visit a parse tree produced by NamedParser#inExpr.
	VisitInExpr(ctx *InExprContext) interface{}

	// Visit a parse tree produced by NamedParser#parameter.
	VisitParameter(ctx *ParameterContext) interface{}

	// Visit a parse tree produced by NamedParser#namedParamter.
	VisitNamedParamter(ctx *NamedParamterContext) interface{}

	// Visit a parse tree produced by NamedParser#qmarkParameter.
	VisitQmarkParameter(ctx *QmarkParameterContext) interface{}

	// Visit a parse tree produced by NamedParser#decParameter.
	VisitDecParameter(ctx *DecParameterContext) interface{}

	// Visit a parse tree produced by NamedParser#staticParameter.
	VisitStaticParameter(ctx *StaticParameterContext) interface{}

	// Visit a parse tree produced by NamedParser#anyStmtParts.
	VisitAnyStmtParts(ctx *AnyStmtPartsContext) interface{}
}

A complete Visitor for a parse tree produced by NamedParser.

type ParameterContext

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

func NewEmptyParameterContext

func NewEmptyParameterContext() *ParameterContext

func NewParameterContext

func NewParameterContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ParameterContext

func (*ParameterContext) Accept

func (s *ParameterContext) Accept(visitor antlr.ParseTreeVisitor) interface{}

func (*ParameterContext) DecParameter

func (s *ParameterContext) DecParameter() IDecParameterContext

func (*ParameterContext) GetParser

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

func (*ParameterContext) GetRuleContext

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

func (*ParameterContext) IsParameterContext

func (*ParameterContext) IsParameterContext()

func (*ParameterContext) NamedParamter

func (s *ParameterContext) NamedParamter() INamedParamterContext

func (*ParameterContext) QmarkParameter

func (s *ParameterContext) QmarkParameter() IQmarkParameterContext

func (*ParameterContext) StaticParameter

func (s *ParameterContext) StaticParameter() IStaticParameterContext

func (*ParameterContext) ToStringTree

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

type ParseContext

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

func NewEmptyParseContext

func NewEmptyParseContext() *ParseContext

func NewParseContext

func NewParseContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ParseContext

func (*ParseContext) Accept

func (s *ParseContext) Accept(visitor antlr.ParseTreeVisitor) interface{}

func (*ParseContext) AllSEMI

func (s *ParseContext) AllSEMI() []antlr.TerminalNode

func (*ParseContext) AllStmt

func (s *ParseContext) AllStmt() []IStmtContext

func (*ParseContext) GetParser

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

func (*ParseContext) GetRuleContext

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

func (*ParseContext) IsParseContext

func (*ParseContext) IsParseContext()

func (*ParseContext) SEMI

func (s *ParseContext) SEMI(i int) antlr.TerminalNode

func (*ParseContext) Stmt

func (s *ParseContext) Stmt(i int) IStmtContext

func (*ParseContext) ToStringTree

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

type QmarkParameterContext

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

func NewEmptyQmarkParameterContext

func NewEmptyQmarkParameterContext() *QmarkParameterContext

func NewQmarkParameterContext

func NewQmarkParameterContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *QmarkParameterContext

func (*QmarkParameterContext) Accept

func (s *QmarkParameterContext) Accept(visitor antlr.ParseTreeVisitor) interface{}

func (*QmarkParameterContext) GetParser

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

func (*QmarkParameterContext) GetRuleContext

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

func (*QmarkParameterContext) IsQmarkParameterContext

func (*QmarkParameterContext) IsQmarkParameterContext()

func (*QmarkParameterContext) QMARK

func (*QmarkParameterContext) ToStringTree

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

type StaticParameterContext

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

func NewEmptyStaticParameterContext

func NewEmptyStaticParameterContext() *StaticParameterContext

func NewStaticParameterContext

func NewStaticParameterContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *StaticParameterContext

func (*StaticParameterContext) Accept

func (s *StaticParameterContext) Accept(visitor antlr.ParseTreeVisitor) interface{}

func (*StaticParameterContext) GetParser

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

func (*StaticParameterContext) GetRuleContext

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

func (*StaticParameterContext) IsStaticParameterContext

func (*StaticParameterContext) IsStaticParameterContext()

func (*StaticParameterContext) STRING

func (*StaticParameterContext) ToStringTree

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

type StmtContext

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

func NewEmptyStmtContext

func NewEmptyStmtContext() *StmtContext

func NewStmtContext

func NewStmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *StmtContext

func (*StmtContext) Accept

func (s *StmtContext) Accept(visitor antlr.ParseTreeVisitor) interface{}

func (*StmtContext) AllAnyStmtParts

func (s *StmtContext) AllAnyStmtParts() []IAnyStmtPartsContext

func (*StmtContext) AllInExpr

func (s *StmtContext) AllInExpr() []IInExprContext

func (*StmtContext) AllParameter

func (s *StmtContext) AllParameter() []IParameterContext

func (*StmtContext) AnyStmtParts

func (s *StmtContext) AnyStmtParts(i int) IAnyStmtPartsContext

func (*StmtContext) GetParser

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

func (*StmtContext) GetRuleContext

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

func (*StmtContext) InExpr

func (s *StmtContext) InExpr(i int) IInExprContext

func (*StmtContext) IsStmtContext

func (*StmtContext) IsStmtContext()

func (*StmtContext) Parameter

func (s *StmtContext) Parameter(i int) IParameterContext

func (*StmtContext) ToStringTree

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

Jump to

Keyboard shortcuts

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