* src/output.c (prepare): Use MUSCLE_INSERT_STRING.

* src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
`pair'.
(muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
`name' to...
* data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
(b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
These.
This commit is contained in:
Akim Demaille
2002-10-20 11:16:01 +00:00
parent 95f2c9fe7d
commit 66d30cd4eb
6 changed files with 125 additions and 67 deletions

View File

@@ -69,18 +69,8 @@ muscle_init (void)
/* FIXME: there should probably be no default here, only in the
skeletons. */
/* Types. */
MUSCLE_INSERT_STRING ("ltype", "yyltype");
/* Default #line formatting. */
MUSCLE_INSERT_STRING ("linef", "#line %d %s\n");
/* Stack parameters. */
MUSCLE_INSERT_STRING ("maxdepth", "10000");
MUSCLE_INSERT_STRING ("initdepth", "200");
/* C++ macros. */
MUSCLE_INSERT_STRING ("name", "Parser");
}
@@ -173,12 +163,12 @@ muscle_grow (const char *key, const char *val, const char *separator)
void muscle_pair_list_grow (const char *muscle,
const char *a1, const char *a2)
{
char *val;
char *pair;
obstack_fgrow2 (&muscle_obstack, "[[[%s]], [[%s]]]", a1, a2);
obstack_1grow (&muscle_obstack, 0);
val = obstack_finish (&muscle_obstack);
muscle_grow (muscle, val, ",\n");
obstack_free (&muscle_obstack, val);
pair = obstack_finish (&muscle_obstack);
muscle_grow (muscle, pair, ",\n");
obstack_free (&muscle_obstack, pair);
}
/*-------------------------------.

View File

@@ -661,7 +661,7 @@ prepare (void)
}
/* Parse the skeleton file and output the needed parsers. */
muscle_insert ("skeleton", xstrdup (skeleton));
MUSCLE_INSERT_STRING ("skeleton", skeleton);
}