23 Aug
2009
23 Aug
'09
12:59 p.m.
Try the attached solution. I took the regular expression parser and adapted it to use the base iterator for position_iterators. It's a bit of a hack so it probably shouldn't be added to spirit. And I haven't tested it much. Other solutions would be to write a bidirectional position iterator or just manually work out the positions after parsing. Or maybe track the position in the lexer, but I think that'd be hard with spirit. Daniel