X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/ed4d67dcbe00ca687a6de988aada4ab90a6e03fa..bc0b0477e2ad3f4caaeec8084d37b49400f4e0b5:/doc/bison.texinfo diff --git a/doc/bison.texinfo b/doc/bison.texinfo index 71e9a16a..09ca7ab1 100644 --- a/doc/bison.texinfo +++ b/doc/bison.texinfo @@ -7833,6 +7833,11 @@ In the parser file, define the macro @code{YYDEBUG} to 1 if it is not already defined, so that the debugging facilities are compiled. @xref{Tracing, ,Tracing Your Parser}. +@item -D @var{name}[=@var{value}] +@itemx --define=@var{name}[=@var{value}] +Same as running @samp{%define @var{name} "@var{value}"} (@pxref{Decl +Summary, ,%define}). + @item -L @var{language} @itemx --language=@var{language} Specify the programming language for the generated parser, as if @@ -8713,6 +8718,7 @@ The top level file, @file{calc++.cc}, poses no problem. int main (int argc, char *argv[]) @{ + int res = 0; calcxx_driver driver; for (++argv; argv[0]; ++argv) if (*argv == std::string ("-p")) @@ -8721,6 +8727,9 @@ main (int argc, char *argv[]) driver.trace_scanning = true; else if (!driver.parse (*argv)) std::cout << driver.result << std::endl; + else + res = 1; + return res; @} @end example