home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / compiler / 2094 < prev    next >
Encoding:
Internet Message Format  |  1993-01-06  |  3.9 KB

  1. Path: sparky!uunet!zaphod.mps.ohio-state.edu!cs.utexas.edu!uwm.edu!ogicse!das-news.harvard.edu!spdcc!iecc!compilers-sender
  2. From: 0005066432@mcimail.com (Paul Robinson)
  3. Newsgroups: comp.compilers
  4. Subject: Availability of a Basic Compiler
  5. Keywords: Basic, FTP, available
  6. Message-ID: <93-01-021@comp.compilers>
  7. Date: 6 Jan 93 19:29:00 GMT
  8. Article-I.D.: comp.93-01-021
  9. Sender: compilers-sender@iecc.cambridge.ma.us
  10. Reply-To: Paul Robinson <0005066432@mcimail.com>
  11. Organization: Compilers Central
  12. Lines: 78
  13. Approved: compilers@iecc.cambridge.ma.us
  14.  
  15. The source to a BASIC compiler, written in C, under the name of BWB110,
  16. (Bywater BASIC) is available via FTP from the following site (according to
  17. the author): 
  18.  
  19.  duke.cs.duke.edu /pub/bywater/bwb110.zip 
  20.                   /pub/bywater/bwb110.tar.Z
  21.  
  22. I obtained it from WSMR-SIMTEL20.ARMY.MIL   as follows:
  23.  
  24.    PD1:<msdos.basic>bwb110s.zip       Source,   and
  25.    PD1:<msdos.basic>bwb110e.zip       Executable
  26.  
  27. The compiler appears to cover a large part of the basic language, and
  28. supposedly can be implemented on a system supporting the C language.  Some
  29. features which can't be implemented in a standard method (such as
  30. delimiterless input (INKEY$) and things you can't do easily in the C
  31. language, such as CALL to a machine language program, etc.) 
  32.  
  33. I have not had much opportunity to play with the program, but from the
  34. documentation it points out that it does not tokenize, so it's going to be
  35. slow.  It might be worth looking at for use in applications where some
  36. interpreter is needed. 
  37.  
  38. The sources are copyrighted but the restrictions on it are generally
  39. permitting non-commercial and non-military use. 
  40.  
  41. An immediate mode allowing either direct commands (PRINT 12*12 returns 144
  42. on the next line) or the entry of program statements (10 REM).  The
  43. interpreter will also accept a program passed to it as a parameter on the
  44. command line.  I did some testing using an MSDOS PC. 
  45.  
  46. I tried writing a program from the command line on the order of
  47. 1 REM
  48. 2 GOTO 1
  49. RUN
  50.  
  51. This resorted in an endless loop the program did not accept a control
  52. break to get out of.  Either the code does not have SIGNAL code to accept
  53. a control break, or the compiler doesn't support it or the method of
  54. blocking it doesn't work well, as typing in a line and doing ^C causes an
  55. error message of "program interrupted at line 0".  A command of LIST typed
  56. in with no program present gave an error message of "ERROR in line 0: Line
  57. number 32767 not found". 
  58.  
  59. Control C worked on an input statement.  The SAVE command requires a file
  60. name and no default extension is added.  The PRINT command appears to
  61. buffer the output, so that a 
  62.  
  63.    PRINT CHR$(210); 
  64.  
  65. statement appears in a program, unless an INPUT statement appears or
  66. something else, pending output when the command prompt appears is
  67. discarded. 
  68.  
  69. Apparently there are bugs in the control-c handler.  Two control Cs used
  70. either in response to INPUT or at the command line or for whatever reason
  71. (except, as I stated, that Control C doesn't work if there's no input
  72. prompt) cause the interpreter to terminate.
  73.  
  74. The MSDOS version defaults to taking any unknown command as a shell
  75. command.  The LOAD command to read in another program works, but not if
  76. the file name is one letter.  (LOAD HI works but LOAD I does not.)
  77.  
  78. When entering lines, the command prompt appears after each line. This is
  79. annoying to me as I've used most basic interpreters and they don't print
  80. the prompt when typing in new numbered lines. If a file is read in, the
  81. lines do not have to be numbered, according to the documentation. 
  82.  
  83. One thing I do not like - a feature that the programmer borrowed from the
  84. C language, and that I never liked in the C language either, and that I
  85. like even less in a language that has never used a feature like this - is
  86. that variables are case sensitive, i.e. A$ and a$ are two different
  87. variables. 
  88.  
  89. Paul Robinson
  90. -- 
  91. Send compilers articles to compilers@iecc.cambridge.ma.us or
  92. {ima | spdcc | world}!iecc!compilers.  Meta-mail to compilers-request.
  93.