>> 3) no %union, no %define stype, b4_tag_seen_flag=1, >> %define global_tokens_and_yystype => do not define YYSTYPE at global > > I guess this is not what you meant here.
If you want an externally-defined YYSTYPE, you would have to do something like #define YYSTYPE my_semantic_type So in that case the %define would not define YYSTYPE anyway. I agree that these rules would be a damn mess to document and teach. :-( But it's actually a big loop. In your proposal... > Or maybe use impossible values ? > > %define semantic.type "%union" or "%variant" or "USER-TYPE". It's just %variant, after all %union still needs to be a separate directive if only for scanning purposes. And then it goes back to %define semantic.type.variant (or whatever we agree about, I would prefer types.semantic.variant or stype.variant), checking for conflicts in the skeleton, which is more or less what you are doing now except for the possibility to define a user semantic type. Go ahead with the patches, we'll sort it out at the end. Paolo
