
This document describes:
  How to compile the TWS system for x86 DOS/Windows environments.



BRIEF INSTRUCTIONS
==================

  1.  Download and install DJGPP (http://www.delorie.com)  ** SEE BELOW **
  2.  Download and install TWS (into c:\tws)
  3.  Go to a command prompt, go to the TWS directory and run "make".  GCC should compile, wait for the FIRST ERROR (something like "y.tab.h:16: parse error before `yylval'"). 
  4.  Type "edit pgen\y.tab.h" and remove the last line ("extern YYSTYPE yylval;") from that file.  Save and exit EDIT.
  5.  Run "make" again.  Wait for the SECOND ERROR (something like "y.tab.h:20: parse error before `yylval'").
  6.  Type "edit tiny\parser\y.tab.h" and remove the last line from that file.  Save and exit EDIT.
  7.  Run "make" again.
  8.  TWS, A-Machine interpreter, and stock Tiny compiler should now be fully compiled.  To compile and run Tiny programs, use the TC.BAT file found in the Tiny subdirectory (i.e. "c:\tws\tiny).   (e.g. "tc tests\p4" will compile and run the Tiny program contain in tests\p4).

NOTES:
  * Bison adds an unnecessary line to y.tab.h files.  Therefore, after each time bison runs (such as after modifying the parser, e.g. tiny\parser\parse.tiny), you will need to edit y.tab.h and remove the last line that begins with the keyword "extern".   *** at this time there is no known work around ***
  * You can ignore warnings and file not found errors.



Obtain DJGPP binaries from delorie Software (http://www.delorie.com)
====================================================================

*******
STEP 1:  Download DJGPP from the Internet
*******

  STEP 1a
  -------
  DJ's GNU Programming Platform (DJGPP) is a set of GNU development tools ported to the Microsoft DOS/Windows environment.   The primary benefit of using DJGPP is that it provides a gcc compiler that runs under Microsoft Windows and supports long filenames, and it is free.

  There are many interesting things available at the delorie website.  However, all we need is about 2.43mb of software.  From http://www.delorie.com, select the "Zip Picker" link under the "DJGPP" link.  After doing so, you can select a variety of options.  The files are compressed with Zip.  Therefore, be sure you have WinZip or the GNU UnZip utility before you start downloading.

  The essential files that you need are:

  -  gcc2952b.zip  (gcc 2.952 binaries -- GCC compiler)
  -  mak3791b.zip  (make 3.791 binaries -- make utility)
  -  bsn128b.zip  (bison 1.28 binaries -- bison, replacement for yacc)
  -  flx254b.zip  (flex 2.54 binaries - flex, replacement for lex)

  STEP 1b
  -------
  Download each of these files (and any other desired files, such as RHIDE, Emacs, documentation, etc) into a folder.   Then decompress ALL of these files into the same directory (such as "c:\djgpp").


*******
STEP 2:  Setup the DJGPP software
*******

  The file README.1ST will describe the installation and setup procedure.   The steps below will briefly describe the necessary steps.  After the setup, you will probably want to do a RESTART of the system.

  STEP 2a
  -------
  Set DJGPP environment variable, as per the DJGPP installation instructions.  (e.g. in your autoexec.bat, put "SET DJGPP=c:\djgpp\djgpp.env").

  STEP 2b
  -------
  To the system path (typically in autoexec.bat), add "c:\djgpp\bin" to path.  



(Steve Lewis, sal@cise.ufl.edu, 09/24/2000)