Fix unexpanded macros in GLR defines file.

Reported by Csaba Raduly at
<http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00048.html>.
* THANKS (Csaba Raduly): Add.
* data/glr.c: Fix overquoting on b4_prefix for yylval and yylloc.
* tests/calc.at (_AT_DATA_CALC_Y): If %defines is specified, generate
lexer in a separate module that includes the defines file.
(AT_CHECK_CALC): Use AT_FULL_COMPILE and request compilation of lexer
source.
* tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_DEFINES_IF.
Adjust AT_LOC and AT_VAL to use AT_NAME_PREFIX.
(AT_BISON_OPTION_POPDEFS): Pop AT_DEFINES_IF.
(AT_DATA_SOURCE_PROLOGUE): New.
(AT_DATA_GRAMMAR_PROLOGUE): Use AT_DATA_SOURCE_PROLOGUE.
(AT_DATA_SOURCE): New.
(AT_FULL_COMPILE): New, copied from master branch and extended to
support an additional output file.
This commit is contained in:
Joel E. Denny
2008-11-18 22:34:26 -05:00
parent bf151b75ff
commit 462503f825
5 changed files with 232 additions and 169 deletions

View File

@@ -1,8 +1,8 @@
-*- C -*-
# GLR skeleton for Bison
# Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation,
# Inc.
# Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software
# Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -2644,10 +2644,10 @@ b4_copyright([Skeleton interface for Bison GLR parsers in C],
b4_shared_declarations
b4_pure_if([],
[[extern YYSTYPE b4_prefix][lval;]])
[[extern YYSTYPE ]b4_prefix[lval;]])
b4_locations_if([b4_pure_if([],
[extern YYLTYPE b4_prefix[]lloc;])
[extern YYLTYPE ]b4_prefix[lloc;])
])
])])
m4_divert_pop(0)