simple language interpreter to call Java methods (rules engines)

Discussion in 'Java' started by C B, Sep 8, 2004.

  1. C B

    C B Guest

    I am looking for simple language interpreters to be able to be plugged
    into Java, that could call real Java methods.

    JESS appears to be able to do so with a lisp like language.
    Rete r = new Rete();
    r.executeCommand("(deffunction square (?n) (return (* ?n ?n)))");
    Value v = r.executeCommand("(square 3)");
    // Prints '9'
    System.out.println(v.intValue(r.getGlobalContext()));

    It would be cool to be able to do this with the JSP 2.0 Expression
    Language (EL). However looking at
    http://jakarta.apache.org/commons/el/api/index.html it doesn't appear
    clear how to do this, or if it was intended to be used by itself (with
    out JSPs...).

    Is there a set of Javascript Java classes that I could plug in?

    Any other suggestions for rules engines?
    C B, Sep 8, 2004
    #1
    1. Advertising

  2. C B

    Ike Guest

    Jython

    "C B" <> wrote in message
    news:...
    > I am looking for simple language interpreters to be able to be plugged
    > into Java, that could call real Java methods.
    >
    > JESS appears to be able to do so with a lisp like language.
    > Rete r = new Rete();
    > r.executeCommand("(deffunction square (?n) (return (* ?n ?n)))");
    > Value v = r.executeCommand("(square 3)");
    > // Prints '9'
    > System.out.println(v.intValue(r.getGlobalContext()));
    >
    > It would be cool to be able to do this with the JSP 2.0 Expression
    > Language (EL). However looking at
    > http://jakarta.apache.org/commons/el/api/index.html it doesn't appear
    > clear how to do this, or if it was intended to be used by itself (with
    > out JSPs...).
    >
    > Is there a set of Javascript Java classes that I could plug in?
    >
    > Any other suggestions for rules engines?
    Ike, Sep 9, 2004
    #2
    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. NOBODY
    Replies:
    2
    Views:
    377
    NOBODY
    Oct 30, 2004
  2. Cindi Jenkins

    Rules Engines - Best Practices?

    Cindi Jenkins, Nov 29, 2004, in forum: Java
    Replies:
    8
    Views:
    1,232
    Edward G. Nilges
    Dec 6, 2004
  3. eyalkz
    Replies:
    3
    Views:
    5,136
    Alexei Cioina
    Oct 29, 2003
  4. eyalkz

    build an interpreter for a simple language

    eyalkz, Oct 29, 2003, in forum: C Programming
    Replies:
    2
    Views:
    577
    Tristan Miller
    Oct 29, 2003
  5. Replies:
    3
    Views:
    748
    Ziga Seilnacht
    Jan 3, 2007
Loading...

Share This Page