Wyjec Tools package contains a few standard tools very helpful in the process of developing and testing Wyjec functions. With an additional deployment environment they may be also used by end-users for learning and evaluating Wyjec. Currently, the package contains three tools described below.
WyjecTool is a command line tool for evaluating Wyjec expression given as an argument, with a possibility to use both standard Wyjec functions, functions provided by additional Java classes and functions described in XML files (without an implementation). Additionally, it may be used to test correctness of expressions examples stored in your functions' javadoc.
The main class of the WyjecTool is pl.chyla.wyjec.cli.WyjecTool, so you can use the following simple script for evaluating expressions.
#!/bin/sh
exec java -cp wyjec/build:wyjec-tools/build pl.chyla.wyjec.cli.WyjecTool "$@"
Wyjec applet is a Java applet allowing you to evaluate Wyjec expression from a Web page. It uses standard Wyjec implementation, together with all standard functions and constants.
The Wyjec applet can be placed on a Web page using standard techniques for embedding Java applets inside HTML or XHTML code. The recommended approach involves using <object> element with pl.chyla.wyjec.applet.AppletEvaluator class as the main class of the applet.
<object type="application/x-java-applet"
classid="java:pl/chyla/wyjec/applet/AppletEvaluator.class"
archive="wyjec.jar,wyjec-tools.jar"
width="320" height="200">
Wyjec applet requires Java plugin.
<object/>
The applet supports an optional parameter named "expression" which contains Wyjec expression to be displayed in the applet's text entry after loading. The default expression will be also evaluated during initialisation of the applet. To pass a parameter to the applet, use <param> element with attribute "name" set to "expression" and attribute "value" set to the expression to show.
<param name="expression" value="1 + 2 = {+|{1}|{2}}"/>
The examples above will not work with Internet Explorer from Microsoft. Fortunately, this problem may be easily worked around thanks to XHTML's mechanism for specifying alternate object renderings. Take a look at a source code of http://zbigniew.chyla.pl/wyjec/applet/ page for details.
Wyjec functions doclet is a doclet for the javadoc tool extracting information about Wyjec functions from a source code of Java classes that implement them. The main purpose of this tool is generating documentation for Wyjec functions.
© Copyright by Zbigniew Chyla 2005