>>> "Joel" == Joel E Denny <[EMAIL PROTECTED]> writes:
>> >> I've not sort out the details yet, that way ahead, but I'm thinking >> >> about something like >> >> >> >> return yy_symbol (token-type, token-value, token-location); >> >> > What is token-type? >> >> The int value returned by yylex, the kind of token that was returned >> (BRACED_CODE, INT, etc.). > In order to strongly type the token-value parameter in languages like C, > maybe we should create a family of functions something like: > return yy_symbol_BRACED_CODE (token-value, token-location); > return yy_symbol_INT (token-value, token-location); That's another possibility, agreed. > Then again, maybe I'm misunderstanding. Are you thinking yy_symbol > is a function that returns a struct/class containing the three > parameters (type, value, and location)? That's what I was > thinking. I was thinking about a (shame on me) macro to do that. I don't know how to do that with functions.