From 44f5ace3a1ccc47acfcf84761428d69cc8c7792d Mon Sep 17 00:00:00 2001 From: Karl Williamson Date: Fri, 6 Jul 2012 11:31:11 -0600 Subject: [PATCH] regen/regcomp.pl: Allow ';' in comments If a comment contained a semi-colon, the regular expression's greedy quantifier would think the portion of the comment before it was part of the data to be processed --- regen/regcomp.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/regen/regcomp.pl b/regen/regcomp.pl index 69643ca..eef5533 100644 --- a/regen/regcomp.pl +++ b/regen/regcomp.pl @@ -34,7 +34,7 @@ while () { next; } unless ($lastregop) { - ($name[$ind], $desc, $rest[$ind]) = /^(\S+)\s+([^\t]+)\s*;\s*(.*)/; + ($name[$ind], $desc, $rest[$ind]) = /^(\S+)\s+([^\t]+?)\s*;\s*(.*)/; ($type[$ind], $code[$ind], $args[$ind], $flags[$ind], $longj[$ind]) = split /[,\s]\s*/, $desc; ++$ind; -- 2.7.4