%{
/* arparse.y - Stange script language parser */
-/* Copyright (C) 1992 Free Software Foundation, Inc.
+/* Copyright 1992, 1993, 1995, 1997, 1999 Free Software Foundation, Inc.
This file is part of GNU Binutils.
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., 675 Mass Ave, Cambridge, MA 02139, USA. */
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* Contributed by Steve Chamberlain
*/
#define DONTDECLARE_MALLOC
#include "bfd.h"
-#include <sysdep.h>
+#include "bucomm.h"
#include "arsup.h"
-extern int interactive;
-extern bfd *inarch;
extern int verbose;
-void (*command)();
-FILE *listing;
+extern int yylex PARAMS ((void));
+static int yyerror PARAMS ((const char *));
%}
%union {
command_line:
command NEWLINE { prompt(); }
+ ;
command:
open_command
| clear_command
| addmod_command
| save_command
+ | extract_command
| replace_command
| delete_command
| list_command
- | END { return 0; }
+ | END { ar_end(); return 0; }
| error
+ | FILENAME { yyerror("foo"); }
|
;
+extract_command:
+ EXTRACT modulename
+ { ar_extract($2); }
+ ;
+
replace_command:
REPLACE modulename
{ ar_replace($2); }
%%
-
-int
-yyerror(x)
-char *x;
+static int
+yyerror (x)
+ const char *x ATTRIBUTE_UNUSED;
{
extern int linenumber;
- printf("Synax error in archive script, line %d\n", linenumber + 1);
+
+ printf (_("Syntax error in archive script, line %d\n"), linenumber + 1);
return 0;
}