parser

package
v0.0.0-...-10dc115 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2018 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TestLexerT__0  = 1
	TestLexerT__1  = 2
	TestLexerT__2  = 3
	TestLexerT__3  = 4
	TestLexerT__4  = 5
	TestLexerT__5  = 6
	TestLexerT__6  = 7
	TestLexerID    = 8
	TestLexerDIGIT = 9
	TestLexerWS    = 10
)

TestLexer tokens.

View Source
const (
	TestParserEOF   = antlr.TokenEOF
	TestParserT__0  = 1
	TestParserT__1  = 2
	TestParserT__2  = 3
	TestParserT__3  = 4
	TestParserT__4  = 5
	TestParserT__5  = 6
	TestParserT__6  = 7
	TestParserID    = 8
	TestParserDIGIT = 9
	TestParserWS    = 10
)

TestParser tokens.

View Source
const TestParserRULE_expression = 0

TestParserRULE_expression is the TestParser rule.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseTestListener

type BaseTestListener struct{}

BaseTestListener is a complete listener for a parse tree produced by TestParser.

func (*BaseTestListener) EnterEveryRule

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

EnterEveryRule is called when any rule is entered.

func (*BaseTestListener) EnterExpression

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

EnterExpression is called when production expression is entered.

func (*BaseTestListener) ExitEveryRule

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

ExitEveryRule is called when any rule is exited.

func (*BaseTestListener) ExitExpression

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

ExitExpression is called when production expression is exited.

func (*BaseTestListener) VisitErrorNode

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

VisitErrorNode is called when an error node is visited.

func (*BaseTestListener) VisitTerminal

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

VisitTerminal is called when a terminal node is visited.

type BaseTestVisitor

type BaseTestVisitor struct {
	*antlr.BaseParseTreeVisitor
}

func (*BaseTestVisitor) VisitExpression

func (v *BaseTestVisitor) VisitExpression(ctx *ExpressionContext) interface{}

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

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

func (*ExpressionContext) AllExpression

func (s *ExpressionContext) AllExpression() []IExpressionContext

func (*ExpressionContext) EnterRule

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

func (*ExpressionContext) ExitRule

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

func (*ExpressionContext) Expression

func (s *ExpressionContext) Expression(i int) IExpressionContext

func (*ExpressionContext) GetParser

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

func (*ExpressionContext) GetRuleContext

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

func (*ExpressionContext) ID

func (*ExpressionContext) IsExpressionContext

func (*ExpressionContext) IsExpressionContext()

func (*ExpressionContext) ToStringTree

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

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 TestLexer

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

func NewTestLexer

func NewTestLexer(input antlr.CharStream) *TestLexer

type TestListener

type TestListener interface {
	antlr.ParseTreeListener

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

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

TestListener is a complete listener for a parse tree produced by TestParser.

type TestParser

type TestParser struct {
	*antlr.BaseParser
}

func NewTestParser

func NewTestParser(input antlr.TokenStream) *TestParser

func (*TestParser) Expression

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

func (*TestParser) Expression_Sempred

func (p *TestParser) Expression_Sempred(localctx antlr.RuleContext, predIndex int) bool

func (*TestParser) Sempred

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

type TestVisitor

type TestVisitor interface {
	antlr.ParseTreeVisitor

	// Visit a parse tree produced by TestParser#expression.
	VisitExpression(ctx *ExpressionContext) interface{}
}

A complete Visitor for a parse tree produced by TestParser.

Jump to

Keyboard shortcuts

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