home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 2 / DATAFILE_PDCD2.iso / utilities3 / bison / man / bison_txt < prev   
Text File  |  1989-04-15  |  5KB  |  198 lines

  1.  
  2.  
  3.  
  4.    local                                                             BISON(1)
  5.  
  6.  
  7.  
  8.    NAME
  9.      bison - GNU Project parser generator (yacc replacement)
  10.  
  11.    SYNOPSIS
  12.      bison [ -b file-prefix ] [ --file-prefix=file-prefix ] [ -d ] [
  13.      --defines ] [ -l ] [ --no-lines ] [ -o outfile ] [ --output-file=outfile
  14.      ] [ -p prefix ] [ --name-prefix=prefix ] [ -t ] [ --debug ] [ -v ] [
  15.      --verbose ] [ -V ] [ --version ] [ -y ] [ --yacc ] [ --fixed-output-
  16.      files ] file
  17.  
  18.    DESCRIPTION
  19.      Bison is a parser generator in the style of yacc(1).  It should be
  20.      upwardly compatible with input files designed for yacc.
  21.  
  22.      Input files should follow the yacc convention of ending in .y.  Unlike
  23.      yacc, the generated files do not have fixed names, but instead use the
  24.      prefix of the input file.  For instance, a grammar description file
  25.      named parse.y would produce the generated parser in a file named
  26.      parse.tab.c, instead of yacc's y.tab.c.
  27.  
  28.      This description of the options that can be given to bison is adapted
  29.      from the node Invocation in the bison.texinfo manual, which should be
  30.      taken as authoritative.
  31.  
  32.      Bison supports both traditional single-letter options and mnemonic long
  33.      option names.  Long option names are indicated with -- instead of -.
  34.      Abbreviations for option names are allowed as long as they are unique.
  35.      When a long option takes an argument, like --file-prefix, connect the
  36.      option name and the argument with =.
  37.  
  38.      OPTIONS
  39.  
  40.  
  41.      -b file-prefix
  42.      --file-prefix=file-prefix
  43.           Specify a prefix to use for all bison output file names.  The names
  44.           are chosen as if the input file were named file-prefix.c.
  45.  
  46.      -d
  47.      --defines
  48.           Write an extra output file containing macro definitions for the
  49.           token type names defined in the grammar and the semantic value type
  50.           YYSTYPE, as well as a few extern variable declarations.
  51.  
  52.           If the parser output file is named name.c then this file is named
  53.           name.h.
  54.  
  55.           This output file is essential if you wish to put the definition of
  56.           yylex in a separate source file, because yylex needs to be able to
  57.           refer to token type codes and the variable yylval.
  58.  
  59.      -l
  60.      --no-lines
  61.  
  62.  
  63.                                                                             1
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.    BISON(1)                                                             local
  71.  
  72.  
  73.           Don't put any #line preprocessor commands in the parser file.
  74.           Ordinarily bison puts them in the parser file so that the C com-
  75.           piler and debuggers will associate errors with your source file,
  76.           the grammar file.  This option causes them to associate errors with
  77.           the parser file, treating it an independent source file in its own
  78.           right.
  79.  
  80.      -o outfile
  81.      --output-file=outfile
  82.           Specify the name outfile for the parser file.
  83.  
  84.           The other output files' names are constructed from outfile as
  85.           described under the -v and -d switches.
  86.  
  87.      -p prefix
  88.      --name-prefix=prefix
  89.           Rename the external symbols used in the parser so that they start
  90.           with prefix instead of yy.  The precise list of symbols renamed is
  91.           yyparse, yylex, yyerror, yylval, yychar, and yydebug.
  92.  
  93.           For example, if you use -p c, the names become cparse, clex, and so
  94.           on.
  95.  
  96.      -t
  97.      --debug
  98.           Output a definition of the macro YYDEBUG into the parser file, so
  99.           that the debugging facilities are compiled.
  100.  
  101.      -v
  102.      --verbose
  103.           Write an extra output file containing verbose descriptions of the
  104.           parser states and what is done for each type of look-ahead token in
  105.           that state.
  106.  
  107.           This file also describes all the conflicts, both those resolved by
  108.           operator precedence and the unresolved ones.
  109.  
  110.           The file's name is made by removing .tab.c or .c from the parser
  111.           output file name, and adding .output instead.
  112.  
  113.           Therefore, if the input file is foo.y, then the parser file is
  114.           called foo.tab.c by default.  As a consequence, the verbose output
  115.           file is called foo.output.
  116.  
  117.      -V
  118.      --version
  119.           Print the version number of bison.
  120.  
  121.      -y
  122.      --yacc
  123.      --fixed-output-files
  124.           Equivalent to -o y.tab.c; the parser output file is called y.tab.c,
  125.           and the other outputs are called y.output and y.tab.h.  The purpose
  126.           of this switch is to imitate yacc's output file name conventions.
  127.  
  128.  
  129.    2
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.    local                                                             BISON(1)
  137.  
  138.  
  139.           Thus, the following shell script can substitute for yacc:
  140.  
  141.           bison -y $*
  142.  
  143.  
  144.      The long-named options can be introduced with `+' as well as `--', for
  145.      compatibility with previous releases.  Eventually support for `+' will
  146.      be removed, because it is incompatible with the POSIX.2 standard.
  147.  
  148.    FILES
  149.      /usr/local/lib/bison.simple   simple parser
  150.      /usr/local/lib/bison.hairy    complicated parser
  151.  
  152.    SEE ALSO
  153.      yacc(1)
  154.      The Bison Reference Manual, included as the file bison.texinfo in the
  155.      bison source distribution.
  156.  
  157.    DIAGNOSTICS
  158.      Self explanatory.
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.                                                                             3
  196.  
  197.