Error reporting used by the parser.
| 43 | |
| 44 | // Error reporting used by the parser. |
| 45 | void yyerror(const char* fmt, ...) { |
| 46 | std::fprintf(stderr, "[ERROR:%s:%d] ", g_curpath.c_str(), yylineno); |
| 47 | va_list args; |
| 48 | va_start(args, fmt); |
| 49 | std::vfprintf(stderr, fmt, args); |
| 50 | va_end(args); |
| 51 | std::fprintf(stderr, "\n"); |
| 52 | |
| 53 | throw std::runtime_error("thrift parser error"); |
| 54 | } |
| 55 | |
| 56 | // Simplified helpers referenced by the grammar. |
| 57 | std::string program_name(std::string filename) { |
no outgoing calls
no test coverage detected