grammar

package
v0.0.0-...-85cb23b Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	YqlLexerT__0      = 1
	YqlLexerT__1      = 2
	YqlLexerT__2      = 3
	YqlLexerT__3      = 4
	YqlLexerT__4      = 5
	YqlLexerT__5      = 6
	YqlLexerT__6      = 7
	YqlLexerT__7      = 8
	YqlLexerT__8      = 9
	YqlLexerT__9      = 10
	YqlLexerT__10     = 11
	YqlLexerT__11     = 12
	YqlLexerT__12     = 13
	YqlLexerT__13     = 14
	YqlLexerT__14     = 15
	YqlLexerT__15     = 16
	YqlLexerT__16     = 17
	YqlLexerTRUE      = 18
	YqlLexerFALSE     = 19
	YqlLexerFUNC      = 20
	YqlLexerFIELDNAME = 21
	YqlLexerSTRING    = 22
	YqlLexerINT       = 23
	YqlLexerFLOAT     = 24
	YqlLexerWS        = 25
)

YqlLexer tokens.

View Source
const (
	YqlParserEOF       = antlr.TokenEOF
	YqlParserT__0      = 1
	YqlParserT__1      = 2
	YqlParserT__2      = 3
	YqlParserT__3      = 4
	YqlParserT__4      = 5
	YqlParserT__5      = 6
	YqlParserT__6      = 7
	YqlParserT__7      = 8
	YqlParserT__8      = 9
	YqlParserT__9      = 10
	YqlParserT__10     = 11
	YqlParserT__11     = 12
	YqlParserT__12     = 13
	YqlParserT__13     = 14
	YqlParserT__14     = 15
	YqlParserT__15     = 16
	YqlParserT__16     = 17
	YqlParserTRUE      = 18
	YqlParserFALSE     = 19
	YqlParserFUNC      = 20
	YqlParserFIELDNAME = 21
	YqlParserSTRING    = 22
	YqlParserINT       = 23
	YqlParserFLOAT     = 24
	YqlParserWS        = 25
)

YqlParser tokens.

View Source
const (
	YqlParserRULE_query       = 0
	YqlParserRULE_expr        = 1
	YqlParserRULE_booleanExpr = 2
	YqlParserRULE_leftexpr    = 3
	YqlParserRULE_value       = 4
)

YqlParser rules.

Variables

This section is empty.

Functions

This section is empty.

Types

type AndExprContext

type AndExprContext struct {
	*ExprContext
}

func NewAndExprContext

func NewAndExprContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *AndExprContext

func (*AndExprContext) AllExpr

func (s *AndExprContext) AllExpr() []IExprContext

func (*AndExprContext) EnterRule

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

func (*AndExprContext) ExitRule

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

func (*AndExprContext) Expr

func (s *AndExprContext) Expr(i int) IExprContext

func (*AndExprContext) GetRuleContext

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

type BaseYqlListener

type BaseYqlListener struct{}

BaseYqlListener is a complete listener for a parse tree produced by YqlParser.

func (*BaseYqlListener) EnterAndExpr

func (s *BaseYqlListener) EnterAndExpr(ctx *AndExprContext)

EnterAndExpr is called when production andExpr is entered.

func (*BaseYqlListener) EnterBoolExpr

func (s *BaseYqlListener) EnterBoolExpr(ctx *BoolExprContext)

EnterBoolExpr is called when production boolExpr is entered.

func (*BaseYqlListener) EnterBooleanExpr

func (s *BaseYqlListener) EnterBooleanExpr(ctx *BooleanExprContext)

EnterBooleanExpr is called when production booleanExpr is entered.

func (*BaseYqlListener) EnterEmbbedExpr

func (s *BaseYqlListener) EnterEmbbedExpr(ctx *EmbbedExprContext)

EnterEmbbedExpr is called when production embbedExpr is entered.

func (*BaseYqlListener) EnterEveryRule

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

EnterEveryRule is called when any rule is entered.

func (*BaseYqlListener) EnterLeftexpr

func (s *BaseYqlListener) EnterLeftexpr(ctx *LeftexprContext)

EnterLeftexpr is called when production leftexpr is entered.

func (*BaseYqlListener) EnterOrExpr

func (s *BaseYqlListener) EnterOrExpr(ctx *OrExprContext)

EnterOrExpr is called when production orExpr is entered.

func (*BaseYqlListener) EnterQuery

func (s *BaseYqlListener) EnterQuery(ctx *QueryContext)

EnterQuery is called when production query is entered.

func (*BaseYqlListener) EnterValue

func (s *BaseYqlListener) EnterValue(ctx *ValueContext)

EnterValue is called when production value is entered.

func (*BaseYqlListener) ExitAndExpr

func (s *BaseYqlListener) ExitAndExpr(ctx *AndExprContext)

ExitAndExpr is called when production andExpr is exited.

func (*BaseYqlListener) ExitBoolExpr

func (s *BaseYqlListener) ExitBoolExpr(ctx *BoolExprContext)

ExitBoolExpr is called when production boolExpr is exited.

func (*BaseYqlListener) ExitBooleanExpr

func (s *BaseYqlListener) ExitBooleanExpr(ctx *BooleanExprContext)

ExitBooleanExpr is called when production booleanExpr is exited.

func (*BaseYqlListener) ExitEmbbedExpr

func (s *BaseYqlListener) ExitEmbbedExpr(ctx *EmbbedExprContext)

ExitEmbbedExpr is called when production embbedExpr is exited.

func (*BaseYqlListener) ExitEveryRule

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

ExitEveryRule is called when any rule is exited.

func (*BaseYqlListener) ExitLeftexpr

func (s *BaseYqlListener) ExitLeftexpr(ctx *LeftexprContext)

ExitLeftexpr is called when production leftexpr is exited.

func (*BaseYqlListener) ExitOrExpr

func (s *BaseYqlListener) ExitOrExpr(ctx *OrExprContext)

ExitOrExpr is called when production orExpr is exited.

func (*BaseYqlListener) ExitQuery

func (s *BaseYqlListener) ExitQuery(ctx *QueryContext)

ExitQuery is called when production query is exited.

func (*BaseYqlListener) ExitValue

func (s *BaseYqlListener) ExitValue(ctx *ValueContext)

ExitValue is called when production value is exited.

func (*BaseYqlListener) VisitErrorNode

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

VisitErrorNode is called when an error node is visited.

func (*BaseYqlListener) VisitTerminal

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

VisitTerminal is called when a terminal node is visited.

type BoolExprContext

type BoolExprContext struct {
	*ExprContext
}

func NewBoolExprContext

func NewBoolExprContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *BoolExprContext

func (*BoolExprContext) BooleanExpr

func (s *BoolExprContext) BooleanExpr() IBooleanExprContext

func (*BoolExprContext) EnterRule

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

func (*BoolExprContext) ExitRule

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

func (*BoolExprContext) GetRuleContext

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

type BooleanExprContext

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

func NewBooleanExprContext

func NewBooleanExprContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *BooleanExprContext

func NewEmptyBooleanExprContext

func NewEmptyBooleanExprContext() *BooleanExprContext

func (*BooleanExprContext) AllValue

func (s *BooleanExprContext) AllValue() []IValueContext

func (*BooleanExprContext) EnterRule

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

func (*BooleanExprContext) ExitRule

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

func (*BooleanExprContext) GetOp

func (s *BooleanExprContext) GetOp() antlr.Token

func (*BooleanExprContext) GetParser

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

func (*BooleanExprContext) GetRuleContext

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

func (*BooleanExprContext) IsBooleanExprContext

func (*BooleanExprContext) IsBooleanExprContext()

func (*BooleanExprContext) Leftexpr

func (s *BooleanExprContext) Leftexpr() ILeftexprContext

func (*BooleanExprContext) SetOp

func (s *BooleanExprContext) SetOp(v antlr.Token)

func (*BooleanExprContext) ToStringTree

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

func (*BooleanExprContext) Value

func (s *BooleanExprContext) Value(i int) IValueContext

type EmbbedExprContext

type EmbbedExprContext struct {
	*ExprContext
}

func NewEmbbedExprContext

func NewEmbbedExprContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *EmbbedExprContext

func (*EmbbedExprContext) EnterRule

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

func (*EmbbedExprContext) ExitRule

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

func (*EmbbedExprContext) Expr

func (s *EmbbedExprContext) Expr() IExprContext

func (*EmbbedExprContext) GetRuleContext

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

type ExprContext

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

func NewEmptyExprContext

func NewEmptyExprContext() *ExprContext

func NewExprContext

func NewExprContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ExprContext

func (*ExprContext) CopyFrom

func (s *ExprContext) CopyFrom(ctx *ExprContext)

func (*ExprContext) GetParser

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

func (*ExprContext) GetRuleContext

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

func (*ExprContext) IsExprContext

func (*ExprContext) IsExprContext()

func (*ExprContext) ToStringTree

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

type IBooleanExprContext

type IBooleanExprContext interface {
	antlr.ParserRuleContext

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

	// GetOp returns the op token.
	GetOp() antlr.Token

	// SetOp sets the op token.
	SetOp(antlr.Token)

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

IBooleanExprContext is an interface to support dynamic dispatch.

type IExprContext

type IExprContext interface {
	antlr.ParserRuleContext

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

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

IExprContext is an interface to support dynamic dispatch.

type ILeftexprContext

type ILeftexprContext interface {
	antlr.ParserRuleContext

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

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

ILeftexprContext is an interface to support dynamic dispatch.

type IQueryContext

type IQueryContext interface {
	antlr.ParserRuleContext

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

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

IQueryContext is an interface to support dynamic dispatch.

type IValueContext

type IValueContext interface {
	antlr.ParserRuleContext

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

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

IValueContext is an interface to support dynamic dispatch.

type LeftexprContext

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

func NewEmptyLeftexprContext

func NewEmptyLeftexprContext() *LeftexprContext

func NewLeftexprContext

func NewLeftexprContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *LeftexprContext

func (*LeftexprContext) AllFUNC

func (s *LeftexprContext) AllFUNC() []antlr.TerminalNode

func (*LeftexprContext) EnterRule

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

func (*LeftexprContext) ExitRule

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

func (*LeftexprContext) FIELDNAME

func (s *LeftexprContext) FIELDNAME() antlr.TerminalNode

func (*LeftexprContext) FUNC

func (*LeftexprContext) GetParser

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

func (*LeftexprContext) GetRuleContext

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

func (*LeftexprContext) IsLeftexprContext

func (*LeftexprContext) IsLeftexprContext()

func (*LeftexprContext) ToStringTree

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

type OrExprContext

type OrExprContext struct {
	*ExprContext
}

func NewOrExprContext

func NewOrExprContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *OrExprContext

func (*OrExprContext) AllExpr

func (s *OrExprContext) AllExpr() []IExprContext

func (*OrExprContext) EnterRule

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

func (*OrExprContext) ExitRule

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

func (*OrExprContext) Expr

func (s *OrExprContext) Expr(i int) IExprContext

func (*OrExprContext) GetRuleContext

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

type QueryContext

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

func NewEmptyQueryContext

func NewEmptyQueryContext() *QueryContext

func NewQueryContext

func NewQueryContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *QueryContext

func (*QueryContext) EnterRule

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

func (*QueryContext) ExitRule

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

func (*QueryContext) Expr

func (s *QueryContext) Expr() IExprContext

func (*QueryContext) GetParser

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

func (*QueryContext) GetRuleContext

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

func (*QueryContext) IsQueryContext

func (*QueryContext) IsQueryContext()

func (*QueryContext) ToStringTree

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

type ValueContext

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

func NewEmptyValueContext

func NewEmptyValueContext() *ValueContext

func NewValueContext

func NewValueContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ValueContext

func (*ValueContext) EnterRule

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

func (*ValueContext) ExitRule

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

func (*ValueContext) FALSE

func (s *ValueContext) FALSE() antlr.TerminalNode

func (*ValueContext) FLOAT

func (s *ValueContext) FLOAT() antlr.TerminalNode

func (*ValueContext) GetParser

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

func (*ValueContext) GetRuleContext

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

func (*ValueContext) INT

func (s *ValueContext) INT() antlr.TerminalNode

func (*ValueContext) IsValueContext

func (*ValueContext) IsValueContext()

func (*ValueContext) STRING

func (s *ValueContext) STRING() antlr.TerminalNode

func (*ValueContext) TRUE

func (s *ValueContext) TRUE() antlr.TerminalNode

func (*ValueContext) ToStringTree

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

type YqlLexer

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

func NewYqlLexer

func NewYqlLexer(input antlr.CharStream) *YqlLexer

type YqlListener

type YqlListener interface {
	antlr.ParseTreeListener

	// EnterQuery is called when entering the query production.
	EnterQuery(c *QueryContext)

	// EnterEmbbedExpr is called when entering the embbedExpr production.
	EnterEmbbedExpr(c *EmbbedExprContext)

	// EnterOrExpr is called when entering the orExpr production.
	EnterOrExpr(c *OrExprContext)

	// EnterBoolExpr is called when entering the boolExpr production.
	EnterBoolExpr(c *BoolExprContext)

	// EnterAndExpr is called when entering the andExpr production.
	EnterAndExpr(c *AndExprContext)

	// EnterBooleanExpr is called when entering the booleanExpr production.
	EnterBooleanExpr(c *BooleanExprContext)

	// EnterLeftexpr is called when entering the leftexpr production.
	EnterLeftexpr(c *LeftexprContext)

	// EnterValue is called when entering the value production.
	EnterValue(c *ValueContext)

	// ExitQuery is called when exiting the query production.
	ExitQuery(c *QueryContext)

	// ExitEmbbedExpr is called when exiting the embbedExpr production.
	ExitEmbbedExpr(c *EmbbedExprContext)

	// ExitOrExpr is called when exiting the orExpr production.
	ExitOrExpr(c *OrExprContext)

	// ExitBoolExpr is called when exiting the boolExpr production.
	ExitBoolExpr(c *BoolExprContext)

	// ExitAndExpr is called when exiting the andExpr production.
	ExitAndExpr(c *AndExprContext)

	// ExitBooleanExpr is called when exiting the booleanExpr production.
	ExitBooleanExpr(c *BooleanExprContext)

	// ExitLeftexpr is called when exiting the leftexpr production.
	ExitLeftexpr(c *LeftexprContext)

	// ExitValue is called when exiting the value production.
	ExitValue(c *ValueContext)
}

YqlListener is a complete listener for a parse tree produced by YqlParser.

type YqlParser

type YqlParser struct {
	*antlr.BaseParser
}

func NewYqlParser

func NewYqlParser(input antlr.TokenStream) *YqlParser

func (*YqlParser) BooleanExpr

func (p *YqlParser) BooleanExpr() (localctx IBooleanExprContext)

func (*YqlParser) Expr

func (p *YqlParser) Expr() (localctx IExprContext)

func (*YqlParser) Expr_Sempred

func (p *YqlParser) Expr_Sempred(localctx antlr.RuleContext, predIndex int) bool

func (*YqlParser) Leftexpr

func (p *YqlParser) Leftexpr() (localctx ILeftexprContext)

func (*YqlParser) Query

func (p *YqlParser) Query() (localctx IQueryContext)

func (*YqlParser) Sempred

func (p *YqlParser) Sempred(localctx antlr.RuleContext, ruleIndex, predIndex int) bool

func (*YqlParser) Value

func (p *YqlParser) Value() (localctx IValueContext)

Jump to

Keyboard shortcuts

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