parser

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var PluralLexerLexerStaticData struct {
	ChannelNames           []string
	ModeNames              []string
	LiteralNames           []string
	SymbolicNames          []string
	RuleNames              []string
	PredictionContextCache *antlr.PredictionContextCache
	// contains filtered or unexported fields
}
View Source
var PluralParserStaticData struct {
	LiteralNames           []string
	SymbolicNames          []string
	RuleNames              []string
	PredictionContextCache *antlr.PredictionContextCache
	// contains filtered or unexported fields
}

Functions

func InitEmptyExpContext

func InitEmptyExpContext(p *ExpContext)

func InitEmptyPrimaryContext

func InitEmptyPrimaryContext(p *PrimaryContext)

func InitEmptyStartContext

func InitEmptyStartContext(p *StartContext)

func NewpluralLexer

func NewpluralLexer(input antlr.CharStream) *pluralLexer

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

func NewpluralParser

func NewpluralParser(input antlr.TokenStream) *pluralParser

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

func PluralLexerInit

func PluralLexerInit()

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

func PluralParserInit

func PluralParserInit()

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

Types

type BasepluralListener

type BasepluralListener struct{}

BasepluralListener is a complete listener for a parse tree produced by pluralParser.

func (*BasepluralListener) EnterEveryRule

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

EnterEveryRule is called when any rule is entered.

func (*BasepluralListener) EnterExp

func (s *BasepluralListener) EnterExp(ctx *ExpContext)

EnterExp is called when production exp is entered.

func (*BasepluralListener) EnterPrimary

func (s *BasepluralListener) EnterPrimary(ctx *PrimaryContext)

EnterPrimary is called when production primary is entered.

func (*BasepluralListener) EnterStart

func (s *BasepluralListener) EnterStart(ctx *StartContext)

EnterStart is called when production start is entered.

func (*BasepluralListener) ExitEveryRule

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

ExitEveryRule is called when any rule is exited.

func (*BasepluralListener) ExitExp

func (s *BasepluralListener) ExitExp(ctx *ExpContext)

ExitExp is called when production exp is exited.

func (*BasepluralListener) ExitPrimary

func (s *BasepluralListener) ExitPrimary(ctx *PrimaryContext)

ExitPrimary is called when production primary is exited.

func (*BasepluralListener) ExitStart

func (s *BasepluralListener) ExitStart(ctx *StartContext)

ExitStart is called when production start is exited.

func (*BasepluralListener) VisitErrorNode

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

VisitErrorNode is called when an error node is visited.

func (*BasepluralListener) VisitTerminal

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

VisitTerminal is called when a terminal node is visited.

type ExpContext

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

func NewEmptyExpContext

func NewEmptyExpContext() *ExpContext

func NewExpContext

func NewExpContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ExpContext

func (*ExpContext) AllExp

func (s *ExpContext) AllExp() []IExpContext

func (*ExpContext) EnterRule

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

func (*ExpContext) ExitRule

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

func (*ExpContext) Exp

func (s *ExpContext) Exp(i int) IExpContext

func (*ExpContext) GetBop

func (s *ExpContext) GetBop() antlr.Token

func (*ExpContext) GetParser

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

func (*ExpContext) GetPostfix

func (s *ExpContext) GetPostfix() antlr.Token

func (*ExpContext) GetPrefix

func (s *ExpContext) GetPrefix() antlr.Token

func (*ExpContext) GetRuleContext

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

func (*ExpContext) IsExpContext

func (*ExpContext) IsExpContext()

func (*ExpContext) Primary

func (s *ExpContext) Primary() IPrimaryContext

func (*ExpContext) SetBop

func (s *ExpContext) SetBop(v antlr.Token)

func (*ExpContext) SetPostfix

func (s *ExpContext) SetPostfix(v antlr.Token)

func (*ExpContext) SetPrefix

func (s *ExpContext) SetPrefix(v antlr.Token)

func (*ExpContext) ToStringTree

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

type IExpContext

type IExpContext interface {
	antlr.ParserRuleContext

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

	// GetPrefix returns the prefix token.
	GetPrefix() antlr.Token

	// GetBop returns the bop token.
	GetBop() antlr.Token

	// GetPostfix returns the postfix token.
	GetPostfix() antlr.Token

	// SetPrefix sets the prefix token.
	SetPrefix(antlr.Token)

	// SetBop sets the bop token.
	SetBop(antlr.Token)

	// SetPostfix sets the postfix token.
	SetPostfix(antlr.Token)

	// Getter signatures
	Primary() IPrimaryContext
	AllExp() []IExpContext
	Exp(i int) IExpContext

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

IExpContext is an interface to support dynamic dispatch.

type IPrimaryContext

type IPrimaryContext interface {
	antlr.ParserRuleContext

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

	// Getter signatures
	Exp() IExpContext
	INT() antlr.TerminalNode

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

IPrimaryContext is an interface to support dynamic dispatch.

type IStartContext

type IStartContext interface {
	antlr.ParserRuleContext

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

	// Getter signatures
	Exp() IExpContext

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

IStartContext is an interface to support dynamic dispatch.

type PrimaryContext

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

func NewEmptyPrimaryContext

func NewEmptyPrimaryContext() *PrimaryContext

func NewPrimaryContext

func NewPrimaryContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *PrimaryContext

func (*PrimaryContext) EnterRule

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

func (*PrimaryContext) ExitRule

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

func (*PrimaryContext) Exp

func (s *PrimaryContext) Exp() IExpContext

func (*PrimaryContext) GetParser

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

func (*PrimaryContext) GetRuleContext

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

func (*PrimaryContext) INT

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

func (*PrimaryContext) IsPrimaryContext

func (*PrimaryContext) IsPrimaryContext()

func (*PrimaryContext) ToStringTree

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

type StartContext

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

func NewEmptyStartContext

func NewEmptyStartContext() *StartContext

func NewStartContext

func NewStartContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *StartContext

func (*StartContext) EnterRule

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

func (*StartContext) ExitRule

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

func (*StartContext) Exp

func (s *StartContext) Exp() IExpContext

func (*StartContext) GetParser

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

func (*StartContext) GetRuleContext

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

func (*StartContext) IsStartContext

func (*StartContext) IsStartContext()

func (*StartContext) ToStringTree

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