[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Use variants to support objects as semantic values.
From: |
Paolo Bonzini |
Subject: |
Re: [PATCH] Use variants to support objects as semantic values. |
Date: |
Tue, 04 Nov 2008 11:50:33 +0100 |
User-agent: |
Thunderbird 2.0.0.17 (Macintosh/20080914) |
> I just say that the java skeleton now uses %define stype, which is
> correlated. I regret that the names were not discussed first, now we
> face a lack of structure, although Joel had been careful up to now to
> propose something consistent.
"%define stype" goes with "#define YYSTYPE" in C/C++; it was introduced
before dotted names were introduced for %defines. Note that it is in
principle possible to move from "#define YYXYZ" to "%define xyz" for
this and other preprocessor macros in the C/C++ skeletons.
What about doing like this:
1) %union => use unions
2) %define stype => use given type as ::semantic_type
3) no %union, no %define stype, b4_tag_seen_flag=1,
%define global_tokens_and_yystype => do not define YYSTYPE at global
scope, and use YYSTYPE as ::semantic_type
4) no %union, no %define stype, b4_tag_seen_flag=1,
no %define global_tokens_and_yystype => use variants
5) no %union, no %define stype, b4_tag_seen_flag=0
=> use int as ::semantic_type
?
Paolo