home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / pascal.zip / document / bill.lwp (.txt) next >
IBM Works for OS/2  |  1995-10-29  |  11KB  |  60 lines

  1. IBM Works OS/2
  2. B.I.L.L.:  Design and Implementation
  3. Copyright (C) Footprint Software Inc. 1993-1994
  4. IBM42XX
  5. IBM 4070 IJ
  6. Breakdown of documentation:
  7.     Introduction - what is B.I.L.L
  8.     B.I.L.L. Specifications
  9.     Modular B.I.L.L.:
  10.     Lexical
  11.     SymTable
  12.     Parser
  13.     ExitCode
  14.     PCode
  15.     Global
  16.     Stackman
  17.     Cross-platform B.I.L.L.:
  18.     Windows
  19.     OS/2
  20. Introduction - what is B.I.L.L.:
  21. B.I.L.L. is a subset of the programming language Pascal.  It was used by the  CSC-309 class as the basis for compiler construction.  The name Bill was also  chosen in honour of a dog owned by Babbage.
  22. B.I.L.L. Specifications:
  23. B.I.L.L. follows very closely the syntax used in Pascal.  However, not all of the  conventions from Pascal were ported to B.I.L.L.  Currently, the following  reserved words are implemented:
  24.     if - then
  25.     while - do
  26.     write
  27.     read
  28. The programme syntax from Pascal was almost directly carried over to B.I.L.L.   This means that a programme must start with the "program" keyword, followed  by the programme name.  Optional blocks of code following the "program"  keyword are used to declare variables or constants.  The main section of code  must then follow, starting with a "begin" keyword and terminated with the "end"  keyword.  At the moment, there is no support for functions, procedures,  if-then-else constructs, or case statements.
  29. Modular B.I.L.L.:
  30. B.I.L.L. was designed and implemented in several sections.  This allowed for  easier programming sessions, debugging, and replacement of entire sections  of code with relative ease.  I will avoid going into the advantages of  programming using modularity since it is beyond the scope of this  documentation.  Each of the individual sections reside in their own directory,  and are aware of the directory structure (thus no errors occur when compiling all  the modules together, even if they are in their own directory).  Needless to say,  the following is a list of each individual modules and the basic functionality  encapsulated within them:
  31. Lexical:
  32. The Lexical module reads in a specified input file and breaks in  down into a stream of individual tokens.  These routines are  called extensively by the Parser module.
  33. SymTable:
  34. The SymTable (symbol table) is a code-implemented array used  to keep track of both constants and variables during the code  generation process.  These routines are called solely by the  Parser module.
  35. Parser:
  36. The Parser module drives the entire code-generation process.   When first called, the Parser module initializes the lexical table,  the symbol table, and the gone generation procedures.  This  module contains all of the routines used both to parse  programmes and to generate the necessary code later used  by the Stackman.
  37. ExitCode:
  38. The ExitCode module handles all of the output of error  messages, as well as displaying relevant text in order to help  the user determine the cause of any errors.
  39. PCode:
  40. The PCode module outputs to a file all of the instruction codes  generated by the Parser as it analyses the programme.
  41. Global:
  42. Two include files (ERROR.H and GLOBAL.H) located in this  directory insure that all of the modules use the same basic  definitions.  This includes type definitions, project constants and  standard error return codes for functions and procedures.
  43. Stackman:
  44. The Stackman module is constructed slightly differently than the  rest of the modules.  Implemented as a stack machine, this  module can easily be detached from the rest of the project in  order to provide a "run-time" version of B.I.L.L.  This is used so  that the B.I.L.L. parser output files could be distributed with the  stack-machine module, without having to distribute the parser.
  45. Cross-platform B.I.L.L.:
  46. The entire B.I.L.L. project was written in standard ANSI C.  This insures that the  project can be ported over to almost any platform for which there exists a C  compiler.  Currently, B.I.L.L. has been ported over to the following platforms:
  47. D.O.S.:
  48. Using D.O.S., the compiler and Interpreter for B.I.L.L. operates as  a text-based programme that utilizes the entire screen.  Both  Borland C++ and Microsoft C have been used to compiler  B.I.L.L. without any problems.
  49. Windows:
  50. B.I.L.L. has been ported to Windows using Borland's C++  Compiler for Windows.  Using the "Easy-WIN" option with the  compiler, the entire project was converted to run in a window with  scrolling text as resembling the D.O.S. application.
  51. OS/2:
  52. Two different compiler were used to port B.I.L.L. to OS/2.  The first  of these is the IBM C Set/2 Compiler v1.0  (
  53. addition:  I've since then used the IBM OS/2 C++ Compiler v2.1 without any problems
  54. .  This compiler  generates code that can be used with both OS/2 v2.0 and  OS/2 v2.1.  Borland's C++ Compiler for OS/2 was also used; this  compiler generates code for OS/2 v2.1.  Both of these compilers  create an executable that can be used in a windowed or  full-screen session of OS/2.
  55. B.I.L.L. - Bishop's Innovative Lovely Language
  56. Project Specifications and Design [
  57. Helvetica Bold Italic
  58. Helvetica
  59. Courier
  60.