Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

freeDOS DEBUG : parsing bug (Developers)

posted by Ninho E-mail, 06.03.2011, 16:48

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:

Back to the forum
Board view  Mix view
22049 Postings in 2034 Threads, 396 registered users, 188 users online (0 registered, 188 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum