antlr4util

package
v1.3.0-sp2 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2024 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetEndPosition

func GetEndPosition(t antlr.Token) (int, int)

func GetRange

func GetRange(token CanStartStopToken) *ssa.Range

Types

type CanStartStopToken

type CanStartStopToken interface {
	GetStop() antlr.Token
	GetStart() antlr.Token
	GetText() string
}
	GetText() string
}

type ErrorListener

type ErrorListener struct {
	*antlr.DefaultErrorListener
	// contains filtered or unexported fields
}

error listener for lexer and parser

func NewErrorListener

func NewErrorListener() *ErrorListener

func (*ErrorListener) GetErrors

func (el *ErrorListener) GetErrors() []string

func (*ErrorListener) SyntaxError

func (el *ErrorListener) SyntaxError(recognizer antlr.Recognizer, offendingSymbol interface{}, line, column int, msg string, e antlr.RecognitionException)

type LegacyErrorListener

type LegacyErrorListener struct {
	*antlr.DefaultErrorListener
	// contains filtered or unexported fields
}

error listener for lexer and parser

func NewLegacyErrorListener

func NewLegacyErrorListener() *LegacyErrorListener

func (*LegacyErrorListener) GetErrors

func (el *LegacyErrorListener) GetErrors() []string

func (*LegacyErrorListener) SyntaxError

func (el *LegacyErrorListener) SyntaxError(recognizer antlr.Recognizer, offendingSymbol interface{}, line, column int, msg string, e antlr.RecognitionException)

type Token

type Token struct {
	// contains filtered or unexported fields
}

func NewToken added in v1.3.1

func NewToken(node antlr.TerminalNode) *Token

func (*Token) GetStart

func (t *Token) GetStart() antlr.Token

func (*Token) GetStop

func (t *Token) GetStop() antlr.Token

func (*Token) GetText

func (t *Token) GetText() string

Jump to

Keyboard shortcuts

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