mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-18 16:53:02 +00:00
* src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
(MUSCLE_INSERT_PREFIX): ...to there. * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING) (MUSCLE_INSERT_PREFIX): Move from here... * src/bison.hairy: Add a section directive. Put braces around muscle names. This parser skeleton is still broken, but Bison should not choke on a bad muscle 'syntax'. * src/bison.simple: Add a section directive. Put braces around muscle names. * src/files.h (strsuffix, stringappend): Add declarations. (tab_extension): Add declaration. (short_base_name): Add declaration. * src/files.c (strsuffix, stringappend): No longer static. These functions are used in the skeleton parser. (tab_extension): New. (compute_base_names): Use the computations done in this function to guess if the generated parsers should have '.tab' in their names. (short_base_name): No longer static. * src/output.c (output_skeleton): New. (output): Disable call to output_master_parser, and give a try to a new skeleton handling system. (guards_output, actions_output): No longer static. (token_definitions_output, get_lines_number): No longer static. * configure.in: Use AM_PROG_LEX and AC_PROG_YACC. * src/Makefile.am (bison_SOURCES): Add scan-skel.l and parse-skel.y. * src/parse-skel.y: New file. * src/scan-skel.l: New file.
This commit is contained in:
@@ -33,4 +33,26 @@ void muscle_init PARAMS ((void));
|
||||
void muscle_insert PARAMS ((const char *key, const char *value));
|
||||
const char *muscle_find PARAMS ((const char *key));
|
||||
|
||||
#define MUSCLE_INSERT_INT(Key, Value) \
|
||||
{ \
|
||||
obstack_fgrow1 (&muscle_obstack, "%d", Value); \
|
||||
obstack_1grow (&muscle_obstack, 0); \
|
||||
muscle_insert (Key, obstack_finish (&muscle_obstack)); \
|
||||
}
|
||||
|
||||
#define MUSCLE_INSERT_STRING(Key, Value) \
|
||||
{ \
|
||||
obstack_sgrow (&muscle_obstack, Value); \
|
||||
obstack_1grow (&muscle_obstack, 0); \
|
||||
muscle_insert (Key, obstack_finish (&muscle_obstack)); \
|
||||
}
|
||||
|
||||
#define MUSCLE_INSERT_PREFIX(Key, Value) \
|
||||
{ \
|
||||
obstack_fgrow2 (&muscle_obstack, "%s%s", \
|
||||
spec_name_prefix ? spec_name_prefix : "yy", Value); \
|
||||
obstack_1grow (&muscle_obstack, 0); \
|
||||
muscle_insert (Key, obstack_finish (&muscle_obstack)); \
|
||||
}
|
||||
|
||||
#endif /* not MUSCLE_TAB_H_ */
|
||||
|
||||
Reference in New Issue
Block a user