JSEL is participating 2021 OSC China Open Source Project Selection , please vote for it!
JSEL in 2021 OSC China Open Source Project Selection {{projectVoteCount} has been obtained in, please vote for it!
2021 OSC China Open Source Project Selection It is in hot progress. Come and vote for your favorite open source project!
2021 OSC China Open Source Project Selection>>> Midfield Review
JSEL won the 2021 OSC China Open Source Project Selection "The Best Popularity Project" !
Authorization Agreement LGPL
development language Java
operating system Cross platform
Software type Open source software
Open source organizations nothing
region Unknown
deliverer Unknown
intended for unknown
Recording time 2009-02-08

Software Introduction

JSEL is a simple expression interpretation engine based on reverse Polish structure and JS operation rules. It is also a JSON parsing engine.

basic feature

  • Based on the simple calculation model of the inverse Polish style, the biggest feature is simplicity.
  • Short circuit optimization is supported (nodes that do not need to be calculated will be skipped as needed during the operation (boolean operation and ternary operation have such requirements).
  • The operation rules are based on JavaScript familiar to front-end developers and can be used for expression implementation of template engines.
  • It is also a superset of JSON interpretation engines, which can be used to interpret JSON data sources.
  • Simple operation interface, which can easily redefine operation rules.
  • Due to the simple implementation of the engine itself, the program size is very small (JAR files are only 22k, and similar tools OGNL 168k); It is suitable for embedding other environments that require strict file size, such as the webstart applet that needs to be downloaded.

Basic Usage

 import org . xidea . el . Expression ;
import org . xidea . el . ExpressionImpl ;
import java . util . HashMap ;
public class Test {
   
public static void main ( String [] args ){
       
Expression el = new ExpressionImpl ( "var1 +2 * var2" );
       
//Expression el = new ExpressionImpl("var1 +2 * var2",new CalculaterImpl());// You can also define your own operation rules
       
HashMap context = new HashMap ();
        context
. put ( "var1" , one hundred and eleven );
        context
. put ( "var2" , two hundred and twenty-two );
       
Object result1 = el . evaluate ( context ); //555
        context
. put ( "var2" , three hundred and thirty-three );
       
Object result2 = el . evaluate ( context ); //777
       
System . out . println ( "result1:" );
       
System . out . println ( result1 );
       
System . out . println ( "result2:" );
       
System . out . println ( result2 );
   
}
}
Expand to read the full text

comment

Click to lead the topic 📣 Post and join the discussion 🔥
Published information
2011/11/26 00:00

Lite-20111106.jar Published

Lite, abbreviated from List Template, is a simple template engine consisting of a simple control instruction set and an expression parsing engine. The intermediate format parsed by template language consists of three data types: array, string, and integer. Array is the only composite type here, so I use List Template to name this template engine. List and Template take two initial letters respectively to form the word Lite. Lite-20111106.jar has not updated its JSEL expression, and the next version will update changelog 2.0A6 Lite (New): completely refactor the front-end template, function definition

zero
two
Published information
2010/08/09 00:00

Expression engine JSEL 2.0 Alpha3 publishing

JSEL is a simple expression interpretation engine based on reverse Polish structure and JS operation rules. It is also a JSON parsing engine. Download JSEL 2.0 Alpha3

two
two
No more
Loading failed, please refresh the page
Click to load more
Loading
next page
{{o.pubDate | formatDate}}

{{formatAllHtml(o.title)}}

{{parseInt(o.replyCount) | bigNumberTransform}}
{{parseInt(o.viewCount) | bigNumberTransform}}
No more
No content temporarily
Issued a question and answer
{{o.pubDate | formatDate}}

{{formatAllHtml(o.title)}}

{{parseInt(o.replyCount) | bigNumberTransform}}
{{parseInt(o.viewCount) | bigNumberTransform}}
No more
No content temporarily
No content temporarily
zero comment
twenty-two Collection
 OSCHINA
Log in to view more high-quality content
 Back to top
Top