mirror of
https://github.com/softwarejanitor/as65.git
synced 2025-02-17 14:30:34 +00:00
Fix parsing bug
This commit is contained in:
parent
ec3aa37490
commit
2c4a35f31c
4
as65.pl
4
as65.pl
@ -1945,7 +1945,7 @@ sub parse_line {
|
|||||||
$mnemonic = '';
|
$mnemonic = '';
|
||||||
$operand = '';
|
$operand = '';
|
||||||
$comment = '';
|
$comment = '';
|
||||||
} elsif ($line =~ /^(\S+)\s+(\S+)$/) {
|
} elsif ($line =~ /^(\S+)\s+(\S+)\s*$/) {
|
||||||
$label = $1;
|
$label = $1;
|
||||||
$mnemonic = $2;
|
$mnemonic = $2;
|
||||||
$operand = '';
|
$operand = '';
|
||||||
@ -1981,7 +1981,7 @@ sub parse_line {
|
|||||||
$operand = $2;
|
$operand = $2;
|
||||||
$comment = '';
|
$comment = '';
|
||||||
} else {
|
} else {
|
||||||
print "SYNTAX ERROR! $lineno : $line\n";
|
print sprintf("SYNTAX ERROR! %-4d %s\n", $lineno, $line);
|
||||||
}
|
}
|
||||||
|
|
||||||
$label = '' unless defined $label;
|
$label = '' unless defined $label;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user