* src/location.h: New, extracted from...

* src/reader.h: here.
* src/Makefile.am (noinst_HEADERS): Merge into
(bison_SOURCES): this.
Add location.h.
* src/parse-gram.y: Use location_t instead of Bison's.
* src/reader.h, src/reader.c (prologue_augment, epilogue_set):
Use location_t instead of ints.
This commit is contained in:
Akim Demaille
2002-06-14 17:35:45 +00:00
parent e96c9728da
commit 0c15323de7
10 changed files with 824 additions and 1003 deletions

View File

@@ -113,7 +113,7 @@ grammar_start_symbol_set (symbol_t *s)
`----------------------------------------------------------------*/
void
prologue_augment (const char *prologue, int location)
prologue_augment (const char *prologue, location_t location)
{
struct obstack *oout =
!typed ? &pre_prologue_obstack : &post_prologue_obstack;
@@ -121,8 +121,9 @@ prologue_augment (const char *prologue, int location)
if (!no_lines_flag)
{
obstack_fgrow2 (oout, muscle_find ("linef"),
location, quotearg_style (c_quoting_style,
muscle_find ("filename")));
location.first_line,
quotearg_style (c_quoting_style,
muscle_find ("filename")));
}
obstack_sgrow (oout, prologue);
}
@@ -135,7 +136,7 @@ prologue_augment (const char *prologue, int location)
`----------------------*/
void
epilogue_set (const char *epilogue, int location)
epilogue_set (const char *epilogue, location_t location)
{
struct obstack el_obstack;
obstack_init (&el_obstack);
@@ -143,8 +144,9 @@ epilogue_set (const char *epilogue, int location)
if (!no_lines_flag)
{
obstack_fgrow2 (&el_obstack, muscle_find ("linef"),
location, quotearg_style (c_quoting_style,
muscle_find ("filename")));
location.first_line,
quotearg_style (c_quoting_style,
muscle_find ("filename")));
}
obstack_sgrow (&el_obstack, epilogue);
obstack_1grow (&el_obstack, 0);