No need to bail out on vectors. As long as there are tokens left, we can
try to parse the rest. Also, print a message so the user knows what's
going on. Here is a testcase vcd:
$timescale 1 ns $end
$var wire 1 n0 addr_0 $end
$var wire 1 n1 addr_1 $end
$enddefinitions $end
#0
0n0
b1 n1
#1
1n0
b0 n1
#2
0n0
b1 n1
Signed-off-by: Wolfram Sang <redacted>
break;
}
} else if (strchr("bBrR", tokens[i][0]) != NULL) {
- /* A vector value, not supported yet. */
- break;
+ sr_dbg("Vector values not supported yet");
+ if (!tokens[++i])
+ /* No tokens left, bail out */
+ break;
+ else
+ /* Process next token */
+ continue;
} else if (strchr("01xXzZ", tokens[i][0]) != NULL) {
/* A new 1-bit sample value */
bit = (tokens[i][0] == '1');