mirror of
https://github.com/softwarejanitor/as65.git
synced 2024-11-24 20:32:54 +00:00
Parsing fixes for ASC
This commit is contained in:
parent
5f3789c651
commit
67840c5ad6
20
as65.pl
20
as65.pl
@ -1963,6 +1963,26 @@ sub parse_line {
|
|||||||
$mnemonic = $2;
|
$mnemonic = $2;
|
||||||
$operand = '';
|
$operand = '';
|
||||||
$comment = $4;
|
$comment = $4;
|
||||||
|
} elsif ($line =~ /^(\S+)\s+([Aa][Ss][Cc])\s+(".+")\s+(;.+)$/) {
|
||||||
|
$label = $1;
|
||||||
|
$mnemonic = $2;
|
||||||
|
$operand = $3;
|
||||||
|
$comment = $4;
|
||||||
|
} elsif ($line =~ /^\s+([Aa][Ss][Cc])\s+(".+")\s+(;.+)$/) {
|
||||||
|
$label = '';
|
||||||
|
$mnemonic = $1;
|
||||||
|
$operand = $2;
|
||||||
|
$comment = $3;
|
||||||
|
} elsif ($line =~ /^(\S+)\s+([Aa][Ss][Cc])\s+(".+")\s*$/) {
|
||||||
|
$label = $1;
|
||||||
|
$mnemonic = $2;
|
||||||
|
$operand = $3;
|
||||||
|
$comment = '';
|
||||||
|
} elsif ($line =~ /^\s+([Aa][Ss][Cc])\s+(".+")\s*$/) {
|
||||||
|
$label = '';
|
||||||
|
$mnemonic = $1;
|
||||||
|
$operand = $2;
|
||||||
|
$comment = '';
|
||||||
} else {
|
} else {
|
||||||
print "SYNTAX ERROR! $lineno : $line\n";
|
print "SYNTAX ERROR! $lineno : $line\n";
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user