diff --git a/lib/cgraph/scan.l b/lib/cgraph/scan.l
index 94e4c17..efed606 100644
--- a/lib/cgraph/scan.l
+++ b/lib/cgraph/scan.l
@@ -224,7 +224,7 @@ void yyerror(char *str)
agxbput (&xb, buf);
agxbput (&xb, yytext);
agxbput (&xb,"'\n");
- agerr(AGWARN,agxbuse(&xb));
+ agerr(AGERR,agxbuse(&xb));
agxbfree(&xb);
}
/* must be here to see flex's macro defns */