1 |
|
2002-12-21 Paul Eggert <eggert@twinsun.com> |
2 |
|
|
3 |
|
If the user does not define YYSTYPE as a macro, Bison now declares it |
4 |
|
using typedef instead of defining it as a macro. POSIX requires this. |
5 |
|
For consistency, YYLTYPE is also declared instead of defined. |
6 |
|
|
7 |
|
%union directives can now have a tag before the `{', e.g., the |
8 |
|
directive `%union foo {...}' now generates the C code |
9 |
|
`typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility. |
10 |
|
The default union tag is `YYSTYPE', for compatibility with Solaris 9 |
11 |
|
Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE' |
12 |
|
instead of `yyltype'. |
13 |
|
|
14 |
|
`yystype' and `yyltype' are now obsolescent macros instead of being |
15 |
|
typedefs or tags; they are no longer documented and will be |
16 |
|
withdrawn in a future release. |
17 |
|
|
18 |
|
* data/glr.c (b4_location_type): Remove. |
19 |
|
(YYSTYPE): Renamed from yystype. |
20 |
|
(YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef. |
21 |
|
(struct YYLTYPE): Renamed from struct yyltype. |
22 |
|
(YYLTYPE): Renamed from yyltype. |
23 |
|
(yyltype, yystype): New (and obsolescent) macros, |
24 |
|
for backward compatibility. |
25 |
|
* data/yacc.c: Likewise. |
26 |
|
|
27 |
|
* data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user |
28 |
|
does not specify a union tag. This is for compatibility with |
29 |
|
Solaris 9 yacc. |
30 |
|
|
31 |
|
* src/parse-gram.y (add_param): 2nd arg is now char * not char |
32 |
|
const *, since it is now modified by stripping surrounding { }. |
33 |
|
(current_braced_code): Remove. |
34 |
|
(PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION, |
35 |
|
PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include |
36 |
|
trailing " {...}". Now of type <chars>. |
37 |
|
(grammar_declaration): Adjust to bundled tokens. |
38 |
|
(code_content): Remove; stripping is now done by add_param. |
39 |
|
(print_token_value): Print contents of bundled tokens. |
40 |
|
(token_name): New function. |
41 |
|
|
42 |
|
* src/reader.h (braced_code, current_braced_code): Remove. |
43 |
|
(token_name): New decl. |
44 |
|
|
45 |
|
* src/scan-gram.l (handle_dollar, handle_at): Now takes int |
46 |
|
token_type, not braced_code code_kind. All uses changed. |
47 |
|
(SC_PRE_CODE): New state, for scanning after a keyword that |
48 |
|
has (or usually has) an immediately-following braced code. |
49 |
|
(token_type): New local var, to keep track of which token type |
50 |
|
to return when scanning braced code. |
51 |
|
(<INITIAL>"%destructor", <INITIAL>"%lex-param", |
52 |
|
<INITIAL>"%parse-param", <INITIAL>"%printer, |
53 |
|
<INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE |
54 |
|
instead of returning a token type immediately. |
55 |
|
(<INITIAL>"{"): Set token type. |
56 |
|
(<SC_BRACED_CODE>"}"): Use it. |
57 |
|
(handle_action_dollar, handle_action_at): Now returns bool |
58 |
|
indicating success. Fail if ! current_rule; this prevents a core dump. |
59 |
|
(handle_symbol_code_dollar, handle_symbol_code_at): |
60 |
|
Remove; merge body into caller. |
61 |
|
(handle_dollar, handle_at): Complain in invalid contexts. |
62 |
|
|
63 |
|
* NEWS, doc/bison.texinfo: Document the above. |
64 |
|
* NEWS: Fix years and program names in copyright notice. |
65 |
|
|
66 |
2002-12-17 Paul Eggert <eggert@twinsun.com> |
2002-12-17 Paul Eggert <eggert@twinsun.com> |
67 |
|
|
68 |
* NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error |
* NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error |
10485 |
* REFERENCES: entered into RCS |
* REFERENCES: entered into RCS |
10486 |
----- |
----- |
10487 |
|
|
10488 |
Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. |
Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996, 1997, |
10489 |
|
1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. |
10490 |
|
|
10491 |
This file is part of GNU Bison. |
This file is part of Bison, the GNU Compiler Compiler. |
10492 |
|
|
10493 |
GNU Bison is free software; you can redistribute it and/or modify |
Bison is free software; you can redistribute it and/or modify |
10494 |
it under the terms of the GNU General Public License as published by |
it under the terms of the GNU General Public License as published by |
10495 |
the Free Software Foundation; either version 2, or (at your option) |
the Free Software Foundation; either version 2, or (at your option) |
10496 |
any later version. |
any later version. |
10497 |
|
|
10498 |
GNU Bison is distributed in the hope that it will be useful, |
Bison is distributed in the hope that it will be useful, |
10499 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
10500 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
10501 |
GNU General Public License for more details. |
GNU General Public License for more details. |
10502 |
|
|
10503 |
You should have received a copy of the GNU General Public License |
You should have received a copy of the GNU General Public License |
10504 |
along with GNU Bison; see the file COPYING. If not, write to |
along with Bison; see the file COPYING. If not, write to |
10505 |
the Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
the Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
10506 |
Boston, MA 02111-1307, USA. |
Boston, MA 02111-1307, USA. |