Re: Enum for token '0', EOF

2006-09-03 Thread Akim Demaille
Le 29 juil. 06 à 07:13, Joel E. Denny a écrit : + Clean up handling of %destructor for the end token (token 0). Nice patch. Since we are making BOF and EOF more like regular tokens, we might be able to simplify the skeletons even further by attaching the initial-action as a regular (mi

Re: Enum for token '0', EOF

2006-07-28 Thread Joel E. Denny
On Tue, 25 Jul 2006, Joel E. Denny wrote: > On Wed, 12 Jul 2006, Joel E. Denny wrote: > > > I went ahead. As far as I can tell, all the skeletons now (after my > > uncommitted patch below) consistently pop EOF one time upon a successful > > parse. > > I'd like to commit this patch. I'll do s

Re: Enum for token '0', EOF

2006-07-25 Thread Joel E. Denny
On Wed, 12 Jul 2006, Joel E. Denny wrote: > I went ahead. As far as I can tell, all the skeletons now (after my > uncommitted patch below) consistently pop EOF one time upon a successful > parse. I'd like to commit this patch. I'll do so in a few days if there are no objections. > I don't u

Re: Enum for token '0', EOF

2006-07-11 Thread Joel E. Denny
On Sun, 9 Jul 2006, Joel E. Denny wrote: > On Sun, 9 Jul 2006, Akim Demaille wrote: > > > I'd like to see its > > destructor called, just as in glr. > > I'll implement whatever we decide for glr.c. Maybe someone else can > handle yacc.c? I went ahead. As far as I can tell, all the skeletons

Re: Enum for token '0', EOF

2006-07-09 Thread Joel E. Denny
On Sun, 9 Jul 2006, Akim Demaille wrote: > I'd like to see its > destructor called, just as in glr. I'll implement whatever we decide for glr.c. Maybe someone else can handle yacc.c? > As a matter of fact, I have considered adding a BOF in complement of > EOF: it seems that this token would al

Re: Enum for token '0', EOF

2006-07-09 Thread Akim Demaille
Le 9 juil. 06 à 17:17, Joel E. Denny a écrit : On Sun, 9 Jul 2006, Akim Demaille wrote: A friend of mine was using END in his grammars in a very specific place (he was making error recovery right before END), that's why I didn't disable it. Sure, it's wrong to play with it, but quickly enoug

Re: Enum for token '0', EOF

2006-07-09 Thread Joel E. Denny
On Sun, 9 Jul 2006, Akim Demaille wrote: > A friend of mine was using END in his grammars in a very specific > place (he was making error recovery right before END), that's why > I didn't disable it. Sure, it's wrong to play with it, but quickly > enough you have a grammar that generates an empty

Re: Enum for token '0', EOF

2006-07-08 Thread Akim Demaille
Le 8 juil. 06 à 17:08, Joel E. Denny a écrit : On Sat, 8 Jul 2006, Frans Englich wrote: No, I don't have a need to put END in my grammar nor give it a semantic value, I can't think of a need either. The results look buggy with the current implementation, so maybe Bison should report an

Re: Enum for token '0', EOF

2006-07-08 Thread Joel E. Denny
On Sat, 8 Jul 2006, Frans Englich wrote: > No, I don't have a need to put END in my grammar nor give it a semantic > value, I can't think of a need either. The results look buggy with the current implementation, so maybe Bison should report an error for this usage. > but I need to signal it

Re: Enum for token '0', EOF

2006-07-08 Thread Frans Englich
On Wednesday 28 June 2006 15:01, Frans Englich wrote: > I am using a hand-written tokenizer unfortunately(would be more practical > to use Flex), and is using yytokentype in order to increase type safety of > the code. > > A problem arrives when I need to return EOF, the '0' token. It requires me >

Enum for token '0', EOF

2006-06-28 Thread Frans Englich
I am using a hand-written tokenizer unfortunately(would be more practical to use Flex), and is using yytokentype in order to increase type safety of the code. A problem arrives when I need to return EOF, the '0' token. It requires me to engage in static_cast'ing 0 to yytokentype, which is ugly