hoa: allocate the states once, after parsing the header

* src/hoaparse/hoaparse.yy: Allocate state after parsing the entire
header, not right after passing "States:".
* src/tgbatest/hoaparse.test: Reflect improved error message
about initial state.
This commit is contained in:
Alexandre Duret-Lutz 2014-11-21 14:00:19 +01:00
parent 71d21b378b
commit 8c8c2f0b7c
2 changed files with 44 additions and 32 deletions

View file

@ -143,7 +143,7 @@ State: 0 {0 1}
EOF
expecterr input <<EOF
input:4.8: state number is larger than state count...
input:4.1-8: initial state number is larger than state count...
input:3.1-9: ... declared here.
input:1.1-4.8: missing 'Acceptance:' header
input:6.8: state number is larger than state count...