home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Professional / OS2PRO194.ISO / os2 / prgramer / unix / doc / yacc.man < prev   
Text File  |  1992-06-07  |  2KB  |  58 lines

  1. NAME
  2.      Yacc - an LALR(1) parser generator
  3.  
  4. SYNOPSIS
  5.      yacc [ -dlrtv ] [ -b prefix ] filename
  6.  
  7. DESCRIPTION
  8.      Yacc reads the grammar specification in the file filename  and  generates
  9.      an  LR(1) parser for it.  The parsers consist of a set of LALR(1) parsing
  10.      tables and a driver routine written in the C programming language.   Yacc
  11.      normally  writes  the  parse  tables  and  the driver routine to the file
  12.      y.tab.c.
  13.  
  14.      The following options are available:
  15.  
  16.      -b prefix
  17.           The -b option changes the prefix prepended to the output file  names
  18.           to  the  string  denoted  by  prefix.   The  default  prefix  is the
  19.           character y.
  20.  
  21.      -d   The -d option causes the header file y.tab.h to be written.
  22.  
  23.      -l   If  the  -l  option  is  not  specified,  yacc  will  insert  \#line
  24.           directives  in  the generated code.  The \#line directives let the C
  25.           compiler relate errors in the generated code to the user's  original
  26.           code.   If  the  -l  option  is  specified, yacc will not insert the
  27.           \#line directives.  \#line directives specified by the user will  be
  28.           retained.
  29.  
  30.      -r   The -r option causes yacc to produce separate  files  for  code  and
  31.           tables.   The  code  file  is named y.code.c, and the tables file is
  32.           named y.tab.c.
  33.  
  34.      -t   The -t option changes the preprocessor directives generated by  yacc
  35.           so  that  debugging  statements will be incorporated in the compiled
  36.           code.
  37.  
  38.      -v   The -v option causes a human-readable description of  the  generated
  39.           parser to be written to the file y.output.
  40.  
  41.      If the environment variable TMPDIR is set, the string denoted  by  TMPDIR
  42.      will  be  used as the name of the directory where the temporary files are
  43.      created.
  44.  
  45. FILES
  46.      y.code.c
  47.      y.tab.c
  48.      y.tab.h
  49.      y.output
  50.      /tmp/yacc.aXXXXXX
  51.      /tmp/yacc.tXXXXXX
  52.      /tmp/yacc.uXXXXXX
  53.  
  54. DIAGNOSTICS
  55.      If there are rules that are never reduced, the number of  such  rules  is
  56.      reported  on  standard  error.   If  there are any LALR(1) conflicts, the
  57.      number of conflicts is reported on standard error.
  58.