]> git.saurik.com Git - bison.git/blame - doc/bison.x
TODO: statistics.
[bison.git] / doc / bison.x
CommitLineData
727a1401
AD
1[name]
2bison \- GNU Project parser generator (yacc replacement)
3
4[description]
5.I Bison
6is a parser generator in the style of
7.IR yacc (1).
8It should be upwardly compatible with input files designed
9for
10.IR yacc .
11.PP
12Input files should follow the
13.I yacc
14convention of ending in
15.BR .y .
16Unlike
17.IR yacc ,
18the generated files do not have fixed names, but instead use the prefix
19of the input file.
20Moreover, if you need to put
21.I C++
22code 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
24output file (.cpp or .c++).
25For instance, a grammar description file named
26.B parse.yxx
27would produce the generated parser in a file named
28.BR parse.tab.cxx ,
29instead of
30.IR yacc 's
31.B y.tab.c
32or old
33.I Bison
34version's
35.BR parse.tab.c .
36.PP
37This description of the options that can be given to
38.I bison
39is adapted from the node
40.B Invocation
41in the
42.B bison.texinfo
43manual, which should be taken as authoritative.
44.PP
45.I Bison
46supports both traditional single-letter options and mnemonic long
47option names. Long option names are indicated with
48.B \-\-
49instead of
50.BR \- .
51Abbreviations for option names are allowed as long as they
52are unique. When a long option takes an argument, like
53.BR \-\-file-prefix ,
54connect the option name and the argument with
55.BR = .
9f14e187
AD
56
57[see also]
58.BR lex (1),
59.BR flex (1),
60.BR yacc (1).