%name-prefix is broken.

* src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
Adjust all dependencies.
* tests/headers.at (export YYLTYPE): Strengthen this test: use
%name-prefix.
Renaming yylval but not yylloc is not consistent.  Now we do.
* src/bison.simple: Prefix yylloc if used.
* doc/bison.texinfo (Decl Summary): Document that.
This commit is contained in:
Akim Demaille
2001-12-29 14:27:45 +00:00
parent 8c9a50bee1
commit b5b61c616b
6 changed files with 46 additions and 17 deletions

View File

@@ -3289,10 +3289,10 @@ accurate parse error messages.
Rename the external symbols used in the parser so that they start with
@var{prefix} instead of @samp{yy}. The precise list of symbols renamed
is @code{yyparse}, @code{yylex}, @code{yyerror}, @code{yynerrs},
@code{yylval}, @code{yychar} and @code{yydebug}. For example, if you
use @samp{%name-prefix="c_"}, the names become @code{c_parse},
@code{c_lex}, and so on. @xref{Multiple Parsers, ,Multiple Parsers in
the Same Program}.
@code{yylval}, @code{yychar}, @code{yydebug}, and possible
@code{yylloc}. For example, if you use @samp{%name-prefix="c_"}, the
names become @code{c_parse}, @code{c_lex}, and so on. @xref{Multiple
Parsers, ,Multiple Parsers in the Same Program}.
@item %no-parser
Do not include any C code in the parser file; generate tables only. The