[Dot] Parsing failure message isn't informative and failure behavior is wrong
Ported Issue from Mantis Original ID: 2470 Reported By: yurivict
SEVERITY: NORMAL Submitted: 2014-07-20 05:16:43
OS BUILD: 9
'dot' command fails on one of .dot files with this message: Warning: : syntax error in line 4 near ''
There are 3 problems:
- It says 'Warning', but it actually stops at this point, produces no output and exits. So it should be an error instead.
- No column in provided, and line 4 in the input is very long. So line should be provided.
- 'dot' command exits with an error code 0, which normally indicates success. It should be something like -1.
We use flex for scanning, which doesn't provide much context, especially for scanning errors. The code now gives a bit more information and some context.