standard

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

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

* * golang-sample源代码,版权归锦翰科技(深圳)有限公司所有。 * <p> * 文件名称 : tokenizer.go * 文件路径 : * 作者 : DavidLiu × Email: david.liu@ginghan.com * * 创建日期 : 2022/4/7 18:29 * 修改历史 : 1. [2022/4/7 18:29] 创建文件 by NST

将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