Expression evalution code

Discussion in 'Java' started by Robert M. Gary, Feb 1, 2005.

  1. I'm looking for some sort of expression evaluation code. I want my customer
    to be able to send me something like (if foo="hello" and j> 0 ) to
    *dynamically* control logic flow. I don't want them to have to install a
    java compiler so I'm not as interested in javacc.
    I noticed that the JSP package as an expression evaluation language
    (http://java.sun.com/j2ee/1.4/docs/tutorial/doc/JSPIntro7.html) but it
    appears to be attached to JSP (which I'm not using). I wonder if I could
    pull it out and construct fake pages to serve it.
    Does anyone know of an existing avialable quicky syntax language evaluator
    for this type of application? Even a lex/yacc would be a start.

    -Robert
     
    Robert M. Gary, Feb 1, 2005
    #1
    1. Advertising

  2. In article <>,
    "Robert M. Gary" <> wrote:

    > I'm looking for some sort of expression evaluation code. I want my customer
    > to be able to send me something like (if foo="hello" and j> 0 ) to
    > *dynamically* control logic flow. I don't want them to have to install a
    > java compiler so I'm not as interested in javacc.
    > I noticed that the JSP package as an expression evaluation language
    > (http://java.sun.com/j2ee/1.4/docs/tutorial/doc/JSPIntro7.html) but it
    > appears to be attached to JSP (which I'm not using). I wonder if I could
    > pull it out and construct fake pages to serve it.
    > Does anyone know of an existing avialable quicky syntax language evaluator
    > for this type of application? Even a lex/yacc would be a start.
    >
    > -Robert


    That's essentially what javacc is. It's not a compiler for end users.
    Instead, it's a tool for developers to construct a language syntax and
    generate code for that language. The application I work on does
    simulation and modeling, and it supports its own Expression language.
    The entire expression language is built around javacc grammar
    definitions so that users can type text into an editor that's part of
    our application and have it evaluated and executed in Java code we
    derived from what javacc creates. It's not trivial.

    = Steve =
    --
    Steve W. Jackson
    Montgomery, Alabama
     
    Steve W. Jackson, Feb 1, 2005
    #2
    1. Advertising

  3. Robert M. Gary

    digidigo Guest

    digidigo, Feb 2, 2005
    #3
  4. Robert M. Gary wrote:

    > I'm looking for some sort of expression evaluation code. I want my customer
    > to be able to send me something like (if foo="hello" and j> 0 ) to
    > *dynamically* control logic flow. I don't want them to have to install a
    > java compiler so I'm not as interested in javacc.
    > I noticed that the JSP package as an expression evaluation language
    > (http://java.sun.com/j2ee/1.4/docs/tutorial/doc/JSPIntro7.html) but it
    > appears to be attached to JSP (which I'm not using). I wonder if I could
    > pull it out and construct fake pages to serve it.
    > Does anyone know of an existing avialable quicky syntax language evaluator
    > for this type of application? Even a lex/yacc would be a start.
    >
    > -Robert
    >
    >

    Have you looked at Beanshell? http://www.beanshell.org, it sounds
    exactly what you're looking for.

    Pan
    ========================================================
    TechBookReport - Java: http://www.techbookreport.com/JavaIndex.html
     
    TechBookReport, Feb 2, 2005
    #4
  5. That sounds pretty cool!

    I've also run across JEL http://galaxy.fzu.cz/JEL/ which looks really cool.
    The examples are set up using predefined variables (but the valuation and
    comparisons are dynamic). I want to see if I can make the variables
    themselves dynamic.

    -Robert


    "TechBookReport" <> wrote in message
    news:ctq7ut$qrk$...
    > Robert M. Gary wrote:
    >
    >> I'm looking for some sort of expression evaluation code. I want my
    >> customer to be able to send me something like (if foo="hello" and j> 0 )
    >> to *dynamically* control logic flow. I don't want them to have to install
    >> a java compiler so I'm not as interested in javacc.
    >> I noticed that the JSP package as an expression evaluation language
    >> (http://java.sun.com/j2ee/1.4/docs/tutorial/doc/JSPIntro7.html) but it
    >> appears to be attached to JSP (which I'm not using). I wonder if I could
    >> pull it out and construct fake pages to serve it.
    >> Does anyone know of an existing avialable quicky syntax language
    >> evaluator for this type of application? Even a lex/yacc would be a start.
    >>
    >> -Robert

    > Have you looked at Beanshell? http://www.beanshell.org, it sounds exactly
    > what you're looking for.
    >
    > Pan
    > ========================================================
    > TechBookReport - Java: http://www.techbookreport.com/JavaIndex.html
     
    Robert M. Gary, Feb 2, 2005
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. VSK
    Replies:
    2
    Views:
    2,398
  2. =?iso-8859-1?B?bW9vcJk=?=

    Matching abitrary expression in a regular expression

    =?iso-8859-1?B?bW9vcJk=?=, Dec 1, 2005, in forum: Java
    Replies:
    8
    Views:
    886
    Alan Moore
    Dec 2, 2005
  3. GIMME
    Replies:
    3
    Views:
    12,053
    vforvikash
    Dec 29, 2008
  4. KidLogik
    Replies:
    5
    Views:
    7,096
    David Rubin
    Feb 3, 2004
  5. snacktime
    Replies:
    13
    Views:
    586
    Dan Sommers
    Feb 22, 2005
Loading...

Share This Page