Documentation
¶
Index ¶
- Constants
- type BaseShellListener
- func (s *BaseShellListener) EnterCharacter(ctx *CharacterContext)
- func (s *BaseShellListener) EnterCommand(ctx *CommandContext)
- func (s *BaseShellListener) EnterCommandString(ctx *CommandStringContext)
- func (s *BaseShellListener) EnterEveryRule(ctx antlr.ParserRuleContext)
- func (s *BaseShellListener) EnterLine(ctx *LineContext)
- func (s *BaseShellListener) EnterParameter(ctx *ParameterContext)
- func (s *BaseShellListener) EnterRawString(ctx *RawStringContext)
- func (s *BaseShellListener) ExitCharacter(ctx *CharacterContext)
- func (s *BaseShellListener) ExitCommand(ctx *CommandContext)
- func (s *BaseShellListener) ExitCommandString(ctx *CommandStringContext)
- func (s *BaseShellListener) ExitEveryRule(ctx antlr.ParserRuleContext)
- func (s *BaseShellListener) ExitLine(ctx *LineContext)
- func (s *BaseShellListener) ExitParameter(ctx *ParameterContext)
- func (s *BaseShellListener) ExitRawString(ctx *RawStringContext)
- func (s *BaseShellListener) VisitErrorNode(node antlr.ErrorNode)
- func (s *BaseShellListener) VisitTerminal(node antlr.TerminalNode)
- type CharacterContext
- func (s *CharacterContext) AllESCAPE_CHARACTER() []antlr.TerminalNode
- func (s *CharacterContext) ESCAPE_CHARACTER(i int) antlr.TerminalNode
- func (s *CharacterContext) EnterRule(listener antlr.ParseTreeListener)
- func (s *CharacterContext) ExitRule(listener antlr.ParseTreeListener)
- func (s *CharacterContext) GetParser() antlr.Parser
- func (s *CharacterContext) GetRuleContext() antlr.RuleContext
- func (*CharacterContext) IsCharacterContext()
- func (s *CharacterContext) NORMAL_CHARACTER() antlr.TerminalNode
- func (s *CharacterContext) SPACE() antlr.TerminalNode
- func (s *CharacterContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string
- type CommandContext
- func (s *CommandContext) CommandString() ICommandStringContext
- func (s *CommandContext) EnterRule(listener antlr.ParseTreeListener)
- func (s *CommandContext) ExitRule(listener antlr.ParseTreeListener)
- func (s *CommandContext) GetParser() antlr.Parser
- func (s *CommandContext) GetRuleContext() antlr.RuleContext
- func (*CommandContext) IsCommandContext()
- func (s *CommandContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string
- type CommandStringContext
- func (s *CommandStringContext) EnterRule(listener antlr.ParseTreeListener)
- func (s *CommandStringContext) ExitRule(listener antlr.ParseTreeListener)
- func (s *CommandStringContext) GetParser() antlr.Parser
- func (s *CommandStringContext) GetRuleContext() antlr.RuleContext
- func (*CommandStringContext) IsCommandStringContext()
- func (s *CommandStringContext) RawString() IRawStringContext
- func (s *CommandStringContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string
- type ICharacterContext
- type ICommandContext
- type ICommandStringContext
- type ILineContext
- type IParameterContext
- type IRawStringContext
- type LineContext
- func (s *LineContext) AllParameter() []IParameterContext
- func (s *LineContext) AllSPACE() []antlr.TerminalNode
- func (s *LineContext) Command() ICommandContext
- func (s *LineContext) EnterRule(listener antlr.ParseTreeListener)
- func (s *LineContext) ExitRule(listener antlr.ParseTreeListener)
- func (s *LineContext) GetParser() antlr.Parser
- func (s *LineContext) GetRuleContext() antlr.RuleContext
- func (*LineContext) IsLineContext()
- func (s *LineContext) Parameter(i int) IParameterContext
- func (s *LineContext) SPACE(i int) antlr.TerminalNode
- func (s *LineContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string
- type ParameterContext
- func (s *ParameterContext) CommandString() ICommandStringContext
- func (s *ParameterContext) EnterRule(listener antlr.ParseTreeListener)
- func (s *ParameterContext) ExitRule(listener antlr.ParseTreeListener)
- func (s *ParameterContext) GetParser() antlr.Parser
- func (s *ParameterContext) GetRuleContext() antlr.RuleContext
- func (*ParameterContext) IsParameterContext()
- func (s *ParameterContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string
- type RawStringContext
- func (s *RawStringContext) AllCharacter() []ICharacterContext
- func (s *RawStringContext) Character(i int) ICharacterContext
- func (s *RawStringContext) EnterRule(listener antlr.ParseTreeListener)
- func (s *RawStringContext) ExitRule(listener antlr.ParseTreeListener)
- func (s *RawStringContext) GetParser() antlr.Parser
- func (s *RawStringContext) GetRuleContext() antlr.RuleContext
- func (*RawStringContext) IsRawStringContext()
- func (s *RawStringContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string
- type ShellLexer
- type ShellListener
- type ShellParser
- func (p *ShellParser) Character() (localctx ICharacterContext)
- func (p *ShellParser) Command() (localctx ICommandContext)
- func (p *ShellParser) CommandString() (localctx ICommandStringContext)
- func (p *ShellParser) Line() (localctx ILineContext)
- func (p *ShellParser) Parameter() (localctx IParameterContext)
- func (p *ShellParser) RawString() (localctx IRawStringContext)
Constants ¶
const ( ShellLexerESCAPE_CHARACTER = 1 ShellLexerSPACE = 2 ShellLexerNORMAL_CHARACTER = 3 )
ShellLexer tokens.
const ( ShellParserEOF = antlr.TokenEOF ShellParserESCAPE_CHARACTER = 1 ShellParserSPACE = 2 ShellParserNORMAL_CHARACTER = 3 )
ShellParser tokens.
const ( ShellParserRULE_line = 0 ShellParserRULE_command = 1 ShellParserRULE_parameter = 2 ShellParserRULE_commandString = 3 ShellParserRULE_rawString = 4 ShellParserRULE_character = 5 )
ShellParser rules.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseShellListener ¶
type BaseShellListener struct{}
BaseShellListener is a complete listener for a parse tree produced by ShellParser.
func (*BaseShellListener) EnterCharacter ¶
func (s *BaseShellListener) EnterCharacter(ctx *CharacterContext)
EnterCharacter is called when production character is entered.
func (*BaseShellListener) EnterCommand ¶
func (s *BaseShellListener) EnterCommand(ctx *CommandContext)
EnterCommand is called when production command is entered.
func (*BaseShellListener) EnterCommandString ¶
func (s *BaseShellListener) EnterCommandString(ctx *CommandStringContext)
EnterCommandString is called when production commandString is entered.
func (*BaseShellListener) EnterEveryRule ¶
func (s *BaseShellListener) EnterEveryRule(ctx antlr.ParserRuleContext)
EnterEveryRule is called when any rule is entered.
func (*BaseShellListener) EnterLine ¶
func (s *BaseShellListener) EnterLine(ctx *LineContext)
EnterLine is called when production line is entered.
func (*BaseShellListener) EnterParameter ¶
func (s *BaseShellListener) EnterParameter(ctx *ParameterContext)
EnterParameter is called when production parameter is entered.
func (*BaseShellListener) EnterRawString ¶
func (s *BaseShellListener) EnterRawString(ctx *RawStringContext)
EnterRawString is called when production rawString is entered.
func (*BaseShellListener) ExitCharacter ¶
func (s *BaseShellListener) ExitCharacter(ctx *CharacterContext)
ExitCharacter is called when production character is exited.
func (*BaseShellListener) ExitCommand ¶
func (s *BaseShellListener) ExitCommand(ctx *CommandContext)
ExitCommand is called when production command is exited.
func (*BaseShellListener) ExitCommandString ¶
func (s *BaseShellListener) ExitCommandString(ctx *CommandStringContext)
ExitCommandString is called when production commandString is exited.
func (*BaseShellListener) ExitEveryRule ¶
func (s *BaseShellListener) ExitEveryRule(ctx antlr.ParserRuleContext)
ExitEveryRule is called when any rule is exited.
func (*BaseShellListener) ExitLine ¶
func (s *BaseShellListener) ExitLine(ctx *LineContext)
ExitLine is called when production line is exited.
func (*BaseShellListener) ExitParameter ¶
func (s *BaseShellListener) ExitParameter(ctx *ParameterContext)
ExitParameter is called when production parameter is exited.
func (*BaseShellListener) ExitRawString ¶
func (s *BaseShellListener) ExitRawString(ctx *RawStringContext)
ExitRawString is called when production rawString is exited.
func (*BaseShellListener) VisitErrorNode ¶
func (s *BaseShellListener) VisitErrorNode(node antlr.ErrorNode)
VisitErrorNode is called when an error node is visited.
func (*BaseShellListener) VisitTerminal ¶
func (s *BaseShellListener) VisitTerminal(node antlr.TerminalNode)
VisitTerminal is called when a terminal node is visited.
type CharacterContext ¶
type CharacterContext struct {
*antlr.BaseParserRuleContext
// contains filtered or unexported fields
}
func NewCharacterContext ¶
func NewCharacterContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *CharacterContext
func NewEmptyCharacterContext ¶
func NewEmptyCharacterContext() *CharacterContext
func (*CharacterContext) AllESCAPE_CHARACTER ¶
func (s *CharacterContext) AllESCAPE_CHARACTER() []antlr.TerminalNode
func (*CharacterContext) ESCAPE_CHARACTER ¶
func (s *CharacterContext) ESCAPE_CHARACTER(i int) antlr.TerminalNode
func (*CharacterContext) EnterRule ¶
func (s *CharacterContext) EnterRule(listener antlr.ParseTreeListener)
func (*CharacterContext) ExitRule ¶
func (s *CharacterContext) ExitRule(listener antlr.ParseTreeListener)
func (*CharacterContext) GetParser ¶
func (s *CharacterContext) GetParser() antlr.Parser
func (*CharacterContext) GetRuleContext ¶
func (s *CharacterContext) GetRuleContext() antlr.RuleContext
func (*CharacterContext) IsCharacterContext ¶
func (*CharacterContext) IsCharacterContext()
func (*CharacterContext) NORMAL_CHARACTER ¶
func (s *CharacterContext) NORMAL_CHARACTER() antlr.TerminalNode
func (*CharacterContext) SPACE ¶
func (s *CharacterContext) SPACE() antlr.TerminalNode
func (*CharacterContext) ToStringTree ¶
func (s *CharacterContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string
type CommandContext ¶
type CommandContext struct {
*antlr.BaseParserRuleContext
// contains filtered or unexported fields
}
func NewCommandContext ¶
func NewCommandContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *CommandContext
func NewEmptyCommandContext ¶
func NewEmptyCommandContext() *CommandContext
func (*CommandContext) CommandString ¶
func (s *CommandContext) CommandString() ICommandStringContext
func (*CommandContext) EnterRule ¶
func (s *CommandContext) EnterRule(listener antlr.ParseTreeListener)
func (*CommandContext) ExitRule ¶
func (s *CommandContext) ExitRule(listener antlr.ParseTreeListener)
func (*CommandContext) GetParser ¶
func (s *CommandContext) GetParser() antlr.Parser
func (*CommandContext) GetRuleContext ¶
func (s *CommandContext) GetRuleContext() antlr.RuleContext
func (*CommandContext) IsCommandContext ¶
func (*CommandContext) IsCommandContext()
func (*CommandContext) ToStringTree ¶
func (s *CommandContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string
type CommandStringContext ¶
type CommandStringContext struct {
*antlr.BaseParserRuleContext
// contains filtered or unexported fields
}
func NewCommandStringContext ¶
func NewCommandStringContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *CommandStringContext
func NewEmptyCommandStringContext ¶
func NewEmptyCommandStringContext() *CommandStringContext
func (*CommandStringContext) EnterRule ¶
func (s *CommandStringContext) EnterRule(listener antlr.ParseTreeListener)
func (*CommandStringContext) ExitRule ¶
func (s *CommandStringContext) ExitRule(listener antlr.ParseTreeListener)
func (*CommandStringContext) GetParser ¶
func (s *CommandStringContext) GetParser() antlr.Parser
func (*CommandStringContext) GetRuleContext ¶
func (s *CommandStringContext) GetRuleContext() antlr.RuleContext
func (*CommandStringContext) IsCommandStringContext ¶
func (*CommandStringContext) IsCommandStringContext()
func (*CommandStringContext) RawString ¶
func (s *CommandStringContext) RawString() IRawStringContext
func (*CommandStringContext) ToStringTree ¶
func (s *CommandStringContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string
type ICharacterContext ¶
type ICharacterContext interface {
antlr.ParserRuleContext
// GetParser returns the parser.
GetParser() antlr.Parser
// IsCharacterContext differentiates from other interfaces.
IsCharacterContext()
}
ICharacterContext is an interface to support dynamic dispatch.
type ICommandContext ¶
type ICommandContext interface {
antlr.ParserRuleContext
// GetParser returns the parser.
GetParser() antlr.Parser
// IsCommandContext differentiates from other interfaces.
IsCommandContext()
}
ICommandContext is an interface to support dynamic dispatch.
type ICommandStringContext ¶
type ICommandStringContext interface {
antlr.ParserRuleContext
// GetParser returns the parser.
GetParser() antlr.Parser
// IsCommandStringContext differentiates from other interfaces.
IsCommandStringContext()
}
ICommandStringContext is an interface to support dynamic dispatch.
type ILineContext ¶
type ILineContext interface {
antlr.ParserRuleContext
// GetParser returns the parser.
GetParser() antlr.Parser
// IsLineContext differentiates from other interfaces.
IsLineContext()
}
ILineContext is an interface to support dynamic dispatch.
type IParameterContext ¶
type IParameterContext interface {
antlr.ParserRuleContext
// GetParser returns the parser.
GetParser() antlr.Parser
// IsParameterContext differentiates from other interfaces.
IsParameterContext()
}
IParameterContext is an interface to support dynamic dispatch.
type IRawStringContext ¶
type IRawStringContext interface {
antlr.ParserRuleContext
// GetParser returns the parser.
GetParser() antlr.Parser
// IsRawStringContext differentiates from other interfaces.
IsRawStringContext()
}
IRawStringContext is an interface to support dynamic dispatch.
type LineContext ¶
type LineContext struct {
*antlr.BaseParserRuleContext
// contains filtered or unexported fields
}
func NewEmptyLineContext ¶
func NewEmptyLineContext() *LineContext
func NewLineContext ¶
func NewLineContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *LineContext
func (*LineContext) AllParameter ¶
func (s *LineContext) AllParameter() []IParameterContext
func (*LineContext) AllSPACE ¶
func (s *LineContext) AllSPACE() []antlr.TerminalNode
func (*LineContext) Command ¶
func (s *LineContext) Command() ICommandContext
func (*LineContext) EnterRule ¶
func (s *LineContext) EnterRule(listener antlr.ParseTreeListener)
func (*LineContext) ExitRule ¶
func (s *LineContext) ExitRule(listener antlr.ParseTreeListener)
func (*LineContext) GetParser ¶
func (s *LineContext) GetParser() antlr.Parser
func (*LineContext) GetRuleContext ¶
func (s *LineContext) GetRuleContext() antlr.RuleContext
func (*LineContext) IsLineContext ¶
func (*LineContext) IsLineContext()
func (*LineContext) Parameter ¶
func (s *LineContext) Parameter(i int) IParameterContext
func (*LineContext) SPACE ¶
func (s *LineContext) SPACE(i int) antlr.TerminalNode
func (*LineContext) ToStringTree ¶
func (s *LineContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string
type ParameterContext ¶
type ParameterContext struct {
*antlr.BaseParserRuleContext
// contains filtered or unexported fields
}
func NewEmptyParameterContext ¶
func NewEmptyParameterContext() *ParameterContext
func NewParameterContext ¶
func NewParameterContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ParameterContext
func (*ParameterContext) CommandString ¶
func (s *ParameterContext) CommandString() ICommandStringContext
func (*ParameterContext) EnterRule ¶
func (s *ParameterContext) EnterRule(listener antlr.ParseTreeListener)
func (*ParameterContext) ExitRule ¶
func (s *ParameterContext) ExitRule(listener antlr.ParseTreeListener)
func (*ParameterContext) GetParser ¶
func (s *ParameterContext) GetParser() antlr.Parser
func (*ParameterContext) GetRuleContext ¶
func (s *ParameterContext) GetRuleContext() antlr.RuleContext
func (*ParameterContext) IsParameterContext ¶
func (*ParameterContext) IsParameterContext()
func (*ParameterContext) ToStringTree ¶
func (s *ParameterContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string
type RawStringContext ¶
type RawStringContext struct {
*antlr.BaseParserRuleContext
// contains filtered or unexported fields
}
func NewEmptyRawStringContext ¶
func NewEmptyRawStringContext() *RawStringContext
func NewRawStringContext ¶
func NewRawStringContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *RawStringContext
func (*RawStringContext) AllCharacter ¶
func (s *RawStringContext) AllCharacter() []ICharacterContext
func (*RawStringContext) Character ¶
func (s *RawStringContext) Character(i int) ICharacterContext
func (*RawStringContext) EnterRule ¶
func (s *RawStringContext) EnterRule(listener antlr.ParseTreeListener)
func (*RawStringContext) ExitRule ¶
func (s *RawStringContext) ExitRule(listener antlr.ParseTreeListener)
func (*RawStringContext) GetParser ¶
func (s *RawStringContext) GetParser() antlr.Parser
func (*RawStringContext) GetRuleContext ¶
func (s *RawStringContext) GetRuleContext() antlr.RuleContext
func (*RawStringContext) IsRawStringContext ¶
func (*RawStringContext) IsRawStringContext()
func (*RawStringContext) ToStringTree ¶
func (s *RawStringContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string
type ShellLexer ¶
func NewShellLexer ¶
func NewShellLexer(input antlr.CharStream) *ShellLexer
type ShellListener ¶
type ShellListener interface {
antlr.ParseTreeListener
// EnterLine is called when entering the line production.
EnterLine(c *LineContext)
// EnterCommand is called when entering the command production.
EnterCommand(c *CommandContext)
// EnterParameter is called when entering the parameter production.
EnterParameter(c *ParameterContext)
// EnterCommandString is called when entering the commandString production.
EnterCommandString(c *CommandStringContext)
// EnterRawString is called when entering the rawString production.
EnterRawString(c *RawStringContext)
// EnterCharacter is called when entering the character production.
EnterCharacter(c *CharacterContext)
// ExitLine is called when exiting the line production.
ExitLine(c *LineContext)
// ExitCommand is called when exiting the command production.
ExitCommand(c *CommandContext)
// ExitParameter is called when exiting the parameter production.
ExitParameter(c *ParameterContext)
// ExitCommandString is called when exiting the commandString production.
ExitCommandString(c *CommandStringContext)
// ExitRawString is called when exiting the rawString production.
ExitRawString(c *RawStringContext)
// ExitCharacter is called when exiting the character production.
ExitCharacter(c *CharacterContext)
}
ShellListener is a complete listener for a parse tree produced by ShellParser.
type ShellParser ¶
type ShellParser struct {
*antlr.BaseParser
}
func NewShellParser ¶
func NewShellParser(input antlr.TokenStream) *ShellParser
func (*ShellParser) Character ¶
func (p *ShellParser) Character() (localctx ICharacterContext)
func (*ShellParser) Command ¶
func (p *ShellParser) Command() (localctx ICommandContext)
func (*ShellParser) CommandString ¶
func (p *ShellParser) CommandString() (localctx ICommandStringContext)
func (*ShellParser) Line ¶
func (p *ShellParser) Line() (localctx ILineContext)
func (*ShellParser) Parameter ¶
func (p *ShellParser) Parameter() (localctx IParameterContext)
func (*ShellParser) RawString ¶
func (p *ShellParser) RawString() (localctx IRawStringContext)