Documentation ¶
Index ¶
- func BuildIndex(obj any) map[any]int
- func Dot(obj any) dot.Graph
- func Dump(obj any, prefix string)
- func FindTreeChildren[T antlr.ParserRuleContext](parent antlr.Tree) []T
- func GetTreeToken(t antlr.Tree) antlr.Token
- func WalkChildren(obj any, fn func(any) bool) bool
- type DelimitingSplitter
- type GenericError
- type PanicErrorListener
- func (l PanicErrorListener) ReportAmbiguity(recognizer antlr.Parser, dfa *antlr.DFA, startIndex, stopIndex int, exact bool, ...)
- func (l PanicErrorListener) ReportAttemptingFullContext(recognizer antlr.Parser, dfa *antlr.DFA, startIndex, stopIndex int, ...)
- func (l PanicErrorListener) ReportContextSensitivity(recognizer antlr.Parser, dfa *antlr.DFA, startIndex, stopIndex, prediction int, ...)
- func (l PanicErrorListener) SyntaxError(recognizer antlr.Recognizer, offendingSymbol any, line, column int, msg string, ...)
- type TokenAnalysis
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildIndex ¶
func FindTreeChildren ¶
func FindTreeChildren[T antlr.ParserRuleContext](parent antlr.Tree) []T
Types ¶
type DelimitingSplitter ¶
type DelimitingSplitter struct {
// contains filtered or unexported fields
}
func NewDelimitingSplitter ¶
func NewDelimitingSplitter( input antlr.CharStream, interpreter antlr.ILexerATNSimulator, virt antlr.Lexer, tokenFactorySourcePair *antlr.TokenSourceCharStreamPair, ) *DelimitingSplitter
func (*DelimitingSplitter) NextToken ¶
func (l *DelimitingSplitter) NextToken() antlr.Token
func (*DelimitingSplitter) Recover ¶
func (l *DelimitingSplitter) Recover(re antlr.RecognitionException)
type GenericError ¶
type GenericError struct {
Args []any
}
func (GenericError) Error ¶
func (e GenericError) Error() string
type PanicErrorListener ¶
type PanicErrorListener struct{}
func (PanicErrorListener) ReportAmbiguity ¶
func (PanicErrorListener) ReportAttemptingFullContext ¶
func (l PanicErrorListener) ReportAttemptingFullContext( recognizer antlr.Parser, dfa *antlr.DFA, startIndex, stopIndex int, conflictingAlts *antlr.BitSet, configs antlr.ATNConfigSet, )
func (PanicErrorListener) ReportContextSensitivity ¶
func (l PanicErrorListener) ReportContextSensitivity( recognizer antlr.Parser, dfa *antlr.DFA, startIndex, stopIndex, prediction int, configs antlr.ATNConfigSet, )
func (PanicErrorListener) SyntaxError ¶
func (l PanicErrorListener) SyntaxError( recognizer antlr.Recognizer, offendingSymbol any, line, column int, msg string, e antlr.RecognitionException, )
type TokenAnalysis ¶
type TokenAnalysis struct {
// contains filtered or unexported fields
}
func NewTokenAnalysis ¶
func NewTokenAnalysis(root antlr.Tree, toks []antlr.Token) TokenAnalysis
func (*TokenAnalysis) Root ¶
func (a *TokenAnalysis) Root() antlr.Tree
func (*TokenAnalysis) TokIdxsByStart ¶
func (a *TokenAnalysis) TokIdxsByStart() map[int]int
func (*TokenAnalysis) Toks ¶
func (a *TokenAnalysis) Toks() []antlr.Token
func (*TokenAnalysis) TreeIdxsByStart ¶
func (a *TokenAnalysis) TreeIdxsByStart() map[int]int
func (*TokenAnalysis) Trees ¶
func (a *TokenAnalysis) Trees() []antlr.Tree
Directories ¶
Path | Synopsis |
---|---|
dev
|
|
runtime
cp -rv $(go mod download -json 'github.com/antlr/antlr4/runtime/Go/antlr@v4.12.0' | jq -r '.Dir') runtime chmod -R u+w runtime rm runtime/go.mod runtime/go.sum
|
cp -rv $(go mod download -json 'github.com/antlr/antlr4/runtime/Go/antlr@v4.12.0' | jq -r '.Dir') runtime chmod -R u+w runtime rm runtime/go.mod runtime/go.sum |
Package antlr implements the Go version of the ANTLR 4 runtime.
|
Package antlr implements the Go version of the ANTLR 4 runtime. |
Click to show internal directories.
Click to hide internal directories.