[gedit-list] Syntax coloring bug with perl
- From: Doug McNutt <douglist macnauchtan com>
- To: gedit-list gnome org
- Subject: [gedit-list] Syntax coloring bug with perl
- Date: Thu, 9 Apr 2009 13:28:34 -0600
There is a problem with syntax coloring for perl. I'm now on the
most recent ubuntu 8 distribution of gedit which is 2.24.2.
It appears that the << operator for "shift left" is being confused
with the << redirection that introduces a HERE document inside of
perl. The result it that << starts a block of text that continues
until the next blank line which I believe is sensed as the end of
block that follows a line like
$seed = $seed << 2;
I expect the variable $seed to be shifted left two bits and that
happens OK. It's the coloring that is all messed up until a blank,
not a comment, line is found. (That's likely because there is no text
after the << other than the trailing ;)
I had a look at /usr/share/gtksourceview-2.0/language-specs/perl.lang
and there are two places where "<<" appears and they correspond
to the shift operator and the HERE redirector. I sort of believe that
the problem is an insufficiently precise regular expression
describing the redirector syntax in this line.
<start><<\'(?P<HDB>\%{here-doc-bound-char}*)\'</start>
But programming by experiment is at best dangerous and I need some
answers to keep me out of trouble:
1. Is the XML file that is perl.lang documented anywhere? Is it part
of gedit or some other operation? It does not seem to reside in a
location owned by gedit.
2. Are the regular expressions precisely the same as those in perl's
Camel Book? If not where are they documented?
3. I can't compile gedit yet on my 64 bit ubuntu box but I can read
code. Can I have a pointer to the source file that reads the
perl.lang file? It is part of gedit or is it really part of the Gtk?
Has anything changed in 2.26 that relates to this problem?
4. When is perl.lang read? Can I keep gedit running while I use gedit
itself to edit the language file and test in another window?
5. Is there a place where I can find a structured list of
dependencies that will help me prepare ubuntu for compiling gedit on
my 64 bit machine? The errors go by so fast that I just can't seem to
get everything I need and one-at-a-time builds are not getting me
there.
--
--> In Christianity, man can have only one wife. This is known as monotony. <--
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]