Construction of parser (for format described in fileformat.txt) is a
little unclear; I think there should be one function for getting commands
from the file (or STDIN, etc), and it should take as an argument a
description of what state the program is in: reading instruments, reading
song data, other.
Then, the function can decide whether the length of argument in each line
is valid for the variable specified, rather than just checking if the
command is *capable* of taking an argument. It would return a structure
or fill in a buffer passed to it, with
-the actual command issued
-value given if applicable
-Possibly scale of values?
Eh, and that's it :)
It would consume any following newline characters? Or maybe that'd be
down to whatever function came next? Yes, I think it'd consume the next
newline, and leave future calls to digest any further newlines.
Should file support comments too?? Hmm :P

Addendum:
-State description argument is a pointer to a big structure describing
valid forms of arguments for each variable in the mode. Parser will check
if arguments supplied comply.
-It does indeed check for trailing newlines or EOF (or even whitespace,
but that's unofficial), and reports an error if it doesn't find them
after the command or argument.
-Yes it does have comments now, and also lines of pure whitespace are
ignored.
-Now rather than returning arguments for variable-setting commands, the buffer
contains the variables themselves, and the parser sets the values directly.
-Eventually a binary file format would be a million times easier, but
by the time the extra fields would be decided on, Patel will just be a
library :)
