* src/ltlvisit/tostring.cc (is_bare_word): New function.
(to_string_visitor::visitor(const atomic_prop*)): Use is_bare_word to better check which atomic proposition need to be quoted. * src/ltlparse/ltlscan.ll: Do not allow identifiers starting with F_ or G_. * src/ltltest/equals.test, src/ltltest/tostring.test: More tests.
This commit is contained in:
parent
3802528bfd
commit
e9fd27e892
5 changed files with 39 additions and 6 deletions
|
|
@ -96,10 +96,10 @@ flex_set_buffer(const char* buf)
|
|||
used by a unary operator (F,G,X), unless this
|
||||
letter is followed by a digit in which case we assume
|
||||
it's an ATOMIC_PROP (even though F0 could be seen as Ffalse, we
|
||||
don't).
|
||||
don't, because Ffalse is never used in practice).
|
||||
*/
|
||||
<INITIAL>[a-zA-EH-WYZ_][a-zA-Z0-9_]* |
|
||||
<INITIAL>[FGX][0-9_][a-zA-Z0-9_]* |
|
||||
<INITIAL>[FGX][0-9][a-zA-Z0-9_]* |
|
||||
/*
|
||||
However if we have just parsed an atomic proposition, then we
|
||||
are not expecting another atomic proposition, so we can be stricter
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue