From a5bb43c14ac04fb6230e21e817702495e5bd419d Mon Sep 17 00:00:00 2001 From: moculus Date: Wed, 11 Feb 2009 04:27:38 +0000 Subject: [PATCH] fixed perl quoting bug --HG-- branch : pmacs2 --- mode/perl.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mode/perl.py b/mode/perl.py index 0d733d3..734d967 100644 --- a/mode/perl.py +++ b/mode/perl.py @@ -153,7 +153,7 @@ class PerlGrammar(Grammar): RegionRule(r'quoted', r'q[rqx] *(?P<)', QuotedGrammar3, r'>'), RegionRule(r'quoted', r'q[rqx] *(?P\[)', QuotedGrammar4, r'\]'), RegionRule(r'quoted', r"q[rqx] *(?P')", Grammar, r"'"), - RegionRule(r'quoted', r'q[rqx] *(?P[^ #])', StringGrammar, r'%(delim)s'), + RegionRule(r'quoted', r'q[rqx] *(?P[^ a-zA-Z0-9#])', StringGrammar, r'%(delim)s'), RegionRule(r'quoted', r'q[rqx](?P#)', StringGrammar, r'#'), # quote operator: q() and qw() do not interpolate @@ -162,7 +162,7 @@ class PerlGrammar(Grammar): RegionRule(r'quoted', r'qw? *<', Grammar, r'>'), RegionRule(r'quoted', r'qw? *\[', Grammar, r'\]'), RegionRule(r'quoted', r'qw?#', Grammar, r'#'), - RegionRule(r'quoted', r'qw? *(?P[^ #])', Grammar, r'%(delim)s'), + RegionRule(r'quoted', r'qw? *(?P[^ a-zA-Z0-9#])', Grammar, r'%(delim)s'), PatternRule(r'perl_function', r"(?:[a-zA-Z_][a-zA-Z_0-9]*::)*[a-zA-Z_][a-zA-Z_0-9]*(?= *\()"), PatternRule(r'perl_namespace', r"(?:[a-zA-Z_][a-zA-Z_0-9]*\:\:)+(?:[a-zA-Z_][a-zA-Z_0-9]*)?"),