* src/misc/bareword.hh, src/misc/bareword.cc: New files.
* src/misc/Makefile.am (libmisc_la_SOURCES, misc_HEADERS): Add them.
This commit is contained in:
parent
094ddca665
commit
4defec66b4
4 changed files with 70 additions and 0 deletions
|
|
@ -1,5 +1,8 @@
|
||||||
2004-10-20 Alexandre Duret-Lutz <adl@src.lip6.fr>
|
2004-10-20 Alexandre Duret-Lutz <adl@src.lip6.fr>
|
||||||
|
|
||||||
|
* src/misc/bareword.hh, src/misc/bareword.cc: New files.
|
||||||
|
* src/misc/Makefile.am (libmisc_la_SOURCES, misc_HEADERS): Add them.
|
||||||
|
|
||||||
* src/misc/modgray.hh, src/misc/modgray.cc: New files.
|
* src/misc/modgray.hh, src/misc/modgray.cc: New files.
|
||||||
* src/misc/Makefile.am (libmisc_la_SOURCES, misc_HEADERS): Add them.
|
* src/misc/Makefile.am (libmisc_la_SOURCES, misc_HEADERS): Add them.
|
||||||
* wrap/python/spot.i: Activate directors, and interface modgray.hh.
|
* wrap/python/spot.i: Activate directors, and interface modgray.hh.
|
||||||
|
|
|
||||||
|
|
@ -25,6 +25,7 @@ AM_CXXFLAGS = $(WARNING_CXXFLAGS)
|
||||||
miscdir = $(pkgincludedir)/misc
|
miscdir = $(pkgincludedir)/misc
|
||||||
|
|
||||||
misc_HEADERS = \
|
misc_HEADERS = \
|
||||||
|
bareword.hh \
|
||||||
bddalloc.hh \
|
bddalloc.hh \
|
||||||
bddlt.hh \
|
bddlt.hh \
|
||||||
escape.hh \
|
escape.hh \
|
||||||
|
|
@ -36,6 +37,7 @@ misc_HEADERS = \
|
||||||
|
|
||||||
noinst_LTLIBRARIES = libmisc.la
|
noinst_LTLIBRARIES = libmisc.la
|
||||||
libmisc_la_SOURCES = \
|
libmisc_la_SOURCES = \
|
||||||
|
bareword.cc \
|
||||||
bddalloc.cc \
|
bddalloc.cc \
|
||||||
escape.cc \
|
escape.cc \
|
||||||
freelist.cc \
|
freelist.cc \
|
||||||
|
|
|
||||||
40
src/misc/bareword.cc
Normal file
40
src/misc/bareword.cc
Normal file
|
|
@ -0,0 +1,40 @@
|
||||||
|
// Copyright (C) 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.
|
||||||
|
|
||||||
|
#include "bareword.hh"
|
||||||
|
#include <ctype.h>
|
||||||
|
|
||||||
|
namespace spot
|
||||||
|
{
|
||||||
|
bool
|
||||||
|
is_bare_word(const char* str)
|
||||||
|
{
|
||||||
|
// Bare words cannot be empty and should start with a letter.
|
||||||
|
if (!*str
|
||||||
|
|| !(isalpha(*str) || *str == '_'))
|
||||||
|
return false;
|
||||||
|
// The remaining of the word must be alphanumeric.
|
||||||
|
while (*++str)
|
||||||
|
if (!(isalnum(*str) || *str == '_'))
|
||||||
|
return false;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
25
src/misc/bareword.hh
Normal file
25
src/misc/bareword.hh
Normal file
|
|
@ -0,0 +1,25 @@
|
||||||
|
// Copyright (C) 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.
|
||||||
|
|
||||||
|
namespace spot
|
||||||
|
{
|
||||||
|
bool is_bare_word(const char* str);
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue