emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: cperl mode comments still parsed and colored


From: Randal L. Schwartz
Subject: Re: cperl mode comments still parsed and colored
Date: Sun, 19 Aug 2007 16:57:25 -0700
User-agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.4 (berkeley-unix)

>>>>> "jidanni" == jidanni  <address@hidden> writes:

RLS> You've got gibberish there.
jidanni> OK, but you must admit that lines 2 and 3 of this have non-comment
jidanni> colors inside comments:
jidanni> #-*-cperl-*-
jidanni> #  ]{2} ]{2} too.
jidanni> address@hidden

And again, not typical Perl code.

That's because cperl-mode doesn't promise to be perfect. It actually *can't
be*: see my summary of why *no* parser can parse Perl without executing Perl
at <http://www.perlmonks.org/index.pl?node_id=44722>.  Perl cannot be
statically lexed.  That's incontrovertible.

We've all learned to allow cperl-mode to color Perl "mostly ok", knowing it
can be tricked by very atypical Perl code, including gibberish.  Your stuff is
still very atypical character sequences.  Stop doing that.  Show us a useful
Perl program that doesn't get colored right, and I'm sure Ilya will be happy
to take a stab at compromising cperl-mode a bit more to make it work again.
And even then, most of us have also learned to "give cperl-mode a bone"
occasionally to keep it happy.  It's definitely a lot better than perl-mode,
which required some serious contortions to get right, and why no serious Perl
hacker uses perl-mode any more, and why we're happy Ilya crafted cperl-mode to
get it "mostly right".  Ilya wrote half of the regular expression engine and
half the Perl debugger as well, so he's intimately familiar with trying
to wrangle text engines to do the right thing.

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<address@hidden> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!




reply via email to

[Prev in Thread] Current Thread [Next in Thread]