shift/reduce conflict.
From Kai-Uwe Rommel <rommel@ars.de>:
* defparse.y: Add tokens NONSHARED, SINGLE, MULTIPLE,
INITINSTANCE, INITGLOBAL, TERMINSTANCE, and TERMGLOBAL.
(command): Add option_list after LIBRARY.
(attr): Accept and ignore NONSHARED, SINGLE, and MULTIPLE.
(option_list, option): New nonterminals.
* deflex.l: Recognize NONSHARED, SINGLE, MULTIPLE, INITINSTANCE,
INITGLOBAL, TERMINSTANCE, and TERMGLOBAL.
+1999-06-13 Ian Lance Taylor <ian@zembu.com>
+
+ * defparse.y (explist): Remove separate expline to eliminate
+ shift/reduce conflict.
+
+ From Kai-Uwe Rommel <rommel@ars.de>:
+ * defparse.y: Add tokens NONSHARED, SINGLE, MULTIPLE,
+ INITINSTANCE, INITGLOBAL, TERMINSTANCE, and TERMGLOBAL.
+ (command): Add option_list after LIBRARY.
+ (attr): Accept and ignore NONSHARED, SINGLE, and MULTIPLE.
+ (option_list, option): New nonterminals.
+ * deflex.l: Recognize NONSHARED, SINGLE, MULTIPLE, INITINSTANCE,
+ INITGLOBAL, TERMINSTANCE, and TERMGLOBAL.
+
1999-06-12 Ian Lance Taylor <ian@zembu.com>
* ar.c (O_BINARY): Define as 0 if not defined.
%{/* deflex.l - Lexer for .def files */
-/* Copyright (C) 1995, 1997, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1997, 1998, 1999 Free Software Foundation, Inc.
This file is part of GNU Binutils.
"WRITE" { return WRITE;}
"EXECUTE" { return EXECUTE;}
"SHARED" { return SHARED;}
+"NONSHARED" { return NONSHARED;}
+"SINGLE" { return SINGLE;}
+"MULTIPLE" { return MULTIPLE;}
+"INITINSTANCE" { return INITINSTANCE;}
+"INITGLOBAL" { return INITGLOBAL;}
+"TERMINSTANCE" { return TERMINSTANCE;}
+"TERMGLOBAL" { return TERMGLOBAL;}
[0-9][x0-9A-Fa-f]* { yylval.number = strtol (yytext,0,0);
return NUMBER; }
%{ /* defparse.y - parser for .def files */
-/* Copyright (C) 1995, 1997, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1997, 1998, 1999 Free Software Foundation, Inc.
This file is part of GNU Binutils.
%token NAME, LIBRARY, DESCRIPTION, STACKSIZE, HEAPSIZE, CODE, DATA
%token SECTIONS, EXPORTS, IMPORTS, VERSIONK, BASE, CONSTANT
-%token READ WRITE EXECUTE SHARED NONAME
+%token READ WRITE EXECUTE SHARED NONSHARED NONAME
+%token SINGLE MULTIPLE INITINSTANCE INITGLOBAL TERMINSTANCE TERMGLOBAL
%token <id> ID
%token <number> NUMBER
%type <number> opt_base opt_ordinal opt_NONAME opt_CONSTANT opt_DATA
command:
NAME opt_name opt_base { def_name ($2, $3); }
- | LIBRARY opt_name opt_base { def_library ($2, $3); }
+ | LIBRARY opt_name opt_base option_list { def_library ($2, $3); }
| EXPORTS explist
| DESCRIPTION ID { def_description ($2);}
| STACKSIZE NUMBER opt_number { def_stacksize ($2, $3);}
explist:
/* EMPTY */
- | expline
| explist expline
;
;
attr:
- READ { $$ = 1;}
- | WRITE { $$ = 2;}
- | EXECUTE { $$=4;}
- | SHARED { $$=8;}
+ READ { $$ = 1; }
+ | WRITE { $$ = 2; }
+ | EXECUTE { $$ = 4; }
+ | SHARED { $$ = 8; }
+ | NONSHARED { $$ = 0; }
+ | SINGLE { $$ = 0; }
+ | MULTIPLE { $$ = 0; }
;
opt_CONSTANT:
| { $$=-1;}
;
-
+option_list:
+ /* empty */
+ | option_list opt_comma option
+ ;
+option:
+ INITINSTANCE
+ | INITGLOBAL
+ | TERMINSTANCE
+ | TERMGLOBAL
+ ;