How do lexical tie-ins work?

2010-04-23 Thread Zachary Carter
I'm curious on how Bison's algorithm works wrt lexical tie-ins[1]. The situation appears to me as a bit of a catch-22. The parser checks the lookahead token to decide when to reduce (right?) but the semantic action may alter the scanner so that the next token shifted is actually different than what

Re: How do lexical tie-ins work?

2010-04-23 Thread Zachary Carter
or example HEX ( onto the > stack and recognizes that it is time to reduce. Now the semantic action > sets the variable and the new context for the next scanner-call is well > defined. > Right. My method of recognizing "it is time to reduce" was too eager. I think I understand