summaryrefslogtreecommitdiffstats
path: root/parser.l
diff options
context:
space:
mode:
Diffstat (limited to 'parser.l')
-rw-r--r--parser.l9
1 files changed, 7 insertions, 2 deletions
diff --git a/parser.l b/parser.l
index 6d6fca08..087a3db4 100644
--- a/parser.l
+++ b/parser.l
@@ -108,8 +108,13 @@ void yyerrorf(scanner_t *scanner, val fmt, ...)
if (opt_loglevel >= 1) {
va_list vl;
va_start (vl, fmt);
- format(std_error, lit("~a: (~a:~a): "), prog_string,
- parser->name, num(parser->lineno), nao);
+ if (opt_compat && opt_compat <= 114)
+ format(std_error, lit("~a: (~a:~a): "), prog_string,
+ parser->name, num(parser->lineno), nao);
+ else
+ format(std_error, lit("~a:~a: "),
+ parser->name, num(parser->lineno), nao);
+
vformat(std_error, fmt, vl);
put_char(chr('\n'), std_error);
va_end (vl);