%{
/* arparse.y - Stange script language parser */
-/* Copyright 1992, 1993, 1995, 1997, 1999, 2002, 2003, 2005, 2007
- Free Software Foundation, Inc.
+/* Copyright (C) 1992-2016 Free Software Foundation, Inc.
This file is part of GNU Binutils.
%token SAVE
%token OPEN
-%type <list> modulelist
+%type <list> modulelist
%type <list> modulename
%type <name> optional_filename
%%
;
command:
- open_command
- | create_command
+ open_command
+ | create_command
| verbose_command
| directory_command
| addlib_command
{ ar_extract($2); }
;
-replace_command:
+replace_command:
REPLACE modulename
{ ar_replace($2); }
;
-
+
clear_command:
CLEAR
{ ar_clear(); }
{ ar_addmod($2); }
;
-list_command:
+list_command:
LIST
{ ar_list(); }
;
-save_command:
+save_command:
SAVE
{ ar_save(); }
;
open_command:
- OPEN FILENAME
+ OPEN FILENAME
{ ar_open($2,0); }
;
create_command:
- CREATE FILENAME
+ CREATE FILENAME
{ ar_open($2,1); }
;
;
modulelist:
- '(' modulename ')'
+ '(' modulename ')'
{ $$ = $2; }
|
{ $$ = 0; }
modulename:
modulename optcomma FILENAME
{ struct list *n = (struct list *) malloc(sizeof(struct list));
- n->next = $1;
+ n->next = $1;
n->name = $3;
$$ = n;
}
| { $$ = 0; }
;
-
+
optcomma:
','
|
;
-
-
+
+
verbose_command:
- VERBOSE
+ VERBOSE
{ verbose = !verbose; }
;