I am curious about how bison's string literal tokens are stored.
Consider these definitions in myparser.y:
%token FOR %token TO "->" If I understand the way the system works, the first line will result in the string "FOR" being stored in yytname, and a system-generated number, perhaps 257 in this case, being stored in yytoknum. Is that correct?
What happens in the second line? I assume "TO" will end up in yytname and 258 in yytoknum, but where is the string literal "->" stored? I cannot find a vector for it.
My goal is to be able to iterate over these literals in my flex scanner, but I am not sure how to do so.
yytextin the lowest-level production it appears in, but it depends on the lookahead conditions and other things. Why do you think you need this?