parser

package
v0.0.0-...-b06f640 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2020 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Ck3LexerL_CURLY = 1
	Ck3LexerR_CURLY = 2
	Ck3LexerASSIGN  = 3
	Ck3LexerCOLON   = 4
	Ck3LexerDOT     = 5
	Ck3LexerBAR     = 6
	Ck3LexerSTR     = 7
	Ck3LexerPARAM   = 8
	Ck3LexerSCOPE   = 9
	Ck3LexerNUMBER  = 10
	Ck3LexerIDENT   = 11
	Ck3LexerCOMMENT = 12
	Ck3LexerWS      = 13
)

Ck3Lexer tokens.

View Source
const (
	Ck3ParserEOF     = antlr.TokenEOF
	Ck3ParserL_CURLY = 1
	Ck3ParserR_CURLY = 2
	Ck3ParserASSIGN  = 3
	Ck3ParserCOLON   = 4
	Ck3ParserDOT     = 5
	Ck3ParserBAR     = 6
	Ck3ParserSTR     = 7
	Ck3ParserPARAM   = 8
	Ck3ParserSCOPE   = 9
	Ck3ParserNUMBER  = 10
	Ck3ParserIDENT   = 11
	Ck3ParserCOMMENT = 12
	Ck3ParserWS      = 13
)

Ck3Parser tokens.

View Source
const (
	Ck3ParserRULE_root       = 0
	Ck3ParserRULE_obj        = 1
	Ck3ParserRULE_collection = 2
	Ck3ParserRULE_assignment = 3
	Ck3ParserRULE_val        = 4
	Ck3ParserRULE_primitive  = 5
	Ck3ParserRULE_fullident  = 6
)

Ck3Parser rules.

Variables

This section is empty.

Functions

This section is empty.

Types

type AssignmentContext

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

func NewAssignmentContext

func NewAssignmentContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *AssignmentContext

func NewEmptyAssignmentContext

func NewEmptyAssignmentContext() *AssignmentContext

func (*AssignmentContext) ASSIGN

func (s *AssignmentContext) ASSIGN() antlr.TerminalNode

func (*AssignmentContext) AllWS

func (s *AssignmentContext) AllWS() []antlr.TerminalNode

func (*AssignmentContext) EnterRule

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

func (*AssignmentContext) ExitRule

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

func (*AssignmentContext) Fullident

func (s *AssignmentContext) Fullident() IFullidentContext

func (*AssignmentContext) GetParser

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

func (*AssignmentContext) GetRuleContext

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

func (*AssignmentContext) IsAssignmentContext

func (*AssignmentContext) IsAssignmentContext()

func (*AssignmentContext) ToStringTree

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

func (*AssignmentContext) Val

func (s *AssignmentContext) Val() IValContext

func (*AssignmentContext) WS

type BaseCk3Listener

type BaseCk3Listener struct{}

BaseCk3Listener is a complete listener for a parse tree produced by Ck3Parser.

func (*BaseCk3Listener) EnterAssignment

func (s *BaseCk3Listener) EnterAssignment(ctx *AssignmentContext)

EnterAssignment is called when production assignment is entered.

func (*BaseCk3Listener) EnterCollection

func (s *BaseCk3Listener) EnterCollection(ctx *CollectionContext)

EnterCollection is called when production collection is entered.

func (*BaseCk3Listener) EnterEveryRule

func (s *BaseCk3Listener) EnterEveryRule(ctx antlr.ParserRuleContext)

EnterEveryRule is called when any rule is entered.

func (*BaseCk3Listener) EnterFullident

func (s *BaseCk3Listener) EnterFullident(ctx *FullidentContext)

EnterFullident is called when production fullident is entered.

func (*BaseCk3Listener) EnterObj

func (s *BaseCk3Listener) EnterObj(ctx *ObjContext)

EnterObj is called when production obj is entered.

func (*BaseCk3Listener) EnterPrimitive

func (s *BaseCk3Listener) EnterPrimitive(ctx *PrimitiveContext)

EnterPrimitive is called when production primitive is entered.

func (*BaseCk3Listener) EnterRoot

func (s *BaseCk3Listener) EnterRoot(ctx *RootContext)

EnterRoot is called when production root is entered.

func (*BaseCk3Listener) EnterVal

func (s *BaseCk3Listener) EnterVal(ctx *ValContext)

EnterVal is called when production val is entered.

func (*BaseCk3Listener) ExitAssignment

func (s *BaseCk3Listener) ExitAssignment(ctx *AssignmentContext)

ExitAssignment is called when production assignment is exited.

func (*BaseCk3Listener) ExitCollection

func (s *BaseCk3Listener) ExitCollection(ctx *CollectionContext)

ExitCollection is called when production collection is exited.

func (*BaseCk3Listener) ExitEveryRule

func (s *BaseCk3Listener) ExitEveryRule(ctx antlr.ParserRuleContext)

ExitEveryRule is called when any rule is exited.

func (*BaseCk3Listener) ExitFullident

func (s *BaseCk3Listener) ExitFullident(ctx *FullidentContext)

ExitFullident is called when production fullident is exited.

func (*BaseCk3Listener) ExitObj

func (s *BaseCk3Listener) ExitObj(ctx *ObjContext)

ExitObj is called when production obj is exited.

func (*BaseCk3Listener) ExitPrimitive

func (s *BaseCk3Listener) ExitPrimitive(ctx *PrimitiveContext)

ExitPrimitive is called when production primitive is exited.

func (*BaseCk3Listener) ExitRoot

func (s *BaseCk3Listener) ExitRoot(ctx *RootContext)

ExitRoot is called when production root is exited.

func (*BaseCk3Listener) ExitVal

func (s *BaseCk3Listener) ExitVal(ctx *ValContext)

ExitVal is called when production val is exited.

func (*BaseCk3Listener) VisitErrorNode

func (s *BaseCk3Listener) VisitErrorNode(node antlr.ErrorNode)

VisitErrorNode is called when an error node is visited.

func (*BaseCk3Listener) VisitTerminal

func (s *BaseCk3Listener) VisitTerminal(node antlr.TerminalNode)

VisitTerminal is called when a terminal node is visited.

type Ck3Lexer

type Ck3Lexer struct {
	*antlr.BaseLexer
	// contains filtered or unexported fields
}

func NewCk3Lexer

func NewCk3Lexer(input antlr.CharStream) *Ck3Lexer

type Ck3Listener

type Ck3Listener interface {
	antlr.ParseTreeListener

	// EnterRoot is called when entering the root production.
	EnterRoot(c *RootContext)

	// EnterObj is called when entering the obj production.
	EnterObj(c *ObjContext)

	// EnterCollection is called when entering the collection production.
	EnterCollection(c *CollectionContext)

	// EnterAssignment is called when entering the assignment production.
	EnterAssignment(c *AssignmentContext)

	// EnterVal is called when entering the val production.
	EnterVal(c *ValContext)

	// EnterPrimitive is called when entering the primitive production.
	EnterPrimitive(c *PrimitiveContext)

	// EnterFullident is called when entering the fullident production.
	EnterFullident(c *FullidentContext)

	// ExitRoot is called when exiting the root production.
	ExitRoot(c *RootContext)

	// ExitObj is called when exiting the obj production.
	ExitObj(c *ObjContext)

	// ExitCollection is called when exiting the collection production.
	ExitCollection(c *CollectionContext)

	// ExitAssignment is called when exiting the assignment production.
	ExitAssignment(c *AssignmentContext)

	// ExitVal is called when exiting the val production.
	ExitVal(c *ValContext)

	// ExitPrimitive is called when exiting the primitive production.
	ExitPrimitive(c *PrimitiveContext)

	// ExitFullident is called when exiting the fullident production.
	ExitFullident(c *FullidentContext)
}

Ck3Listener is a complete listener for a parse tree produced by Ck3Parser.

type Ck3Parser

type Ck3Parser struct {
	*antlr.BaseParser
}

func NewCk3Parser

func NewCk3Parser(input antlr.TokenStream) *Ck3Parser

func (*Ck3Parser) Assignment

func (p *Ck3Parser) Assignment() (localctx IAssignmentContext)

func (*Ck3Parser) Collection

func (p *Ck3Parser) Collection() (localctx ICollectionContext)

func (*Ck3Parser) Fullident

func (p *Ck3Parser) Fullident() (localctx IFullidentContext)

func (*Ck3Parser) Obj

func (p *Ck3Parser) Obj() (localctx IObjContext)

func (*Ck3Parser) Primitive

func (p *Ck3Parser) Primitive() (localctx IPrimitiveContext)

func (*Ck3Parser) Root

func (p *Ck3Parser) Root() (localctx IRootContext)

func (*Ck3Parser) Val

func (p *Ck3Parser) Val() (localctx IValContext)

type CollectionContext

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

func NewCollectionContext

func NewCollectionContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *CollectionContext

func NewEmptyCollectionContext

func NewEmptyCollectionContext() *CollectionContext

func (*CollectionContext) AllPrimitive

func (s *CollectionContext) AllPrimitive() []IPrimitiveContext

func (*CollectionContext) AllWS

func (s *CollectionContext) AllWS() []antlr.TerminalNode

func (*CollectionContext) EnterRule

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

func (*CollectionContext) ExitRule

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

func (*CollectionContext) GetParser

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

func (*CollectionContext) GetRuleContext

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

func (*CollectionContext) IsCollectionContext

func (*CollectionContext) IsCollectionContext()

func (*CollectionContext) L_CURLY

func (s *CollectionContext) L_CURLY() antlr.TerminalNode

func (*CollectionContext) Primitive

func (s *CollectionContext) Primitive(i int) IPrimitiveContext

func (*CollectionContext) R_CURLY

func (s *CollectionContext) R_CURLY() antlr.TerminalNode

func (*CollectionContext) ToStringTree

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

func (*CollectionContext) WS

type FullidentContext

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

func NewEmptyFullidentContext

func NewEmptyFullidentContext() *FullidentContext

func NewFullidentContext

func NewFullidentContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *FullidentContext

func (*FullidentContext) AllDOT

func (s *FullidentContext) AllDOT() []antlr.TerminalNode

func (*FullidentContext) AllIDENT

func (s *FullidentContext) AllIDENT() []antlr.TerminalNode

func (*FullidentContext) BAR

func (*FullidentContext) DOT

func (*FullidentContext) EnterRule

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

func (*FullidentContext) ExitRule

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

func (*FullidentContext) GetParser

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

func (*FullidentContext) GetRuleContext

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

func (*FullidentContext) IDENT

func (s *FullidentContext) IDENT(i int) antlr.TerminalNode

func (*FullidentContext) IsFullidentContext

func (*FullidentContext) IsFullidentContext()

func (*FullidentContext) SCOPE

func (s *FullidentContext) SCOPE() antlr.TerminalNode

func (*FullidentContext) ToStringTree

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

type IAssignmentContext

type IAssignmentContext interface {
	antlr.ParserRuleContext

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

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

IAssignmentContext is an interface to support dynamic dispatch.

type ICollectionContext

type ICollectionContext interface {
	antlr.ParserRuleContext

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

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

ICollectionContext is an interface to support dynamic dispatch.

type IFullidentContext

type IFullidentContext interface {
	antlr.ParserRuleContext

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

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

IFullidentContext 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 IPrimitiveContext

type IPrimitiveContext interface {
	antlr.ParserRuleContext

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

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

IPrimitiveContext is an interface to support dynamic dispatch.

type IRootContext

type IRootContext interface {
	antlr.ParserRuleContext

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

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

IRootContext is an interface to support dynamic dispatch.

type IValContext

type IValContext interface {
	antlr.ParserRuleContext

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

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

IValContext is an interface to support dynamic dispatch.

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

func (s *ObjContext) AllAssignment() []IAssignmentContext

func (*ObjContext) AllWS

func (s *ObjContext) AllWS() []antlr.TerminalNode

func (*ObjContext) Assignment

func (s *ObjContext) Assignment(i int) IAssignmentContext

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

func (s *ObjContext) L_CURLY() antlr.TerminalNode

func (*ObjContext) R_CURLY

func (s *ObjContext) R_CURLY() antlr.TerminalNode

func (*ObjContext) ToStringTree

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

func (*ObjContext) WS

func (s *ObjContext) WS(i int) antlr.TerminalNode

type PrimitiveContext

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

func NewEmptyPrimitiveContext

func NewEmptyPrimitiveContext() *PrimitiveContext

func NewPrimitiveContext

func NewPrimitiveContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *PrimitiveContext

func (*PrimitiveContext) EnterRule

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

func (*PrimitiveContext) ExitRule

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

func (*PrimitiveContext) GetParser

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

func (*PrimitiveContext) GetRuleContext

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

func (*PrimitiveContext) IsPrimitiveContext

func (*PrimitiveContext) IsPrimitiveContext()

func (*PrimitiveContext) NUMBER

func (s *PrimitiveContext) NUMBER() antlr.TerminalNode

func (*PrimitiveContext) STR

func (*PrimitiveContext) ToStringTree

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

type RootContext

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

func NewEmptyRootContext

func NewEmptyRootContext() *RootContext

func NewRootContext

func NewRootContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *RootContext

func (*RootContext) AllAssignment

func (s *RootContext) AllAssignment() []IAssignmentContext

func (*RootContext) AllWS

func (s *RootContext) AllWS() []antlr.TerminalNode

func (*RootContext) Assignment

func (s *RootContext) Assignment(i int) IAssignmentContext

func (*RootContext) EnterRule

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

func (*RootContext) ExitRule

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

func (*RootContext) GetParser

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

func (*RootContext) GetRuleContext

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

func (*RootContext) IsRootContext

func (*RootContext) IsRootContext()

func (*RootContext) ToStringTree

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

func (*RootContext) WS

func (s *RootContext) WS(i int) antlr.TerminalNode

type ValContext

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

func NewEmptyValContext

func NewEmptyValContext() *ValContext

func NewValContext

func NewValContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ValContext

func (*ValContext) EnterRule

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

func (*ValContext) ExitRule

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

func (*ValContext) Fullident

func (s *ValContext) Fullident() IFullidentContext

func (*ValContext) GetParser

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

func (*ValContext) GetRuleContext

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

func (*ValContext) IsValContext

func (*ValContext) IsValContext()

func (*ValContext) Obj

func (s *ValContext) Obj() IObjContext

func (*ValContext) Primitive

func (s *ValContext) Primitive() IPrimitiveContext

func (*ValContext) ToStringTree

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