parser

package
v0.0.0-...-0a5c366 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrorListener

type ErrorListener struct {
	SyntaxErrors   SyntaxErrors
	HasSyntaxError bool
}

func NewErrorListener

func NewErrorListener() *ErrorListener

func (*ErrorListener) ReportAmbiguity

func (e *ErrorListener) ReportAmbiguity(recognizer antlr.Parser, dfa *antlr.DFA, startIndex int, stopIndex int, exact bool, ambigAlts *antlr.BitSet, configs *antlr.ATNConfigSet)

ReportAmbiguity implements antlr.ErrorListener.

func (*ErrorListener) ReportAttemptingFullContext

func (e *ErrorListener) ReportAttemptingFullContext(recognizer antlr.Parser, dfa *antlr.DFA, startIndex int, stopIndex int, conflictingAlts *antlr.BitSet, configs *antlr.ATNConfigSet)

ReportAttemptingFullContext implements antlr.ErrorListener.

func (*ErrorListener) ReportContextSensitivity

func (e *ErrorListener) ReportContextSensitivity(recognizer antlr.Parser, dfa *antlr.DFA, startIndex int, stopIndex int, prediction int, configs *antlr.ATNConfigSet)

ReportContextSensitivity implements antlr.ErrorListener.

func (*ErrorListener) SyntaxError

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

SyntaxError implements antlr.ErrorListener.

type RuntimeError

type RuntimeError struct {
	StartLine   int
	EndLine     int
	StartColumn int
	EndColumn   int
	// contains filtered or unexported fields
}

func NewRuntimeError

func NewRuntimeError(ctx antlr.ParserRuleContext, cause error) *RuntimeError

func (*RuntimeError) Error

func (r *RuntimeError) Error() string

Error implements error.

func (*RuntimeError) Unwrap

func (r *RuntimeError) Unwrap() error

type SyntaxError

type SyntaxError struct {
	Line   int
	Column int
	Msg    string
}

func NewSyntaxError

func NewSyntaxError(line, col int, msg string) *SyntaxError

func (*SyntaxError) Error

func (s *SyntaxError) Error() string

Error implements error.

type SyntaxErrors

type SyntaxErrors []*SyntaxError

func (SyntaxErrors) Error

func (errs SyntaxErrors) Error() string

Error implements error.

Jump to

Keyboard shortcuts

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