shindig-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jacky Wang (JIRA)" <>
Subject [jira] Updated: (SHINDIG-1137) Implement the Expression evaluator for JSP EL-like OpenSocial Template language
Date Mon, 03 Aug 2009 09:53:14 GMT


Jacky Wang updated SHINDIG-1137:

    Attachment: expression_lexer.patch

This patch implemented a clearly support for its evaluating.

Basically, it contains 3 parts:

1) ExpType, it defines types like int / float / string / bool / array / object etc. and handles
the type coercing as well.
2) ExpLexer, which tokenizes the input expression string into intermediate tokens which will
be handled in the later stage.
3) ExpParser, which evaluates the input token stream under a given data context.

Excepts the functionalities like operation computing, function calls etc, the capability of
input expression validation is also provided.  Unit-tests are included, too.

Some highlights of this parser:
1) handles tricky string in the right way, e.g. 'this is \\\'"the	tricky	string"\''
2) scientific floating parsing, e.g. .5e-3
3) nested unary operator, e.g.  5+---0.2e-3+1
4) nested ternary, e.g. a?b:c?d:e / a?(b?c:d):e
5) scoped variable: no_prefix, Cur, Top
6) access un-exist attribute should return null (it's different with JSP EL's spec)
7) nested attribute access: a[b].c

code review sees here:

> Implement the Expression evaluator for JSP EL-like OpenSocial Template language
> -------------------------------------------------------------------------------
>                 Key: SHINDIG-1137
>                 URL:
>             Project: Shindig
>          Issue Type: Improvement
>          Components: PHP
>         Environment: N/A
>            Reporter: Jacky Wang
>            Priority: Critical
>         Attachments: expression_lexer.patch
>   Original Estimate: 336h
>  Remaining Estimate: 336h
> The expression language used in OpenSocial templating system is a JSP EL-like one.  We
need a EL evaluator which could do the following items correctly:
> 1) number / boolean operation
> 2) function calls
> 3) string handling
> 4) ternary conditional workflow
> 5) data context de-reference
> 6) nested structures

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message