home *** CD-ROM | disk | FTP | other *** search
/ cs.rhul.ac.uk / www.cs.rhul.ac.uk.zip / www.cs.rhul.ac.uk / pub / rdp / old_versions / rdp1_1.doc < prev    next >
Text File  |  1994-03-27  |  6KB  |  149 lines

  1. This is the RDP V1.10 release distribution. Look in the makefile and
  2. ensure that the blocks of options at the top are set correctly for
  3. either Borland C on MS-DOS or GCC on Unix as the fancy takes you. Then
  4. type 'make' and stand well back. Look in buildlog.* to see what a
  5. correct build on your machine should look like. Further details may be
  6. found in rdp_user.ps, but you'll need a postscript printer.
  7.  
  8. ** RDP release version 1.10 flyer. Adrian Johnstone 27 March 1994 **
  9.  
  10. The first maintenance release of RDP (version 1.1) is now
  11. available via ftp from cscx.cs.rhbnc.ac.uk (134.219.200.45) in
  12. directory /pub/rdp. Get rdp1_1.zip if you are an MS-DOS user or
  13. rdp1_1.tar.Z if you are a Unix user. 
  14.  
  15. If you would like your name added to a mailing list which will
  16. keep you up to date with RDP developments please mail me at the
  17. address given at the end of this message.
  18.  
  19. ** Improvements in this version include **
  20.  
  21. 0. A (very) draft user manual is now included.
  22.  
  23. 1. Very detailed diagnostics given if an LL(1) violation is
  24.    detected, specifying the sub-clauses in error and listing the bad
  25.    tokens.
  26.  
  27. 2. RDP produced C source code is now nicely indented.
  28.  
  29. 3. New PASSES directive supports multiple-pass parsers (such as
  30.    assemblers).
  31.  
  32. 4. New HEX_DOLLAR directive enables Motorla style hexdeimal numbers ($xx)
  33.    in scanner.
  34.  
  35. 5. EOF handling now conforms to ANSI standard (thanks to
  36.    gunnar@fasel.robin.de for pointing this out).
  37.  
  38. 6. OUTPUTFILE now defaults to "rdparser".
  39.  
  40. 7. EOLN_VISIBLE directive superceded by automatic detection of EOLN token.
  41.  
  42. 8. New comment primitives added to support assembler and visible
  43.    comments. COMMENT_VISIBLE directive removed.
  44.  
  45. 9. Bugs in scanner string mode parser fixed.
  46.  
  47. 10. Productions consisting solely of [...] or {...} now handled
  48.     correctly.
  49.  
  50. 11. Toy interpreter now has a full set of control structures.
  51.  
  52. 12. Mini (cut down Toy) language added as a tutorial introduction.
  53.  
  54. 13. Pascal parser now handles null statements.
  55.  
  56. 14. -bfilename switch dropped since new diagnostics reduce the
  57.     need to look at the internal productions. New -e switch dumps
  58.     internal productions to stdout instead.
  59.  
  60. 15. Multiple user command line switches now handled correctly.
  61.  
  62. 16. Force flag removed from default parsers.
  63.  
  64. 17. HELP directive now renamed OPTION.
  65.  
  66. 18. New makefile and project files included.
  67.  
  68. **** Here follows a thumbnail sketch of RDP ****
  69.  
  70. RDP - a recursive descent parser generator
  71.  
  72. RDP compiles attributed LL(1) grammars decorated with C-language semantic
  73. actions into recursive descent compilers. RDP is written in strict ANSI C
  74. and produces strict ANSI C. RDP was developed using Borland C 3.1 on a PC
  75. and has also been built with no problems on Alpha/OSF-1, DECstation/Ultrix
  76. and Sun 4/SunOS hosts all using GCC. The definition of strict ANSI here means 
  77. compiling with gcc -Wall -Wstrict-prototypes -fno-common  -pedantic -ANSI and 
  78. getting no warning messages.
  79.  
  80. RDP itself and the language processors it generates use standard symbol,
  81. set and scanner modules. The RDP scanner is programmed by loading tokens
  82. into the symbol table at the start of each run.
  83.  
  84. RDP produces complete runnable programs with built-in help information and
  85. command line switches that are specified as part of the EBNF file. In this
  86. sense RDP output is far more shrink-wrapped than the usual parser generators
  87. which helps beginning students. RDP can generate itself which is a nice
  88. demonstration of the bootstrapping technique used for porting compilers to
  89. new architectures.
  90.  
  91. I wrote RDP because in October I start giving a course on compiler design.
  92. I don't think the world needs another course on parsing techniques and am
  93. really interested in code generation for exotic processors, so I tried to
  94. produce a compact parser generator that would enable undergraduates to rip
  95. through the syntax and standard code generation parts of the syllabus in a
  96. few weeks, thus leaving me time to get into the black arts of code
  97. scheduling and optimisation.
  98.  
  99. What you get.
  100.  
  101. o An implementation of Pascal style set-handling in C.
  102.  
  103. o A hash-coded symbol table with support for scoping and arbitrary user data
  104.  
  105. o A programmable high-speed scanner with integrated error handling and
  106.   hooks for macros (RDP is being used to generate assemblers for two novel
  107.   microprocessors in addition to the usual applications of LL(1) parsers).
  108.  
  109. o The source to a hand-coded version of the RDP translator. RDP checks that
  110.   the source grammar is LL(1) and explains exactly why a non-LL(1) grammar
  111.   is unacceptable. RDP does not attempt to rework a grammar by itself.
  112.  
  113. o A decorated EBNF file describing RDP that may be processed by the
  114.   hand-coded RDP translator to produce a machine generated version of RDP.
  115.   This is good for boggling undergraduate's minds with.
  116.  
  117. o A decorated EBNF file describing an interpreter for a language called TOY.
  118.  
  119. o An EBNF file describing Pascal which generates a parser for
  120.   the Pascal language. 
  121.  
  122. o A pre-built RDP executable for MS-DOS.
  123.  
  124. o Sources, makefiles and Borland 3.1 project files for everything which
  125.   you may use freely on condition that you send copies of any modifications,
  126.   enhancements and ill-conceived changes you might make back to me so that
  127.   I can improve RDP.
  128.  
  129. What you don't get.
  130.  
  131. o Decent manuals. A preliminary draft of the main user manual
  132.   which includes a tutorial introduction to RDP is supplied. Better
  133.   manuals will follow.
  134.  
  135. o Tutorial information on parsing and compiling (try Wirth's Algorithms +
  136.   Data Structures = Programs, Chapter 5 or your favourite compiler book).
  137.  
  138. o Warranties. (This code has only just escaped from my personal toolkit.
  139.   I've put a lot of effort into making it fit for others to use, but in
  140.   the very nature of compiler compilers it is hard to test all the angles,
  141.   and the Garbage In - Garbage Out principle holds to the highest degree:
  142.   if you write ill-formed semantic actions you won't find out until you try
  143.   and compile the parser that RDP wrote for you.)
  144.  
  145. Comments, queries and requests for code to
  146.  
  147. Dr Adrian Johnstone, CS Dept, Royal Holloway, University of London
  148. Email: adrian@dcs.rhbnc.ac.uk
  149.