spot
1.0.2
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
bin
common_finput.hh
Go to the documentation of this file.
1
// -*- coding: utf-8 -*-
2
// Copyright (C) 2012 Laboratoire de Recherche et Développement de
3
// l'Epita (LRDE).
4
//
5
// This file is part of Spot, a model checking library.
6
//
7
// Spot is free software; you can redistribute it and/or modify it
8
// under the terms of the GNU General Public License as published by
9
// the Free Software Foundation; either version 3 of the License, or
10
// (at your option) any later version.
11
//
12
// Spot is distributed in the hope that it will be useful, but WITHOUT
13
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
14
// or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
15
// License for more details.
16
//
17
// You should have received a copy of the GNU General Public License
18
// along with this program. If not, see <http://www.gnu.org/licenses/>.
19
20
#ifndef SPOT_BIN_COMMON_FINPUT_HH
21
#define SPOT_BIN_COMMON_FINPUT_HH
22
23
#include "
common_sys.hh
"
24
25
#include <argp.h>
26
#include <vector>
27
#include "ltlparse/public.hh"
28
29
struct
job
30
{
31
const
char
*
str
;
32
bool
file_p
;
// true if str is a filename, false if it is a formula
33
34
job
(
const
char
*
str
,
bool
file_p
)
35
: str(str), file_p(file_p)
36
{
37
}
38
};
39
40
typedef
std::vector<job>
jobs_t
;
41
extern
jobs_t
jobs
;
42
extern
bool
lbt_input
;
43
44
extern
const
struct
argp
finput_argp
;
45
46
int
parse_opt_finput
(
int
key,
char
* arg,
struct
argp_state* state);
47
48
const
spot::ltl::formula
*
49
parse_formula
(
const
std::string& s,
spot::ltl::parse_error_list
& error_list);
50
51
52
class
job_processor
53
{
54
protected
:
55
bool
abort_run
;
// Set to true in process_formula() to abort run().
56
public
:
57
job_processor
();
58
59
virtual
~job_processor
()
60
{
61
}
62
63
virtual
int
64
process_formula
(
const
spot::ltl::formula
* f,
65
const
char
* filename = 0,
int
linenum = 0) = 0;
66
67
virtual
int
68
process_string
(
const
std::string& str,
69
const
char
* filename = 0,
int
linenum = 0);
70
virtual
int
71
process_stream
(std::istream& is,
const
char
* filename);
72
73
virtual
int
74
process_file
(
const
char
* filename);
75
76
virtual
int
77
run
();
78
};
79
80
81
82
#endif // SPOT_BIN_COMMON_FINPUT_HH
Please
comment
this page and
report errors
about it on
the RefDocComments page
.
Generated on Wed Mar 6 2013 09:25:14 for spot by
1.8.1.2