From 2c4a35f31c2ff97961308becdb94a720710c1067 Mon Sep 17 00:00:00 2001 From: Leeland Heins Date: Wed, 19 Dec 2018 13:05:56 -0600 Subject: [PATCH] Fix parsing bug --- as65.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/as65.pl b/as65.pl index baaaee4..d3350fb 100644 --- a/as65.pl +++ b/as65.pl @@ -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;