parser

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2019 License: Apache-2.0, BSD-3-Clause, MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	QueryLexerMultiOp        = 1
	QueryLexerUniOp          = 2
	QueryLexerConcat         = 3
	QueryLexerValue          = 4
	QueryLexerValueSeparator = 5
	QueryLexerKey            = 6
	QueryLexerOpenBracket    = 7
	QueryLexerCloseBracket   = 8
	QueryLexerWhitespace     = 9
	QueryLexerWS             = 10
)

QueryLexer tokens.

View Source
const (
	QueryParserEOF            = antlr.TokenEOF
	QueryParserMultiOp        = 1
	QueryParserUniOp          = 2
	QueryParserConcat         = 3
	QueryParserValue          = 4
	QueryParserValueSeparator = 5
	QueryParserKey            = 6
	QueryParserOpenBracket    = 7
	QueryParserCloseBracket   = 8
	QueryParserWhitespace     = 9
	QueryParserWS             = 10
)

QueryParser tokens.

View Source
const (
	QueryParserRULE_expression   = 0
	QueryParserRULE_criterions   = 1
	QueryParserRULE_criterion    = 2
	QueryParserRULE_multivariate = 3
	QueryParserRULE_univariate   = 4
	QueryParserRULE_multiValues  = 5
	QueryParserRULE_manyValues   = 6
)

QueryParser rules.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseQueryListener

type BaseQueryListener struct{}

BaseQueryListener is a complete listener for a parse tree produced by QueryParser.

func (*BaseQueryListener) EnterCriterion

func (s *BaseQueryListener) EnterCriterion(ctx *CriterionContext)

EnterCriterion is called when production criterion is entered.

func (*BaseQueryListener) EnterCriterions

func (s *BaseQueryListener) EnterCriterions(ctx *CriterionsContext)

EnterCriterions is called when production criterions is entered.

func (*BaseQueryListener) EnterEveryRule

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

EnterEveryRule is called when any rule is entered.

func (*BaseQueryListener) EnterExpression

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

EnterExpression is called when production expression is entered.

func (*BaseQueryListener) EnterManyValues

func (s *BaseQueryListener) EnterManyValues(ctx *ManyValuesContext)

EnterManyValues is called when production manyValues is entered.

func (*BaseQueryListener) EnterMultiValues

func (s *BaseQueryListener) EnterMultiValues(ctx *MultiValuesContext)

EnterMultiValues is called when production multiValues is entered.

func (*BaseQueryListener) EnterMultivariate

func (s *BaseQueryListener) EnterMultivariate(ctx *MultivariateContext)

EnterMultivariate is called when production multivariate is entered.

func (*BaseQueryListener) EnterUnivariate

func (s *BaseQueryListener) EnterUnivariate(ctx *UnivariateContext)

EnterUnivariate is called when production univariate is entered.

func (*BaseQueryListener) ExitCriterion

func (s *BaseQueryListener) ExitCriterion(ctx *CriterionContext)

ExitCriterion is called when production criterion is exited.

func (*BaseQueryListener) ExitCriterions

func (s *BaseQueryListener) ExitCriterions(ctx *CriterionsContext)

ExitCriterions is called when production criterions is exited.

func (*BaseQueryListener) ExitEveryRule

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

ExitEveryRule is called when any rule is exited.

func (*BaseQueryListener) ExitExpression

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

ExitExpression is called when production expression is exited.

func (*BaseQueryListener) ExitManyValues

func (s *BaseQueryListener) ExitManyValues(ctx *ManyValuesContext)

ExitManyValues is called when production manyValues is exited.

func (*BaseQueryListener) ExitMultiValues

func (s *BaseQueryListener) ExitMultiValues(ctx *MultiValuesContext)

ExitMultiValues is called when production multiValues is exited.

func (*BaseQueryListener) ExitMultivariate

func (s *BaseQueryListener) ExitMultivariate(ctx *MultivariateContext)

ExitMultivariate is called when production multivariate is exited.

func (*BaseQueryListener) ExitUnivariate

func (s *BaseQueryListener) ExitUnivariate(ctx *UnivariateContext)

ExitUnivariate is called when production univariate is exited.

func (*BaseQueryListener) VisitErrorNode

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

VisitErrorNode is called when an error node is visited.

func (*BaseQueryListener) VisitTerminal

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

VisitTerminal is called when a terminal node is visited.

type CriterionContext

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

func NewCriterionContext

func NewCriterionContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *CriterionContext

func NewEmptyCriterionContext

func NewEmptyCriterionContext() *CriterionContext

func (*CriterionContext) EnterRule

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

func (*CriterionContext) ExitRule

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

func (*CriterionContext) GetParser

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

func (*CriterionContext) GetRuleContext

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

func (*CriterionContext) IsCriterionContext

func (*CriterionContext) IsCriterionContext()

func (*CriterionContext) Multivariate

func (s *CriterionContext) Multivariate() IMultivariateContext

func (*CriterionContext) ToStringTree

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

func (*CriterionContext) Univariate

func (s *CriterionContext) Univariate() IUnivariateContext

type CriterionsContext

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

func NewCriterionsContext

func NewCriterionsContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *CriterionsContext

func NewEmptyCriterionsContext

func NewEmptyCriterionsContext() *CriterionsContext

func (*CriterionsContext) Concat

func (s *CriterionsContext) Concat() antlr.TerminalNode

func (*CriterionsContext) Criterion

func (s *CriterionsContext) Criterion() ICriterionContext

func (*CriterionsContext) Criterions

func (s *CriterionsContext) Criterions() ICriterionsContext

func (*CriterionsContext) EnterRule

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

func (*CriterionsContext) ExitRule

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

func (*CriterionsContext) GetParser

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

func (*CriterionsContext) GetRuleContext

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

func (*CriterionsContext) IsCriterionsContext

func (*CriterionsContext) IsCriterionsContext()

func (*CriterionsContext) ToStringTree

func (s *CriterionsContext) 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) Criterions

func (s *ExpressionContext) Criterions() ICriterionsContext

func (*ExpressionContext) EOF

func (*ExpressionContext) EnterRule

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

func (*ExpressionContext) ExitRule

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

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) ToStringTree

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

type ICriterionContext

type ICriterionContext interface {
	antlr.ParserRuleContext

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

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

ICriterionContext is an interface to support dynamic dispatch.

type ICriterionsContext

type ICriterionsContext interface {
	antlr.ParserRuleContext

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

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

ICriterionsContext 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 IManyValuesContext

type IManyValuesContext interface {
	antlr.ParserRuleContext

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

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

IManyValuesContext is an interface to support dynamic dispatch.

type IMultiValuesContext

type IMultiValuesContext interface {
	antlr.ParserRuleContext

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

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

IMultiValuesContext is an interface to support dynamic dispatch.

type IMultivariateContext

type IMultivariateContext interface {
	antlr.ParserRuleContext

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

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

IMultivariateContext is an interface to support dynamic dispatch.

type IUnivariateContext

type IUnivariateContext interface {
	antlr.ParserRuleContext

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

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

IUnivariateContext is an interface to support dynamic dispatch.

type ManyValuesContext

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

func NewEmptyManyValuesContext

func NewEmptyManyValuesContext() *ManyValuesContext

func NewManyValuesContext

func NewManyValuesContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ManyValuesContext

func (*ManyValuesContext) EnterRule

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

func (*ManyValuesContext) ExitRule

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

func (*ManyValuesContext) GetParser

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

func (*ManyValuesContext) GetRuleContext

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

func (*ManyValuesContext) IsManyValuesContext

func (*ManyValuesContext) IsManyValuesContext()

func (*ManyValuesContext) ManyValues

func (s *ManyValuesContext) ManyValues() IManyValuesContext

func (*ManyValuesContext) ToStringTree

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

func (*ManyValuesContext) Value

func (*ManyValuesContext) ValueSeparator

func (s *ManyValuesContext) ValueSeparator() antlr.TerminalNode

type MultiValuesContext

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

func NewEmptyMultiValuesContext

func NewEmptyMultiValuesContext() *MultiValuesContext

func NewMultiValuesContext

func NewMultiValuesContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *MultiValuesContext

func (*MultiValuesContext) CloseBracket

func (s *MultiValuesContext) CloseBracket() antlr.TerminalNode

func (*MultiValuesContext) EnterRule

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

func (*MultiValuesContext) ExitRule

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

func (*MultiValuesContext) GetParser

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

func (*MultiValuesContext) GetRuleContext

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

func (*MultiValuesContext) IsMultiValuesContext

func (*MultiValuesContext) IsMultiValuesContext()

func (*MultiValuesContext) ManyValues

func (s *MultiValuesContext) ManyValues() IManyValuesContext

func (*MultiValuesContext) OpenBracket

func (s *MultiValuesContext) OpenBracket() antlr.TerminalNode

func (*MultiValuesContext) ToStringTree

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

type MultivariateContext

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

func NewEmptyMultivariateContext

func NewEmptyMultivariateContext() *MultivariateContext

func NewMultivariateContext

func NewMultivariateContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *MultivariateContext

func (*MultivariateContext) AllWhitespace

func (s *MultivariateContext) AllWhitespace() []antlr.TerminalNode

func (*MultivariateContext) EnterRule

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

func (*MultivariateContext) ExitRule

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

func (*MultivariateContext) GetParser

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

func (*MultivariateContext) GetRuleContext

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

func (*MultivariateContext) IsMultivariateContext

func (*MultivariateContext) IsMultivariateContext()

func (*MultivariateContext) Key

func (*MultivariateContext) MultiOp

func (s *MultivariateContext) MultiOp() antlr.TerminalNode

func (*MultivariateContext) MultiValues

func (s *MultivariateContext) MultiValues() IMultiValuesContext

func (*MultivariateContext) ToStringTree

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

func (*MultivariateContext) Whitespace

func (s *MultivariateContext) Whitespace(i int) antlr.TerminalNode

type QueryLexer

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

func NewQueryLexer

func NewQueryLexer(input antlr.CharStream) *QueryLexer

type QueryListener

type QueryListener interface {
	antlr.ParseTreeListener

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

	// EnterCriterions is called when entering the criterions production.
	EnterCriterions(c *CriterionsContext)

	// EnterCriterion is called when entering the criterion production.
	EnterCriterion(c *CriterionContext)

	// EnterMultivariate is called when entering the multivariate production.
	EnterMultivariate(c *MultivariateContext)

	// EnterUnivariate is called when entering the univariate production.
	EnterUnivariate(c *UnivariateContext)

	// EnterMultiValues is called when entering the multiValues production.
	EnterMultiValues(c *MultiValuesContext)

	// EnterManyValues is called when entering the manyValues production.
	EnterManyValues(c *ManyValuesContext)

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

	// ExitCriterions is called when exiting the criterions production.
	ExitCriterions(c *CriterionsContext)

	// ExitCriterion is called when exiting the criterion production.
	ExitCriterion(c *CriterionContext)

	// ExitMultivariate is called when exiting the multivariate production.
	ExitMultivariate(c *MultivariateContext)

	// ExitUnivariate is called when exiting the univariate production.
	ExitUnivariate(c *UnivariateContext)

	// ExitMultiValues is called when exiting the multiValues production.
	ExitMultiValues(c *MultiValuesContext)

	// ExitManyValues is called when exiting the manyValues production.
	ExitManyValues(c *ManyValuesContext)
}

QueryListener is a complete listener for a parse tree produced by QueryParser.

type QueryParser

type QueryParser struct {
	*antlr.BaseParser
}

func NewQueryParser

func NewQueryParser(input antlr.TokenStream) *QueryParser

func (*QueryParser) Criterion

func (p *QueryParser) Criterion() (localctx ICriterionContext)

func (*QueryParser) Criterions

func (p *QueryParser) Criterions() (localctx ICriterionsContext)

func (*QueryParser) Expression

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

func (*QueryParser) ManyValues

func (p *QueryParser) ManyValues() (localctx IManyValuesContext)

func (*QueryParser) MultiValues

func (p *QueryParser) MultiValues() (localctx IMultiValuesContext)

func (*QueryParser) Multivariate

func (p *QueryParser) Multivariate() (localctx IMultivariateContext)

func (*QueryParser) Univariate

func (p *QueryParser) Univariate() (localctx IUnivariateContext)

type UnivariateContext

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

func NewEmptyUnivariateContext

func NewEmptyUnivariateContext() *UnivariateContext

func NewUnivariateContext

func NewUnivariateContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *UnivariateContext

func (*UnivariateContext) AllWhitespace

func (s *UnivariateContext) AllWhitespace() []antlr.TerminalNode

func (*UnivariateContext) EnterRule

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

func (*UnivariateContext) ExitRule

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

func (*UnivariateContext) GetParser

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

func (*UnivariateContext) GetRuleContext

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

func (*UnivariateContext) IsUnivariateContext

func (*UnivariateContext) IsUnivariateContext()

func (*UnivariateContext) Key

func (*UnivariateContext) ToStringTree

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

func (*UnivariateContext) UniOp

func (*UnivariateContext) Value

func (*UnivariateContext) Whitespace

func (s *UnivariateContext) Whitespace(i int) antlr.TerminalNode

Jump to

Keyboard shortcuts

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