Re: how to get left hand side symbol in action

Hans Åberg <[email protected]>
Newsgroups gmane.comp.parsers.bison.general
Message-ID <[email protected]>
> On 10 May 2019, at 07:24, Akim Demaille <[email protected]> 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?



_______________________________________________
[email protected] https://lists.gnu.org/mailman/listinfo/help-bison
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.