Use the same location.hh and position.hh in all parsers.
* src/misc/location.hh, src/misc/position.hh: New files, from Bison 2.7. * src/misc/Makefile.am: Distribute them. * src/eltlparse/Makefile.am, src/eltlparse/eltlparse.yy, src/eltlparse/parsedecl.hh, src/eltlparse/public.hh, src/kripkeparse/Makefile.am, src/kripkeparse/kripkeparse.yy, src/kripkeparse/parsedecl.hh, src/kripkeparse/public.hh, src/ltlparse/Makefile.am, src/ltlparse/fmterror.cc, src/ltlparse/ltlparse.yy, src/ltlparse/parsedecl.hh, src/ltlparse/public.hh, src/neverparse/Makefile.am, src/neverparse/neverclaimparse.yy, src/neverparse/parsedecl.hh, src/neverparse/public.hh, src/tgbaparse/Makefile.am, src/tgbaparse/parsedecl.hh, src/tgbaparse/public.hh, src/tgbaparse/tgbaparse.yy: Adjust to use and include misc/location.hh. * NEWS: Mention this change.
This commit is contained in:
parent
a0f5d53ea4
commit
8c2d7fcb7f
25 changed files with 436 additions and 125 deletions
|
|
@ -1,5 +1,6 @@
|
|||
## Copyright (C) 2008, 2011 Laboratoire de Recherche et Développement
|
||||
## de l'Epita (LRDE).
|
||||
## -*- coding: utf-8 -*-
|
||||
## Copyright (C) 2008, 2011, 2013 Laboratoire de Recherche et
|
||||
## Développement de l'Epita (LRDE).
|
||||
##
|
||||
## This file is part of Spot, a model checking library.
|
||||
##
|
||||
|
|
@ -28,8 +29,6 @@ ELTLPARSE_YY = eltlparse.yy
|
|||
FROM_ELTLPARSE_YY_MAIN = eltlparse.cc
|
||||
FROM_ELTLPARSE_YY_OTHERS = \
|
||||
stack.hh \
|
||||
position.hh \
|
||||
location.hh \
|
||||
eltlparse.hh
|
||||
FROM_ELTLPARSE_YY = $(FROM_ELTLPARSE_YY_MAIN) $(FROM_ELTLPARSE_YY_OTHERS)
|
||||
|
||||
|
|
@ -54,7 +53,5 @@ libeltlparse_la_SOURCES = \
|
|||
eltlscan.ll \
|
||||
parsedecl.hh
|
||||
|
||||
eltlparse_HEADERS = \
|
||||
public.hh \
|
||||
location.hh \
|
||||
position.hh
|
||||
eltlparse_HEADERS = public.hh
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
/* Copyright (C) 2008, 2009, 2010, 2011, 2012 Laboratoire de Recherche
|
||||
** et Développement de l'Epita (LRDE).
|
||||
/* -*- coding: utf-8 -*-
|
||||
** Copyright (C) 2008, 2009, 2010, 2011, 2012, 2013 Laboratoire de
|
||||
** Recherche et Développement de l'Epita (LRDE).
|
||||
**
|
||||
** This file is part of Spot, a model checking library.
|
||||
**
|
||||
|
|
@ -22,6 +23,7 @@
|
|||
%name-prefix "eltlyy"
|
||||
%debug
|
||||
%error-verbose
|
||||
%define api.location.type "spot::location"
|
||||
|
||||
%code requires
|
||||
{
|
||||
|
|
@ -527,7 +529,7 @@ namespace spot
|
|||
if (flex_open(name))
|
||||
{
|
||||
error_list.push_back
|
||||
(parse_error(eltlyy::location(),
|
||||
(parse_error(spot::location(),
|
||||
spair("-", std::string("Cannot open file ") + name)));
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
// Copyright (C) 2008 Laboratoire de Recherche et Développement
|
||||
// -*- coding: utf-8 -*-
|
||||
// Copyright (C) 2008, 2013 Laboratoire de Recherche et Développement
|
||||
// de l'Epita (LRDE).
|
||||
//
|
||||
// This file is part of Spot, a model checking library.
|
||||
|
|
@ -20,11 +21,11 @@
|
|||
# define SPOT_ELTLPARSE_PARSEDECL_HH
|
||||
|
||||
#include "eltlparse.hh"
|
||||
#include "location.hh"
|
||||
#include "misc/location.hh"
|
||||
|
||||
# define YY_DECL \
|
||||
int eltlyylex (eltlyy::parser::semantic_type *yylval, \
|
||||
eltlyy::location *yylloc, \
|
||||
spot::location *yylloc, \
|
||||
spot::eltl::parse_error_list_t &pe)
|
||||
YY_DECL;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
// -*- coding: utf-8 -*-
|
||||
// Copyright (C) 2008, 2010, 2012 Laboratoire de Recherche et
|
||||
// Copyright (C) 2008, 2010, 2012, 2013 Laboratoire de Recherche et
|
||||
// Développement de l'Epita (LRDE).
|
||||
//
|
||||
// This file is part of Spot, a model checking library.
|
||||
|
|
@ -21,23 +21,15 @@
|
|||
# define SPOT_ELTLPARSE_PUBLIC_HH
|
||||
|
||||
# include "ltlast/formula.hh"
|
||||
// Unfortunately Bison 2.3 uses the same guards in all parsers :(
|
||||
# undef BISON_LOCATION_HH
|
||||
# undef BISON_POSITION_HH
|
||||
# include "ltlenv/defaultenv.hh"
|
||||
# include "ltlast/nfa.hh"
|
||||
# include "eltlparse/location.hh"
|
||||
# include "misc/location.hh"
|
||||
# include <string>
|
||||
# include <list>
|
||||
# include <map>
|
||||
# include <utility>
|
||||
# include <iosfwd>
|
||||
|
||||
// namespace
|
||||
// {
|
||||
// typedef std::map<std::string, spot::ltl::nfa::ptr> nfamap;
|
||||
// }
|
||||
|
||||
namespace spot
|
||||
{
|
||||
using namespace ltl;
|
||||
|
|
@ -49,7 +41,7 @@ namespace spot
|
|||
|
||||
typedef std::pair<std::string, std::string> spair;
|
||||
/// \brief A parse diagnostic <location, <file, message>>.
|
||||
typedef std::pair<eltlyy::location, spair> parse_error;
|
||||
typedef std::pair<spot::location, spair> parse_error;
|
||||
/// \brief A list of parser diagnostics, as filled by parse.
|
||||
typedef std::list<parse_error> parse_error_list;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue