Re: Header file of a Bison parser

2006-10-26 Thread Hans Aberg
On 26 Oct 2006, at 07:14, Pupeno wrote: Why not write another header file? Because I am a perfectionist ... Well, don't do computer programming, then... :-) ...and I want all my parser in parser.y, compiled into parser.c and .h. I don't want to have to include mypraser.h or whateverparser.

Re: Header file of a Bison parser

2006-10-26 Thread Joel E. Denny
On Thu, 26 Oct 2006, Hans Aberg wrote: > Are you sure it is {CODE} nowadays? - It used to be only a single line string. It's both... as of 2.3a. ___ help-bison@gnu.org http://lists.gnu.org/mailman/listinfo/help-bison

Re: Header file of a Bison parser

2006-10-26 Thread Hans Aberg
On 26 Oct 2006, at 01:54, Joel E. Denny wrote: The format is: %define "NAME" {CODE} A skeleton can reference it as: b4_NAME I'm not sure it's being used at the moment for anything, and I'm not sure of its stability. Are you sure it is {CODE} nowadays? - It used to be only a single

Re: Header file of a Bison parser

2006-10-25 Thread Joel E. Denny
On Thu, 26 Oct 2006, Pupeno wrote: > I see that I am running version 2.2 of Bison. Which will be the next version 2.4 should be the next stable release. > and is there some idea of when it's going to be released (I mean, a week ? a > month ? half a year ? a year ? ten years ?); what's the usua

Re: Header file of a Bison parser

2006-10-25 Thread Pupeno
On Tuesday 24 October 2006 22:27, Joel E. Denny wrote: > On Tue, 24 Oct 2006, Pupeno wrote: > > I have a Bison parser, parser.y, which generates a C source file, > > parser.c and its header file, parser.h. > > I want to put something in parser.h: the declaration/prototype of a > > function that is

Re: Header file of a Bison parser

2006-10-25 Thread Pupeno
On Tuesday 24 October 2006 17:50, Hans Aberg wrote: > Why not write another header file? Because I am a perfectionist and I want all my parser in parser.y, compiled into parser.c and .h. I don't want to have to include mypraser.h or whateverparser.h. > Also note that names starting with "_" are

Re: Header file of a Bison parser

2006-10-25 Thread Joel E. Denny
On Wed, 25 Oct 2006, Hans Aberg wrote: > What is the state about a more general construct like > %define {code} > - there appeared to be something to that effect in the Bison-Patches list, but > I haven't tried it. The format is: %define "NAME" {CODE} A skeleton can reference it as: b4_

Re: Header file of a Bison parser

2006-10-25 Thread Hans Aberg
On 25 Oct 2006, at 00:27, Joel E. Denny wrote: CVS Bison has two directives for writing verbatim code to the parser header file. However, they are still experimental, so I can't promise what they'll look like in the next stable release: 1. %requires {CODE} inserts CODE that YYSTYPE and YYLTYPE

Re: Header file of a Bison parser

2006-10-24 Thread Joel E. Denny
On Tue, 24 Oct 2006, Pupeno wrote: > I have a Bison parser, parser.y, which generates a C source file, parser.c > and its header file, parser.h. > I want to put something in parser.h: the declaration/prototype of a function > that is in parser.y and ends up in parser.c. This is because this functi

Re: Header file of a Bison parser

2006-10-24 Thread Hans Aberg
[Replies cc Help-Bison] Why not write another header file? Also note that names starting with "_" are reserved for compiler implementation. Hans Aberg On 24 Oct 2006, at 18:31, Pupeno wrote: Hello, I have a Bison parser, parser.y, which generates a C source file, parser.c and its he

Header file of a Bison parser

2006-10-24 Thread Pupeno
Hello, I have a Bison parser, parser.y, which generates a C source file, parser.c and its header file, parser.h. I want to put something in parser.h: the declaration/prototype of a function that is in parser.y and ends up in parser.c. This is because this function should be usable from other files