void Analyse(const std::string& notation, Callback& cb) const override { for (std::string::const_iterator cursor = notation.begin(), lim = notation.end(); cursor != lim; ) { if (const TokensSet::Ptr tokens = ExtractLongestTokens(cursor, lim)) { tokens->Report(cb); cursor += tokens->LexemeSize(); } else { cb.AnalysisError(notation, cursor - notation.begin()); break; } } }