FScript

FScript
FScript Docs
FscriptME Docs
Download

Overview

FScript is an extremely simple scripting language. Its intended use is as an embedded language in other Java programs. It is very simple to embed - it can be as simple as sub-classing one class to add your own functionality. However is not a complete programming language, as it has no library of standard functions (such as IO and string processing). FScript supplies a base functionality (such as flow control, variable handling and basic math operations) that can extended by the host application.

As of version 1.1 it is possible to access Java objects from within a FScript script(in some ways similar to what can be done with Jython), this increases the number of potential applications for FScript considerably

For a good complete embedable programming language I suggest you look at:

jython - an implementation of the excellent Python language in Java.
Rhino - an implementation of JavaScript in Java.

Both of these are also fully embedable, and have sane licenses.

FScript however is around 30k as a jar file, and is only a few thousand lines of source. So if the functionality you are looking for is more than a simple configuration file parser, but less than a full blown programming language FScript could be for you.

A quick rundown of FSCript's features:

  • Three supported data types (string,integer,double)
  • Conditional execution ('if' statements)
  • Loops ('while')
  • Functions (including recursive functions)
  • Local & global variable scope
  • The usual range of logic and math operators.
  • The only requirement is a Java 2 runtime environment.

    FScriptME

    FScriptME is a version of FScript tailored to the J2ME environment. It is still in beta, but is based on FScript code and as such should be fairly stable. It is suitable for implementing a simple scripting language on small/embedded devices

    FScript is Copyright (c) murlen 2000-2002, and released under the Library Gnu Public License.

    FScriptME is Copyright (c) murlen 2002, and released under the Gnu Public License.

    Contact me if you have specific licensing needs that cannot be met within the LGPL (for FSCript) and GPL (for FScriptME) as I may be willing to amend the licensing for specific projects

    Downloading

    The latest version of FSCript and FSCriptME may be downloaded as a gzipped tar file, containing sorce, documentation and a Jar file from sourceforge.net.


    SourceForge Logo