Commit ebc3d649 authored by Alexandre Duret-Lutz's avatar Alexandre Duret-Lutz
Browse files

neverclaim: fix reporting of parse_boolean() errors

* src/hoaparse/hoaparse.yy: Correctly adjust the
location of error messagges.
* src/tgbatest/neverclaimread.test: Add test case.
parent d0525871
......@@ -849,9 +849,9 @@ nc-formula: nc-formula-or-ident
// Adjust the diagnostic to the current position.
spot::location here = @1;
here.end.line = here.begin.line + j.first.end.line - 1;
here.end.column = here.begin.column + j.first.end.column;
here.end.column = here.begin.column + j.first.end.column - 1;
here.begin.line += j.first.begin.line - 1;
here.begin.column += j.first.begin.column;
here.begin.column += j.first.begin.column - 1;
error_list.emplace_back(here, j.second);
}
bdd cond = bddfalse;
......
......@@ -300,6 +300,36 @@ cat stderr
grep input: stderr > stderrfilt
diff stderrfilt expected-err
# Empty guards should be diagnosed at the correct location
cat >input <<EOF
never { /* a U b */
T0_init:
if
:: ((b)) -> goto accept_all
:: ( ) -> goto T0_init
fi;
accept_all:
skip
}
EOF
run 2 ../../bin/autfilt --dot <input >stdout 2>stderr
grep '5.6-8: unexpected empty block' stderr
cat >expected <<EOF
digraph G {
0 [label="", style=invis, height=0]
0 -> 1
1 [label="0"]
1 -> 2 [label="b"]
1 -> 1 [label="0"]
2 [label="1", peripheries=2]
2 -> 2 [label="1\n{0}"]
}
EOF
diff stdout expected
cat >formulae<<EOF
a
FG a
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment