[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Bison 2.4 fails to substitute name-prefix
From: |
Csaba Raduly |
Subject: |
Bison 2.4 fails to substitute name-prefix |
Date: |
Tue, 18 Nov 2008 12:56:44 +0000 (GMT) |
This grammar:
%{
/* bison declarations */
%}
%name-prefix="rumpelstiltskin"
%defines
%glr-parser
%start GrammarRoot
%%
/* grammar */
GrammarRoot:
"All" "your" "base" "are" "belong" "to" "us"
%%
generates the following .h file:
#ifndef YYSTYPE
typedef int YYSTYPE;
# define YYSTYPE_IS_TRIVIAL 1
#endif
#if ! defined YYLTYPE && ! defined
YYLTYPE_IS_DECLARED
typedef struct YYLTYPE
{
char yydummy;
} YYLTYPE;
# define YYLTYPE_IS_DECLARED 1
# define YYLTYPE_IS_TRIVIAL 1
#endif
extern YYSTYPE b4_prefixlval;
^^^^^^^^^^^^^
This should be rumpelstiltskinlval (which is what Bison 2.3 generates).
(Same thing without the '=' but that is incompatible with 2.3)
--
Life is complex, with real and imaginary parts.
- Bison 2.4 fails to substitute name-prefix,
Csaba Raduly <=