help-bison
[Top][All Lists]
Advanced

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

Re: how to get left hand side symbol in action


From: Hans Åberg
Subject: Re: how to get left hand side symbol in action
Date: Fri, 10 May 2019 14:21:24 +0200

> On 10 May 2019, at 07:24, Akim Demaille <address@hidden> wrote:
> 
>> In practice you just need the symbol name as is. Nobody needs the 
>> translation,
> 
> I beg to disagree.  Nobody should translate the keyword "break",
> but
> 
>> # bison /tmp/foo.y
>> /tmp/foo.y:1.7: erreur: erreur de syntaxe, : inattendu, attendait char ou 
>> identifier ou <tag>
>>    1 | %token: FOO
>>      |       ^
> 
> looks stupid; "char", "identifier" and "<tag>" should be translated.

I think it should only output whatever is in the yytname_ table. Does not the 
translation taking place dynamically of that in the error message?





reply via email to

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