Revert "Add never claim parser."

Such changes should not be pushed to master before they are finished
(this doesn't pass distcheck).

This reverts commit 9aaa638b27.
This commit is contained in:
Alexandre Duret-Lutz 2010-06-21 17:41:20 +02:00
parent 9aaa638b27
commit 498b44f742
13 changed files with 41 additions and 743 deletions

View file

@ -1,102 +0,0 @@
/* Copyright (C) 2003, 2004 Laboratoire d'Informatique de Paris 6 (LIP6),
** département Systèmes Répartis Coopératifs (SRC), Université Pierre
** et Marie Curie.
**
** 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.
*/
%option noyywrap
%option prefix="neverclaimyy"
%option outfile="lex.yy.c"
%{
#include <string>
#include "neverclaimparse/parsedecl.hh"
#define YY_USER_ACTION \
yylloc->columns(yyleng);
#define YY_NEVER_INTERACTIVE 1
typedef neverclaimyy::parser::token token;
%}
eol \n|\r|\n\r|\r\n
%%
%{
yylloc->step();
%}
/* skip blanks */
{eol} yylloc->lines(yyleng); yylloc->step();
[ \t]+ yylloc->step();
"/*".*"*/" yylloc->step();
"never" return token::NEVER;
"skip"|"skip;" return token::SKIP;
"if" return token::IF;
"fi"|"fi;" return token::FI;
"->" return token::ARROW;
"goto" return token::GOTO;
"(".*")"|"true"|"1"|"false"|"0" {
yylval->str =
new std::string(yytext, yyleng);
return token::FORMULA;
}
[a-zA-Z][a-zA-Z0-9_]* {
yylval->str = new std::string(yytext, yyleng);
return token::IDENT;
}
. return *yytext;
%{
/* Dummy use of yyunput to shut up a gcc warning. */
(void) &yyunput;
%}
%%
namespace spot
{
int
neverclaimyyopen(const std::string &name)
{
if (name == "-")
{
yyin = stdin;
}
else
{
yyin = fopen(name.c_str(), "r");
if (!yyin)
return 1;
}
return 0;
}
void
neverclaimyyclose()
{
fclose(yyin);
}
}