Allow atomic propositions and identifiers like `X.Y'.
* src/ltlparse/ltlscan.ll: Do not recognize `.' as an AND. Allow it in atomic propositions. * src/evtgbaparse/evtgbascan.ll, src/tgbaparse/tgbascan.ll: Accept `.' in identifiers. * src/misc/bareword.cc (is_bareword): Accept `.' inside barewords, so that there is no need to quote `X.Y'. * src/ltltest/parse.test: Do not use `.' as and operator..
This commit is contained in:
parent
8ce39e09b2
commit
4a62224932
6 changed files with 36 additions and 18 deletions
|
|
@ -1,3 +1,5 @@
|
|||
// Copyright (C) 2011 Laboratoire de Recherche et Développement
|
||||
// de l'Epita (LRDE).
|
||||
// Copyright (C) 2004 Laboratoire d'Informatique de Paris 6 (LIP6),
|
||||
// département Systèmes Répartis Coopératifs (SRC), Université Pierre
|
||||
// et Marie Curie.
|
||||
|
|
@ -30,11 +32,11 @@ namespace spot
|
|||
{
|
||||
// Bare words cannot be empty and should start with a letter.
|
||||
if (!*str
|
||||
|| !(isalpha(*str) || *str == '_'))
|
||||
|| !(isalpha(*str) || *str == '_' || *str == '.'))
|
||||
return false;
|
||||
// The remaining of the word must be alphanumeric.
|
||||
while (*++str)
|
||||
if (!(isalnum(*str) || *str == '_'))
|
||||
if (!(isalnum(*str) || *str == '_' || *str == '.'))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue