> On 16 Apr 2020, at 06:51, Akim Demaille <[email protected]> wrote: > >> Le 15 avr. 2020 à 18:42, Hans Åberg <[email protected]> a écrit : >> >>> On 15 Apr 2020, at 18:25, Akim Demaille <[email protected]> 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.
