Documentation ¶
Index ¶
- Constants
- func Render(in string) string
- type IValueContext
- type IYamlContext
- type ValueContext
- func (s *ValueContext) Accept(visitor antlr.ParseTreeVisitor) interface{}
- func (s *ValueContext) BAR() antlr.TerminalNode
- func (s *ValueContext) BOOL() antlr.TerminalNode
- func (s *ValueContext) BRACES() antlr.TerminalNode
- func (s *ValueContext) BRACKETS() antlr.TerminalNode
- func (s *ValueContext) COLON() antlr.TerminalNode
- func (s *ValueContext) COMMA() antlr.TerminalNode
- func (s *ValueContext) COMMENT() antlr.TerminalNode
- func (s *ValueContext) GetParser() antlr.Parser
- func (s *ValueContext) GetRuleContext() antlr.RuleContext
- func (*ValueContext) IsValueContext()
- func (s *ValueContext) KEY() antlr.TerminalNode
- func (s *ValueContext) LINE_VALUE() antlr.TerminalNode
- func (s *ValueContext) NUMBER() antlr.TerminalNode
- func (s *ValueContext) OTHER() antlr.TerminalNode
- func (s *ValueContext) STRING() antlr.TerminalNode
- func (s *ValueContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string
- type Visitor
- type YamlContext
- func (s *YamlContext) Accept(visitor antlr.ParseTreeVisitor) interface{}
- func (s *YamlContext) AllValue() []IValueContext
- func (s *YamlContext) GetParser() antlr.Parser
- func (s *YamlContext) GetRuleContext() antlr.RuleContext
- func (*YamlContext) IsYamlContext()
- func (s *YamlContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string
- func (s *YamlContext) Value(i int) IValueContext
- type YamlLexer
- type YamlParser
- type YamlVisitor
Constants ¶
const ( YamlLexerBAR = 1 YamlLexerCOMMA = 2 YamlLexerCOLON = 3 YamlLexerBRACES = 4 YamlLexerBRACKETS = 5 YamlLexerBOOL = 6 YamlLexerSTRING = 7 YamlLexerNUMBER = 8 YamlLexerCOMMENT = 9 YamlLexerLINE_VALUE = 10 YamlLexerKEY = 11 YamlLexerWS = 12 YamlLexerOTHER = 13 )
YamlLexer tokens.
const ( YamlParserEOF = antlr.TokenEOF YamlParserBAR = 1 YamlParserCOMMA = 2 YamlParserCOLON = 3 YamlParserBRACES = 4 YamlParserBRACKETS = 5 YamlParserBOOL = 6 YamlParserSTRING = 7 YamlParserNUMBER = 8 YamlParserCOMMENT = 9 YamlParserLINE_VALUE = 10 YamlParserKEY = 11 YamlParserWS = 12 YamlParserOTHER = 13 )
YamlParser tokens.
const ( YamlParserRULE_yaml = 0 YamlParserRULE_value = 1 )
YamlParser rules.
Variables ¶
This section is empty.
Functions ¶
Types ¶
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 IYamlContext ¶
type IYamlContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // IsYamlContext differentiates from other interfaces. IsYamlContext() }
IYamlContext is an interface to support dynamic dispatch.
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) Accept ¶
func (s *ValueContext) Accept(visitor antlr.ParseTreeVisitor) interface{}
func (*ValueContext) BAR ¶
func (s *ValueContext) BAR() antlr.TerminalNode
func (*ValueContext) BOOL ¶
func (s *ValueContext) BOOL() antlr.TerminalNode
func (*ValueContext) BRACES ¶
func (s *ValueContext) BRACES() antlr.TerminalNode
func (*ValueContext) BRACKETS ¶
func (s *ValueContext) BRACKETS() antlr.TerminalNode
func (*ValueContext) COLON ¶
func (s *ValueContext) COLON() antlr.TerminalNode
func (*ValueContext) COMMA ¶
func (s *ValueContext) COMMA() antlr.TerminalNode
func (*ValueContext) COMMENT ¶
func (s *ValueContext) COMMENT() antlr.TerminalNode
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) KEY ¶
func (s *ValueContext) KEY() antlr.TerminalNode
func (*ValueContext) LINE_VALUE ¶
func (s *ValueContext) LINE_VALUE() antlr.TerminalNode
func (*ValueContext) NUMBER ¶
func (s *ValueContext) NUMBER() antlr.TerminalNode
func (*ValueContext) OTHER ¶
func (s *ValueContext) OTHER() antlr.TerminalNode
func (*ValueContext) STRING ¶
func (s *ValueContext) STRING() antlr.TerminalNode
func (*ValueContext) ToStringTree ¶
func (s *ValueContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string
type Visitor ¶
type Visitor struct {
*antlr.BaseParseTreeVisitor
}
func (*Visitor) VisitValue ¶
func (v *Visitor) VisitValue(ctx *ValueContext) interface{}
func (*Visitor) VisitYaml ¶
func (v *Visitor) VisitYaml(ctx *YamlContext) interface{}
type YamlContext ¶
type YamlContext struct { *antlr.BaseParserRuleContext // contains filtered or unexported fields }
func NewEmptyYamlContext ¶
func NewEmptyYamlContext() *YamlContext
func NewYamlContext ¶
func NewYamlContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *YamlContext
func (*YamlContext) Accept ¶
func (s *YamlContext) Accept(visitor antlr.ParseTreeVisitor) interface{}
func (*YamlContext) AllValue ¶
func (s *YamlContext) AllValue() []IValueContext
func (*YamlContext) GetParser ¶
func (s *YamlContext) GetParser() antlr.Parser
func (*YamlContext) GetRuleContext ¶
func (s *YamlContext) GetRuleContext() antlr.RuleContext
func (*YamlContext) IsYamlContext ¶
func (*YamlContext) IsYamlContext()
func (*YamlContext) ToStringTree ¶
func (s *YamlContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string
func (*YamlContext) Value ¶
func (s *YamlContext) Value(i int) IValueContext
type YamlLexer ¶
func NewYamlLexer ¶
func NewYamlLexer(input antlr.CharStream) *YamlLexer
NewYamlLexer produces a new lexer instance for the optional input antlr.CharStream.
The *YamlLexer instance produced may be reused by calling the SetInputStream method. The initial lexer configuration is expensive to construct, and the object is not thread-safe; however, if used within a Golang sync.Pool, the construction cost amortizes well and the objects can be used in a thread-safe manner.
type YamlParser ¶
type YamlParser struct {
*antlr.BaseParser
}
func NewYamlParser ¶
func NewYamlParser(input antlr.TokenStream) *YamlParser
NewYamlParser produces a new parser instance for the optional input antlr.TokenStream.
The *YamlParser instance produced may be reused by calling the SetInputStream method. The initial parser configuration is expensive to construct, and the object is not thread-safe; however, if used within a Golang sync.Pool, the construction cost amortizes well and the objects can be used in a thread-safe manner.
func (*YamlParser) Value ¶
func (p *YamlParser) Value() (localctx IValueContext)
func (*YamlParser) Yaml ¶
func (p *YamlParser) Yaml() (localctx IYamlContext)
type YamlVisitor ¶
type YamlVisitor interface { antlr.ParseTreeVisitor // Visit a parse tree produced by YamlParser#yaml. VisitYaml(ctx *YamlContext) interface{} // Visit a parse tree produced by YamlParser#value. VisitValue(ctx *ValueContext) interface{} }
A complete Visitor for a parse tree produced by YamlParser.