bin: factor the code to read LTL formulas from -f or -F.
* src/bin/common_finput.cc, src/bin/common_finput.hh: Define the processor class. * src/bin/ltl2tgba.cc, src/bin/ltl2tgta.cc, src/bin/ltlfilt.cc: Simplify accordingly.
This commit is contained in:
parent
467bf378a8
commit
ecca4ba53e
5 changed files with 155 additions and 202 deletions
|
|
@ -51,4 +51,30 @@ const spot::ltl::formula*
|
|||
parse_formula(const std::string& s, spot::ltl::parse_error_list& error_list);
|
||||
|
||||
|
||||
class job_processor
|
||||
{
|
||||
public:
|
||||
virtual ~job_processor()
|
||||
{
|
||||
}
|
||||
|
||||
virtual int
|
||||
process_formula(const spot::ltl::formula* f,
|
||||
const char* filename = 0, int linenum = 0) = 0;
|
||||
|
||||
virtual int
|
||||
process_string(const std::string& str,
|
||||
const char* filename = 0, int linenum = 0);
|
||||
virtual int
|
||||
process_stream(std::istream& is, const char* filename);
|
||||
|
||||
virtual int
|
||||
process_file(const char* filename);
|
||||
|
||||
virtual int
|
||||
run();
|
||||
};
|
||||
|
||||
|
||||
|
||||
#endif // SPOT_BIN_COMMON_FINPUT_HH
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue