| 3723 | } |
| 3724 | |
| 3725 | std::vector<std::tuple<int, int, std::string> > tokenize(const std::string &str) |
| 3726 | { |
| 3727 | ExpressionParser::YY_BUFFER_STATE buf = ExpressionParser_scan_string(str.c_str()); |
| 3728 | ExpressionParser::StringBufferCleaner cleaner(buf); |
| 3729 | std::vector<std::tuple<int, int, std::string> > result; |
| 3730 | int token; |
| 3731 | |
| 3732 | column = 0; |
| 3733 | try { |
| 3734 | while ( (token = ExpressionParserlex()) != 0) |
| 3735 | result.emplace_back(token, ExpressionParser::last_column, yytext); |
| 3736 | } |
| 3737 | catch (...) { |
| 3738 | // Ignore all exceptions |
| 3739 | } |
| 3740 | |
| 3741 | return result; |
| 3742 | } |
| 3743 | |
| 3744 | } |
| 3745 |
no test coverage detected