home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Source Code / C / Utilities / byacc 1.8.2 / NEW_FEATURES < prev    next >
Encoding:
Text File  |  1993-02-04  |  2.6 KB  |  57 lines  |  [TEXT/R*ch]

  1.      The -p option can be used to change the symbol prefix to something
  2. other than "yy" in the generated code. This allows multiple parsers to be
  3. included in a program. See the man page for further details.
  4.  
  5.      The -P option causes Perl code to be generated.  This is useful for
  6. rapid prototyping of a grammar.  In Perl mode, %type, %union, etc., are
  7. checked, but not used in the output.  The user must supply &yylex, &yyerror,
  8. and a main program to call &yyparse.  An example of a simple calculator is
  9. included. A version of getdate.y that has been modified for Perl yacc is
  10. also included.
  11.  
  12.      The -r option has been implemented.  The -r option tells Yacc to put
  13. the read-only tables in y.tab.c and the code and variables in y.code.c.
  14. Keith Bostic asked for this option so that :yyfix could be eliminated.
  15.  
  16.      The -l and -t options have been implemented.  The -l option tells Yacc
  17. not to include #line directives in the code it produces.  The -t option
  18. causes debugging code to be included in the compiled parser.
  19.  
  20.      The code for error recovery has been changed to implement the same
  21. algorithm as AT&T Yacc.  There will still be differences in the way error
  22. recovery works because AT&T Yacc uses more default reductions than Berkeley
  23. Yacc.
  24.  
  25.      The environment variable TMPDIR determines the directory where
  26. temporary files will be created.  If TMPDIR is defined, temporary files will
  27. be created in the directory whose pathname is the value of TMPDIR.  By
  28. default, temporary files are created in /tmp.
  29.  
  30.      The keywords are now case-insensitive.  For example, %nonassoc,
  31. %NONASSOC, %NonAssoc, and %nOnAsSoC are all equivalent.
  32.  
  33.      Commas and semicolons that are not part of C code are treated as
  34. commentary.
  35.  
  36.      Line-end comments, as in BCPL, are permitted.  Line-end comments begin
  37. with // and end at the next end-of-line.  Line-end comments are permitted in
  38. C code; they are converted to C comments on output.
  39.  
  40.      The form of y.output files has been changed to look more like those
  41. produced by AT&T Yacc.
  42.  
  43.      A new kind of declaration has been added.  The form of the declaration
  44. is
  45.  
  46.       %ident string
  47.  
  48. where string is a sequence of characters begining with a double quote and
  49. ending with either a double quote or the next end-of-line, whichever comes
  50. first.  The declaration will cause a #ident directive to be written near the
  51. start of the output file.
  52.  
  53.      If a parser has been compiled with debugging code, that code can be
  54. enabled by setting an environment variable.  If the environment variable
  55. YYDEBUG is set to 0, debugging output is suppressed.  If it is set to 1,
  56. debugging output is written to standard output.
  57.