From bcd13b2dca135ae3c55a2c87a5de34259f77197a Mon Sep 17 00:00:00 2001 From: cuz Date: Sat, 3 Feb 2007 18:26:16 +0000 Subject: [PATCH] MagerValp: I adjusted some of the regexps in ca65html again, to better detect labels, and to eliminate false positives where labels start with three characters matching an opcode. git-svn-id: svn://svn.cc65.org/cc65/trunk@3769 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- src/ca65html/ca65html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ca65html/ca65html b/src/ca65html/ca65html index ffd281417..6062db0f6 100755 --- a/src/ca65html/ca65html +++ b/src/ca65html/ca65html @@ -388,7 +388,7 @@ sub Process1 { chop ($Line); # Check for a label - if ($Line =~ /^\s*(\@?)([_a-zA-Z]\w*)\s*(:|=)/) { + if ($Line =~ /^\s*(\@?)([_a-zA-Z]\w*)(:(?!=)|\s*:?=)/) # Is this a local label? if ($1 eq "\@") { @@ -559,7 +559,7 @@ sub Process2 { # Check for a label at the start of the line. If we have one, process # it and remove it from the line - if ($Line =~ s/^\s*?(\@?)([_a-zA-Z]\w*)(\s*)(:|=)//) { + if ($Line =~ s/^\s*?(\@?)([_a-zA-Z]\w*)(:(?!=)|\s*:?=)//) { # Is this a local label? if ($1 eq "\@") { @@ -825,7 +825,7 @@ sub Process2 { $OutLine .= Cleanup ($Line); # Check for instructions with labels - } elsif ($Line =~ /^($LabelIns)(\s+)(.*)$/) { + } elsif ($Line =~ /^($LabelIns)\b(\s+)(.*)$/) { # Print the instruction and white space $OutLine .= ColorizeKeyword ($1) . $2; @@ -854,7 +854,7 @@ sub Process2 { $OutLine .= $Operand; # Check for all other instructions - } elsif ($Line =~ /^($AllIns)(.*)$/) { + } elsif ($Line =~ /^($AllIns)\b(.*)$/) { # Colorize and print $OutLine .= ColorizeKeyword ($1) . Cleanup ($2); -- 2.39.5