bison-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Prefer error-verbose to error_verbose


From: Akim Demaille
Subject: Re: Prefer error-verbose to error_verbose
Date: Fri, 17 Apr 2009 08:33:22 +0200


Le 17 avr. 09 à 05:59, Joel E. Denny a écrit :

On Wed, 15 Apr 2009, Akim Demaille wrote:

I don't like too much this approach, I prefer simply welcoming dashes in the set of letters that can compose symbol names. Of course we would have to have warnings and errors in Yacc mode, but that should not be hard, we certainly have one well defined point by which we always pass to make a symbol name. I
also like that identifiers and directives are only separated by %.

But what do others think?

What about tokens and the union name? These can't have dashes. Do we let
the compiler catch that, or should Bison?

Interesting question. For the union, currently dots are allowed and not reported by Bison, leaving this task to the compiler.

%token accepts periods, but only C-identifiers are output in the parser file.

address@hidden /tmp $ cat foo.y
%token foo.bar
%token foo_bar
%%
exp: foo_bar foo.bar;
address@hidden /tmp $ grep foo.bar foo.tab.c
     foo_bar = 259
"$end", "error", "$undefined", "foo.bar", "foo_bar", "$accept", "exp", 0


We could continue like this.

So do you agree with this patch?

(Is there a significant difference between "dot" and "period"? Internet search is not really helping here.)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]