home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / gnu / gccdist / bison / bison.hlp < prev    next >
Encoding:
Text File  |  1992-11-16  |  3.1 KB  |  111 lines

  1. 1 BISON
  2.  
  3.  The BISON command invokes the GNU BISON parser generator.
  4.  
  5.        BISON file-spec
  6.  
  7. 2 Parameters
  8.  
  9.  file-spec
  10.  
  11.  Here file-spec is the grammar file name, which usually ends  in  with
  12.  _tab.c.  Thus, the command bison foo.y yields foo_tab.c.
  13.  
  14. 2 Qualifiers
  15.  
  16.  The following is the list of available qualifiers for BISON:
  17.         /DEBUG
  18.         /DEFINES
  19.         /FILE_PREFIX=prefix
  20.         /FIXED_OUTFILES
  21.         /NAME_PREFIX=prefix
  22.         /NOLINES
  23.         /OUTPUT=outfilefile
  24.         /VERBOSE
  25.         /VERSION
  26.         /YACC
  27.  
  28. 2 /DEBUG
  29.  
  30.  Output a definition of the macro YYDEBUG into  the  parser  file,  so
  31.  that the debugging facilities are compiled.
  32.  
  33. 2 /DEFINES
  34.  
  35.  Write an extra output file containing macro definitions for the token
  36.  type  names  defined  in  the  grammar  and  the  semantic value type
  37.  YYSTYPE, as well as a extern variable declarations.
  38.  
  39.  If the parser output file is named "name.c" then this file  is  named
  40.  "name.h".
  41.  
  42.  This output file is essential if you wish to put  the  definition  of
  43.  yylex  in  a  separate source file, because yylex needs to be able to
  44.  refer to token type codes and the variable yylval.
  45.  
  46. 2 /FILE_PREFIX
  47.  
  48.    /FILIE_PREFIX=prefix
  49.  
  50.         Specify a prefix to use for all Bison output file names.   The
  51.  names are chosen as if the input file were named prefix.c
  52.  
  53. 2 /FIXED_OUTFILES
  54.  
  55.  Equivalent to /OUTPUT=y_tab.c;  the  parser  output  file  is  called
  56.  y_tab.c,  and the other outputs are called y.output and y_tab.h.  The
  57.  purpose of  this  switch  is  to  imitate  Yacc's  output  file  name
  58.  conventions.   The  /YACC  qualifier  is  functionally  equivalent to
  59.  /FIXED_OUTFILES.  The following command definition  will  work  as  a
  60.  substitute for Yacc:
  61.  $YACC:==BISON/FIXED_OUTFILES
  62.  
  63. 2 /NAME_PREFIX
  64.  
  65.    /NAME_PREFIX=prefix
  66.  
  67.  Rename the external symbols used in the parser  so  that  they  start
  68.  with  "prefix"  instead of "yy".  The precise list of symbols renamed
  69.  is yyparse, yylex, yyerror, yylval, yychar and yydebug.  For example,
  70.  if  you  use  /NAME_PREFIX="c", the names become cparse, clex, and so
  71.  on.
  72.  
  73. 2 /NOLINES
  74.  
  75.  Don't put any "#line"  preprocessor  commands  in  the  parser  file.
  76.  Ordinarily  Bison puts them in the parser file so that the C compiler
  77.  and debuggers will  associate  errors  with  your  source  file,  the
  78.  grammar  file.   This option causes them to associate errors with the
  79.  parser file, treating it an independent source file in its own right.
  80.  
  81. 2 /OUTPUT
  82.  
  83.    /OUTPUT=outfile
  84.  
  85.  Specify the name "outfile" for the parser file.
  86.  
  87. 2 /VERBOSE
  88.  
  89.  Write an extra output file containing  verbose  descriptions  of  the
  90.  parser  states  and what is done for each type of look-ahead token in
  91.  that state.
  92.  
  93.  This file also describes all the conflicts, both  those  resolved  by
  94.  operator precedence and the unresolved ones.
  95.  
  96.  The file's name is made by removing _tab.c  or  .c  from  the  parser
  97.  output file name, and adding .output instead.
  98.  
  99.  Therefore, if the input file is foo.y, then the parser file is called
  100.  foo_tab.c  by  default.  As a consequence, the verbose output file is
  101.  called foo.output.
  102.  
  103. 2 /VERSION
  104.  
  105.  Print the version number of Bison.
  106.  
  107. 2 /YACC
  108.  
  109.  See /FIXED_OUTFILES.
  110.  
  111.