X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-psi;a=blobdiff_plain;f=src%2Fparser.re;h=3375a0b5b88e2c9408ca063157ce05476ece365c;hp=69e76c8f124244f9c7920844569dfa5da11c3a80;hb=19f0eb5807fb8d0f3aa305f2476f094e66a02709;hpb=e16c15d5936c3b57b05e49570fb9526920de8188 diff --git a/src/parser.re b/src/parser.re index 69e76c8..3375a0b 100644 --- a/src/parser.re +++ b/src/parser.re @@ -47,20 +47,6 @@ PSI_Parser *PSI_ParserInit(PSI_Parser *P, const char *filename, psi_error_cb err return P; } -void PSI_ParserSyntaxError(PSI_Parser *P, const char *fn, size_t ln, const char *msg, ...) { - char buf[0x1000] = {0}; - va_list argv; - - va_start(argv, msg); - vsnprintf(buf, 0x1000-1, msg, argv); - va_end(argv); - - P->error(PSI_WARNING, "PSI syntax error on line %zu in '%s'%s%s", - ln, fn, msg ? ": ": "", buf); - - ++P->errors; -} - size_t PSI_ParserFill(PSI_Parser *P, size_t n) { if (P->flags & PSI_PARSER_DEBUG) { @@ -214,7 +200,7 @@ void PSI_ParserFree(PSI_Parser **P) #define RETURN(t) do { \ P->num = t; \ if (P->flags & PSI_PARSER_DEBUG) { \ - fprintf(stderr, "PSI> TOKEN: %d %.*s (EOF=%d %s:%zu:%zu)\n", \ + fprintf(stderr, "PSI> TOKEN: %d %.*s (EOF=%d %s:%u:%u)\n", \ P->num, (int) (P->cur-P->tok), P->tok, P->num == PSI_T_EOF, \ P->psi.file.fn, P->line, P->col); \ } \