diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2006-07-09 20:36:33 +0000 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2006-07-09 20:36:33 +0000 |
commit | ddc8ede1abfd807faf5ddb0ee6c56cead0db84e3 (patch) | |
tree | 1f335b3b7622cb44a3cc373f3990cfb75c4cf074 /src/reader.h | |
parent | b37acfe18c54a04afb3093a145fe99668962889d (diff) | |
download | bison-ddc8ede1abfd807faf5ddb0ee6c56cead0db84e3.tar.gz |
* NEWS: Instead of %union, you can define and use your own union type
YYSTYPE if your grammar contains at least one <type> tag.
Your YYSTYPE need not be a macro; it can be a typedef.
* doc/bison.texinfo (Value Type, Multiple Types, Location Type):
(Union Decl, Decl Summary): Document this.
* data/glr.c (YYSTYPE): Implement this.
* data/glr.cc (YYSTYPE): Likewise.
* data/lalr1.cc (YYSTYPE): Likewise.
* data/yacc.c (YYSTYPE): Likewise.
* src/output.c (prepare): Output tag_seen_flag.
* src/parse-gram.y (declaration, grammar_declaration):
Use 'union_seen' rather than 'typed' to determine whether
%union has been seen, since grammars can now be typed without
%union.
(symbol_declaration, type.opt, symbol_def):
Keep track of whether a tag has been seen.
* src/reader.c (union_seen, tag_seen): New vars.
(typed): remove.
* src/reader.h (union_seen, tag_seen, typed): Likewise.
* src/scan-code.l (untyped_var_seen): New variable.
(handle_action_dollar): Adjust to above changes.
(handle_action_dollar, handle_action_at):
Improve overflow checking for outlandish numbers.
* tests/input.at (AT_CHECK_UNUSED_VALUES): Redo test to
avoid new diagnostics generated by above changes.
* tests/regression.at (YYSTYPE typedef): Add test to check
for type tags without %union.
Diffstat (limited to 'src/reader.h')
-rw-r--r-- | src/reader.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/reader.h b/src/reader.h index 52c059c4..43985965 100644 --- a/src/reader.h +++ b/src/reader.h @@ -59,7 +59,10 @@ void free_merger_functions (void); extern merger_list *merge_functions; /* Was %union seen? */ -extern bool typed; +extern bool union_seen; + +/* Was a tag seen? */ +extern bool tag_seen; /* Should rules have a default precedence? */ extern bool default_prec; |