Short: Read/execute non-Amiga Maple worksheets Uploaded: 73227.2656@compuserve.com (Joe Veazey) Author: jveazey@bmc.com (Joe Veazey) Type: misc/math ReadWorkSheet.rexx is an Arexx program to read and execute Maple worksheets from non-Amiga platforms. Below is the man page for ReadWorkSheet.rexx. FORMAT ReadWorkSheet [Filename | ?] [TRACE] [TOKENTRACE] [PARSETRACE] [LIST] [NOMAPLE] [ASYNC] TEMPLATE Filename,TRACE/S,TOKENTRACE/S,PARSETRACE/S,LIST/S,NOMAPLE/S,ASYNC/S PURPOSE Allow Amiga Maple V R3 to read worksheets produced by other Maple versions and platforms SPECIFICATION ReadWorkSheet.rexx is an Arexx program to read and parse any Maple worksheet produced by any platform or Maple version. Text regions and input regions will be passed to the Amiga Maple engine to be processed. The filename can be replaced with ? to obtain this help output. The TRACE keyword causes an Arexx 'Trace Results' to be issued and is meant for debugging ReadWorkSheet itself. TOKENTRACE will display each and every token from the worksheet as it is read. Also used for debugging or checking out the syntax of a new worksheet format. PARSETRACE traces the entry and exit of all parse subroutines, with indentation. Various significant data from the worksheet will also be displayed. LIST will list the contents of the entire worksheet to STDOUT, as it is parsed. NOMAPLE will parse only, and can be used without starting up Maple first. ASYNC will allow the parse to continue asynchronously with Maple's execution. Otherwise, the parse will wait for Maple to stop calculating before sending it any input string that requires computation. IMPLEMENTATION ReadWorkSheet.rexx uses recursive descent parsing to parse the Maple worksheet. The syntax of a Maple Worksheet is described in psuedo-BNF format in comments within the program. There are also several useful subroutines for parsing (GetChar, UnGetChar, GetToken, UnGetToken, ParseTrace, ParseTraceEntry, ParseTraceExit, and TokenTrace. Unfortunately, ReadWorkSheet.rexx can run very slowly, as it must skip over all of the worksheet text that represents graphics data, typeset math expressions, or Maple output. The syntax of Maple worksheets was derived by careful examination of numerous Maple worksheets, many of which were obtained from the Net. This program was motivated by the fact that Amiga Maple on my machine, in my environment, gurus when fed a non-Amiga Maple worksheet. If you encounter a valid Maple worksheet that causes ReadWorkSheet.rexx to report a syntax error, please lha it, uuencode that, and email the result to me at: 73227.2656@compuserve.com I also welcome any other comments, bug reports, or suggestions. AUTHOR Joe Veazey E-Mail: 73227.2656@compuserve.com