• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 [name]
2 bison \- GNU Project parser generator (yacc replacement)
3 
4 [description]
5 .I Bison
6 is a parser generator in the style of
7 .IR yacc (1).
8 It should be upwardly compatible with input files designed
9 for
10 .IR yacc .
11 .PP
12 Input files should follow the
13 .I yacc
14 convention of ending in
15 .BR .y .
16 Unlike
17 .IR yacc ,
18 the generated files do not have fixed names, but instead use the prefix
19 of the input file.
20 Moreover, if you need to put
21 .I C++
22 code in the input file, you can end his name by a C++-like extension
23 (.ypp or .y++), then bison will follow your extension to name the
24 output file (.cpp or .c++).
25 For instance, a grammar description file named
26 .B parse.yxx
27 would produce the generated parser in a file named
28 .BR parse.tab.cxx ,
29 instead of
30 .IR yacc 's
31 .B y.tab.c
32 or old
33 .I Bison
34 version's
35 .BR parse.tab.c .
36 .PP
37 This description of the options that can be given to
38 .I bison
39 is adapted from the node
40 .B Invocation
41 in the
42 .B bison.texinfo
43 manual, which should be taken as authoritative.
44 .PP
45 .I Bison
46 supports both traditional single-letter options and mnemonic long
47 option names.  Long option names are indicated with
48 .B \-\-
49 instead of
50 .BR \- .
51 Abbreviations for option names are allowed as long as they
52 are unique.  When a long option takes an argument, like
53 .BR \-\-file-prefix ,
54 connect the option name and the argument with
55 .BR = .
56