Uploaded image for project: 'Commons JEXL'
  1. Commons JEXL
  2. JEXL-4

[jexl] Contribution on ASTAssignment and ASTStatementExpression

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.0
    • Fix Version/s: None
    • Labels:
      None
    • Environment:

      Operating System: other
      Platform: Other

    • Bugzilla Id:
      32110

      Description

      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

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              blagerweij@gmail.com Barry Lagerweij
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: