Check-in Number:
|
4877 | |
Date: |
2004-Nov-28 15:17:52 (local)
2004-Nov-28 14:17:52 (UTC) |
User: | rse |
Branch: | |
Comment: |
Fix annotational error reporting in scanner/parser. |
Tickets: |
|
Inspections: |
|
Files: |
|
ossp-pkg/cfg/ChangeLog 1.24 -> 1.25
--- ChangeLog 2004/11/28 13:49:11 1.24
+++ ChangeLog 2004/11/28 14:17:52 1.25
@@ -10,6 +10,9 @@
Changes between 0.9.5 and 0.9.6 (27-Nov-2004 to xx-Dec-2004):
+ *) Fix annotational error reporting in scanner/parser.
+ [Ralf S. Engelschall <rse@engelschall.com>]
+
*) Escape non-printable characters of input extracts in error messages.
[Ralf S. Engelschall <rse@engelschall.com>]
|
|
ossp-pkg/cfg/cfg_syn.c 1.21 -> 1.22
--- cfg_syn.c 2004/11/28 13:49:11 1.21
+++ cfg_syn.c 2004/11/28 14:17:52 1.22
@@ -185,14 +185,14 @@
/* remember parsing error: part I (context part) */
cfg_fmt_sprintf(ctx->err_buf, ctx->err_len,
- "line %d, column %d: `%s'",
+ "line %d, column %d: `%s': ",
line, column, cpBuf);
free(cpBuf);
/* remember parsing error: part II (parsing part) */
n = strlen(ctx->err_buf);
va_start(ap, fmt);
- cfg_fmt_vsprintf(ctx->err_buf+n, sizeof(ctx->err_len)-n, fmt, ap);
+ cfg_fmt_vsprintf(ctx->err_buf+n, ctx->err_len-n, fmt, ap);
va_end(ap);
return;
|
|
ossp-pkg/cfg/cfg_syn_parse.y 1.9 -> 1.10
--- cfg_syn_parse.y 2004/11/20 12:54:07 1.9
+++ cfg_syn_parse.y 2004/11/28 14:17:52 1.10
@@ -53,7 +53,7 @@
/* generate verbose error messages and remember them inside the context */
#undef yyerror
#define yyerror(msg) \
- cfg_syn_error(CTX, CFG_ERR_SYN, &yylloc, msg)
+ cfg_syn_error(CTX, CFG_ERR_SYN, &yylloc, "%s", msg)
/* scanner state transition */
extern void cfg_syn_scan_push(cfg_syn_ctx_t *, const char *state);
|
|