From: Emden Gansner <emdenrg@google.com> Date: Sun, 9 Apr 2017 17:48:41 +0000 (-0400) Subject: Reset flex start state if error occurs. Otherwise, the next call to the X-Git-Tag: 2.42.0~181 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=dc616aac33ceba6bd4667fd21f6b348f9c7e1ced;p=graphviz Reset flex start state if error occurs. Otherwise, the next call to the lexer will potentially start in a state other than INITIAL. --- diff --git a/lib/cgraph/scan.l b/lib/cgraph/scan.l index 90eb39536..37660455b 100644 --- a/lib/cgraph/scan.l +++ b/lib/cgraph/scan.l @@ -277,6 +277,7 @@ void yyerror(char *str) agxbputc (&xb, '\n'); agerr(AGERR, "%s", agxbuse(&xb)); agxbfree(&xb); + BEGIN(INITIAL); } /* must be here to see flex's macro defns */ void aglexeof() { unput(GRAPH_EOF_TOKEN); }