]> granicus.if.org Git - graphviz/commitdiff
Reset flex start state if error occurs. Otherwise, the next call to the
authorEmden Gansner <emdenrg@google.com>
Sun, 9 Apr 2017 17:48:41 +0000 (13:48 -0400)
committerEmden Gansner <emdenrg@google.com>
Sun, 9 Apr 2017 17:48:41 +0000 (13:48 -0400)
lexer will potentially start in a state other than INITIAL.

lib/cgraph/scan.l

index 90eb395364a59131eb49595cd2c24971e8e2927e..37660455baa08bde8f56c4a6ede40276790f4c90 100644 (file)
@@ -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); }