diff options
author | Ian Lance Taylor <ian@airs.com> | 1999-06-13 10:16:43 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 1999-06-13 10:16:43 +0000 |
commit | d7ec8102d915a3d515a42008965d49dd1b617b7a (patch) | |
tree | ee08b9f0effe33dcd53cb191f45fa0c68ddef763 | |
parent | 3e2699126a6d93df5a878b0437781200cadfc0bc (diff) | |
download | gdb-d7ec8102d915a3d515a42008965d49dd1b617b7a.zip gdb-d7ec8102d915a3d515a42008965d49dd1b617b7a.tar.gz gdb-d7ec8102d915a3d515a42008965d49dd1b617b7a.tar.bz2 |
* 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.
-rw-r--r-- | binutils/ChangeLog | 14 | ||||
-rw-r--r-- | binutils/deflex.l | 9 | ||||
-rw-r--r-- | binutils/defparse.y | 30 |
3 files changed, 43 insertions, 10 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog index 4adb7d4..8e7ba4a 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,17 @@ +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. diff --git a/binutils/deflex.l b/binutils/deflex.l index e7fa362..928c42c 100644 --- a/binutils/deflex.l +++ b/binutils/deflex.l @@ -1,6 +1,6 @@ %{/* 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. @@ -50,6 +50,13 @@ int linenumber; "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; } diff --git a/binutils/defparse.y b/binutils/defparse.y index 1cb6360..5718d46 100644 --- a/binutils/defparse.y +++ b/binutils/defparse.y @@ -1,6 +1,6 @@ %{ /* 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. @@ -30,7 +30,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ %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 @@ -45,7 +46,7 @@ start: start command 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);} @@ -61,7 +62,6 @@ command: explist: /* EMPTY */ - | expline | explist expline ; @@ -108,10 +108,13 @@ opt_number: ',' NUMBER { $$=$2;} ; 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: @@ -153,5 +156,14 @@ opt_base: BASE '=' NUMBER { $$= $3;} | { $$=-1;} ; - +option_list: + /* empty */ + | option_list opt_comma option + ; +option: + INITINSTANCE + | INITGLOBAL + | TERMINSTANCE + | TERMGLOBAL + ; |