Documentation ¶
Index ¶
- Constants
- func JSONLexerInit()
- func JSONParserInit()
- type ArrContext
- func (s *ArrContext) AllValue() []IValueContext
- func (s *ArrContext) EnterRule(listener antlr.ParseTreeListener)
- func (s *ArrContext) ExitRule(listener antlr.ParseTreeListener)
- func (s *ArrContext) GetParser() antlr.Parser
- func (s *ArrContext) GetRuleContext() antlr.RuleContext
- func (*ArrContext) IsArrContext()
- func (s *ArrContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string
- func (s *ArrContext) Value(i int) IValueContext
- type BaseJSONListener
- func (s *BaseJSONListener) EnterArr(ctx *ArrContext)
- func (s *BaseJSONListener) EnterEveryRule(ctx antlr.ParserRuleContext)
- func (s *BaseJSONListener) EnterJson(ctx *JsonContext)
- func (s *BaseJSONListener) EnterObj(ctx *ObjContext)
- func (s *BaseJSONListener) EnterPair(ctx *PairContext)
- func (s *BaseJSONListener) EnterValue(ctx *ValueContext)
- func (s *BaseJSONListener) ExitArr(ctx *ArrContext)
- func (s *BaseJSONListener) ExitEveryRule(ctx antlr.ParserRuleContext)
- func (s *BaseJSONListener) ExitJson(ctx *JsonContext)
- func (s *BaseJSONListener) ExitObj(ctx *ObjContext)
- func (s *BaseJSONListener) ExitPair(ctx *PairContext)
- func (s *BaseJSONListener) ExitValue(ctx *ValueContext)
- func (s *BaseJSONListener) VisitErrorNode(node antlr.ErrorNode)
- func (s *BaseJSONListener) VisitTerminal(node antlr.TerminalNode)
- type IArrContext
- type IJsonContext
- type IObjContext
- type IPairContext
- type IValueContext
- type JSONLexer
- type JSONListener
- type JSONParser
- type JsonContext
- func (s *JsonContext) EOF() antlr.TerminalNode
- func (s *JsonContext) EnterRule(listener antlr.ParseTreeListener)
- func (s *JsonContext) ExitRule(listener antlr.ParseTreeListener)
- func (s *JsonContext) GetParser() antlr.Parser
- func (s *JsonContext) GetRuleContext() antlr.RuleContext
- func (*JsonContext) IsJsonContext()
- func (s *JsonContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string
- func (s *JsonContext) Value() IValueContext
- type ObjContext
- func (s *ObjContext) AllPair() []IPairContext
- func (s *ObjContext) EnterRule(listener antlr.ParseTreeListener)
- func (s *ObjContext) ExitRule(listener antlr.ParseTreeListener)
- func (s *ObjContext) GetParser() antlr.Parser
- func (s *ObjContext) GetRuleContext() antlr.RuleContext
- func (*ObjContext) IsObjContext()
- func (s *ObjContext) Pair(i int) IPairContext
- func (s *ObjContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string
- type PairContext
- func (s *PairContext) EnterRule(listener antlr.ParseTreeListener)
- func (s *PairContext) ExitRule(listener antlr.ParseTreeListener)
- func (s *PairContext) GetParser() antlr.Parser
- func (s *PairContext) GetRuleContext() antlr.RuleContext
- func (*PairContext) IsPairContext()
- func (s *PairContext) STRING() antlr.TerminalNode
- func (s *PairContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string
- func (s *PairContext) Value() IValueContext
- type ValueContext
- func (s *ValueContext) Arr() IArrContext
- func (s *ValueContext) EnterRule(listener antlr.ParseTreeListener)
- func (s *ValueContext) ExitRule(listener antlr.ParseTreeListener)
- func (s *ValueContext) GetParser() antlr.Parser
- func (s *ValueContext) GetRuleContext() antlr.RuleContext
- func (*ValueContext) IsValueContext()
- func (s *ValueContext) NUMBER() antlr.TerminalNode
- func (s *ValueContext) Obj() IObjContext
- func (s *ValueContext) STRING() antlr.TerminalNode
- func (s *ValueContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string
Constants ¶
const ( JSONLexerT__0 = 1 JSONLexerT__1 = 2 JSONLexerT__2 = 3 JSONLexerT__3 = 4 JSONLexerT__4 = 5 JSONLexerT__5 = 6 JSONLexerT__6 = 7 JSONLexerT__7 = 8 JSONLexerT__8 = 9 JSONLexerSTRING = 10 JSONLexerNUMBER = 11 JSONLexerWS = 12 )
JSONLexer tokens.
const ( JSONParserEOF = antlr.TokenEOF JSONParserT__0 = 1 JSONParserT__1 = 2 JSONParserT__2 = 3 JSONParserT__3 = 4 JSONParserT__4 = 5 JSONParserT__5 = 6 JSONParserT__6 = 7 JSONParserT__7 = 8 JSONParserT__8 = 9 JSONParserSTRING = 10 JSONParserNUMBER = 11 JSONParserWS = 12 )
JSONParser tokens.
const ( JSONParserRULE_json = 0 JSONParserRULE_obj = 1 JSONParserRULE_pair = 2 JSONParserRULE_arr = 3 JSONParserRULE_value = 4 )
JSONParser rules.
Variables ¶
This section is empty.
Functions ¶
func JSONLexerInit ¶
func JSONLexerInit()
JSONLexerInit initializes any static state used to implement JSONLexer. By default the static state used to implement the lexer is lazily initialized during the first call to NewJSONLexer(). You can call this function if you wish to initialize the static state ahead of time.
func JSONParserInit ¶
func JSONParserInit()
JSONParserInit initializes any static state used to implement JSONParser. By default the static state used to implement the parser is lazily initialized during the first call to NewJSONParser(). You can call this function if you wish to initialize the static state ahead of time.
Types ¶
type ArrContext ¶
type ArrContext struct { *antlr.BaseParserRuleContext // contains filtered or unexported fields }
func NewArrContext ¶
func NewArrContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ArrContext
func NewEmptyArrContext ¶
func NewEmptyArrContext() *ArrContext
func (*ArrContext) AllValue ¶
func (s *ArrContext) AllValue() []IValueContext
func (*ArrContext) EnterRule ¶
func (s *ArrContext) EnterRule(listener antlr.ParseTreeListener)
func (*ArrContext) ExitRule ¶
func (s *ArrContext) ExitRule(listener antlr.ParseTreeListener)
func (*ArrContext) GetParser ¶
func (s *ArrContext) GetParser() antlr.Parser
func (*ArrContext) GetRuleContext ¶
func (s *ArrContext) GetRuleContext() antlr.RuleContext
func (*ArrContext) IsArrContext ¶
func (*ArrContext) IsArrContext()
func (*ArrContext) ToStringTree ¶
func (s *ArrContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string
func (*ArrContext) Value ¶
func (s *ArrContext) Value(i int) IValueContext
type BaseJSONListener ¶
type BaseJSONListener struct{}
BaseJSONListener is a complete listener for a parse tree produced by JSONParser.
func (*BaseJSONListener) EnterArr ¶
func (s *BaseJSONListener) EnterArr(ctx *ArrContext)
EnterArr is called when production arr is entered.
func (*BaseJSONListener) EnterEveryRule ¶
func (s *BaseJSONListener) EnterEveryRule(ctx antlr.ParserRuleContext)
EnterEveryRule is called when any rule is entered.
func (*BaseJSONListener) EnterJson ¶
func (s *BaseJSONListener) EnterJson(ctx *JsonContext)
EnterJson is called when production json is entered.
func (*BaseJSONListener) EnterObj ¶
func (s *BaseJSONListener) EnterObj(ctx *ObjContext)
EnterObj is called when production obj is entered.
func (*BaseJSONListener) EnterPair ¶
func (s *BaseJSONListener) EnterPair(ctx *PairContext)
EnterPair is called when production pair is entered.
func (*BaseJSONListener) EnterValue ¶
func (s *BaseJSONListener) EnterValue(ctx *ValueContext)
EnterValue is called when production value is entered.
func (*BaseJSONListener) ExitArr ¶
func (s *BaseJSONListener) ExitArr(ctx *ArrContext)
ExitArr is called when production arr is exited.
func (*BaseJSONListener) ExitEveryRule ¶
func (s *BaseJSONListener) ExitEveryRule(ctx antlr.ParserRuleContext)
ExitEveryRule is called when any rule is exited.
func (*BaseJSONListener) ExitJson ¶
func (s *BaseJSONListener) ExitJson(ctx *JsonContext)
ExitJson is called when production json is exited.
func (*BaseJSONListener) ExitObj ¶
func (s *BaseJSONListener) ExitObj(ctx *ObjContext)
ExitObj is called when production obj is exited.
func (*BaseJSONListener) ExitPair ¶
func (s *BaseJSONListener) ExitPair(ctx *PairContext)
ExitPair is called when production pair is exited.
func (*BaseJSONListener) ExitValue ¶
func (s *BaseJSONListener) ExitValue(ctx *ValueContext)
ExitValue is called when production value is exited.
func (*BaseJSONListener) VisitErrorNode ¶
func (s *BaseJSONListener) VisitErrorNode(node antlr.ErrorNode)
VisitErrorNode is called when an error node is visited.
func (*BaseJSONListener) VisitTerminal ¶
func (s *BaseJSONListener) VisitTerminal(node antlr.TerminalNode)
VisitTerminal is called when a terminal node is visited.
type IArrContext ¶
type IArrContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // IsArrContext differentiates from other interfaces. IsArrContext() }
IArrContext is an interface to support dynamic dispatch.
type IJsonContext ¶
type IJsonContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // IsJsonContext differentiates from other interfaces. IsJsonContext() }
IJsonContext is an interface to support dynamic dispatch.
type IObjContext ¶
type IObjContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // IsObjContext differentiates from other interfaces. IsObjContext() }
IObjContext is an interface to support dynamic dispatch.
type IPairContext ¶
type IPairContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // IsPairContext differentiates from other interfaces. IsPairContext() }
IPairContext 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 JSONLexer ¶
type JSONLexer struct { *antlr.BaseLexer // contains filtered or unexported fields }
func NewJSONLexer ¶
func NewJSONLexer(input antlr.CharStream) *JSONLexer
NewJSONLexer produces a new lexer instance for the optional input antlr.CharStream.
type JSONListener ¶
type JSONListener interface { antlr.ParseTreeListener // EnterJson is called when entering the json production. EnterJson(c *JsonContext) // EnterObj is called when entering the obj production. EnterObj(c *ObjContext) // EnterPair is called when entering the pair production. EnterPair(c *PairContext) // EnterArr is called when entering the arr production. EnterArr(c *ArrContext) // EnterValue is called when entering the value production. EnterValue(c *ValueContext) // ExitJson is called when exiting the json production. ExitJson(c *JsonContext) // ExitObj is called when exiting the obj production. ExitObj(c *ObjContext) // ExitPair is called when exiting the pair production. ExitPair(c *PairContext) // ExitArr is called when exiting the arr production. ExitArr(c *ArrContext) // ExitValue is called when exiting the value production. ExitValue(c *ValueContext) }
JSONListener is a complete listener for a parse tree produced by JSONParser.
type JSONParser ¶
type JSONParser struct {
*antlr.BaseParser
}
func NewJSONParser ¶
func NewJSONParser(input antlr.TokenStream) *JSONParser
NewJSONParser produces a new parser instance for the optional input antlr.TokenStream.
func (*JSONParser) Arr ¶
func (p *JSONParser) Arr() (localctx IArrContext)
func (*JSONParser) Json ¶
func (p *JSONParser) Json() (localctx IJsonContext)
func (*JSONParser) Obj ¶
func (p *JSONParser) Obj() (localctx IObjContext)
func (*JSONParser) Pair ¶
func (p *JSONParser) Pair() (localctx IPairContext)
func (*JSONParser) Value ¶
func (p *JSONParser) Value() (localctx IValueContext)
type JsonContext ¶
type JsonContext struct { *antlr.BaseParserRuleContext // contains filtered or unexported fields }
func NewEmptyJsonContext ¶
func NewEmptyJsonContext() *JsonContext
func NewJsonContext ¶
func NewJsonContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *JsonContext
func (*JsonContext) EOF ¶
func (s *JsonContext) EOF() antlr.TerminalNode
func (*JsonContext) EnterRule ¶
func (s *JsonContext) EnterRule(listener antlr.ParseTreeListener)
func (*JsonContext) ExitRule ¶
func (s *JsonContext) ExitRule(listener antlr.ParseTreeListener)
func (*JsonContext) GetParser ¶
func (s *JsonContext) GetParser() antlr.Parser
func (*JsonContext) GetRuleContext ¶
func (s *JsonContext) GetRuleContext() antlr.RuleContext
func (*JsonContext) IsJsonContext ¶
func (*JsonContext) IsJsonContext()
func (*JsonContext) ToStringTree ¶
func (s *JsonContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string
func (*JsonContext) Value ¶
func (s *JsonContext) Value() IValueContext
type ObjContext ¶
type ObjContext struct { *antlr.BaseParserRuleContext // contains filtered or unexported fields }
func NewEmptyObjContext ¶
func NewEmptyObjContext() *ObjContext
func NewObjContext ¶
func NewObjContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ObjContext
func (*ObjContext) AllPair ¶
func (s *ObjContext) AllPair() []IPairContext
func (*ObjContext) EnterRule ¶
func (s *ObjContext) EnterRule(listener antlr.ParseTreeListener)
func (*ObjContext) ExitRule ¶
func (s *ObjContext) ExitRule(listener antlr.ParseTreeListener)
func (*ObjContext) GetParser ¶
func (s *ObjContext) GetParser() antlr.Parser
func (*ObjContext) GetRuleContext ¶
func (s *ObjContext) GetRuleContext() antlr.RuleContext
func (*ObjContext) IsObjContext ¶
func (*ObjContext) IsObjContext()
func (*ObjContext) Pair ¶
func (s *ObjContext) Pair(i int) IPairContext
func (*ObjContext) ToStringTree ¶
func (s *ObjContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string
type PairContext ¶
type PairContext struct { *antlr.BaseParserRuleContext // contains filtered or unexported fields }
func NewEmptyPairContext ¶
func NewEmptyPairContext() *PairContext
func NewPairContext ¶
func NewPairContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *PairContext
func (*PairContext) EnterRule ¶
func (s *PairContext) EnterRule(listener antlr.ParseTreeListener)
func (*PairContext) ExitRule ¶
func (s *PairContext) ExitRule(listener antlr.ParseTreeListener)
func (*PairContext) GetParser ¶
func (s *PairContext) GetParser() antlr.Parser
func (*PairContext) GetRuleContext ¶
func (s *PairContext) GetRuleContext() antlr.RuleContext
func (*PairContext) IsPairContext ¶
func (*PairContext) IsPairContext()
func (*PairContext) STRING ¶
func (s *PairContext) STRING() antlr.TerminalNode
func (*PairContext) ToStringTree ¶
func (s *PairContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string
func (*PairContext) Value ¶
func (s *PairContext) Value() 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) Arr ¶
func (s *ValueContext) Arr() IArrContext
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) NUMBER ¶
func (s *ValueContext) NUMBER() antlr.TerminalNode
func (*ValueContext) Obj ¶
func (s *ValueContext) Obj() IObjContext
func (*ValueContext) STRING ¶
func (s *ValueContext) STRING() antlr.TerminalNode
func (*ValueContext) ToStringTree ¶
func (s *ValueContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string