standard

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	IS_DIGIT    = 0x01
	IS_HEXDIGIT = 0x02
	IS_ALPHA    = 0x04
)

将EL表达一些输入数据转换成令牌流,然后可以对其进行解析

Variables

View Source
var FLAGS = [256]rune{}

Functions

This section is empty.

Types

type SpelExpression

type SpelExpression struct {
	Expression        string
	Configuration     SpelParserConfiguration
	EvaluationContext EvaluationContext
	Ast               SpelNode
}

func (SpelExpression) GetExpressionString

func (e SpelExpression) GetExpressionString() string

func (*SpelExpression) GetValue

func (e *SpelExpression) GetValue() interface{}

func (*SpelExpression) GetValueContext

func (e *SpelExpression) GetValueContext(context EvaluationContext) interface{}

type Token

type Token struct {
	Kind     TokenKind
	Data     string
	StartPos int
	EndPos   int
}

func (Token) IsNumericRelationalOperator

func (t Token) IsNumericRelationalOperator() bool

func (Token) StringValue

func (t Token) StringValue() string

type TokenKind

type TokenKind struct {
	TokenChars    []rune
	HasPayload    bool
	TokenKindType TokenKindType
}

func (*TokenKind) InitTokenKind

func (t *TokenKind) InitTokenKind() *TokenKind

type TokenKindType

type TokenKindType string
const (
	LPAREN TokenKindType = "("

	RPAREN TokenKindType = ")"

	COMMA TokenKindType = ","

	COLON TokenKindType = ":"

	HASH TokenKindType = "#"

	RSQUARE TokenKindType = "]"

	LSQUARE TokenKindType = "["

	LCURLY TokenKindType = "{"

	RCURLY TokenKindType = "}"

	DOT TokenKindType = "."

	PLUS TokenKindType = "+"

	STAR TokenKindType = "*"

	DIV     TokenKindType = "/"
	GE      TokenKindType = ">="
	GT      TokenKindType = ">"
	LE      TokenKindType = "<="
	LT      TokenKindType = "<"
	EQ      TokenKindType = "=="
	NE      TokenKindType = "!="
	PROJECT TokenKindType = "!["
	MOD     TokenKindType = "%"
	NOT     TokenKindType = "!"
	ASSIGN  TokenKindType = "="
	INC     TokenKindType = "++"
	DEC     TokenKindType = "--"

	MINUS  TokenKindType = "-"
	SELECT TokenKindType = "?["
	POWER  TokenKindType = "^"
	ELVIS  TokenKindType = "?:"

	SAFE_NAVI        TokenKindType = "?."
	BEAN_REF         TokenKindType = "@"
	FACTORY_BEAN_REF TokenKindType = "&"
	SYMBOLIC_OR      TokenKindType = "||"

	SYMBOLIC_AND TokenKindType = "&&"
	BETWEEN      TokenKindType = "between"

	SELECT_LAST TokenKindType = "$["

	IDENTIFIER TokenKindType = "IDENTIFIER"

	LITERAL_INT TokenKindType = "LITERAL_INT"

	LITERAL_LONG TokenKindType = "LITERAL_LONG"

	LITERAL_HEXINT TokenKindType = "LITERAL_HEXINT"

	LITERAL_HEXLONG TokenKindType = "LITERAL_HEXLONG"

	LITERAL_STRING TokenKindType = "LITERAL_STRING"

	LITERAL_REAL TokenKindType = "LITERAL_REAL"

	LITERAL_REAL_FLOAT TokenKindType = "LITERAL_REAL_FLOAT"
)

type Tokenizer

type Tokenizer struct {
	ExpressionString string
	// contains filtered or unexported fields
}

func (*Tokenizer) InitTokenizer

func (t *Tokenizer) InitTokenizer()

func (*Tokenizer) Process

func (t *Tokenizer) Process() []Token

Jump to

Keyboard shortcuts

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