Fix occasional bug where deleting flex's input
buffer happens earlier than flex expects
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
{
// tack on the command element
terminate_graph (startnode, currnode, element);
- cleanup();
}
| sentence_root cmd_token_seq '.' placeholder_token
{
// tack on the command element
terminate_graph (startnode, currnode, element);
- cleanup();
}
sentence_root: WORD
yydebug = 0;
// parse command into DFA
- yyparse(cmd, start);
+ yyparse (cmd, start);
+
+ /* cleanup */
+ cleanup ();
return start;
}
free (docstr_start);
/* cleanup lexer */
- cleanup_lexer();
+ cleanup_lexer ();
/* clear state pointers */
seqhead = NULL;