Taurus opl2java Translator v1.10
The following release notes are applicable to the above version of the Taurus opl2java Translator. The copyright notice is applicable to any version of the translator unless stated otherwise.

Copyright and Copyleft

Unlike other Taurus Software, the opl2java translator and its sources are covered by the GNU Public Licence. This is because opl2java has been produced using Bison and Flex and includes some GNU code (part of using Bison).

That which is normally referred to as the Taurus OPL Library, namely the psion.opl Java library and opllib C library are (C) Copyright Taurus Software, 1999. This is separate software (used to support the opl2java runtime) and is NOT bound by the GNU Public Licence.

Copyright notice (applies to Taurus OPL Library)

Taurus Software hereby grants you a non-exclusive, non-transferable limited licence (without the right to sub-licence) under Taurus Software's intellectual property rights. The licence entitles you to freely use, for personal, non-commercial use only, but not to distribute, the Taurus OPL Library. All binaries and code remain exclusively copyright Taurus Software.

Taurus opl2java Translator is a trademark of Taurus Software. Java is a trademark or registered trademark of Sun Microsystems, Inc. All other product names mentioned herein are the trademarks of their respective owners.

THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRIGEMENT. TAURUS SOFTWARE ACCEPTS NO RESPONSIBILTY FOR ANY DAMANGE, OF ANY KIND, CAUSED BY THE USE, OR MIS-USE OF THIS SOFTWARE. BY USING THIS SOFTWARE YOU AGREE TO THE LICENCING TERMS HEREIN.

TAURUS SOFTWARE RESERVES THE RIGHT TO REVOKE THIS LICENCE AT ANY TIME, FOR ANY REASON. THE "FREE" STATUS OF THIS SOFTWARE IS TEMPORARY, DUE TO THE TIME AND EFFORT DEVOTED TO THIS PROJECT IT IS LIKELY TO BECOME "SHAREWARE", BUT IS UNLIKELY TO BE MADE INTO A COMMERCIAL PRODUCT.

All references to Taurus Software directly refer to the non-profit freeware/shareware software development unit run from the UK by myself. Any conflict with names of companies inside or outside of the UK is unintentional and should be disregarded.

Purpose

To allow OPL programs to be moved to or tested on other platforms.

How it works

OPL source code is parsed and then the resulting parse tree is dumped in another programming language. Built-in OPL functions and procedures are translated into library calls and a runtime library emulates this functionality.

Operation

Copy your OPL sources to your development platform (using 3Link or similar). In this example, the source file is "example.opl". At the command line type:

opl2java -Mj -V -x example.opl

This will produce a file called example.java, containing a single Java class called "example". To compile this, you will need "javac" in you path and the opl2java directory in your classpath (the directory above the psion directory for the psion.opl library). You can now javac the file in the normal way, or do a one step translate and compile:

opl2java -Mj -V example.opl

opl2java will invoke the Java compiler for you.

The resulting class file can then be executed.

A similar process is used to create applets, but instead specify -MJ. The applet can be run by creating a HTML file with an <applet> tag. This can then be tested with "appletviewer".

If your application uses any resource files (e.g. PIC files), then these can be placed in a ZIP file and downloaded in one go when the applet starts up. You need to specify the ZIP file in your applet tag:

  <applet code="patience.class" width=480 height=160>
    <param name="ResourceZIPFile" value="patience.zip">
  </applet>
This will speed up the running of the application over the Internet. Another use for this technique is for websites that only allow certain file extensions to be uploaded (.PIC not being one of them).

Platform Support

The Taurus opl2java Translator version 1.10 is provided in binary form for the following platforms:
  • Windows NT/95
  • Linux-i386

What's Supported

The translator supports the following keywords:

APP AND BUSY CHR$ DEFAULTWIN DO ELSE ELSEIF ENDA ENDP ENDIF ENDWH EXIT FONT gAT
gBOX gCLOSE gCLS gCOPY gCREATE GETEVENT GIPRINT gLINEBY gLOADBIT GLOBAL gFILL
gFONT gGREY gMOVE gPRINT gSTYLE gTMODE gUSE IF LOCAL mCARD MENU mINIT NUM$ OFF
ON OR PRINT PROC RANDOMIZE RETURN RND SECOND STATUSWIN UNTIL WHILE

The OPL language syntax (IFs, WHILEs etc) is pretty much complete and most of the simple OPL functions (e.g. gCREATE) and procedures (e.g. gUSE) are implemented in some form or other. The latter are implemented in a separate library, so can be upgraded independantly of the translator. Further keywords can be added to the translator by simple modification of the lexer.

Currently the translator supports the following language options:

  • j - Java applications for use with JDK 1.1.x upwards
  • J - Java applets for use with JDK 1.1.x upwards
  • c - RISCOS C for use with the Acorn Archimedes range of machines
The runtime library "psion.opl" supports several key features:

  • Emulation of OPL graphics windows and bitmaps.
  • Emulation of the Psion keyboard (Ctrl = Psion key).
  • Loading of Series 3 files (a filter provides correct endian'ness).
  • Loading and conversion of Series 3a .pic files (black and grey only).

What's Not Supported

Currently the translator and runtime library do not support:

  • Keywords other than those listed above
  • Textual functions (PRINT etc), only the graphical versions of these (gPRINT)
  • Functions with variable numbers of arguments (PRINT etc)
  • Menus (use hotkeys instead)
  • Fonts
  • OS Calls
Series 5 OPL32 has not been attempted.

History

  • v1.10 - Simultaneous C and Java generation from the same binary. Added support for Java Applet generation. NT version can now take paramters. Added type checking for correct expression generation. Added ZIP file support.
  • v1.00 - Switched to NT Development and added Java generation.
  • v0.10 - Acorn Archimedes version which produced RISCOS C code.

Support

The translator is offered with no warranty and no support. I cannot guarentee it will run on your machine, and any programs written specifically to work with the translator are not guarenteed to run on future versions. The translator should not corrupt any files on your machine, but I cannot make any guarentees, and will not be held liable to damage caused either directly or indirectly by this software. If you have valuable data on your machine, then please back it up first.

Missing features, bugs etc. will be fixed as part of the development procedure, so keep checking the website for updates.

Feedback

Please feel free to send any CONSTRUCTIVE comments to .
Last updated 22:14 on Sun 21st Nov 1999
Comments