Compare commits

...
Author SHA1 Message Date
Pascal Bart c20e2bdcf1 Ignore .flc 2001-09-25 11:37:26 +00:00
Pascal Bart 1c8c2190b1 * src/output.c (output_master_parser): Don't finish action_obstack.
(output_parser): Don't care about the muscle action, here.
(prepare): Copy the action_obstack in the action muscle.
(output): Free action_obstack.
2001-09-25 11:36:25 +00:00
Pascal Bart 180d45ba81 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
will contain `%union' declaration.
(parse_union_decl): Delete #line directive output.
(parse_union_decl): Substitute /attrs_obstack/union_obstack for all
informations about %union.
(parse_union_decl): Copy the union_obstack in the muscle stype.
* src/bison.simple: Add new #line directive.
Add typdef %%stype YYSTYPE.
2001-09-23 15:33:14 +00:00
Pascal Bart c51d1a1973 * src/bison.simple: Add new `#line' directive. 2001-09-22 22:02:34 +00:00
Pascal Bart 577c6c8499 Fix line report with input_line 2001-09-22 21:43:05 +00:00
Pascal Bart 6f9344dadf * src/bison.simple: New `#line' directive.
* src/output.c (output_parser): Support new dynamic muscle input_line.
2001-09-22 21:30:53 +00:00
Marc Autret 652def8074 * src/output.c (output_master_parser): New.
(output_parser): Be more re-entrant.
2001-09-22 12:18:16 +00:00
Marc Autret 209215672e Update. 2001-09-21 16:25:59 +00:00
Marc Autret 25b222faf6 * src/reader.c (copy_definition, parse_union_decl): Update and use
`linef' muscle.
(copy_action): Likewise.
Use obstack_1grow ().
* src/muscle_tab.c (muscle_init): Add muscle `linef'.
2001-09-21 16:25:19 +00:00
Marc Autret 6bc35ae56a * src/options.c (option_table): Adjust.
* src/lex.c (parse_percent_token): Fix.
2001-09-21 15:42:26 +00:00
Marc Autret 31b53af2fa Update. 2001-09-21 00:09:28 +00:00
Pascal Bart a474de9b9a Regen. 2001-09-20 19:11:28 +00:00
Pascal Bart c0629aa10f * src/options.c (symtab.h): Include it, need by lex.h. 2001-09-20 18:51:48 +00:00
Pascal Bart 82b6d266fd * src/lex.c (parse_percent_token): Change type of variable `tx', which
is now an option_table_struct*.
(option_strcmp): New function option_strcmp.
(parse_percent_token): Call option_strcmp.
* src/getargs.c (xalloc.h, options.h): Include it.
(getargs): Call create_long_option_table.
(getargs): Free longopts at the end of the function.
(shortopts): Move in options.c.
* src/options.c (create_long_option_table): New function.  Convert
information from option_table to option structure.
* src/reader.c (options.h): Include it.
* src/Makefile.am: Adjust.
* src/options.c (option_table): Create from longopts and percent_table.
* src/getargs.c (longopts): Delete.
* src/lex.c (struct percent_table_struct): Delete.
(percent_table): Delete.
(options.h): Include it.
* src/options.c: Create.
* src/options.h: Create.
Declare enum opt_access_e.
Define struct option_table_struct.
2001-09-20 18:32:20 +00:00
Marc Autret 75f5aaea27 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
sections of Bison.
2001-09-20 18:24:27 +00:00
Pascal Bart f508cb0ac9 * src/bison.simple: s/%%filename/%%skeleton.
* src/muscle_tab.c (getargs.h): Include it.
(muscle_init): Insert new muscle skeleton.
2001-09-19 19:25:02 +00:00
Marc Autret f3c383d683 Update. 2001-09-19 15:25:49 +00:00
Pascal Bart 13105fc158 * src/output.c (output_parser): Delete unused variable actions_dumped. 2001-09-18 21:32:53 +00:00
Pascal Bart b0c4483ed2 * src/output.c (output): Delete call to reader_output_yylsp.
* src/reader.c (reader): Likewise.
* src/reader.h:	Delete declaration of reader_output_yylsp.
2001-09-07 16:50:01 +00:00
Marc Autret 714720fcfe Update 2001-09-02 17:25:48 +00:00
Marc Autret 4766a52862 Regen 2001-09-02 16:21:30 +00:00
Marc Autret 11d82f03b4 * src/reader.c: Include muscle_tab.h.
(parse_union_decl): Update.
(parse_macro_decl): Rename parse_muscle_decl.
Update to use renamed functions and variable.
(read_declarations, copy_action, read_additionnal_code, : Updated
with correct variables and functions names.
(packsymbols, reader): Likewise.
* src/reader.h (muscle_obstack): Extern declaration update.
* src/output.c: Include muscle_tab.h
In all functions using macro_insert, change by using muscle_insert ().
(macro_obstack): Rename muscle_obstack.
Echo modifications in the whole file.
(MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
(MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
(MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
* src/muscle_tab.h: Update double inclusion macros.
(macro_entry_s): Rename muscle_entry_s.
Update prototypes.
* src/muscle_tab.c: Include muscle_tab.h.
Rename macro_tabble to muscle_table.
(mhash1, mhash2, mcmp): Use muscle_entry.
(macro_init): Rename muscle_init. Update.
(macro_insert): Rename muscle_insert. Update.
(macro_find): Rename muscle_find. Update.
* src/main.c: Include muscle_tab.h.
(main): Call muscle_init ().
* src/Makefile.am (bison_SOURCES): Echo modifications.
2001-09-02 15:43:29 +00:00
Marc Autret a0ed1cb86a Update 2001-09-02 15:43:04 +00:00
Marc Autret f753cd6292 Add src/muscle_tab.c and src/muscle_tab.h 2001-09-02 15:27:27 +00:00
Marc Autret 93a37297e6 Remove src/macrotab.c and src/macrotab.h 2001-09-02 15:19:49 +00:00
Marc Autret 4134cae3c5 Update 2001-09-01 11:38:12 +00:00
Pascal Bart 682d48cd09 * src/reader.c (copy_guard): Use muscle to specify the `#line'
filename.
2001-09-01 10:40:54 +00:00
Marc Autret 53cdf751a3 Update 2001-09-01 01:23:21 +00:00
Marc Autret 087c8fdae3 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
to an explicit value to activate the feature. We do it here.
2001-09-01 01:20:54 +00:00
Pascal Bart 7a999fcb7b Update. 2001-08-31 23:24:55 +00:00
Pascal Bart dda680cb80 * src/output.c (prepare): Delete the `filename' muscule insertion.
* src/reader.c (copy_action): Use `filename' muscule with `#line'.
(parse_union_decl): Likewise.
* src/macrotab.c (macro_init): Initialize filename by infile.
2001-08-31 18:51:06 +00:00
Marc Autret 6b7d911c5d Update 2001-08-31 18:46:10 +00:00
Marc Autret 9e644e648d * src/bison.simple (YYLSP_NEEDED): New definition.
* src/output.c (prepare): Add macro insertion of `locations_flag'
2001-08-31 18:30:21 +00:00
Pascal Bart 17da6427fe * src/output.c (prepare): Delete insertion of previous muscles,
and insert the `prefix' muscles.
* src/macrotab.c (macro_init): Likewise.
(macro_init): Initialization prefix directive by `yy'.
* src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
%%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
yylval, yydebug, yyerror, yynerrs and yyparse.
New directive `#define' to substitute yydebug, ... with option
name_prefix.
2001-08-31 18:22:54 +00:00
Marc Autret 01ed3db59b Update 2001-08-31 17:07:18 +00:00
Pascal Bart e8cb70b957 * src/main.c (main): Standardize.
* src/output.c (output_table_data, output_parser): Likewise.
* src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
2001-08-31 16:56:44 +00:00
Marc Autret 63c2d5de0f * src/reader.c (read_additionnal_code): Rename %%user_code to
%%epilogue.
* src/output.c (output): Rename %%declarations to %%prologue.
* src/bison.simple: Echo modifications.
2001-08-31 16:01:53 +00:00
Marc Autret 675bc4e954 Update 2001-08-31 14:40:06 +00:00
Marc Autret d8cb51834b * src/reader.c (readgram): CleanUp.
(output_token_defines): Likewise.
(packsymbols): Likewise.
(reader): Likewise.
* src/output.c (output): CPP-out useless code.
2001-08-31 11:47:08 +00:00
Pascal Bart 6c686258e3 * src/reader.c (reader): Delete obsolete call to function
output_trailers and output_headers.
* src/output.h: Remove obsolete functions prototypes of output_headers
and output_trailers.
2001-08-31 08:00:56 +00:00
Marc Autret c111e171cd Update 2001-08-31 00:26:05 +00:00
Pascal Bart 8f451ef727 * src/main.c: Include macrotab.h.
* src/macrotab.h (macro_entry_s): Constify fields.
Adjust functions prototypes.
* src/macrotab.c (macro_insert): Constify key and value.
(macro_find): Constify key.
(macro_insert): Include 'xalloc.h'
(macro_insert): Use XMALLOC.
(macro_find): Constify return value.
* src/output.c (output_table_data): Rename table to table_data.
(output_parser): Constify macro_key, macro_value.
2001-08-30 18:51:56 +00:00
Akim Demaille 5086915ebd file bison was initially added on branch bison-1_29-branch. 2001-08-30 15:36:37 +00:00
Marc Autret 416bd7a9f3 New file 2001-08-30 00:44:59 +00:00
Marc Autret 997b6fd0c7 Adjust 2001-08-30 00:44:14 +00:00
Marc Autret 2ba3b73c58 * src/reader.c (parse_skel_decl): New.
(read_declarations): Add case `tok_skel', call parse_skel_decl ().
* src/lex.h (token_t): New token `tok_skel'.
* src/lex.c (percent_table): Add skeleton option entry.
Standardize.
2001-08-30 00:41:37 +00:00
Marc Autret ff48177d25 * src/bison.simple: Add %%user_code directive at the end.
* src/reader.c (read_additionnal_code): New.
(reader): Use it.
* src/output.c (output_program): Remove.
(output): Update.
2001-08-29 14:17:00 +00:00
Marc Autret 4e5caae2c6 Adjust 2001-08-28 20:55:58 +00:00
Marc Autret b33160bf45 * src/output.c (output_actions): Clean up.
* src/reader.c (reader): Clean up, CPP-out useless code.
2001-08-28 20:48:17 +00:00
Pascal Bart 535c0e75d1 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
directive.
* src/bison.simple: Add `%%definitions'.
2001-08-28 18:36:57 +00:00
Pascal Bart d1a2daf76a * src/output.c (output_definitions): New function, which copies
attrs_obstack in the '%%definitions' directive.
* src/bison.simple: Add `%%definitions'.
2001-08-28 18:35:33 +00:00
Marc Autret 2b763dfe15 * config/depcomp: New file. 2001-08-28 17:53:07 +00:00
Paul Eggert f1a87ef6ad * src/bison.simple (yyparse): Don't take the address of an
item before the start of an array, as that doesn't conform to
the C Standard.
2001-08-27 17:28:28 +00:00
Paul Eggert cbd8990652 (yyparse): Don't take the address of an item before the start of an
array, as that doesn't conform to the C Standard.
2001-08-27 17:24:34 +00:00
Robert Anisko 82e236e2d6 * src/output.c (output): Remove the initialization of the macro
obstack.  It was done too late here.

* src/reader.c (parse_macro_decl): Fix.  Use of the macro obstack was
completely wrong.
(reader): Initialize the macro obstack here, since we need it to grow
'%define' directives.

* src/reader.h: Declare the macro obstack as extern.
2001-08-27 14:55:39 +00:00
Robert Anisko b0cfa28a12 * src/output.c (output_parser): Fix. Store single '%' characters in
the output obstack instead of throwing them away.
2001-08-27 14:34:02 +00:00
Akim Demaille 6fc7423473 * Makefile.am (AUTOMAKE_OPTIONS): 1.5. 2001-08-27 08:57:54 +00:00
Marc Autret 40a64a7a48 Adjust 2001-08-25 18:38:03 +00:00
Robert Anisko 944bc6ce43 Regen. 2001-08-25 15:40:51 +00:00
Robert Anisko 9c76d118cc * lib/Makefile.am: Adjust. 2001-08-25 15:28:07 +00:00
Robert Anisko a8289c62db * src/bison.simple: Update and add '%%' directives. 2001-08-25 15:21:05 +00:00
Robert Anisko b6610515d5 * src/reader.c (reader): Remove calls to 'output_headers' and
'output_trailers'. Remove some C output.
(readgram): Disable a piece of code that was writing a default
definition for 'YYSTYPE'.
(reader_output_yylsp): Remove.
(packsymbols): Output token defintions to a macro.
(copy_definition): Disable C output.
* src/reader.c (parse_macro_decl): New function used to parse macro
declarations.
(copy_string2): Put the body of copy_string into this new function.
Add a parameter to let the caller choose whether he wants to copy the
string delimiters or not.
(copy_string): Be a simple call to copy_string2 with the last argument
bound to true.
(read_declarations): Add case for macro definition.
(copy_identifier): New.
(parse_macro_decl): Read macro identifiers using copy_identifier
rather than lex.
2001-08-25 15:13:42 +00:00
Robert Anisko 26f609ffc3 * src/output.c (prepare): Add prefixed names.
(output_parser): Output semantic actions.
(output_parser): Fix bug on '%%line' directives.
* src/output.c (output_headers): Remove. The C code printed by this
function should now be in the skeletons.
(output_trailers): Remove.
(output): Disable call to 'reader_output_yylsp'.
(output_rule_data): Do not output tables to the table obstack.
* src/output.c: Remove some C dedicated output.
Improve the use of macro and output obstacks.
(output_defines): Remove.
* src/output.c (output_token_translations): Associate 'translate'
table with a macro. No output to the table obstack.
(output_gram): Same for 'rhs' and 'prhs'.
(output_stos): Same for 'stos'.
(output_rule_data): Same for 'r1' and 'r2'.
(token_actions): Same for 'defact'.
(goto_actions): Same for 'defgoto'.
(output_base): Same for 'pact' and 'pgoto'.
(output_table): Same for 'table'.
(output_check): Same for 'check'.
* src/output.c (output_table_data): New function.
(output_short_table): Remove.
(output_short_or_char_table): Remove.
* src/output.c (output_parser): Replace most of the skeleton copy code
with something new. Skeletons are now processed character by character
rather than line by line, and Bison looks for '%%' macros. This is the
first step in making Bison's output process (a lot) more flexible.
(output_parser): Use the macro table.
2001-08-25 15:07:59 +00:00
Robert Anisko 6f43b11362 * src/main.c (main): Initialize the macro table. 2001-08-25 14:34:41 +00:00
Robert Anisko dd3127cf7a * src/lex.c (percent_table): Add tok_define.
* src/lex.h: Add tok_define.
2001-08-25 14:27:57 +00:00
Robert Anisko aa321494cf * src/macrotab.c: New file.
* src/macrotab.h: New file.
* src/Makefile.am: Update.
2001-08-25 14:21:46 +00:00
Robert Anisko 68bd3b6bfa * lib/hash.c: New file.
* lib/hash.h: New file.
* lib/Makefile.am: Update.
2001-08-25 14:15:11 +00:00
Robert Anisko bbb5bcc6f8 Revert to 1.28c 2001-08-25 13:13:14 +00:00
Pascal Bart 667a550e7b More cvsignore. 2001-08-23 22:51:37 +00:00
Pascal Bart 713fa62a74 Fix clcommit. 2001-08-21 20:44:16 +00:00
Robert Anisko 83cd972a1a 2001-08-20 Robert Anisko <[email protected]>
* src/output.c (prepare): Add prefixed names.
	(output_parser): Output semantic actions.
	(output_parser): Fix bug on '%%line' directives.

2001-08-19  Robert Anisko  <[email protected]>

	* src/output.c (output_rule_data): Do not output tables to
	the table obstack.

	* src/reader.c (reader): Remove calls to 'output_headers' and
	'output_trailers'. Remove some C output.
	(readgram): Disable a piece of code that was writing a default
	definition for 'YYSTYPE'.
	(reader_output_yylsp): Remove.
	(packsymbols): Output token defintions to a macro.
	(copy_definition): Disable C output.

	* src/output.c (output_headers): Remove. The C code printed by this
	function should now be in the skeletons.
	(output_trailers): Remove.
	(output): Disable call to 'reader_output_yylsp'.

2001-08-18  Robert Anisko  <[email protected]>

	* src/output.c: Remove some C dedicated output.

2001-08-18  Robert Anisko  <[email protected]>

	* src/output.c (output_defines): Remove.

2001-08-18  Robert Anisko  <[email protected]>

	* src/output.c: Improve the use of macro and output obstacks.

2001-08-18  Robert Anisko  <[email protected]>

	* src/output.c (output_token_translations): Associate 'translate' table
	with a macro. No output to the table obstack.
	(output_gram): Same for 'rhs' and 'prhs'.
	(output_stos): Same for 'stos'.
	(output_rule_data): Same for 'r1' and 'r2'.
	(token_actions): Same for 'defact'.
	(goto_actions): Same for 'defgoto'.
	(output_base): Same for 'pact' and 'pgoto'.
	(output_table): Same for 'table'.
	(output_check): Same for 'check'.

2001-08-18  Robert Anisko  <[email protected]>

	* src/output.c (output_table_data): New function.
	(output_short_table): Remove.
	(output_short_or_char_table): Remove.

2001-08-17  Robert Anisko  <[email protected]>

	* src/main.c (main): Initialize the macro table.

2001-08-17  Robert Anisko  <[email protected]>

	* src/output.c (output_parser): Use the macro table.
	* src/macrotab.c: New file.
	* src/macrotab.h: New file.

2001-08-17  Robert Anisko  <[email protected]>

	* lib/xalloc.h (CALLOC, MALLOC, REALLOC): New macros.

2001-08-17  Robert Anisko  <[email protected]>

	* lib/hash.c: New file.
	* lib/hash.h: New file.

2001-08-16  Robert Anisko  <[email protected]>

	* src/reader.c (parse_macro_decl): Read macro identifiers using
	copy_identifier rather than lex.

2001-08-16  Robert Anisko  <[email protected]>

	* src/reader.c (copy_identifier): New.

2001-08-16  Robert Anisko  <[email protected]>

	* src/reader.c (read_declarations): Add case for macro definition.
	* src/lex.c (percent_table): Add tok_define.
	* src/lex.h: Add tok_define.

2001-08-16  Robert Anisko  <[email protected]>

	* src/reader.c (parse_macro_decl): New function used to parse macro
	declarations.
	(copy_string2): Put the body of copy_string into this new function.
	Add a parameter to let the caller choose whether he wants to copy the
	string delimiters or not.
	(copy_string): Be a simple call to copy_string2 with the last argument
	bound to true.

2001-08-15  Robert Anisko  <[email protected]>

	* src/output.c (output_parser): Replace most of the skeleton copy code
	with something new. Skeletons are now processed character by character
	rather than line by line, and Bison looks for '%%' macros. This is the
	first step in making Bison's output process (a lot) more flexible.
2001-08-21 19:47:13 +00:00
40 changed files with 7357 additions and 3900 deletions
+1
View File
@@ -9,3 +9,4 @@ patches
*.patch *.log log patches applied *.patch *.log log patches applied
*.prj *.prj
releases releases
*.flc
+363 -1
View File
@@ -1,8 +1,370 @@
2001-09-25 Pascal Bart <[email protected]>
* src/output.c (output_master_parser): Don't finish action_obstack.
(output_parser): Don't care about the muscle action, here.
(prepare): Copy the action_obstack in the action muscle.
(output): Free action_obstack.
2001-09-23 Pascal Bart <[email protected]>
* src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
will contain `%union' declaration.
(parse_union_decl): Delete #line directive output.
(parse_union_decl): Substitute /attrs_obstack/union_obstack for all
informations about %union.
(parse_union_decl): Copy the union_obstack in the muscle stype.
* src/bison.simple: Add new #line directive.
Add typdef %%stype YYSTYPE.
2001-09-23 Pascal Bart <[email protected]>
* src/bison.simple: Add new `#line' directive.
2001-09-22 Pascal Bart <[email protected]>
* src/bison.simple: New `#line' directive.
* src/output.c (output_parser): Support new dynamic muscle input_line.
2001-09-22 Marc Autret <[email protected]>
* src/output.c (output_master_parser): New.
(output_parser): Be more re-entrant.
2001-09-21 Marc Autret <[email protected]>
* src/reader.c (copy_definition, parse_union_decl): Update and use
`linef' muscle.
(copy_action): Likewise.
Use obstack_1grow ().
* src/muscle_tab.c (muscle_init): Add muscle `linef'.
2001-09-21 Marc Autret <[email protected]>
* src/options.c (option_table): Adjust.
* src/lex.c (parse_percent_token): Fix.
2001-09-20 Pascal Bart <[email protected]>
* src/options.c (symtab.h): Include it, need by lex.h.
2001-09-20 Pascal Bart <[email protected]>
* src/lex.c (parse_percent_token): Change type of variable `tx', which
is now an option_table_struct*.
(option_strcmp): New function option_strcmp.
(parse_percent_token): Call option_strcmp.
* src/getargs.c (xalloc.h, options.h): Include it.
(getargs): Call create_long_option_table.
(getargs): Free longopts at the end of the function.
(shortopts): Move in options.c.
* src/options.c (create_long_option_table): New function. Convert
information from option_table to option structure.
* src/reader.c (options.h): Include it.
* src/Makefile.am: Adjust.
* src/options.c (option_table): Create from longopts and percent_table.
* src/getargs.c (longopts): Delete.
* src/lex.c (struct percent_table_struct): Delete.
(percent_table): Delete.
(options.h): Include it.
* src/options.c: Create.
* src/options.h: Create.
Declare enum opt_access_e.
Define struct option_table_struct.
2001-09-20 Marc Autret <[email protected]>
* doc/bison.texinfo: Adjust terminologies about prologue and epilogue
sections of Bison.
2001-09-19 Pascal Bart <[email protected]>
* src/bison.simple: s/%%filename/%%skeleton.
* src/muscle_tab.c (getargs.h): Include it.
(muscle_init): Insert new muscle skeleton.
2001-09-18 Pascal Bart <[email protected]>
* src/output.c (output_parser): Delete unused variable actions_dumped.
2001-09-07 Pascal Bart <[email protected]>
* src/output.c (output): Delete call to reader_output_yylsp.
* src/reader.c (reader): Likewise.
* src/reader.h: Delete declaration of reader_output_yylsp.
2001-09-02 Marc Autret <[email protected]>
* src/reader.c: Include muscle_tab.h.
(parse_union_decl): Update.
(parse_macro_decl): Rename parse_muscle_decl.
Update to use renamed functions and variable.
(read_declarations, copy_action, read_additionnal_code, : Updated
with correct variables and functions names.
(packsymbols, reader): Likewise.
* src/reader.h (muscle_obstack): Extern declaration update.
* src/output.c: Include muscle_tab.h
In all functions using macro_insert, change by using muscle_insert ().
(macro_obstack): Rename muscle_obstack.
Echo modifications in the whole file.
(MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
(MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
(MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
* src/muscle_tab.h: Update double inclusion macros.
(macro_entry_s): Rename muscle_entry_s.
Update prototypes.
* src/muscle_tab.c: Include muscle_tab.h.
Rename macro_tabble to muscle_table.
(mhash1, mhash2, mcmp): Use muscle_entry.
(macro_init): Rename muscle_init. Update.
(macro_insert): Rename muscle_insert. Update.
(macro_find): Rename muscle_find. Update.
* src/main.c: Include muscle_tab.h.
(main): Call muscle_init ().
* src/Makefile.am (bison_SOURCES): Echo modifications.
2001-09-02 Marc Autret <[email protected]>
Now the files macro_tab.[ch] are named muscle_tab.[ch].
* src/muscle_tab.c, src/muscle_tab.h: Add files.
2001-09-02 Marc Autret <[email protected]>
* src/macrotab.c, src/macrotab.h: Remove.
2001-09-01 Pascal Bart <[email protected]>
* src/reader.c (copy_guard): Use muscle to specify the `#line'
filename.
2001-09-01 Marc Autret <[email protected]>
* tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
to an explicit value to activate the feature. We do it here.
2001-08-31 Pascal Bart <[email protected]>
* src/output.c (prepare): Delete the `filename' muscule insertion.
* src/reader.c (copy_action): Use `filename' muscule with `#line'.
(parse_union_decl): Likewise.
* src/macrotab.c (macro_init): Initialize filename by infile.
2001-08-31 Marc Autret <[email protected]>
* src/bison.simple (YYLSP_NEEDED): New definition.
* src/output.c (prepare): Add macro insertion of `locations_flag'
2001-08-31 Pascal Bart <[email protected]>
* src/output.c (prepare): Delete insertion of previous muscles,
and insert the `prefix' muscles.
* src/macrotab.c (macro_init): Likewise.
(macro_init): Initialization prefix directive by `yy'.
* src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
%%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
yylval, yydebug, yyerror, yynerrs and yyparse.
New directive `#define' to substitute yydebug, ... with option
name_prefix.
2001-08-31 Pascal Bart <[email protected]>
* src/main.c (main): Standardize.
* src/output.c (output_table_data, output_parser): Likewise.
* src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
2001-08-31 Pascal Bart <[email protected]>, Marc Autret <[email protected]>
* src/reader.c (read_additionnal_code): Rename %%user_code to
%%epilogue.
* src/output.c (output): Rename %%declarations to %%prologue.
* src/bison.simple: Echo modifications.
2001-08-31 Marc Autret <[email protected]>
* src/reader.c (readgram): CleanUp.
(output_token_defines): Likewise.
(packsymbols): Likewise.
(reader): Likewise.
* src/output.c (output): CPP-out useless code.
2001-08-31 Pascal Bart <[email protected]>
* src/reader.c (reader): Delete obsolete call to function
output_trailers and output_headers.
* src/output.h: Remove obsolete functions prototypes of output_headers
and output_trailers.
2001-08-30 Pascal Bart <[email protected]>
* src/main.c: Include macrotab.h.
* src/macrotab.h (macro_entry_s): Constify fields.
Adjust functions prototypes.
* src/macrotab.c (macro_insert): Constify key and value.
(macro_find): Constify key.
(macro_insert): Include 'xalloc.h'
(macro_insert): Use XMALLOC.
(macro_find): Constify return value.
* src/output.c (output_table_data): Rename table to table_data.
(output_parser): Constify macro_key, macro_value.
2001-08-30 Marc Autret <[email protected]>
* src/reader.c (parse_skel_decl): New.
(read_declarations): Add case `tok_skel', call parse_skel_decl ().
* src/lex.h (token_t): New token `tok_skel'.
* src/lex.c (percent_table): Add skeleton option entry.
Standardize.
2001-08-29 Marc Autret <[email protected]>
* src/bison.simple: Add %%user_code directive at the end.
* src/reader.c (read_additionnal_code): New.
(reader): Use it.
* src/output.c (output_program): Remove.
(output): Update.
2001-08-28 Marc Autret <[email protected]>
* src/output.c (output_actions): Clean up.
(output_gram): CPP-out useless code.
* src/reader.c (reader): Clean up, CPP-out useless code.
2001-08-28 Pascal Bart <[email protected]>
* src/output.c (output): Copy attrs_obstack in the '%%definitions'
directive.
* src/bison.simple: Add `%%definitions'.
2001-08-28 Marc Autret <[email protected]>
* config/depcomp: New file.
2001-08-27 Paul Eggert <[email protected]>
* src/bison.simple (yyparse): Don't take the address of an
item before the start of an array, as that doesn't conform to
the C Standard.
2001-08-27 Robert Anisko <[email protected]>
* src/output.c (output): Remove the initialization of the macro
obstack. It was done too late here.
* src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
completely wrong.
(reader): Initialize the macro obstack here, since we need it to grow
'%define' directives.
* src/reader.h: Declare the macro obstack as extern.
2001-08-27 Robert Anisko <[email protected]>
* src/output.c (output_parser): Fix. Store single '%' characters in
the output obstack instead of throwing them away.
2001-08-27 Akim Demaille <[email protected]>
* Makefile.am (AUTOMAKE_OPTIONS): 1.5.
2001-08-25 Robert Anisko <[email protected]>
* lib/Makefile.am: Adjust.
2001-08-25 Robert Anisko <[email protected]>
* src/bison.simple: Update and add '%%' directives.
2001-08-25 Robert Anisko <[email protected]>
* src/reader.c (reader): Remove calls to 'output_headers' and
'output_trailers'. Remove some C output.
(readgram): Disable a piece of code that was writing a default
definition for 'YYSTYPE'.
(reader_output_yylsp): Remove.
(packsymbols): Output token defintions to a macro.
(copy_definition): Disable C output.
* src/reader.c (parse_macro_decl): New function used to parse macro
declarations.
(copy_string2): Put the body of copy_string into this new function.
Add a parameter to let the caller choose whether he wants to copy the
string delimiters or not.
(copy_string): Be a simple call to copy_string2 with the last argument
bound to true.
(read_declarations): Add case for macro definition.
(copy_identifier): New.
(parse_macro_decl): Read macro identifiers using copy_identifier
rather than lex.
2001-08-25 Robert Anisko <[email protected]>
* src/output.c (prepare): Add prefixed names.
(output_parser): Output semantic actions.
(output_parser): Fix bug on '%%line' directives.
* src/output.c (output_headers): Remove. The C code printed by this
function should now be in the skeletons.
(output_trailers): Remove.
(output): Disable call to 'reader_output_yylsp'.
(output_rule_data): Do not output tables to the table obstack.
* src/output.c: Remove some C dedicated output.
Improve the use of macro and output obstacks.
(output_defines): Remove.
* src/output.c (output_token_translations): Associate 'translate'
table with a macro. No output to the table obstack.
(output_gram): Same for 'rhs' and 'prhs'.
(output_stos): Same for 'stos'.
(output_rule_data): Same for 'r1' and 'r2'.
(token_actions): Same for 'defact'.
(goto_actions): Same for 'defgoto'.
(output_base): Same for 'pact' and 'pgoto'.
(output_table): Same for 'table'.
(output_check): Same for 'check'.
* src/output.c (output_table_data): New function.
(output_short_table): Remove.
(output_short_or_char_table): Remove.
* src/output.c (output_parser): Replace most of the skeleton copy code
with something new. Skeletons are now processed character by character
rather than line by line, and Bison looks for '%%' macros. This is the
first step in making Bison's output process (a lot) more flexible.
(output_parser): Use the macro table.
2001-08-25 Robert Anisko <[email protected]>
* src/main.c (main): Initialize the macro table.
2001-08-25 Robert Anisko <[email protected]>
* src/lex.c (percent_table): Add tok_define.
* src/lex.h: Add tok_define.
2001-08-25 Robert Anisko <[email protected]>
* src/macrotab.c: New file.
* src/macrotab.h: New file.
* src/Makefile.am: Update.
2001-08-25 Robert Anisko <[email protected]>
* lib/hash.c: New file.
* lib/hash.h: New file.
* lib/Makefile.am: Update.
2001-08-15 Akim Demaille <[email protected]> 2001-08-15 Akim Demaille <[email protected]>
Version 1.28c. Version 1.28c.
2001-08-15 Marc Autret <prog@epita.fr> 2001-08-15 Marc Autret <autret_m@epita.fr>
* src/reader.c (readgram): Indent output macro YYSTYPE. * src/reader.c (readgram): Indent output macro YYSTYPE.
(packsymbols): Likewise. (packsymbols): Likewise.
+1 -1
View File
@@ -1,5 +1,5 @@
## Process this file with automake to produce Makefile.in -*-Makefile-*- ## Process this file with automake to produce Makefile.in -*-Makefile-*-
AUTOMAKE_OPTIONS = 1.4 check-news readme-alpha AUTOMAKE_OPTIONS = 1.5 check-news readme-alpha
ACLOCAL_AMFLAGS = -I m4 ACLOCAL_AMFLAGS = -I m4
+211 -169
View File
@@ -1,6 +1,7 @@
# Makefile.in generated automatically by automake 1.4-p4 from Makefile.am # Makefile.in generated automatically by automake 1.5 from Makefile.am.
# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. # Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
# Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation # This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved. # with or without modifications, as long as this notice is preserved.
@@ -10,6 +11,7 @@
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE. # PARTICULAR PURPOSE.
@SET_MAKE@
SHELL = @SHELL@ SHELL = @SHELL@
@@ -31,13 +33,9 @@ infodir = @infodir@
mandir = @mandir@ mandir = @mandir@
includedir = @includedir@ includedir = @includedir@
oldincludedir = /usr/include oldincludedir = /usr/include
DESTDIR =
pkgdatadir = $(datadir)/@PACKAGE@ pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = . top_builddir = .
ACLOCAL = @ACLOCAL@ ACLOCAL = @ACLOCAL@
@@ -46,11 +44,11 @@ AUTOMAKE = @AUTOMAKE@
AUTOHEADER = @AUTOHEADER@ AUTOHEADER = @AUTOHEADER@
INSTALL = @INSTALL@ INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS) INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_HEADER = $(INSTALL_DATA)
transform = @program_transform_name@ transform = @program_transform_name@
NORMAL_INSTALL = : NORMAL_INSTALL = :
PRE_INSTALL = : PRE_INSTALL = :
POST_INSTALL = : POST_INSTALL = :
@@ -59,20 +57,25 @@ PRE_UNINSTALL = :
POST_UNINSTALL = : POST_UNINSTALL = :
host_alias = @host_alias@ host_alias = @host_alias@
host_triplet = @host@ host_triplet = @host@
AMTAR = @AMTAR@
AT_TESTPATH = @AT_TESTPATH@ AT_TESTPATH = @AT_TESTPATH@
AWK = @AWK@
BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@ BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@
CATALOGS = @CATALOGS@ CATALOGS = @CATALOGS@
CATOBJEXT = @CATOBJEXT@ CATOBJEXT = @CATOBJEXT@
CC = @CC@ CC = @CC@
CPP = @CPP@ CPP = @CPP@
DATADIRNAME = @DATADIRNAME@ DATADIRNAME = @DATADIRNAME@
DEPDIR = @DEPDIR@
ECHO_C = @ECHO_C@ ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@ ECHO_T = @ECHO_T@
EXEEXT = @EXEEXT@
GENCAT = @GENCAT@ GENCAT = @GENCAT@
GLIBC21 = @GLIBC21@ GLIBC21 = @GLIBC21@
GMOFILES = @GMOFILES@ GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@ GMSGFMT = @GMSGFMT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INSTOBJEXT = @INSTOBJEXT@ INSTOBJEXT = @INSTOBJEXT@
INTLBISON = @INTLBISON@ INTLBISON = @INTLBISON@
INTLLIBS = @INTLLIBS@ INTLLIBS = @INTLLIBS@
@@ -81,9 +84,9 @@ INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
LIBICONV = @LIBICONV@ LIBICONV = @LIBICONV@
LIBOBJS = @LIBOBJS@ LIBOBJS = @LIBOBJS@
M4 = @M4@ M4 = @M4@
MAKEINFO = @MAKEINFO@
MKINSTALLDIRS = @MKINSTALLDIRS@ MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@ MSGFMT = @MSGFMT@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@ PACKAGE = @PACKAGE@
POFILES = @POFILES@ POFILES = @POFILES@
POSUB = @POSUB@ POSUB = @POSUB@
@@ -93,8 +96,11 @@ USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
USE_NLS = @USE_NLS@ USE_NLS = @USE_NLS@
VERSION = @VERSION@ VERSION = @VERSION@
WARNING_CFLAGS = @WARNING_CFLAGS@ WARNING_CFLAGS = @WARNING_CFLAGS@
am__include = @am__include@
am__quote = @am__quote@
install_sh = @install_sh@
AUTOMAKE_OPTIONS = 1.4 check-news readme-alpha AUTOMAKE_OPTIONS = 1.5 check-news readme-alpha
ACLOCAL_AMFLAGS = -I m4 ACLOCAL_AMFLAGS = -I m4
@@ -114,69 +120,72 @@ alpha_host = alpha.gnu.org
alpha_url_dir = gnu/bison alpha_url_dir = gnu/bison
# Files to update automatically. # Files to update automatically.
wget_files = $(srcdir)/config/config.guess $(srcdir)/config/config.sub $(srcdir)/config/texinfo.tex wget_files = $(srcdir)/config/config.guess $(srcdir)/config/config.sub \
$(srcdir)/config/texinfo.tex
subdir = .
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
CONFIG_HEADER = config.h CONFIG_HEADER = config.h
CONFIG_CLEAN_FILES = CONFIG_CLEAN_FILES = intl/Makefile
DIST_SOURCES =
RECURSIVE_TARGETS = info-recursive dvi-recursive install-info-recursive \
uninstall-info-recursive all-recursive install-data-recursive \
install-exec-recursive installdirs-recursive install-recursive \
uninstall-recursive check-recursive installcheck-recursive
DIST_COMMON = README ./stamp-h.in ABOUT-NLS AUTHORS COPYING ChangeLog \ DIST_COMMON = README ./stamp-h.in ABOUT-NLS AUTHORS COPYING ChangeLog \
INSTALL Makefile.am Makefile.in NEWS README-alpha THANKS aclocal.m4 \ INSTALL Makefile.am Makefile.in NEWS README-alpha THANKS TODO \
config.hin configure configure.in missing mkinstalldirs aclocal.m4 config.hin configure configure.in missing \
mkinstalldirs
DIST_SUBDIRS = $(SUBDIRS)
all: config.h
$(MAKE) $(AM_MAKEFLAGS) all-recursive
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
TAR = tar
GZIP_ENV = --best
all: all-redirect
.SUFFIXES: .SUFFIXES:
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile cd $(top_srcdir) && \
$(AUTOMAKE) --gnu Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) && \
CONFIG_HEADERS= CONFIG_LINKS= \
CONFIG_FILES=$@ $(SHELL) ./config.status
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) $(top_builddir)/config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) \
&& CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
$(ACLOCAL_M4): configure.in m4/atconfig.m4 m4/c-bs-a.m4 m4/codeset.m4 \
m4/error.m4 m4/gettext.m4 m4/glibc21.m4 m4/iconv.m4 \
m4/isc-posix.m4 m4/lcmessage.m4 m4/m4.m4 m4/malloc.m4 \
m4/mbstate_t.m4 m4/prereq.m4 m4/progtest.m4 \
m4/realloc.m4 m4/strerror_r.m4 m4/warning.m4
cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
config.status: $(srcdir)/configure.in $(CONFIG_STATUS_DEPENDENCIES)
$(SHELL) ./config.status --recheck $(SHELL) ./config.status --recheck
$(srcdir)/configure: $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES) $(srcdir)/configure: $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
cd $(srcdir) && $(AUTOCONF) cd $(srcdir) && $(AUTOCONF)
$(ACLOCAL_M4): configure.in m4/atconfig.m4 m4/c-bs-a.m4 m4/codeset.m4 m4/error.m4 m4/gettext.m4 m4/glibc21.m4 m4/iconv.m4 m4/isc-posix.m4 m4/lcmessage.m4 m4/m4.m4 m4/malloc.m4 m4/mbstate_t.m4 m4/prereq.m4 m4/progtest.m4 m4/realloc.m4 m4/strerror_r.m4 m4/warning.m4
cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
config.h: stamp-h config.h: stamp-h
@if test ! -f $@; then \ @if test ! -f $@; then \
rm -f stamp-h; \ rm -f stamp-h; \
$(MAKE) stamp-h; \ $(MAKE) stamp-h; \
else :; fi else :; fi
stamp-h: $(srcdir)/config.hin $(top_builddir)/config.status stamp-h: $(srcdir)/config.hin $(top_builddir)/config.status
@rm -f stamp-h stamp-hT
@echo timestamp > stamp-hT 2> /dev/null
cd $(top_builddir) \ cd $(top_builddir) \
&& CONFIG_FILES= CONFIG_HEADERS=config.h:config.hin \ && CONFIG_FILES= CONFIG_HEADERS=config.h:config.hin \
$(SHELL) ./config.status $(SHELL) ./config.status
@echo timestamp > stamp-h 2> /dev/null @mv stamp-hT stamp-h
$(srcdir)/config.hin: $(srcdir)/stamp-h.in $(srcdir)/config.hin: $(srcdir)/./stamp-h.in
@if test ! -f $@; then \ @if test ! -f $@; then \
rm -f $(srcdir)/stamp-h.in; \ rm -f $(srcdir)/./stamp-h.in; \
$(MAKE) $(srcdir)/stamp-h.in; \ $(MAKE) $(srcdir)/./stamp-h.in; \
else :; fi else :; fi
$(srcdir)/stamp-h.in: $(top_srcdir)/configure.in $(ACLOCAL_M4) $(srcdir)/./stamp-h.in: $(top_srcdir)/configure.in $(ACLOCAL_M4)
@rm -f $(srcdir)/./stamp-h.in $(srcdir)/./stamp-h.inT
@echo timestamp > $(srcdir)/./stamp-h.inT 2> /dev/null
cd $(top_srcdir) && $(AUTOHEADER) cd $(top_srcdir) && $(AUTOHEADER)
@echo timestamp > $(srcdir)/stamp-h.in 2> /dev/null @mv $(srcdir)/./stamp-h.inT $(srcdir)/./stamp-h.in
mostlyclean-hdr:
clean-hdr:
distclean-hdr: distclean-hdr:
-rm -f config.h -rm -f config.h
intl/Makefile: $(top_builddir)/config.status $(top_srcdir)/intl/Makefile.in
maintainer-clean-hdr: cd $(top_builddir) && CONFIG_FILES=$@ CONFIG_HEADERS= CONFIG_LINKS= $(SHELL) ./config.status
uninstall-info-am:
# This directory's subdirectories are mostly independent; you can cd # This directory's subdirectories are mostly independent; you can cd
# into them and run `make' without going through this Makefile. # into them and run `make' without going through this Makefile.
@@ -184,12 +193,7 @@ maintainer-clean-hdr:
# (1) if the variable is set in `config.status', edit `config.status' # (1) if the variable is set in `config.status', edit `config.status'
# (which will cause the Makefiles to be regenerated when you run `make'); # (which will cause the Makefiles to be regenerated when you run `make');
# (2) otherwise, pass the desired values on the `make' command line. # (2) otherwise, pass the desired values on the `make' command line.
$(RECURSIVE_TARGETS):
@SET_MAKE@
all-recursive install-data-recursive install-exec-recursive \
installdirs-recursive install-recursive uninstall-recursive \
check-recursive installcheck-recursive info-recursive dvi-recursive:
@set fnord $(MAKEFLAGS); amf=$$2; \ @set fnord $(MAKEFLAGS); amf=$$2; \
dot_seen=no; \ dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \ target=`echo $@ | sed s/-recursive//`; \
@@ -212,11 +216,16 @@ mostlyclean-recursive clean-recursive distclean-recursive \
maintainer-clean-recursive: maintainer-clean-recursive:
@set fnord $(MAKEFLAGS); amf=$$2; \ @set fnord $(MAKEFLAGS); amf=$$2; \
dot_seen=no; \ dot_seen=no; \
rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \ case "$@" in \
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
*) list='$(SUBDIRS)' ;; \
esac; \
rev=''; for subdir in $$list; do \
if test "$$subdir" = "."; then :; else \
rev="$$subdir $$rev"; \ rev="$$subdir $$rev"; \
test "$$subdir" = "." && dot_seen=yes; \ fi; \
done; \ done; \
test "$$dot_seen" = "no" && rev=". $$rev"; \ rev="$$rev ."; \
target=`echo $@ | sed s/-recursive//`; \ target=`echo $@ | sed s/-recursive//`; \
for subdir in $$rev; do \ for subdir in $$rev; do \
echo "Making $$target in $$subdir"; \ echo "Making $$target in $$subdir"; \
@@ -235,15 +244,17 @@ tags-recursive:
tags: TAGS tags: TAGS
ID: $(HEADERS) $(SOURCES) $(LISP) ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS)'; \ list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
unique=`for i in $$list; do echo $$i; done | \ unique=`for i in $$list; do \
awk ' { files[$$0] = 1; } \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \ END { for (i in files) print i; }'`; \
here=`pwd` && cd $(srcdir) \ mkid -fID $$unique $(LISP)
&& mkid -f$$here/ID $$unique $(LISP)
TAGS: tags-recursive $(HEADERS) $(SOURCES) config.hin $(TAGS_DEPENDENCIES) $(LISP) TAGS: tags-recursive $(HEADERS) $(SOURCES) config.hin $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \ tags=; \
here=`pwd`; \ here=`pwd`; \
list='$(SUBDIRS)'; for subdir in $$list; do \ list='$(SUBDIRS)'; for subdir in $$list; do \
@@ -251,77 +262,53 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) config.hin $(TAGS_DEPENDENCIES) $(LIS
test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \ test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
fi; \ fi; \
done; \ done; \
list='$(SOURCES) $(HEADERS)'; \ list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
unique=`for i in $$list; do echo $$i; done | \ unique=`for i in $$list; do \
awk ' { files[$$0] = 1; } \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \ END { for (i in files) print i; }'`; \
test -z "$(ETAGS_ARGS)config.hin$$unique$(LISP)$$tags" \ test -z "$(ETAGS_ARGS)config.hin$$unique$(LISP)$$tags" \
|| (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags config.hin $$unique $(LISP) -o $$here/TAGS) || etags $(ETAGS_ARGS) $$tags config.hin $$unique $(LISP)
mostlyclean-tags: GTAGS:
here=`CDPATH=: && cd $(top_builddir) && pwd` \
clean-tags: && cd $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) $$here
distclean-tags: distclean-tags:
-rm -f TAGS ID -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH
maintainer-clean-tags: DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
top_distdir = .
# Avoid unsightly `./'.
distdir = $(PACKAGE)-$(VERSION) distdir = $(PACKAGE)-$(VERSION)
top_distdir = $(distdir)
# This target untars the dist file and tries a VPATH configuration. Then GZIP_ENV = --best
# it guarantees that the distribution is self-contained by making another
# tarfile.
distcheck: dist
-rm -rf $(distdir)
GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz
mkdir $(distdir)/=build
mkdir $(distdir)/=inst
dc_install_base=`cd $(distdir)/=inst && pwd`; \
cd $(distdir)/=build \
&& ../configure --with-included-gettext --srcdir=.. --prefix=$$dc_install_base \
&& $(MAKE) $(AM_MAKEFLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
&& $(MAKE) $(AM_MAKEFLAGS) check \
&& $(MAKE) $(AM_MAKEFLAGS) install \
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \
&& $(MAKE) $(AM_MAKEFLAGS) dist
-rm -rf $(distdir)
@banner="$(distdir).tar.gz is ready for distribution"; \
dashes=`echo "$$banner" | sed s/./=/g`; \
echo "$$dashes"; \
echo "$$banner"; \
echo "$$dashes"
dist: distdir
-chmod -R a+r $(distdir)
GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
-rm -rf $(distdir)
dist-all: distdir
-chmod -R a+r $(distdir)
GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
-rm -rf $(distdir)
distdir: $(DISTFILES) distdir: $(DISTFILES)
@if sed 15q $(srcdir)/NEWS | fgrep -e "$(VERSION)" > /dev/null; then :; else \ @if sed 15q $(srcdir)/NEWS | fgrep -e "$(VERSION)" >/dev/null; \
then :; else \
echo "NEWS not updated; not releasing" 1>&2; \ echo "NEWS not updated; not releasing" 1>&2; \
exit 1; \ exit 1; \
fi fi
-rm -rf $(distdir) -chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir)
mkdir $(distdir) mkdir $(distdir)
-chmod 777 $(distdir) $(mkinstalldirs) $(distdir)/intl $(distdir)/po $(distdir)/tests
here=`cd $(top_builddir) && pwd`; \
top_distdir=`cd $(distdir) && pwd`; \
distdir=`cd $(distdir) && pwd`; \
cd $(top_srcdir) \
&& $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu Makefile
@for file in $(DISTFILES); do \ @for file in $(DISTFILES); do \
d=$(srcdir); \ if test -f $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
$(mkinstalldirs) "$(distdir)/$$dir"; \
fi; \
if test -d $$d/$$file; then \ if test -d $$d/$$file; then \
cp -pr $$d/$$file $(distdir)/$$file; \ cp -pR $$d/$$file $(distdir) \
|| exit 1; \
else \ else \
test -f $(distdir)/$$file \ test -f $(distdir)/$$file \
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \ || cp -p $$d/$$file $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file || :; \ || exit 1; \
fi; \ fi; \
done done
for subdir in $(SUBDIRS); do \ for subdir in $(SUBDIRS); do \
@@ -329,85 +316,140 @@ distdir: $(DISTFILES)
test -d $(distdir)/$$subdir \ test -d $(distdir)/$$subdir \
|| mkdir $(distdir)/$$subdir \ || mkdir $(distdir)/$$subdir \
|| exit 1; \ || exit 1; \
chmod 777 $(distdir)/$$subdir; \ (cd $$subdir && \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir=../$(distdir) distdir=../$(distdir)/$$subdir distdir) \ $(MAKE) $(AM_MAKEFLAGS) \
top_distdir="$(top_distdir)" \
distdir=../$(distdir)/$$subdir \
distdir) \
|| exit 1; \ || exit 1; \
fi; \ fi; \
done done
info-am: -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
info: info-recursive ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
dvi-am: ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
dvi: dvi-recursive ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
|| chmod -R a+r $(distdir)
dist: distdir
$(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
-chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir)
# This target untars the dist file and tries a VPATH configuration. Then
# it guarantees that the distribution is self-contained by making another
# tarfile.
distcheck: dist
-chmod -R a+w $(distdir) > /dev/null 2>&1; rm -rf $(distdir)
GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(AMTAR) xf -
chmod -R a-w $(distdir); chmod a+w $(distdir)
mkdir $(distdir)/=build
mkdir $(distdir)/=inst
chmod a-w $(distdir)
dc_install_base=`CDPATH=: && cd $(distdir)/=inst && pwd` \
&& cd $(distdir)/=build \
&& ../configure --srcdir=.. --prefix=$$dc_install_base \
--with-included-gettext \
&& $(MAKE) $(AM_MAKEFLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
&& $(MAKE) $(AM_MAKEFLAGS) check \
&& $(MAKE) $(AM_MAKEFLAGS) install \
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \
&& $(MAKE) $(AM_MAKEFLAGS) uninstall \
&& (test `find $$dc_install_base -type f -print | wc -l` -le 1 \
|| (echo "Error: files left after uninstall" 1>&2; \
exit 1) ) \
&& $(MAKE) $(AM_MAKEFLAGS) dist \
&& $(MAKE) $(AM_MAKEFLAGS) distclean \
&& rm -f $(distdir).tar.gz \
&& (test `find . -type f -print | wc -l` -eq 0 \
|| (echo "Error: files left after distclean" 1>&2; \
exit 1) )
-chmod -R a+w $(distdir) > /dev/null 2>&1; rm -rf $(distdir)
@echo "$(distdir).tar.gz is ready for distribution" | \
sed 'h;s/./=/g;p;x;p;x'
check-am: all-am check-am: all-am
check: check-recursive check: check-recursive
installcheck-am:
installcheck: installcheck-recursive
all-recursive-am: config.h
$(MAKE) $(AM_MAKEFLAGS) all-recursive
install-exec-am:
install-exec: install-exec-recursive
install-data-am:
install-data: install-data-recursive
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
install: install-recursive
uninstall-am:
uninstall: uninstall-recursive
all-am: Makefile config.h all-am: Makefile config.h
all-redirect: all-recursive-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
installdirs: installdirs-recursive installdirs: installdirs-recursive
installdirs-am: installdirs-am:
install: install-recursive
install-exec: install-exec-recursive
install-data: install-data-recursive
uninstall: uninstall-recursive
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-recursive
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic: mostlyclean-generic:
clean-generic: clean-generic:
distclean-generic: distclean-generic:
-rm -f Makefile $(CONFIG_CLEAN_FILES) -rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]*
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
maintainer-clean-generic: maintainer-clean-generic:
mostlyclean-am: mostlyclean-hdr mostlyclean-tags mostlyclean-generic @echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-recursive
clean-am: clean-generic mostlyclean-am
dist-all: distdir
$(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
-chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir)
distclean: distclean-recursive
-rm -f config.status config.cache config.log
distclean-am: clean-am distclean-generic distclean-hdr distclean-tags
dvi: dvi-recursive
dvi-am:
info: info-recursive
info-am:
install-data-am:
install-exec-am:
install-info: install-info-recursive
install-man:
installcheck-am:
maintainer-clean: maintainer-clean-recursive
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-recursive mostlyclean: mostlyclean-recursive
clean-am: clean-hdr clean-tags clean-generic mostlyclean-am mostlyclean-am: mostlyclean-generic
clean: clean-recursive uninstall-am: uninstall-info-am
distclean-am: distclean-hdr distclean-tags distclean-generic clean-am uninstall-info: uninstall-info-recursive
distclean: distclean-recursive
-rm -f config.status
maintainer-clean-am: maintainer-clean-hdr maintainer-clean-tags \
maintainer-clean-generic distclean-am
@echo "This command is intended for maintainers to use;"
@echo "it deletes files that may require special tools to rebuild."
maintainer-clean: maintainer-clean-recursive
-rm -f config.status
.PHONY: mostlyclean-hdr distclean-hdr clean-hdr maintainer-clean-hdr \
install-data-recursive uninstall-data-recursive install-exec-recursive \
uninstall-exec-recursive installdirs-recursive uninstalldirs-recursive \
all-recursive check-recursive installcheck-recursive info-recursive \
dvi-recursive mostlyclean-recursive distclean-recursive clean-recursive \
maintainer-clean-recursive tags tags-recursive mostlyclean-tags \
distclean-tags clean-tags maintainer-clean-tags distdir info-am info \
dvi-am dvi check check-am installcheck-am installcheck all-recursive-am \
install-exec-am install-exec install-data-am install-data install-am \
install uninstall-am uninstall all-redirect all-am all installdirs-am \
installdirs mostlyclean-generic distclean-generic clean-generic \
maintainer-clean-generic clean mostlyclean distclean maintainer-clean
.PHONY: $(RECURSIVE_TARGETS) GTAGS all all-am check check-am clean \
clean-generic clean-recursive dist dist-all distcheck distclean \
distclean-generic distclean-hdr distclean-recursive \
distclean-tags distdir dvi dvi-am dvi-recursive info info-am \
info-recursive install install-am install-data install-data-am \
install-data-recursive install-exec install-exec-am \
install-exec-recursive install-info install-info-am \
install-info-recursive install-man install-recursive \
install-strip installcheck installcheck-am installdirs \
installdirs-am installdirs-recursive maintainer-clean \
maintainer-clean-generic maintainer-clean-recursive mostlyclean \
mostlyclean-generic mostlyclean-recursive tags tags-recursive \
uninstall uninstall-am uninstall-info-am \
uninstall-info-recursive uninstall-recursive
# Tell versions [3.59,3.63) of GNU make to not export all variables. # Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded. # Otherwise a system limit (for SysV at least) may be exceeded.
+28
View File
@@ -0,0 +1,28 @@
-*- outline -*-
* src/reader.c
Complete parse_skel_decl () with parse_dquoted_param (). []
Check and cleanup for CPP-out code. []
* src/output.c
Synchronize `#line' directive with user file. [ok]
Cleanup dirty CPP-out code. []
** Output sub-skeleton files. []
Useful for %no_parser. []
*** New skeleton. []
* src/getargs.c src/lex.c
Synchronize percent and command line options. [ok]
* src/macrotab.[ch]
Removing warnings when compiling. (gcc-warnings). [ok]
* src/print_graph.c
Find the best graph parameters. []
* doc/bison.texinfo
Echo modifications of prologue and epilogue. []
Add informations about YYERROR_VERBOSE. []
Add explainations about skeleton muscles. []
Add explainations about %skeleton. []
Vendored
+517 -83
View File
@@ -1,70 +1,133 @@
dnl aclocal.m4 generated automatically by aclocal 1.4-p4 # aclocal.m4 generated automatically by aclocal 1.5
dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. # Copyright 1996, 1997, 1998, 1999, 2000, 2001
dnl This file is free software; the Free Software Foundation # Free Software Foundation, Inc.
dnl gives unlimited permission to copy and/or distribute it, # This file is free software; the Free Software Foundation
dnl with or without modifications, as long as this notice is preserved. # gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
dnl This program is distributed in the hope that it will be useful, # This program is distributed in the hope that it will be useful,
dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
dnl PARTICULAR PURPOSE. # PARTICULAR PURPOSE.
# Do all the work for Automake. This macro actually does too much -- # Do all the work for Automake. This macro actually does too much --
# some checks are only needed if your package does certain things. # some checks are only needed if your package does certain things.
# But this isn't really a big deal. # But this isn't really a big deal.
# serial 1 # serial 5
dnl Usage: # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
dnl AM_INIT_AUTOMAKE(package,version, [no-define]) # written in clear, in which case automake, when reading aclocal.m4,
# will think it sees a *use*, and therefore will trigger all it's
# C support machinery. Also note that it means that autoscan, seeing
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
AC_DEFUN(AM_INIT_AUTOMAKE,
[AC_REQUIRE([AC_PROG_INSTALL]) # We require 2.13 because we rely on SHELL being computed by configure.
PACKAGE=[$1] AC_PREREQ([2.13])
AC_SUBST(PACKAGE)
VERSION=[$2] # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
AC_SUBST(VERSION) # -----------------------------------------------------------
dnl test to see if srcdir already configured # If MACRO-NAME is provided do IF-PROVIDED, else IF-NOT-PROVIDED.
if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then # The purpose of this macro is to provide the user with a means to
AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) # check macros which are provided without letting her know how the
# information is coded.
# If this macro is not defined by Autoconf, define it here.
ifdef([AC_PROVIDE_IFELSE],
[],
[define([AC_PROVIDE_IFELSE],
[ifdef([AC_PROVIDE_$1],
[$2], [$3])])])
# AM_INIT_AUTOMAKE(PACKAGE,VERSION, [NO-DEFINE])
# ----------------------------------------------
AC_DEFUN([AM_INIT_AUTOMAKE],
[AC_REQUIRE([AC_PROG_INSTALL])dnl
# test to see if srcdir already configured
if test "`CDPATH=:; cd $srcdir && pwd`" != "`pwd`" &&
test -f $srcdir/config.status; then
AC_MSG_ERROR([source directory already configured; run \"make distclean\" there first])
fi fi
# Define the identity of the package.
PACKAGE=$1
AC_SUBST(PACKAGE)dnl
VERSION=$2
AC_SUBST(VERSION)dnl
ifelse([$3],, ifelse([$3],,
AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])) AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])
AC_REQUIRE([AM_SANITY_CHECK])
AC_REQUIRE([AC_ARG_PROGRAM]) # Autoconf 2.50 wants to disallow AM_ names. We explicitly allow
dnl FIXME This is truly gross. # the ones we care about.
missing_dir=`cd $ac_aux_dir && pwd` ifdef([m4_pattern_allow],
AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir) [m4_pattern_allow([^AM_[A-Z]+FLAGS])])dnl
AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir) # Autoconf 2.50 always computes EXEEXT. However we need to be
AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir) # compatible with 2.13, for now. So we always define EXEEXT, but we
AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir) # don't compute it.
AC_REQUIRE([AC_PROG_MAKE_SET])]) AC_SUBST(EXEEXT)
# Similar for OBJEXT -- only we only use OBJEXT if the user actually
# requests that it be used. This is a bit dumb.
: ${OBJEXT=o}
AC_SUBST(OBJEXT)
# Some tools Automake needs.
AC_REQUIRE([AM_SANITY_CHECK])dnl
AC_REQUIRE([AC_ARG_PROGRAM])dnl
AM_MISSING_PROG(ACLOCAL, aclocal)
AM_MISSING_PROG(AUTOCONF, autoconf)
AM_MISSING_PROG(AUTOMAKE, automake)
AM_MISSING_PROG(AUTOHEADER, autoheader)
AM_MISSING_PROG(MAKEINFO, makeinfo)
AM_MISSING_PROG(AMTAR, tar)
AM_PROG_INSTALL_SH
AM_PROG_INSTALL_STRIP
# We need awk for the "check" target. The system "awk" is bad on
# some platforms.
AC_REQUIRE([AC_PROG_AWK])dnl
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
AC_REQUIRE([AM_DEP_TRACK])dnl
AC_REQUIRE([AM_SET_DEPDIR])dnl
AC_PROVIDE_IFELSE([AC_PROG_][CC],
[_AM_DEPENDENCIES(CC)],
[define([AC_PROG_][CC],
defn([AC_PROG_][CC])[_AM_DEPENDENCIES(CC)])])dnl
AC_PROVIDE_IFELSE([AC_PROG_][CXX],
[_AM_DEPENDENCIES(CXX)],
[define([AC_PROG_][CXX],
defn([AC_PROG_][CXX])[_AM_DEPENDENCIES(CXX)])])dnl
])
# #
# Check to make sure that the build environment is sane. # Check to make sure that the build environment is sane.
# #
AC_DEFUN(AM_SANITY_CHECK, # serial 3
# AM_SANITY_CHECK
# ---------------
AC_DEFUN([AM_SANITY_CHECK],
[AC_MSG_CHECKING([whether build environment is sane]) [AC_MSG_CHECKING([whether build environment is sane])
# Just in case # Just in case
sleep 1 sleep 1
echo timestamp > conftestfile echo timestamp > conftest.file
# Do `set' in a subshell so we don't clobber the current shell's # Do `set' in a subshell so we don't clobber the current shell's
# arguments. Must try -L first in case configure is actually a # arguments. Must try -L first in case configure is actually a
# symlink; some systems play weird games with the mod time of symlinks # symlink; some systems play weird games with the mod time of symlinks
# (eg FreeBSD returns the mod time of the symlink's containing # (eg FreeBSD returns the mod time of the symlink's containing
# directory). # directory).
if ( if (
set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null` set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
if test "[$]*" = "X"; then if test "$[*]" = "X"; then
# -L didn't work. # -L didn't work.
set X `ls -t $srcdir/configure conftestfile` set X `ls -t $srcdir/configure conftest.file`
fi fi
if test "[$]*" != "X $srcdir/configure conftestfile" \ rm -f conftest.file
&& test "[$]*" != "X conftestfile $srcdir/configure"; then if test "$[*]" != "X $srcdir/configure conftest.file" \
&& test "$[*]" != "X conftest.file $srcdir/configure"; then
# If neither matched, then we have a broken ls. This can happen # If neither matched, then we have a broken ls. This can happen
# if, for instance, CONFIG_SHELL is bash and it inherits a # if, for instance, CONFIG_SHELL is bash and it inherits a
@@ -74,7 +137,7 @@ if (
alias in your environment]) alias in your environment])
fi fi
test "[$]2" = conftestfile test "$[2]" = conftest.file
) )
then then
# Ok. # Ok.
@@ -83,47 +146,417 @@ else
AC_MSG_ERROR([newly created file is older than distributed files! AC_MSG_ERROR([newly created file is older than distributed files!
Check your system clock]) Check your system clock])
fi fi
rm -f conftest*
AC_MSG_RESULT(yes)]) AC_MSG_RESULT(yes)])
dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
dnl The program must properly implement --version. # serial 2
AC_DEFUN(AM_MISSING_PROG,
[AC_MSG_CHECKING(for working $2) # AM_MISSING_PROG(NAME, PROGRAM)
# Run test in a subshell; some versions of sh will print an error if # ------------------------------
# an executable is not found, even if stderr is redirected. AC_DEFUN([AM_MISSING_PROG],
# Redirect stdin to placate older versions of autoconf. Sigh. [AC_REQUIRE([AM_MISSING_HAS_RUN])
if ($2 --version) < /dev/null > /dev/null 2>&1; then $1=${$1-"${am_missing_run}$2"}
$1=$2
AC_MSG_RESULT(found)
else
$1="$3/missing $2"
AC_MSG_RESULT(missing)
fi
AC_SUBST($1)]) AC_SUBST($1)])
# AM_MISSING_HAS_RUN
# ------------------
# Define MISSING if not defined so far and test if it supports --run.
# If it does, set am_missing_run to use it, otherwise, to nothing.
AC_DEFUN([AM_MISSING_HAS_RUN],
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
# Use eval to expand $SHELL
if eval "$MISSING --run true"; then
am_missing_run="$MISSING --run "
else
am_missing_run=
am_backtick='`'
AC_MSG_WARN([${am_backtick}missing' script is too old or missing])
fi
])
# AM_AUX_DIR_EXPAND
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
#
# Of course, Automake must honor this variable whenever it calls a
# tool from the auxiliary directory. The problem is that $srcdir (and
# therefore $ac_aux_dir as well) can be either absolute or relative,
# depending on how configure is run. This is pretty annoying, since
# it makes $ac_aux_dir quite unusable in subdirectories: in the top
# source directory, any form will work fine, but in subdirectories a
# relative path needs to be adjusted first.
#
# $ac_aux_dir/missing
# fails when called from a subdirectory if $ac_aux_dir is relative
# $top_srcdir/$ac_aux_dir/missing
# fails if $ac_aux_dir is absolute,
# fails when called from a subdirectory in a VPATH build with
# a relative $ac_aux_dir
#
# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
# are both prefixed by $srcdir. In an in-source build this is usually
# harmless because $srcdir is `.', but things will broke when you
# start a VPATH build or use an absolute $srcdir.
#
# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
# and then we would define $MISSING as
# MISSING="\${SHELL} $am_aux_dir/missing"
# This will work as long as MISSING is not called from configure, because
# unfortunately $(top_srcdir) has no meaning in configure.
# However there are other variables, like CC, which are often used in
# configure, and could therefore not use this "fixed" $ac_aux_dir.
#
# Another solution, used here, is to always expand $ac_aux_dir to an
# absolute PATH. The drawback is that using absolute paths prevent a
# configured tree to be moved without reconfiguration.
AC_DEFUN([AM_AUX_DIR_EXPAND], [
# expand $ac_aux_dir to an absolute path
am_aux_dir=`CDPATH=:; cd $ac_aux_dir && pwd`
])
# AM_PROG_INSTALL_SH
# ------------------
# Define $install_sh.
AC_DEFUN([AM_PROG_INSTALL_SH],
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
install_sh=${install_sh-"$am_aux_dir/install-sh"}
AC_SUBST(install_sh)])
# One issue with vendor `install' (even GNU) is that you can't
# specify the program used to strip binaries. This is especially
# annoying in cross-compiling environments, where the build's strip
# is unlikely to handle the host's binaries.
# Fortunately install-sh will honor a STRIPPROG variable, so we
# always use install-sh in `make install-strip', and initialize
# STRIPPROG with the value of the STRIP variable (set by the user).
AC_DEFUN([AM_PROG_INSTALL_STRIP],
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
AC_SUBST([INSTALL_STRIP_PROGRAM])])
# serial 4 -*- Autoconf -*-
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
# written in clear, in which case automake, when reading aclocal.m4,
# will think it sees a *use*, and therefore will trigger all it's
# C support machinery. Also note that it means that autoscan, seeing
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
# _AM_DEPENDENCIES(NAME)
# ---------------------
# See how the compiler implements dependency checking.
# NAME is "CC", "CXX" or "OBJC".
# We try a few techniques and use that to set a single cache variable.
#
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
# dependency, and given that the user is not expected to run this macro,
# just rely on AC_PROG_CC.
AC_DEFUN([_AM_DEPENDENCIES],
[AC_REQUIRE([AM_SET_DEPDIR])dnl
AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
AC_REQUIRE([AM_DEP_TRACK])dnl
ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
[$1], CXX, [depcc="$CXX" am_compiler_list=],
[$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc']
[$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
[depcc="$$1" am_compiler_list=])
AC_CACHE_CHECK([dependency style of $depcc],
[am_cv_$1_dependencies_compiler_type],
[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
# We make a subdir and do the tests there. Otherwise we can end up
# making bogus files that we don't know about and never remove. For
# instance it was reported that on HP-UX the gcc test will end up
# making a dummy file named `D' -- because `-MD' means `put the output
# in D'.
mkdir conftest.dir
# Copy depcomp to subdir because otherwise we won't find it if we're
# using a relative directory.
cp "$am_depcomp" conftest.dir
cd conftest.dir
am_cv_$1_dependencies_compiler_type=none
if test "$am_compiler_list" = ""; then
am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
fi
for depmode in $am_compiler_list; do
# We need to recreate these files for each test, as the compiler may
# overwrite some of them when testing with obscure command lines.
# This happens at least with the AIX C compiler.
echo '#include "conftest.h"' > conftest.c
echo 'int i;' > conftest.h
echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf
case $depmode in
nosideeffect)
# after this tag, mechanisms are not by side-effect, so they'll
# only be used when explicitly requested
if test "x$enable_dependency_tracking" = xyes; then
continue
else
break
fi
;;
none) break ;;
esac
# We check with `-c' and `-o' for the sake of the "dashmstdout"
# mode. It turns out that the SunPro C++ compiler does not properly
# handle `-M -o', and we need to detect this.
if depmode=$depmode \
source=conftest.c object=conftest.o \
depfile=conftest.Po tmpdepfile=conftest.TPo \
$SHELL ./depcomp $depcc -c conftest.c -o conftest.o >/dev/null 2>&1 &&
grep conftest.h conftest.Po > /dev/null 2>&1 &&
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
am_cv_$1_dependencies_compiler_type=$depmode
break
fi
done
cd ..
rm -rf conftest.dir
else
am_cv_$1_dependencies_compiler_type=none
fi
])
$1DEPMODE="depmode=$am_cv_$1_dependencies_compiler_type"
AC_SUBST([$1DEPMODE])
])
# AM_SET_DEPDIR
# -------------
# Choose a directory name for dependency files.
# This macro is AC_REQUIREd in _AM_DEPENDENCIES
AC_DEFUN([AM_SET_DEPDIR],
[rm -f .deps 2>/dev/null
mkdir .deps 2>/dev/null
if test -d .deps; then
DEPDIR=.deps
else
# MS-DOS does not allow filenames that begin with a dot.
DEPDIR=_deps
fi
rmdir .deps 2>/dev/null
AC_SUBST(DEPDIR)
])
# AM_DEP_TRACK
# ------------
AC_DEFUN([AM_DEP_TRACK],
[AC_ARG_ENABLE(dependency-tracking,
[ --disable-dependency-tracking Speeds up one-time builds
--enable-dependency-tracking Do not reject slow dependency extractors])
if test "x$enable_dependency_tracking" != xno; then
am_depcomp="$ac_aux_dir/depcomp"
AMDEPBACKSLASH='\'
fi
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
pushdef([subst], defn([AC_SUBST]))
subst(AMDEPBACKSLASH)
popdef([subst])
])
# Generate code to set up dependency tracking.
# This macro should only be invoked once -- use via AC_REQUIRE.
# Usage:
# AM_OUTPUT_DEPENDENCY_COMMANDS
#
# This code is only required when automatic dependency tracking
# is enabled. FIXME. This creates each `.P' file that we will
# need in order to bootstrap the dependency handling code.
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],[
AC_OUTPUT_COMMANDS([
test x"$AMDEP_TRUE" != x"" ||
for mf in $CONFIG_FILES; do
case "$mf" in
Makefile) dirpart=.;;
*/Makefile) dirpart=`echo "$mf" | sed -e 's|/[^/]*$||'`;;
*) continue;;
esac
grep '^DEP_FILES *= *[^ #]' < "$mf" > /dev/null || continue
# Extract the definition of DEP_FILES from the Makefile without
# running `make'.
DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
test -z "$DEPDIR" && continue
# When using ansi2knr, U may be empty or an underscore; expand it
U=`sed -n -e '/^U = / s///p' < "$mf"`
test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
# We invoke sed twice because it is the simplest approach to
# changing $(DEPDIR) to its actual value in the expansion.
for file in `sed -n -e '
/^DEP_FILES = .*\\\\$/ {
s/^DEP_FILES = //
:loop
s/\\\\$//
p
n
/\\\\$/ b loop
p
}
/^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
# Make sure the directory exists.
test -f "$dirpart/$file" && continue
fdir=`echo "$file" | sed -e 's|/[^/]*$||'`
$ac_aux_dir/mkinstalldirs "$dirpart/$fdir" > /dev/null 2>&1
# echo "creating $dirpart/$file"
echo '# dummy' > "$dirpart/$file"
done
done
], [AMDEP_TRUE="$AMDEP_TRUE"
ac_aux_dir="$ac_aux_dir"])])
# AM_MAKE_INCLUDE()
# -----------------
# Check to see how make treats includes.
AC_DEFUN([AM_MAKE_INCLUDE],
[am_make=${MAKE-make}
cat > confinc << 'END'
doit:
@echo done
END
# If we don't find an include directive, just comment out the code.
AC_MSG_CHECKING([for style of include used by $am_make])
am__include='#'
am__quote=
_am_result=none
# First try GNU make style include.
echo "include confinc" > confmf
# We grep out `Entering directory' and `Leaving directory'
# messages which can occur if `w' ends up in MAKEFLAGS.
# In particular we don't look at `^make:' because GNU make might
# be invoked under some other name (usually "gmake"), in which
# case it prints its new name instead of `make'.
if test "`$am_make -s -f confmf 2> /dev/null | fgrep -v 'ing directory'`" = "done"; then
am__include=include
am__quote=
_am_result=GNU
fi
# Now try BSD make style include.
if test "$am__include" = "#"; then
echo '.include "confinc"' > confmf
if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
am__include=.include
am__quote='"'
_am_result=BSD
fi
fi
AC_SUBST(am__include)
AC_SUBST(am__quote)
AC_MSG_RESULT($_am_result)
rm -f confinc confmf
])
# serial 3
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
# -------------------------------------
# Define a conditional.
#
# FIXME: Once using 2.50, use this:
# m4_match([$1], [^TRUE\|FALSE$], [AC_FATAL([$0: invalid condition: $1])])dnl
AC_DEFUN([AM_CONDITIONAL],
[ifelse([$1], [TRUE],
[errprint(__file__:__line__: [$0: invalid condition: $1
])dnl
m4exit(1)])dnl
ifelse([$1], [FALSE],
[errprint(__file__:__line__: [$0: invalid condition: $1
])dnl
m4exit(1)])dnl
AC_SUBST([$1_TRUE])
AC_SUBST([$1_FALSE])
if $2; then
$1_TRUE=
$1_FALSE='#'
else
$1_TRUE='#'
$1_FALSE=
fi])
# Like AC_CONFIG_HEADER, but automatically create stamp file. # Like AC_CONFIG_HEADER, but automatically create stamp file.
AC_DEFUN(AM_CONFIG_HEADER, # serial 3
[AC_PREREQ([2.12])
AC_CONFIG_HEADER([$1]) # When config.status generates a header, we must update the stamp-h file.
dnl When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header
dnl This file resides in the same directory as the config header # that is generated. We must strip everything past the first ":",
dnl that is generated. We must strip everything past the first ":", # and everything past the last "/".
dnl and everything past the last "/".
AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl AC_PREREQ([2.12])
ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
<<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>, AC_DEFUN([AM_CONFIG_HEADER],
<<am_indx=1 [ifdef([AC_FOREACH],dnl
for am_file in <<$1>>; do [dnl init our file count if it isn't already
case " <<$>>CONFIG_HEADERS " in m4_ifndef([_AM_Config_Header_Index], m4_define([_AM_Config_Header_Index], [0]))
*" <<$>>am_file "*<<)>> dnl prepare to store our destination file list for use in config.status
echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx AC_FOREACH([_AM_File], [$1],
[m4_pushdef([_AM_Dest], m4_patsubst(_AM_File, [:.*]))
m4_define([_AM_Config_Header_Index], m4_incr(_AM_Config_Header_Index))
dnl and add it to the list of files AC keeps track of, along
dnl with our hook
AC_CONFIG_HEADERS(_AM_File,
dnl COMMANDS, [, INIT-CMDS]
[# update the timestamp
echo timestamp >"AS_ESCAPE(_AM_DIRNAME(]_AM_Dest[))/stamp-h]_AM_Config_Header_Index["
][$2]m4_ifval([$3], [, [$3]]))dnl AC_CONFIG_HEADERS
m4_popdef([_AM_Dest])])],dnl
[AC_CONFIG_HEADER([$1])
AC_OUTPUT_COMMANDS(
ifelse(patsubst([$1], [[^ ]], []),
[],
[test -z "$CONFIG_HEADERS" || echo timestamp >dnl
patsubst([$1], [^\([^:]*/\)?.*], [\1])stamp-h]),dnl
[am_indx=1
for am_file in $1; do
case " \$CONFIG_HEADERS " in
*" \$am_file "*)
am_dir=\`echo \$am_file |sed 's%:.*%%;s%[^/]*\$%%'\`
if test -n "\$am_dir"; then
am_tmpdir=\`echo \$am_dir |sed 's%^\(/*\).*\$%\1%'\`
for am_subdir in \`echo \$am_dir |sed 's%/% %'\`; do
am_tmpdir=\$am_tmpdir\$am_subdir/
if test ! -d \$am_tmpdir; then
mkdir \$am_tmpdir
fi
done
fi
echo timestamp > "\$am_dir"stamp-h\$am_indx
;; ;;
esac esac
am_indx=`expr "<<$>>am_indx" + 1` am_indx=\`expr \$am_indx + 1\`
done<<>>dnl>>) done])
changequote([,]))]) ])]) # AM_CONFIG_HEADER
# _AM_DIRNAME(PATH)
# -----------------
# Like AS_DIRNAME, only do it during macro expansion
AC_DEFUN([_AM_DIRNAME],
[m4_if(m4_regexp([$1], [^.*[^/]//*[^/][^/]*/*$]), -1,
m4_if(m4_regexp([$1], [^//\([^/]\|$\)]), -1,
m4_if(m4_regexp([$1], [^/.*]), -1,
[.],
m4_patsubst([$1], [^\(/\).*], [\1])),
m4_patsubst([$1], [^\(//\)\([^/].*\|$\)], [\1])),
m4_patsubst([$1], [^\(.*[^/]\)//*[^/][^/]*/*$], [\1]))[]dnl
]) # _AM_DIRNAME
# serial 2 # serial 2
@@ -181,7 +614,7 @@ AC_DEFUN([AC_ISC_POSIX],
# program @code{ansi2knr}, which comes with Ghostscript. # program @code{ansi2knr}, which comes with Ghostscript.
# @end defmac # @end defmac
AC_DEFUN(AM_PROG_CC_STDC, AC_DEFUN([AM_PROG_CC_STDC],
[AC_REQUIRE([AC_PROG_CC]) [AC_REQUIRE([AC_PROG_CC])
AC_BEFORE([$0], [AC_C_INLINE]) AC_BEFORE([$0], [AC_C_INLINE])
AC_BEFORE([$0], [AC_C_CONST]) AC_BEFORE([$0], [AC_C_CONST])
@@ -191,7 +624,7 @@ dnl like #elif.
dnl FIXME: can't do this because then AC_AIX won't work due to a dnl FIXME: can't do this because then AC_AIX won't work due to a
dnl circular dependency. dnl circular dependency.
dnl AC_BEFORE([$0], [AC_PROG_CPP]) dnl AC_BEFORE([$0], [AC_PROG_CPP])
AC_MSG_CHECKING(for ${CC-cc} option to accept ANSI C) AC_MSG_CHECKING([for ${CC-cc} option to accept ANSI C])
AC_CACHE_VAL(am_cv_prog_cc_stdc, AC_CACHE_VAL(am_cv_prog_cc_stdc,
[am_cv_prog_cc_stdc=no [am_cv_prog_cc_stdc=no
ac_save_CC="$CC" ac_save_CC="$CC"
@@ -199,9 +632,10 @@ ac_save_CC="$CC"
# breaks some systems' header files. # breaks some systems' header files.
# AIX -qlanglvl=ansi # AIX -qlanglvl=ansi
# Ultrix and OSF/1 -std1 # Ultrix and OSF/1 -std1
# HP-UX -Aa -D_HPUX_SOURCE # HP-UX 10.20 and later -Ae
# HP-UX older versions -Aa -D_HPUX_SOURCE
# SVR4 -Xc -D__EXTENSIONS__ # SVR4 -Xc -D__EXTENSIONS__
for ac_arg in "" -qlanglvl=ansi -std1 "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
do do
CC="$ac_save_CC $ac_arg" CC="$ac_save_CC $ac_arg"
AC_TRY_COMPILE( AC_TRY_COMPILE(
@@ -243,7 +677,7 @@ CC="$ac_save_CC"
if test -z "$am_cv_prog_cc_stdc"; then if test -z "$am_cv_prog_cc_stdc"; then
AC_MSG_RESULT([none needed]) AC_MSG_RESULT([none needed])
else else
AC_MSG_RESULT($am_cv_prog_cc_stdc) AC_MSG_RESULT([$am_cv_prog_cc_stdc])
fi fi
case "x$am_cv_prog_cc_stdc" in case "x$am_cv_prog_cc_stdc" in
x|xno) ;; x|xno) ;;
@@ -283,7 +717,7 @@ CFLAGS="$ac_save_CFLAGS"])
# serial 1 # serial 1
AC_DEFUN(AM_C_PROTOTYPES, AC_DEFUN([AM_C_PROTOTYPES],
[AC_REQUIRE([AM_PROG_CC_STDC]) [AC_REQUIRE([AM_PROG_CC_STDC])
AC_REQUIRE([AC_PROG_CPP]) AC_REQUIRE([AC_PROG_CPP])
AC_MSG_CHECKING([for function prototypes]) AC_MSG_CHECKING([for function prototypes])
@@ -294,10 +728,10 @@ if test "$am_cv_prog_cc_stdc" != no; then
else else
AC_MSG_RESULT(no) AC_MSG_RESULT(no)
U=_ ANSI2KNR=./ansi2knr U=_ ANSI2KNR=./ansi2knr
# Ensure some checks needed by ansi2knr itself.
AC_HEADER_STDC
AC_CHECK_HEADERS(string.h)
fi fi
# Ensure some checks needed by ansi2knr itself.
AC_HEADER_STDC
AC_CHECK_HEADERS(string.h)
AC_SUBST(U)dnl AC_SUBST(U)dnl
AC_SUBST(ANSI2KNR)dnl AC_SUBST(ANSI2KNR)dnl
]) ])
+88 -71
View File
@@ -1,6 +1,7 @@
# Makefile.in generated automatically by automake 1.4-p4 from Makefile.am # Makefile.in generated automatically by automake 1.5 from Makefile.am.
# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. # Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
# Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation # This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved. # with or without modifications, as long as this notice is preserved.
@@ -10,6 +11,7 @@
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE. # PARTICULAR PURPOSE.
@SET_MAKE@
SHELL = @SHELL@ SHELL = @SHELL@
@@ -31,13 +33,9 @@ infodir = @infodir@
mandir = @mandir@ mandir = @mandir@
includedir = @includedir@ includedir = @includedir@
oldincludedir = /usr/include oldincludedir = /usr/include
DESTDIR =
pkgdatadir = $(datadir)/@PACKAGE@ pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = .. top_builddir = ..
ACLOCAL = @ACLOCAL@ ACLOCAL = @ACLOCAL@
@@ -46,11 +44,11 @@ AUTOMAKE = @AUTOMAKE@
AUTOHEADER = @AUTOHEADER@ AUTOHEADER = @AUTOHEADER@
INSTALL = @INSTALL@ INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS) INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_HEADER = $(INSTALL_DATA)
transform = @program_transform_name@ transform = @program_transform_name@
NORMAL_INSTALL = : NORMAL_INSTALL = :
PRE_INSTALL = : PRE_INSTALL = :
POST_INSTALL = : POST_INSTALL = :
@@ -59,20 +57,25 @@ PRE_UNINSTALL = :
POST_UNINSTALL = : POST_UNINSTALL = :
host_alias = @host_alias@ host_alias = @host_alias@
host_triplet = @host@ host_triplet = @host@
AMTAR = @AMTAR@
AT_TESTPATH = @AT_TESTPATH@ AT_TESTPATH = @AT_TESTPATH@
AWK = @AWK@
BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@ BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@
CATALOGS = @CATALOGS@ CATALOGS = @CATALOGS@
CATOBJEXT = @CATOBJEXT@ CATOBJEXT = @CATOBJEXT@
CC = @CC@ CC = @CC@
CPP = @CPP@ CPP = @CPP@
DATADIRNAME = @DATADIRNAME@ DATADIRNAME = @DATADIRNAME@
DEPDIR = @DEPDIR@
ECHO_C = @ECHO_C@ ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@ ECHO_T = @ECHO_T@
EXEEXT = @EXEEXT@
GENCAT = @GENCAT@ GENCAT = @GENCAT@
GLIBC21 = @GLIBC21@ GLIBC21 = @GLIBC21@
GMOFILES = @GMOFILES@ GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@ GMSGFMT = @GMSGFMT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INSTOBJEXT = @INSTOBJEXT@ INSTOBJEXT = @INSTOBJEXT@
INTLBISON = @INTLBISON@ INTLBISON = @INTLBISON@
INTLLIBS = @INTLLIBS@ INTLLIBS = @INTLLIBS@
@@ -81,9 +84,9 @@ INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
LIBICONV = @LIBICONV@ LIBICONV = @LIBICONV@
LIBOBJS = @LIBOBJS@ LIBOBJS = @LIBOBJS@
M4 = @M4@ M4 = @M4@
MAKEINFO = @MAKEINFO@
MKINSTALLDIRS = @MKINSTALLDIRS@ MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@ MSGFMT = @MSGFMT@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@ PACKAGE = @PACKAGE@
POFILES = @POFILES@ POFILES = @POFILES@
POSUB = @POSUB@ POSUB = @POSUB@
@@ -93,112 +96,126 @@ USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
USE_NLS = @USE_NLS@ USE_NLS = @USE_NLS@
VERSION = @VERSION@ VERSION = @VERSION@
WARNING_CFLAGS = @WARNING_CFLAGS@ WARNING_CFLAGS = @WARNING_CFLAGS@
am__include = @am__include@
am__quote = @am__quote@
install_sh = @install_sh@
EXTRA_DIST = move-if-change prev-version.txt EXTRA_DIST = move-if-change prev-version.txt
subdir = config
mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
CONFIG_HEADER = ../config.h CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES = CONFIG_CLEAN_FILES =
DIST_COMMON = Makefile.am Makefile.in config.guess config.sub \ DIST_SOURCES =
install-sh mdate-sh missing mkinstalldirs texinfo.tex DIST_COMMON = Makefile.am Makefile.in config.guess config.sub depcomp \
install-sh mdate-sh missing mkinstalldirs texinfo.tex
all: all-am
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
TAR = tar
GZIP_ENV = --best
all: all-redirect
.SUFFIXES: .SUFFIXES:
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && $(AUTOMAKE) --gnu config/Makefile cd $(top_srcdir) && \
$(AUTOMAKE) --gnu config/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) \ cd $(top_builddir) && \
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status CONFIG_HEADERS= CONFIG_LINKS= \
CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status
uninstall-info-am:
tags: TAGS tags: TAGS
TAGS: TAGS:
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
subdir = config top_distdir = ..
distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
distdir: $(DISTFILES) distdir: $(DISTFILES)
here=`cd $(top_builddir) && pwd`; \
top_distdir=`cd $(top_distdir) && pwd`; \
distdir=`cd $(distdir) && pwd`; \
cd $(top_srcdir) \
&& $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu config/Makefile
@for file in $(DISTFILES); do \ @for file in $(DISTFILES); do \
d=$(srcdir); \ if test -f $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
$(mkinstalldirs) "$(distdir)/$$dir"; \
fi; \
if test -d $$d/$$file; then \ if test -d $$d/$$file; then \
cp -pr $$d/$$file $(distdir)/$$file; \ cp -pR $$d/$$file $(distdir) \
|| exit 1; \
else \ else \
test -f $(distdir)/$$file \ test -f $(distdir)/$$file \
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \ || cp -p $$d/$$file $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file || :; \ || exit 1; \
fi; \ fi; \
done done
info-am:
info: info-am
dvi-am:
dvi: dvi-am
check-am: all-am check-am: all-am
check: check-am check: check-am
installcheck-am: all-am: Makefile
installcheck: installcheck-am
install-exec-am:
install-exec: install-exec-am
install-data-am: installdirs:
install: install-am
install-exec: install-exec-am
install-data: install-data-am install-data: install-data-am
uninstall: uninstall-am
install-am: all-am install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
install: install-am
uninstall-am: installcheck: installcheck-am
uninstall: uninstall-am
all-am: Makefile
all-redirect: all-am
install-strip: install-strip:
$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
installdirs: `test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic: mostlyclean-generic:
clean-generic: clean-generic:
distclean-generic: distclean-generic:
-rm -f Makefile $(CONFIG_CLEAN_FILES) -rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]*
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
maintainer-clean-generic: maintainer-clean-generic:
mostlyclean-am: mostlyclean-generic @echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
mostlyclean: mostlyclean-am clean: clean-am
clean-am: clean-generic mostlyclean-am clean-am: clean-generic mostlyclean-am
clean: clean-am
distclean-am: distclean-generic clean-am
distclean: distclean-am distclean: distclean-am
maintainer-clean-am: maintainer-clean-generic distclean-am distclean-am: clean-am distclean-generic
@echo "This command is intended for maintainers to use;"
@echo "it deletes files that may require special tools to rebuild." dvi: dvi-am
dvi-am:
info: info-am
info-am:
install-data-am:
install-exec-am:
install-info: install-info-am
install-man:
installcheck-am:
maintainer-clean: maintainer-clean-am maintainer-clean: maintainer-clean-am
.PHONY: tags distdir info-am info dvi-am dvi check check-am \ maintainer-clean-am: distclean-am maintainer-clean-generic
installcheck-am installcheck install-exec-am install-exec \
install-data-am install-data install-am install uninstall-am uninstall \
all-redirect all-am all installdirs mostlyclean-generic \
distclean-generic clean-generic maintainer-clean-generic clean \
mostlyclean distclean maintainer-clean
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-generic
uninstall-am: uninstall-info-am
.PHONY: all all-am check check-am clean clean-generic distclean \
distclean-generic distdir dvi dvi-am info info-am install \
install-am install-data install-data-am install-exec \
install-exec-am install-info install-info-am install-man \
install-strip installcheck installcheck-am installdirs \
maintainer-clean maintainer-clean-generic mostlyclean \
mostlyclean-generic uninstall uninstall-am uninstall-info-am
# Tell versions [3.59,3.63) of GNU make to not export all variables. # Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded. # Otherwise a system limit (for SysV at least) may be exceeded.
Executable
+411
View File
@@ -0,0 +1,411 @@
#! /bin/sh
# depcomp - compile a program generating dependencies as side-effects
# Copyright 1999, 2000 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# Originally written by Alexandre Oliva <[email protected]>.
if test -z "$depmode" || test -z "$source" || test -z "$object"; then
echo "depcomp: Variables source, object and depmode must be set" 1>&2
exit 1
fi
# `libtool' can also be set to `yes' or `no'.
depfile=${depfile-`echo "$object" | sed 's,\([^/]*\)$,.deps/\1,;s/\.\([^.]*\)$/.P\1/'`}
tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
rm -f "$tmpdepfile"
# Some modes work just like other modes, but use different flags. We
# parameterize here, but still list the modes in the big case below,
# to make depend.m4 easier to write. Note that we *cannot* use a case
# here, because this file can only contain one case statement.
if test "$depmode" = hp; then
# HP compiler uses -M and no extra arg.
gccflag=-M
depmode=gcc
fi
if test "$depmode" = dashXmstdout; then
# This is just like dashmstdout with a different argument.
dashmflag=-xM
depmode=dashmstdout
fi
case "$depmode" in
gcc3)
## gcc 3 implements dependency tracking that does exactly what
## we want. Yay! Note: for some reason libtool 1.4 doesn't like
## it if -MD -MP comes after the -MF stuff. Hmm.
"$@" -MT "$object" -MD -MP -MF "$tmpdepfile"
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
mv "$tmpdepfile" "$depfile"
;;
gcc)
## There are various ways to get dependency output from gcc. Here's
## why we pick this rather obscure method:
## - Don't want to use -MD because we'd like the dependencies to end
## up in a subdir. Having to rename by hand is ugly.
## (We might end up doing this anyway to support other compilers.)
## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
## -MM, not -M (despite what the docs say).
## - Using -M directly means running the compiler twice (even worse
## than renaming).
if test -z "$gccflag"; then
gccflag=-MD,
fi
"$@" -Wp,"$gccflag$tmpdepfile"
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"
echo "$object : \\" > "$depfile"
alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
## The second -e expression handles DOS-style file names with drive letters.
sed -e 's/^[^:]*: / /' \
-e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
## This next piece of magic avoids the `deleted header file' problem.
## The problem is that when a header file which appears in a .P file
## is deleted, the dependency causes make to die (because there is
## typically no way to rebuild the header). We avoid this by adding
## dummy dependencies for each header file. Too bad gcc doesn't do
## this for us directly.
tr ' ' '
' < "$tmpdepfile" |
## Some versions of gcc put a space before the `:'. On the theory
## that the space means something, we add a space to the output as
## well.
## Some versions of the HPUX 10.20 sed can't process this invocation
## correctly. Breaking it into two sed invocations is a workaround.
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
hp)
# This case exists only to let depend.m4 do its work. It works by
# looking at the text of this script. This case will never be run,
# since it is checked for above.
exit 1
;;
sgi)
if test "$libtool" = yes; then
"$@" "-Wp,-MDupdate,$tmpdepfile"
else
"$@" -MDupdate "$tmpdepfile"
fi
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"
if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
echo "$object : \\" > "$depfile"
# Clip off the initial element (the dependent). Don't try to be
# clever and replace this with sed code, as IRIX sed won't handle
# lines with more than a fixed number of characters (4096 in
# IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
# the IRIX cc adds comments like `#:fec' to the end of the
# dependency line.
tr ' ' '
' < "$tmpdepfile" \
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
tr '
' ' ' >> $depfile
echo >> $depfile
# The second pass generates a dummy entry for each header file.
tr ' ' '
' < "$tmpdepfile" \
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
>> $depfile
else
# The sourcefile does not contain any dependencies, so just
# store a dummy comment line, to avoid errors with the Makefile
# "include basename.Plo" scheme.
echo "#dummy" > "$depfile"
fi
rm -f "$tmpdepfile"
;;
aix)
# The C for AIX Compiler uses -M and outputs the dependencies
# in a .u file. This file always lives in the current directory.
# Also, the AIX compiler puts `$object:' at the start of each line;
# $object doesn't have directory information.
stripped=`echo "$object" | sed -e 's,^.*/,,' -e 's/\(.*\)\..*$/\1/'`
tmpdepfile="$stripped.u"
outname="$stripped.o"
if test "$libtool" = yes; then
"$@" -Wc,-M
else
"$@" -M
fi
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
if test -f "$tmpdepfile"; then
# Each line is of the form `foo.o: dependent.h'.
# Do two passes, one to just change these to
# `$object: dependent.h' and one to simply `dependent.h:'.
sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile"
sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile"
else
# The sourcefile does not contain any dependencies, so just
# store a dummy comment line, to avoid errors with the Makefile
# "include basename.Plo" scheme.
echo "#dummy" > "$depfile"
fi
rm -f "$tmpdepfile"
;;
tru64)
# The Tru64 AIX compiler uses -MD to generate dependencies as a side
# effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
# At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
# dependencies in `foo.d' instead, so we check for that too.
# Subdirectories are respected.
tmpdepfile1="$object.d"
tmpdepfile2=`echo "$object" | sed -e 's/.o$/.d/'`
if test "$libtool" = yes; then
"$@" -Wc,-MD
else
"$@" -MD
fi
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile1" "$tmpdepfile2"
exit $stat
fi
if test -f "$tmpdepfile1"; then
tmpdepfile="$tmpdepfile1"
else
tmpdepfile="$tmpdepfile2"
fi
if test -f "$tmpdepfile"; then
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
# That's a space and a tab in the [].
sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
else
echo "#dummy" > "$depfile"
fi
rm -f "$tmpdepfile"
;;
#nosideeffect)
# This comment above is used by automake to tell side-effect
# dependency tracking mechanisms from slower ones.
dashmstdout)
# Important note: in order to support this mode, a compiler *must*
# always write the proprocessed file to stdout, regardless of -o,
# because we must use -o when running libtool.
test -z "$dashmflag" && dashmflag=-M
( IFS=" "
case " $* " in
*" --mode=compile "*) # this is libtool, let us make it quiet
for arg
do # cycle over the arguments
case "$arg" in
"--mode=compile")
# insert --quiet before "--mode=compile"
set fnord "$@" --quiet
shift # fnord
;;
esac
set fnord "$@" "$arg"
shift # fnord
shift # "$arg"
done
;;
esac
"$@" $dashmflag | sed 's:^[^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
) &
proc=$!
"$@"
stat=$?
wait "$proc"
if test "$stat" != 0; then exit $stat; fi
rm -f "$depfile"
cat < "$tmpdepfile" > "$depfile"
tr ' ' '
' < "$tmpdepfile" | \
## Some versions of the HPUX 10.20 sed can't process this invocation
## correctly. Breaking it into two sed invocations is a workaround.
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
dashXmstdout)
# This case only exists to satisfy depend.m4. It is never actually
# run, as this mode is specially recognized in the preamble.
exit 1
;;
makedepend)
# X makedepend
(
shift
cleared=no
for arg in "$@"; do
case $cleared in no)
set ""; shift
cleared=yes
esac
case "$arg" in
-D*|-I*)
set fnord "$@" "$arg"; shift;;
-*)
;;
*)
set fnord "$@" "$arg"; shift;;
esac
done
obj_suffix="`echo $object | sed 's/^.*\././'`"
touch "$tmpdepfile"
${MAKEDEPEND-makedepend} 2>/dev/null -o"$obj_suffix" -f"$tmpdepfile" "$@"
) &
proc=$!
"$@"
stat=$?
wait "$proc"
if test "$stat" != 0; then exit $stat; fi
rm -f "$depfile"
cat < "$tmpdepfile" > "$depfile"
tail +3 "$tmpdepfile" | tr ' ' '
' | \
## Some versions of the HPUX 10.20 sed can't process this invocation
## correctly. Breaking it into two sed invocations is a workaround.
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile" "$tmpdepfile".bak
;;
cpp)
# Important note: in order to support this mode, a compiler *must*
# always write the proprocessed file to stdout, regardless of -o,
# because we must use -o when running libtool.
( IFS=" "
case " $* " in
*" --mode=compile "*)
for arg
do # cycle over the arguments
case $arg in
"--mode=compile")
# insert --quiet before "--mode=compile"
set fnord "$@" --quiet
shift # fnord
;;
esac
set fnord "$@" "$arg"
shift # fnord
shift # "$arg"
done
;;
esac
"$@" -E |
sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
sed '$ s: \\$::' > "$tmpdepfile"
) &
proc=$!
"$@"
stat=$?
wait "$proc"
if test "$stat" != 0; then exit $stat; fi
rm -f "$depfile"
echo "$object : \\" > "$depfile"
cat < "$tmpdepfile" >> "$depfile"
sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
msvisualcpp)
# Important note: in order to support this mode, a compiler *must*
# always write the proprocessed file to stdout, regardless of -o,
# because we must use -o when running libtool.
( IFS=" "
case " $* " in
*" --mode=compile "*)
for arg
do # cycle over the arguments
case $arg in
"--mode=compile")
# insert --quiet before "--mode=compile"
set fnord "$@" --quiet
shift # fnord
;;
esac
set fnord "$@" "$arg"
shift # fnord
shift # "$arg"
done
;;
esac
"$@" -E |
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
) &
proc=$!
"$@"
stat=$?
wait "$proc"
if test "$stat" != 0; then exit $stat; fi
rm -f "$depfile"
echo "$object : \\" > "$depfile"
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
echo " " >> "$depfile"
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile"
rm -f "$tmpdepfile"
;;
none)
exec "$@"
;;
*)
echo "Unknown depmode $depmode" 1>&2
exit 1
;;
esac
exit 0
Vendored
+3195 -1836
View File
File diff suppressed because it is too large Load Diff
+173 -185
View File
@@ -1,6 +1,7 @@
# Makefile.in generated automatically by automake 1.4-p4 from Makefile.am # Makefile.in generated automatically by automake 1.5 from Makefile.am.
# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. # Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
# Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation # This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved. # with or without modifications, as long as this notice is preserved.
@@ -10,6 +11,7 @@
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE. # PARTICULAR PURPOSE.
@SET_MAKE@
SHELL = @SHELL@ SHELL = @SHELL@
@@ -31,13 +33,9 @@ infodir = @infodir@
mandir = @mandir@ mandir = @mandir@
includedir = @includedir@ includedir = @includedir@
oldincludedir = /usr/include oldincludedir = /usr/include
DESTDIR =
pkgdatadir = $(datadir)/@PACKAGE@ pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = .. top_builddir = ..
ACLOCAL = @ACLOCAL@ ACLOCAL = @ACLOCAL@
@@ -46,11 +44,11 @@ AUTOMAKE = @AUTOMAKE@
AUTOHEADER = @AUTOHEADER@ AUTOHEADER = @AUTOHEADER@
INSTALL = @INSTALL@ INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS) INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_HEADER = $(INSTALL_DATA)
transform = @program_transform_name@ transform = @program_transform_name@
NORMAL_INSTALL = : NORMAL_INSTALL = :
PRE_INSTALL = : PRE_INSTALL = :
POST_INSTALL = : POST_INSTALL = :
@@ -59,20 +57,25 @@ PRE_UNINSTALL = :
POST_UNINSTALL = : POST_UNINSTALL = :
host_alias = @host_alias@ host_alias = @host_alias@
host_triplet = @host@ host_triplet = @host@
AMTAR = @AMTAR@
AT_TESTPATH = @AT_TESTPATH@ AT_TESTPATH = @AT_TESTPATH@
AWK = @AWK@
BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@ BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@
CATALOGS = @CATALOGS@ CATALOGS = @CATALOGS@
CATOBJEXT = @CATOBJEXT@ CATOBJEXT = @CATOBJEXT@
CC = @CC@ CC = @CC@
CPP = @CPP@ CPP = @CPP@
DATADIRNAME = @DATADIRNAME@ DATADIRNAME = @DATADIRNAME@
DEPDIR = @DEPDIR@
ECHO_C = @ECHO_C@ ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@ ECHO_T = @ECHO_T@
EXEEXT = @EXEEXT@
GENCAT = @GENCAT@ GENCAT = @GENCAT@
GLIBC21 = @GLIBC21@ GLIBC21 = @GLIBC21@
GMOFILES = @GMOFILES@ GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@ GMSGFMT = @GMSGFMT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INSTOBJEXT = @INSTOBJEXT@ INSTOBJEXT = @INSTOBJEXT@
INTLBISON = @INTLBISON@ INTLBISON = @INTLBISON@
INTLLIBS = @INTLLIBS@ INTLLIBS = @INTLLIBS@
@@ -81,9 +84,9 @@ INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
LIBICONV = @LIBICONV@ LIBICONV = @LIBICONV@
LIBOBJS = @LIBOBJS@ LIBOBJS = @LIBOBJS@
M4 = @M4@ M4 = @M4@
MAKEINFO = @MAKEINFO@
MKINSTALLDIRS = @MKINSTALLDIRS@ MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@ MSGFMT = @MSGFMT@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@ PACKAGE = @PACKAGE@
POFILES = @POFILES@ POFILES = @POFILES@
POSUB = @POSUB@ POSUB = @POSUB@
@@ -93,6 +96,9 @@ USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
USE_NLS = @USE_NLS@ USE_NLS = @USE_NLS@
VERSION = @VERSION@ VERSION = @VERSION@
WARNING_CFLAGS = @WARNING_CFLAGS@ WARNING_CFLAGS = @WARNING_CFLAGS@
am__include = @am__include@
am__quote = @am__quote@
install_sh = @install_sh@
AUTOMAKE_OPTIONS = 1.4 AUTOMAKE_OPTIONS = 1.4
@@ -103,44 +109,40 @@ bison_TEXINFOS = gpl.texi fdl.texi
EXTRA_DIST = FAQ bison.1 bison.rnh refcard.tex EXTRA_DIST = FAQ bison.1 bison.rnh refcard.tex
CLEANFILES = refcard.dvi refcard.log refcard.ps CLEANFILES = refcard.dvi refcard.log refcard.ps
subdir = doc
mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
CONFIG_HEADER = ../config.h CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES = CONFIG_CLEAN_FILES =
TEXI2DVI = texi2dvi DIST_SOURCES =
TEXINFO_TEX = $(top_srcdir)/config/texinfo.tex TEXINFO_TEX = $(top_srcdir)/config/texinfo.tex
INFO_DEPS = bison.info INFO_DEPS = bison.info
DVIS = bison.dvi DVIS = bison.dvi
TEXINFOS = bison.texinfo TEXINFOS = bison.texinfo
man1dir = $(mandir)/man1
MANS = $(man_MANS)
NROFF = nroff NROFF = nroff
MANS = $(man_MANS)
DIST_COMMON = $(bison_TEXINFOS) Makefile.am Makefile.in stamp-vti \ DIST_COMMON = $(bison_TEXINFOS) Makefile.am Makefile.in stamp-vti \
version.texi version.texi
all: all-am
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
TAR = tar
GZIP_ENV = --best
all: all-redirect
.SUFFIXES: .SUFFIXES:
.SUFFIXES: .dvi .info .ps .texi .texinfo .txi .SUFFIXES: .dvi .info .ps .texinfo
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/Makefile cd $(top_srcdir) && \
$(AUTOMAKE) --gnu doc/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) && \
CONFIG_HEADERS= CONFIG_LINKS= \
CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) $(srcdir)/version.texi: $(srcdir)/stamp-vti
cd $(top_builddir) \
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
$(srcdir)/version.texi: stamp-vti
@: @:
$(srcdir)/stamp-vti: bison.texinfo $(top_srcdir)/configure.in $(srcdir)/stamp-vti: bison.texinfo $(top_srcdir)/configure.in
@echo "@set UPDATED `$(SHELL) $(top_srcdir)/config/mdate-sh $(srcdir)/bison.texinfo`" > vti.tmp @(set `$(SHELL) $(top_srcdir)/config/mdate-sh $(srcdir)/bison.texinfo`; \
@echo "@set EDITION $(VERSION)" >> vti.tmp echo "@set UPDATED $$1 $$2 $$3"; \
@echo "@set VERSION $(VERSION)" >> vti.tmp echo "@set UPDATED-MONTH $$2 $$3"; \
echo "@set EDITION $(VERSION)"; \
echo "@set VERSION $(VERSION)") > vti.tmp
@cmp -s vti.tmp $(srcdir)/version.texi \ @cmp -s vti.tmp $(srcdir)/version.texi \
|| (echo "Updating $(srcdir)/version.texi"; \ || (echo "Updating $(srcdir)/version.texi"; \
cp vti.tmp $(srcdir)/version.texi) cp vti.tmp $(srcdir)/version.texi)
@@ -150,134 +152,84 @@ $(srcdir)/stamp-vti: bison.texinfo $(top_srcdir)/configure.in
mostlyclean-vti: mostlyclean-vti:
-rm -f vti.tmp -rm -f vti.tmp
clean-vti:
distclean-vti:
maintainer-clean-vti: maintainer-clean-vti:
-rm -f $(srcdir)/stamp-vti $(srcdir)/version.texi -rm -f $(srcdir)/stamp-vti $(srcdir)/version.texi
bison.info: bison.texinfo version.texi $(bison_TEXINFOS) bison.info: bison.texinfo $(srcdir)/version.texi $(bison_TEXINFOS)
bison.dvi: bison.texinfo version.texi $(bison_TEXINFOS) bison.dvi: bison.texinfo $(srcdir)/version.texi $(bison_TEXINFOS)
DVIPS = dvips
.texi.info:
@cd $(srcdir) && rm -f $@ $@-[0-9] $@-[0-9][0-9]
cd $(srcdir) \
&& $(MAKEINFO) `echo $< | sed 's,.*/,,'`
.texi.dvi:
TEXINPUTS=$(top_srcdir)/config/texinfo.tex:$$TEXINPUTS \
MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $<
.texi:
@cd $(srcdir) && rm -f $@ $@-[0-9] $@-[0-9][0-9]
cd $(srcdir) \
&& $(MAKEINFO) `echo $< | sed 's,.*/,,'`
.texinfo.info: .texinfo.info:
@cd $(srcdir) && rm -f $@ $@-[0-9] $@-[0-9][0-9] @cd $(srcdir) && rm -f $@ $@-[0-9] $@-[0-9][0-9]
cd $(srcdir) \ cd $(srcdir) \
&& $(MAKEINFO) `echo $< | sed 's,.*/,,'` && $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) \
`echo $< | sed 's,.*/,,'`
.texinfo.dvi:
TEXINPUTS=$(top_srcdir)/config:$$TEXINPUTS \
MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \
$(TEXI2DVI) $<
.texinfo: .texinfo:
@cd $(srcdir) && rm -f $@ $@-[0-9] $@-[0-9][0-9] @cd $(srcdir) && rm -f $@ $@-[0-9] $@-[0-9][0-9]
cd $(srcdir) \ cd $(srcdir) \
&& $(MAKEINFO) `echo $< | sed 's,.*/,,'` && $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) \
`echo $< | sed 's,.*/,,'`
.texinfo.dvi: MAKEINFO = @MAKEINFO@
TEXINPUTS=$(top_srcdir)/config/texinfo.tex:$$TEXINPUTS \ TEXI2DVI = texi2dvi
MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $< DVIPS = dvips
.txi.info:
@cd $(srcdir) && rm -f $@ $@-[0-9] $@-[0-9][0-9]
cd $(srcdir) \
&& $(MAKEINFO) `echo $< | sed 's,.*/,,'`
.txi.dvi:
TEXINPUTS=$(top_srcdir)/config/texinfo.tex:$$TEXINPUTS \
MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $<
.txi:
@cd $(srcdir) && rm -f $@ $@-[0-9] $@-[0-9][0-9]
cd $(srcdir) \
&& $(MAKEINFO) `echo $< | sed 's,.*/,,'`
.dvi.ps: .dvi.ps:
$(DVIPS) $< -o $@ $(DVIPS) $< -o $@
install-info-am: $(INFO_DEPS) uninstall-info-am:
@$(NORMAL_INSTALL) $(PRE_UNINSTALL)
$(mkinstalldirs) $(DESTDIR)$(infodir) @if (install-info --version && \
install-info --version | fgrep -i -v debian) >/dev/null 2>&1; then \
list='$(INFO_DEPS)'; \
for file in $$list; do \
echo " install-info --info-dir=$(DESTDIR)$(infodir) --remove $(DESTDIR)$(infodir)/$$file"; \
install-info --info-dir=$(DESTDIR)$(infodir) --remove $(DESTDIR)$(infodir)/$$file; \
done; \
else :; fi
@$(NORMAL_UNINSTALL)
@list='$(INFO_DEPS)'; \ @list='$(INFO_DEPS)'; \
for file in $$list; do \ for file in $$list; do \
d=$(srcdir); \ (if cd $(DESTDIR)$(infodir); then \
for ifile in `cd $$d && echo $$file $$file-[0-9] $$file-[0-9][0-9]`; do \ echo " rm -f $$file $$file-[0-9] $$file-[0-9][0-9])"; \
if test -f $$d/$$ifile; then \ rm -f $$file $$file-[0-9] $$file-[0-9][0-9]; \
echo " $(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$ifile"; \ else :; fi); \
$(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$ifile; \
else : ; fi; \
done; \
done
@$(POST_INSTALL)
@if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then \
list='$(INFO_DEPS)'; \
for file in $$list; do \
echo " install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$file";\
install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$file || :;\
done; \
else : ; fi
uninstall-info:
$(PRE_UNINSTALL)
@if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then \
ii=yes; \
else ii=; fi; \
list='$(INFO_DEPS)'; \
for file in $$list; do \
test -z "$$ii" \
|| install-info --info-dir=$(DESTDIR)$(infodir) --remove $$file; \
done
@$(NORMAL_UNINSTALL)
list='$(INFO_DEPS)'; \
for file in $$list; do \
(cd $(DESTDIR)$(infodir) && rm -f $$file $$file-[0-9] $$file-[0-9][0-9]); \
done done
dist-info: $(INFO_DEPS) dist-info: $(INFO_DEPS)
list='$(INFO_DEPS)'; \ list='$(INFO_DEPS)'; \
for base in $$list; do \ for base in $$list; do \
d=$(srcdir); \ d=$(srcdir); \
for file in `cd $$d && eval echo $$base*`; do \ for file in `CDPATH=: && cd $$d && eval echo $$base*`; do \
test -f $(distdir)/$$file \ test -f $(distdir)/$$file \
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|| cp -p $$d/$$file $(distdir)/$$file; \ || cp -p $$d/$$file $(distdir)/$$file; \
done; \ done; \
done done
mostlyclean-aminfo: mostlyclean-aminfo:
-rm -f bison.aux bison.cp bison.cps bison.dvi bison.fn bison.fns \ -rm -f bison.aux bison.cp bison.cps bison.dvi bison.fn bison.ky bison.log \
bison.ky bison.kys bison.ps bison.log bison.pg bison.toc \ bison.pg bison.ps bison.toc bison.tp bison.vr
bison.tp bison.tps bison.vr bison.vrs bison.op bison.tr \
bison.cv bison.cn
clean-aminfo:
distclean-aminfo:
maintainer-clean-aminfo: maintainer-clean-aminfo:
cd $(srcdir) && for i in $(INFO_DEPS); do \ cd $(srcdir) && \
for i in $(INFO_DEPS); do \
rm -f $$i; \ rm -f $$i; \
if test "`echo $$i-[0-9]*`" != "$$i-[0-9]*"; then \ if test "`echo $$i-[0-9]*`" != "$$i-[0-9]*"; then \
rm -f $$i-[0-9]*; \ rm -f $$i-[0-9]*; \
fi; \ fi; \
done done
install-man1: man1dir = $(mandir)/man1
install-man1: $(man1_MANS) $(man_MANS)
@$(NORMAL_INSTALL)
$(mkinstalldirs) $(DESTDIR)$(man1dir) $(mkinstalldirs) $(DESTDIR)$(man1dir)
@list='$(man1_MANS)'; \ @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \
l2='$(man_MANS)'; for i in $$l2; do \ l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
for i in $$l2; do \
case "$$i" in \ case "$$i" in \
*.1*) list="$$list $$i" ;; \ *.1*) list="$$list $$i" ;; \
esac; \ esac; \
@@ -287,14 +239,16 @@ install-man1:
else file=$$i; fi; \ else file=$$i; fi; \
ext=`echo $$i | sed -e 's/^.*\\.//'`; \ ext=`echo $$i | sed -e 's/^.*\\.//'`; \
inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
inst=`echo $$inst | sed -e 's/^.*\///'`; \
inst=`echo $$inst | sed '$(transform)'`.$$ext; \ inst=`echo $$inst | sed '$(transform)'`.$$ext; \
echo " $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst"; \ echo " $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst"; \
$(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst; \ $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst; \
done done
uninstall-man1: uninstall-man1:
@list='$(man1_MANS)'; \ @$(NORMAL_UNINSTALL)
l2='$(man_MANS)'; for i in $$l2; do \ @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \
l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
for i in $$l2; do \
case "$$i" in \ case "$$i" in \
*.1*) list="$$list $$i" ;; \ *.1*) list="$$list $$i" ;; \
esac; \ esac; \
@@ -302,113 +256,147 @@ uninstall-man1:
for i in $$list; do \ for i in $$list; do \
ext=`echo $$i | sed -e 's/^.*\\.//'`; \ ext=`echo $$i | sed -e 's/^.*\\.//'`; \
inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
inst=`echo $$inst | sed -e 's/^.*\///'`; \
inst=`echo $$inst | sed '$(transform)'`.$$ext; \ inst=`echo $$inst | sed '$(transform)'`.$$ext; \
echo " rm -f $(DESTDIR)$(man1dir)/$$inst"; \ echo " rm -f $(DESTDIR)$(man1dir)/$$inst"; \
rm -f $(DESTDIR)$(man1dir)/$$inst; \ rm -f $(DESTDIR)$(man1dir)/$$inst; \
done done
install-man: $(MANS)
@$(NORMAL_INSTALL)
$(MAKE) $(AM_MAKEFLAGS) install-man1
uninstall-man:
@$(NORMAL_UNINSTALL)
$(MAKE) $(AM_MAKEFLAGS) uninstall-man1
tags: TAGS tags: TAGS
TAGS: TAGS:
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
subdir = doc top_distdir = ..
distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
distdir: $(DISTFILES) distdir: $(DISTFILES)
here=`cd $(top_builddir) && pwd`; \
top_distdir=`cd $(top_distdir) && pwd`; \
distdir=`cd $(distdir) && pwd`; \
cd $(top_srcdir) \
&& $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu doc/Makefile
@for file in $(DISTFILES); do \ @for file in $(DISTFILES); do \
d=$(srcdir); \ if test -f $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
$(mkinstalldirs) "$(distdir)/$$dir"; \
fi; \
if test -d $$d/$$file; then \ if test -d $$d/$$file; then \
cp -pr $$d/$$file $(distdir)/$$file; \ cp -pR $$d/$$file $(distdir) \
|| exit 1; \
else \ else \
test -f $(distdir)/$$file \ test -f $(distdir)/$$file \
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \ || cp -p $$d/$$file $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file || :; \ || exit 1; \
fi; \ fi; \
done done
$(MAKE) $(AM_MAKEFLAGS) top_distdir="$(top_distdir)" distdir="$(distdir)" dist-info $(MAKE) $(AM_MAKEFLAGS) \
info-am: $(INFO_DEPS) top_distdir="${top_distdir}" distdir="$(distdir)" \
info: info-am dist-info
dvi-am: $(DVIS)
dvi: dvi-am
check-am: all-am check-am: all-am
check: check-am check: check-am
installcheck-am: all-am: Makefile $(INFO_DEPS) $(MANS)
installcheck: installcheck-am
install-exec-am:
install-exec: install-exec-am
install-data-am: install-info-am install-man installdirs:
$(mkinstalldirs) $(DESTDIR)$(infodir) $(DESTDIR)$(man1dir)
install: install-am
install-exec: install-exec-am
install-data: install-data-am install-data: install-data-am
uninstall: uninstall-am
install-am: all-am install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
install: install-am
uninstall-am: uninstall-info uninstall-man installcheck: installcheck-am
uninstall: uninstall-am
all-am: Makefile $(INFO_DEPS) $(MANS)
all-redirect: all-am
install-strip: install-strip:
$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
installdirs: `test -z '$(STRIP)' || \
$(mkinstalldirs) $(DESTDIR)$(infodir) $(DESTDIR)$(mandir)/man1 echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic: mostlyclean-generic:
clean-generic: clean-generic:
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic: distclean-generic:
-rm -f Makefile $(CONFIG_CLEAN_FILES) -rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]*
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
maintainer-clean-generic: maintainer-clean-generic:
mostlyclean-am: mostlyclean-vti mostlyclean-aminfo mostlyclean-generic @echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
mostlyclean: mostlyclean-am
clean-am: clean-vti clean-aminfo clean-generic mostlyclean-am
clean: clean-am clean: clean-am
distclean-am: distclean-vti distclean-aminfo distclean-generic clean-am clean-am: clean-generic mostlyclean-am
distclean: distclean-am distclean: distclean-am
maintainer-clean-am: maintainer-clean-vti maintainer-clean-aminfo \ distclean-am: clean-am distclean-generic
maintainer-clean-generic distclean-am
@echo "This command is intended for maintainers to use;" dvi: dvi-am
@echo "it deletes files that may require special tools to rebuild."
dvi-am: $(DVIS)
info: info-am
info-am: $(INFO_DEPS)
install-data-am: install-info-am install-man
install-exec-am:
install-info: install-info-am
install-info-am: $(INFO_DEPS)
@$(NORMAL_INSTALL)
$(mkinstalldirs) $(DESTDIR)$(infodir)
@list='$(INFO_DEPS)'; \
for file in $$list; do \
d=$(srcdir); \
for ifile in `CDPATH=: && cd $$d && echo $$file $$file-[0-9] $$file-[0-9][0-9]`; do \
if test -f $$d/$$ifile; then \
echo " $(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$ifile"; \
$(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$ifile; \
else : ; fi; \
done; \
done
@$(POST_INSTALL)
@if (install-info --version && \
install-info --version | fgrep -i -v debian) >/dev/null 2>&1; then \
list='$(INFO_DEPS)'; \
for file in $$list; do \
echo " install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$file";\
install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$file || :;\
done; \
else : ; fi
install-man: install-man1
installcheck-am:
maintainer-clean: maintainer-clean-am maintainer-clean: maintainer-clean-am
.PHONY: mostlyclean-vti distclean-vti clean-vti maintainer-clean-vti \ maintainer-clean-am: distclean-am maintainer-clean-aminfo \
install-info-am uninstall-info mostlyclean-aminfo distclean-aminfo \ maintainer-clean-generic maintainer-clean-vti
clean-aminfo maintainer-clean-aminfo install-man1 uninstall-man1 \
install-man uninstall-man tags distdir info-am info dvi-am dvi check \ mostlyclean: mostlyclean-am
check-am installcheck-am installcheck install-exec-am install-exec \
install-data-am install-data install-am install uninstall-am uninstall \ mostlyclean-am: mostlyclean-aminfo mostlyclean-generic mostlyclean-vti
all-redirect all-am all installdirs mostlyclean-generic \
distclean-generic clean-generic maintainer-clean-generic clean \ uninstall-am: uninstall-info-am uninstall-man
mostlyclean distclean maintainer-clean
uninstall-man: uninstall-man1
.PHONY: all all-am check check-am clean clean-generic dist-info \
distclean distclean-generic distdir dvi dvi-am info info-am \
install install-am install-data install-data-am install-exec \
install-exec-am install-info install-info-am install-man \
install-man1 install-strip installcheck installcheck-am \
installdirs maintainer-clean maintainer-clean-aminfo \
maintainer-clean-generic maintainer-clean-vti mostlyclean \
mostlyclean-aminfo mostlyclean-generic mostlyclean-vti \
uninstall uninstall-am uninstall-info-am uninstall-man \
uninstall-man1
refcard.dvi: refcard.tex refcard.dvi: refcard.tex
tex refcard.tex tex refcard.tex
refcard.ps: refcard.dvi refcard.ps: refcard.dvi
# Tell versions [3.59,3.63) of GNU make to not export all variables. # Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded. # Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT: .NOEXPORT:
+106 -106
View File
@@ -1,5 +1,5 @@
Ceci est le fichier Info bison.info, produit par Makeinfo version 4.0b This is bison.info, produced by makeinfo version 4.0b from
à partir bison.texinfo. bison.texinfo.
START-INFO-DIR-ENTRY START-INFO-DIR-ENTRY
* bison: (bison). GNU Project parser generator (yacc replacement). * bison: (bison). GNU Project parser generator (yacc replacement).
@@ -30,112 +30,112 @@ instead of in the original English.
 
Indirect: Indirect:
bison.info-1: 1313 bison.info-1: 1292
bison.info-2: 50357 bison.info-2: 50351
bison.info-3: 99982 bison.info-3: 99751
bison.info-4: 148180 bison.info-4: 147940
bison.info-5: 190964 bison.info-5: 190640
 
Tag Table: Tag Table:
(Indirect) (Indirect)
Node: Top1313 Node: Top1292
Node: Introduction8698 Node: Introduction8694
Node: Conditions9973 Node: Conditions9969
Node: Copying11437 Node: Copying11433
Node: Concepts30640 Node: Concepts30636
Node: Language and Grammar31719 Node: Language and Grammar31715
Node: Grammar in Bison36735 Node: Grammar in Bison36731
Node: Semantic Values38659 Node: Semantic Values38655
Node: Semantic Actions40760 Node: Semantic Actions40756
Node: Locations Overview41949 Node: Locations Overview41945
Node: Bison Parser43396 Node: Bison Parser43392
Node: Stages45708 Node: Stages45704
Node: Grammar Layout46991 Node: Grammar Layout46987
Node: Examples48248 Node: Examples48243
Node: RPN Calc49383 Node: RPN Calc49378
Node: Rpcalc Decls50357 Node: Rpcalc Decls50351
Node: Rpcalc Rules51944 Node: Rpcalc Rules51916
Node: Rpcalc Input53744 Node: Rpcalc Input53716
Node: Rpcalc Line55205 Node: Rpcalc Line55177
Node: Rpcalc Expr56320 Node: Rpcalc Expr56292
Node: Rpcalc Lexer58265 Node: Rpcalc Lexer58237
Node: Rpcalc Main60837 Node: Rpcalc Main60809
Node: Rpcalc Error61235 Node: Rpcalc Error61207
Node: Rpcalc Gen62243 Node: Rpcalc Gen62215
Node: Rpcalc Compile63392 Node: Rpcalc Compile63345
Node: Infix Calc64267 Node: Infix Calc64220
Node: Simple Error Recovery66974 Node: Simple Error Recovery66927
Node: Multi-function Calc68860 Node: Multi-function Calc68813
Node: Mfcalc Decl70426 Node: Mfcalc Decl70379
Node: Mfcalc Rules72449 Node: Mfcalc Rules72402
Node: Mfcalc Symtab73829 Node: Mfcalc Symtab73782
Node: Exercises80202 Node: Exercises80155
Node: Grammar File80708 Node: Grammar File80661
Node: Grammar Outline81556 Node: Grammar Outline81509
Node: C Declarations82290 Node: Prologue82197
Node: Bison Declarations82870 Node: Bison Declarations82737
Node: Grammar Rules83282 Node: Grammar Rules83143
Node: C Code83742 Node: Epilogue83605
Node: Symbols84672 Node: Symbols84455
Node: Rules89753 Node: Rules89536
Node: Recursion91392 Node: Recursion91175
Node: Semantics93111 Node: Semantics92894
Node: Value Type94205 Node: Value Type93988
Node: Multiple Types94877 Node: Multiple Types94646
Node: Actions95894 Node: Actions95663
Node: Action Types98679 Node: Action Types98448
Node: Mid-Rule Actions99982 Node: Mid-Rule Actions99751
Node: Locations105552 Node: Locations105321
Node: Location Type106200 Node: Location Type105969
Node: Actions and Locations106758 Node: Actions and Locations106527
Node: Location Default Action108914 Node: Location Default Action108683
Node: Declarations110377 Node: Declarations110146
Node: Token Decl111696 Node: Token Decl111465
Node: Precedence Decl113709 Node: Precedence Decl113478
Node: Union Decl115260 Node: Union Decl115029
Node: Type Decl116104 Node: Type Decl115873
Node: Expect Decl117010 Node: Expect Decl116779
Node: Start Decl118556 Node: Start Decl118325
Node: Pure Decl118934 Node: Pure Decl118703
Node: Decl Summary120611 Node: Decl Summary120380
Node: Multiple Parsers125994 Node: Multiple Parsers125763
Node: Interface127488 Node: Interface127257
Node: Parser Function128360 Node: Parser Function128120
Node: Lexical129195 Node: Lexical128955
Node: Calling Convention130601 Node: Calling Convention130361
Node: Token Values133372 Node: Token Values133132
Node: Token Positions134521 Node: Token Positions134281
Node: Pure Calling135406 Node: Pure Calling135166
Node: Error Reporting138338 Node: Error Reporting138098
Node: Action Features140460 Node: Action Features140220
Node: Algorithm143755 Node: Algorithm143515
Node: Look-Ahead146048 Node: Look-Ahead145808
Node: Shift/Reduce148180 Node: Shift/Reduce147940
Node: Precedence151092 Node: Precedence150852
Node: Why Precedence151743 Node: Why Precedence151503
Node: Using Precedence153608 Node: Using Precedence153368
Node: Precedence Examples154576 Node: Precedence Examples154336
Node: How Precedence155277 Node: How Precedence155037
Node: Contextual Precedence156426 Node: Contextual Precedence156186
Node: Parser States158217 Node: Parser States157977
Node: Reduce/Reduce159460 Node: Reduce/Reduce159220
Node: Mystery Conflicts163021 Node: Mystery Conflicts162781
Node: Stack Overflow166407 Node: Stack Overflow166167
Node: Error Recovery167780 Node: Error Recovery167540
Node: Context Dependency172916 Node: Context Dependency172676
Node: Semantic Tokens173764 Node: Semantic Tokens173524
Node: Lexical Tie-ins176781 Node: Lexical Tie-ins176541
Node: Tie-in Recovery178329 Node: Tie-in Recovery178055
Node: Debugging180501 Node: Debugging180227
Node: Invocation183802 Node: Invocation183478
Node: Bison Options185054 Node: Bison Options184730
Node: Environment Variables188488 Node: Environment Variables188164
Node: Option Cross Key189336 Node: Option Cross Key189012
Node: VMS Invocation190180 Node: VMS Invocation189856
Node: Table of Symbols190964 Node: Table of Symbols190640
Node: Glossary198603 Node: Glossary198241
Node: Copying This Manual204907 Node: Copying This Manual204545
Node: GNU Free Documentation License205116 Node: GNU Free Documentation License204754
Node: Index224981 Node: Index224619
 
End Tag Table End Tag Table
+15 -16
View File
@@ -1,5 +1,5 @@
Ceci est le fichier Info bison.info, produit par Makeinfo version 4.0b This is bison.info, produced by makeinfo version 4.0b from
à partir bison.texinfo. bison.texinfo.
START-INFO-DIR-ENTRY START-INFO-DIR-ENTRY
* bison: (bison). GNU Project parser generator (yacc replacement). * bison: (bison). GNU Project parser generator (yacc replacement).
@@ -87,7 +87,7 @@ Examples
Reverse Polish Notation Calculator Reverse Polish Notation Calculator
* Decls: Rpcalc Decls. Bison and C declarations for rpcalc. * Decls: Rpcalc Decls. Prologue (declarations) for rpcalc.
* Rules: Rpcalc Rules. Grammar Rules for rpcalc, with explanation. * Rules: Rpcalc Rules. Grammar Rules for rpcalc, with explanation.
* Lexer: Rpcalc Lexer. The lexical analyzer. * Lexer: Rpcalc Lexer. The lexical analyzer.
* Main: Rpcalc Main. The controlling function. * Main: Rpcalc Main. The controlling function.
@@ -119,10 +119,10 @@ Bison Grammar Files
Outline of a Bison Grammar Outline of a Bison Grammar
* C Declarations:: Syntax and usage of the C declarations section. * Prologue:: Syntax and usage of the prologue (declarations section).
* Bison Declarations:: Syntax and usage of the Bison declarations section. * Bison Declarations:: Syntax and usage of the Bison declarations section.
* Grammar Rules:: Syntax and usage of the grammar rules section. * Grammar Rules:: Syntax and usage of the grammar rules section.
* C Code:: Syntax and usage of the additional C code section. * Epilogue:: Syntax and usage of the epilogue (additional code section).
Defining Language Semantics Defining Language Semantics
@@ -981,7 +981,7 @@ The Overall Layout of a Bison Grammar
general form of a Bison grammar file is as follows: general form of a Bison grammar file is as follows:
%{ %{
C DECLARATIONS PROLOGUE (DECLARATIONS)
%} %}
BISON DECLARATIONS BISON DECLARATIONS
@@ -989,15 +989,14 @@ general form of a Bison grammar file is as follows:
%% %%
GRAMMAR RULES GRAMMAR RULES
%% %%
ADDITIONAL C CODE EPILOGUE (ADDITIONAL CODE)
The `%%', `%{' and `%}' are punctuation that appears in every Bison The `%%', `%{' and `%}' are punctuation that appears in every Bison
grammar file to separate the sections. grammar file to separate the sections.
The C declarations may define types and variables used in the The prologue may define types and variables used in the actions. You
actions. You can also use preprocessor commands to define macros used can also use preprocessor commands to define macros used there, and use
there, and use `#include' to include header files that do any of these `#include' to include header files that do any of these things.
things.
The Bison declarations declare the names of the terminal and The Bison declarations declare the names of the terminal and
nonterminal symbols, and may also describe operator precedence and the nonterminal symbols, and may also describe operator precedence and the
@@ -1006,10 +1005,10 @@ data types of semantic values of various symbols.
The grammar rules define how to construct each nonterminal symbol The grammar rules define how to construct each nonterminal symbol
from its parts. from its parts.
The additional C code can contain any C code you want to use. Often The epilogue can contain any code you want to use. Often the
the definition of the lexical analyzer `yylex' goes here, plus definition of the lexical analyzer `yylex' goes here, plus subroutines
subroutines called by the actions in the grammar rules. In a simple called by the actions in the grammar rules. In a simple program, all
program, all the rest of the program can go here. the rest of the program can go here.
 
File: bison.info, Node: Examples, Next: Grammar File, Prev: Concepts, Up: Top File: bison.info, Node: Examples, Next: Grammar File, Prev: Concepts, Up: Top
@@ -1055,7 +1054,7 @@ extension is a convention used for Bison input files.
* Menu: * Menu:
* Decls: Rpcalc Decls. Bison and C declarations for rpcalc. * Decls: Rpcalc Decls. Prologue (declarations) for rpcalc.
* Rules: Rpcalc Rules. Grammar Rules for rpcalc, with explanation. * Rules: Rpcalc Rules. Grammar Rules for rpcalc, with explanation.
* Lexer: Rpcalc Lexer. The lexical analyzer. * Lexer: Rpcalc Lexer. The lexical analyzer.
* Main: Rpcalc Main. The controlling function. * Main: Rpcalc Main. The controlling function.
+34 -34
View File
@@ -1,5 +1,5 @@
Ceci est le fichier Info bison.info, produit par Makeinfo version 4.0b This is bison.info, produced by makeinfo version 4.0b from
à partir bison.texinfo. bison.texinfo.
START-INFO-DIR-ENTRY START-INFO-DIR-ENTRY
* bison: (bison). GNU Project parser generator (yacc replacement). * bison: (bison). GNU Project parser generator (yacc replacement).
@@ -48,8 +48,8 @@ calculator. As in C, comments are placed between `/*...*/'.
%% /* Grammar rules and actions follow */ %% /* Grammar rules and actions follow */
The C declarations section (*note The C Declarations Section: C The declarations section (*note The prologue: Prologue.) contains two
Declarations.) contains two preprocessor directives. preprocessor directives.
The `#define' directive defines the macro `YYSTYPE', thus specifying The `#define' directive defines the macro `YYSTYPE', thus specifying
the C data type for semantic values of both tokens and groupings (*note the C data type for semantic values of both tokens and groupings (*note
@@ -359,8 +359,8 @@ Running Bison to Make the Parser
arrange all the source code in one or more source files. For such a arrange all the source code in one or more source files. For such a
simple example, the easiest thing is to put everything in one file. The simple example, the easiest thing is to put everything in one file. The
definitions of `yylex', `yyerror' and `main' go at the end, in the definitions of `yylex', `yyerror' and `main' go at the end, in the
"additional C code" section of the file (*note The Overall Layout of a epilogue of the file (*note The Overall Layout of a Bison Grammar:
Bison Grammar: Grammar Layout.). Grammar Layout.).
For a large project, you would probably have several source files, For a large project, you would probably have several source files,
and use `make' to arrange to recompile them. and use `make' to arrange to recompile them.
@@ -926,7 +926,7 @@ Outline of a Bison Grammar
appropriate delimiters: appropriate delimiters:
%{ %{
C DECLARATIONS PROLOGUE
%} %}
BISON DECLARATIONS BISON DECLARATIONS
@@ -935,33 +935,33 @@ appropriate delimiters:
GRAMMAR RULES GRAMMAR RULES
%% %%
ADDITIONAL C CODE EPILOGUE
Comments enclosed in `/* ... */' may appear in any of the sections. Comments enclosed in `/* ... */' may appear in any of the sections.
* Menu: * Menu:
* C Declarations:: Syntax and usage of the C declarations section. * Prologue:: Syntax and usage of the prologue.
* Bison Declarations:: Syntax and usage of the Bison declarations section. * Bison Declarations:: Syntax and usage of the Bison declarations section.
* Grammar Rules:: Syntax and usage of the grammar rules section. * Grammar Rules:: Syntax and usage of the grammar rules section.
* C Code:: Syntax and usage of the additional C code section. * Epilogue:: Syntax and usage of the epilogue.
 
File: bison.info, Node: C Declarations, Next: Bison Declarations, Up: Grammar Outline File: bison.info, Node: Prologue, Next: Bison Declarations, Up: Grammar Outline
The C Declarations Section The prologue
-------------------------- ------------
The C DECLARATIONS section contains macro definitions and The PROLOGUE section contains macro definitions and declarations of
declarations of functions and variables that are used in the actions in functions and variables that are used in the actions in the grammar
the grammar rules. These are copied to the beginning of the parser rules. These are copied to the beginning of the parser file so that
file so that they precede the definition of `yyparse'. You can use they precede the definition of `yyparse'. You can use `#include' to
`#include' to get the declarations from a header file. If you don't get the declarations from a header file. If you don't need any C
need any C declarations, you may omit the `%{' and `%}' delimiters that declarations, you may omit the `%{' and `%}' delimiters that bracket
bracket this section. this section.
 
File: bison.info, Node: Bison Declarations, Next: Grammar Rules, Prev: C Declarations, Up: Grammar Outline File: bison.info, Node: Bison Declarations, Next: Grammar Rules, Prev: Prologue, Up: Grammar Outline
The Bison Declarations Section The Bison Declarations Section
------------------------------ ------------------------------
@@ -972,7 +972,7 @@ some simple grammars you may not need any declarations. *Note Bison
Declarations: Declarations. Declarations: Declarations.
 
File: bison.info, Node: Grammar Rules, Next: C Code, Prev: Bison Declarations, Up: Grammar Outline File: bison.info, Node: Grammar Rules, Next: Epilogue, Prev: Bison Declarations, Up: Grammar Outline
The Grammar Rules Section The Grammar Rules Section
------------------------- -------------------------
@@ -985,17 +985,17 @@ rules, and nothing else. *Note Syntax of Grammar Rules: Rules.
the first thing in the file. the first thing in the file.
 
File: bison.info, Node: C Code, Prev: Grammar Rules, Up: Grammar Outline File: bison.info, Node: Epilogue, Prev: Grammar Rules, Up: Grammar Outline
The Additional C Code Section The epilogue
----------------------------- ------------
The ADDITIONAL C CODE section is copied verbatim to the end of the The EPILOGUE is copied verbatim to the end of the parser file, just
parser file, just as the C DECLARATIONS section is copied to the as the PROLOGUE is copied to the beginning. This is the most convenient
beginning. This is the most convenient place to put anything that you place to put anything that you want to have in the parser file but
want to have in the parser file but which need not come before the which need not come before the definition of `yyparse'. For example,
definition of `yyparse'. For example, the definitions of `yylex' and the definitions of `yylex' and `yyerror' often go here. *Note Parser
`yyerror' often go here. *Note Parser C-Language Interface: Interface. C-Language Interface: Interface.
If the last section is empty, you may omit the `%%' that separates it If the last section is empty, you may omit the `%%' that separates it
from the grammar rules. from the grammar rules.
@@ -1003,7 +1003,7 @@ from the grammar rules.
The Bison parser itself contains many static variables whose names The Bison parser itself contains many static variables whose names
start with `yy' and many macros whose names start with `YY'. It is a start with `yy' and many macros whose names start with `YY'. It is a
good idea to avoid using any such names (except those documented in this good idea to avoid using any such names (except those documented in this
manual) in the additional C code section of the grammar file. manual) in the epilogue of the grammar file.
 
File: bison.info, Node: Symbols, Next: Rules, Prev: Grammar Outline, Up: Grammar File File: bison.info, Node: Symbols, Next: Rules, Prev: Grammar Outline, Up: Grammar File
@@ -1256,8 +1256,8 @@ specify some other type, define `YYSTYPE' as a macro, like this:
#define YYSTYPE double #define YYSTYPE double
This macro definition must go in the C declarations section of the This macro definition must go in the prologue of the grammar file
grammar file (*note Outline of a Bison Grammar: Grammar Outline.). (*note Outline of a Bison Grammar: Grammar Outline.).
 
File: bison.info, Node: Multiple Types, Next: Actions, Prev: Value Type, Up: Semantics File: bison.info, Node: Multiple Types, Next: Actions, Prev: Value Type, Up: Semantics
+4 -4
View File
@@ -1,5 +1,5 @@
Ceci est le fichier Info bison.info, produit par Makeinfo version 4.0b This is bison.info, produced by makeinfo version 4.0b from
à partir bison.texinfo. bison.texinfo.
START-INFO-DIR-ENTRY START-INFO-DIR-ENTRY
* bison: (bison). GNU Project parser generator (yacc replacement). * bison: (bison). GNU Project parser generator (yacc replacement).
@@ -746,8 +746,8 @@ that it needs to use.
Keep in mind that the parser uses many C identifiers starting with Keep in mind that the parser uses many C identifiers starting with
`yy' and `YY' for internal purposes. If you use such an identifier `yy' and `YY' for internal purposes. If you use such an identifier
(aside from those in this manual) in an action or in additional C code (aside from those in this manual) in an action or in epilogue in the
in the grammar file, you are likely to run into trouble. grammar file, you are likely to run into trouble.
* Menu: * Menu:
+10 -13
View File
@@ -1,5 +1,5 @@
Ceci est le fichier Info bison.info, produit par Makeinfo version 4.0b This is bison.info, produced by makeinfo version 4.0b from
à partir bison.texinfo. bison.texinfo.
START-INFO-DIR-ENTRY START-INFO-DIR-ENTRY
* bison: (bison). GNU Project parser generator (yacc replacement). * bison: (bison). GNU Project parser generator (yacc replacement).
@@ -787,10 +787,9 @@ Here we assume that `yylex' looks at the value of `hexflag'; when it is
nonzero, all integers are parsed in hexadecimal, and tokens starting nonzero, all integers are parsed in hexadecimal, and tokens starting
with letters are parsed as integers if possible. with letters are parsed as integers if possible.
The declaration of `hexflag' shown in the C declarations section of The declaration of `hexflag' shown in the prologue of the parser file
the parser file is needed to make it accessible to the actions (*note is needed to make it accessible to the actions (*note The Prologue:
The C Declarations Section: C Declarations.). You must also write the Prologue.). You must also write the code in `yylex' to obey the flag.
code in `yylex' to obey the flag.
 
File: bison.info, Node: Tie-in Recovery, Prev: Lexical Tie-ins, Up: Context Dependency File: bison.info, Node: Tie-in Recovery, Prev: Lexical Tie-ins, Up: Context Dependency
@@ -859,15 +858,13 @@ out why.
To enable compilation of trace facilities, you must define the macro To enable compilation of trace facilities, you must define the macro
`YYDEBUG' when you compile the parser. You could use `-DYYDEBUG=1' as `YYDEBUG' when you compile the parser. You could use `-DYYDEBUG=1' as
a compiler option or you could put `#define YYDEBUG 1' in the C a compiler option or you could put `#define YYDEBUG 1' in the prologue
declarations section of the grammar file (*note The C Declarations of the grammar file (*note The Prologue: Prologue.). Alternatively, use
Section: C Declarations.). Alternatively, use the `-t' option when you the `-t' option when you run Bison (*note Invoking Bison: Invocation.).
run Bison (*note Invoking Bison: Invocation.). We always define We always define `YYDEBUG' so that debugging is always possible.
`YYDEBUG' so that debugging is always possible.
The trace facility uses `stderr', so you must add The trace facility uses `stderr', so you must add
`#include <stdio.h>' to the C declarations section unless it is already `#include <stdio.h>' to the prologue unless it is already there.
there.
Once you have compiled the program with trace facilities, the way to Once you have compiled the program with trace facilities, the way to
request a trace is to store a nonzero value in the variable `yydebug'. request a trace is to store a nonzero value in the variable `yydebug'.
+19 -18
View File
@@ -1,5 +1,5 @@
Ceci est le fichier Info bison.info, produit par Makeinfo version 4.0b This is bison.info, produced by makeinfo version 4.0b from
à partir bison.texinfo. bison.texinfo.
START-INFO-DIR-ENTRY START-INFO-DIR-ENTRY
* bison: (bison). GNU Project parser generator (yacc replacement). * bison: (bison). GNU Project parser generator (yacc replacement).
@@ -220,14 +220,13 @@ Bison Symbols
`%%' `%%'
Delimiter used to separate the grammar rule section from the Bison Delimiter used to separate the grammar rule section from the Bison
declarations section or the additional C code section. *Note The declarations section or the epilogue. *Note The Overall Layout of
Overall Layout of a Bison Grammar: Grammar Layout. a Bison Grammar: Grammar Layout.
`%{ %}' `%{ %}'
All code listed between `%{' and `%}' is copied directly to the All code listed between `%{' and `%}' is copied directly to the
output file uninterpreted. Such code forms the "C declarations" output file uninterpreted. Such code forms the prologue of the
section of the input file. *Note Outline of a Bison Grammar: input file. *Note Outline of a Bison Grammar: Grammar Outline.
Grammar Outline.
`/*...*/' `/*...*/'
Comment delimiters, as in C. Comment delimiters, as in C.
@@ -824,17 +823,17 @@ Index
* %token: Token Decl. * %token: Token Decl.
* %type: Type Decl. * %type: Type Decl.
* %union: Union Decl. * %union: Union Decl.
* @$ <1>: Action Features. * @$ <1>: Actions and Locations.
* @$: Actions and Locations. * @$: Action Features.
* @N <1>: Action Features. * @N <1>: Actions and Locations.
* @N: Actions and Locations. * @N: Action Features.
* action: Actions. * action: Actions.
* action data types: Action Types. * action data types: Action Types.
* action features summary: Action Features. * action features summary: Action Features.
* actions in mid-rule: Mid-Rule Actions. * actions in mid-rule: Mid-Rule Actions.
* actions, location: Actions and Locations. * actions, location: Actions and Locations.
* actions, semantic: Semantic Actions. * actions, semantic: Semantic Actions.
* additional C code section: C Code. * additional C code section: Epilogue.
* algorithm of parser: Algorithm. * algorithm of parser: Algorithm.
* associativity: Why Precedence. * associativity: Why Precedence.
* Backus-Naur form: Language and Grammar. * Backus-Naur form: Language and Grammar.
@@ -850,8 +849,7 @@ Index
* BISON_HAIRY: Environment Variables. * BISON_HAIRY: Environment Variables.
* BISON_SIMPLE: Environment Variables. * BISON_SIMPLE: Environment Variables.
* BNF: Language and Grammar. * BNF: Language and Grammar.
* C code, section for additional: C Code. * C code, section for additional: Epilogue.
* C declarations section: C Declarations.
* C-language interface: Interface. * C-language interface: Interface.
* calc: Infix Calc. * calc: Infix Calc.
* calculator, infix notation: Infix Calc. * calculator, infix notation: Infix Calc.
@@ -871,9 +869,10 @@ Index
* data types of semantic values: Value Type. * data types of semantic values: Value Type.
* debugging: Debugging. * debugging: Debugging.
* declaration summary: Decl Summary. * declaration summary: Decl Summary.
* declarations: Prologue.
* declarations section: Prologue.
* declarations, Bison: Declarations. * declarations, Bison: Declarations.
* declarations, Bison (introduction): Bison Declarations. * declarations, Bison (introduction): Bison Declarations.
* declarations, C: C Declarations.
* declaring literal string tokens: Token Decl. * declaring literal string tokens: Token Decl.
* declaring operator precedence: Precedence Decl. * declaring operator precedence: Precedence Decl.
* declaring the start symbol: Start Decl. * declaring the start symbol: Start Decl.
@@ -888,6 +887,7 @@ Index
* defining language semantics: Semantics. * defining language semantics: Semantics.
* else, dangling: Shift/Reduce. * else, dangling: Shift/Reduce.
* environment variables: Environment Variables. * environment variables: Environment Variables.
* epilogue: Epilogue.
* error: Error Recovery. * error: Error Recovery.
* error recovery: Error Recovery. * error recovery: Error Recovery.
* error recovery, simple: Simple Error Recovery. * error recovery, simple: Simple Error Recovery.
@@ -944,13 +944,14 @@ Index
* parser stack overflow: Stack Overflow. * parser stack overflow: Stack Overflow.
* parser state: Parser States. * parser state: Parser States.
* polish notation calculator: RPN Calc. * polish notation calculator: RPN Calc.
* position, textual <1>: Locations. * position, textual <1>: Locations Overview.
* position, textual: Locations Overview. * position, textual: Locations.
* precedence declarations: Precedence Decl. * precedence declarations: Precedence Decl.
* precedence of operators: Precedence. * precedence of operators: Precedence.
* precedence, context-dependent: Contextual Precedence. * precedence, context-dependent: Contextual Precedence.
* precedence, unary operator: Contextual Precedence. * precedence, unary operator: Contextual Precedence.
* preventing warnings about conflicts: Expect Decl. * preventing warnings about conflicts: Expect Decl.
* Prologue: Prologue.
* pure parser: Pure Decl. * pure parser: Pure Decl.
* recovery from errors: Error Recovery. * recovery from errors: Error Recovery.
* recursive rule: Recursion. * recursive rule: Recursion.
@@ -1008,8 +1009,8 @@ Index
* YYBACKUP: Action Features. * YYBACKUP: Action Features.
* yychar: Look-Ahead. * yychar: Look-Ahead.
* yyclearin: Error Recovery. * yyclearin: Error Recovery.
* yydebug: Debugging.
* YYDEBUG: Debugging. * YYDEBUG: Debugging.
* yydebug: Debugging.
* YYEMPTY: Action Features. * YYEMPTY: Action Features.
* yyerrok: Error Recovery. * yyerrok: Error Recovery.
* YYERROR: Action Features. * YYERROR: Action Features.
+54 -55
View File
@@ -188,7 +188,7 @@ Examples
Reverse Polish Notation Calculator Reverse Polish Notation Calculator
* Decls: Rpcalc Decls. Bison and C declarations for rpcalc. * Decls: Rpcalc Decls. Prologue (declarations) for rpcalc.
* Rules: Rpcalc Rules. Grammar Rules for rpcalc, with explanation. * Rules: Rpcalc Rules. Grammar Rules for rpcalc, with explanation.
* Lexer: Rpcalc Lexer. The lexical analyzer. * Lexer: Rpcalc Lexer. The lexical analyzer.
* Main: Rpcalc Main. The controlling function. * Main: Rpcalc Main. The controlling function.
@@ -220,10 +220,10 @@ Bison Grammar Files
Outline of a Bison Grammar Outline of a Bison Grammar
* C Declarations:: Syntax and usage of the C declarations section. * Prologue:: Syntax and usage of the prologue (declarations section).
* Bison Declarations:: Syntax and usage of the Bison declarations section. * Bison Declarations:: Syntax and usage of the Bison declarations section.
* Grammar Rules:: Syntax and usage of the grammar rules section. * Grammar Rules:: Syntax and usage of the grammar rules section.
* C Code:: Syntax and usage of the additional C code section. * Epilogue:: Syntax and usage of the epilogue (additional code section).
Defining Language Semantics Defining Language Semantics
@@ -736,7 +736,7 @@ general form of a Bison grammar file is as follows:
@example @example
%@{ %@{
@var{C declarations} @var{Prologue (declarations)}
%@} %@}
@var{Bison declarations} @var{Bison declarations}
@@ -744,15 +744,15 @@ general form of a Bison grammar file is as follows:
%% %%
@var{Grammar rules} @var{Grammar rules}
%% %%
@var{Additional C code} @var{Epilogue (additional code)}
@end example @end example
@noindent @noindent
The @samp{%%}, @samp{%@{} and @samp{%@}} are punctuation that appears The @samp{%%}, @samp{%@{} and @samp{%@}} are punctuation that appears
in every Bison grammar file to separate the sections. in every Bison grammar file to separate the sections.
The C declarations may define types and variables used in the actions. The prologue may define types and variables used in the actions. You can
You can also use preprocessor commands to define macros used there, and use also use preprocessor commands to define macros used there, and use
@code{#include} to include header files that do any of these things. @code{#include} to include header files that do any of these things.
The Bison declarations declare the names of the terminal and nonterminal The Bison declarations declare the names of the terminal and nonterminal
@@ -762,10 +762,10 @@ semantic values of various symbols.
The grammar rules define how to construct each nonterminal symbol from its The grammar rules define how to construct each nonterminal symbol from its
parts. parts.
The additional C code can contain any C code you want to use. Often the The epilogue can contain any code you want to use. Often the definition of
definition of the lexical analyzer @code{yylex} goes here, plus subroutines the lexical analyzer @code{yylex} goes here, plus subroutines called by the
called by the actions in the grammar rules. In a simple program, all the actions in the grammar rules. In a simple program, all the rest of the
rest of the program can go here. program can go here.
@node Examples, Grammar File, Concepts, Top @node Examples, Grammar File, Concepts, Top
@chapter Examples @chapter Examples
@@ -812,7 +812,7 @@ The source code for this calculator is named @file{rpcalc.y}. The
@samp{.y} extension is a convention used for Bison input files. @samp{.y} extension is a convention used for Bison input files.
@menu @menu
* Decls: Rpcalc Decls. Bison and C declarations for rpcalc. * Decls: Rpcalc Decls. Prologue (declarations) for rpcalc.
* Rules: Rpcalc Rules. Grammar Rules for rpcalc, with explanation. * Rules: Rpcalc Rules. Grammar Rules for rpcalc, with explanation.
* Lexer: Rpcalc Lexer. The lexical analyzer. * Lexer: Rpcalc Lexer. The lexical analyzer.
* Main: Rpcalc Main. The controlling function. * Main: Rpcalc Main. The controlling function.
@@ -840,7 +840,7 @@ calculator. As in C, comments are placed between @samp{/*@dots{}*/}.
%% /* Grammar rules and actions follow */ %% /* Grammar rules and actions follow */
@end example @end example
The C declarations section (@pxref{C Declarations, ,The C Declarations Section}) contains two The declarations section (@pxref{Prologue, , The prologue}) contains two
preprocessor directives. preprocessor directives.
The @code{#define} directive defines the macro @code{YYSTYPE}, thus The @code{#define} directive defines the macro @code{YYSTYPE}, thus
@@ -1161,8 +1161,8 @@ Before running Bison to produce a parser, we need to decide how to
arrange all the source code in one or more source files. For such a arrange all the source code in one or more source files. For such a
simple example, the easiest thing is to put everything in one file. The simple example, the easiest thing is to put everything in one file. The
definitions of @code{yylex}, @code{yyerror} and @code{main} go at the definitions of @code{yylex}, @code{yyerror} and @code{main} go at the
end, in the ``additional C code'' section of the file (@pxref{Grammar end, in the epilogue of the file
Layout, ,The Overall Layout of a Bison Grammar}). (@pxref{Grammar Layout, ,The Overall Layout of a Bison Grammar}).
For a large project, you would probably have several source files, and use For a large project, you would probably have several source files, and use
@code{make} to arrange to recompile them. @code{make} to arrange to recompile them.
@@ -1779,7 +1779,7 @@ appropriate delimiters:
@example @example
%@{ %@{
@var{C declarations} @var{Prologue}
%@} %@}
@var{Bison declarations} @var{Bison declarations}
@@ -1788,24 +1788,25 @@ appropriate delimiters:
@var{Grammar rules} @var{Grammar rules}
%% %%
@var{Additional C code} @var{Epilogue}
@end example @end example
Comments enclosed in @samp{/* @dots{} */} may appear in any of the sections. Comments enclosed in @samp{/* @dots{} */} may appear in any of the sections.
@menu @menu
* C Declarations:: Syntax and usage of the C declarations section. * Prologue:: Syntax and usage of the prologue.
* Bison Declarations:: Syntax and usage of the Bison declarations section. * Bison Declarations:: Syntax and usage of the Bison declarations section.
* Grammar Rules:: Syntax and usage of the grammar rules section. * Grammar Rules:: Syntax and usage of the grammar rules section.
* C Code:: Syntax and usage of the additional C code section. * Epilogue:: Syntax and usage of the epilogue.
@end menu @end menu
@node C Declarations, Bison Declarations, , Grammar Outline @node Prologue, Bison Declarations, , Grammar Outline
@subsection The C Declarations Section @subsection The prologue
@cindex C declarations section @cindex declarations section
@cindex declarations, C @cindex Prologue
@cindex declarations
The @var{C declarations} section contains macro definitions and The @var{prologue} section contains macro definitions and
declarations of functions and variables that are used in the actions in the declarations of functions and variables that are used in the actions in the
grammar rules. These are copied to the beginning of the parser file so grammar rules. These are copied to the beginning of the parser file so
that they precede the definition of @code{yyparse}. You can use that they precede the definition of @code{yyparse}. You can use
@@ -1813,7 +1814,7 @@ that they precede the definition of @code{yyparse}. You can use
need any C declarations, you may omit the @samp{%@{} and @samp{%@}} need any C declarations, you may omit the @samp{%@{} and @samp{%@}}
delimiters that bracket this section. delimiters that bracket this section.
@node Bison Declarations, Grammar Rules, C Declarations, Grammar Outline @node Bison Declarations, Grammar Rules, Prologue, Grammar Outline
@subsection The Bison Declarations Section @subsection The Bison Declarations Section
@cindex Bison declarations (introduction) @cindex Bison declarations (introduction)
@cindex declarations, Bison (introduction) @cindex declarations, Bison (introduction)
@@ -1823,7 +1824,7 @@ terminal and nonterminal symbols, specify precedence, and so on.
In some simple grammars you may not need any declarations. In some simple grammars you may not need any declarations.
@xref{Declarations, ,Bison Declarations}. @xref{Declarations, ,Bison Declarations}.
@node Grammar Rules, C Code, Bison Declarations, Grammar Outline @node Grammar Rules, Epilogue, Bison Declarations, Grammar Outline
@subsection The Grammar Rules Section @subsection The Grammar Rules Section
@cindex grammar rules section @cindex grammar rules section
@cindex rules section for grammar @cindex rules section for grammar
@@ -1835,18 +1836,18 @@ There must always be at least one grammar rule, and the first
@samp{%%} (which precedes the grammar rules) may never be omitted even @samp{%%} (which precedes the grammar rules) may never be omitted even
if it is the first thing in the file. if it is the first thing in the file.
@node C Code, , Grammar Rules, Grammar Outline @node Epilogue, , Grammar Rules, Grammar Outline
@subsection The Additional C Code Section @subsection The epilogue
@cindex additional C code section @cindex additional C code section
@cindex epilogue
@cindex C code, section for additional @cindex C code, section for additional
The @var{additional C code} section is copied verbatim to the end of the The @var{epilogue} is copied verbatim to the end of the parser file, just as
parser file, just as the @var{C declarations} section is copied to the the @var{prologue} is copied to the beginning. This is the most convenient
beginning. This is the most convenient place to put anything that you place to put anything that you want to have in the parser file but which need
want to have in the parser file but which need not come before the not come before the definition of @code{yyparse}. For example, the
definition of @code{yyparse}. For example, the definitions of definitions of @code{yylex} and @code{yyerror} often go here.
@code{yylex} and @code{yyerror} often go here. @xref{Interface, ,Parser @xref{Interface, ,Parser C-Language Interface}.
C-Language Interface}.
If the last section is empty, you may omit the @samp{%%} that separates it If the last section is empty, you may omit the @samp{%%} that separates it
from the grammar rules. from the grammar rules.
@@ -1854,7 +1855,7 @@ from the grammar rules.
The Bison parser itself contains many static variables whose names start The Bison parser itself contains many static variables whose names start
with @samp{yy} and many macros whose names start with @samp{YY}. It is a with @samp{yy} and many macros whose names start with @samp{YY}. It is a
good idea to avoid using any such names (except those documented in this good idea to avoid using any such names (except those documented in this
manual) in the additional C code section of the grammar file. manual) in the epilogue of the grammar file.
@node Symbols, Rules, Grammar Outline, Grammar File @node Symbols, Rules, Grammar Outline, Grammar File
@section Symbols, Terminal and Nonterminal @section Symbols, Terminal and Nonterminal
@@ -2175,8 +2176,8 @@ specify some other type, define @code{YYSTYPE} as a macro, like this:
@end example @end example
@noindent @noindent
This macro definition must go in the C declarations section of the grammar This macro definition must go in the prologue of the grammar file
file (@pxref{Grammar Outline, ,Outline of a Bison Grammar}). (@pxref{Grammar Outline, ,Outline of a Bison Grammar}).
@node Multiple Types, Actions, Value Type, Semantics @node Multiple Types, Actions, Value Type, Semantics
@subsection More Than One Value Type @subsection More Than One Value Type
@@ -3150,8 +3151,8 @@ functions that it needs to use.
Keep in mind that the parser uses many C identifiers starting with Keep in mind that the parser uses many C identifiers starting with
@samp{yy} and @samp{YY} for internal purposes. If you use such an @samp{yy} and @samp{YY} for internal purposes. If you use such an
identifier (aside from those in this manual) in an action or in additional identifier (aside from those in this manual) in an action or in epilogue
C code in the grammar file, you are likely to run into trouble. in the grammar file, you are likely to run into trouble.
@menu @menu
* Parser Function:: How to call @code{yyparse} and what it returns. * Parser Function:: How to call @code{yyparse} and what it returns.
@@ -4595,10 +4596,9 @@ Here we assume that @code{yylex} looks at the value of @code{hexflag}; when
it is nonzero, all integers are parsed in hexadecimal, and tokens starting it is nonzero, all integers are parsed in hexadecimal, and tokens starting
with letters are parsed as integers if possible. with letters are parsed as integers if possible.
The declaration of @code{hexflag} shown in the C declarations section of The declaration of @code{hexflag} shown in the prologue of the parser file
the parser file is needed to make it accessible to the actions is needed to make it accessible to the actions (@pxref{Prologue, ,The Prologue}).
(@pxref{C Declarations, ,The C Declarations Section}). You must also write the code in @code{yylex} You must also write the code in @code{yylex} to obey the flag.
to obey the flag.
@node Tie-in Recovery, , Lexical Tie-ins, Context Dependency @node Tie-in Recovery, , Lexical Tie-ins, Context Dependency
@section Lexical Tie-ins and Error Recovery @section Lexical Tie-ins and Error Recovery
@@ -4666,15 +4666,14 @@ If a Bison grammar compiles properly but doesn't do what you want when it
runs, the @code{yydebug} parser-trace feature can help you figure out why. runs, the @code{yydebug} parser-trace feature can help you figure out why.
To enable compilation of trace facilities, you must define the macro To enable compilation of trace facilities, you must define the macro
@code{YYDEBUG} when you compile the parser. You could use @code{YYDEBUG} when you compile the parser. You could use @samp{-DYYDEBUG=1}
@samp{-DYYDEBUG=1} as a compiler option or you could put @samp{#define as a compiler option or you could put @samp{#define YYDEBUG 1} in the prologue
YYDEBUG 1} in the C declarations section of the grammar file of the grammar file (@pxref{Prologue, , The Prologue}). Alternatively, use the
(@pxref{C Declarations, ,The C Declarations Section}). Alternatively, use the @samp{-t} option when @samp{-t} option when you run Bison (@pxref{Invocation, ,Invoking Bison}).
you run Bison (@pxref{Invocation, ,Invoking Bison}). We always define @code{YYDEBUG} so that We always define @code{YYDEBUG} so that debugging is always possible.
debugging is always possible.
The trace facility uses @code{stderr}, so you must add @w{@code{#include The trace facility uses @code{stderr}, so you must add
<stdio.h>}} to the C declarations section unless it is already there. @w{@code{#include <stdio.h>}} to the prologue unless it is already there.
Once you have compiled the program with trace facilities, the way to Once you have compiled the program with trace facilities, the way to
request a trace is to store a nonzero value in the variable @code{yydebug}. request a trace is to store a nonzero value in the variable @code{yydebug}.
@@ -5192,13 +5191,13 @@ These are the punctuation and delimiters used in Bison input:
@table @samp @table @samp
@item %% @item %%
Delimiter used to separate the grammar rule section from the Delimiter used to separate the grammar rule section from the
Bison declarations section or the additional C code section. Bison declarations section or the epilogue.
@xref{Grammar Layout, ,The Overall Layout of a Bison Grammar}. @xref{Grammar Layout, ,The Overall Layout of a Bison Grammar}.
@item %@{ %@} @item %@{ %@}
All code listed between @samp{%@{} and @samp{%@}} is copied directly to All code listed between @samp{%@{} and @samp{%@}} is copied directly to
the output file uninterpreted. Such code forms the ``C declarations'' the output file uninterpreted. Such code forms the prologue of the input
section of the input file. @xref{Grammar Outline, ,Outline of a Bison file. @xref{Grammar Outline, ,Outline of a Bison
Grammar}. Grammar}.
@item /*@dots{}*/ @item /*@dots{}*/
+2 -1
View File
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = ansi2knr
noinst_LIBRARIES = libbison.a noinst_LIBRARIES = libbison.a
INCLUDES = -I.. -I$(srcdir) -I../intl INCLUDES = -I.. -I$(srcdir) -I$(top_srcdir)/src -I../intl
# Heck, we are still using an old version of Automake which does not # Heck, we are still using an old version of Automake which does not
# understand LIBOBJ additions using $objext... # understand LIBOBJ additions using $objext...
@@ -14,6 +14,7 @@ EXTRA_DIST = malloc.c realloc.c
libbison_a_SOURCES = \ libbison_a_SOURCES = \
error.c error.h \ error.c error.h \
getopt.h getopt.c getopt1.c \ getopt.h getopt.c getopt1.c \
hash.h hash.c \
obstack.h obstack.c \ obstack.h obstack.c \
quote.h quote.c quotearg.h quotearg.c \ quote.h quote.c quotearg.h quotearg.c \
xalloc.h xmalloc.c xstrdup.c xalloc.h xmalloc.c xstrdup.c
+209 -203
View File
@@ -1,6 +1,7 @@
# Makefile.in generated automatically by automake 1.4-p4 from Makefile.am # Makefile.in generated automatically by automake 1.5 from Makefile.am.
# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. # Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
# Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation # This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved. # with or without modifications, as long as this notice is preserved.
@@ -10,6 +11,7 @@
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE. # PARTICULAR PURPOSE.
@SET_MAKE@
SHELL = @SHELL@ SHELL = @SHELL@
@@ -31,13 +33,9 @@ infodir = @infodir@
mandir = @mandir@ mandir = @mandir@
includedir = @includedir@ includedir = @includedir@
oldincludedir = /usr/include oldincludedir = /usr/include
DESTDIR =
pkgdatadir = $(datadir)/@PACKAGE@ pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = .. top_builddir = ..
ACLOCAL = @ACLOCAL@ ACLOCAL = @ACLOCAL@
@@ -46,11 +44,11 @@ AUTOMAKE = @AUTOMAKE@
AUTOHEADER = @AUTOHEADER@ AUTOHEADER = @AUTOHEADER@
INSTALL = @INSTALL@ INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS) INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_HEADER = $(INSTALL_DATA)
transform = @program_transform_name@ transform = @program_transform_name@
NORMAL_INSTALL = : NORMAL_INSTALL = :
PRE_INSTALL = : PRE_INSTALL = :
POST_INSTALL = : POST_INSTALL = :
@@ -59,20 +57,25 @@ PRE_UNINSTALL = :
POST_UNINSTALL = : POST_UNINSTALL = :
host_alias = @host_alias@ host_alias = @host_alias@
host_triplet = @host@ host_triplet = @host@
AMTAR = @AMTAR@
AT_TESTPATH = @AT_TESTPATH@ AT_TESTPATH = @AT_TESTPATH@
AWK = @AWK@
BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@ BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@
CATALOGS = @CATALOGS@ CATALOGS = @CATALOGS@
CATOBJEXT = @CATOBJEXT@ CATOBJEXT = @CATOBJEXT@
CC = @CC@ CC = @CC@
CPP = @CPP@ CPP = @CPP@
DATADIRNAME = @DATADIRNAME@ DATADIRNAME = @DATADIRNAME@
DEPDIR = @DEPDIR@
ECHO_C = @ECHO_C@ ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@ ECHO_T = @ECHO_T@
EXEEXT = @EXEEXT@
GENCAT = @GENCAT@ GENCAT = @GENCAT@
GLIBC21 = @GLIBC21@ GLIBC21 = @GLIBC21@
GMOFILES = @GMOFILES@ GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@ GMSGFMT = @GMSGFMT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INSTOBJEXT = @INSTOBJEXT@ INSTOBJEXT = @INSTOBJEXT@
INTLBISON = @INTLBISON@ INTLBISON = @INTLBISON@
INTLLIBS = @INTLLIBS@ INTLLIBS = @INTLLIBS@
@@ -81,9 +84,9 @@ INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
LIBICONV = @LIBICONV@ LIBICONV = @LIBICONV@
LIBOBJS = @LIBOBJS@ LIBOBJS = @LIBOBJS@
M4 = @M4@ M4 = @M4@
MAKEINFO = @MAKEINFO@
MKINSTALLDIRS = @MKINSTALLDIRS@ MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@ MSGFMT = @MSGFMT@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@ PACKAGE = @PACKAGE@
POFILES = @POFILES@ POFILES = @POFILES@
POSUB = @POSUB@ POSUB = @POSUB@
@@ -93,307 +96,310 @@ USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
USE_NLS = @USE_NLS@ USE_NLS = @USE_NLS@
VERSION = @VERSION@ VERSION = @VERSION@
WARNING_CFLAGS = @WARNING_CFLAGS@ WARNING_CFLAGS = @WARNING_CFLAGS@
am__include = @am__include@
am__quote = @am__quote@
install_sh = @install_sh@
AUTOMAKE_OPTIONS = ansi2knr AUTOMAKE_OPTIONS = ansi2knr
noinst_LIBRARIES = libbison.a noinst_LIBRARIES = libbison.a
INCLUDES = -I.. -I$(srcdir) -I../intl INCLUDES = -I.. -I$(srcdir) -I$(top_srcdir)/src -I../intl
# Heck, we are still using an old version of Automake which does not # Heck, we are still using an old version of Automake which does not
# understand LIBOBJ additions using $objext... # understand LIBOBJ additions using $objext...
EXTRA_DIST = malloc.c realloc.c EXTRA_DIST = malloc.c realloc.c
libbison_a_SOURCES = error.c error.h getopt.h getopt.c getopt1.c obstack.h obstack.c quote.h quote.c quotearg.h quotearg.c xalloc.h xmalloc.c xstrdup.c libbison_a_SOURCES = \
error.c error.h \
getopt.h getopt.c getopt1.c \
hash.h hash.c \
obstack.h obstack.c \
quote.h quote.c quotearg.h quotearg.c \
xalloc.h xmalloc.c xstrdup.c
libbison_a_LIBADD = @LIBOBJS@ libbison_a_LIBADD = @LIBOBJS@
libbison_a_DEPENDENCIES = $(libbison_a_LIBADD) libbison_a_DEPENDENCIES = $(libbison_a_LIBADD)
subdir = lib
mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
CONFIG_HEADER = ../config.h CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES = CONFIG_CLEAN_FILES =
LIBRARIES = $(noinst_LIBRARIES) LIBRARIES = $(noinst_LIBRARIES)
libbison_a_AR = $(AR) cru
am_libbison_a_OBJECTS = error$U.$(OBJEXT) getopt$U.$(OBJEXT) \
getopt1$U.$(OBJEXT) hash$U.$(OBJEXT) obstack$U.$(OBJEXT) \
quote$U.$(OBJEXT) quotearg$U.$(OBJEXT) xmalloc$U.$(OBJEXT) \
xstrdup$U.$(OBJEXT)
libbison_a_OBJECTS = $(am_libbison_a_OBJECTS)
DEFS = @DEFS@ -I. -I$(srcdir) -I.. DEFS = @DEFS@
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
CPPFLAGS = @CPPFLAGS@ CPPFLAGS = @CPPFLAGS@
LDFLAGS = @LDFLAGS@ LDFLAGS = @LDFLAGS@
LIBS = @LIBS@ LIBS = @LIBS@
ANSI2KNR = @ANSI2KNR@ depcomp = $(SHELL) $(top_srcdir)/config/depcomp
libbison_a_OBJECTS = error$U.o getopt$U.o getopt1$U.o obstack$U.o \ @AMDEP_TRUE@DEP_FILES = $(DEPDIR)/error$U.Po $(DEPDIR)/getopt$U.Po \
quote$U.o quotearg$U.o xmalloc$U.o xstrdup$U.o @AMDEP_TRUE@ $(DEPDIR)/getopt1$U.Po $(DEPDIR)/hash$U.Po \
AR = ar @AMDEP_TRUE@ $(DEPDIR)/malloc.Po $(DEPDIR)/memchr.Po \
CFLAGS = @CFLAGS@ @AMDEP_TRUE@ $(DEPDIR)/obstack$U.Po $(DEPDIR)/quote$U.Po \
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) @AMDEP_TRUE@ $(DEPDIR)/quotearg$U.Po $(DEPDIR)/realloc.Po \
@AMDEP_TRUE@ $(DEPDIR)/stpcpy.Po $(DEPDIR)/strndup.Po \
@AMDEP_TRUE@ $(DEPDIR)/strnlen.Po $(DEPDIR)/strspn.Po \
@AMDEP_TRUE@ $(DEPDIR)/xmalloc$U.Po $(DEPDIR)/xstrdup$U.Po
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC) CCLD = $(CC)
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
DIST_COMMON = Makefile.am Makefile.in ansi2knr.1 ansi2knr.c memchr.c \ CFLAGS = @CFLAGS@
stpcpy.c strndup.c strnlen.c strspn.c DIST_SOURCES = $(libbison_a_SOURCES)
DIST_COMMON = Makefile.am Makefile.in ansi2knr.1 ansi2knr.c malloc.c \
memchr.c realloc.c stpcpy.c strndup.c strnlen.c strspn.c
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
TAR = tar
GZIP_ENV = --best
DEP_FILES = .deps/error.P .deps/getopt.P .deps/getopt1.P .deps/memchr.P \
.deps/obstack.P .deps/quote.P .deps/quotearg.P .deps/stpcpy.P \
.deps/strndup.P .deps/strnlen.P .deps/strspn.P .deps/xmalloc.P \
.deps/xstrdup.P
SOURCES = $(libbison_a_SOURCES) SOURCES = $(libbison_a_SOURCES)
OBJECTS = $(libbison_a_OBJECTS)
all: all-redirect all: all-am
.SUFFIXES: .SUFFIXES:
.SUFFIXES: .S .c .o .s .SUFFIXES: .c .o .obj
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/Makefile cd $(top_srcdir) && \
$(AUTOMAKE) --gnu lib/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) && \
CONFIG_HEADERS= CONFIG_LINKS= \
CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) AR = ar
cd $(top_builddir) \
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
mostlyclean-noinstLIBRARIES:
clean-noinstLIBRARIES: clean-noinstLIBRARIES:
-test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
libbison.a: $(libbison_a_OBJECTS) $(libbison_a_DEPENDENCIES)
distclean-noinstLIBRARIES: -rm -f libbison.a
$(libbison_a_AR) libbison.a $(libbison_a_OBJECTS) $(libbison_a_LIBADD)
maintainer-clean-noinstLIBRARIES: $(RANLIB) libbison.a
.s.o:
$(COMPILE) -c $<
.S.o:
$(COMPILE) -c $<
mostlyclean-compile: mostlyclean-compile:
-rm -f *.o core *.core -rm -f *.$(OBJEXT) core *.core
clean-compile:
distclean-compile: distclean-compile:
-rm -f *.tab.c -rm -f *.tab.c
maintainer-clean-compile: ANSI2KNR = @ANSI2KNR@
ansi2knr: ansi2knr.$(OBJEXT)
mostlyclean-krextra: $(LINK) ansi2knr.$(OBJEXT) $(LIBS)
ansi2knr.$(OBJEXT): $(CONFIG_HEADER)
clean-krextra: clean-krextra:
-rm -f ansi2knr -rm -f ansi2knr
distclean-krextra:
maintainer-clean-krextra:
ansi2knr: ansi2knr.o
$(LINK) ansi2knr.o $(LIBS)
ansi2knr.o: $(CONFIG_HEADER)
mostlyclean-kr: mostlyclean-kr:
-rm -f *_.c -rm -f *_.c
clean-kr: @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/error$U.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/getopt$U.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/getopt1$U.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/hash$U.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/malloc.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/memchr.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/obstack$U.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/quote$U.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/quotearg$U.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/realloc.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/stpcpy.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/strndup.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/strnlen.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/strspn.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/xmalloc$U.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/xstrdup$U.Po@am__quote@
distclean-kr: distclean-depend:
-rm -rf $(DEPDIR)
maintainer-clean-kr: .c.o:
@AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
$(COMPILE) -c `test -f $< || echo '$(srcdir)/'`$<
libbison.a: $(libbison_a_OBJECTS) $(libbison_a_DEPENDENCIES) .c.obj:
-rm -f libbison.a @AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
$(AR) cru libbison.a $(libbison_a_OBJECTS) $(libbison_a_LIBADD) @AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
$(RANLIB) libbison.a @AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
$(COMPILE) -c `cygpath -w $<`
CCDEPMODE = @CCDEPMODE@
alloca_.c: alloca.c $(ANSI2KNR) alloca_.c: alloca.c $(ANSI2KNR)
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/alloca.c; then echo $(srcdir)/alloca.c; else echo alloca.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > alloca_.c $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/alloca.c; then echo $(srcdir)/alloca.c; else echo alloca.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > alloca_.c || rm -f alloca_.c
error_.c: error.c $(ANSI2KNR) error_.c: error.c $(ANSI2KNR)
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/error.c; then echo $(srcdir)/error.c; else echo error.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > error_.c $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/error.c; then echo $(srcdir)/error.c; else echo error.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > error_.c || rm -f error_.c
getopt_.c: getopt.c $(ANSI2KNR) getopt_.c: getopt.c $(ANSI2KNR)
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/getopt.c; then echo $(srcdir)/getopt.c; else echo getopt.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > getopt_.c $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/getopt.c; then echo $(srcdir)/getopt.c; else echo getopt.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > getopt_.c || rm -f getopt_.c
getopt1_.c: getopt1.c $(ANSI2KNR) getopt1_.c: getopt1.c $(ANSI2KNR)
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/getopt1.c; then echo $(srcdir)/getopt1.c; else echo getopt1.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > getopt1_.c $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/getopt1.c; then echo $(srcdir)/getopt1.c; else echo getopt1.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > getopt1_.c || rm -f getopt1_.c
hash_.c: hash.c $(ANSI2KNR)
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/hash.c; then echo $(srcdir)/hash.c; else echo hash.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > hash_.c || rm -f hash_.c
malloc_.c: malloc.c $(ANSI2KNR)
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/malloc.c; then echo $(srcdir)/malloc.c; else echo malloc.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > malloc_.c || rm -f malloc_.c
memchr_.c: memchr.c $(ANSI2KNR) memchr_.c: memchr.c $(ANSI2KNR)
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/memchr.c; then echo $(srcdir)/memchr.c; else echo memchr.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > memchr_.c $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/memchr.c; then echo $(srcdir)/memchr.c; else echo memchr.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > memchr_.c || rm -f memchr_.c
obstack_.c: obstack.c $(ANSI2KNR) obstack_.c: obstack.c $(ANSI2KNR)
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/obstack.c; then echo $(srcdir)/obstack.c; else echo obstack.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > obstack_.c $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/obstack.c; then echo $(srcdir)/obstack.c; else echo obstack.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > obstack_.c || rm -f obstack_.c
quote_.c: quote.c $(ANSI2KNR) quote_.c: quote.c $(ANSI2KNR)
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/quote.c; then echo $(srcdir)/quote.c; else echo quote.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > quote_.c $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/quote.c; then echo $(srcdir)/quote.c; else echo quote.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > quote_.c || rm -f quote_.c
quotearg_.c: quotearg.c $(ANSI2KNR) quotearg_.c: quotearg.c $(ANSI2KNR)
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/quotearg.c; then echo $(srcdir)/quotearg.c; else echo quotearg.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > quotearg_.c $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/quotearg.c; then echo $(srcdir)/quotearg.c; else echo quotearg.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > quotearg_.c || rm -f quotearg_.c
realloc_.c: realloc.c $(ANSI2KNR)
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/realloc.c; then echo $(srcdir)/realloc.c; else echo realloc.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > realloc_.c || rm -f realloc_.c
stpcpy_.c: stpcpy.c $(ANSI2KNR) stpcpy_.c: stpcpy.c $(ANSI2KNR)
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/stpcpy.c; then echo $(srcdir)/stpcpy.c; else echo stpcpy.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > stpcpy_.c $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/stpcpy.c; then echo $(srcdir)/stpcpy.c; else echo stpcpy.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > stpcpy_.c || rm -f stpcpy_.c
strndup_.c: strndup.c $(ANSI2KNR) strndup_.c: strndup.c $(ANSI2KNR)
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/strndup.c; then echo $(srcdir)/strndup.c; else echo strndup.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > strndup_.c $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/strndup.c; then echo $(srcdir)/strndup.c; else echo strndup.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > strndup_.c || rm -f strndup_.c
strnlen_.c: strnlen.c $(ANSI2KNR) strnlen_.c: strnlen.c $(ANSI2KNR)
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/strnlen.c; then echo $(srcdir)/strnlen.c; else echo strnlen.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > strnlen_.c $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/strnlen.c; then echo $(srcdir)/strnlen.c; else echo strnlen.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > strnlen_.c || rm -f strnlen_.c
strspn_.c: strspn.c $(ANSI2KNR) strspn_.c: strspn.c $(ANSI2KNR)
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/strspn.c; then echo $(srcdir)/strspn.c; else echo strspn.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > strspn_.c $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/strspn.c; then echo $(srcdir)/strspn.c; else echo strspn.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > strspn_.c || rm -f strspn_.c
xmalloc_.c: xmalloc.c $(ANSI2KNR) xmalloc_.c: xmalloc.c $(ANSI2KNR)
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/xmalloc.c; then echo $(srcdir)/xmalloc.c; else echo xmalloc.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > xmalloc_.c $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/xmalloc.c; then echo $(srcdir)/xmalloc.c; else echo xmalloc.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > xmalloc_.c || rm -f xmalloc_.c
xstrdup_.c: xstrdup.c $(ANSI2KNR) xstrdup_.c: xstrdup.c $(ANSI2KNR)
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/xstrdup.c; then echo $(srcdir)/xstrdup.c; else echo xstrdup.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > xstrdup_.c $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/xstrdup.c; then echo $(srcdir)/xstrdup.c; else echo xstrdup.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > xstrdup_.c || rm -f xstrdup_.c
alloca_.o error_.o getopt_.o getopt1_.o memchr_.o obstack_.o quote_.o \ alloca_.$(OBJEXT) error_.$(OBJEXT) getopt_.$(OBJEXT) getopt1_.$(OBJEXT) \
quotearg_.o stpcpy_.o strndup_.o strnlen_.o strspn_.o xmalloc_.o \ hash_.$(OBJEXT) malloc_.$(OBJEXT) memchr_.$(OBJEXT) obstack_.$(OBJEXT) \
xstrdup_.o : $(ANSI2KNR) quote_.$(OBJEXT) quotearg_.$(OBJEXT) realloc_.$(OBJEXT) \
stpcpy_.$(OBJEXT) strndup_.$(OBJEXT) strnlen_.$(OBJEXT) \
strspn_.$(OBJEXT) xmalloc_.$(OBJEXT) xstrdup_.$(OBJEXT) : $(ANSI2KNR)
uninstall-info-am:
tags: TAGS tags: TAGS
ID: $(HEADERS) $(SOURCES) $(LISP) ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS)'; \ list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
unique=`for i in $$list; do echo $$i; done | \ unique=`for i in $$list; do \
awk ' { files[$$0] = 1; } \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \ END { for (i in files) print i; }'`; \
here=`pwd` && cd $(srcdir) \ mkid -fID $$unique $(LISP)
&& mkid -f$$here/ID $$unique $(LISP)
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP) TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \ tags=; \
here=`pwd`; \ here=`pwd`; \
list='$(SOURCES) $(HEADERS)'; \ list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
unique=`for i in $$list; do echo $$i; done | \ unique=`for i in $$list; do \
awk ' { files[$$0] = 1; } \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \ END { for (i in files) print i; }'`; \
test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \ test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
|| (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS) || etags $(ETAGS_ARGS) $$tags $$unique $(LISP)
mostlyclean-tags: GTAGS:
here=`CDPATH=: && cd $(top_builddir) && pwd` \
clean-tags: && cd $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) $$here
distclean-tags: distclean-tags:
-rm -f TAGS ID -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH
maintainer-clean-tags: DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) top_distdir = ..
distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
subdir = lib
distdir: $(DISTFILES) distdir: $(DISTFILES)
here=`cd $(top_builddir) && pwd`; \
top_distdir=`cd $(top_distdir) && pwd`; \
distdir=`cd $(distdir) && pwd`; \
cd $(top_srcdir) \
&& $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu lib/Makefile
@for file in $(DISTFILES); do \ @for file in $(DISTFILES); do \
d=$(srcdir); \ if test -f $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
$(mkinstalldirs) "$(distdir)/$$dir"; \
fi; \
if test -d $$d/$$file; then \ if test -d $$d/$$file; then \
cp -pr $$d/$$file $(distdir)/$$file; \ cp -pR $$d/$$file $(distdir) \
|| exit 1; \
else \ else \
test -f $(distdir)/$$file \ test -f $(distdir)/$$file \
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \ || cp -p $$d/$$file $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file || :; \ || exit 1; \
fi; \ fi; \
done done
DEPS_MAGIC := $(shell mkdir .deps > /dev/null 2>&1 || :)
-include $(DEP_FILES)
mostlyclean-depend:
clean-depend:
distclean-depend:
-rm -rf .deps
maintainer-clean-depend:
%.o: %.c
@echo '$(COMPILE) -c $<'; \
$(COMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
@-cp .deps/$(*F).pp .deps/$(*F).P; \
tr ' ' '\012' < .deps/$(*F).pp \
| sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
>> .deps/$(*F).P; \
rm .deps/$(*F).pp
%.lo: %.c
@echo '$(LTCOMPILE) -c $<'; \
$(LTCOMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
@-sed -e 's/^\([^:]*\)\.o[ ]*:/\1.lo \1.o :/' \
< .deps/$(*F).pp > .deps/$(*F).P; \
tr ' ' '\012' < .deps/$(*F).pp \
| sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
>> .deps/$(*F).P; \
rm -f .deps/$(*F).pp
info-am:
info: info-am
dvi-am:
dvi: dvi-am
check-am: all-am check-am: all-am
check: check-am check: check-am
installcheck-am: all-am: Makefile $(ANSI2KNR) $(LIBRARIES)
installcheck: installcheck-am
install-exec-am:
install-exec: install-exec-am
install-data-am: installdirs:
install: install-am
install-exec: install-exec-am
install-data: install-data-am install-data: install-data-am
uninstall: uninstall-am
install-am: all-am install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
install: install-am
uninstall-am: installcheck: installcheck-am
uninstall: uninstall-am
all-am: Makefile $(ANSI2KNR) $(LIBRARIES)
all-redirect: all-am
install-strip: install-strip:
$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
installdirs: `test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic: mostlyclean-generic:
clean-generic: clean-generic:
distclean-generic: distclean-generic:
-rm -f Makefile $(CONFIG_CLEAN_FILES) -rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]*
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
maintainer-clean-generic: maintainer-clean-generic:
mostlyclean-am: mostlyclean-noinstLIBRARIES mostlyclean-compile \ @echo "This command is intended for maintainers to use"
mostlyclean-krextra mostlyclean-kr mostlyclean-tags \ @echo "it deletes files that may require special tools to rebuild."
mostlyclean-depend mostlyclean-generic
mostlyclean: mostlyclean-am
clean-am: clean-noinstLIBRARIES clean-compile clean-krextra clean-kr \
clean-tags clean-depend clean-generic mostlyclean-am
clean: clean-am clean: clean-am
distclean-am: distclean-noinstLIBRARIES distclean-compile \ clean-am: clean-generic clean-krextra clean-noinstLIBRARIES \
distclean-krextra distclean-kr distclean-tags \ mostlyclean-am
distclean-depend distclean-generic clean-am
distclean: distclean-am distclean: distclean-am
maintainer-clean-am: maintainer-clean-noinstLIBRARIES \ distclean-am: clean-am distclean-compile distclean-depend \
maintainer-clean-compile maintainer-clean-krextra \ distclean-generic distclean-tags
maintainer-clean-kr maintainer-clean-tags \
maintainer-clean-depend maintainer-clean-generic \ dvi: dvi-am
distclean-am
@echo "This command is intended for maintainers to use;" dvi-am:
@echo "it deletes files that may require special tools to rebuild."
info: info-am
info-am:
install-data-am:
install-exec-am:
install-info: install-info-am
install-man:
installcheck-am:
maintainer-clean: maintainer-clean-am maintainer-clean: maintainer-clean-am
.PHONY: mostlyclean-noinstLIBRARIES distclean-noinstLIBRARIES \ maintainer-clean-am: distclean-am maintainer-clean-generic
clean-noinstLIBRARIES maintainer-clean-noinstLIBRARIES \
mostlyclean-compile distclean-compile clean-compile \
maintainer-clean-compile mostlyclean-krextra distclean-krextra \
clean-krextra maintainer-clean-krextra mostlyclean-kr distclean-kr \
clean-kr maintainer-clean-kr tags mostlyclean-tags distclean-tags \
clean-tags maintainer-clean-tags distdir mostlyclean-depend \
distclean-depend clean-depend maintainer-clean-depend info-am info \
dvi-am dvi check check-am installcheck-am installcheck install-exec-am \
install-exec install-data-am install-data install-am install \
uninstall-am uninstall all-redirect all-am all installdirs \
mostlyclean-generic distclean-generic clean-generic \
maintainer-clean-generic clean mostlyclean distclean maintainer-clean
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-compile mostlyclean-generic mostlyclean-kr
uninstall-am: uninstall-info-am
.PHONY: GTAGS all all-am check check-am clean clean-generic \
clean-krextra clean-noinstLIBRARIES distclean distclean-compile \
distclean-depend distclean-generic distclean-tags distdir dvi \
dvi-am info info-am install install-am install-data \
install-data-am install-exec install-exec-am install-info \
install-info-am install-man install-strip installcheck \
installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-compile \
mostlyclean-generic mostlyclean-kr tags uninstall uninstall-am \
uninstall-info-am
# Tell versions [3.59,3.63) of GNU make to not export all variables. # Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded. # Otherwise a system limit (for SysV at least) may be exceeded.
+293
View File
@@ -0,0 +1,293 @@
/* hash.c -- hash table maintenance
Copyright (C) 1995 Free Software Foundation, Inc.
Written by Greg McGary <gkm@gnu.ai.mit.edu>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include <config.h>
#include <stdio.h>
#include "hash.h"
#include "error.h"
#include "system.h"
#include "xalloc.h"
static void hash_rehash __P((struct hash_table* ht));
static unsigned long round_up_2 __P((unsigned long rough));
/* Implement double hashing with open addressing. The table size is
always a power of two. The secondary (`increment') hash function
is forced to return an odd-value, in order to be relatively prime
to the table size. This guarantees that the increment can
potentially hit every slot in the table during collision
resolution. */
void *hash_deleted_item = &hash_deleted_item;
/* Force the table size to be a power of two, possibly rounding up the
given size. */
void
hash_init (struct hash_table* ht, unsigned long size,
hash_func_t hash_1, hash_func_t hash_2, hash_cmp_func_t hash_cmp)
{
ht->ht_size = round_up_2 (size);
if (ht->ht_size > (128 * 1024)) /* prevent size from getting out of hand */
ht->ht_size /= 2;
ht->ht_vec = (void**) XCALLOC (struct token *, ht->ht_size);
if (ht->ht_vec == 0)
error (1, 0, _("can't allocate %ld bytes for hash table: memory exhausted"),
ht->ht_size * sizeof(struct token *));
ht->ht_capacity = ht->ht_size * 15 / 16; /* 93.75% loading factor */
ht->ht_fill = 0;
ht->ht_collisions = 0;
ht->ht_lookups = 0;
ht->ht_rehashes = 0;
ht->ht_hash_1 = hash_1;
ht->ht_hash_2 = hash_2;
ht->ht_compare = hash_cmp;
}
/* Load an array of items into `ht'. */
void
hash_load (struct hash_table* ht, void *item_table, unsigned long cardinality, unsigned long size)
{
char *items = (char *) item_table;
while (cardinality--)
{
hash_insert (ht, items);
items += size;
}
}
/* Returns the address of the table slot matching `key'. If `key' is
not found, return the address of an empty slot suitable for
inserting `key'. The caller is responsible for incrementing
ht_fill on insertion. */
void **
hash_find_slot (struct hash_table* ht, void const *key)
{
void **slot;
void **deleted_slot = 0;
unsigned int hash_2 = 0;
unsigned int hash_1 = (*ht->ht_hash_1) (key);
ht->ht_lookups++;
for (;;)
{
hash_1 %= ht->ht_size;
slot = &ht->ht_vec[hash_1];
if (*slot == 0)
return slot;
if (*slot == hash_deleted_item)
{
if (deleted_slot == 0)
deleted_slot = slot;
}
else
{
if (key == *slot)
return slot;
if ((*ht->ht_compare) (key, *slot) == 0)
return slot;
ht->ht_collisions++;
}
if (!hash_2)
hash_2 = (*ht->ht_hash_2) (key) | 1;
hash_1 += hash_2;
}
}
void *
hash_find_item (struct hash_table* ht, void const *key)
{
void **slot = hash_find_slot (ht, key);
return ((HASH_VACANT (*slot)) ? 0 : *slot);
}
void *
hash_insert (struct hash_table* ht, void *item)
{
void **slot = hash_find_slot (ht, item);
return hash_insert_at (ht, item, slot);
}
void *
hash_insert_at (struct hash_table* ht, void *item, void const *slot)
{
void *old_item = *(void **) slot;
if (HASH_VACANT (old_item))
{
ht->ht_fill++;
old_item = item;
}
*(void const **) slot = item;
if (ht->ht_fill >= ht->ht_capacity)
hash_rehash (ht);
return old_item;
}
void *
hash_delete (struct hash_table* ht, void const *item)
{
void **slot = hash_find_slot (ht, item);
return hash_delete_at (ht, slot);
}
void *
hash_delete_at (struct hash_table* ht, void const *slot)
{
void *item = *(void **) slot;
if (!HASH_VACANT (item))
{
*(void const **) slot = hash_deleted_item;
ht->ht_fill--;
return item;
}
else
return 0;
}
void
hash_free_items (struct hash_table* ht)
{
void **vec = ht->ht_vec;
void **end = &vec[ht->ht_size];
for (; vec < end; vec++)
{
void *item = *vec;
if (!HASH_VACANT (item))
free (item);
*vec = 0;
}
ht->ht_fill = 0;
}
void
hash_delete_items (struct hash_table* ht)
{
void **vec = ht->ht_vec;
void **end = &vec[ht->ht_size];
for (; vec < end; vec++)
*vec = 0;
ht->ht_fill = 0;
ht->ht_collisions = 0;
ht->ht_lookups = 0;
ht->ht_rehashes = 0;
}
void
hash_free (struct hash_table* ht, int free_items)
{
if (free_items)
hash_free_items (ht);
free (ht->ht_vec);
ht->ht_vec = 0;
ht->ht_fill = 0;
ht->ht_capacity = 0;
}
void
hash_map (struct hash_table *ht, hash_map_func_t map)
{
void **slot;
void **end = &ht->ht_vec[ht->ht_size];
for (slot = ht->ht_vec; slot < end; slot++)
{
if (!HASH_VACANT (*slot))
(*map) (*slot);
}
}
/* Double the size of the hash table in the event of overflow... */
static void
hash_rehash (struct hash_table* ht)
{
unsigned long old_ht_size = ht->ht_size;
void **old_vec = ht->ht_vec;
void **ovp;
void **slot;
ht->ht_size *= 2;
ht->ht_rehashes++;
ht->ht_capacity = ht->ht_size - (ht->ht_size >> 4);
ht->ht_vec = (void **) XCALLOC (struct token *, ht->ht_size);
for (ovp = old_vec; ovp < &old_vec[old_ht_size]; ovp++)
{
if (*ovp == 0)
continue;
slot = hash_find_slot (ht, *ovp);
*slot = *ovp;
}
free (old_vec);
}
void
hash_print_stats (struct hash_table *ht, FILE *out_FILE)
{
fprintf (out_FILE, _("Load=%ld/%ld=%.0f%%, "), ht->ht_fill, ht->ht_size,
100.0 * (double) ht->ht_fill / (double) ht->ht_size);
fprintf (out_FILE, _("Rehash=%d, "), ht->ht_rehashes);
fprintf (out_FILE, _("Collisions=%ld/%ld=%.0f%%"), ht->ht_collisions, ht->ht_lookups,
(ht->ht_lookups
? (100.0 * (double) ht->ht_collisions / (double) ht->ht_lookups)
: 0));
}
/* Dump all items into a NULL-terminated vector. Use the
user-supplied vector, or malloc one. */
void**
hash_dump (struct hash_table *ht, void **vector_0, qsort_cmp_t compare)
{
void **vector;
void **slot;
void **end = &ht->ht_vec[ht->ht_size];
if (vector_0 == 0)
vector_0 = XMALLOC (void *, ht->ht_fill + 1);
vector = vector_0;
for (slot = ht->ht_vec; slot < end; slot++)
if (!HASH_VACANT (*slot))
*vector++ = *slot;
*vector = 0;
if (compare)
qsort (vector_0, ht->ht_fill, sizeof (void *), compare);
return vector_0;
}
/* Round a given number up to the nearest power of 2. */
static unsigned long
round_up_2 (unsigned long rough)
{
int round;
round = 1;
while (rough)
{
round <<= 1;
rough >>= 1;
}
return round;
}
+144
View File
@@ -0,0 +1,144 @@
/* hash.h -- decls for hash table
Copyright (C) 1995 Free Software Foundation, Inc.
Written by Greg McGary <gkm@gnu.ai.mit.edu>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#ifndef _hash_h_
#define _hash_h_
#include <stdio.h>
typedef unsigned long (*hash_func_t) __P((void const *key));
typedef int (*hash_cmp_func_t) __P((void const *x, void const *y));
typedef void (*hash_map_func_t) __P((void const *item));
struct hash_table
{
void **ht_vec;
unsigned long ht_size; /* total number of slots (power of 2) */
unsigned long ht_capacity; /* usable slots, limited by loading-factor */
unsigned long ht_fill; /* items in table */
unsigned long ht_collisions; /* # of failed calls to comparison function */
unsigned long ht_lookups; /* # of queries */
unsigned int ht_rehashes; /* # of times we've expanded table */
hash_func_t ht_hash_1; /* primary hash function */
hash_func_t ht_hash_2; /* secondary hash function */
hash_cmp_func_t ht_compare; /* comparison function */
};
typedef int (*qsort_cmp_t) __P((void const *, void const *));
void hash_init __P((struct hash_table *ht, unsigned long size,
hash_func_t hash_1, hash_func_t hash_2, hash_cmp_func_t hash_cmp));
void hash_load __P((struct hash_table *ht, void *item_table,
unsigned long cardinality, unsigned long size));
void **hash_find_slot __P((struct hash_table *ht, void const *key));
void *hash_find_item __P((struct hash_table *ht, void const *key));
void *hash_insert __P((struct hash_table *ht, void *item));
void *hash_insert_at __P((struct hash_table *ht, void *item, void const *slot));
void *hash_delete __P((struct hash_table *ht, void const *item));
void *hash_delete_at __P((struct hash_table *ht, void const *slot));
void hash_delete_items __P((struct hash_table *ht));
void hash_free_items __P((struct hash_table *ht));
void hash_free __P((struct hash_table *ht, int free_items));
void hash_map __P((struct hash_table *ht, hash_map_func_t map));
void hash_print_stats __P((struct hash_table *ht, FILE *out_FILE));
void **hash_dump __P((struct hash_table *ht, void **vector_0, qsort_cmp_t compare));
extern void *hash_deleted_item;
#define HASH_VACANT(item) ((item) == 0 || (void *) (item) == hash_deleted_item)
/* hash and comparison macros for string keys. */
#define STRING_HASH_1(_key_, _result_) { \
unsigned char const *kk = (unsigned char const *) (_key_) - 1; \
while (*++kk) \
(_result_) += (*kk << (kk[1] & 0xf)); \
} while (0)
#define return_STRING_HASH_1(_key_) do { \
unsigned long result = 0; \
STRING_HASH_1 ((_key_), result); \
return result; \
} while (0)
#define STRING_HASH_2(_key_, _result_) do { \
unsigned char const *kk = (unsigned char const *) (_key_) - 1; \
while (*++kk) \
(_result_) += (*kk << (kk[1] & 0x7)); \
} while (0)
#define return_STRING_HASH_2(_key_) do { \
unsigned long result = 0; \
STRING_HASH_2 ((_key_), result); \
return result; \
} while (0)
#define STRING_COMPARE(_x_, _y_, _result_) do { \
unsigned char const *xx = (unsigned char const *) (_x_) - 1; \
unsigned char const *yy = (unsigned char const *) (_y_) - 1; \
do { \
if (*++xx == '\0') { \
yy++; \
break; \
} \
} while (*xx == *++yy); \
(_result_) = *xx - *yy; \
} while (0)
#define return_STRING_COMPARE(_x_, _y_) do { \
int result; \
STRING_COMPARE (_x_, _y_, result); \
return result; \
} while (0)
/* hash and comparison macros for integer keys. */
#define INTEGER_HASH_1(_key_, _result_) do { \
(_result_) += ((unsigned long)(_key_)); \
} while (0)
#define return_INTEGER_HASH_1(_key_) do { \
unsigned long result = 0; \
INTEGER_HASH_1 ((_key_), result); \
return result; \
} while (0)
#define INTEGER_HASH_2(_key_, _result_) do { \
(_result_) += ~((unsigned long)(_key_)); \
} while (0)
#define return_INTEGER_HASH_2(_key_) do { \
unsigned long result = 0; \
INTEGER_HASH_2 ((_key_), result); \
return result; \
} while (0)
#define INTEGER_COMPARE(_x_, _y_, _result_) do { \
(_result_) = _x_ - _y_; \
} while (0)
#define return_INTEGER_COMPARE(_x_, _y_) do { \
int result; \
INTEGER_COMPARE (_x_, _y_, result); \
return result; \
} while (0)
/* hash and comparison macros for address keys. */
#define ADDRESS_HASH_1(_key_, _result_) INTEGER_HASH_1 (((unsigned long)(_key_)) >> 3, (_result_))
#define ADDRESS_HASH_2(_key_, _result_) INTEGER_HASH_2 (((unsigned long)(_key_)) >> 3, (_result_))
#define ADDRESS_COMPARE(_x_, _y_, _result_) INTEGER_COMPARE ((_x_), (_y_), (_result_))
#define return_ADDRESS_HASH_1(_key_) return_INTEGER_HASH_1 (((unsigned long)(_key_)) >> 3)
#define return_ADDRESS_HASH_2(_key_) return_INTEGER_HASH_2 (((unsigned long)(_key_)) >> 3)
#define return_ADDRESS_COMPARE(_x_, _y_) return_INTEGER_COMPARE ((_x_), (_y_))
#endif /* not _hash_h_ */
+104 -70
View File
@@ -1,6 +1,7 @@
# Makefile.in generated automatically by automake 1.4-p4 from Makefile.am # Makefile.in generated automatically by automake 1.5 from Makefile.am.
# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. # Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
# Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation # This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved. # with or without modifications, as long as this notice is preserved.
@@ -10,6 +11,7 @@
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE. # PARTICULAR PURPOSE.
@SET_MAKE@
SHELL = @SHELL@ SHELL = @SHELL@
@@ -31,13 +33,9 @@ infodir = @infodir@
mandir = @mandir@ mandir = @mandir@
includedir = @includedir@ includedir = @includedir@
oldincludedir = /usr/include oldincludedir = /usr/include
DESTDIR =
pkgdatadir = $(datadir)/@PACKAGE@ pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = .. top_builddir = ..
ACLOCAL = @ACLOCAL@ ACLOCAL = @ACLOCAL@
@@ -46,11 +44,11 @@ AUTOMAKE = @AUTOMAKE@
AUTOHEADER = @AUTOHEADER@ AUTOHEADER = @AUTOHEADER@
INSTALL = @INSTALL@ INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS) INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_HEADER = $(INSTALL_DATA)
transform = @program_transform_name@ transform = @program_transform_name@
NORMAL_INSTALL = : NORMAL_INSTALL = :
PRE_INSTALL = : PRE_INSTALL = :
POST_INSTALL = : POST_INSTALL = :
@@ -59,20 +57,25 @@ PRE_UNINSTALL = :
POST_UNINSTALL = : POST_UNINSTALL = :
host_alias = @host_alias@ host_alias = @host_alias@
host_triplet = @host@ host_triplet = @host@
AMTAR = @AMTAR@
AT_TESTPATH = @AT_TESTPATH@ AT_TESTPATH = @AT_TESTPATH@
AWK = @AWK@
BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@ BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@
CATALOGS = @CATALOGS@ CATALOGS = @CATALOGS@
CATOBJEXT = @CATOBJEXT@ CATOBJEXT = @CATOBJEXT@
CC = @CC@ CC = @CC@
CPP = @CPP@ CPP = @CPP@
DATADIRNAME = @DATADIRNAME@ DATADIRNAME = @DATADIRNAME@
DEPDIR = @DEPDIR@
ECHO_C = @ECHO_C@ ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@ ECHO_T = @ECHO_T@
EXEEXT = @EXEEXT@
GENCAT = @GENCAT@ GENCAT = @GENCAT@
GLIBC21 = @GLIBC21@ GLIBC21 = @GLIBC21@
GMOFILES = @GMOFILES@ GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@ GMSGFMT = @GMSGFMT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INSTOBJEXT = @INSTOBJEXT@ INSTOBJEXT = @INSTOBJEXT@
INTLBISON = @INTLBISON@ INTLBISON = @INTLBISON@
INTLLIBS = @INTLLIBS@ INTLLIBS = @INTLLIBS@
@@ -81,9 +84,9 @@ INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
LIBICONV = @LIBICONV@ LIBICONV = @LIBICONV@
LIBOBJS = @LIBOBJS@ LIBOBJS = @LIBOBJS@
M4 = @M4@ M4 = @M4@
MAKEINFO = @MAKEINFO@
MKINSTALLDIRS = @MKINSTALLDIRS@ MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@ MSGFMT = @MSGFMT@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@ PACKAGE = @PACKAGE@
POFILES = @POFILES@ POFILES = @POFILES@
POSUB = @POSUB@ POSUB = @POSUB@
@@ -93,112 +96,143 @@ USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
USE_NLS = @USE_NLS@ USE_NLS = @USE_NLS@
VERSION = @VERSION@ VERSION = @VERSION@
WARNING_CFLAGS = @WARNING_CFLAGS@ WARNING_CFLAGS = @WARNING_CFLAGS@
am__include = @am__include@
am__quote = @am__quote@
install_sh = @install_sh@
EXTRA_DIST = atconfig.m4 c-bs-a.m4 codeset.m4 error.m4 gettext.m4 glibc21.m4 iconv.m4 isc-posix.m4 lcmessage.m4 m4.m4 malloc.m4 mbstate_t.m4 prereq.m4 progtest.m4 realloc.m4 strerror_r.m4 warning.m4 EXTRA_DIST = \
atconfig.m4 \
c-bs-a.m4 \
codeset.m4 \
error.m4 \
gettext.m4 \
glibc21.m4 \
iconv.m4 \
isc-posix.m4 \
lcmessage.m4 \
m4.m4 \
malloc.m4 \
mbstate_t.m4 \
prereq.m4 \
progtest.m4 \
realloc.m4 \
strerror_r.m4 \
warning.m4
subdir = m4
mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
CONFIG_HEADER = ../config.h CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES = CONFIG_CLEAN_FILES =
DIST_SOURCES =
DIST_COMMON = Makefile.am Makefile.in DIST_COMMON = Makefile.am Makefile.in
all: all-am
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
TAR = tar
GZIP_ENV = --best
all: all-redirect
.SUFFIXES: .SUFFIXES:
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && $(AUTOMAKE) --gnu m4/Makefile cd $(top_srcdir) && \
$(AUTOMAKE) --gnu m4/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) \ cd $(top_builddir) && \
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status CONFIG_HEADERS= CONFIG_LINKS= \
CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status
uninstall-info-am:
tags: TAGS tags: TAGS
TAGS: TAGS:
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
subdir = m4 top_distdir = ..
distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
distdir: $(DISTFILES) distdir: $(DISTFILES)
here=`cd $(top_builddir) && pwd`; \
top_distdir=`cd $(top_distdir) && pwd`; \
distdir=`cd $(distdir) && pwd`; \
cd $(top_srcdir) \
&& $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu m4/Makefile
@for file in $(DISTFILES); do \ @for file in $(DISTFILES); do \
d=$(srcdir); \ if test -f $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
$(mkinstalldirs) "$(distdir)/$$dir"; \
fi; \
if test -d $$d/$$file; then \ if test -d $$d/$$file; then \
cp -pr $$d/$$file $(distdir)/$$file; \ cp -pR $$d/$$file $(distdir) \
|| exit 1; \
else \ else \
test -f $(distdir)/$$file \ test -f $(distdir)/$$file \
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \ || cp -p $$d/$$file $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file || :; \ || exit 1; \
fi; \ fi; \
done done
info-am:
info: info-am
dvi-am:
dvi: dvi-am
check-am: all-am check-am: all-am
check: check-am check: check-am
installcheck-am: all-am: Makefile
installcheck: installcheck-am
install-exec-am:
install-exec: install-exec-am
install-data-am: installdirs:
install: install-am
install-exec: install-exec-am
install-data: install-data-am install-data: install-data-am
uninstall: uninstall-am
install-am: all-am install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
install: install-am
uninstall-am: installcheck: installcheck-am
uninstall: uninstall-am
all-am: Makefile
all-redirect: all-am
install-strip: install-strip:
$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
installdirs: `test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic: mostlyclean-generic:
clean-generic: clean-generic:
distclean-generic: distclean-generic:
-rm -f Makefile $(CONFIG_CLEAN_FILES) -rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]*
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
maintainer-clean-generic: maintainer-clean-generic:
mostlyclean-am: mostlyclean-generic @echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
mostlyclean: mostlyclean-am clean: clean-am
clean-am: clean-generic mostlyclean-am clean-am: clean-generic mostlyclean-am
clean: clean-am
distclean-am: distclean-generic clean-am
distclean: distclean-am distclean: distclean-am
maintainer-clean-am: maintainer-clean-generic distclean-am distclean-am: clean-am distclean-generic
@echo "This command is intended for maintainers to use;"
@echo "it deletes files that may require special tools to rebuild." dvi: dvi-am
dvi-am:
info: info-am
info-am:
install-data-am:
install-exec-am:
install-info: install-info-am
install-man:
installcheck-am:
maintainer-clean: maintainer-clean-am maintainer-clean: maintainer-clean-am
.PHONY: tags distdir info-am info dvi-am dvi check check-am \ maintainer-clean-am: distclean-am maintainer-clean-generic
installcheck-am installcheck install-exec-am install-exec \
install-data-am install-data install-am install uninstall-am uninstall \
all-redirect all-am all installdirs mostlyclean-generic \
distclean-generic clean-generic maintainer-clean-generic clean \
mostlyclean distclean maintainer-clean
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-generic
uninstall-am: uninstall-info-am
.PHONY: all all-am check check-am clean clean-generic distclean \
distclean-generic distdir dvi dvi-am info info-am install \
install-am install-data install-data-am install-exec \
install-exec-am install-info install-info-am install-man \
install-strip installcheck installcheck-am installdirs \
maintainer-clean maintainer-clean-generic mostlyclean \
mostlyclean-generic uninstall uninstall-am uninstall-info-am
# Tell versions [3.59,3.63) of GNU make to not export all variables. # Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded. # Otherwise a system limit (for SysV at least) may be exceeded.
+1
View File
@@ -3,3 +3,4 @@
Makefile Makefile
bison bison
*.log *.log
*.flc
+7 -5
View File
@@ -13,17 +13,19 @@ bin_PROGRAMS = bison
bison_SOURCES = LR0.c closure.c complain.c conflicts.c \ bison_SOURCES = LR0.c closure.c complain.c conflicts.c \
derives.c \ derives.c \
files.c getargs.c gram.c lalr.c lex.c main.c nullable.c \ files.c getargs.c gram.c lalr.c lex.c main.c nullable.c \
output.c \ output.c print_graph.c \
print.c reader.c reduce.c symtab.c warshall.c vcg.c print_graph.c muscle_tab.c options.c \
print.c reader.c reduce.c symtab.c warshall.c vcg.c
EXTRA_bison_SOURCES = vmsgetargs.c EXTRA_bison_SOURCES = vmsgetargs.c
noinst_HEADERS = LR0.h closure.h complain.h conflicts.h \ noinst_HEADERS = LR0.h closure.h complain.h conflicts.h \
derives.h \ derives.h \
files.h getargs.h gram.h lalr.h lex.h nullable.h \ files.h getargs.h gram.h lalr.h lex.h nullable.h \
output.h state.h \ output.h print_graph.h \
print.h reader.h reduce.h symtab.h warshall.h system.h types.h \ muscle_tab.h options.h \
vcg.h vcg_defaults.h print_graph.h print.h reader.h reduce.h state.h symtab.h warshall.h system.h \
types.h vcg.h vcg_defaults.h
pkgdata_DATA = bison.simple bison.hairy pkgdata_DATA = bison.simple bison.hairy
+259 -242
View File
@@ -1,6 +1,7 @@
# Makefile.in generated automatically by automake 1.4-p4 from Makefile.am # Makefile.in generated automatically by automake 1.5 from Makefile.am.
# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. # Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
# Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation # This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved. # with or without modifications, as long as this notice is preserved.
@@ -10,6 +11,7 @@
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE. # PARTICULAR PURPOSE.
@SET_MAKE@
SHELL = @SHELL@ SHELL = @SHELL@
@@ -31,13 +33,9 @@ infodir = @infodir@
mandir = @mandir@ mandir = @mandir@
includedir = @includedir@ includedir = @includedir@
oldincludedir = /usr/include oldincludedir = /usr/include
DESTDIR =
pkgdatadir = $(datadir)/@PACKAGE@ pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = .. top_builddir = ..
ACLOCAL = @ACLOCAL@ ACLOCAL = @ACLOCAL@
@@ -46,11 +44,11 @@ AUTOMAKE = @AUTOMAKE@
AUTOHEADER = @AUTOHEADER@ AUTOHEADER = @AUTOHEADER@
INSTALL = @INSTALL@ INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS) INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_HEADER = $(INSTALL_DATA)
transform = @program_transform_name@ transform = @program_transform_name@
NORMAL_INSTALL = : NORMAL_INSTALL = :
PRE_INSTALL = : PRE_INSTALL = :
POST_INSTALL = : POST_INSTALL = :
@@ -59,20 +57,25 @@ PRE_UNINSTALL = :
POST_UNINSTALL = : POST_UNINSTALL = :
host_alias = @host_alias@ host_alias = @host_alias@
host_triplet = @host@ host_triplet = @host@
AMTAR = @AMTAR@
AT_TESTPATH = @AT_TESTPATH@ AT_TESTPATH = @AT_TESTPATH@
AWK = @AWK@
BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@ BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@
CATALOGS = @CATALOGS@ CATALOGS = @CATALOGS@
CATOBJEXT = @CATOBJEXT@ CATOBJEXT = @CATOBJEXT@
CC = @CC@ CC = @CC@
CPP = @CPP@ CPP = @CPP@
DATADIRNAME = @DATADIRNAME@ DATADIRNAME = @DATADIRNAME@
DEPDIR = @DEPDIR@
ECHO_C = @ECHO_C@ ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@ ECHO_T = @ECHO_T@
EXEEXT = @EXEEXT@
GENCAT = @GENCAT@ GENCAT = @GENCAT@
GLIBC21 = @GLIBC21@ GLIBC21 = @GLIBC21@
GMOFILES = @GMOFILES@ GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@ GMSGFMT = @GMSGFMT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INSTOBJEXT = @INSTOBJEXT@ INSTOBJEXT = @INSTOBJEXT@
INTLBISON = @INTLBISON@ INTLBISON = @INTLBISON@
INTLLIBS = @INTLLIBS@ INTLLIBS = @INTLLIBS@
@@ -81,9 +84,9 @@ INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
LIBICONV = @LIBICONV@ LIBICONV = @LIBICONV@
LIBOBJS = @LIBOBJS@ LIBOBJS = @LIBOBJS@
M4 = @M4@ M4 = @M4@
MAKEINFO = @MAKEINFO@
MKINSTALLDIRS = @MKINSTALLDIRS@ MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@ MSGFMT = @MSGFMT@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@ PACKAGE = @PACKAGE@
POFILES = @POFILES@ POFILES = @POFILES@
POSUB = @POSUB@ POSUB = @POSUB@
@@ -93,9 +96,15 @@ USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
USE_NLS = @USE_NLS@ USE_NLS = @USE_NLS@
VERSION = @VERSION@ VERSION = @VERSION@
WARNING_CFLAGS = @WARNING_CFLAGS@ WARNING_CFLAGS = @WARNING_CFLAGS@
am__include = @am__include@
am__quote = @am__quote@
install_sh = @install_sh@
AUTOMAKE_OPTIONS = 1.4 ../lib/ansi2knr AUTOMAKE_OPTIONS = 1.4 ../lib/ansi2knr
DEFS = @DEFS@ -DBISON_SIMPLE=\"$(pkgdatadir)/bison.simple\" -DBISON_HAIRY=\"$(pkgdatadir)/bison.hairy\" -DLOCALEDIR=\"$(datadir)/locale\" DEFS = @DEFS@ \
-DBISON_SIMPLE=\"$(pkgdatadir)/bison.simple\" \
-DBISON_HAIRY=\"$(pkgdatadir)/bison.hairy\" \
-DLOCALEDIR=\"$(datadir)/locale\"
INCLUDES = -I../intl -I$(top_srcdir)/lib -I.. INCLUDES = -I../intl -I$(top_srcdir)/lib -I..
@@ -103,363 +112,371 @@ LDADD = @INTLLIBS@ ../lib/libbison.a
bin_PROGRAMS = bison bin_PROGRAMS = bison
bison_SOURCES = LR0.c closure.c complain.c conflicts.c derives.c files.c getargs.c gram.c lalr.c lex.c main.c nullable.c output.c print.c reader.c reduce.c symtab.c warshall.c vcg.c print_graph.c bison_SOURCES = LR0.c closure.c complain.c conflicts.c \
derives.c \
files.c getargs.c gram.c lalr.c lex.c main.c nullable.c \
output.c print_graph.c \
muscle_tab.c options.c \
print.c reader.c reduce.c symtab.c warshall.c vcg.c
EXTRA_bison_SOURCES = vmsgetargs.c EXTRA_bison_SOURCES = vmsgetargs.c
noinst_HEADERS = LR0.h closure.h complain.h conflicts.h derives.h files.h getargs.h gram.h lalr.h lex.h nullable.h output.h state.h print.h reader.h reduce.h symtab.h warshall.h system.h types.h vcg.h vcg_defaults.h print_graph.h noinst_HEADERS = LR0.h closure.h complain.h conflicts.h \
derives.h \
files.h getargs.h gram.h lalr.h lex.h nullable.h \
output.h print_graph.h \
muscle_tab.h options.h \
print.h reader.h reduce.h state.h symtab.h warshall.h system.h \
types.h vcg.h vcg_defaults.h
pkgdata_DATA = bison.simple bison.hairy pkgdata_DATA = bison.simple bison.hairy
EXTRA_DIST = $(pkgdata_DATA) build.com bison.cld vmshlp.mar EXTRA_DIST = $(pkgdata_DATA) build.com bison.cld vmshlp.mar
subdir = src
mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
CONFIG_HEADER = ../config.h CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES = CONFIG_CLEAN_FILES =
bin_PROGRAMS = bison$(EXEEXT)
PROGRAMS = $(bin_PROGRAMS) PROGRAMS = $(bin_PROGRAMS)
CPPFLAGS = @CPPFLAGS@ am_bison_OBJECTS = LR0$U.$(OBJEXT) closure$U.$(OBJEXT) \
LDFLAGS = @LDFLAGS@ complain$U.$(OBJEXT) conflicts$U.$(OBJEXT) derives$U.$(OBJEXT) \
LIBS = @LIBS@ files$U.$(OBJEXT) getargs$U.$(OBJEXT) gram$U.$(OBJEXT) \
ANSI2KNR = ../lib/ansi2knr lalr$U.$(OBJEXT) lex$U.$(OBJEXT) main$U.$(OBJEXT) \
bison_OBJECTS = LR0$U.o closure$U.o complain$U.o conflicts$U.o \ nullable$U.$(OBJEXT) output$U.$(OBJEXT) print_graph$U.$(OBJEXT) \
derives$U.o files$U.o getargs$U.o gram$U.o lalr$U.o lex$U.o main$U.o \ muscle_tab$U.$(OBJEXT) options$U.$(OBJEXT) print$U.$(OBJEXT) \
nullable$U.o output$U.o print$U.o reader$U.o reduce$U.o symtab$U.o \ reader$U.$(OBJEXT) reduce$U.$(OBJEXT) symtab$U.$(OBJEXT) \
warshall$U.o vcg$U.o print_graph$U.o warshall$U.$(OBJEXT) vcg$U.$(OBJEXT)
bison_OBJECTS = $(am_bison_OBJECTS)
bison_LDADD = $(LDADD) bison_LDADD = $(LDADD)
bison_DEPENDENCIES = ../lib/libbison.a bison_DEPENDENCIES = ../lib/libbison.a
bison_LDFLAGS = bison_LDFLAGS =
CFLAGS = @CFLAGS@ DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CPPFLAGS = @CPPFLAGS@
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
depcomp = $(SHELL) $(top_srcdir)/config/depcomp
@AMDEP_TRUE@DEP_FILES = $(DEPDIR)/LR0$U.Po $(DEPDIR)/closure$U.Po \
@AMDEP_TRUE@ $(DEPDIR)/complain$U.Po $(DEPDIR)/conflicts$U.Po \
@AMDEP_TRUE@ $(DEPDIR)/derives$U.Po $(DEPDIR)/files$U.Po \
@AMDEP_TRUE@ $(DEPDIR)/getargs$U.Po $(DEPDIR)/gram$U.Po \
@AMDEP_TRUE@ $(DEPDIR)/lalr$U.Po $(DEPDIR)/lex$U.Po \
@AMDEP_TRUE@ $(DEPDIR)/main$U.Po $(DEPDIR)/muscle_tab$U.Po \
@AMDEP_TRUE@ $(DEPDIR)/nullable$U.Po $(DEPDIR)/options$U.Po \
@AMDEP_TRUE@ $(DEPDIR)/output$U.Po $(DEPDIR)/print$U.Po \
@AMDEP_TRUE@ $(DEPDIR)/print_graph$U.Po $(DEPDIR)/reader$U.Po \
@AMDEP_TRUE@ $(DEPDIR)/reduce$U.Po $(DEPDIR)/symtab$U.Po \
@AMDEP_TRUE@ $(DEPDIR)/vcg$U.Po $(DEPDIR)/vmsgetargs$U.Po \
@AMDEP_TRUE@ $(DEPDIR)/warshall$U.Po
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC) CCLD = $(CC)
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
CFLAGS = @CFLAGS@
DIST_SOURCES = $(bison_SOURCES) $(EXTRA_bison_SOURCES)
DATA = $(pkgdata_DATA) DATA = $(pkgdata_DATA)
HEADERS = $(noinst_HEADERS) HEADERS = $(noinst_HEADERS)
DIST_COMMON = Makefile.am Makefile.in DIST_COMMON = $(noinst_HEADERS) Makefile.am Makefile.in
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
TAR = tar
GZIP_ENV = --best
DEP_FILES = .deps/LR0.P .deps/closure.P .deps/complain.P \
.deps/conflicts.P .deps/derives.P .deps/files.P .deps/getargs.P \
.deps/gram.P .deps/lalr.P .deps/lex.P .deps/main.P .deps/nullable.P \
.deps/output.P .deps/print.P .deps/print_graph.P .deps/reader.P \
.deps/reduce.P .deps/symtab.P .deps/vcg.P .deps/vmsgetargs.P \
.deps/warshall.P
SOURCES = $(bison_SOURCES) $(EXTRA_bison_SOURCES) SOURCES = $(bison_SOURCES) $(EXTRA_bison_SOURCES)
OBJECTS = $(bison_OBJECTS)
all: all-redirect all: all-am
.SUFFIXES: .SUFFIXES:
.SUFFIXES: .S .c .o .s .SUFFIXES: .c .o .obj
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile cd $(top_srcdir) && \
$(AUTOMAKE) --gnu src/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) \ cd $(top_builddir) && \
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status CONFIG_HEADERS= CONFIG_LINKS= \
CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status
mostlyclean-binPROGRAMS:
clean-binPROGRAMS:
-test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
distclean-binPROGRAMS:
maintainer-clean-binPROGRAMS:
install-binPROGRAMS: $(bin_PROGRAMS) install-binPROGRAMS: $(bin_PROGRAMS)
@$(NORMAL_INSTALL) @$(NORMAL_INSTALL)
$(mkinstalldirs) $(DESTDIR)$(bindir) $(mkinstalldirs) $(DESTDIR)$(bindir)
@list='$(bin_PROGRAMS)'; for p in $$list; do \ @list='$(bin_PROGRAMS)'; for p in $$list; do \
if test -f $$p; then \ p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \ if test -f $$p \
$(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \ ; then \
f=`echo $$p1|sed '$(transform);s/$$/$(EXEEXT)/'`; \
echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$f"; \
$(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$f; \
else :; fi; \ else :; fi; \
done done
uninstall-binPROGRAMS: uninstall-binPROGRAMS:
@$(NORMAL_UNINSTALL) @$(NORMAL_UNINSTALL)
list='$(bin_PROGRAMS)'; for p in $$list; do \ @list='$(bin_PROGRAMS)'; for p in $$list; do \
rm -f $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \ f=`echo $$p|sed 's/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
echo " rm -f $(DESTDIR)$(bindir)/$$f"; \
rm -f $(DESTDIR)$(bindir)/$$f; \
done done
.s.o: clean-binPROGRAMS:
$(COMPILE) -c $< -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
bison$(EXEEXT): $(bison_OBJECTS) $(bison_DEPENDENCIES)
.S.o: @rm -f bison$(EXEEXT)
$(COMPILE) -c $< $(LINK) $(bison_LDFLAGS) $(bison_OBJECTS) $(bison_LDADD) $(LIBS)
mostlyclean-compile: mostlyclean-compile:
-rm -f *.o core *.core -rm -f *.$(OBJEXT) core *.core
clean-compile:
distclean-compile: distclean-compile:
-rm -f *.tab.c -rm -f *.tab.c
maintainer-clean-compile: ANSI2KNR = ../lib/ansi2knr
../lib/ansi2knr: ../lib/ansi2knr.o ../lib/ansi2knr:
cd ../lib && $(MAKE) $(AM_MAKEFLAGS) ansi2knr cd ../lib && $(MAKE) $(AM_MAKEFLAGS) ansi2knr
../lib/ansi2knr.o:
cd ../lib && $(MAKE) $(AM_MAKEFLAGS) ansi2knr.o
mostlyclean-kr: mostlyclean-kr:
-rm -f *_.c -rm -f *_.c
clean-kr: @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/LR0$U.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/closure$U.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/complain$U.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/conflicts$U.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/derives$U.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/files$U.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/getargs$U.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/gram$U.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/lalr$U.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/lex$U.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/main$U.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/muscle_tab$U.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/nullable$U.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/options$U.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/output$U.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/print$U.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/print_graph$U.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/reader$U.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/reduce$U.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/symtab$U.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/vcg$U.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/vmsgetargs$U.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/warshall$U.Po@am__quote@
distclean-kr: distclean-depend:
-rm -rf $(DEPDIR)
maintainer-clean-kr: .c.o:
@AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
$(COMPILE) -c `test -f $< || echo '$(srcdir)/'`$<
bison: $(bison_OBJECTS) $(bison_DEPENDENCIES) .c.obj:
@rm -f bison @AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
$(LINK) $(bison_LDFLAGS) $(bison_OBJECTS) $(bison_LDADD) $(LIBS) @AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
$(COMPILE) -c `cygpath -w $<`
CCDEPMODE = @CCDEPMODE@
LR0_.c: LR0.c $(ANSI2KNR) LR0_.c: LR0.c $(ANSI2KNR)
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/LR0.c; then echo $(srcdir)/LR0.c; else echo LR0.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > LR0_.c $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/LR0.c; then echo $(srcdir)/LR0.c; else echo LR0.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > LR0_.c || rm -f LR0_.c
alloca_.c: alloca.c $(ANSI2KNR)
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/alloca.c; then echo $(srcdir)/alloca.c; else echo alloca.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > alloca_.c
closure_.c: closure.c $(ANSI2KNR) closure_.c: closure.c $(ANSI2KNR)
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/closure.c; then echo $(srcdir)/closure.c; else echo closure.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > closure_.c $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/closure.c; then echo $(srcdir)/closure.c; else echo closure.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > closure_.c || rm -f closure_.c
complain_.c: complain.c $(ANSI2KNR) complain_.c: complain.c $(ANSI2KNR)
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/complain.c; then echo $(srcdir)/complain.c; else echo complain.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > complain_.c $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/complain.c; then echo $(srcdir)/complain.c; else echo complain.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > complain_.c || rm -f complain_.c
conflicts_.c: conflicts.c $(ANSI2KNR) conflicts_.c: conflicts.c $(ANSI2KNR)
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/conflicts.c; then echo $(srcdir)/conflicts.c; else echo conflicts.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > conflicts_.c $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/conflicts.c; then echo $(srcdir)/conflicts.c; else echo conflicts.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > conflicts_.c || rm -f conflicts_.c
derives_.c: derives.c $(ANSI2KNR) derives_.c: derives.c $(ANSI2KNR)
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/derives.c; then echo $(srcdir)/derives.c; else echo derives.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > derives_.c $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/derives.c; then echo $(srcdir)/derives.c; else echo derives.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > derives_.c || rm -f derives_.c
files_.c: files.c $(ANSI2KNR) files_.c: files.c $(ANSI2KNR)
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/files.c; then echo $(srcdir)/files.c; else echo files.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > files_.c $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/files.c; then echo $(srcdir)/files.c; else echo files.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > files_.c || rm -f files_.c
getargs_.c: getargs.c $(ANSI2KNR) getargs_.c: getargs.c $(ANSI2KNR)
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/getargs.c; then echo $(srcdir)/getargs.c; else echo getargs.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > getargs_.c $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/getargs.c; then echo $(srcdir)/getargs.c; else echo getargs.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > getargs_.c || rm -f getargs_.c
gram_.c: gram.c $(ANSI2KNR) gram_.c: gram.c $(ANSI2KNR)
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/gram.c; then echo $(srcdir)/gram.c; else echo gram.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > gram_.c $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/gram.c; then echo $(srcdir)/gram.c; else echo gram.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > gram_.c || rm -f gram_.c
lalr_.c: lalr.c $(ANSI2KNR) lalr_.c: lalr.c $(ANSI2KNR)
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/lalr.c; then echo $(srcdir)/lalr.c; else echo lalr.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > lalr_.c $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/lalr.c; then echo $(srcdir)/lalr.c; else echo lalr.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > lalr_.c || rm -f lalr_.c
lex_.c: lex.c $(ANSI2KNR) lex_.c: lex.c $(ANSI2KNR)
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/lex.c; then echo $(srcdir)/lex.c; else echo lex.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > lex_.c $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/lex.c; then echo $(srcdir)/lex.c; else echo lex.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > lex_.c || rm -f lex_.c
main_.c: main.c $(ANSI2KNR) main_.c: main.c $(ANSI2KNR)
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/main.c; then echo $(srcdir)/main.c; else echo main.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > main_.c $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/main.c; then echo $(srcdir)/main.c; else echo main.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > main_.c || rm -f main_.c
memchr_.c: memchr.c $(ANSI2KNR) muscle_tab_.c: muscle_tab.c $(ANSI2KNR)
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/memchr.c; then echo $(srcdir)/memchr.c; else echo memchr.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > memchr_.c $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/muscle_tab.c; then echo $(srcdir)/muscle_tab.c; else echo muscle_tab.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > muscle_tab_.c || rm -f muscle_tab_.c
nullable_.c: nullable.c $(ANSI2KNR) nullable_.c: nullable.c $(ANSI2KNR)
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/nullable.c; then echo $(srcdir)/nullable.c; else echo nullable.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > nullable_.c $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/nullable.c; then echo $(srcdir)/nullable.c; else echo nullable.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > nullable_.c || rm -f nullable_.c
options_.c: options.c $(ANSI2KNR)
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/options.c; then echo $(srcdir)/options.c; else echo options.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > options_.c || rm -f options_.c
output_.c: output.c $(ANSI2KNR) output_.c: output.c $(ANSI2KNR)
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/output.c; then echo $(srcdir)/output.c; else echo output.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > output_.c $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/output.c; then echo $(srcdir)/output.c; else echo output.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > output_.c || rm -f output_.c
print_.c: print.c $(ANSI2KNR) print_.c: print.c $(ANSI2KNR)
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/print.c; then echo $(srcdir)/print.c; else echo print.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > print_.c $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/print.c; then echo $(srcdir)/print.c; else echo print.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > print_.c || rm -f print_.c
print_graph_.c: print_graph.c $(ANSI2KNR) print_graph_.c: print_graph.c $(ANSI2KNR)
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/print_graph.c; then echo $(srcdir)/print_graph.c; else echo print_graph.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > print_graph_.c $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/print_graph.c; then echo $(srcdir)/print_graph.c; else echo print_graph.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > print_graph_.c || rm -f print_graph_.c
reader_.c: reader.c $(ANSI2KNR) reader_.c: reader.c $(ANSI2KNR)
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/reader.c; then echo $(srcdir)/reader.c; else echo reader.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > reader_.c $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/reader.c; then echo $(srcdir)/reader.c; else echo reader.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > reader_.c || rm -f reader_.c
reduce_.c: reduce.c $(ANSI2KNR) reduce_.c: reduce.c $(ANSI2KNR)
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/reduce.c; then echo $(srcdir)/reduce.c; else echo reduce.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > reduce_.c $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/reduce.c; then echo $(srcdir)/reduce.c; else echo reduce.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > reduce_.c || rm -f reduce_.c
stpcpy_.c: stpcpy.c $(ANSI2KNR)
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/stpcpy.c; then echo $(srcdir)/stpcpy.c; else echo stpcpy.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > stpcpy_.c
strndup_.c: strndup.c $(ANSI2KNR)
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/strndup.c; then echo $(srcdir)/strndup.c; else echo strndup.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > strndup_.c
strnlen_.c: strnlen.c $(ANSI2KNR)
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/strnlen.c; then echo $(srcdir)/strnlen.c; else echo strnlen.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > strnlen_.c
strspn_.c: strspn.c $(ANSI2KNR)
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/strspn.c; then echo $(srcdir)/strspn.c; else echo strspn.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > strspn_.c
symtab_.c: symtab.c $(ANSI2KNR) symtab_.c: symtab.c $(ANSI2KNR)
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/symtab.c; then echo $(srcdir)/symtab.c; else echo symtab.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > symtab_.c $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/symtab.c; then echo $(srcdir)/symtab.c; else echo symtab.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > symtab_.c || rm -f symtab_.c
vcg_.c: vcg.c $(ANSI2KNR) vcg_.c: vcg.c $(ANSI2KNR)
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/vcg.c; then echo $(srcdir)/vcg.c; else echo vcg.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > vcg_.c $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/vcg.c; then echo $(srcdir)/vcg.c; else echo vcg.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > vcg_.c || rm -f vcg_.c
vmsgetargs_.c: vmsgetargs.c $(ANSI2KNR) vmsgetargs_.c: vmsgetargs.c $(ANSI2KNR)
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/vmsgetargs.c; then echo $(srcdir)/vmsgetargs.c; else echo vmsgetargs.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > vmsgetargs_.c $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/vmsgetargs.c; then echo $(srcdir)/vmsgetargs.c; else echo vmsgetargs.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > vmsgetargs_.c || rm -f vmsgetargs_.c
warshall_.c: warshall.c $(ANSI2KNR) warshall_.c: warshall.c $(ANSI2KNR)
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/warshall.c; then echo $(srcdir)/warshall.c; else echo warshall.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > warshall_.c $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/warshall.c; then echo $(srcdir)/warshall.c; else echo warshall.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > warshall_.c || rm -f warshall_.c
LR0_.o alloca_.o closure_.o complain_.o conflicts_.o derives_.o \ LR0_.$(OBJEXT) closure_.$(OBJEXT) complain_.$(OBJEXT) \
files_.o getargs_.o gram_.o lalr_.o lex_.o main_.o memchr_.o \ conflicts_.$(OBJEXT) derives_.$(OBJEXT) files_.$(OBJEXT) \
nullable_.o output_.o print_.o print_graph_.o reader_.o reduce_.o \ getargs_.$(OBJEXT) gram_.$(OBJEXT) lalr_.$(OBJEXT) lex_.$(OBJEXT) \
stpcpy_.o strndup_.o strnlen_.o strspn_.o symtab_.o vcg_.o \ main_.$(OBJEXT) muscle_tab_.$(OBJEXT) nullable_.$(OBJEXT) \
vmsgetargs_.o warshall_.o : $(ANSI2KNR) options_.$(OBJEXT) output_.$(OBJEXT) print_.$(OBJEXT) \
print_graph_.$(OBJEXT) reader_.$(OBJEXT) reduce_.$(OBJEXT) \
symtab_.$(OBJEXT) vcg_.$(OBJEXT) vmsgetargs_.$(OBJEXT) \
warshall_.$(OBJEXT) : $(ANSI2KNR)
uninstall-info-am:
install-pkgdataDATA: $(pkgdata_DATA) install-pkgdataDATA: $(pkgdata_DATA)
@$(NORMAL_INSTALL) @$(NORMAL_INSTALL)
$(mkinstalldirs) $(DESTDIR)$(pkgdatadir) $(mkinstalldirs) $(DESTDIR)$(pkgdatadir)
@list='$(pkgdata_DATA)'; for p in $$list; do \ @list='$(pkgdata_DATA)'; for p in $$list; do \
if test -f $(srcdir)/$$p; then \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo " $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(pkgdatadir)/$$p"; \ f="`echo $$p | sed -e 's|^.*/||'`"; \
$(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(pkgdatadir)/$$p; \ echo " $(INSTALL_DATA) $$d$$p $(DESTDIR)$(pkgdatadir)/$$f"; \
else if test -f $$p; then \ $(INSTALL_DATA) $$d$$p $(DESTDIR)$(pkgdatadir)/$$f; \
echo " $(INSTALL_DATA) $$p $(DESTDIR)$(pkgdatadir)/$$p"; \
$(INSTALL_DATA) $$p $(DESTDIR)$(pkgdatadir)/$$p; \
fi; fi; \
done done
uninstall-pkgdataDATA: uninstall-pkgdataDATA:
@$(NORMAL_UNINSTALL) @$(NORMAL_UNINSTALL)
list='$(pkgdata_DATA)'; for p in $$list; do \ @list='$(pkgdata_DATA)'; for p in $$list; do \
rm -f $(DESTDIR)$(pkgdatadir)/$$p; \ f="`echo $$p | sed -e 's|^.*/||'`"; \
echo " rm -f $(DESTDIR)$(pkgdatadir)/$$f"; \
rm -f $(DESTDIR)$(pkgdatadir)/$$f; \
done done
tags: TAGS tags: TAGS
ID: $(HEADERS) $(SOURCES) $(LISP) ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS)'; \ list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
unique=`for i in $$list; do echo $$i; done | \ unique=`for i in $$list; do \
awk ' { files[$$0] = 1; } \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \ END { for (i in files) print i; }'`; \
here=`pwd` && cd $(srcdir) \ mkid -fID $$unique $(LISP)
&& mkid -f$$here/ID $$unique $(LISP)
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP) TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \ tags=; \
here=`pwd`; \ here=`pwd`; \
list='$(SOURCES) $(HEADERS)'; \ list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
unique=`for i in $$list; do echo $$i; done | \ unique=`for i in $$list; do \
awk ' { files[$$0] = 1; } \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \ END { for (i in files) print i; }'`; \
test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \ test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
|| (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS) || etags $(ETAGS_ARGS) $$tags $$unique $(LISP)
mostlyclean-tags: GTAGS:
here=`CDPATH=: && cd $(top_builddir) && pwd` \
clean-tags: && cd $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) $$here
distclean-tags: distclean-tags:
-rm -f TAGS ID -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH
maintainer-clean-tags: DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) top_distdir = ..
distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
subdir = src
distdir: $(DISTFILES) distdir: $(DISTFILES)
here=`cd $(top_builddir) && pwd`; \
top_distdir=`cd $(top_distdir) && pwd`; \
distdir=`cd $(distdir) && pwd`; \
cd $(top_srcdir) \
&& $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu src/Makefile
@for file in $(DISTFILES); do \ @for file in $(DISTFILES); do \
d=$(srcdir); \ if test -f $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
$(mkinstalldirs) "$(distdir)/$$dir"; \
fi; \
if test -d $$d/$$file; then \ if test -d $$d/$$file; then \
cp -pr $$d/$$file $(distdir)/$$file; \ cp -pR $$d/$$file $(distdir) \
|| exit 1; \
else \ else \
test -f $(distdir)/$$file \ test -f $(distdir)/$$file \
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \ || cp -p $$d/$$file $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file || :; \ || exit 1; \
fi; \ fi; \
done done
DEPS_MAGIC := $(shell mkdir .deps > /dev/null 2>&1 || :)
-include $(DEP_FILES)
mostlyclean-depend:
clean-depend:
distclean-depend:
-rm -rf .deps
maintainer-clean-depend:
%.o: %.c
@echo '$(COMPILE) -c $<'; \
$(COMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
@-cp .deps/$(*F).pp .deps/$(*F).P; \
tr ' ' '\012' < .deps/$(*F).pp \
| sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
>> .deps/$(*F).P; \
rm .deps/$(*F).pp
%.lo: %.c
@echo '$(LTCOMPILE) -c $<'; \
$(LTCOMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
@-sed -e 's/^\([^:]*\)\.o[ ]*:/\1.lo \1.o :/' \
< .deps/$(*F).pp > .deps/$(*F).P; \
tr ' ' '\012' < .deps/$(*F).pp \
| sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
>> .deps/$(*F).P; \
rm -f .deps/$(*F).pp
info-am:
info: info-am
dvi-am:
dvi: dvi-am
check-am: all-am check-am: all-am
check: check-am check: check-am
installcheck-am:
installcheck: installcheck-am
install-exec-am: install-binPROGRAMS
install-exec: install-exec-am
install-data-am: install-pkgdataDATA
install-data: install-data-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
install: install-am
uninstall-am: uninstall-binPROGRAMS uninstall-pkgdataDATA
uninstall: uninstall-am
all-am: Makefile $(PROGRAMS) $(DATA) $(HEADERS) all-am: Makefile $(PROGRAMS) $(DATA) $(HEADERS)
all-redirect: all-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
installdirs: installdirs:
$(mkinstalldirs) $(DESTDIR)$(bindir) $(DESTDIR)$(pkgdatadir) $(mkinstalldirs) $(DESTDIR)$(bindir) $(DESTDIR)$(pkgdatadir)
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic: mostlyclean-generic:
clean-generic: clean-generic:
distclean-generic: distclean-generic:
-rm -f Makefile $(CONFIG_CLEAN_FILES) -rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]*
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
maintainer-clean-generic: maintainer-clean-generic:
mostlyclean-am: mostlyclean-binPROGRAMS mostlyclean-compile \ @echo "This command is intended for maintainers to use"
mostlyclean-kr mostlyclean-tags mostlyclean-depend \ @echo "it deletes files that may require special tools to rebuild."
mostlyclean-generic
mostlyclean: mostlyclean-am
clean-am: clean-binPROGRAMS clean-compile clean-kr clean-tags \
clean-depend clean-generic mostlyclean-am
clean: clean-am clean: clean-am
distclean-am: distclean-binPROGRAMS distclean-compile distclean-kr \ clean-am: clean-binPROGRAMS clean-generic mostlyclean-am
distclean-tags distclean-depend distclean-generic \
clean-am
distclean: distclean-am distclean: distclean-am
maintainer-clean-am: maintainer-clean-binPROGRAMS \ distclean-am: clean-am distclean-compile distclean-depend \
maintainer-clean-compile maintainer-clean-kr \ distclean-generic distclean-tags
maintainer-clean-tags maintainer-clean-depend \
maintainer-clean-generic distclean-am dvi: dvi-am
@echo "This command is intended for maintainers to use;"
@echo "it deletes files that may require special tools to rebuild." dvi-am:
info: info-am
info-am:
install-data-am: install-pkgdataDATA
install-exec-am: install-binPROGRAMS
install-info: install-info-am
install-man:
installcheck-am:
maintainer-clean: maintainer-clean-am maintainer-clean: maintainer-clean-am
.PHONY: mostlyclean-binPROGRAMS distclean-binPROGRAMS clean-binPROGRAMS \ maintainer-clean-am: distclean-am maintainer-clean-generic
maintainer-clean-binPROGRAMS uninstall-binPROGRAMS install-binPROGRAMS \
mostlyclean-compile distclean-compile clean-compile \
maintainer-clean-compile mostlyclean-kr distclean-kr clean-kr \
maintainer-clean-kr uninstall-pkgdataDATA install-pkgdataDATA tags \
mostlyclean-tags distclean-tags clean-tags maintainer-clean-tags \
distdir mostlyclean-depend distclean-depend clean-depend \
maintainer-clean-depend info-am info dvi-am dvi check check-am \
installcheck-am installcheck install-exec-am install-exec \
install-data-am install-data install-am install uninstall-am uninstall \
all-redirect all-am all installdirs mostlyclean-generic \
distclean-generic clean-generic maintainer-clean-generic clean \
mostlyclean distclean maintainer-clean
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-compile mostlyclean-generic mostlyclean-kr
uninstall-am: uninstall-binPROGRAMS uninstall-info-am \
uninstall-pkgdataDATA
.PHONY: GTAGS all all-am check check-am clean clean-binPROGRAMS \
clean-generic distclean distclean-compile distclean-depend \
distclean-generic distclean-tags distdir dvi dvi-am info \
info-am install install-am install-binPROGRAMS install-data \
install-data-am install-exec install-exec-am install-info \
install-info-am install-man install-pkgdataDATA install-strip \
installcheck installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-compile \
mostlyclean-generic mostlyclean-kr tags uninstall uninstall-am \
uninstall-binPROGRAMS uninstall-info-am uninstall-pkgdataDATA
# Tell versions [3.59,3.63) of GNU make to not export all variables. # Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded. # Otherwise a system limit (for SysV at least) may be exceeded.
+194 -26
View File
@@ -1,5 +1,8 @@
/* -*-C-*- Note some compilers choke on comments on `#line' lines. */ /* -*- C -*- */
#line
/* A Bison parser, made from %%filename
by GNU bison %%version. */
/* Skeleton output parser for bison, /* Skeleton output parser for bison,
Copyright 1984, 1989, 1990, 2000, 2001 Free Software Foundation, Inc. Copyright 1984, 1989, 1990, 2000, 2001 Free Software Foundation, Inc.
@@ -28,6 +31,29 @@
It was written by Richard Stallman by simplifying the hairy parser It was written by Richard Stallman by simplifying the hairy parser
used when %semantic_parser is specified. */ used when %semantic_parser is specified. */
#include <stdio.h>
/* If name_prefix is specify substitute the variables and functions
names. */
#define yyparse %%prefix##parse
#define yylex %%prefix##lex
#define yyerror %%prefix##error
#define yylval %%prefix##lval
#define yychar %%prefix##char
#define yydebug %%prefix##debug
#define yynerrs %%prefix##nerrs
/* Copy the user declarations. */
#line %%input_line "%%filename"
%%prologue
#line %%line "%%skeleton"
#ifndef __cplusplus
# ifndef __STDC__
# define const
# endif
#endif
#ifndef YYSTACK_USE_ALLOCA #ifndef YYSTACK_USE_ALLOCA
# ifdef alloca # ifdef alloca
# define YYSTACK_USE_ALLOCA 1 # define YYSTACK_USE_ALLOCA 1
@@ -78,18 +104,150 @@
# define YYSTACK_ALLOC malloc # define YYSTACK_ALLOC malloc
#endif #endif
#define YYBISON 1 /* Identify Bison output. */
#define YYPURE %%pure /* Identify pure parsers. */
#ifndef YYDEBUG
# define YYDEBUG %%debug
#endif
#line %%input_line "%%filename"
#ifndef YYSTYPE
typedef %%stype YYSTYPE;
#endif
#ifndef YYLTYPE
typedef struct yyltype
{
int first_line;
int first_column;
int last_line;
int last_column;
} yyltype;
# define YYLTYPE %%ltype
#endif
#ifndef YYERROR_VERBOSE
# define YYERROR_VERBOSE %%verbose
#endif
/* Tokens. */
%%tokendef
#define YYFINAL %%final
#define YYFLAG %%flag
#define YYNTBASE %%ntbase
#define YYLAST %%last
#define YYNTOKENS %%ntokens
#define YYNNTS %%nnts
#define YYNRULES %%nrules
#define YYNSTATES %%nstates
#define YYMAXUTOK %%maxtok
/* YYTRANSLATE(YYLEX) -- Bison token number corresponding to YYLEX. */
#define YYTRANSLATE(x) ((unsigned)(x) <= %%maxtok ? yytranslate[x] : %%nsym)
/* YYTRANSLATE[YYLEX] -- Bison token number corresponding to YYLEX. */
static const char yytranslate[] =
{
%%translate
};
#if YYDEBUG
static const short yyprhs[] =
{
%%prhs
};
static const short yyrhs[] =
{
%%rhs
};
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
static const short yyrline[] =
{
%%rline
};
#endif
#if YYDEBUG || YYERROR_VERBOSE
/* YYTNME[TOKEN_NUM] -- String name of the token TOKEN_NUM. */
static const char *const yytname[] =
{
%%tname
};
#endif
/* YYTOKNUM[YYN] -- Index in YYTNAME corresponding to YYLEX. */
static const short yytoknum[] =
{
%%toknum
};
/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
static const short yyr1[] =
{
%%r1
};
/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
static const short yyr2[] =
{
%%r2
};
/* YYDEFACT[S] -- default rule to reduce with in state S when YYTABLE
doesn't specify something else to do. Zero means the default is an
error. */
static const short yydefact[] =
{
%%defact
};
static const short yydefgoto[] =
{
%%defgoto
};
static const short yypact[] =
{
%%pact
};
static const short yypgoto[] =
{
%%pgoto
};
static const short yytable[] =
{
%%table
};
static const short yycheck[] =
{
%%check
};
#define yyerrok (yyerrstatus = 0) #define yyerrok (yyerrstatus = 0)
#define yyclearin (yychar = YYEMPTY) #define yyclearin (yychar = YYEMPTY)
#define YYEMPTY -2 #define YYEMPTY -2
#define YYEOF 0 #define YYEOF 0
#define YYACCEPT goto yyacceptlab #define YYACCEPT goto yyacceptlab
#define YYABORT goto yyabortlab #define YYABORT goto yyabortlab
#define YYERROR goto yyerrlab1 #define YYERROR goto yyerrlab1
/* Like YYERROR except do call yyerror. This remains here temporarily /* Like YYERROR except do call yyerror. This remains here temporarily
to ease the transition to the new meaning of YYERROR, for GCC. to ease the transition to the new meaning of YYERROR, for GCC.
Once GCC version 2 has supplanted version 1, this can go. */ Once GCC version 2 has supplanted version 1, this can go. */
#define YYFAIL goto yyerrlab #define YYFAIL goto yyerrlab
#define YYRECOVERING() (!!yyerrstatus) #define YYRECOVERING() (!!yyerrstatus)
#define YYBACKUP(Token, Value) \ #define YYBACKUP(Token, Value) \
do \ do \
if (yychar == YYEMPTY && yylen == 1) \ if (yychar == YYEMPTY && yylen == 1) \
@@ -110,7 +268,6 @@ while (0)
#define YYTERROR 1 #define YYTERROR 1
#define YYERRCODE 256 #define YYERRCODE 256
/* YYLLOC_DEFAULT -- Compute the default location (before the actions /* YYLLOC_DEFAULT -- Compute the default location (before the actions
are run). are run).
@@ -124,6 +281,8 @@ while (0)
Current.last_column = Rhs[N].last_column; Current.last_column = Rhs[N].last_column;
#endif #endif
/* Definition of YYLSP_NEEDED. */
#define YYLSP_NEEDED %%locations_flag
/* YYLEX -- calling `yylex' with the right arguments. */ /* YYLEX -- calling `yylex' with the right arguments. */
@@ -145,7 +304,6 @@ while (0)
# define YYLEX yylex () # define YYLEX yylex ()
#endif /* !YYPURE */ #endif /* !YYPURE */
/* Enable debugging if requested. */ /* Enable debugging if requested. */
#if YYDEBUG #if YYDEBUG
# define YYDPRINTF(Args) \ # define YYDPRINTF(Args) \
@@ -164,7 +322,7 @@ int yydebug;
/* YYINITDEPTH -- initial size of the parser's stacks. */ /* YYINITDEPTH -- initial size of the parser's stacks. */
#ifndef YYINITDEPTH #ifndef YYINITDEPTH
# define YYINITDEPTH 200 # define YYINITDEPTH %%initdepth
#endif #endif
/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
@@ -174,9 +332,11 @@ int yydebug;
#endif #endif
#ifndef YYMAXDEPTH #ifndef YYMAXDEPTH
# define YYMAXDEPTH 10000 # define YYMAXDEPTH %%maxdepth
#endif #endif
/* Define __yy_memcpy. Note that the size argument /* Define __yy_memcpy. Note that the size argument
should be passed with type unsigned int, because that is what the non-GCC should be passed with type unsigned int, because that is what the non-GCC
definitions require. With GCC, __builtin_memcpy takes an arg definitions require. With GCC, __builtin_memcpy takes an arg
@@ -205,10 +365,11 @@ __yy_memcpy (char *to, const char *from, unsigned int count)
while (i-- > 0) while (i-- > 0)
*t++ = *f++; *t++ = *f++;
} }
#endif #endif
#line
#line %%line "%%skeleton"
/* The user can define YYPARSE_PARAM as the name of an argument to be passed /* The user can define YYPARSE_PARAM as the name of an argument to be passed
into yyparse. The argument should have type void *. into yyparse. The argument should have type void *.
@@ -262,7 +423,6 @@ YYLTYPE yylloc;
_YY_DECL_VARIABLES _YY_DECL_VARIABLES
#endif #endif
/* If nonreentrant, generate the variables here. */ /* If nonreentrant, generate the variables here. */
#if !YYPURE #if !YYPURE
@@ -319,7 +479,6 @@ yyparse (YYPARSE_PARAM_ARG)
int yystacksize = YYINITDEPTH; int yystacksize = YYINITDEPTH;
int yyfree_stacks = 0; int yyfree_stacks = 0;
/* The variables used to return semantic value and location from the /* The variables used to return semantic value and location from the
action routines. */ action routines. */
YYSTYPE yyval; YYSTYPE yyval;
@@ -343,12 +502,12 @@ yyparse (YYPARSE_PARAM_ARG)
so that they stay on the same level as the state stack. so that they stay on the same level as the state stack.
The wasted elements are never initialized. */ The wasted elements are never initialized. */
yyssp = yyss - 1; yyssp = yyss;
yyvsp = yyvs; yyvsp = yyvs;
#if YYLSP_NEEDED #if YYLSP_NEEDED
yylsp = yyls; yylsp = yyls;
#endif #endif
goto yysetstate;
/*------------------------------------------------------------. /*------------------------------------------------------------.
| yynewstate -- Push a new state, which is found in yystate. | | yynewstate -- Push a new state, which is found in yystate. |
@@ -357,7 +516,10 @@ yynewstate:
/* In all cases, when you get here, the value and location stacks /* In all cases, when you get here, the value and location stacks
have just been pushed. so pushing a state here evens the stacks. have just been pushed. so pushing a state here evens the stacks.
*/ */
*++yyssp = yystate; yyssp++;
yysetstate:
*yyssp = yystate;
if (yyssp >= yyss + yystacksize - 1) if (yyssp >= yyss + yystacksize - 1)
{ {
@@ -413,7 +575,7 @@ yynewstate:
yystacksize *= 2; yystacksize *= 2;
if (yystacksize > YYMAXDEPTH) if (yystacksize > YYMAXDEPTH)
yystacksize = YYMAXDEPTH; yystacksize = YYMAXDEPTH;
# ifndef YYSTACK_USE_ALLOCA # if !YYSTACK_USE_ALLOCA
yyfree_stacks = 1; yyfree_stacks = 1;
# endif # endif
yyss = (short *) YYSTACK_ALLOC (yystacksize * sizeof (*yyssp)); yyss = (short *) YYSTACK_ALLOC (yystacksize * sizeof (*yyssp));
@@ -445,7 +607,6 @@ yynewstate:
goto yybackup; goto yybackup;
/*-----------. /*-----------.
| yybackup. | | yybackup. |
`-----------*/ `-----------*/
@@ -472,12 +633,12 @@ yybackup:
yychar = YYLEX; yychar = YYLEX;
} }
/* Convert token to internal form (in yychar1) for indexing tables with */ /* Convert token to internal form (in yychar1) for indexing tables with. */
if (yychar <= 0) /* This means end of input. */ if (yychar <= 0) /* This means end of input. */
{ {
yychar1 = 0; yychar1 = 0;
yychar = YYEOF; /* Don't call YYLEX any more */ yychar = YYEOF; /* Don't call YYLEX any more. */
YYDPRINTF ((stderr, "Now at end of input.\n")); YYDPRINTF ((stderr, "Now at end of input.\n"));
} }
@@ -598,8 +759,11 @@ yyreduce:
fprintf (stderr, " -> %s\n", yytname[yyr1[yyn]]); fprintf (stderr, " -> %s\n", yytname[yyr1[yyn]]);
} }
#endif #endif
%% actions /* The action file replaces this line. */ switch (yyn)
#line {
%%action
}
#line %%line "%%skeleton"
yyvsp -= yylen; yyvsp -= yylen;
yyssp -= yylen; yyssp -= yylen;
@@ -647,7 +811,7 @@ yyerrlab:
{ {
++yynerrs; ++yynerrs;
#ifdef YYERROR_VERBOSE #if YYERROR_VERBOSE
yyn = yypact[yystate]; yyn = yypact[yystate];
if (yyn > YYFLAG && yyn < YYLAST) if (yyn > YYFLAG && yyn < YYLAST)
@@ -697,16 +861,16 @@ yyerrlab:
goto yyerrlab1; goto yyerrlab1;
/*--------------------------------------------------. /*----------------------------------------------------.
| yyerrlab1 -- error raised explicitly by an action | | yyerrlab1 -- error raised explicitly by an action. |
`--------------------------------------------------*/ `----------------------------------------------------*/
yyerrlab1: yyerrlab1:
if (yyerrstatus == 3) if (yyerrstatus == 3)
{ {
/* If just tried and failed to reuse lookahead token after an /* If just tried and failed to reuse lookahead token after an
error, discard it. */ error, discard it. */
/* return failure if at end of input */ /* Return failure if at end of input. */
if (yychar == YYEOF) if (yychar == YYEOF)
YYABORT; YYABORT;
YYDPRINTF ((stderr, "Discarding token %d (%s).\n", YYDPRINTF ((stderr, "Discarding token %d (%s).\n",
@@ -717,7 +881,7 @@ yyerrlab1:
/* Else will try to reuse lookahead token after shifting the error /* Else will try to reuse lookahead token after shifting the error
token. */ token. */
yyerrstatus = 3; /* Each real token shifted decrements this */ yyerrstatus = 3; /* Each real token shifted decrements this. */
goto yyerrhandle; goto yyerrhandle;
@@ -740,7 +904,7 @@ yyerrdefault:
/*---------------------------------------------------------------. /*---------------------------------------------------------------.
| yyerrpop -- pop the current state because it cannot handle the | | yyerrpop -- pop the current state because it cannot handle the |
| error token | | error token. |
`---------------------------------------------------------------*/ `---------------------------------------------------------------*/
yyerrpop: yyerrpop:
if (yyssp == yyss) if (yyssp == yyss)
@@ -828,3 +992,7 @@ yyabortlab:
} }
return 1; return 1;
} }
#line %%input_line "%%filename"
%%epilogue
+4 -31
View File
@@ -24,6 +24,8 @@
#include "files.h" #include "files.h"
#include "complain.h" #include "complain.h"
#include "getargs.h" #include "getargs.h"
#include "xalloc.h"
#include "options.h"
int debug_flag = 0; int debug_flag = 0;
int defines_flag = 0; int defines_flag = 0;
@@ -39,37 +41,6 @@ int graph_flag = 0;
const char *skeleton = NULL; const char *skeleton = NULL;
extern char *program_name; extern char *program_name;
const char *shortopts = "yvgdhrltknVo:b:p:S:";
static struct option longopts[] =
{
/* Operation modes. */
{"help", no_argument, 0, 'h'},
{"version", no_argument, 0, 'V'},
{"yacc", no_argument, 0, 'y'},
{"fixed-output-files",no_argument, 0, 'y'},
/* Parser. */
{"skeleton", required_argument, 0, 'S'},
{"debug", no_argument, 0, 'd'},
{"locations", no_argument, &locations_flag, 1},
/* was 'a'; apparently unused -wjh */
{"name-prefix", required_argument, 0, 'p'},
{"no-lines", no_argument, 0, 'l'},
{"no-parser", no_argument, 0, 'n'},
{"raw", no_argument, 0, 'r'},
{"token-table", no_argument, 0, 'k'},
/* Output. */
{"defines", no_argument, 0, 'd'},
{"verbose", no_argument, 0, 'v'},
{"file-prefix", required_argument, 0, 'b'},
{"output-file", required_argument, 0, 'o'},
{"graph", no_argument, 0, 'g'},
/* Hidden. */
{"statistics", no_argument, &statistics_flag, 1},
{0, 0, 0, 0}
};
/*---------------------------. /*---------------------------.
| Display the help message. | | Display the help message. |
@@ -161,6 +132,7 @@ getargs (int argc, char *argv[])
{ {
int c; int c;
create_long_option_table ();
while ((c = getopt_long (argc, argv, shortopts, longopts, NULL)) != EOF) while ((c = getopt_long (argc, argv, shortopts, longopts, NULL)) != EOF)
switch (c) switch (c)
{ {
@@ -234,6 +206,7 @@ getargs (int argc, char *argv[])
exit (1); exit (1);
} }
XFREE (longopts);
if (optind == argc) if (optind == argc)
{ {
fprintf (stderr, _("%s: no grammar file given\n"), program_name); fprintf (stderr, _("%s: no grammar file given\n"), program_name);
+23 -56
View File
@@ -23,6 +23,7 @@
#include "files.h" #include "files.h"
#include "getopt.h" /* for optarg */ #include "getopt.h" /* for optarg */
#include "symtab.h" #include "symtab.h"
#include "options.h"
#include "lex.h" #include "lex.h"
#include "xalloc.h" #include "xalloc.h"
#include "complain.h" #include "complain.h"
@@ -509,58 +510,23 @@ lex (void)
} }
} }
/* the following table dictates the action taken for the various % /* This function is a strcmp, which doesn't differentiate `-' and `_'
directives. A set_flag value causes the named flag to be set. A chars. */
retval action returns the code. */
struct percent_table_struct
{
const char *name;
void *set_flag;
int retval;
};
struct percent_table_struct percent_table[] = static int
option_strcmp (const char *left, const char *right)
{ {
{ "token", NULL, tok_token }, const unsigned char *l, *r;
{ "term", NULL, tok_token }, int c;
{ "nterm", NULL, tok_nterm },
{ "type", NULL, tok_type },
{ "guard", NULL, tok_guard },
{ "union", NULL, tok_union },
{ "expect", NULL, tok_expect },
{ "thong", NULL, tok_thong },
{ "start", NULL, tok_start },
{ "left", NULL, tok_left },
{ "right", NULL, tok_right },
{ "nonassoc", NULL, tok_nonassoc },
{ "binary", NULL, tok_nonassoc },
{ "prec", NULL, tok_prec },
{ "locations", &locations_flag, tok_noop }, /* -l */
{ "no_lines", &no_lines_flag, tok_noop }, /* -l */
{ "raw", NULL, tok_obsolete }, /* -r */
{ "token_table", &token_table_flag, tok_noop }, /* -k */
{ "yacc", &yacc_flag, tok_noop }, /* -y */
{ "fixed_output_files",&yacc_flag, tok_noop }, /* -y */
{ "defines", &defines_flag, tok_noop }, /* -d */
{ "no_parser", &no_parser_flag, tok_noop }, /* -n */
#if 0
/* For the time being, this is not enabled yet, while it's possible
though, since we use obstacks. The only risk is with semantic
parsers which will output an `include' of an output file: be sure
that the naem included is indeed the name of the output file. */
{ "output_file", &spec_outfile, tok_setopt }, /* -o */
{ "file_prefix", &spec_file_prefix, tok_setopt }, /* -b */
{ "name_prefix", &spec_name_prefix, tok_setopt }, /* -p */
#endif
{ "header_extension", NULL, tok_hdrext},
{ "source_extension", NULL, tok_srcext},
{ "verbose", &verbose_flag, tok_noop }, /* -v */
{ "debug", &debug_flag, tok_noop }, /* -t */
{ "semantic_parser", &semantic_parser, tok_noop },
{ "pure_parser", &pure_parser, tok_noop },
{ NULL, NULL, tok_illegal} assert(left != NULL && right != NULL);
}; l = (const unsigned char *)left;
r = (const unsigned char *)right;
while (((c = *l - *r++) == 0 && *l != '\0')
|| ((*l == '-' || *l == '_') && (*r == '_' || *r == '-')))
l++;
return c;
}
/* Parse a token which starts with %. /* Parse a token which starts with %.
Assumes the % has already been read and discarded. */ Assumes the % has already been read and discarded. */
@@ -569,7 +535,7 @@ int
parse_percent_token (void) parse_percent_token (void)
{ {
int c; int c;
struct percent_table_struct *tx; const struct option_table_struct *tx;
c = getc (finput); c = getc (finput);
@@ -603,8 +569,8 @@ parse_percent_token (void)
obstack_1grow (&token_obstack, '%'); obstack_1grow (&token_obstack, '%');
while (isalpha (c) || c == '_' || c == '-') while (isalpha (c) || c == '_' || c == '-')
{ {
if (c == '-') if (c == '_')
c = '_'; c = '-';
obstack_1grow (&token_obstack, c); obstack_1grow (&token_obstack, c);
c = getc (finput); c = getc (finput);
} }
@@ -614,8 +580,9 @@ parse_percent_token (void)
token_buffer = obstack_finish (&token_obstack); token_buffer = obstack_finish (&token_obstack);
/* table lookup % directive */ /* table lookup % directive */
for (tx = percent_table; tx->name; tx++) for (tx = option_table; tx->name; tx++)
if (strcmp (token_buffer + 1, tx->name) == 0) if ((tx->access == opt_percent || tx->access == opt_both)
&& option_strcmp (token_buffer + 1, tx->name) == 0)
break; break;
if (tx->set_flag) if (tx->set_flag)
@@ -624,7 +591,7 @@ parse_percent_token (void)
return tok_noop; return tok_noop;
} }
switch (tx->retval) switch (tx->ret_val)
{ {
case tok_setopt: case tok_setopt:
*((char **) (tx->set_flag)) = optarg; *((char **) (tx->set_flag)) = optarg;
@@ -636,5 +603,5 @@ parse_percent_token (void)
break; break;
} }
return tx->retval; return tx->ret_val;
} }
+2
View File
@@ -49,6 +49,8 @@ typedef enum token_e
tok_thong, tok_thong,
tok_hdrext, tok_hdrext,
tok_srcext, tok_srcext,
tok_define,
tok_skel,
tok_noop, tok_noop,
tok_setopt, tok_setopt,
tok_illegal, tok_illegal,
+2
View File
@@ -34,6 +34,7 @@
#include "LR0.h" #include "LR0.h"
#include "conflicts.h" #include "conflicts.h"
#include "print_graph.h" #include "print_graph.h"
#include "muscle_tab.h"
/* The name this program was run with, for messages. */ /* The name this program was run with, for messages. */
char *program_name; char *program_name;
@@ -51,6 +52,7 @@ main (int argc, char *argv[])
lineno = 0; lineno = 0;
getargs (argc, argv); getargs (argc, argv);
muscle_init ();
open_files (); open_files ();
/* Read the input. Copy some parts of it to FGUARD, FACTION, FTABLE /* Read the input. Copy some parts of it to FGUARD, FACTION, FTABLE
+126
View File
@@ -0,0 +1,126 @@
/* Macro table manager for Bison,
Copyright 1984, 1989, 2000 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
Bison is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
Bison is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Bison; see the file COPYING. If not, write to
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#include <string.h>
#include "xalloc.h"
#include "system.h"
#include "hash.h"
#include "files.h"
#include "muscle_tab.h"
#include "getargs.h"
struct hash_table muscle_table;
static unsigned long
mhash1 (const void *item)
{
return_STRING_HASH_1 (((muscle_entry_t *) item)->key);
}
static unsigned long
mhash2 (const void *item)
{
return_STRING_HASH_2 (((muscle_entry_t *) item)->key);
}
static int
mcmp (const void *x, const void *y)
{
return strcmp (((muscle_entry_t*) x)->key, ((muscle_entry_t *) y)->key);
}
void
muscle_init (void)
{
hash_init (&muscle_table, MTABSIZE, &mhash1, &mhash2, &mcmp);
/* Version and input file. */
muscle_insert ("version", VERSION);
muscle_insert ("filename", infile);
/* Skeleton use. */
muscle_insert ("skeleton", skeleton);
/* Types. */
muscle_insert ("stype", "int");
muscle_insert ("ltype", "yyltype");
/* Tokens. */
muscle_insert ("tokendef", "");
/* Tables. */
muscle_insert ("rhs", "0");
muscle_insert ("pact", "0");
muscle_insert ("prhs", "0");
muscle_insert ("stos", "0");
muscle_insert ("check", "0");
muscle_insert ("pgoto", "0");
muscle_insert ("table", "0");
muscle_insert ("tname", "0");
muscle_insert ("defact", "0");
muscle_insert ("toknum", "0");
muscle_insert ("defgoto", "0");
muscle_insert ("translate", "0");
/* Various macros. */
muscle_insert ("flag", "0");
muscle_insert ("last", "0");
muscle_insert ("pure", "0");
muscle_insert ("nsym", "0");
muscle_insert ("debug", "0");
muscle_insert ("final", "0");
muscle_insert ("maxtok", "0");
muscle_insert ("ntbase", "0");
muscle_insert ("verbose", "0");
muscle_insert ("prefix", "yy");
/* Default #line formatting. */
muscle_insert ("linef", "#line %d %s\n");
/* No parser macros. */
muscle_insert ("nnts", "0");
muscle_insert ("nrules", "0");
muscle_insert ("nstates", "0");
muscle_insert ("ntokens", "0");
/* Stack parameters. */
muscle_insert ("maxdepth", "10000");
muscle_insert ("initdepth", "200");
/* C++ macros. */
muscle_insert ("name", "Parser");
}
void
muscle_insert (const char *key, const char *value)
{
muscle_entry_t *pair = XMALLOC (muscle_entry_t, 1);
pair->key = key;
pair->value = value;
hash_insert (&muscle_table, pair);
}
const char*
muscle_find (const char *key)
{
muscle_entry_t pair = { key, 0 };
muscle_entry_t *result = hash_find_item (&muscle_table, &pair);
return result ? result->value : 0;
}
+36
View File
@@ -0,0 +1,36 @@
/* Definitions for macrotab.c and callers, part of bison,
Copyright 2001 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
Bison is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
Bison is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Bison; see the file COPYING. If not, write to
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#ifndef MUSCLE_TAB_H_
# define MUSCLE_TAB_H
# define MTABSIZE 101
typedef struct muscle_entry_s
{
const char *key;
const char *value;
} muscle_entry_t;
void muscle_init PARAMS ((void));
void muscle_insert PARAMS ((const char *key, const char *value));
const char *muscle_find PARAMS ((const char *key));
#endif /* not MUSCLE_TAB_H_ */
+154
View File
@@ -0,0 +1,154 @@
/* Concentrate all options use in bison,
Copyright 2001 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
Bison is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
Bison is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Bison; see the file COPYING. If not, write to
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#include <stdio.h>
#include "xalloc.h"
#include "system.h"
#include "getopt.h"
#include "getargs.h"
#include "gram.h"
#include "symtab.h"
#include "lex.h"
#include "options.h"
/* Shorts options. */
const char *shortopts = "yvgdhrltknVo:b:p:S:";
/* Long options. */
struct option *longopts = NULL;
struct percent_table_struct *percent_table = NULL;
const struct option_table_struct option_table[] =
{
/*
* Command line.
*/
/* Operation modes. */
{opt_cmd_line, "help", no_argument, 0, 0, 'h'},
{opt_cmd_line, "version", no_argument, 0, 0, 'V'},
/* Parser. */
/* was 'a'; apparently unused -wjh */
{opt_cmd_line, "name-prefix", required_argument, 0, 0, 'p'},
/* Output. */
{opt_cmd_line, "file-prefix", required_argument, 0, 0, 'b'},
{opt_cmd_line, "output-file", required_argument, 0, 0, 'o'},
{opt_cmd_line, "graph", no_argument, 0, 0, 'g'},
/* Hidden. */
{opt_cmd_line, "statistics", no_argument, &statistics_flag, 0, 1},
/*
* Percent declarations.
*/
{opt_percent, "token", 0, NULL, tok_token, 0},
{opt_percent, "term", 0, NULL, tok_token, 0},
{opt_percent, "nterm", 0, NULL, tok_nterm, 0},
{opt_percent, "type", 0, NULL, tok_type, 0},
{opt_percent, "guard", 0, NULL, tok_guard, 0},
{opt_percent, "union", 0, NULL, tok_union, 0},
{opt_percent, "expect", 0, NULL, tok_expect, 0},
{opt_percent, "thong", 0, NULL, tok_thong, 0},
{opt_percent, "start", 0, NULL, tok_start, 0},
{opt_percent, "left", 0, NULL, tok_left, 0},
{opt_percent, "right", 0, NULL, tok_right, 0},
{opt_percent, "nonassoc", 0, NULL, tok_nonassoc, 0},
{opt_percent, "binary", 0, NULL, tok_nonassoc, 0},
{opt_percent, "prec", 0, NULL, tok_prec, 0},
#if 0
/* For the time being, this is not enabled yet, while it's possible
though, since we use obstacks. The only risk is with semantic
parsers which will output an `include' of an output file: be sure
that the naem included is indeed the name of the output file. */
/* FIXME Should we activate this options ? */
{opt_both, "output-file", required_argument, &spec_outfile, tok_setopt, 'o'},
{opt_both, "file-prefix", required_argument,&spec_file_prefix,tok_setopt,'b'},
{opt_both, "name-prefix", required_argument,&spec_name_prefix,tok_setopt,'p'},
#endif
{opt_percent, "header-extension", 0, NULL, tok_hdrext, 0},
{opt_percent, "source-extension", 0, NULL, tok_srcext, 0},
{opt_percent, "define", 0, NULL, tok_define, 0},
{opt_percent, "semantic-parser", 0, &semantic_parser, tok_noop, 0},
{opt_percent, "pure-parser", 0, &pure_parser, tok_noop, 0},
/*
* Percent and command line declarations.
*/
/* FIXME Usually option use `-' to separe words on command line
and `_' for percent option. But here the separator are always
the same, the char `-'. */
/* Output. */
{opt_both, "defines", no_argument, &defines_flag, tok_noop, 'd'},
{opt_both, "verbose", no_argument, &verbose_flag, tok_noop, 'v'},
/* Operation modes. */
{opt_both, "fixed-output-files", no_argument, &yacc_flag, tok_noop, 'y'},
{opt_both, "yacc", no_argument, &yacc_flag, tok_noop, 'y'},
/* Parser. */
{opt_both, "debug", no_argument, &debug_flag, tok_noop, 'd'},
{opt_both, "locations", no_argument, &locations_flag, tok_noop, 1},
{opt_both, "no-lines", no_argument, &no_lines_flag, tok_noop, 'l'},
{opt_both, "no-parser", no_argument, &no_parser_flag, tok_noop, 'n'},
{opt_both, "raw", no_argument, 0, tok_obsolete, 'r'},
{opt_both, "skeleton", required_argument, 0, tok_skel, 'S'},
{opt_both, "token-table", no_argument, &token_table_flag, tok_noop, 'k'},
{0, 0, 0, 0, 0, 0}
};
/*--------------------------------------------------------.
| Create the longoptions structure from the option_table, |
| for the getopt file. |
`--------------------------------------------------------*/
void
create_long_option_table ()
{
int i = 0;
int j = 0;
int number_options;
for (number_options = 0; option_table[i].name; i++)
if (option_table[i].access == opt_cmd_line
|| option_table[i].access == opt_both)
++number_options;
longopts = XMALLOC (struct option, number_options + 1);
for (i = 0; option_table[i].name; i++)
if (option_table[i].access == opt_cmd_line
|| option_table[i].access == opt_both)
{
/* Copy the struct information in the longoptions. */
longopts[j].name = option_table[i].name;
longopts[j].has_arg = option_table[i].has_arg;
longopts[j].flag = option_table[i].set_flag;
longopts[j++].val = option_table[i].val;
}
longopts[number_options].name = NULL;
longopts[number_options].has_arg = 0;
longopts[number_options].flag = NULL;
longopts[number_options].val = 0;
}
+62
View File
@@ -0,0 +1,62 @@
/* Concentrate all options use in bison,
Copyright 2001 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
Bison is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
Bison is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Bison; see the file COPYING. If not, write to
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#ifndef OPTIONS_H_
# define OPTIONS_H_
/* opt_access_t and struct option_table_struct need to be declare
here, for the parse_percent_token function in lex.c. */
/* Option accessibility. */
typedef enum opt_access_e
{
opt_cmd_line = 1,
opt_percent,
opt_both
} opt_access_t;
/* This is the general struct, which contains user's options from
command line or in grammar with percent flag. */
struct option_table_struct
{
/* Set the accessibility. */
opt_access_t access;
/* This name is used for long option et percent directives. */
const char *name;
/* Use for command line. */
int has_arg;
/* A set_flag value causes the named flag to be set. */
int *set_flag;
/* A retval action returns the code. */
int ret_val;
/* The short option value, frequently a letter. */
int val;
};
extern const char *shortopts;
extern struct option *longopts;
/* Table which contain all options. */
extern const struct option_table_struct option_table[];
/* Set the longopts variable from option_table. */
void create_long_option_table PARAMS (());
#endif /* !OPTIONS_H_ */
+193 -434
View File
@@ -103,11 +103,10 @@
#include "lalr.h" #include "lalr.h"
#include "reader.h" #include "reader.h"
#include "conflicts.h" #include "conflicts.h"
#include "muscle_tab.h"
extern void berror PARAMS((const char *)); extern void berror PARAMS((const char *));
static int nvectors; static int nvectors;
static int nentries; static int nentries;
static short **froms; static short **froms;
@@ -124,210 +123,53 @@ static short *check;
static int lowzero; static int lowzero;
static int high; static int high;
struct obstack muscle_obstack;
struct obstack output_obstack;
/* FIXME. */
static inline void static inline void
output_short_or_char_table (struct obstack *oout, output_table_data (struct obstack *oout,
const char *comment, short *table_data,
const char *type, short first,
const char *table_name, short begin,
short *short_table, short end)
short first_value,
short begin, short end)
{ {
int i, j; int i;
int j = 1;
if (comment) obstack_fgrow1 (oout, "%6d", first);
obstack_fgrow1 (oout, "/* %s. */\n", comment); for (i = begin; i < end; ++i)
obstack_fgrow3 (oout, "static const %s %s[] =\n{\n %6d",
type, table_name, first_value);
j = 1;
for (i = begin; i < end; i++)
{ {
obstack_1grow (oout, ','); obstack_1grow (oout, ',');
if (j >= 10) if (j >= 10)
{ {
obstack_sgrow (oout, "\n "); obstack_sgrow (oout, "\n ");
j = 1; j = 1;
} }
else else
{ ++j;
j++; obstack_fgrow1 (oout, "%6d", table_data[i]);
} }
obstack_1grow (oout, 0);
obstack_fgrow1 (oout, "%6d", short_table[i]);
}
obstack_sgrow (oout, "\n};\n");
} }
static inline void
output_short_table (struct obstack *oout,
const char *comment,
const char *table_name,
short *short_table,
short first_value,
short begin, short end)
{
output_short_or_char_table (oout, comment, "short", table_name, short_table,
first_value, begin, end);
}
/*--------------------------------------------------------------.
| output_headers -- Output constant strings to the beginning of |
| certain files. |
`--------------------------------------------------------------*/
/* Don't put the `%s' insides quotes, since it quotearg puts them. */
#define GUARDSTR \
"\n\
#include %s\n\
extern int yyerror;\n\
extern int yycost;\n\
extern char * yymsg;\n\
extern YYSTYPE yyval;\n\
\n\
yyguard(n, yyvsp, yylsp)\n\
register int n;\n\
register YYSTYPE *yyvsp;\n\
register YYLTYPE *yylsp;\n\
{\n\
yyerror = 0;\n\
yycost = 0;\n\
yymsg = 0;\n\
switch (n)\n\
{"
#define ACTSTR \
"\n\
#include %s\n\
extern YYSTYPE yyval;\n\
extern int yychar;\n\
\n\
yyaction(n, yyvsp, yylsp)\n\
register int n;\n\
register YYSTYPE *yyvsp;\n\
register YYLTYPE *yylsp;\n\
{\n\
switch (n)\n\
{"
#define ACTSTR_SIMPLE "\n switch (yyn) {\n"
void
output_headers (void)
{
char *attrsfile_quoted = 0;
if (semantic_parser)
{
/* FIXME: This is *buggy*. ATTRSFILE is not computed yet, since
we are waiting for the full input file to have been read to
be sure of the output file name. So basically, here, a SEGV
is guaranteed. OTOH, currently semantic parsers are not
supported. */
attrsfile_quoted = quotearg_style (c_quoting_style, attrsfile);
obstack_fgrow1 (&guard_obstack, GUARDSTR, attrsfile_quoted);
}
if (no_parser_flag)
return;
if (semantic_parser)
obstack_fgrow1 (&action_obstack, ACTSTR, attrsfile_quoted);
else
obstack_sgrow (&action_obstack, ACTSTR_SIMPLE);
/* Rename certain symbols if -p was specified. */
if (spec_name_prefix)
{
obstack_fgrow1 (&table_obstack,
"#define yyparse %sparse\n", spec_name_prefix);
obstack_fgrow1 (&table_obstack,
"#define yylex %slex\n", spec_name_prefix);
obstack_fgrow1 (&table_obstack,
"#define yyerror %serror\n", spec_name_prefix);
obstack_fgrow1 (&table_obstack,
"#define yylval %slval\n", spec_name_prefix);
obstack_fgrow1 (&table_obstack,
"#define yychar %schar\n", spec_name_prefix);
obstack_fgrow1 (&table_obstack,
"#define yydebug %sdebug\n", spec_name_prefix);
obstack_fgrow1 (&table_obstack,
"#define yynerrs %snerrs\n", spec_name_prefix);
}
}
/*-------------------------------------------------------.
| Output constant strings to the ends of certain files. |
`-------------------------------------------------------*/
void
output_trailers (void)
{
if (semantic_parser)
obstack_sgrow (&guard_obstack, "\n }\n}\n");
obstack_1grow (&action_obstack, '\n');
if (no_parser_flag)
return;
if (semantic_parser)
obstack_sgrow (&action_obstack, " }\n");
obstack_sgrow (&action_obstack, "}\n");
}
static void static void
output_token_translations (void) output_token_translations (void)
{ {
obstack_sgrow (&table_obstack, "\ output_table_data (&output_obstack, token_translations,
\n\
/* YYTRANSLATE(YYLEX) -- Bison token number corresponding to YYLEX. */\n");
if (translations)
{
obstack_fgrow2 (&table_obstack,
"#define YYTRANSLATE(x) ((unsigned)(x) <= %d ? yytranslate[x] : %d)\
\n\
\n",
max_user_token_number, nsyms);
output_short_or_char_table (&table_obstack,
"YYTRANSLATE[YYLEX] -- Bison token number corresponding to YYLEX",
ntokens < 127 ? "char" : "short",
"yytranslate", token_translations,
0, 1, max_user_token_number + 1); 0, 1, max_user_token_number + 1);
} muscle_insert ("translate", obstack_finish (&output_obstack));
else
{
obstack_sgrow (&table_obstack,
"\n#define YYTRANSLATE(x) (x)\n");
}
} }
static void static void
output_gram (void) output_gram (void)
{ {
/* With the ordinary parser, output_table_data (&output_obstack, rrhs,
yyprhs and yyrhs are needed only for yydebug. */
/* With the no_parser option, all tables are generated */
if (!semantic_parser && !no_parser_flag)
obstack_sgrow (&table_obstack, "\n#if YYDEBUG != 0\n");
output_short_table (&table_obstack, NULL, "yyprhs", rrhs,
0, 1, nrules + 1); 0, 1, nrules + 1);
muscle_insert ("prhs", obstack_finish (&output_obstack));
{ {
size_t yyrhs_size = 1; size_t yyrhs_size = 1;
@@ -341,21 +183,26 @@ output_gram (void)
for (sp = ritem + 1, i = 1; *sp; ++sp, ++i) for (sp = ritem + 1, i = 1; *sp; ++sp, ++i)
yyrhs[i] = *sp > 0 ? *sp : 0; yyrhs[i] = *sp > 0 ? *sp : 0;
output_short_table (&table_obstack, NULL, "yyrhs", yyrhs, output_table_data (&output_obstack, yyrhs,
ritem[0], 1, yyrhs_size); ritem[0], 1, yyrhs_size);
muscle_insert ("rhs", obstack_finish (&output_obstack));
XFREE (yyrhs); XFREE (yyrhs);
} }
#if 0
if (!semantic_parser && !no_parser_flag) if (!semantic_parser && !no_parser_flag)
obstack_sgrow (&table_obstack, "\n#endif\n"); obstack_sgrow (&table_obstack, "\n#endif\n");
#endif
} }
static void static void
output_stos (void) output_stos (void)
{ {
output_short_table (&table_obstack, NULL, "yystos", accessing_symbol, output_table_data (&output_obstack, accessing_symbol,
0, 1, nstates); 0, 1, nstates);
muscle_insert ("stos", obstack_finish (&output_obstack));
} }
@@ -366,34 +213,9 @@ output_rule_data (void)
int j; int j;
short *short_tab = NULL; short *short_tab = NULL;
obstack_sgrow (&table_obstack, "\n\ output_table_data (&output_obstack, rline,
#if YYDEBUG != 0\n");
output_short_table (&table_obstack,
"YYRLINE[YYN] -- source line where rule number YYN was defined",
"yyrline", rline,
0, 1, nrules + 1); 0, 1, nrules + 1);
muscle_insert ("rline", obstack_finish (&output_obstack));
obstack_sgrow (&table_obstack, "#endif\n\n");
if (token_table_flag || no_parser_flag)
{
obstack_fgrow1 (&table_obstack, "#define YYNTOKENS %d\n", ntokens);
obstack_fgrow1 (&table_obstack, "#define YYNNTS %d\n", nvars);
obstack_fgrow1 (&table_obstack, "#define YYNRULES %d\n", nrules);
obstack_fgrow1 (&table_obstack, "#define YYNSTATES %d\n", nstates);
obstack_fgrow1 (&table_obstack, "#define YYMAXUTOK %d\n\n",
max_user_token_number);
}
/* Output the table of symbol names. */
if (!token_table_flag && !no_parser_flag)
obstack_sgrow (&table_obstack,
"\n#if YYDEBUG != 0 || defined YYERROR_VERBOSE\n\n");
obstack_sgrow (&table_obstack, "\
/* YYTNAME[TOKEN_NUM] -- String name of the token TOKEN_NUM. */\n");
obstack_sgrow (&table_obstack,
"static const char *const yytname[] =\n{\n ");
j = 0; j = 0;
for (i = 0; i < nsyms; i++) for (i = 0; i < nsyms; i++)
@@ -416,80 +238,61 @@ output_rule_data (void)
if (j + strsize > 75) if (j + strsize > 75)
{ {
obstack_sgrow (&table_obstack, "\n "); obstack_sgrow (&output_obstack, "\n ");
j = 2; j = 2;
} }
obstack_1grow (&table_obstack, '\"'); obstack_1grow (&output_obstack, '\"');
for (p = tags[i]; p && *p; p++) for (p = tags[i]; p && *p; p++)
{ {
if (*p == '"' || *p == '\\') if (*p == '"' || *p == '\\')
obstack_fgrow1 (&table_obstack, "\\%c", *p); obstack_fgrow1 (&output_obstack, "\\%c", *p);
else if (*p == '\n') else if (*p == '\n')
obstack_sgrow (&table_obstack, "\\n"); obstack_sgrow (&output_obstack, "\\n");
else if (*p == '\t') else if (*p == '\t')
obstack_sgrow (&table_obstack, "\\t"); obstack_sgrow (&output_obstack, "\\t");
else if (*p == '\b') else if (*p == '\b')
obstack_sgrow (&table_obstack, "\\b"); obstack_sgrow (&output_obstack, "\\b");
else if (*p < 040 || *p >= 0177) else if (*p < 040 || *p >= 0177)
obstack_fgrow1 (&table_obstack, "\\%03o", *p); obstack_fgrow1 (&output_obstack, "\\%03o", *p);
else else
obstack_1grow (&table_obstack, *p); obstack_1grow (&output_obstack, *p);
} }
obstack_sgrow (&table_obstack, "\", "); obstack_sgrow (&output_obstack, "\", ");
j += strsize; j += strsize;
} }
/* add a NULL entry to list of tokens */ /* add a NULL entry to list of tokens */
obstack_sgrow (&table_obstack, "NULL\n};\n"); obstack_sgrow (&output_obstack, "NULL");
if (!token_table_flag && !no_parser_flag) /* Finish table and store. */
obstack_sgrow (&table_obstack, "#endif\n\n"); obstack_1grow (&output_obstack, 0);
muscle_insert ("tname", obstack_finish (&output_obstack));
/* Output YYTOKNUM. */ /* Output YYTOKNUM. */
if (token_table_flag) output_table_data (&output_obstack, user_toknums,
{
output_short_table (&table_obstack,
"YYTOKNUM[YYLEX] -- Index in YYTNAME corresponding to YYLEX",
"yytoknum", user_toknums,
0, 1, ntokens + 1); 0, 1, ntokens + 1);
} muscle_insert ("toknum", obstack_finish (&output_obstack));
/* Output YYR1. */ /* Output YYR1. */
output_short_table (&table_obstack, output_table_data (&output_obstack, rlhs,
"YYR1[YYN] -- Symbol number of symbol that rule YYN derives",
"yyr1", rlhs,
0, 1, nrules + 1); 0, 1, nrules + 1);
muscle_insert ("r1", obstack_finish (&output_obstack));
XFREE (rlhs + 1); XFREE (rlhs + 1);
obstack_1grow (&table_obstack, '\n');
/* Output YYR2. */ /* Output YYR2. */
short_tab = XMALLOC (short, nrules + 1); short_tab = XMALLOC (short, nrules + 1);
for (i = 1; i < nrules; i++) for (i = 1; i < nrules; i++)
short_tab[i] = rrhs[i + 1] - rrhs[i] - 1; short_tab[i] = rrhs[i + 1] - rrhs[i] - 1;
short_tab[nrules] = nitems - rrhs[nrules] - 1; short_tab[nrules] = nitems - rrhs[nrules] - 1;
output_short_table (&table_obstack, output_table_data (&output_obstack, short_tab,
"YYR2[YYN] -- Number of symbols composing right hand side of rule YYN",
"yyr2", short_tab,
0, 1, nrules + 1); 0, 1, nrules + 1);
obstack_1grow (&table_obstack, '\n'); muscle_insert ("r2", obstack_finish (&output_obstack));
XFREE (short_tab); XFREE (short_tab);
XFREE (rrhs + 1); XFREE (rrhs + 1);
} }
static void
output_defines (void)
{
obstack_fgrow1 (&table_obstack, "\n\n#define\tYYFINAL\t\t%d\n", final_state);
obstack_fgrow1 (&table_obstack, "#define\tYYFLAG\t\t%d\n", MINSHORT);
obstack_fgrow1 (&table_obstack, "#define\tYYNTBASE\t%d\n", ntokens);
}
/*------------------------------------------------------------------. /*------------------------------------------------------------------.
| Decide what to do for each type of token if seen as the lookahead | | Decide what to do for each type of token if seen as the lookahead |
| token in specified state. The value returned is used as the | | token in specified state. The value returned is used as the |
@@ -730,15 +533,12 @@ token_actions (void)
yydefact[i] = action_row (i); yydefact[i] = action_row (i);
save_row (i); save_row (i);
} }
XFREE (actrow);
output_short_table (&table_obstack, output_table_data (&output_obstack, yydefact,
"YYDEFACT[S] -- default rule to reduce with in state S when YYTABLE\n\
doesn't specify something else to do. Zero means the default is an\n\
error",
"yydefact", yydefact,
yydefact[0], 1, nstates); yydefact[0], 1, nstates);
obstack_1grow (&table_obstack, '\n'); muscle_insert ("defact", obstack_finish (&output_obstack));
XFREE (actrow);
XFREE (yydefact); XFREE (yydefact);
} }
@@ -865,10 +665,9 @@ static void
goto_actions (void) goto_actions (void)
{ {
int i; int i;
short *yydefgoto = XMALLOC (short, nsyms - ntokens); short *yydefgoto = XMALLOC (short, nsyms - ntokens);
state_count = XCALLOC (short, nstates);
state_count = XCALLOC (short, nstates);
for (i = ntokens; i < nsyms; ++i) for (i = ntokens; i < nsyms; ++i)
{ {
int default_state = default_goto (i); int default_state = default_goto (i);
@@ -876,8 +675,9 @@ goto_actions (void)
yydefgoto[i - ntokens] = default_state; yydefgoto[i - ntokens] = default_state;
} }
output_short_table (&table_obstack, NULL, "yydefgoto", yydefgoto, output_table_data (&output_obstack, yydefgoto,
yydefgoto[0], 1, nsyms - ntokens); yydefgoto[0], 1, nsyms - ntokens);
muscle_insert ("defgoto", obstack_finish (&output_obstack));
XFREE (state_count); XFREE (state_count);
XFREE (yydefgoto); XFREE (yydefgoto);
@@ -1079,13 +879,15 @@ pack_table (void)
static void static void
output_base (void) output_base (void)
{ {
output_short_table (&table_obstack, NULL, "yypact", base, /* Output pact. */
output_table_data (&output_obstack, base,
base[0], 1, nstates); base[0], 1, nstates);
muscle_insert ("pact", obstack_finish (&output_obstack));
obstack_1grow (&table_obstack, '\n'); /* Output pgoto. */
output_table_data (&output_obstack, base,
output_short_table (&table_obstack, NULL, "yypgoto", base,
base[nstates], nstates + 1, nvectors); base[nstates], nstates + 1, nvectors);
muscle_insert ("pgoto", obstack_finish (&output_obstack));
XFREE (base); XFREE (base);
} }
@@ -1094,9 +896,9 @@ output_base (void)
static void static void
output_table (void) output_table (void)
{ {
obstack_fgrow1 (&table_obstack, "\n\n#define\tYYLAST\t\t%d\n\n\n", high); output_table_data (&output_obstack, table,
output_short_table (&table_obstack, NULL, "yytable", table,
table[0], 1, high + 1); table[0], 1, high + 1);
muscle_insert ("table", obstack_finish (&output_obstack));
XFREE (table); XFREE (table);
} }
@@ -1104,8 +906,9 @@ output_table (void)
static void static void
output_check (void) output_check (void)
{ {
output_short_table (&table_obstack, NULL, "yycheck", check, output_table_data (&output_obstack, check,
check[0], 1, high + 1); check[0], 1, high + 1);
muscle_insert ("check", obstack_finish (&output_obstack));
XFREE (check); XFREE (check);
} }
@@ -1137,29 +940,81 @@ output_actions (void)
sort_actions (); sort_actions ();
pack_table (); pack_table ();
obstack_1grow (&table_obstack, '\n');
output_base (); output_base ();
output_table (); output_table ();
obstack_1grow (&table_obstack, '\n');
output_check (); output_check ();
} }
/*------------------------------------------.
| Copy the parser code into TABLE_OBSTACK. | /*------------------------------------------------------------.
`------------------------------------------*/ | Copy the parser code from SKEL_FILENAME into OOUT obstack. |
| and do the muscle substitution. |
`------------------------------------------------------------*/
static void static void
output_parser (void) output_parser (const char *skel_filename, struct obstack *oout)
{ {
int c; int c;
FILE *fskel; FILE *fskel;
size_t line; size_t line;
int actions_dumped = 0;
if (pure_parser) fskel = xfopen (skel_filename, "r");
obstack_sgrow (&table_obstack, "#define YYPURE 1\n\n");
/* Loop over lines in the standard parser file. */ /* New output code. */
line = 1;
c = getc (fskel);
while (c != EOF)
{
if (c != '%')
{
if (c == '\n')
++line;
obstack_1grow (oout, c);
c = getc (fskel);
}
else if ((c = getc (fskel)) == '%')
{
/* Read the muscle. */
const char *muscle_key = 0;
const char *muscle_value = 0;
while (isalnum (c = getc (fskel)) || c == '_')
obstack_1grow (&muscle_obstack, c);
obstack_1grow (&muscle_obstack, 0);
/* Output the right value, or see if it's something special. */
muscle_key = obstack_finish (&muscle_obstack);
muscle_value = muscle_find (muscle_key);
if (muscle_value)
obstack_sgrow (oout, muscle_value);
else if (!strcmp (muscle_key, "line"))
obstack_fgrow1 (oout, "%d", line + 1);
else if (!strcmp (muscle_key, "input_line"))
obstack_fgrow1 (oout, "%d", lineno);
/* FIXME: Insert the code to recognize %%sub-skeleton for exemple. */
else
{
obstack_sgrow (oout, "%%");
obstack_sgrow (oout, muscle_key);
}
}
else
obstack_1grow (oout, '%');
}
/* End. */
xfclose (fskel);
}
/*----------------------------------------.
| Prepare the master parser to be output |
`----------------------------------------*/
static void
output_master_parser (void)
{
if (!skeleton) if (!skeleton)
{ {
if (semantic_parser) if (semantic_parser)
@@ -1167,130 +1022,7 @@ output_parser (void)
else else
skeleton = skeleton_find ("BISON_SIMPLE", BISON_SIMPLE); skeleton = skeleton_find ("BISON_SIMPLE", BISON_SIMPLE);
} }
fskel = xfopen (skeleton, "r"); output_parser (skeleton, &table_obstack);
/* Set LINE to 2, not 1: `#line LINENUM' -- Here LINENUM is a
decimal integer constant. This specifies that the line number of
the *following* line of input, in its original source file, was
LINENUM. */
line = 2;
while (1)
{
enum line_type_e
{
regular_line,
sync_line, /* #line. */
actions_line /* %% actions. */
};
enum line_type_e line_type = regular_line;
c = getc (fskel);
/* Is this line special? */
if (c == '#')
{
/* See if it's a `#line' line. */
if ((c = getc (fskel)) == 'l')
if ((c = getc (fskel)) == 'i')
if ((c = getc (fskel)) == 'n')
if ((c = getc (fskel)) == 'e')
line_type = sync_line;
else
obstack_sgrow (&table_obstack, "#lin");
else
obstack_sgrow (&table_obstack, "#li");
else
obstack_sgrow (&table_obstack, "#l");
else
obstack_sgrow (&table_obstack, "#");
}
else if (c == '%')
{
/* See if it's a `%% actions' line. */
if ((c = getc (fskel)) == '%')
if ((c = getc (fskel)) == ' ')
if ((c = getc (fskel)) == 'a')
if ((c = getc (fskel)) == 'c')
if ((c = getc (fskel)) == 't')
if ((c = getc (fskel)) == 'i')
if ((c = getc (fskel)) == 'o')
if ((c = getc (fskel)) == 'n')
if ((c = getc (fskel)) == 's')
line_type = actions_line;
else
obstack_sgrow (&table_obstack, "%% action");
else
obstack_sgrow (&table_obstack, "%% actio");
else
obstack_sgrow (&table_obstack, "%% acti");
else
obstack_sgrow (&table_obstack, "%% act");
else
obstack_sgrow (&table_obstack, "%% ac");
else
obstack_sgrow (&table_obstack, "%% a");
else
obstack_sgrow (&table_obstack, "%% ");
else
obstack_sgrow (&table_obstack, "%%");
else
obstack_sgrow (&table_obstack, "%");
}
switch (line_type)
{
case sync_line:
if (!no_lines_flag)
obstack_fgrow2 (&table_obstack, "#line %d %s\n",
line, quotearg_style (c_quoting_style, skeleton));
/* Skip the end of line. */
for (; c != '\n' && c != EOF; c = getc (fskel))
/* nothing */;
break;
case actions_line:
{
size_t size = obstack_object_size (&action_obstack);
actions_dumped++;
assert (actions_dumped == 1);
obstack_grow (&table_obstack,
obstack_finish (&action_obstack),
size);
}
/* Skip the end of line. */
for (; c != '\n' && c != EOF; c = getc (fskel))
/* nothing */;
break;
case regular_line:
for (; c != '\n' && c != EOF; c = getc (fskel))
obstack_1grow (&table_obstack, c);
}
if (c == EOF)
break;
obstack_1grow (&table_obstack, c);
line++;
}
assert (actions_dumped == 1);
xfclose (fskel);
}
static void
output_program (void)
{
int c;
if (!no_lines_flag)
obstack_fgrow2 (&table_obstack, "#line %d %s\n",
lineno, quotearg_style (c_quoting_style, infile));
while ((c = getc (finput)) != EOF)
obstack_1grow (&table_obstack, c);
} }
@@ -1308,6 +1040,55 @@ free_itemsets (void)
} }
} }
/* FIXME. */
#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, Value); \
obstack_1grow (&muscle_obstack, 0); \
muscle_insert (Key, obstack_finish (&muscle_obstack)); \
}
static void
prepare (void)
{
MUSCLE_INSERT_INT ("last", high);
MUSCLE_INSERT_INT ("flag", MINSHORT);
MUSCLE_INSERT_INT ("pure", pure_parser);
MUSCLE_INSERT_INT ("nsym", nsyms);
MUSCLE_INSERT_INT ("debug", debug_flag);
MUSCLE_INSERT_INT ("final", final_state);
MUSCLE_INSERT_INT ("maxtok", max_user_token_number);
MUSCLE_INSERT_INT ("ntbase", ntokens);
MUSCLE_INSERT_INT ("verbose", 0);
MUSCLE_INSERT_INT ("nnts", nvars);
MUSCLE_INSERT_INT ("nrules", nrules);
MUSCLE_INSERT_INT ("nstates", nstates);
MUSCLE_INSERT_INT ("ntokens", ntokens);
MUSCLE_INSERT_INT ("locations_flag", locations_flag);
/* We need to save the actions in the muscle %%action. */
muscle_insert ("action", obstack_finish (&action_obstack));
if (spec_name_prefix)
MUSCLE_INSERT_STRING ("prefix", spec_name_prefix);
}
/*----------------------------------------------------------. /*----------------------------------------------------------.
| Output the parsing tables and the parser code to ftable. | | Output the parsing tables and the parser code to ftable. |
@@ -1316,51 +1097,29 @@ free_itemsets (void)
void void
output (void) output (void)
{ {
/* output_token_defines(ftable); / * JF put out token defines FIRST */ obstack_init (&output_obstack);
/* If using a simple parser the definition of YYSTYPE are put into
TABLE_OBSTACK. */
if (!semantic_parser)
{
size_t size = obstack_object_size (&attrs_obstack);
obstack_grow (&table_obstack, obstack_finish (&attrs_obstack), size);
}
reader_output_yylsp (&table_obstack);
if (debug_flag)
obstack_sgrow (&table_obstack, "\
#ifndef YYDEBUG\n\
# define YYDEBUG 1\n\
#endif\n\
\n");
if (semantic_parser)
obstack_fgrow1 (&table_obstack, "#include %s\n",
quotearg_style (c_quoting_style, attrsfile));
if (!no_parser_flag)
obstack_sgrow (&table_obstack, "#include <stdio.h>\n\n");
/* Make "const" do nothing if not in ANSI C. */
obstack_sgrow (&table_obstack, "\
#ifndef __cplusplus\n\
# ifndef __STDC__\n\
# define const\n\
# endif\n\
#endif\n\
\n");
free_itemsets (); free_itemsets ();
output_defines ();
output_token_translations (); output_token_translations ();
/* if (semantic_parser) */
/* This is now unconditional because debugging printouts can use it. */
output_gram (); output_gram ();
XFREE (ritem); XFREE (ritem);
if (semantic_parser) if (semantic_parser)
output_stos (); output_stos ();
output_rule_data (); output_rule_data ();
output_actions (); output_actions ();
if (!no_parser_flag)
output_parser (); #if 0
output_program (); if (!no_parser_flag) */
#endif
prepare ();
/* Copy definitions in directive. */
muscle_insert ("prologue", obstack_finish (&attrs_obstack));
output_master_parser ();
obstack_free (&muscle_obstack, 0);
obstack_free (&output_obstack, 0);
obstack_free (&action_obstack, 0);
} }
-6
View File
@@ -21,12 +21,6 @@
#ifndef OUTPUT_H_ #ifndef OUTPUT_H_
# define OUTPUT_H_ # define OUTPUT_H_
/* Output constant strings to the beginning of certain files. */
void output_headers PARAMS ((void));
/* Output constant strings to the ends of certain files. */
void output_trailers PARAMS ((void));
/* Output the parsing tables and the parser code to FTABLE. */ /* Output the parsing tables and the parser code to FTABLE. */
void output PARAMS ((void)); void output PARAMS ((void));
+148 -87
View File
@@ -28,12 +28,14 @@
#include "files.h" #include "files.h"
#include "xalloc.h" #include "xalloc.h"
#include "symtab.h" #include "symtab.h"
#include "options.h"
#include "lex.h" #include "lex.h"
#include "gram.h" #include "gram.h"
#include "complain.h" #include "complain.h"
#include "output.h" #include "output.h"
#include "reader.h" #include "reader.h"
#include "conflicts.h" #include "conflicts.h"
#include "muscle_tab.h"
/* Number of slots allocated (but not necessarily used yet) in `rline' */ /* Number of slots allocated (but not necessarily used yet) in `rline' */
static int rline_allocated; static int rline_allocated;
@@ -156,10 +158,11 @@ get_type_name (int n, symbol_list * rule)
`------------------------------------------------------------*/ `------------------------------------------------------------*/
static inline void static inline void
copy_string (FILE *fin, struct obstack *oout, int match) copy_string2 (FILE *fin, struct obstack *oout, int match, int store)
{ {
int c; int c;
if (store)
obstack_1grow (oout, match); obstack_1grow (oout, match);
c = getc (fin); c = getc (fin);
@@ -192,9 +195,30 @@ copy_string (FILE *fin, struct obstack *oout, int match)
c = getc (fin); c = getc (fin);
} }
if (store)
obstack_1grow (oout, c); obstack_1grow (oout, c);
} }
/* FIXME. */
static inline void
copy_string (FILE *fin, struct obstack *oout, int match)
{
copy_string2 (fin, oout, match, 1);
}
/* FIXME. */
static inline void
copy_identifier (FILE *fin, struct obstack *oout)
{
int c;
while (isalnum (c = getc (fin)) || c == '_')
obstack_1grow (oout, c);
ungetc (c, fin);
}
/*-----------------------------------------------------------------. /*-----------------------------------------------------------------.
| Dump the wannabee comment from IN to OUT1 and OUT2 (which can be | | Dump the wannabee comment from IN to OUT1 and OUT2 (which can be |
@@ -403,9 +427,14 @@ copy_definition (void)
/* -1 while reading a character if prev char was %. */ /* -1 while reading a character if prev char was %. */
int after_percent; int after_percent;
#if 0
if (!no_lines_flag) if (!no_lines_flag)
obstack_fgrow2 (&attrs_obstack, "#line %d %s\n", {
lineno, quotearg_style (c_quoting_style, infile)); obstack_fgrow2 (&attrs_obstack, muscle_find ("linef"),
lineno, quotearg_style (c_quoting_style,
muscle_find("filename")));
}
#endif
after_percent = 0; after_percent = 0;
@@ -706,9 +735,9 @@ token_buffer);
/*--------------------------------------------------------------. /*--------------------------------------------------------------.
| Copy the union declaration into ATTRS_OBSTACK (and fdefines), | | Copy the union declaration into the stype muscle |
| where it is made into the definition of YYSTYPE, the type of | | (and fdefines), where it is made into the definition of |
| elements of the parser value stack. | | YYSTYPE, the type of elements of the parser value stack. |
`--------------------------------------------------------------*/ `--------------------------------------------------------------*/
static void static void
@@ -716,19 +745,18 @@ parse_union_decl (void)
{ {
int c; int c;
int count = 0; int count = 0;
struct obstack union_obstack;
if (typed) if (typed)
complain (_("multiple %s declarations"), "%union"); complain (_("multiple %s declarations"), "%union");
typed = 1; typed = 1;
if (!no_lines_flag) if (no_lines_flag)
obstack_fgrow2 (&attrs_obstack, "\n#line %d %s\n",
lineno, quotearg_style (c_quoting_style, infile));
else
obstack_1grow (&attrs_obstack, '\n'); obstack_1grow (&attrs_obstack, '\n');
obstack_sgrow (&attrs_obstack, "typedef union"); obstack_init (&union_obstack);
obstack_sgrow (&union_obstack, "union");
if (defines_flag) if (defines_flag)
obstack_sgrow (&defines_obstack, "typedef union"); obstack_sgrow (&defines_obstack, "typedef union");
@@ -736,7 +764,7 @@ parse_union_decl (void)
while (c != EOF) while (c != EOF)
{ {
obstack_1grow (&attrs_obstack, c); obstack_1grow (&union_obstack, c);
if (defines_flag) if (defines_flag)
obstack_1grow (&defines_obstack, c); obstack_1grow (&defines_obstack, c);
@@ -747,7 +775,7 @@ parse_union_decl (void)
break; break;
case '/': case '/':
copy_comment2 (finput, &defines_obstack, &attrs_obstack); copy_comment2 (finput, &defines_obstack, &union_obstack);
break; break;
case '{': case '{':
@@ -760,19 +788,21 @@ parse_union_decl (void)
count--; count--;
if (count <= 0) if (count <= 0)
{ {
obstack_sgrow (&attrs_obstack, " YYSTYPE;\n");
if (defines_flag) if (defines_flag)
obstack_sgrow (&defines_obstack, " YYSTYPE;\n"); obstack_sgrow (&defines_obstack, " YYSTYPE;\n");
/* JF don't choke on trailing semi */ /* JF don't choke on trailing semi */
c = skip_white_space (); c = skip_white_space ();
if (c != ';') if (c != ';')
ungetc (c, finput); ungetc (c, finput);
obstack_1grow (&union_obstack, 0);
muscle_insert ("stype", obstack_finish (&union_obstack));
return; return;
} }
} }
c = getc (finput); c = getc (finput);
} }
} }
@@ -874,6 +904,59 @@ parse_thong_decl (void)
nsyms--; nsyms--;
} }
/* FIXME. */
static void
parse_muscle_decl (void)
{
int ch = ungetc (skip_white_space (), finput);
char* muscle_key;
char* muscle_value;
/* Read key. */
if (!isalpha (ch) && ch != '_')
{
complain (_("invalid %s declaration"), "%define");
skip_to_char ('%');
return;
}
copy_identifier (finput, &muscle_obstack);
obstack_1grow (&muscle_obstack, 0);
muscle_key = obstack_finish (&muscle_obstack);
/* Read value. */
ch = skip_white_space ();
if (ch != '"')
{
ungetc (ch, finput);
if (ch != EOF)
{
complain (_("invalid %s declaration"), "%define");
skip_to_char ('%');
return;
}
else
fatal (_("Premature EOF after %s"), "\"");
}
copy_string2 (finput, &muscle_obstack, '"', 0);
obstack_1grow (&muscle_obstack, 0);
muscle_value = obstack_finish (&muscle_obstack);
/* Store the (key, value) pair in the environment. */
muscle_insert (muscle_key, muscle_value);
}
/*----------------------------------.
| Parse what comes after %skeleton. |
`----------------------------------*/
void
parse_skel_decl (void)
{
/* Complete with parse_dquoted_param () on the CVS branch 1.29. */
}
/*------------------------------------------. /*------------------------------------------.
| Parse what comes after %header_extension. | | Parse what comes after %header_extension. |
`------------------------------------------*/ `------------------------------------------*/
@@ -981,6 +1064,14 @@ read_declarations (void)
parse_source_extension_decl (); parse_source_extension_decl ();
break; break;
case tok_define:
parse_muscle_decl ();
break;
case tok_skel:
parse_skel_decl ();
break;
case tok_noop: case tok_noop:
break; break;
@@ -1019,14 +1110,13 @@ copy_action (symbol_list *rule, int stack_offset)
if (semantic_parser) if (semantic_parser)
stack_offset = 0; stack_offset = 0;
sprintf (buf, "\ncase %d:\n", nrules); obstack_fgrow1 (&action_obstack, "\ncase %d:\n", nrules);
obstack_grow (&action_obstack, buf, strlen (buf));
if (!no_lines_flag) if (!no_lines_flag)
{ {
sprintf (buf, "#line %d %s\n", obstack_fgrow2 (&action_obstack, muscle_find ("linef"),
lineno, quotearg_style (c_quoting_style, infile)); lineno, quotearg_style (c_quoting_style,
obstack_grow (&action_obstack, buf, strlen (buf)); muscle_find ("filename")));
} }
obstack_1grow (&action_obstack, '{'); obstack_1grow (&action_obstack, '{');
@@ -1112,8 +1202,9 @@ copy_guard (symbol_list *rule, int stack_offset)
obstack_fgrow1 (&guard_obstack, "\ncase %d:\n", nrules); obstack_fgrow1 (&guard_obstack, "\ncase %d:\n", nrules);
if (!no_lines_flag) if (!no_lines_flag)
obstack_fgrow2 (&guard_obstack, "#line %d %s\n", obstack_fgrow2 (&guard_obstack, muscle_find ("linef"),
lineno, quotearg_style (c_quoting_style, infile)); lineno, quotearg_style (c_quoting_style,
muscle_find ("filename")));
obstack_1grow (&guard_obstack, '{'); obstack_1grow (&guard_obstack, '{');
count = 0; count = 0;
@@ -1564,22 +1655,6 @@ readgram (void)
if (nrules == 0) if (nrules == 0)
fatal (_("no rules in the input grammar")); fatal (_("no rules in the input grammar"));
/* JF put out same default YYSTYPE as YACC does */
if (typed == 0
&& !value_components_used)
{
/* We used to use `unsigned long' as YYSTYPE on MSDOS,
but it seems better to be consistent.
Most programs should declare their own type anyway. */
obstack_sgrow (&attrs_obstack,
"#ifndef YYSTYPE\n#define YYSTYPE int\n#endif\n");
if (defines_flag)
obstack_sgrow (&defines_obstack, "\
# ifndef YYSTYPE\n\
# define YYSTYPE int\n\
# endif\n");
}
/* Report any undefined symbols and consider them nonterminals. */ /* Report any undefined symbols and consider them nonterminals. */
for (bp = firstsymbol; bp; bp = bp->next) for (bp = firstsymbol; bp; bp = bp->next)
@@ -1594,6 +1669,25 @@ readgram (void)
ntokens = nsyms - nvars; ntokens = nsyms - nvars;
} }
/* At the end of the grammar file, some C source code must
be stored. It is going to be associated to the epilogue
directive. */
static void
read_additionnal_code (void)
{
char c;
struct obstack el_obstack;
obstack_init (&el_obstack);
while ((c = getc (finput)) != EOF)
obstack_1grow (&el_obstack, c);
obstack_1grow (&el_obstack, 0);
muscle_insert ("epilogue", obstack_finish (&el_obstack));
}
/*--------------------------------------------------------------. /*--------------------------------------------------------------.
| For named tokens, but not literal ones, define the name. The | | For named tokens, but not literal ones, define the name. The |
@@ -1640,8 +1734,6 @@ output_token_defines (struct obstack *oout)
if (semantic_parser) if (semantic_parser)
obstack_fgrow2 (oout, "# define\tT%s\t%d\n", symbol, bp->value); obstack_fgrow2 (oout, "# define\tT%s\t%d\n", symbol, bp->value);
} }
obstack_1grow (oout, '\n');
} }
@@ -1660,8 +1752,6 @@ packsymbols (void)
int last_user_token_number; int last_user_token_number;
static char DOLLAR[] = "$"; static char DOLLAR[] = "$";
/* int lossage = 0; JF set but not used */
tags = XCALLOC (char *, nsyms + 1); tags = XCALLOC (char *, nsyms + 1);
tags[0] = DOLLAR; tags[0] = DOLLAR;
user_toknums = XCALLOC (short, nsyms + 1); user_toknums = XCALLOC (short, nsyms + 1);
@@ -1763,8 +1853,14 @@ packsymbols (void)
error_token_number = errtoken->value; error_token_number = errtoken->value;
output_token_defines (&output_obstack);
obstack_1grow (&output_obstack, 0);
muscle_insert ("tokendef", obstack_finish (&output_obstack));
#if 0
if (!no_parser_flag) if (!no_parser_flag)
output_token_defines (&table_obstack); output_token_defines (&table_obstack);
#endif
if (startval->class == unknown_sym) if (startval->class == unknown_sym)
fatal (_("the start symbol %s is undefined"), startval->tag); fatal (_("the start symbol %s is undefined"), startval->tag);
@@ -1911,12 +2007,17 @@ reader (void)
init_lex (); init_lex ();
lineno = 1; lineno = 1;
/* Initialize the muscle obstack. */
obstack_init (&muscle_obstack);
/* Initialize the symbol table. */ /* Initialize the symbol table. */
tabinit (); tabinit ();
/* Construct the error token */ /* Construct the error token */
errtoken = getsym ("error"); errtoken = getsym ("error");
errtoken->class = token_sym; errtoken->class = token_sym;
errtoken->user_token_number = 256; /* Value specified by POSIX. */ errtoken->user_token_number = 256; /* Value specified by POSIX. */
/* Construct a token that represents all undefined literal tokens. /* Construct a token that represents all undefined literal tokens.
It is always token number 2. */ It is always token number 2. */
undeftoken = getsym ("$undefined."); undeftoken = getsym ("$undefined.");
@@ -1926,30 +2027,17 @@ reader (void)
/* Read the declaration section. Copy %{ ... %} groups to /* Read the declaration section. Copy %{ ... %} groups to
TABLE_OBSTACK and FDEFINES file. Also notice any %token, %left, TABLE_OBSTACK and FDEFINES file. Also notice any %token, %left,
etc. found there. */ etc. found there. */
obstack_1grow (&table_obstack, '\n');
obstack_fgrow3 (&table_obstack, "\
/* %s, made from %s\n\
by GNU bison %s. */\n\
\n",
no_parser_flag ? "Bison-generated parse tables" : "A Bison parser",
infile, VERSION);
obstack_sgrow (&table_obstack,
"#define YYBISON 1 /* Identify Bison output. */\n\n");
read_declarations (); read_declarations ();
/* Start writing the guard and action files, if they are needed. */
output_headers ();
/* Read in the grammar, build grammar in list form. Write out /* Read in the grammar, build grammar in list form. Write out
guards and actions. */ guards and actions. */
readgram (); readgram ();
/* Some C code is given at the end of the grammar file. */
read_additionnal_code ();
/* Now we know whether we need the line-number stack. If we do, /* Now we know whether we need the line-number stack. If we do,
write its type into the .tab.h file. */ write its type into the .tab.h file.
if (defines_flag) This is no longer need with header skeleton. */
reader_output_yylsp (&defines_obstack);
/* Write closing delimiters for actions and guards. */
output_trailers ();
if (locations_flag)
obstack_sgrow (&table_obstack, "#define YYLSP_NEEDED 1\n\n");
/* Assign the symbols their symbol numbers. Write #defines for the /* Assign the symbols their symbol numbers. Write #defines for the
token symbols into FDEFINES if requested. */ token symbols into FDEFINES if requested. */
packsymbols (); packsymbols ();
@@ -1959,30 +2047,3 @@ reader (void)
referred to by symbol number. */ referred to by symbol number. */
free_symtab (); free_symtab ();
} }
/*------------------------------------------------------------------.
| Define YYLTYPE. Cannot be in the skeleton since we might have to |
| output it in the headers if --defines is used. |
`------------------------------------------------------------------*/
void
reader_output_yylsp (struct obstack *oout)
{
if (locations_flag)
obstack_sgrow (oout, "\
\n\
#ifndef YYLTYPE\n\
typedef struct yyltype\n\
{\n\
int first_line;\n\
int first_column;\n\
\n\
int last_line;\n\
int last_column;\n\
} yyltype;\n\
\n\
# define YYLTYPE yyltype\n\
#endif\n\
\n");
}
+2 -2
View File
@@ -30,10 +30,10 @@
extern void reader PARAMS ((void)); extern void reader PARAMS ((void));
extern void reader_output_yylsp PARAMS ((struct obstack *));
extern int lineno; extern int lineno;
extern char **tags; extern char **tags;
extern short *user_toknums; extern short *user_toknums;
extern struct obstack muscle_obstack;
#endif /* !READER_H_ */ #endif /* !READER_H_ */
+89 -72
View File
@@ -1,6 +1,7 @@
# Makefile.in generated automatically by automake 1.4-p4 from Makefile.am # Makefile.in generated automatically by automake 1.5 from Makefile.am.
# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. # Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
# Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation # This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved. # with or without modifications, as long as this notice is preserved.
@@ -10,8 +11,9 @@
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE. # PARTICULAR PURPOSE.
# Distribute the testsuite since GNU M4 is needed to build it. @SET_MAKE@
# Distribute the testsuite since GNU M4 is needed to build it.
SHELL = @SHELL@ SHELL = @SHELL@
@@ -33,13 +35,9 @@ infodir = @infodir@
mandir = @mandir@ mandir = @mandir@
includedir = @includedir@ includedir = @includedir@
oldincludedir = /usr/include oldincludedir = /usr/include
DESTDIR =
pkgdatadir = $(datadir)/@PACKAGE@ pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = .. top_builddir = ..
ACLOCAL = @ACLOCAL@ ACLOCAL = @ACLOCAL@
@@ -48,11 +46,11 @@ AUTOMAKE = @AUTOMAKE@
AUTOHEADER = @AUTOHEADER@ AUTOHEADER = @AUTOHEADER@
INSTALL = @INSTALL@ INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS) INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_HEADER = $(INSTALL_DATA)
transform = @program_transform_name@ transform = @program_transform_name@
NORMAL_INSTALL = : NORMAL_INSTALL = :
PRE_INSTALL = : PRE_INSTALL = :
POST_INSTALL = : POST_INSTALL = :
@@ -61,20 +59,25 @@ PRE_UNINSTALL = :
POST_UNINSTALL = : POST_UNINSTALL = :
host_alias = @host_alias@ host_alias = @host_alias@
host_triplet = @host@ host_triplet = @host@
AMTAR = @AMTAR@
AT_TESTPATH = @AT_TESTPATH@ AT_TESTPATH = @AT_TESTPATH@
AWK = @AWK@
BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@ BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@
CATALOGS = @CATALOGS@ CATALOGS = @CATALOGS@
CATOBJEXT = @CATOBJEXT@ CATOBJEXT = @CATOBJEXT@
CC = @CC@ CC = @CC@
CPP = @CPP@ CPP = @CPP@
DATADIRNAME = @DATADIRNAME@ DATADIRNAME = @DATADIRNAME@
DEPDIR = @DEPDIR@
ECHO_C = @ECHO_C@ ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@ ECHO_T = @ECHO_T@
EXEEXT = @EXEEXT@
GENCAT = @GENCAT@ GENCAT = @GENCAT@
GLIBC21 = @GLIBC21@ GLIBC21 = @GLIBC21@
GMOFILES = @GMOFILES@ GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@ GMSGFMT = @GMSGFMT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INSTOBJEXT = @INSTOBJEXT@ INSTOBJEXT = @INSTOBJEXT@
INTLBISON = @INTLBISON@ INTLBISON = @INTLBISON@
INTLLIBS = @INTLLIBS@ INTLLIBS = @INTLLIBS@
@@ -83,9 +86,9 @@ INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
LIBICONV = @LIBICONV@ LIBICONV = @LIBICONV@
LIBOBJS = @LIBOBJS@ LIBOBJS = @LIBOBJS@
M4 = @M4@ M4 = @M4@
MAKEINFO = @MAKEINFO@
MKINSTALLDIRS = @MKINSTALLDIRS@ MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@ MSGFMT = @MSGFMT@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@ PACKAGE = @PACKAGE@
POFILES = @POFILES@ POFILES = @POFILES@
POSUB = @POSUB@ POSUB = @POSUB@
@@ -95,6 +98,9 @@ USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
USE_NLS = @USE_NLS@ USE_NLS = @USE_NLS@
VERSION = @VERSION@ VERSION = @VERSION@
WARNING_CFLAGS = @WARNING_CFLAGS@ WARNING_CFLAGS = @WARNING_CFLAGS@
am__include = @am__include@
am__quote = @am__quote@
install_sh = @install_sh@
noinst_SCRIPTS = testsuite noinst_SCRIPTS = testsuite
@@ -105,116 +111,128 @@ EXTRA_DIST = atgeneral.m4 suite.at $(SUITE) $(noinst_SCRIPTS)
CLEANFILES = debug-*.sh empty CLEANFILES = debug-*.sh empty
DISTCLEANFILES = atconfig DISTCLEANFILES = atconfig
MAINTAINERCLEANFILES = testsuite MAINTAINERCLEANFILES = testsuite
subdir = tests
mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
CONFIG_HEADER = ../config.h CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES = atconfig CONFIG_CLEAN_FILES = atconfig
SCRIPTS = $(noinst_SCRIPTS) SCRIPTS = $(noinst_SCRIPTS)
DIST_SOURCES =
DIST_COMMON = Makefile.am Makefile.in atconfig.in DIST_COMMON = Makefile.am Makefile.in atconfig.in
all: all-am
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
TAR = tar
GZIP_ENV = --best
all: all-redirect
.SUFFIXES: .SUFFIXES:
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/Makefile cd $(top_srcdir) && \
$(AUTOMAKE) --gnu tests/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) \ cd $(top_builddir) && \
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status CONFIG_HEADERS= CONFIG_LINKS= \
CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status
atconfig: $(top_builddir)/config.status atconfig.in atconfig: $(top_builddir)/config.status atconfig.in
cd $(top_builddir) && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status cd $(top_builddir) && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= CONFIG_LINKS= $(SHELL) ./config.status
uninstall-info-am:
tags: TAGS tags: TAGS
TAGS: TAGS:
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
subdir = tests top_distdir = ..
distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
distdir: $(DISTFILES) distdir: $(DISTFILES)
here=`cd $(top_builddir) && pwd`; \
top_distdir=`cd $(top_distdir) && pwd`; \
distdir=`cd $(distdir) && pwd`; \
cd $(top_srcdir) \
&& $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu tests/Makefile
@for file in $(DISTFILES); do \ @for file in $(DISTFILES); do \
d=$(srcdir); \ if test -f $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
$(mkinstalldirs) "$(distdir)/$$dir"; \
fi; \
if test -d $$d/$$file; then \ if test -d $$d/$$file; then \
cp -pr $$d/$$file $(distdir)/$$file; \ cp -pR $$d/$$file $(distdir) \
|| exit 1; \
else \ else \
test -f $(distdir)/$$file \ test -f $(distdir)/$$file \
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \ || cp -p $$d/$$file $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file || :; \ || exit 1; \
fi; \ fi; \
done done
info-am:
info: info-am
dvi-am:
dvi: dvi-am
check-am: all-am check-am: all-am
$(MAKE) $(AM_MAKEFLAGS) check-local $(MAKE) $(AM_MAKEFLAGS) check-local
check: check-am check: check-am
installcheck-am: all-am: Makefile $(SCRIPTS)
installcheck: installcheck-am
install-exec-am:
install-exec: install-exec-am
install-data-am: installdirs:
install: install-am
install-exec: install-exec-am
install-data: install-data-am install-data: install-data-am
uninstall: uninstall-am
install-am: all-am install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
install: install-am
uninstall-am: installcheck: installcheck-am
uninstall: uninstall-am
all-am: Makefile $(SCRIPTS)
all-redirect: all-am
install-strip: install-strip:
$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
installdirs: `test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic: mostlyclean-generic:
clean-generic: clean-generic:
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic: distclean-generic:
-rm -f Makefile $(CONFIG_CLEAN_FILES) -rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]*
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
maintainer-clean-generic: maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
mostlyclean-am: mostlyclean-generic clean: clean-am
mostlyclean: mostlyclean-am
clean-am: clean-generic mostlyclean-am clean-am: clean-generic mostlyclean-am
clean: clean-am
distclean-am: distclean-generic clean-am
distclean: distclean-am distclean: distclean-am
maintainer-clean-am: maintainer-clean-generic distclean-am distclean-am: clean-am distclean-generic
@echo "This command is intended for maintainers to use;"
@echo "it deletes files that may require special tools to rebuild." dvi: dvi-am
dvi-am:
info: info-am
info-am:
install-data-am:
install-exec-am:
install-info: install-info-am
install-man:
installcheck-am:
maintainer-clean: maintainer-clean-am maintainer-clean: maintainer-clean-am
.PHONY: tags distdir info-am info dvi-am dvi check-local check check-am \ maintainer-clean-am: distclean-am maintainer-clean-generic
installcheck-am installcheck install-exec-am install-exec \
install-data-am install-data install-am install uninstall-am uninstall \ mostlyclean: mostlyclean-am
all-redirect all-am all installdirs mostlyclean-generic \
distclean-generic clean-generic maintainer-clean-generic clean \ mostlyclean-am: mostlyclean-generic
mostlyclean distclean maintainer-clean
uninstall-am: uninstall-info-am
.PHONY: all all-am check check-am check-local clean clean-generic \
distclean distclean-generic distdir dvi dvi-am info info-am \
install install-am install-data install-data-am install-exec \
install-exec-am install-info install-info-am install-man \
install-strip installcheck installcheck-am installdirs \
maintainer-clean maintainer-clean-generic mostlyclean \
mostlyclean-generic uninstall uninstall-am uninstall-info-am
check-local: atconfig $(srcdir)/testsuite check-local: atconfig $(srcdir)/testsuite
@@ -226,7 +244,6 @@ testsuite: atgeneral.m4 suite.at $(SUITE)
sed -e '/^$$/N;/\n$$/D' > $@-tmp sed -e '/^$$/N;/\n$$/D' > $@-tmp
chmod +x $@-tmp chmod +x $@-tmp
mv $@-tmp $@ mv $@-tmp $@
# Tell versions [3.59,3.63) of GNU make to not export all variables. # Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded. # Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT: .NOEXPORT:
+1 -1
View File
@@ -245,7 +245,7 @@ AT_DEFINE([AT_DATA_CALC_Y],
[_AT_DATA_CALC_Y($[1], $[2], $[3], [_AT_DATA_CALC_Y($[1], $[2], $[3],
[ifelse(regexp([$1], [--yyerror-verbose]), [ifelse(regexp([$1], [--yyerror-verbose]),
[-1], [], [-1], [],
[[#define YYERROR_VERBOSE]])])]) [[#define YYERROR_VERBOSE 1]])])])