Fix parsing bug

This commit is contained in:
Leeland Heins 2018-12-19 13:05:56 -06:00 committed by GitHub
parent ec3aa37490
commit 2c4a35f31c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1945,7 +1945,7 @@ sub parse_line {
$mnemonic = '';
$operand = '';
$comment = '';
} elsif ($line =~ /^(\S+)\s+(\S+)$/) {
} elsif ($line =~ /^(\S+)\s+(\S+)\s*$/) {
$label = $1;
$mnemonic = $2;
$operand = '';
@ -1981,7 +1981,7 @@ sub parse_line {
$operand = $2;
$comment = '';
} else {
print "SYNTAX ERROR! $lineno : $line\n";
print sprintf("SYNTAX ERROR! %-4d %s\n", $lineno, $line);
}
$label = '' unless defined $label;