* data/lalr1.cc (struct yyltype): Don't define it, since we use

LocationType.
(b4_ltype): Default to yy::Location from location.hh.
This commit is contained in:
Akim Demaille
2002-09-06 11:54:05 +00:00
parent c0ad8bf3c2
commit 21846f695d
2 changed files with 10 additions and 15 deletions

View File

@@ -1,3 +1,9 @@
2002-09-06 Akim Demaille <akim@epita.fr>
* data/lalr1.cc (struct yyltype): Don't define it, since we use
LocationType.
(b4_ltype): Default to yy::Location from location.hh.
2002-09-04 Jim Meyering <jim@meyering.net> 2002-09-04 Jim Meyering <jim@meyering.net>
* data/yacc.c: Guard the declaration of yytoknum also with * data/yacc.c: Guard the declaration of yytoknum also with

View File

@@ -33,6 +33,7 @@ m4_define([b4_lhs_value],
m4_define([b4_rhs_value], m4_define([b4_rhs_value],
[semantic_stack_@<:@m4_eval([$1 - $2])@:>@m4_ifval([$3], [.$3])]) [semantic_stack_@<:@m4_eval([$1 - $2])@:>@m4_ifval([$3], [.$3])])
m4_define_default([b4_ltype], [Location])
# b4_lhs_location() # b4_lhs_location()
# ----------------- # -----------------
@@ -143,18 +144,6 @@ b4_post_prologue
Current.last_column = Rhs[[N]].last_column; Current.last_column = Rhs[[N]].last_column;
#endif #endif
m4_if(b4_locations_flag, [0], [],
[#ifndef YYLTYPE
typedef struct yyltype
{
int first_line;
int first_column;
int last_line;
int last_column;
} yyltype;
# define YYLTYPE yyltype
#endif])
namespace yy namespace yy
{ {
class b4_name; class b4_name;
@@ -293,7 +282,7 @@ namespace yy
} }
#endif /* not b4_header_guard */ #endif /* not b4_header_guard */
dnl
#output "b4_output_prefix[]b4_output_infix[].cc" #output "b4_output_prefix[]b4_output_infix[].cc"
b4_copyright([C++ Skeleton parser for LALR(1) parsing with Bison], b4_copyright([C++ Skeleton parser for LALR(1) parsing with Bison],
[2002]) [2002])
@@ -772,7 +761,7 @@ const unsigned yy::b4_name::user_token_number_max_ = b4_user_token_number_max;
const yy::b4_name::TokenNumberType yy::b4_name::undef_token_ = b4_undef_token_number; const yy::b4_name::TokenNumberType yy::b4_name::undef_token_ = b4_undef_token_number;
b4_epilogue b4_epilogue
dnl
#output "stack.hh" #output "stack.hh"
b4_copyright([2002]) b4_copyright([2002])
@@ -869,7 +858,7 @@ namespace yy
} }
#endif // not BISON_STACK_HH #endif // not BISON_STACK_HH
dnl
#output "location.hh" #output "location.hh"
b4_copyright([2002]) b4_copyright([2002])