* src/evtgbaparse/evtgbaparse.yy, src/evtgbaparse/evtgbascan.ll,
src/evtgbaparse/fmterror.cc, src/evtgbaparse/parsedecl.hh, src/evtgbaparse/public.hh, src/evtgbatest/product.cc, src/evtgbatest/readsave.cc, src/ltlparse/fmterror.cc, src/ltlparse/ltlparse.yy, src/ltlparse/parsedecl.hh, src/ltlparse/public.hh, src/tgbaparse/parsedecl.hh, src/tgbaparse/public.hh, src/tgbaparse/tgbaparse.yy: Update to Bison 2.0.
This commit is contained in:
parent
461fcd3732
commit
5cd58f9aaf
16 changed files with 64 additions and 66 deletions
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (C) 2003 Laboratoire d'Informatique de Paris 6 (LIP6),
|
||||
// Copyright (C) 2003, 2005 Laboratoire d'Informatique de Paris 6 (LIP6),
|
||||
// département Systèmes Répartis Coopératifs (SRC), Université Pierre
|
||||
// et Marie Curie.
|
||||
//
|
||||
|
|
@ -27,7 +27,7 @@
|
|||
#include "location.hh"
|
||||
|
||||
# define YY_DECL \
|
||||
int tgbayylex (yystype *yylval, yy::Location *yylloc)
|
||||
int tgbayylex (yystype *yylval, yy::location *yylloc)
|
||||
YY_DECL;
|
||||
|
||||
namespace spot
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ namespace spot
|
|||
/// @{
|
||||
|
||||
/// \brief A parse diagnostic with its location.
|
||||
typedef std::pair<yy::Location, std::string> tgba_parse_error;
|
||||
typedef std::pair<yy::location, std::string> tgba_parse_error;
|
||||
/// \brief A list of parser diagnostics, as filled by parse.
|
||||
typedef std::list<tgba_parse_error> tgba_parse_error_list;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 2003, 2004 Laboratoire d'Informatique de Paris 6 (LIP6),
|
||||
/* Copyright (C) 2003, 2004, 2005 Laboratoire d'Informatique de Paris 6 (LIP6),
|
||||
** département Systèmes Répartis Coopératifs (SRC), Université Pierre
|
||||
** et Marie Curie.
|
||||
**
|
||||
|
|
@ -80,6 +80,9 @@ typedef std::map<std::string, bdd> formula_cache;
|
|||
delete $$;
|
||||
} acc_list
|
||||
|
||||
%printer { debug_stream() << *$$; } STRING UNTERMINATED_STRING IDENT
|
||||
strident string condition
|
||||
|
||||
%%
|
||||
tgba: acceptance_decl lines
|
||||
| acceptance_decl
|
||||
|
|
@ -110,7 +113,7 @@ line: strident ',' strident ',' condition ',' acc_list ';'
|
|||
i != pel.end(); ++i)
|
||||
{
|
||||
// Adjust the diagnostic to the current position.
|
||||
Location here = @1;
|
||||
location here = @1;
|
||||
here.begin.line += i->first.begin.line;
|
||||
here.begin.column += i->first.begin.column;
|
||||
here.end.line =
|
||||
|
|
@ -201,14 +204,7 @@ acc_decl:
|
|||
%%
|
||||
|
||||
void
|
||||
yy::Parser::print_()
|
||||
{
|
||||
if (looka_ == STRING || looka_ == IDENT)
|
||||
YYCDEBUG << " '" << *value.str << "'";
|
||||
}
|
||||
|
||||
void
|
||||
yy::Parser::error_()
|
||||
yy::parser::error(const location_type& location, const std::string& message)
|
||||
{
|
||||
error_list.push_back(spot::tgba_parse_error(location, message));
|
||||
}
|
||||
|
|
@ -225,14 +221,14 @@ namespace spot
|
|||
if (tgbayyopen(name))
|
||||
{
|
||||
error_list.push_back
|
||||
(tgba_parse_error(yy::Location(),
|
||||
(tgba_parse_error(yy::location(),
|
||||
std::string("Cannot open file ") + name));
|
||||
return 0;
|
||||
}
|
||||
formula_cache fcache;
|
||||
tgba_explicit* result = new tgba_explicit(dict);
|
||||
tgbayy::Parser parser(debug, yy::Location(), error_list,
|
||||
env, result, fcache);
|
||||
tgbayy::parser parser(error_list, env, result, fcache);
|
||||
parser.set_debug_level(debug);
|
||||
parser.parse();
|
||||
tgbayyclose();
|
||||
return result;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue