parseaut: better error recovery for dstar automata

* src/parseaut/parseaut.yy: Here.
* src/tests/parseaut.test: More tests.
This commit is contained in:
Alexandre Duret-Lutz 2015-09-08 00:51:04 +02:00
parent 17a18f2890
commit 3b72826e6d
2 changed files with 66 additions and 17 deletions

View file

@ -962,6 +962,48 @@ State: 1
this is complete garbage!
--END--
and even more garbage
DRA v2 explicit
Comment: "Safra[NBA=2]"
States: 2
garbage /* <<--- */
Acceptance-Pairs: 1
Start: 0
AP: 1 "a"
---
State: 0
Acc-Sig:
0
1
State: 1
Acc-Sig: +0
0
1
more garbage
DRA v2 explicit
Comment: "Safra[NBA=2]"
States: 2
Acceptance-Pairs: 1
Start: 0
AP: 1 "a"
---
State: 0
Acc-Sig:
0
1
State: 1
Acc-Sig: +0
0
1
HOA: v1
States: 1
Start: 0
AP: 0
Acceptance: 1 Inf(0)
--BODY--
State: 0 {0}
[t] 0
--END--
garbage
EOF
se='syntax error, unexpected' # this is just to keep lines short
@ -972,10 +1014,14 @@ input:11.2: $se identifier
input:11.1-3: ignoring this invalid label
input:21.5-7: $se string, expecting integer
input:25.1: $se \$undefined
input:25.1-12: ignoring leading garbage
input:32.1-5: $se header name, expecting --END-- or State:
input:28.1-8: initial state 0 has no definition
input:25.1-12: leading garbage was ignored
input:37.1: $se 't'
input:43.1: $se \$undefined
input:56.1: $se \$undefined, expecting State: or end of DSTAR automaton
input:37.1-39.21: leading garbage was ignored
input:81.1: $se \$undefined
autfilt: failed to read automaton from input
EOF