* src/ltlparse/ltlscan.ll: Use ltlyy as %prefix.

* src/ltlparse/parsedecl.hh (YY_DECL): Rename yylex to ltlyylex.
* src/ltlparse/ltlparse.yy: Define yylex as ltlyylex.
This commit is contained in:
Alexandre Duret-Lutz 2003-06-04 14:03:30 +00:00
parent c4c90de3f6
commit 3fb593e542
5 changed files with 61 additions and 49 deletions

View file

@ -1,3 +1,9 @@
2003-06-04 Alexandre Duret-Lutz <aduret@src.lip6.fr>
* src/ltlparse/ltlscan.ll: Use ltlyy as %prefix.
* src/ltlparse/parsedecl.hh (YY_DECL): Rename yylex to ltlyylex.
* src/ltlparse/ltlparse.yy: Define yylex as ltlyylex.
2003-06-03 Alexandre Duret-Lutz <adl@gnu.org> 2003-06-03 Alexandre Duret-Lutz <adl@gnu.org>
* src/tgba/dictunion.cc, src/tgba/ltl2tgba.cc, * src/tgba/dictunion.cc, src/tgba/ltl2tgba.cc,

View file

@ -26,6 +26,11 @@ extern spot::ltl::formula* result;
before parsedecl.hh uses it. */ before parsedecl.hh uses it. */
#include "parsedecl.hh" #include "parsedecl.hh"
using namespace spot::ltl; using namespace spot::ltl;
/* Ugly hack so that Bison use ltlyylex, not yylex.
(%name-prefix doesn't work for the lalr1.cc skeleton
at the time of writing.) */
#define yylex ltlyylex
%} %}
/* Logical operators. */ /* Logical operators. */

View file

@ -1,4 +1,6 @@
%option noyywrap %option noyywrap
%option prefix="ltlyy"
%option outfile="lex.yy.c"
%{ %{
#include <string> #include <string>

View file

@ -5,10 +5,9 @@
#include "location.hh" #include "location.hh"
# define YY_DECL \ # define YY_DECL \
int yylex (yystype *yylval, yy::Location *yylloc) int ltlyylex (yystype *yylval, yy::Location *yylloc)
YY_DECL; YY_DECL;
void flex_set_buffer(const char *buf); void flex_set_buffer(const char *buf);
#endif // SPOT_LTLPARSE_PARSEDECL_HH #endif // SPOT_LTLPARSE_PARSEDECL_HH