parser

package
v1.2.0-sp7 Latest Latest
Warning

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

Go to latest
Published: May 8, 2023 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SuricataRuleLexerAny               = 1
	SuricataRuleLexerNegative          = 2
	SuricataRuleLexerDollar            = 3
	SuricataRuleLexerArrow             = 4
	SuricataRuleLexerMul               = 5
	SuricataRuleLexerDiv               = 6
	SuricataRuleLexerMod               = 7
	SuricataRuleLexerAmp               = 8
	SuricataRuleLexerPlus              = 9
	SuricataRuleLexerSub               = 10
	SuricataRuleLexerPower             = 11
	SuricataRuleLexerLt                = 12
	SuricataRuleLexerGt                = 13
	SuricataRuleLexerLtEq              = 14
	SuricataRuleLexerGtEq              = 15
	SuricataRuleLexerColon             = 16
	SuricataRuleLexerDoubleColon       = 17
	SuricataRuleLexerLBracket          = 18
	SuricataRuleLexerRBracket          = 19
	SuricataRuleLexerParamStart        = 20
	SuricataRuleLexerLBrace            = 21
	SuricataRuleLexerRBrace            = 22
	SuricataRuleLexerComma             = 23
	SuricataRuleLexerEq                = 24
	SuricataRuleLexerNotSymbol         = 25
	SuricataRuleLexerDot               = 26
	SuricataRuleLexerLINE_COMMENT      = 27
	SuricataRuleLexerID                = 28
	SuricataRuleLexerNORMALSTRING      = 29
	SuricataRuleLexerINT               = 30
	SuricataRuleLexerHEX               = 31
	SuricataRuleLexerFLOAT             = 32
	SuricataRuleLexerWS                = 33
	SuricataRuleLexerNonSemiColon      = 34
	SuricataRuleLexerSHEBANG           = 35
	SuricataRuleLexerParamQuotedString = 36
	SuricataRuleLexerParamSep          = 37
	SuricataRuleLexerParamValue        = 38
	SuricataRuleLexerParamEnd          = 39
)

SuricataRuleLexer tokens.

View Source
const (
	SuricataRuleParserEOF               = antlr.TokenEOF
	SuricataRuleParserAny               = 1
	SuricataRuleParserNegative          = 2
	SuricataRuleParserDollar            = 3
	SuricataRuleParserArrow             = 4
	SuricataRuleParserMul               = 5
	SuricataRuleParserDiv               = 6
	SuricataRuleParserMod               = 7
	SuricataRuleParserAmp               = 8
	SuricataRuleParserPlus              = 9
	SuricataRuleParserSub               = 10
	SuricataRuleParserPower             = 11
	SuricataRuleParserLt                = 12
	SuricataRuleParserGt                = 13
	SuricataRuleParserLtEq              = 14
	SuricataRuleParserGtEq              = 15
	SuricataRuleParserColon             = 16
	SuricataRuleParserDoubleColon       = 17
	SuricataRuleParserLBracket          = 18
	SuricataRuleParserRBracket          = 19
	SuricataRuleParserParamStart        = 20
	SuricataRuleParserLBrace            = 21
	SuricataRuleParserRBrace            = 22
	SuricataRuleParserComma             = 23
	SuricataRuleParserEq                = 24
	SuricataRuleParserNotSymbol         = 25
	SuricataRuleParserDot               = 26
	SuricataRuleParserLINE_COMMENT      = 27
	SuricataRuleParserID                = 28
	SuricataRuleParserNORMALSTRING      = 29
	SuricataRuleParserINT               = 30
	SuricataRuleParserHEX               = 31
	SuricataRuleParserFLOAT             = 32
	SuricataRuleParserWS                = 33
	SuricataRuleParserNonSemiColon      = 34
	SuricataRuleParserSHEBANG           = 35
	SuricataRuleParserParamQuotedString = 36
	SuricataRuleParserParamSep          = 37
	SuricataRuleParserParamValue        = 38
	SuricataRuleParserParamEnd          = 39
)

SuricataRuleParser tokens.

View Source
const (
	SuricataRuleParserRULE_rules           = 0
	SuricataRuleParserRULE_rule            = 1
	SuricataRuleParserRULE_action          = 2
	SuricataRuleParserRULE_protocol        = 3
	SuricataRuleParserRULE_src_address     = 4
	SuricataRuleParserRULE_dest_address    = 5
	SuricataRuleParserRULE_address         = 6
	SuricataRuleParserRULE_ipv4            = 7
	SuricataRuleParserRULE_ipv4block       = 8
	SuricataRuleParserRULE_ipv4mask        = 9
	SuricataRuleParserRULE_environment_var = 10
	SuricataRuleParserRULE_ipv6            = 11
	SuricataRuleParserRULE_hex_part        = 12
	SuricataRuleParserRULE_h16             = 13
	SuricataRuleParserRULE_src_port        = 14
	SuricataRuleParserRULE_dest_port       = 15
	SuricataRuleParserRULE_port            = 16
	SuricataRuleParserRULE_params          = 17
	SuricataRuleParserRULE_param           = 18
	SuricataRuleParserRULE_string          = 19
)

SuricataRuleParser rules.

View Source
const SuricataRuleLexerPARAM_MODE = 1

SuricataRuleLexerPARAM_MODE is the SuricataRuleLexer mode.

Variables

This section is empty.

Functions

func SuricataRuleLexerInit

func SuricataRuleLexerInit()

SuricataRuleLexerInit initializes any static state used to implement SuricataRuleLexer. By default the static state used to implement the lexer is lazily initialized during the first call to NewSuricataRuleLexer(). You can call this function if you wish to initialize the static state ahead of time.

func SuricataRuleParserInit

func SuricataRuleParserInit()

SuricataRuleParserInit initializes any static state used to implement SuricataRuleParser. By default the static state used to implement the parser is lazily initialized during the first call to NewSuricataRuleParser(). You can call this function if you wish to initialize the static state ahead of time.

Types

type ActionContext

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

func NewActionContext

func NewActionContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ActionContext

func NewEmptyActionContext

func NewEmptyActionContext() *ActionContext

func (*ActionContext) Accept

func (s *ActionContext) Accept(visitor antlr.ParseTreeVisitor) interface{}

func (*ActionContext) GetParser

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

func (*ActionContext) GetRuleContext

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

func (*ActionContext) ID

func (s *ActionContext) ID() antlr.TerminalNode

func (*ActionContext) IsActionContext

func (*ActionContext) IsActionContext()

func (*ActionContext) ToStringTree

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

type AddressContext

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

func NewAddressContext

func NewAddressContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *AddressContext

func NewEmptyAddressContext

func NewEmptyAddressContext() *AddressContext

func (*AddressContext) Accept

func (s *AddressContext) Accept(visitor antlr.ParseTreeVisitor) interface{}

func (*AddressContext) Address

func (s *AddressContext) Address(i int) IAddressContext

func (*AddressContext) AllAddress

func (s *AddressContext) AllAddress() []IAddressContext

func (*AddressContext) AllComma

func (s *AddressContext) AllComma() []antlr.TerminalNode

func (*AddressContext) Any

func (s *AddressContext) Any() antlr.TerminalNode

func (*AddressContext) Comma

func (s *AddressContext) Comma(i int) antlr.TerminalNode

func (*AddressContext) Environment_var

func (s *AddressContext) Environment_var() IEnvironment_varContext

func (*AddressContext) GetParser

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

func (*AddressContext) GetRuleContext

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

func (*AddressContext) Ipv4

func (s *AddressContext) Ipv4() IIpv4Context

func (*AddressContext) Ipv6

func (s *AddressContext) Ipv6() IIpv6Context

func (*AddressContext) IsAddressContext

func (*AddressContext) IsAddressContext()

func (*AddressContext) LBracket

func (s *AddressContext) LBracket() antlr.TerminalNode

func (*AddressContext) Negative

func (s *AddressContext) Negative() antlr.TerminalNode

func (*AddressContext) RBracket

func (s *AddressContext) RBracket() antlr.TerminalNode

func (*AddressContext) ToStringTree

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

type BaseSuricataRuleParserVisitor

type BaseSuricataRuleParserVisitor struct {
	*antlr.BaseParseTreeVisitor
}

func (*BaseSuricataRuleParserVisitor) VisitAction

func (v *BaseSuricataRuleParserVisitor) VisitAction(ctx *ActionContext) interface{}

func (*BaseSuricataRuleParserVisitor) VisitAddress

func (v *BaseSuricataRuleParserVisitor) VisitAddress(ctx *AddressContext) interface{}

func (*BaseSuricataRuleParserVisitor) VisitDest_address

func (v *BaseSuricataRuleParserVisitor) VisitDest_address(ctx *Dest_addressContext) interface{}

func (*BaseSuricataRuleParserVisitor) VisitDest_port

func (v *BaseSuricataRuleParserVisitor) VisitDest_port(ctx *Dest_portContext) interface{}

func (*BaseSuricataRuleParserVisitor) VisitEnvironment_var

func (v *BaseSuricataRuleParserVisitor) VisitEnvironment_var(ctx *Environment_varContext) interface{}

func (*BaseSuricataRuleParserVisitor) VisitH16

func (v *BaseSuricataRuleParserVisitor) VisitH16(ctx *H16Context) interface{}

func (*BaseSuricataRuleParserVisitor) VisitHex_part

func (v *BaseSuricataRuleParserVisitor) VisitHex_part(ctx *Hex_partContext) interface{}

func (*BaseSuricataRuleParserVisitor) VisitIpv4

func (v *BaseSuricataRuleParserVisitor) VisitIpv4(ctx *Ipv4Context) interface{}

func (*BaseSuricataRuleParserVisitor) VisitIpv4block

func (v *BaseSuricataRuleParserVisitor) VisitIpv4block(ctx *Ipv4blockContext) interface{}

func (*BaseSuricataRuleParserVisitor) VisitIpv4mask

func (v *BaseSuricataRuleParserVisitor) VisitIpv4mask(ctx *Ipv4maskContext) interface{}

func (*BaseSuricataRuleParserVisitor) VisitIpv6

func (v *BaseSuricataRuleParserVisitor) VisitIpv6(ctx *Ipv6Context) interface{}

func (*BaseSuricataRuleParserVisitor) VisitParam

func (v *BaseSuricataRuleParserVisitor) VisitParam(ctx *ParamContext) interface{}

func (*BaseSuricataRuleParserVisitor) VisitParams

func (v *BaseSuricataRuleParserVisitor) VisitParams(ctx *ParamsContext) interface{}

func (*BaseSuricataRuleParserVisitor) VisitPort

func (v *BaseSuricataRuleParserVisitor) VisitPort(ctx *PortContext) interface{}

func (*BaseSuricataRuleParserVisitor) VisitProtocol

func (v *BaseSuricataRuleParserVisitor) VisitProtocol(ctx *ProtocolContext) interface{}

func (*BaseSuricataRuleParserVisitor) VisitRule

func (v *BaseSuricataRuleParserVisitor) VisitRule(ctx *RuleContext) interface{}

func (*BaseSuricataRuleParserVisitor) VisitRules

func (v *BaseSuricataRuleParserVisitor) VisitRules(ctx *RulesContext) interface{}

func (*BaseSuricataRuleParserVisitor) VisitSrc_address

func (v *BaseSuricataRuleParserVisitor) VisitSrc_address(ctx *Src_addressContext) interface{}

func (*BaseSuricataRuleParserVisitor) VisitSrc_port

func (v *BaseSuricataRuleParserVisitor) VisitSrc_port(ctx *Src_portContext) interface{}

func (*BaseSuricataRuleParserVisitor) VisitString

func (v *BaseSuricataRuleParserVisitor) VisitString(ctx *StringContext) interface{}

type Dest_addressContext

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

func NewDest_addressContext

func NewDest_addressContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Dest_addressContext

func NewEmptyDest_addressContext

func NewEmptyDest_addressContext() *Dest_addressContext

func (*Dest_addressContext) Accept

func (s *Dest_addressContext) Accept(visitor antlr.ParseTreeVisitor) interface{}

func (*Dest_addressContext) Address

func (s *Dest_addressContext) Address() IAddressContext

func (*Dest_addressContext) GetParser

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

func (*Dest_addressContext) GetRuleContext

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

func (*Dest_addressContext) IsDest_addressContext

func (*Dest_addressContext) IsDest_addressContext()

func (*Dest_addressContext) ToStringTree

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

type Dest_portContext

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

func NewDest_portContext

func NewDest_portContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Dest_portContext

func NewEmptyDest_portContext

func NewEmptyDest_portContext() *Dest_portContext

func (*Dest_portContext) Accept

func (s *Dest_portContext) Accept(visitor antlr.ParseTreeVisitor) interface{}

func (*Dest_portContext) GetParser

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

func (*Dest_portContext) GetRuleContext

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

func (*Dest_portContext) IsDest_portContext

func (*Dest_portContext) IsDest_portContext()

func (*Dest_portContext) Port

func (s *Dest_portContext) Port() IPortContext

func (*Dest_portContext) ToStringTree

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

type Environment_varContext

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

func NewEmptyEnvironment_varContext

func NewEmptyEnvironment_varContext() *Environment_varContext

func NewEnvironment_varContext

func NewEnvironment_varContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Environment_varContext

func (*Environment_varContext) Accept

func (s *Environment_varContext) Accept(visitor antlr.ParseTreeVisitor) interface{}

func (*Environment_varContext) Dollar

func (s *Environment_varContext) Dollar() antlr.TerminalNode

func (*Environment_varContext) GetParser

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

func (*Environment_varContext) GetRuleContext

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

func (*Environment_varContext) ID

func (s *Environment_varContext) ID() antlr.TerminalNode

func (*Environment_varContext) IsEnvironment_varContext

func (*Environment_varContext) IsEnvironment_varContext()

func (*Environment_varContext) ToStringTree

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

type H16Context

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

func NewEmptyH16Context

func NewEmptyH16Context() *H16Context

func NewH16Context

func NewH16Context(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *H16Context

func (*H16Context) Accept

func (s *H16Context) Accept(visitor antlr.ParseTreeVisitor) interface{}

func (*H16Context) GetParser

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

func (*H16Context) GetRuleContext

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

func (*H16Context) HEX

func (s *H16Context) HEX() antlr.TerminalNode

func (*H16Context) IsH16Context

func (*H16Context) IsH16Context()

func (*H16Context) ToStringTree

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

type Hex_partContext

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

func NewEmptyHex_partContext

func NewEmptyHex_partContext() *Hex_partContext

func NewHex_partContext

func NewHex_partContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Hex_partContext

func (*Hex_partContext) Accept

func (s *Hex_partContext) Accept(visitor antlr.ParseTreeVisitor) interface{}

func (*Hex_partContext) AllColon

func (s *Hex_partContext) AllColon() []antlr.TerminalNode

func (*Hex_partContext) AllH16

func (s *Hex_partContext) AllH16() []IH16Context

func (*Hex_partContext) Colon

func (s *Hex_partContext) Colon(i int) antlr.TerminalNode

func (*Hex_partContext) GetParser

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

func (*Hex_partContext) GetRuleContext

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

func (*Hex_partContext) H16

func (s *Hex_partContext) H16(i int) IH16Context

func (*Hex_partContext) IsHex_partContext

func (*Hex_partContext) IsHex_partContext()

func (*Hex_partContext) ToStringTree

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

type IActionContext

type IActionContext interface {
	antlr.ParserRuleContext

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

	// Getter signatures
	ID() antlr.TerminalNode

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

IActionContext is an interface to support dynamic dispatch.

type IAddressContext

type IAddressContext interface {
	antlr.ParserRuleContext

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

	// Getter signatures
	Any() antlr.TerminalNode
	Negative() antlr.TerminalNode
	AllAddress() []IAddressContext
	Address(i int) IAddressContext
	Environment_var() IEnvironment_varContext
	Ipv4() IIpv4Context
	Ipv6() IIpv6Context
	LBracket() antlr.TerminalNode
	RBracket() antlr.TerminalNode
	AllComma() []antlr.TerminalNode
	Comma(i int) antlr.TerminalNode

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

IAddressContext is an interface to support dynamic dispatch.

type IDest_addressContext

type IDest_addressContext interface {
	antlr.ParserRuleContext

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

	// Getter signatures
	Address() IAddressContext

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

IDest_addressContext is an interface to support dynamic dispatch.

type IDest_portContext

type IDest_portContext interface {
	antlr.ParserRuleContext

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

	// Getter signatures
	Port() IPortContext

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

IDest_portContext is an interface to support dynamic dispatch.

type IEnvironment_varContext

type IEnvironment_varContext interface {
	antlr.ParserRuleContext

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

	// Getter signatures
	Dollar() antlr.TerminalNode
	ID() antlr.TerminalNode

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

IEnvironment_varContext is an interface to support dynamic dispatch.

type IH16Context

type IH16Context interface {
	antlr.ParserRuleContext

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

	// Getter signatures
	HEX() antlr.TerminalNode

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

IH16Context is an interface to support dynamic dispatch.

type IHex_partContext

type IHex_partContext interface {
	antlr.ParserRuleContext

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

	// Getter signatures
	AllH16() []IH16Context
	H16(i int) IH16Context
	AllColon() []antlr.TerminalNode
	Colon(i int) antlr.TerminalNode

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

IHex_partContext is an interface to support dynamic dispatch.

type IIpv4Context

type IIpv4Context interface {
	antlr.ParserRuleContext

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

	// Getter signatures
	AllIpv4block() []IIpv4blockContext
	Ipv4block(i int) IIpv4blockContext
	AllDot() []antlr.TerminalNode
	Dot(i int) antlr.TerminalNode
	Div() antlr.TerminalNode
	Ipv4mask() IIpv4maskContext

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

IIpv4Context is an interface to support dynamic dispatch.

type IIpv4blockContext

type IIpv4blockContext interface {
	antlr.ParserRuleContext

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

	// Getter signatures
	INT() antlr.TerminalNode

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

IIpv4blockContext is an interface to support dynamic dispatch.

type IIpv4maskContext

type IIpv4maskContext interface {
	antlr.ParserRuleContext

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

	// Getter signatures
	INT() antlr.TerminalNode

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

IIpv4maskContext is an interface to support dynamic dispatch.

type IIpv6Context

type IIpv6Context interface {
	antlr.ParserRuleContext

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

	// Getter signatures
	AllHex_part() []IHex_partContext
	Hex_part(i int) IHex_partContext
	AllColon() []antlr.TerminalNode
	Colon(i int) antlr.TerminalNode
	DoubleColon() antlr.TerminalNode

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

IIpv6Context is an interface to support dynamic dispatch.

type IParamContext

type IParamContext interface {
	antlr.ParserRuleContext

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

	// Getter signatures
	ParamValue() antlr.TerminalNode
	String_() IStringContext

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

IParamContext is an interface to support dynamic dispatch.

type IParamsContext

type IParamsContext interface {
	antlr.ParserRuleContext

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

	// Getter signatures
	ParamStart() antlr.TerminalNode
	AllParam() []IParamContext
	Param(i int) IParamContext
	ParamEnd() antlr.TerminalNode
	AllParamSep() []antlr.TerminalNode
	ParamSep(i int) antlr.TerminalNode

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

IParamsContext is an interface to support dynamic dispatch.

type IPortContext

type IPortContext interface {
	antlr.ParserRuleContext

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

	// Getter signatures
	Any() antlr.TerminalNode
	AllINT() []antlr.TerminalNode
	INT(i int) antlr.TerminalNode
	Colon() antlr.TerminalNode
	Negative() antlr.TerminalNode
	AllPort() []IPortContext
	Port(i int) IPortContext
	LBracket() antlr.TerminalNode
	RBracket() antlr.TerminalNode
	AllComma() []antlr.TerminalNode
	Comma(i int) antlr.TerminalNode
	Environment_var() IEnvironment_varContext

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

IPortContext is an interface to support dynamic dispatch.

type IProtocolContext

type IProtocolContext interface {
	antlr.ParserRuleContext

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

	// Getter signatures
	ID() antlr.TerminalNode

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

IProtocolContext is an interface to support dynamic dispatch.

type IRuleContext

type IRuleContext interface {
	antlr.ParserRuleContext

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

	// Getter signatures
	Action_() IActionContext
	Protocol() IProtocolContext
	Src_address() ISrc_addressContext
	Src_port() ISrc_portContext
	Arrow() antlr.TerminalNode
	Dest_address() IDest_addressContext
	Dest_port() IDest_portContext
	Params() IParamsContext

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

IRuleContext is an interface to support dynamic dispatch.

type IRulesContext

type IRulesContext interface {
	antlr.ParserRuleContext

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

	// Getter signatures
	EOF() antlr.TerminalNode
	AllRule_() []IRuleContext
	Rule_(i int) IRuleContext

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

IRulesContext is an interface to support dynamic dispatch.

type ISrc_addressContext

type ISrc_addressContext interface {
	antlr.ParserRuleContext

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

	// Getter signatures
	Address() IAddressContext

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

ISrc_addressContext is an interface to support dynamic dispatch.

type ISrc_portContext

type ISrc_portContext interface {
	antlr.ParserRuleContext

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

	// Getter signatures
	Port() IPortContext

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

ISrc_portContext is an interface to support dynamic dispatch.

type IStringContext

type IStringContext interface {
	antlr.ParserRuleContext

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

	// Getter signatures
	ParamQuotedString() antlr.TerminalNode

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

IStringContext is an interface to support dynamic dispatch.

type Ipv4Context

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

func NewEmptyIpv4Context

func NewEmptyIpv4Context() *Ipv4Context

func NewIpv4Context

func NewIpv4Context(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Ipv4Context

func (*Ipv4Context) Accept

func (s *Ipv4Context) Accept(visitor antlr.ParseTreeVisitor) interface{}

func (*Ipv4Context) AllDot

func (s *Ipv4Context) AllDot() []antlr.TerminalNode

func (*Ipv4Context) AllIpv4block

func (s *Ipv4Context) AllIpv4block() []IIpv4blockContext

func (*Ipv4Context) Div

func (s *Ipv4Context) Div() antlr.TerminalNode

func (*Ipv4Context) Dot

func (s *Ipv4Context) Dot(i int) antlr.TerminalNode

func (*Ipv4Context) GetParser

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

func (*Ipv4Context) GetRuleContext

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

func (*Ipv4Context) Ipv4block

func (s *Ipv4Context) Ipv4block(i int) IIpv4blockContext

func (*Ipv4Context) Ipv4mask

func (s *Ipv4Context) Ipv4mask() IIpv4maskContext

func (*Ipv4Context) IsIpv4Context

func (*Ipv4Context) IsIpv4Context()

func (*Ipv4Context) ToStringTree

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

type Ipv4blockContext

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

func NewEmptyIpv4blockContext

func NewEmptyIpv4blockContext() *Ipv4blockContext

func NewIpv4blockContext

func NewIpv4blockContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Ipv4blockContext

func (*Ipv4blockContext) Accept

func (s *Ipv4blockContext) Accept(visitor antlr.ParseTreeVisitor) interface{}

func (*Ipv4blockContext) GetParser

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

func (*Ipv4blockContext) GetRuleContext

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

func (*Ipv4blockContext) INT

func (s *Ipv4blockContext) INT() antlr.TerminalNode

func (*Ipv4blockContext) IsIpv4blockContext

func (*Ipv4blockContext) IsIpv4blockContext()

func (*Ipv4blockContext) ToStringTree

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

type Ipv4maskContext

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

func NewEmptyIpv4maskContext

func NewEmptyIpv4maskContext() *Ipv4maskContext

func NewIpv4maskContext

func NewIpv4maskContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Ipv4maskContext

func (*Ipv4maskContext) Accept

func (s *Ipv4maskContext) Accept(visitor antlr.ParseTreeVisitor) interface{}

func (*Ipv4maskContext) GetParser

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

func (*Ipv4maskContext) GetRuleContext

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

func (*Ipv4maskContext) INT

func (s *Ipv4maskContext) INT() antlr.TerminalNode

func (*Ipv4maskContext) IsIpv4maskContext

func (*Ipv4maskContext) IsIpv4maskContext()

func (*Ipv4maskContext) ToStringTree

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

type Ipv6Context

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

func NewEmptyIpv6Context

func NewEmptyIpv6Context() *Ipv6Context

func NewIpv6Context

func NewIpv6Context(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Ipv6Context

func (*Ipv6Context) Accept

func (s *Ipv6Context) Accept(visitor antlr.ParseTreeVisitor) interface{}

func (*Ipv6Context) AllColon

func (s *Ipv6Context) AllColon() []antlr.TerminalNode

func (*Ipv6Context) AllHex_part

func (s *Ipv6Context) AllHex_part() []IHex_partContext

func (*Ipv6Context) Colon

func (s *Ipv6Context) Colon(i int) antlr.TerminalNode

func (*Ipv6Context) DoubleColon

func (s *Ipv6Context) DoubleColon() antlr.TerminalNode

func (*Ipv6Context) GetParser

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

func (*Ipv6Context) GetRuleContext

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

func (*Ipv6Context) Hex_part

func (s *Ipv6Context) Hex_part(i int) IHex_partContext

func (*Ipv6Context) IsIpv6Context

func (*Ipv6Context) IsIpv6Context()

func (*Ipv6Context) ToStringTree

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

type ParamContext

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

func NewEmptyParamContext

func NewEmptyParamContext() *ParamContext

func NewParamContext

func NewParamContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ParamContext

func (*ParamContext) Accept

func (s *ParamContext) Accept(visitor antlr.ParseTreeVisitor) interface{}

func (*ParamContext) GetParser

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

func (*ParamContext) GetRuleContext

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

func (*ParamContext) IsParamContext

func (*ParamContext) IsParamContext()

func (*ParamContext) ParamValue

func (s *ParamContext) ParamValue() antlr.TerminalNode

func (*ParamContext) String_

func (s *ParamContext) String_() IStringContext

func (*ParamContext) ToStringTree

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

type ParamsContext

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

func NewEmptyParamsContext

func NewEmptyParamsContext() *ParamsContext

func NewParamsContext

func NewParamsContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ParamsContext

func (*ParamsContext) Accept

func (s *ParamsContext) Accept(visitor antlr.ParseTreeVisitor) interface{}

func (*ParamsContext) AllParam

func (s *ParamsContext) AllParam() []IParamContext

func (*ParamsContext) AllParamSep

func (s *ParamsContext) AllParamSep() []antlr.TerminalNode

func (*ParamsContext) GetParser

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

func (*ParamsContext) GetRuleContext

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

func (*ParamsContext) IsParamsContext

func (*ParamsContext) IsParamsContext()

func (*ParamsContext) Param

func (s *ParamsContext) Param(i int) IParamContext

func (*ParamsContext) ParamEnd

func (s *ParamsContext) ParamEnd() antlr.TerminalNode

func (*ParamsContext) ParamSep

func (s *ParamsContext) ParamSep(i int) antlr.TerminalNode

func (*ParamsContext) ParamStart

func (s *ParamsContext) ParamStart() antlr.TerminalNode

func (*ParamsContext) ToStringTree

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

type PortContext

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

func NewEmptyPortContext

func NewEmptyPortContext() *PortContext

func NewPortContext

func NewPortContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *PortContext

func (*PortContext) Accept

func (s *PortContext) Accept(visitor antlr.ParseTreeVisitor) interface{}

func (*PortContext) AllComma

func (s *PortContext) AllComma() []antlr.TerminalNode

func (*PortContext) AllINT

func (s *PortContext) AllINT() []antlr.TerminalNode

func (*PortContext) AllPort

func (s *PortContext) AllPort() []IPortContext

func (*PortContext) Any

func (s *PortContext) Any() antlr.TerminalNode

func (*PortContext) Colon

func (s *PortContext) Colon() antlr.TerminalNode

func (*PortContext) Comma

func (s *PortContext) Comma(i int) antlr.TerminalNode

func (*PortContext) Environment_var

func (s *PortContext) Environment_var() IEnvironment_varContext

func (*PortContext) GetParser

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

func (*PortContext) GetRuleContext

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

func (*PortContext) INT

func (s *PortContext) INT(i int) antlr.TerminalNode

func (*PortContext) IsPortContext

func (*PortContext) IsPortContext()

func (*PortContext) LBracket

func (s *PortContext) LBracket() antlr.TerminalNode

func (*PortContext) Negative

func (s *PortContext) Negative() antlr.TerminalNode

func (*PortContext) Port

func (s *PortContext) Port(i int) IPortContext

func (*PortContext) RBracket

func (s *PortContext) RBracket() antlr.TerminalNode

func (*PortContext) ToStringTree

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

type ProtocolContext

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

func NewEmptyProtocolContext

func NewEmptyProtocolContext() *ProtocolContext

func NewProtocolContext

func NewProtocolContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ProtocolContext

func (*ProtocolContext) Accept

func (s *ProtocolContext) Accept(visitor antlr.ParseTreeVisitor) interface{}

func (*ProtocolContext) GetParser

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

func (*ProtocolContext) GetRuleContext

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

func (*ProtocolContext) ID

func (s *ProtocolContext) ID() antlr.TerminalNode

func (*ProtocolContext) IsProtocolContext

func (*ProtocolContext) IsProtocolContext()

func (*ProtocolContext) ToStringTree

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

type RuleContext

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

func NewEmptyRuleContext

func NewEmptyRuleContext() *RuleContext

func NewRuleContext

func NewRuleContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *RuleContext

func (*RuleContext) Accept

func (s *RuleContext) Accept(visitor antlr.ParseTreeVisitor) interface{}

func (*RuleContext) Action_

func (s *RuleContext) Action_() IActionContext

func (*RuleContext) Arrow

func (s *RuleContext) Arrow() antlr.TerminalNode

func (*RuleContext) Dest_address

func (s *RuleContext) Dest_address() IDest_addressContext

func (*RuleContext) Dest_port

func (s *RuleContext) Dest_port() IDest_portContext

func (*RuleContext) GetParser

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

func (*RuleContext) GetRuleContext

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

func (*RuleContext) IsRuleContext

func (*RuleContext) IsRuleContext()

func (*RuleContext) Params

func (s *RuleContext) Params() IParamsContext

func (*RuleContext) Protocol

func (s *RuleContext) Protocol() IProtocolContext

func (*RuleContext) Src_address

func (s *RuleContext) Src_address() ISrc_addressContext

func (*RuleContext) Src_port

func (s *RuleContext) Src_port() ISrc_portContext

func (*RuleContext) ToStringTree

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

type RulesContext

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

func NewEmptyRulesContext

func NewEmptyRulesContext() *RulesContext

func NewRulesContext

func NewRulesContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *RulesContext

func (*RulesContext) Accept

func (s *RulesContext) Accept(visitor antlr.ParseTreeVisitor) interface{}

func (*RulesContext) AllRule_

func (s *RulesContext) AllRule_() []IRuleContext

func (*RulesContext) EOF

func (s *RulesContext) EOF() antlr.TerminalNode

func (*RulesContext) GetParser

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

func (*RulesContext) GetRuleContext

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

func (*RulesContext) IsRulesContext

func (*RulesContext) IsRulesContext()

func (*RulesContext) Rule_

func (s *RulesContext) Rule_(i int) IRuleContext

func (*RulesContext) ToStringTree

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

type Src_addressContext

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

func NewEmptySrc_addressContext

func NewEmptySrc_addressContext() *Src_addressContext

func NewSrc_addressContext

func NewSrc_addressContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Src_addressContext

func (*Src_addressContext) Accept

func (s *Src_addressContext) Accept(visitor antlr.ParseTreeVisitor) interface{}

func (*Src_addressContext) Address

func (s *Src_addressContext) Address() IAddressContext

func (*Src_addressContext) GetParser

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

func (*Src_addressContext) GetRuleContext

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

func (*Src_addressContext) IsSrc_addressContext

func (*Src_addressContext) IsSrc_addressContext()

func (*Src_addressContext) ToStringTree

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

type Src_portContext

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

func NewEmptySrc_portContext

func NewEmptySrc_portContext() *Src_portContext

func NewSrc_portContext

func NewSrc_portContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Src_portContext

func (*Src_portContext) Accept

func (s *Src_portContext) Accept(visitor antlr.ParseTreeVisitor) interface{}

func (*Src_portContext) GetParser

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

func (*Src_portContext) GetRuleContext

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

func (*Src_portContext) IsSrc_portContext

func (*Src_portContext) IsSrc_portContext()

func (*Src_portContext) Port

func (s *Src_portContext) Port() IPortContext

func (*Src_portContext) ToStringTree

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

type StringContext

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

func NewEmptyStringContext

func NewEmptyStringContext() *StringContext

func NewStringContext

func NewStringContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *StringContext

func (*StringContext) Accept

func (s *StringContext) Accept(visitor antlr.ParseTreeVisitor) interface{}

func (*StringContext) GetParser

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

func (*StringContext) GetRuleContext

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

func (*StringContext) IsStringContext

func (*StringContext) IsStringContext()

func (*StringContext) ParamQuotedString

func (s *StringContext) ParamQuotedString() antlr.TerminalNode

func (*StringContext) ToStringTree

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

type SuricataRuleLexer

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

func NewSuricataRuleLexer

func NewSuricataRuleLexer(input antlr.CharStream) *SuricataRuleLexer

NewSuricataRuleLexer produces a new lexer instance for the optional input antlr.CharStream.

type SuricataRuleParser

type SuricataRuleParser struct {
	*antlr.BaseParser
}

func NewSuricataRuleParser

func NewSuricataRuleParser(input antlr.TokenStream) *SuricataRuleParser

NewSuricataRuleParser produces a new parser instance for the optional input antlr.TokenStream.

func (*SuricataRuleParser) Action_

func (p *SuricataRuleParser) Action_() (localctx IActionContext)

func (*SuricataRuleParser) Address

func (p *SuricataRuleParser) Address() (localctx IAddressContext)

func (*SuricataRuleParser) Dest_address

func (p *SuricataRuleParser) Dest_address() (localctx IDest_addressContext)

func (*SuricataRuleParser) Dest_port

func (p *SuricataRuleParser) Dest_port() (localctx IDest_portContext)

func (*SuricataRuleParser) Environment_var

func (p *SuricataRuleParser) Environment_var() (localctx IEnvironment_varContext)

func (*SuricataRuleParser) H16

func (p *SuricataRuleParser) H16() (localctx IH16Context)

func (*SuricataRuleParser) Hex_part

func (p *SuricataRuleParser) Hex_part() (localctx IHex_partContext)

func (*SuricataRuleParser) Ipv4

func (p *SuricataRuleParser) Ipv4() (localctx IIpv4Context)

func (*SuricataRuleParser) Ipv4block

func (p *SuricataRuleParser) Ipv4block() (localctx IIpv4blockContext)

func (*SuricataRuleParser) Ipv4mask

func (p *SuricataRuleParser) Ipv4mask() (localctx IIpv4maskContext)

func (*SuricataRuleParser) Ipv6

func (p *SuricataRuleParser) Ipv6() (localctx IIpv6Context)

func (*SuricataRuleParser) Param

func (p *SuricataRuleParser) Param() (localctx IParamContext)

func (*SuricataRuleParser) Params

func (p *SuricataRuleParser) Params() (localctx IParamsContext)

func (*SuricataRuleParser) Port

func (p *SuricataRuleParser) Port() (localctx IPortContext)

func (*SuricataRuleParser) Protocol

func (p *SuricataRuleParser) Protocol() (localctx IProtocolContext)

func (*SuricataRuleParser) Rule_

func (p *SuricataRuleParser) Rule_() (localctx IRuleContext)

func (*SuricataRuleParser) Rules

func (p *SuricataRuleParser) Rules() (localctx IRulesContext)

func (*SuricataRuleParser) Src_address

func (p *SuricataRuleParser) Src_address() (localctx ISrc_addressContext)

func (*SuricataRuleParser) Src_port

func (p *SuricataRuleParser) Src_port() (localctx ISrc_portContext)

func (*SuricataRuleParser) String_

func (p *SuricataRuleParser) String_() (localctx IStringContext)

type SuricataRuleParserVisitor

type SuricataRuleParserVisitor interface {
	antlr.ParseTreeVisitor

	// Visit a parse tree produced by SuricataRuleParser#rules.
	VisitRules(ctx *RulesContext) interface{}

	// Visit a parse tree produced by SuricataRuleParser#rule.
	VisitRule(ctx *RuleContext) interface{}

	// Visit a parse tree produced by SuricataRuleParser#action.
	VisitAction(ctx *ActionContext) interface{}

	// Visit a parse tree produced by SuricataRuleParser#protocol.
	VisitProtocol(ctx *ProtocolContext) interface{}

	// Visit a parse tree produced by SuricataRuleParser#src_address.
	VisitSrc_address(ctx *Src_addressContext) interface{}

	// Visit a parse tree produced by SuricataRuleParser#dest_address.
	VisitDest_address(ctx *Dest_addressContext) interface{}

	// Visit a parse tree produced by SuricataRuleParser#address.
	VisitAddress(ctx *AddressContext) interface{}

	// Visit a parse tree produced by SuricataRuleParser#ipv4.
	VisitIpv4(ctx *Ipv4Context) interface{}

	// Visit a parse tree produced by SuricataRuleParser#ipv4block.
	VisitIpv4block(ctx *Ipv4blockContext) interface{}

	// Visit a parse tree produced by SuricataRuleParser#ipv4mask.
	VisitIpv4mask(ctx *Ipv4maskContext) interface{}

	// Visit a parse tree produced by SuricataRuleParser#environment_var.
	VisitEnvironment_var(ctx *Environment_varContext) interface{}

	// Visit a parse tree produced by SuricataRuleParser#ipv6.
	VisitIpv6(ctx *Ipv6Context) interface{}

	// Visit a parse tree produced by SuricataRuleParser#hex_part.
	VisitHex_part(ctx *Hex_partContext) interface{}

	// Visit a parse tree produced by SuricataRuleParser#h16.
	VisitH16(ctx *H16Context) interface{}

	// Visit a parse tree produced by SuricataRuleParser#src_port.
	VisitSrc_port(ctx *Src_portContext) interface{}

	// Visit a parse tree produced by SuricataRuleParser#dest_port.
	VisitDest_port(ctx *Dest_portContext) interface{}

	// Visit a parse tree produced by SuricataRuleParser#port.
	VisitPort(ctx *PortContext) interface{}

	// Visit a parse tree produced by SuricataRuleParser#params.
	VisitParams(ctx *ParamsContext) interface{}

	// Visit a parse tree produced by SuricataRuleParser#param.
	VisitParam(ctx *ParamContext) interface{}

	// Visit a parse tree produced by SuricataRuleParser#string.
	VisitString(ctx *StringContext) interface{}
}

A complete Visitor for a parse tree produced by SuricataRuleParser.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL