
6 May
2008
6 May
'08
12:54 p.m.
Dear All, I tried to integrate my flex scanner into boost::sprit. I wrote my own iterator -- the value is int to represent the tokenid: struct CScannerIterator:std::iterator<input_iterator_tag, int, ptrdiff_t, int*, int&> { .... boost::any yylval; std::string m_sFileName; int m_iTokenId; int m_iLineNumber; }; Then I tried to write my parser -- using chlit<int>(TokenId) to represent a token returned from the parser: m_sExpression = chlit<int>(TK_INTEGER)[create_integer_expression(_rSelf.m_pStack)] The problem is that the action for the chlit rule is getting passed an int instead of the iterator. I need access to the yylval returned from the scanner. Any idea on how to accomplish this? Peter