X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=binutils%2Farparse.y;h=a03c2c42e2fbed75eba594da1be776ca2480acf8;hb=9ce88e60f37b21e9e91567f3a119860ec547ee1a;hp=dccdf8e3633d26df26aafd900212843fba7b35a1;hpb=c0cc691258938d3c280b06531b951936b93dc921;p=deliverable%2Fbinutils-gdb.git diff --git a/binutils/arparse.y b/binutils/arparse.y index dccdf8e363..a03c2c42e2 100644 --- a/binutils/arparse.y +++ b/binutils/arparse.y @@ -1,7 +1,7 @@ %{ /* 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. @@ -17,7 +17,7 @@ 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., 675 Mass Ave, Cambridge, MA 02139, USA. */ +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* Contributed by Steve Chamberlain @@ -26,13 +26,11 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ */ #define DONTDECLARE_MALLOC #include "bfd.h" -#include +#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 { @@ -86,15 +84,22 @@ 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); } @@ -186,12 +191,12 @@ verbose_command: %% - -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; }