parser

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SfzLexerT__0          = 1
	SfzLexerT__1          = 2
	SfzLexerT__2          = 3
	SfzLexerSTRING        = 4
	SfzLexerNEWLINE       = 5
	SfzLexerWHITESPACE    = 6
	SfzLexerBLOCK_COMMENT = 7
	SfzLexerLINE_COMMENT  = 8
	SfzLexerHASH_COMMENT  = 9
)

SfzLexer tokens.

View Source
const (
	SfzParserEOF           = antlr.TokenEOF
	SfzParserT__0          = 1
	SfzParserT__1          = 2
	SfzParserT__2          = 3
	SfzParserSTRING        = 4
	SfzParserNEWLINE       = 5
	SfzParserWHITESPACE    = 6
	SfzParserBLOCK_COMMENT = 7
	SfzParserLINE_COMMENT  = 8
	SfzParserHASH_COMMENT  = 9
)

SfzParser tokens.

View Source
const (
	SfzParserRULE_sfz             = 0
	SfzParserRULE_sfzObject       = 1
	SfzParserRULE_headerObject    = 2
	SfzParserRULE_header          = 3
	SfzParserRULE_opcodeStatement = 4
	SfzParserRULE_opcode          = 5
	SfzParserRULE_value           = 6
)

SfzParser rules.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseSfzListener

type BaseSfzListener struct{}

BaseSfzListener is a complete listener for a parse tree produced by SfzParser.

func (*BaseSfzListener) EnterEveryRule

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

EnterEveryRule is called when any rule is entered.

func (*BaseSfzListener) EnterHeader

func (s *BaseSfzListener) EnterHeader(ctx *HeaderContext)

EnterHeader is called when production header is entered.

func (*BaseSfzListener) EnterHeaderObject

func (s *BaseSfzListener) EnterHeaderObject(ctx *HeaderObjectContext)

EnterHeaderObject is called when production headerObject is entered.

func (*BaseSfzListener) EnterOpcode

func (s *BaseSfzListener) EnterOpcode(ctx *OpcodeContext)

EnterOpcode is called when production opcode is entered.

func (*BaseSfzListener) EnterOpcodeStatement

func (s *BaseSfzListener) EnterOpcodeStatement(ctx *OpcodeStatementContext)

EnterOpcodeStatement is called when production opcodeStatement is entered.

func (*BaseSfzListener) EnterSfz

func (s *BaseSfzListener) EnterSfz(ctx *SfzContext)

EnterSfz is called when production sfz is entered.

func (*BaseSfzListener) EnterSfzObject

func (s *BaseSfzListener) EnterSfzObject(ctx *SfzObjectContext)

EnterSfzObject is called when production sfzObject is entered.

func (*BaseSfzListener) EnterValue

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

EnterValue is called when production value is entered.

func (*BaseSfzListener) ExitEveryRule

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

ExitEveryRule is called when any rule is exited.

func (*BaseSfzListener) ExitHeader

func (s *BaseSfzListener) ExitHeader(ctx *HeaderContext)

ExitHeader is called when production header is exited.

func (*BaseSfzListener) ExitHeaderObject

func (s *BaseSfzListener) ExitHeaderObject(ctx *HeaderObjectContext)

ExitHeaderObject is called when production headerObject is exited.

func (*BaseSfzListener) ExitOpcode

func (s *BaseSfzListener) ExitOpcode(ctx *OpcodeContext)

ExitOpcode is called when production opcode is exited.

func (*BaseSfzListener) ExitOpcodeStatement

func (s *BaseSfzListener) ExitOpcodeStatement(ctx *OpcodeStatementContext)

ExitOpcodeStatement is called when production opcodeStatement is exited.

func (*BaseSfzListener) ExitSfz

func (s *BaseSfzListener) ExitSfz(ctx *SfzContext)

ExitSfz is called when production sfz is exited.

func (*BaseSfzListener) ExitSfzObject

func (s *BaseSfzListener) ExitSfzObject(ctx *SfzObjectContext)

ExitSfzObject is called when production sfzObject is exited.

func (*BaseSfzListener) ExitValue

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

ExitValue is called when production value is exited.

func (*BaseSfzListener) VisitErrorNode

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

VisitErrorNode is called when an error node is visited.

func (*BaseSfzListener) VisitTerminal

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

VisitTerminal is called when a terminal node is visited.

type HeaderContext

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

func NewEmptyHeaderContext

func NewEmptyHeaderContext() *HeaderContext

func NewHeaderContext

func NewHeaderContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *HeaderContext

func (*HeaderContext) EnterRule

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

func (*HeaderContext) ExitRule

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

func (*HeaderContext) GetParser

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

func (*HeaderContext) GetRuleContext

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

func (*HeaderContext) IsHeaderContext

func (*HeaderContext) IsHeaderContext()

func (*HeaderContext) STRING

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

func (*HeaderContext) ToStringTree

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

type HeaderObjectContext

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

func NewEmptyHeaderObjectContext

func NewEmptyHeaderObjectContext() *HeaderObjectContext

func NewHeaderObjectContext

func NewHeaderObjectContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *HeaderObjectContext

func (*HeaderObjectContext) EnterRule

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

func (*HeaderObjectContext) ExitRule

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

func (*HeaderObjectContext) GetParser

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

func (*HeaderObjectContext) GetRuleContext

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

func (*HeaderObjectContext) Header

func (s *HeaderObjectContext) Header() IHeaderContext

func (*HeaderObjectContext) IsHeaderObjectContext

func (*HeaderObjectContext) IsHeaderObjectContext()

func (*HeaderObjectContext) ToStringTree

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

type IHeaderContext

type IHeaderContext interface {
	antlr.ParserRuleContext

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

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

IHeaderContext is an interface to support dynamic dispatch.

type IHeaderObjectContext

type IHeaderObjectContext interface {
	antlr.ParserRuleContext

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

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

IHeaderObjectContext is an interface to support dynamic dispatch.

type IOpcodeContext

type IOpcodeContext interface {
	antlr.ParserRuleContext

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

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

IOpcodeContext is an interface to support dynamic dispatch.

type IOpcodeStatementContext

type IOpcodeStatementContext interface {
	antlr.ParserRuleContext

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

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

IOpcodeStatementContext is an interface to support dynamic dispatch.

type ISfzContext

type ISfzContext interface {
	antlr.ParserRuleContext

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

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

ISfzContext is an interface to support dynamic dispatch.

type ISfzObjectContext

type ISfzObjectContext interface {
	antlr.ParserRuleContext

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

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

ISfzObjectContext 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 OpcodeContext

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

func NewEmptyOpcodeContext

func NewEmptyOpcodeContext() *OpcodeContext

func NewOpcodeContext

func NewOpcodeContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *OpcodeContext

func (*OpcodeContext) EnterRule

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

func (*OpcodeContext) ExitRule

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

func (*OpcodeContext) GetParser

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

func (*OpcodeContext) GetRuleContext

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

func (*OpcodeContext) IsOpcodeContext

func (*OpcodeContext) IsOpcodeContext()

func (*OpcodeContext) STRING

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

func (*OpcodeContext) ToStringTree

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

type OpcodeStatementContext

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

func NewEmptyOpcodeStatementContext

func NewEmptyOpcodeStatementContext() *OpcodeStatementContext

func NewOpcodeStatementContext

func NewOpcodeStatementContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *OpcodeStatementContext

func (*OpcodeStatementContext) EnterRule

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

func (*OpcodeStatementContext) ExitRule

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

func (*OpcodeStatementContext) GetParser

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

func (*OpcodeStatementContext) GetRuleContext

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

func (*OpcodeStatementContext) IsOpcodeStatementContext

func (*OpcodeStatementContext) IsOpcodeStatementContext()

func (*OpcodeStatementContext) Opcode

func (*OpcodeStatementContext) ToStringTree

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

func (*OpcodeStatementContext) Value

type SfzContext

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

func NewEmptySfzContext

func NewEmptySfzContext() *SfzContext

func NewSfzContext

func NewSfzContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *SfzContext

func (*SfzContext) AllSfzObject

func (s *SfzContext) AllSfzObject() []ISfzObjectContext

func (*SfzContext) EOF

func (s *SfzContext) EOF() antlr.TerminalNode

func (*SfzContext) EnterRule

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

func (*SfzContext) ExitRule

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

func (*SfzContext) GetParser

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

func (*SfzContext) GetRuleContext

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

func (*SfzContext) IsSfzContext

func (*SfzContext) IsSfzContext()

func (*SfzContext) SfzObject

func (s *SfzContext) SfzObject(i int) ISfzObjectContext

func (*SfzContext) ToStringTree

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

type SfzLexer

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

func NewSfzLexer

func NewSfzLexer(input antlr.CharStream) *SfzLexer

type SfzListener

type SfzListener interface {
	antlr.ParseTreeListener

	// EnterSfz is called when entering the sfz production.
	EnterSfz(c *SfzContext)

	// EnterSfzObject is called when entering the sfzObject production.
	EnterSfzObject(c *SfzObjectContext)

	// EnterHeaderObject is called when entering the headerObject production.
	EnterHeaderObject(c *HeaderObjectContext)

	// EnterHeader is called when entering the header production.
	EnterHeader(c *HeaderContext)

	// EnterOpcodeStatement is called when entering the opcodeStatement production.
	EnterOpcodeStatement(c *OpcodeStatementContext)

	// EnterOpcode is called when entering the opcode production.
	EnterOpcode(c *OpcodeContext)

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

	// ExitSfz is called when exiting the sfz production.
	ExitSfz(c *SfzContext)

	// ExitSfzObject is called when exiting the sfzObject production.
	ExitSfzObject(c *SfzObjectContext)

	// ExitHeaderObject is called when exiting the headerObject production.
	ExitHeaderObject(c *HeaderObjectContext)

	// ExitHeader is called when exiting the header production.
	ExitHeader(c *HeaderContext)

	// ExitOpcodeStatement is called when exiting the opcodeStatement production.
	ExitOpcodeStatement(c *OpcodeStatementContext)

	// ExitOpcode is called when exiting the opcode production.
	ExitOpcode(c *OpcodeContext)

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

SfzListener is a complete listener for a parse tree produced by SfzParser.

type SfzObjectContext

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

func NewEmptySfzObjectContext

func NewEmptySfzObjectContext() *SfzObjectContext

func NewSfzObjectContext

func NewSfzObjectContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *SfzObjectContext

func (*SfzObjectContext) AllHeaderObject

func (s *SfzObjectContext) AllHeaderObject() []IHeaderObjectContext

func (*SfzObjectContext) AllNEWLINE

func (s *SfzObjectContext) AllNEWLINE() []antlr.TerminalNode

func (*SfzObjectContext) AllOpcodeStatement

func (s *SfzObjectContext) AllOpcodeStatement() []IOpcodeStatementContext

func (*SfzObjectContext) AllWHITESPACE

func (s *SfzObjectContext) AllWHITESPACE() []antlr.TerminalNode

func (*SfzObjectContext) EnterRule

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

func (*SfzObjectContext) ExitRule

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

func (*SfzObjectContext) GetParser

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

func (*SfzObjectContext) GetRuleContext

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

func (*SfzObjectContext) HeaderObject

func (s *SfzObjectContext) HeaderObject(i int) IHeaderObjectContext

func (*SfzObjectContext) IsSfzObjectContext

func (*SfzObjectContext) IsSfzObjectContext()

func (*SfzObjectContext) NEWLINE

func (s *SfzObjectContext) NEWLINE(i int) antlr.TerminalNode

func (*SfzObjectContext) OpcodeStatement

func (s *SfzObjectContext) OpcodeStatement(i int) IOpcodeStatementContext

func (*SfzObjectContext) ToStringTree

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

func (*SfzObjectContext) WHITESPACE

func (s *SfzObjectContext) WHITESPACE(i int) antlr.TerminalNode

type SfzParser

type SfzParser struct {
	*antlr.BaseParser
}

func NewSfzParser

func NewSfzParser(input antlr.TokenStream) *SfzParser

func (*SfzParser) Header

func (p *SfzParser) Header() (localctx IHeaderContext)

func (*SfzParser) HeaderObject

func (p *SfzParser) HeaderObject() (localctx IHeaderObjectContext)

func (*SfzParser) Opcode

func (p *SfzParser) Opcode() (localctx IOpcodeContext)

func (*SfzParser) OpcodeStatement

func (p *SfzParser) OpcodeStatement() (localctx IOpcodeStatementContext)

func (*SfzParser) Sfz

func (p *SfzParser) Sfz() (localctx ISfzContext)

func (*SfzParser) SfzObject

func (p *SfzParser) SfzObject() (localctx ISfzObjectContext)

func (*SfzParser) Value

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

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

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

func (*ValueContext) GetRuleContext

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

func (*ValueContext) IsValueContext

func (*ValueContext) IsValueContext()

func (*ValueContext) STRING

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

func (*ValueContext) ToStringTree

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