X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/d7e14fc000458de046cfcded04c2fe8438f63919..0fb669f9d648dfdd7a39478a6b658511455ae966:/doc/bison.texinfo diff --git a/doc/bison.texinfo b/doc/bison.texinfo index f0260127..a1815a53 100644 --- a/doc/bison.texinfo +++ b/doc/bison.texinfo @@ -44,12 +44,12 @@ This manual is for @acronym{GNU} Bison (version @value{VERSION}, @value{UPDATED}), the @acronym{GNU} parser generator. Copyright @copyright{} 1988, 1989, 1990, 1991, 1992, 1993, 1995, 1998, -1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. +1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. @quotation Permission is granted to copy, distribute and/or modify this document under the terms of the @acronym{GNU} Free Documentation License, -Version 1.1 or any later version published by the Free Software +Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, with the Front-Cover texts being ``A @acronym{GNU} Manual,'' and with the Back-Cover Texts as in (a) below. A copy of the license is included in the section entitled @@ -62,7 +62,7 @@ Copies published by the Free Software Foundation raise funds for @end quotation @end copying -@dircategory GNU programming tools +@dircategory Software development @direntry * bison: (bison). @acronym{GNU} parser generator (Yacc replacement). @end direntry @@ -82,8 +82,8 @@ Copies published by the Free Software Foundation raise funds for @insertcopying @sp 2 Published by the Free Software Foundation @* -59 Temple Place, Suite 330 @* -Boston, MA 02111-1307 USA @* +51 Franklin Street, Fifth Floor @* +Boston, MA 02110-1301 USA @* Printed copies are available from the Free Software Foundation.@* @acronym{ISBN} 1-882114-44-2 @sp 2 @@ -444,7 +444,7 @@ roughly that the next grammar rule to apply at any point in the input is uniquely determined by the preceding input and a fixed, finite portion (called a @dfn{look-ahead}) of the remaining input. A context-free grammar can be @dfn{ambiguous}, meaning that there are multiple ways to -apply the grammar rules to get the some inputs. Even unambiguous +apply the grammar rules to get the same inputs. Even unambiguous grammars can be @dfn{non-deterministic}, meaning that no fixed look-ahead always suffices to determine the next grammar rule to apply. With the proper declarations, Bison is also able to parse these more @@ -1166,7 +1166,14 @@ start with a function called @code{main}; you have to provide this, and arrange for it to call @code{yyparse} or the parser will never run. @xref{Interface, ,Parser C-Language Interface}. -Aside from the token type names and the symbols in the actions you +If your code defines a C preprocessor macro @code{_} (a single +underscore), Bison assumes that it can be used to translate +English-language strings to the user's preferred language using a +function-like syntax, e.g., @code{_("syntax error")}. Otherwise, +Bison defines a no-op macro by that name that merely returns its +argument, so strings are not translated. + +Aside from @code{_} and the token type names and the symbols in the actions you write, all symbols defined in the Bison parser file itself begin with @samp{yy} or @samp{YY}. This includes interface functions such as the lexical analyzer function @code{yylex}, the error reporting @@ -2272,7 +2279,7 @@ typedef struct symrec symrec; /* The symbol table: a chain of `struct symrec'. */ extern symrec *sym_table; -symrec *putsym (char const *, func_t); +symrec *putsym (char const *, int); symrec *getsym (char const *); @end group @end smallexample @@ -2627,7 +2634,7 @@ not come before the definition of @code{yyparse}. For example, the definitions of @code{yylex} and @code{yyerror} often go here. Because C requires functions to be declared before being used, you often need to declare functions like @code{yylex} and @code{yyerror} in the Prologue, -even if you define them int he Epilogue. +even if you define them in the Epilogue. @xref{Interface, ,Parser C-Language Interface}. If the last section is empty, you may omit the @samp{%%} that separates it @@ -5784,9 +5791,13 @@ redeclare a typedef name provided an explicit type has been specified earlier: @example -typedef int foo, bar, lose; -static foo (bar); /* @r{redeclare @code{bar} as static variable} */ -static int foo (lose); /* @r{redeclare @code{foo} as function} */ +typedef int foo, bar; +int baz (void) +@{ + static bar (bar); /* @r{redeclare @code{bar} as static variable} */ + extern foo foo (foo); /* @r{redeclare @code{foo} as function} */ + return foo (bar); +@} @end example Unfortunately, the name being declared is separated from the declaration