parser

package
v2.0.0-alpha.33 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CaseChangingStream

type CaseChangingStream struct {
	antlr.CharStream
	// contains filtered or unexported fields
}

CaseChangingStream wraps an existing CharStream, but upper cases, or lower cases the input before it is tokenized.

func (*CaseChangingStream) LA

func (is *CaseChangingStream) LA(offset int) int

LA gets the value of the symbol at offset from the current position from the underlying CharStream and converts it to either upper case or lower case.

type Parser

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

func New

func New(query string, tr ...TokenStreamTransformer) *Parser

func (*Parser) AddErrorListener

func (p *Parser) AddErrorListener(listener antlr.ErrorListener)

func (*Parser) AtEOF

func (p *Parser) AtEOF() bool

AtEOF reports whether the parser consumed the complete input.

func (*Parser) Expression

func (p *Parser) Expression() fql.IExpressionContext

Expression parses a standalone expression.

func (*Parser) GetLiteralNames

func (p *Parser) GetLiteralNames() []string

func (*Parser) Program

func (p *Parser) Program() *fql.ProgramContext

Program parses and returns the source program, caching the parse tree so syntax diagnostics can be inspected before visitors consume it.

func (*Parser) RemoveErrorListeners

func (p *Parser) RemoveErrorListeners()

func (*Parser) Visit

func (p *Parser) Visit(visitor fql.FqlParserVisitor) interface{}

func (*Parser) Walk

func (p *Parser) Walk(listener fql.FqlParserListener)

type TokenStreamTransformer

type TokenStreamTransformer func(antlr.TokenStream) antlr.TokenStream

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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