Simple Forth Interpreter
Welcome to the SFI website. The Simple Forth Interpreter (SFI in short) is a Java™ implementation of a little subset of the ANS Forth language.
The goal of SFI is to develop a small interpreter to be embedded in any application and provide scripting functionality with low resources.
SFI follows the ANS Forth standard where reasonably possible, provides a simple way by inheritance to customize and integrate the interpreter in any existing application and a simple interface to play with the Forth code.
Why Forth? The interpreter it's pretty simple and small, it's an easy to learn language and the 'extend with user defined words' fits quite well the idea of a language for scripting purposes.
News
Mar 29
Tasnim Ahmed has ported SFI to J2ME and contributed the code under SFI license.
Jun 10
I've removed the anonymous CVS access. Now I'll do snapshots from time to time.
May 12
Ok. The multiline comment fix was silly. I've reverted that change.
May 11
Two fixes in the CVS version of SFI, parsing multiline comments and storing strings.
I've updated the applet to CVS version of the interpreter.
Mar 25
SFI 1.0 released. It's the same than RC1 + javadoc documentation.
Feb 07
SFI 1.0 RC1 released. It has an important bug fix for TOK_NWORD when parsing comments and quotes.
Feb 02
SFI 1.0 RC0 it's out! I've just finished the methods to add system defined words and the interpreter is ready for first release. Check the java doc, the classes won't change.
Finally I've added a system word to the example interpreter: RANDOM (a -- b ; b is a random value between 0 and a-1)
Im going to test the whole thing. The applet is updated, bug reports are welcome!
Documentation
There's some documentation, sometimes in Spanish, sometimes in English. I would appreciate any help translating those documents (mainly from Spanish to English) and/or corrections in available translations.
About SFI
- Un intérprete sencillo (es).
- javadoc for sfi 2004-03-25 (en).
About Forth
- The Forth programming language from the Wikipedia.
- The #forth Portal, the website of the #forth channel at irc.freenode.net.
- There's a nice Forth tutorial by Phil Burk.
- Another little Forth introduction.
- The Forth ANS (approved March 24, 1994).
Releases
The Simple Forth Interpreter is an Open Source project that must be used an distributed according the SFI License.
Current release SFI 1.0 (2004-03-25 ChangeLog)
Previous releases:
SFI 1.0 RC1 (2004-02-07)
SFI 1.0 RC0 (2004-02-02)
SFI development is in 'stand by' now, only commiting bug fixes. You can get latest development snapshot: sfi_20040610.tar.gz.
You can try the online script tester applet (JVM compatible with Sun's J2RE 1.4.2 requited). May be it's outdated.
Contributed code and packages
- Tasnim Ahmed has ported SFI to J2ME
You can download SFI J2ME edition (2005-03-29) and run Forth code from your mobile devices! The package contains the source code (with NetBeans project files) and a distributable build ready to go. The bundle is Free Software distributed under SFI License.
Copyright © 2004 Juan J. MartÃnez <jjm *at* usebox.net>.
All rights reserved.
Java is a trademark of Sun Microsystems, Inc. in the United States and other countries. The Simple Forth Interpreter is independent of Sun Microsystems, Inc.