freeDOS DEBUG : parsing bug (Developers)
Hi All! and, this is primarily for Japheth to review :
In Debug a command line similar to this (never mind the numerics, made up as I type) :
- m0:34l4 0:334
... is, probably unexpectedly, interpreted as it were "M0" (=choose 8086 target proc, IIRC). In effect, the given command is like truncated after m0 - the rest of the line being ignored. The initially intended action would require a separator (space) after letter M, as was said another time...
I know, this is by design, although unfortunate IMHO, and was already underlined, BUT even if we were to agree with that parsing, there remains the important point which was NOT addressed last time that case was evoked, viz
In accordance with the stated lexical design, the example command, and similar ones, should never be accepted in the first place, at least not without an appropriate error message ! I am of the opinion this is a non disputable case of a [i]parsing/lexing bug. Since you most certainly want to flag the case, wouldn't it be better to accept the example line, interpreting it as a "move" like MS Debug would; change might require a little backtracking (just a guess) but would be beneficial in any case. Using some OTHER letter than M for processor choice would not be bad either, depends how you much you value the need for backward compatibility - since you are changing things along anyway, I submit this idea too.
Hope this is easily corrected without in-depth revising of the lex analysis. Should you mess with the lexer, you might as well look into being more liberal in accepted separators in general, in particular commas should probably be interchangeable with blank/tab. Also define a separator sign like "#" for the purpose of introducing COMMENTS (useful in scripts; maybe there is one already ?). Another useful extension could be a separator for multiple ASM instructions on the same line, maybe ";".
Yes, yes, I'm very sorry ;=)
---
Ninho
Complete thread:
- freeDOS DEBUG : parsing bug - Ninho, 06.03.2011, 16:48 (Developers)
- freeDOS DEBUG : parsing bug - Japheth, 08.03.2011, 09:13
- freeDOS DEBUG : "N" command bug - Ninho, 12.03.2011, 11:50
- freeDOS DEBUG : "N" command bug - Japheth, 16.03.2011, 10:21
- freeDOS DEBUG : "N" command bug - Ninho, 16.03.2011, 19:43
- freeDOS DEBUG : "N" command bug - Japheth, 16.03.2011, 10:21
- freeDOS DEBUG : "N" command bug - Ninho, 12.03.2011, 11:50
- freeDOS DEBUG : parsing bug - Japheth, 08.03.2011, 09:13