home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 18 REXX
/
18-REXX.zip
/
REXXTACY.ZIP
/
RXCDOC20.TXT
< prev
next >
Wrap
Text File
|
1992-06-09
|
6KB
|
238 lines
REXXTACY: The REXX to C Translator
Anthony T. Green
Ruddock and Associates, Inc.
*** Introduction
* REXXTACY - The REXX to C translator
REXXTACY is a package which allows you to convert a REXX program into a
DOS or OS/2 executable. It does this by first translating the REXX source
into C code. You must then invoke the Microsoft C compiler, and link the
resulting object file with the REXXTACY runtime library.
The process of converting a REXX program to into C code consists of invoking
the REXXTACY program with your REXX source file as an argument.
REXXTACY will analyse the REXX source (myprog.cmd), perform some optimizations
on the code, and emit a C source file (myprog.c).
This C source is ready to compile with the Microsoft C compiler.
* Using this manual
The organization of this manual has been loosly based on IBM's OS/2 REXX
reference manual. Most sections of that manual have corresponding sections
in this document. This will make it easier for the user who wishes to find
any implementation differences between particular commands or control
structures.
Since there are only a small number of differences or omissions from REXX in
REXXTACY, the manual will seem rather sparse at points. Please be aware that
this manual is not intended to be a REXX reference manual - but rather a
description of the REXXTACY implementation.
* Using REXXTACY
REXXTACY has a number of command line options. Run REXXTACY -? for
usage information...
REXXTACY 2.0 - (C) 1992 Ruddock and Associates. All rights reserved.
Options -o Optimize REXX program
-p Debug parser.
-z Debug peephole optimizer.
-u Debug du & ud chain generation.
-g Debug constant and copy propagations.
-b Dump basic block information.
-h Display this message.
-? Display this message.
C files created with REXXTACY have the same name as the REXX file name,
but ending in .c.
Most of the other switches are for debugging (and entertainment) purposes
only. They tell REXXTACY to emit information pertaining to REXXTACY's
internal optimization efforts. If ever you encounter a bug in REXXTACY you
should run it again with all of these switches on, and pipe the output to a
file. This file is very useful in helping the author track down problems.
Many errors in a REXX program will be caught at compile time by REXXTACY.
However, REXXTACY provides extensive runtime error checks. A compiled REXX
program processing faulty data will emit descriptive error messages ---
with line numbers that refer back to the original REXX source file.
*** General Concepts
* Structure and General Syntax
REXXTACY input can be structured exactly like REXX input. It supports implicit
and explicit end of statement markers, statement continuation markers and C
style comments. However, hexadecimal and binary strings are not supported at
this time.
* Expressions and Operators
All of REXX's logical, arithmentic and comparison expressions and operators are
supported by REXXTACY --- including string abuttals and operator precedence
orders.
* Clauses and Instructions
REXXTACY supports all five REXX clause types:
1. NULL Clauses
2. Labels
3. Assignments
4. Keyword Instructions
5. Commands
* Assignments and Symbols
Constant symbols, simple symbols, compound symbols and stems are all supported
by REXXTACY. Assignments to these symbol types operate exactly as they do
in REXX. One limitation of the current version of REXXTACY is that REXX
keywords are are always recognized as keywords, independent of the lexical
context in which they appear. This means that, for instance, you may not have
a variable called SAY.
* Commands to External Environments
The only command processing environment that REXXTACY currently supports is
CMD (for OS/2) and COMMAND (for DOS). Commands to this environment may be
issued exactly as they are in REXX, however, they are executed in a subcommand
shell rather than as a callback to the parent shell (as in the case of OS/2).
*** Keyword Instructions
* ADDRESS
Not implemented. All commands are routed to the OS/2 or DOS command shell.
* ARG
Implementation identical to that of REXX.
* CALL
Implementation identical to that of REXX, with the omission of:
* CALL ON
* CALL OFF
* DO
Implementation identical to that of REXX.
* DROP
Not implemented.
* EXIT
Implementation identical to that of REXX.
* IF
Implementation identical to that of REXX.
* INTERPRET
Not implemented.
* ITERATE
Not implemented.
* LEAVE
Not implemented.
* NOP
Implementation identical to that of REXX.
* NUMERIC
Not implemented.
* OPTIONS
Not implemented.
* PARSE
Implementation identical to that of REXX except for the omissions of
* PARSE SOURCE.
* PROCEDURE
Implementation identical to that of REXX.
* PULL
Implementation identical to that of REXX.
* PUSH
Not implemented.
* QUEUE
Not implemented.
* RETURN
Implementation identical to that of REXX.
* SAY
Implementation identical to that of REXX.
* SELECT
Implementation identical to that of REXX.
* SIGNAL
Not implemented.
* TRACE
Not implemented.
*** Functions
Function calls in REXXTACY operate exactly as they do in REXX. Built in
functions that are supported in REXXTACY include:
* LENGTH
* LINEIN (No support for device names, line or count parameters)
* LINES (No support for device names)