[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: glr: include the created header
From: |
Akim Demaille |
Subject: |
Re: glr: include the created header |
Date: |
Tue, 27 Jun 2006 14:47:13 +0200 |
User-agent: |
Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux) |
I'm sorry for the delays.
I am not convinced this was the right move. I feel there is too many
possible choices here, driven by C's model where you split definitions
and declarations. BTW, I dislike %definition as opposed to
%declaration, because
extern int foo; // is a declaration
int foo; // is a definition
and we mean declarations here.
If we were programming in some other model than C or C++, we would not
have all these sections, and I much preferred when we had that
illusion. I understand that compatibility with Yacc is an issue, but
let's keep the bad things installed only when %yacc.
The fact that people use #define YYSTYPE is something which should
fight rather than encourage. Why don't we simply complement %union
with %struct and %typedef (I don't like the name of the latter, it is
too C oriented, but %type is not precise enough and already used, and
%yystype is... bah). Since we are making here an interface change, we
can.
I propose that
- we don't keep two %declaration keywords, that's only an implementation
detail.
- Having a keyword to clarify that we are exporting declarations is
nice, but let's keep it unsplit, and keep %{ %} as a synonym.
Something like %declare, or %declaration, or %export.
- We use the header in the generated parser.
- We introduce a keyword that means that they are local to the parser file,
maybe %private. It is pasted after the inclusion of the header.
- Re: glr: include the created header, (continued)
- Re: glr: include the created header, Joel E. Denny, 2006/06/17
- Re: glr: include the created header, Joel E. Denny, 2006/06/16
- Re: glr: include the created header, Akim Demaille, 2006/06/17
- Re: glr: include the created header, Joel E. Denny, 2006/06/17
- Re: glr: include the created header, Joel E. Denny, 2006/06/19
- Re: glr: include the created header, Joel E. Denny, 2006/06/19
- Re: glr: include the created header, Joel E. Denny, 2006/06/19
- Re: glr: include the created header, Paul Eggert, 2006/06/19
- Re: glr: include the created header, Joel E. Denny, 2006/06/19
- Re: glr: include the created header, Joel E. Denny, 2006/06/20
- Re: glr: include the created header,
Akim Demaille <=
- Re: glr: include the created header, Joel E. Denny, 2006/06/27
- Re: glr: include the created header, Akim Demaille, 2006/06/27
- Re: glr: include the created header, Joel E. Denny, 2006/06/27
- Re: glr: include the created header, Akim Demaille, 2006/06/28
- Re: glr: include the created header, Joel E. Denny, 2006/06/28
- Re: glr: include the created header, Joel E. Denny, 2006/06/28
- Re: glr: include the created header, Joel E. Denny, 2006/06/28
- Re: glr: include the created header, Akim Demaille, 2006/06/28
- Re: glr: include the created header, Joel E. Denny, 2006/06/28
- Re: glr: include the created header, Paul Eggert, 2006/06/28