X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/6aeb9c579b7e7dd8d9a98c31f75ce7a3e20f1318..727a14014b7251d951daacf21dfbef95ac35c2bd:/doc/bison.x diff --git a/doc/bison.x b/doc/bison.x new file mode 100644 index 00000000..1eaa9fdf --- /dev/null +++ b/doc/bison.x @@ -0,0 +1,55 @@ +[name] +bison \- GNU Project parser generator (yacc replacement) + +[description] +.I Bison +is a parser generator in the style of +.IR yacc (1). +It should be upwardly compatible with input files designed +for +.IR yacc . +.PP +Input files should follow the +.I yacc +convention of ending in +.BR .y . +Unlike +.IR yacc , +the generated files do not have fixed names, but instead use the prefix +of the input file. +Moreover, if you need to put +.I C++ +code in the input file, you can end his name by a C++-like extension +(.ypp or .y++), then bison will follow your extension to name the +output file (.cpp or .c++). +For instance, a grammar description file named +.B parse.yxx +would produce the generated parser in a file named +.BR parse.tab.cxx , +instead of +.IR yacc 's +.B y.tab.c +or old +.I Bison +version's +.BR parse.tab.c . +.PP +This description of the options that can be given to +.I bison +is adapted from the node +.B Invocation +in the +.B bison.texinfo +manual, which should be taken as authoritative. +.PP +.I Bison +supports both traditional single-letter options and mnemonic long +option names. Long option names are indicated with +.B \-\- +instead of +.BR \- . +Abbreviations for option names are allowed as long as they +are unique. When a long option takes an argument, like +.BR \-\-file-prefix , +connect the option name and the argument with +.BR = .