Make sure the neverclaim parser works on the output of spin and
ltl2ba. * src/neverparse/neverclaimparse.yy: Accept multiple labels for the same state. Honor accepting states. Forward parse error from the parser used for guards. Accept "false" as a single instruction for a state. * src/neverparse/neverclaimscan.ll: Recognize "false" specifically, and remove the ";" hack. * src/tgba/tgbaexplicit.cc (tgba_explicit_string::~tgba_explicit_string): Adjust not to destroy a state twice. * src/tgba/tgbaexplicit.hh (tgba_explicit_string::add_state_alias): New function. * src/tgbatest/defs.in (SPIN, LTL2BA): New variables. * src/tgbatest/neverclaimread.test: Check error messages for syntax errors in guards. Make sure we can read the output of `spin -f' and `ltl2ba -f' on a few test formulae.
This commit is contained in:
parent
ac08c5abce
commit
fe1f59cd30
7 changed files with 173 additions and 43 deletions
|
|
@ -49,17 +49,17 @@ eol \n|\r|\n\r|\r\n
|
|||
"/*".*"*/" yylloc->step();
|
||||
|
||||
"never" return token::NEVER;
|
||||
"skip"|"skip;" return token::SKIP;
|
||||
"skip" return token::SKIP;
|
||||
"if" return token::IF;
|
||||
"fi"|"fi;" return token::FI;
|
||||
"fi" return token::FI;
|
||||
"->" return token::ARROW;
|
||||
"goto" return token::GOTO;
|
||||
"false"|"0" return token::FALSE;
|
||||
|
||||
"(".*")"|"true"|"1"|"false"|"0" {
|
||||
yylval->str =
|
||||
new std::string(yytext, yyleng);
|
||||
return token::FORMULA;
|
||||
}
|
||||
"(".*")"|"true"|"1" {
|
||||
yylval->str = new std::string(yytext, yyleng);
|
||||
return token::FORMULA;
|
||||
}
|
||||
|
||||
[a-zA-Z][a-zA-Z0-9_]* {
|
||||
yylval->str = new std::string(yytext, yyleng);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue