bison-patches
[Top][All Lists]
Advanced

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

Re: [PATCH 3/5] c++: improvements on symbol kinds


From: Hans Åberg
Subject: Re: [PATCH 3/5] c++: improvements on symbol kinds
Date: Thu, 16 Apr 2020 10:12:47 +0200

> On 16 Apr 2020, at 06:51, Akim Demaille <address@hidden> wrote:
> 
>> Le 15 avr. 2020 à 18:42, Hans Åberg <address@hidden> a écrit :
>> 
>>> On 15 Apr 2020, at 18:25, Akim Demaille <address@hidden> wrote:
>>> 
>>> And token_type denotes the type which is a triple: token_kind_type, 
>>> value_type, location_type.
>>> 
>>> yylex returns the kind, and takes pointers to yylval (value) and yylloc 
>>> (location).
>> 
>> Currently, I return the token value,
> 
> That's called "token kind" here.

Yes, that is what I am complaining over. :-)

>> and the semantic and location values are passed through the argument. It is 
>> more logical to have them in the return, but bundling them together do not 
>> make them tokens,
> 
> Yes it does.  That's the whole point of using names: providing meaning to 
> words, and that's the meaning "token" has here.

Assigning new meaning to words might be confusing to the reader.

> Besides, you're describing api.token.constructor.

If you insist calling the return tokens, then its components could be called 
terminal, semantic and location values.





reply via email to

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