crasm
crasm copied to clipboard
Allow optional colon after a label
Since I am it.
This patch enables an optional colon after labels.
Doc:
SYNTAX
Each line of the assembly program should follow one of the following templates, where
the brackets delimit optional parts.
[;comment]
label = expression [;comment]
[label[:]] mnemonic operand [;comment]
label: [;comment]
label [;comment]
Comments are introduced by a semicolon (;) and extend to the end of the line. Labels
are identifiers containing up to 36 alphanumeric characters (including period and
underscore). Labels cannot start with a digit.
Crasm does not usually pays attention to the column position of the line components.
Extra spaces are generously allowed between these components. However, in the last
template, the label must start in the first column of the line. The only exception is
the case of a line containing only a label and possibly a comment. In that case the
label must start in column zero. Just add a colon (:) after the label to lift this
restriction.
I also updated (manually) the html file to match the man page. It was quite out of date.