parser

package
v0.0.0-...-df06595 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2024 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const AND = 57353
View Source
const AS = 57354
View Source
const ASC = 57355
View Source
const BOOL = 57356
View Source
const BY = 57357
View Source
const CAST = 57358
View Source
const DEDUP = 57360
View Source
const DESC = 57359
View Source
const DOUBLE = 57361
View Source
const ERROR = 57345
View Source
const EVAL = 57362
View Source
const EXTRACT = 57372
View Source
const FALSE = 57363
View Source
const FCONST = 57348
View Source
const GREATER_EQUALS = 57351
View Source
const ICONST = 57347
View Source
const IDENT = 57346
View Source
const IMPORT = 57364
View Source
const LESS_EQUALS = 57350
View Source
const LIMIT = 57365
View Source
const LONG = 57366
View Source
const LUA = 57367
View Source
const LUA_FILE = 57368
View Source
const NOT = 57369
View Source
const NOT_EQUALS = 57352
View Source
const OR = 57370
View Source
const ORDER = 57371
View Source
const SCONST = 57349
View Source
const STATS = 57373
View Source
const STRING = 57374
View Source
const TRUE = 57375
View Source
const TYPE = 57376
View Source
const WHERE = 57377

Variables

This section is empty.

Functions

func EndsInSemicolon

func EndsInSemicolon(spl string) bool

EndsInSemicolon returns true if the last lexical token is a semicolon.

func LastLexicalToken

func LastLexicalToken(spl string) (lastTok int, ok bool)

LastLexicalToken returns the last lexical token. If the string has no lexical tokens, returns 0 and ok=false.

func Parse

func Parse(spl string) (*tree.Select, error)

func SplitFirstStatement

func SplitFirstStatement(spl string) (pos int, ok bool)

SplitFirstStatement returns the length of the prefix of the string up to and including the first semicolon that separates statements. If there is no semicolon, returns ok=false.

Types

type Parser

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

type TokenString

type TokenString struct {
	TokenID int32
	Str     string
}

TokenString is the unit value returned by Tokens.

func Tokens

func Tokens(spl string) (tokens []TokenString, ok bool)

Tokens decomposes the input into lexical tokens.

Jump to

Keyboard shortcuts

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