Commit 7afd1042 authored by Alexandre Duret-Lutz's avatar Alexandre Duret-Lutz
Browse files

* src/tgbaparse/tgbaparse.yy: Add `%destructor's so the parser

does not leak on errors.
* src/tgbatest/ltl2tgba.cc: Free the automata if it could not be
fully parsed.
parent 86ff462f
2004-11-08 Alexandre Duret-Lutz <adl@src.lip6.fr>
* src/tgbaparse/tgbaparse.yy: Add `%destructor's so the parser
does not leak on errors.
* src/tgbatest/ltl2tgba.cc: Free the automata if it could not be
fully parsed.
* src/tgbaalgos/gtec/ce.cc (couvreur99_check_result::accepting_run):
Remove spurious FIXME.
......
/* Copyright (C) 2003 Laboratoire d'Informatique de Paris 6 (LIP6),
/* Copyright (C) 2003, 2004 Laboratoire d'Informatique de Paris 6 (LIP6),
** département Systèmes Répartis Coopératifs (SRC), Université Pierre
** et Marie Curie.
**
......@@ -63,6 +63,15 @@ typedef std::pair<bool, spot::ltl::formula*> pair;
%type <list> acc_list
%token ACC_DEF
%destructor { delete $$; } STRING UNTERMINATED_STRING IDENT strident string
%destructor { spot::ltl::destroy($$); } condition
%destructor {
for (std::list<spot::ltl::formula*>::iterator i = $$->begin();
i != $$->end(); ++i)
spot::ltl::destroy(*i);
delete $$;
} acc_list
%%
tgba: acceptance_decl lines | lines;
......
......@@ -410,7 +410,11 @@ main(int argc, char** argv)
spot::tgba_explicit* e;
to_free = a = e = spot::tgba_parse(input, pel, dict, env, debug_opt);
if (spot::format_tgba_parse_errors(std::cerr, pel))
return 2;
{
delete to_free;
delete dict;
return 2;
}
e->merge_transitions();
}
else
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment