parser

package
v0.0.0-...-245dd40 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2021 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewjsonLexer

func NewjsonLexer(input antlr.CharStream) *jsonLexer

func NewjsonParser

func NewjsonParser(input antlr.TokenStream) *jsonParser

Types

type ARRAYContext

type ARRAYContext struct {
	*ValueContext
}

func NewARRAYContext

func NewARRAYContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *ARRAYContext

func (*ARRAYContext) Array

func (s *ARRAYContext) Array() IArrayContext

func (*ARRAYContext) EnterRule

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

func (*ARRAYContext) ExitRule

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

func (*ARRAYContext) GetRuleContext

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

type ArrayContext

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

func NewArrayContext

func NewArrayContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ArrayContext

func NewEmptyArrayContext

func NewEmptyArrayContext() *ArrayContext

func (*ArrayContext) AllValue

func (s *ArrayContext) AllValue() []IValueContext

func (*ArrayContext) EnterRule

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

func (*ArrayContext) ExitRule

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

func (*ArrayContext) GetParser

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

func (*ArrayContext) GetRuleContext

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

func (*ArrayContext) IsArrayContext

func (*ArrayContext) IsArrayContext()

func (*ArrayContext) ToStringTree

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

func (*ArrayContext) Value

func (s *ArrayContext) Value(i int) IValueContext

type BasejsonListener

type BasejsonListener struct{}

BasejsonListener is a complete listener for a parse tree produced by jsonParser.

func (*BasejsonListener) EnterARRAY

func (s *BasejsonListener) EnterARRAY(ctx *ARRAYContext)

EnterARRAY is called when production ARRAY is entered.

func (*BasejsonListener) EnterArray

func (s *BasejsonListener) EnterArray(ctx *ArrayContext)

EnterArray is called when production array 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) EnterOBJECT

func (s *BasejsonListener) EnterOBJECT(ctx *OBJECTContext)

EnterOBJECT is called when production OBJECT is entered.

func (*BasejsonListener) EnterObject

func (s *BasejsonListener) EnterObject(ctx *ObjectContext)

EnterObject is called when production object is entered.

func (*BasejsonListener) EnterPair

func (s *BasejsonListener) EnterPair(ctx *PairContext)

EnterPair is called when production pair is entered.

func (*BasejsonListener) EnterSingleValue

func (s *BasejsonListener) EnterSingleValue(ctx *SingleValueContext)

EnterSingleValue is called when production SingleValue is entered.

func (*BasejsonListener) ExitARRAY

func (s *BasejsonListener) ExitARRAY(ctx *ARRAYContext)

ExitARRAY is called when production ARRAY is exited.

func (*BasejsonListener) ExitArray

func (s *BasejsonListener) ExitArray(ctx *ArrayContext)

ExitArray is called when production array 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) ExitOBJECT

func (s *BasejsonListener) ExitOBJECT(ctx *OBJECTContext)

ExitOBJECT is called when production OBJECT is exited.

func (*BasejsonListener) ExitObject

func (s *BasejsonListener) ExitObject(ctx *ObjectContext)

ExitObject is called when production object is exited.

func (*BasejsonListener) ExitPair

func (s *BasejsonListener) ExitPair(ctx *PairContext)

ExitPair is called when production pair is exited.

func (*BasejsonListener) ExitSingleValue

func (s *BasejsonListener) ExitSingleValue(ctx *SingleValueContext)

ExitSingleValue is called when production SingleValue 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 IArrayContext

type IArrayContext interface {
	antlr.ParserRuleContext

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

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

IArrayContext 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 IObjectContext

type IObjectContext interface {
	antlr.ParserRuleContext

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

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

IObjectContext 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 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) Array

func (s *JsonContext) Array() IArrayContext

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

func (s *JsonContext) Object() IObjectContext

func (*JsonContext) ToStringTree

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

type OBJECTContext

type OBJECTContext struct {
	*ValueContext
}

func NewOBJECTContext

func NewOBJECTContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *OBJECTContext

func (*OBJECTContext) EnterRule

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

func (*OBJECTContext) ExitRule

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

func (*OBJECTContext) GetRuleContext

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

func (*OBJECTContext) Object

func (s *OBJECTContext) Object() IObjectContext

type ObjectContext

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

func NewEmptyObjectContext

func NewEmptyObjectContext() *ObjectContext

func NewObjectContext

func NewObjectContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ObjectContext

func (*ObjectContext) AllPair

func (s *ObjectContext) AllPair() []IPairContext

func (*ObjectContext) EnterRule

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

func (*ObjectContext) ExitRule

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

func (*ObjectContext) GetParser

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

func (*ObjectContext) GetRuleContext

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

func (*ObjectContext) IsObjectContext

func (*ObjectContext) IsObjectContext()

func (*ObjectContext) Pair

func (s *ObjectContext) Pair(i int) IPairContext

func (*ObjectContext) ToStringTree

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

type SingleValueContext struct {
	*ValueContext
}

func NewSingleValueContext

func NewSingleValueContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *SingleValueContext

func (*SingleValueContext) EnterRule

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

func (*SingleValueContext) ExitRule

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

func (*SingleValueContext) GetRuleContext

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

func (*SingleValueContext) Number

func (*SingleValueContext) STRING

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

func (s *ValueContext) CopyFrom(ctx *ValueContext)

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