Issue Details (XML | Word | Printable)

Key: JEXL-4
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Unassigned
Reporter: Barry Lagerweij
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Commons JEXL

[jexl] Contribution on ASTAssignment and ASTStatementExpression

Created: 08/Nov/04 02:35 PM   Updated: 16/May/06 12:18 PM
Return to search
Component/s: None
Affects Version/s: 1.0
Fix Version/s: None

Time Tracking:
Not Specified

File Attachments:
  Size
Text File jexl-diff.txt 2004-11-08 02:37 PM Barry Lagerweij 3 kB
Environment:
Operating System: other
Platform: Other

Bugzilla Id: 32110


 Description  « Hide
I've successfully used JEXL in a project I'm working on at the moment. We
needed a flexible rule engine, with simple but powerful expressions, and
JEXL proofed to be just that.

There was one minor flaw in JEXL: It support expressions, but does not
support assignments.

For example, the following expression did not work:

a = 1+2;

(Although the grammar is ready for it...)

I've attached a cvs diff, with my additions to ASTAssignment,
ASTStatementExpression and ASTReferenceExpression. Mostly, my changes
involve implementing the 'value' method. ASTAssignment now actually tries to
assign a value to a reference variable.

It is possible that I've misinterpreted the evaluation/visitor pattern, but
the changes worked for me.

I hope that you'll find my additions of any use.

With kind regards,

Barry



 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
There are no subversion log entries for this issue yet.