home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 18 REXX / 18-REXX.zip / REXXTACY.ZIP / RXCDOC20.TXT < prev    next >
Text File  |  1992-06-09  |  6KB  |  238 lines

  1. REXXTACY: The REXX to C Translator
  2.  
  3. Anthony T. Green
  4.  
  5. Ruddock and Associates, Inc.
  6.  
  7.  
  8. *** Introduction
  9.  
  10. * REXXTACY - The REXX to C translator
  11.  
  12. REXXTACY is a package which allows you to convert a REXX program into a
  13. DOS or OS/2 executable. It does this by first translating the REXX source 
  14. into C code. You must then invoke the Microsoft C compiler, and link the 
  15. resulting object file with the REXXTACY runtime library.
  16.  
  17. The process of converting a REXX program to into C code consists of invoking 
  18. the REXXTACY program with your REXX source file as an argument.
  19. REXXTACY will analyse the REXX source (myprog.cmd), perform some optimizations
  20. on the code, and emit a C source file (myprog.c).
  21. This C source is ready to compile with the Microsoft C compiler.
  22.  
  23. * Using this manual
  24.  
  25. The organization of this manual has been loosly based on IBM's OS/2 REXX
  26. reference manual. Most sections of that manual have corresponding sections
  27. in this document. This will make it easier for the user who wishes to find
  28. any implementation differences between particular commands or control 
  29. structures.
  30.  
  31. Since there are only a small number of differences or omissions from REXX in
  32. REXXTACY, the manual will seem rather sparse at points. Please be aware that
  33. this manual is not intended to be a REXX reference manual - but rather a
  34. description of the REXXTACY implementation.
  35.  
  36. * Using REXXTACY
  37.  
  38. REXXTACY has a number of command line options. Run REXXTACY -? for 
  39. usage information... 
  40.  
  41. REXXTACY 2.0 - (C) 1992 Ruddock and Associates.  All rights reserved.
  42.  
  43. Options    -o      Optimize REXX program
  44.         -p      Debug parser.
  45.         -z      Debug peephole optimizer.
  46.         -u      Debug du & ud chain generation.
  47.         -g      Debug constant and copy propagations.
  48.         -b      Dump basic block information.
  49.         -h      Display this message.
  50.         -?      Display this message.
  51.  
  52. C files created with REXXTACY have the same name as the REXX file name, 
  53. but ending in .c.
  54.  
  55. Most of the other switches are for debugging (and entertainment) purposes
  56. only. They tell REXXTACY to emit information pertaining to REXXTACY's 
  57. internal optimization efforts. If ever you encounter a bug in REXXTACY you
  58. should run it again with all of these switches on, and pipe the output to a 
  59. file. This file is very useful in helping the author track down problems.
  60.  
  61. Many errors in a REXX program will be caught at compile time by REXXTACY.
  62. However, REXXTACY provides extensive runtime error checks. A compiled REXX
  63. program processing faulty data will emit descriptive error messages ---
  64. with line numbers that refer back to the original REXX source file.
  65.  
  66.  
  67. *** General Concepts
  68.  
  69. * Structure and General Syntax
  70.  
  71. REXXTACY input can be structured exactly like REXX input. It supports implicit
  72. and explicit end of statement markers, statement continuation markers and C
  73. style comments. However, hexadecimal and binary strings are not supported at
  74. this time.
  75.  
  76. * Expressions and Operators
  77.  
  78. All of REXX's logical, arithmentic and comparison expressions and operators are
  79. supported by REXXTACY --- including string abuttals and operator precedence 
  80. orders.
  81.  
  82. * Clauses and Instructions
  83.  
  84. REXXTACY supports all five REXX clause types:
  85.  
  86.     1. NULL Clauses
  87.         2. Labels
  88.         3. Assignments
  89.         4. Keyword Instructions
  90.         5. Commands
  91.  
  92. * Assignments and Symbols
  93.  
  94. Constant symbols, simple symbols, compound symbols and stems are all supported
  95. by REXXTACY. Assignments to these symbol types operate exactly as they do 
  96. in REXX. One limitation of the current version of REXXTACY is that REXX 
  97. keywords are are always recognized as keywords, independent of the lexical 
  98. context in which they appear. This means that, for instance, you may not have 
  99. a variable called SAY.
  100.  
  101. * Commands to External Environments
  102.  
  103. The only command processing environment that REXXTACY currently supports is 
  104. CMD (for OS/2) and COMMAND (for DOS). Commands to this environment may be 
  105. issued exactly as they are in REXX, however, they are executed in a subcommand
  106. shell rather than as a callback to the parent shell (as in the case of OS/2).
  107.  
  108.  
  109. *** Keyword Instructions
  110.  
  111. * ADDRESS
  112.  
  113. Not implemented. All commands are routed to the OS/2 or DOS command shell.
  114.  
  115.  
  116. * ARG
  117.  
  118. Implementation identical to that of REXX.
  119.  
  120.  
  121. * CALL
  122.  
  123. Implementation identical to that of REXX, with the omission of:
  124.     * CALL ON
  125.         * CALL OFF
  126.  
  127.  
  128. * DO
  129.  
  130. Implementation identical to that of REXX.
  131.  
  132.  
  133. * DROP
  134.  
  135. Not implemented.
  136.  
  137.  
  138. * EXIT
  139.  
  140. Implementation identical to that of REXX.
  141.  
  142.  
  143. * IF
  144.  
  145. Implementation identical to that of REXX.
  146.  
  147.  
  148. * INTERPRET
  149.  
  150. Not implemented.
  151.  
  152.  
  153. * ITERATE
  154.  
  155. Not implemented.
  156.  
  157.  
  158. * LEAVE
  159.  
  160. Not implemented.
  161.  
  162.  
  163. * NOP
  164.  
  165. Implementation identical to that of REXX.
  166.  
  167.  
  168. * NUMERIC
  169.  
  170. Not implemented.
  171.  
  172.  
  173. * OPTIONS
  174.  
  175. Not implemented.
  176.  
  177.  
  178. * PARSE
  179.  
  180. Implementation identical to that of REXX except for the omissions of
  181.     * PARSE SOURCE.
  182.  
  183.  
  184. * PROCEDURE
  185.  
  186. Implementation identical to that of REXX.
  187.  
  188.  
  189. * PULL
  190.  
  191. Implementation identical to that of REXX.
  192.  
  193.  
  194. * PUSH
  195.  
  196. Not implemented.
  197.  
  198.  
  199. * QUEUE
  200.  
  201. Not implemented.
  202.  
  203.  
  204. * RETURN
  205.  
  206. Implementation identical to that of REXX.
  207.  
  208.  
  209. * SAY
  210.  
  211. Implementation identical to that of REXX.
  212.  
  213.  
  214. * SELECT
  215.  
  216. Implementation identical to that of REXX.
  217.  
  218.  
  219. * SIGNAL
  220.  
  221. Not implemented.
  222.  
  223.  
  224. * TRACE
  225.  
  226. Not implemented.
  227.  
  228.  
  229. *** Functions
  230.  
  231. Function calls in REXXTACY operate exactly as they do in REXX. Built in
  232. functions that are supported in REXXTACY include:
  233.  
  234.     * LENGTH
  235.         * LINEIN (No support for device names, line or count parameters)
  236.         * LINES (No support for device names)
  237.  
  238.