[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Enum for token '0', EOF
From: |
Akim Demaille |
Subject: |
Re: Enum for token '0', EOF |
Date: |
Sun, 9 Jul 2006 06:59:22 +0200 |
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 error for this usage.
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 language if you
play too hard, so I didn't care about adding a safety net.
but I need to signal it in my hand written tokenizer(and it is
messy to cast
0 to the yytokentype enum).
I'm guessing this feature was originally intended for no more than
just
that (and giving the end token a user-friendly string alias).
No it was not. The original motivation was truly to provide a string
alias while sticking to the existing interface for the other tokens.
- Re: Enum for token '0', EOF, Frans Englich, 2006/07/08
- Re: Enum for token '0', EOF, Joel E. Denny, 2006/07/08
- Re: Enum for token '0', EOF,
Akim Demaille <=
- Re: Enum for token '0', EOF, Joel E. Denny, 2006/07/09
- Re: Enum for token '0', EOF, Akim Demaille, 2006/07/09
- Re: Enum for token '0', EOF, Joel E. Denny, 2006/07/09
- Re: Enum for token '0', EOF, Joel E. Denny, 2006/07/12
- Re: Enum for token '0', EOF, Joel E. Denny, 2006/07/25
- Re: Enum for token '0', EOF, Joel E. Denny, 2006/07/29