jsonexpr

package
v2.4.3 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2022 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const DOT = 57346
View Source
const FIELD = 57350
View Source
const INDEX = 57351
View Source
const JSONExprEofCode = 1
View Source
const JSONExprErrCode = 2
View Source
const JSONExprFlag = -1000
View Source
const JSONExprInitialStackSize = 16
View Source
const JSONExprLast = 19
View Source
const JSONExprPrivate = 57344
View Source
const LSB = 57347
View Source
const RSB = 57348
View Source
const STRING = 57349

Variables

View Source
var (
	JSONExprDebug        = 0
	JSONExprErrorVerbose = false
)
View Source
var JSONExprAct = [...]int{
	3, 13, 7, 14, 6, 6, 17, 16, 10, 7,
	4, 15, 5, 8, 1, 9, 2, 11, 12,
}
View Source
var JSONExprChk = [...]int{
	-1000, -7, -6, -3, -5, -2, 8, 5, -5, -2,
	4, -4, -1, 7, 9, -3, 6, 6,
}
View Source
var JSONExprDef = [...]int{
	0, -2, 1, 2, 3, 4, 10, 0, 5, 6,
	0, 0, 0, 11, 12, 7, 8, 9,
}
View Source
var JSONExprErrorMessages = [...]struct {
	state int
	token int
	msg   string
}{}
View Source
var JSONExprExca = [...]int{
	-1, 1,
	1, -1,
	-2, 0,
}
View Source
var JSONExprPact = [...]int{
	-3, -1000, 4, -1000, -1000, -1000, -1000, -6, -1000, -1000,
	-4, 1, 0, -1000, -1000, -1000, -1000, -1000,
}
View Source
var JSONExprPgo = [...]int{
	0, 18, 12, 0, 17, 10, 16, 14,
}
View Source
var JSONExprR1 = [...]int{
	0, 7, 6, 6, 6, 6, 6, 6, 5, 2,
	3, 4, 1,
}
View Source
var JSONExprR2 = [...]int{
	0, 1, 1, 1, 1, 2, 2, 3, 3, 3,
	1, 1, 1,
}
View Source
var JSONExprStatenames = [...]string{}
View Source
var JSONExprTok1 = [...]int{
	1,
}
View Source
var JSONExprTok2 = [...]int{
	2, 3, 4, 5, 6, 7, 8, 9,
}
View Source
var JSONExprTok3 = [...]int{
	0,
}
View Source
var JSONExprToknames = [...]string{
	"$end",
	"error",
	"$unk",
	"DOT",
	"LSB",
	"RSB",
	"STRING",
	"FIELD",
	"INDEX",
}

Functions

func JSONExprErrorMessage

func JSONExprErrorMessage(state, lookAhead int) string

func JSONExprParse

func JSONExprParse(JSONExprlex JSONExprLexer) int

func JSONExprStatname

func JSONExprStatname(s int) string

func JSONExprTokname

func JSONExprTokname(c int) string

func JSONExprlex1

func JSONExprlex1(lex JSONExprLexer, lval *JSONExprSymType) (char, token int)

func Parse

func Parse(expr string, debug bool) ([]interface{}, error)

Types

type JSONExprLexer

type JSONExprLexer interface {
	Lex(lval *JSONExprSymType) int
	Error(s string)
}

type JSONExprParser

type JSONExprParser interface {
	Parse(JSONExprLexer) int
	Lookahead() int
}

func JSONExprNewParser

func JSONExprNewParser() JSONExprParser

type JSONExprParserImpl

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

func (*JSONExprParserImpl) Lookahead

func (p *JSONExprParserImpl) Lookahead() int

func (*JSONExprParserImpl) Parse

func (JSONExprrcvr *JSONExprParserImpl) Parse(JSONExprlex JSONExprLexer) int

type JSONExprSymType

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

type Scanner

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

func NewScanner

func NewScanner(r io.Reader, debug bool) *Scanner

func (*Scanner) Error

func (sc *Scanner) Error(s string)

func (*Scanner) Lex

func (sc *Scanner) Lex(lval *JSONExprSymType) int

func (*Scanner) Reduced

func (sc *Scanner) Reduced(rule, state int, lval *JSONExprSymType) bool

Jump to

Keyboard shortcuts

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