Allow neverclaim guards of the form !(x)' or ! (x)'.

* src/neverparse/neverclaimscan.ll: Make the space between `!' and
`(' optional.  This fixes the patch from 2011-02-07 that made this
space mandatory...
* src/tgbatest/neverclaimread.test: Augment test case.
This commit is contained in:
Alexandre Duret-Lutz 2011-11-08 11:59:45 +01:00
parent 2422b63a36
commit 9130d6f58c
3 changed files with 12 additions and 3 deletions

View file

@ -1,3 +1,12 @@
2011-11-08 Alexandre Duret-Lutz <adl@lrde.epita.fr>
Allow neverclaim guards of the form `!(x)' or `! (x)'.
* src/neverparse/neverclaimscan.ll: Make the space between `!' and
`(' optional. This fixes the patch from 2011-02-07 that made this
space mandatory...
* src/tgbatest/neverclaimread.test: Augment test case.
2011-10-26 Alexandre Duret-Lutz <adl@lrde.epita.fr> 2011-10-26 Alexandre Duret-Lutz <adl@lrde.epita.fr>
Better documentation for print_tgba_run. Better documentation for print_tgba_run.

View file

@ -56,7 +56,7 @@ eol \n|\r|\n\r|\r\n
"goto" return token::GOTO; "goto" return token::GOTO;
"false"|"0" return token::FALSE; "false"|"0" return token::FALSE;
("!"[ \t]+)?"(".*")"|"true"|"1" { ("!"[ \t]*)?"(".*")"|"true"|"1" {
yylval->str = new std::string(yytext, yyleng); yylval->str = new std::string(yytext, yyleng);
return token::FORMULA; return token::FORMULA;
} }

View file

@ -34,7 +34,7 @@ fi;
T1: T1:
if if
:: (p1 && (! p0)) -> goto accept_all :: (p1 && (! p0)) -> goto accept_all
:: (p1) -> goto T1 :: !(p1) -> goto T1
:: ! (p1) -> goto T2_init :: ! (p1) -> goto T2_init
fi; fi;
accept_all: accept_all:
@ -53,7 +53,7 @@ digraph G {
1 -> 2 [label="p0 & p1\n"] 1 -> 2 [label="p0 & p1\n"]
2 [label="T1"] 2 [label="T1"]
2 -> 3 [label="p1 & !p0\n"] 2 -> 3 [label="p1 & !p0\n"]
2 -> 2 [label="p1\n"] 2 -> 2 [label="!p1\n"]
2 -> 1 [label="!p1\n"] 2 -> 1 [label="!p1\n"]
3 [label="accept_all"] 3 [label="accept_all"]
3 -> 3 [label="1\n{Acc[1]}"] 3 -> 3 [label="1\n{Acc[1]}"]