ltlfilt, genltl: factor the common output options.
* src/bin/common_output.cc, src/bin/common_output.hh: New file with the common output code. * src/bin/Makefile.am: Add them. * src/bin/genltl.cc, src/bin/ltlfilt.cc: Simplify, using argp's children parser, and calling output_formula().
This commit is contained in:
parent
267183bda7
commit
e0873cc7d6
5 changed files with 155 additions and 86 deletions
41
src/bin/common_output.hh
Normal file
41
src/bin/common_output.hh
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
// -*- coding: utf-8 -*-
|
||||
// Copyright (C) 2012 Laboratoire de Recherche et Développement de
|
||||
// l'Epita (LRDE).
|
||||
//
|
||||
// This file is part of Spot, a model checking library.
|
||||
//
|
||||
// Spot is free software; you can redistribute it and/or modify it
|
||||
// under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation; either version 2 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Spot is distributed in the hope that it will be useful, but WITHOUT
|
||||
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
// or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
|
||||
// License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Spot; see the file COPYING. If not, write to the Free
|
||||
// Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
// 02111-1307, USA.
|
||||
|
||||
#ifndef SPOT_BIN_COMMON_OUTPUT_HH
|
||||
#define SPOT_BIN_COMMON_OUTPUT_HH
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include "config.h"
|
||||
#endif
|
||||
|
||||
#include <argp.h>
|
||||
#include "ltlvisit/tostring.hh"
|
||||
|
||||
enum output_format_t { spot_output, spin_output, utf8_output };
|
||||
extern output_format_t output_format;
|
||||
extern bool full_parenth;
|
||||
|
||||
extern const struct argp output_argp;
|
||||
|
||||
int parse_opt_output(int key, char* arg, struct argp_state* state);
|
||||
void output_formula(const spot::ltl::formula* f);
|
||||
|
||||
#endif // SPOT_BIN_COMMON_OUTPUT_HH
|
||||
Loading…
Add table
Add a link
Reference in a new issue