XChy / XEL

An Expression Engine

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

XEL - 一个表达式引擎(A Expression Engine)

基本特性

使用Variant包装值,可支持double,int,bool,Object,null
允许用户自定义变量,操作符,函数
内置(+ - * / ^ =)等操作符,(sin,cos,tan)等函数
发现表达式非法时,抛出XELError

Basic Features

Value be wrapped with Variant,supports double,int,bool,Object,null
Allows users to customize variables, operators, functions
Built-in operator(+ - * / ^ =) functoin(sin cos tan) .etc
When it find the expression is NOT right,it will throw XELError

高级特性

允许自定义XELObject嵌入其中,并通过重写虚函数member,invoke等返回对象成员和调用成员函数
比如内置的XVectorObject,XMapObject等

允许自定义一元和二元操作符,并通过Variant::type()判断类型
若是Object则convertObject并通过dynamic_cast判断和转换类型 允许字符式的二元操作符,比如(and or xor),不过需要与操作数之间有空格

支持二进制和十六进制数
允许自定义Parser和Tokenizer

Advanced Features

Allows custom XELObjects to be embedded in them, and returns object members and calls member functions by overwriting virtual functions such as member, invoke, and so on
Such as built-in XVectorObject, XMapObject, etc.

Allows to customize unary and binary operators and determine types by Variant::type ()
If it's Object ,convertObject and dynamic_cast can be used to determine and transform types
Allows characters as binary operator, such as (AND OR XOR), but needs to have spaces between operands

Supports bin and hex numbers
Allows custom Parser and Tokenizer

About

An Expression Engine

License:GNU Lesser General Public License v3.0


Languages

Language:C++ 98.5%Language:CMake 1.5%