[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
lalr1.cc's locations
From: |
Akim Demaille |
Subject: |
lalr1.cc's locations |
Date: |
06 Sep 2002 13:52:33 +0200 |
User-agent: |
Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Honest Recruiter) |
lalr1.c is a bit of a mess :(
Index: ChangeLog
from Akim Demaille <address@hidden>
* data/lalr1.cc (struct yyltype): Don't define it, since we use
LocationType.
(b4_ltype): Default to yy::Location from location.hh.
Index: data/lalr1.cc
===================================================================
RCS file: /cvsroot/bison/bison/data/lalr1.cc,v
retrieving revision 1.6
diff -u -u -r1.6 lalr1.cc
--- data/lalr1.cc 30 Jul 2002 11:56:44 -0000 1.6
+++ data/lalr1.cc 6 Sep 2002 11:53:04 -0000
@@ -33,6 +33,7 @@
m4_define([b4_rhs_value],
[semantic_stack_@<:@m4_eval([$1 - $2])@:>@m4_ifval([$3], [.$3])])
+m4_define_default([b4_ltype], [Location])
# b4_lhs_location()
# -----------------
@@ -143,18 +144,6 @@
Current.last_column = Rhs[[N]].last_column;
#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
{
class b4_name;
@@ -293,7 +282,7 @@
}
#endif /* not b4_header_guard */
-
+dnl
#output "b4_output_prefix[]b4_output_infix[].cc"
b4_copyright([C++ Skeleton parser for LALR(1) parsing with Bison],
[2002])
@@ -772,7 +761,7 @@
const yy::b4_name::TokenNumberType yy::b4_name::undef_token_ =
b4_undef_token_number;
b4_epilogue
-
+dnl
#output "stack.hh"
b4_copyright([2002])
@@ -869,7 +858,7 @@
}
#endif // not BISON_STACK_HH
-
+dnl
#output "location.hh"
b4_copyright([2002])
- lalr1.cc's locations,
Akim Demaille <=