Documentation ¶
Index ¶
- Constants
- func Render(in string) string
- type ArrContext
- func (s *ArrContext) Accept(visitor antlr.ParseTreeVisitor) interface{}
- func (s *ArrContext) AllComma() []ICommaContext
- func (s *ArrContext) AllValue() []IValueContext
- func (s *ArrContext) Comma(i int) ICommaContext
- func (s *ArrContext) GetLeftBracket() antlr.Token
- func (s *ArrContext) GetParser() antlr.Parser
- func (s *ArrContext) GetRightBracket() antlr.Token
- func (s *ArrContext) GetRuleContext() antlr.RuleContext
- func (*ArrContext) IsArrContext()
- func (s *ArrContext) SetLeftBracket(v antlr.Token)
- func (s *ArrContext) SetRightBracket(v antlr.Token)
- func (s *ArrContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string
- func (s *ArrContext) Value(i int) IValueContext
- type CommaContext
- func (s *CommaContext) Accept(visitor antlr.ParseTreeVisitor) interface{}
- func (s *CommaContext) GetParser() antlr.Parser
- func (s *CommaContext) GetRuleContext() antlr.RuleContext
- func (*CommaContext) IsCommaContext()
- func (s *CommaContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string
- type IArrContext
- type ICommaContext
- type IJsonContext
- type IObjContext
- type IPairContext
- type IValueContext
- type JSONLexer
- type JSONParser
- func (p *JSONParser) Arr() (localctx IArrContext)
- func (p *JSONParser) Comma() (localctx ICommaContext)
- func (p *JSONParser) Json() (localctx IJsonContext)
- func (p *JSONParser) Obj() (localctx IObjContext)
- func (p *JSONParser) Pair() (localctx IPairContext)
- func (p *JSONParser) Value() (localctx IValueContext)
- type JSONVisitor
- type JsonContext
- func (s *JsonContext) Accept(visitor antlr.ParseTreeVisitor) interface{}
- 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) Accept(visitor antlr.ParseTreeVisitor) interface{}
- func (s *ObjContext) AllComma() []ICommaContext
- func (s *ObjContext) AllPair() []IPairContext
- func (s *ObjContext) Comma(i int) ICommaContext
- func (s *ObjContext) GetLeftBrace() antlr.Token
- func (s *ObjContext) GetParser() antlr.Parser
- func (s *ObjContext) GetRightBrace() antlr.Token
- func (s *ObjContext) GetRuleContext() antlr.RuleContext
- func (*ObjContext) IsObjContext()
- func (s *ObjContext) Pair(i int) IPairContext
- func (s *ObjContext) SetLeftBrace(v antlr.Token)
- func (s *ObjContext) SetRightBrace(v antlr.Token)
- func (s *ObjContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string
- type PairContext
- func (s *PairContext) Accept(visitor antlr.ParseTreeVisitor) interface{}
- func (s *PairContext) GetColon() antlr.Token
- func (s *PairContext) GetKey() antlr.Token
- func (s *PairContext) GetParser() antlr.Parser
- func (s *PairContext) GetRuleContext() antlr.RuleContext
- func (*PairContext) IsPairContext()
- func (s *PairContext) STRING() antlr.TerminalNode
- func (s *PairContext) SetColon(v antlr.Token)
- func (s *PairContext) SetKey(v antlr.Token)
- func (s *PairContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string
- func (s *PairContext) Value() IValueContext
- type ValueContext
- func (s *ValueContext) Accept(visitor antlr.ParseTreeVisitor) interface{}
- func (s *ValueContext) Arr() IArrContext
- func (s *ValueContext) BOOL() antlr.TerminalNode
- 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
- type Visitor
- func (v *Visitor) VisitArr(ctx *ArrContext) interface{}
- func (v *Visitor) VisitComma(ctx *CommaContext) interface{}
- func (v *Visitor) VisitJson(ctx *JsonContext) interface{}
- func (v *Visitor) VisitObj(ctx *ObjContext) interface{}
- func (v *Visitor) VisitPair(ctx *PairContext) interface{}
- func (v *Visitor) VisitValue(ctx *ValueContext) interface{}
Constants ¶
const ( JSONLexerT__0 = 1 JSONLexerT__1 = 2 JSONLexerT__2 = 3 JSONLexerT__3 = 4 JSONLexerT__4 = 5 JSONLexerT__5 = 6 JSONLexerT__6 = 7 JSONLexerBOOL = 8 JSONLexerSTRING = 9 JSONLexerNUMBER = 10 JSONLexerWS = 11 )
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 JSONParserBOOL = 8 JSONParserSTRING = 9 JSONParserNUMBER = 10 JSONParserWS = 11 )
JSONParser tokens.
const ( JSONParserRULE_json = 0 JSONParserRULE_obj = 1 JSONParserRULE_pair = 2 JSONParserRULE_arr = 3 JSONParserRULE_comma = 4 JSONParserRULE_value = 5 )
JSONParser rules.
Variables ¶
This section is empty.
Functions ¶
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) Accept ¶
func (s *ArrContext) Accept(visitor antlr.ParseTreeVisitor) interface{}
func (*ArrContext) AllComma ¶
func (s *ArrContext) AllComma() []ICommaContext
func (*ArrContext) AllValue ¶
func (s *ArrContext) AllValue() []IValueContext
func (*ArrContext) Comma ¶
func (s *ArrContext) Comma(i int) ICommaContext
func (*ArrContext) GetLeftBracket ¶
func (s *ArrContext) GetLeftBracket() antlr.Token
func (*ArrContext) GetParser ¶
func (s *ArrContext) GetParser() antlr.Parser
func (*ArrContext) GetRightBracket ¶
func (s *ArrContext) GetRightBracket() antlr.Token
func (*ArrContext) GetRuleContext ¶
func (s *ArrContext) GetRuleContext() antlr.RuleContext
func (*ArrContext) IsArrContext ¶
func (*ArrContext) IsArrContext()
func (*ArrContext) SetLeftBracket ¶
func (s *ArrContext) SetLeftBracket(v antlr.Token)
func (*ArrContext) SetRightBracket ¶
func (s *ArrContext) SetRightBracket(v antlr.Token)
func (*ArrContext) ToStringTree ¶
func (s *ArrContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string
func (*ArrContext) Value ¶
func (s *ArrContext) Value(i int) IValueContext
type CommaContext ¶
type CommaContext struct { *antlr.BaseParserRuleContext // contains filtered or unexported fields }
func NewCommaContext ¶
func NewCommaContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *CommaContext
func NewEmptyCommaContext ¶
func NewEmptyCommaContext() *CommaContext
func (*CommaContext) Accept ¶
func (s *CommaContext) Accept(visitor antlr.ParseTreeVisitor) interface{}
func (*CommaContext) GetParser ¶
func (s *CommaContext) GetParser() antlr.Parser
func (*CommaContext) GetRuleContext ¶
func (s *CommaContext) GetRuleContext() antlr.RuleContext
func (*CommaContext) IsCommaContext ¶
func (*CommaContext) IsCommaContext()
func (*CommaContext) ToStringTree ¶
func (s *CommaContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string
type IArrContext ¶
type IArrContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // GetLeftBracket returns the leftBracket token. GetLeftBracket() antlr.Token // GetRightBracket returns the rightBracket token. GetRightBracket() antlr.Token // SetLeftBracket sets the leftBracket token. SetLeftBracket(antlr.Token) // SetRightBracket sets the rightBracket token. SetRightBracket(antlr.Token) // IsArrContext differentiates from other interfaces. IsArrContext() }
IArrContext is an interface to support dynamic dispatch.
type ICommaContext ¶
type ICommaContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // IsCommaContext differentiates from other interfaces. IsCommaContext() }
ICommaContext 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 // GetLeftBrace returns the leftBrace token. GetLeftBrace() antlr.Token // GetRightBrace returns the rightBrace token. GetRightBrace() antlr.Token // SetLeftBrace sets the leftBrace token. SetLeftBrace(antlr.Token) // SetRightBrace sets the rightBrace token. SetRightBrace(antlr.Token) // 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 // GetKey returns the key token. GetKey() antlr.Token // GetColon returns the colon token. GetColon() antlr.Token // SetKey sets the key token. SetKey(antlr.Token) // SetColon sets the colon token. SetColon(antlr.Token) // 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 ¶
func NewJSONLexer ¶
func NewJSONLexer(input antlr.CharStream) *JSONLexer
NewJSONLexer produces a new lexer instance for the optional input antlr.CharStream.
The *JSONLexer 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 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.
The *JSONParser 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 (*JSONParser) Arr ¶
func (p *JSONParser) Arr() (localctx IArrContext)
func (*JSONParser) Comma ¶
func (p *JSONParser) Comma() (localctx ICommaContext)
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 JSONVisitor ¶
type JSONVisitor interface { antlr.ParseTreeVisitor // Visit a parse tree produced by JSONParser#json. VisitJson(ctx *JsonContext) interface{} // Visit a parse tree produced by JSONParser#obj. VisitObj(ctx *ObjContext) interface{} // Visit a parse tree produced by JSONParser#pair. VisitPair(ctx *PairContext) interface{} // Visit a parse tree produced by JSONParser#arr. VisitArr(ctx *ArrContext) interface{} // Visit a parse tree produced by JSONParser#comma. VisitComma(ctx *CommaContext) interface{} // Visit a parse tree produced by JSONParser#value. VisitValue(ctx *ValueContext) interface{} }
A complete Visitor for a parse tree produced by JSONParser.
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) Accept ¶
func (s *JsonContext) Accept(visitor antlr.ParseTreeVisitor) interface{}
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) Accept ¶
func (s *ObjContext) Accept(visitor antlr.ParseTreeVisitor) interface{}
func (*ObjContext) AllComma ¶
func (s *ObjContext) AllComma() []ICommaContext
func (*ObjContext) AllPair ¶
func (s *ObjContext) AllPair() []IPairContext
func (*ObjContext) Comma ¶
func (s *ObjContext) Comma(i int) ICommaContext
func (*ObjContext) GetLeftBrace ¶
func (s *ObjContext) GetLeftBrace() antlr.Token
func (*ObjContext) GetParser ¶
func (s *ObjContext) GetParser() antlr.Parser
func (*ObjContext) GetRightBrace ¶
func (s *ObjContext) GetRightBrace() antlr.Token
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) SetLeftBrace ¶
func (s *ObjContext) SetLeftBrace(v antlr.Token)
func (*ObjContext) SetRightBrace ¶
func (s *ObjContext) SetRightBrace(v antlr.Token)
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) Accept ¶
func (s *PairContext) Accept(visitor antlr.ParseTreeVisitor) interface{}
func (*PairContext) GetColon ¶
func (s *PairContext) GetColon() antlr.Token
func (*PairContext) GetKey ¶
func (s *PairContext) GetKey() antlr.Token
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) SetColon ¶
func (s *PairContext) SetColon(v antlr.Token)
func (*PairContext) SetKey ¶
func (s *PairContext) SetKey(v antlr.Token)
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) Accept ¶
func (s *ValueContext) Accept(visitor antlr.ParseTreeVisitor) interface{}
func (*ValueContext) Arr ¶
func (s *ValueContext) Arr() IArrContext
func (*ValueContext) BOOL ¶
func (s *ValueContext) BOOL() 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) 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
type Visitor ¶
type Visitor struct {
*antlr.BaseParseTreeVisitor
}
func (*Visitor) VisitArr ¶
func (v *Visitor) VisitArr(ctx *ArrContext) interface{}
func (*Visitor) VisitComma ¶
func (v *Visitor) VisitComma(ctx *CommaContext) interface{}
func (*Visitor) VisitJson ¶
func (v *Visitor) VisitJson(ctx *JsonContext) interface{}
func (*Visitor) VisitObj ¶
func (v *Visitor) VisitObj(ctx *ObjContext) interface{}
func (*Visitor) VisitPair ¶
func (v *Visitor) VisitPair(ctx *PairContext) interface{}
func (*Visitor) VisitValue ¶
func (v *Visitor) VisitValue(ctx *ValueContext) interface{}