After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 153438 - keywords including periods aren't highlighted
keywords including periods aren't highlighted
Status: RESOLVED FIXED
Product: gtksourceview
Classification: Platform
Component: Syntax files
1.0.x
Other Linux
: Normal normal
: ---
Assigned To: GTK Sourceview maintainers
GTK Sourceview maintainers
Depends on:
Blocks:
 
 
Reported: 2004-09-22 14:46 UTC by John Spray
Modified: 2006-08-06 09:54 UTC
See Also:
GNOME target: ---
GNOME version: 2.9/2.10


Attachments
Patch to fix fortran syntax highlighting (1.07 KB, patch)
2006-08-05 21:49 UTC, John Spray
committed Details | Review

Description John Spray 2004-09-22 14:46:21 UTC
Working with fortran.lang, I've tried to include operators such as ".LE." ".GE."
and so on.

I've tried "<keyword>\.LE\.</keyword>", and that doesn't match ".LE." or "\.LE\.". 

I've tried "<keyword>.LE.</keyword>", which of course matches all 4-letter
strings with "le" in the middle (although perversely not ".le." :-))

Shouldn't the first <keyword> I wrote work, if these are just normal regexs?
Comment 1 Paolo Maggi 2005-01-07 20:18:16 UTC
Sorry for the late reply.

Have you tried [.]LE[.]?

Comment 2 John Spray 2005-01-07 20:47:44 UTC
Neither of the below work either (not at all recognised, wildcard or period):

<keyword>[\.]foobar[\.]</keyword>
<keyword>[.]foobar[.]</keyword>
Comment 3 Rowan Lewis 2005-03-12 04:44:44 UTC
Is there supposed to be whitespace on either side of the operator? If so you
probably need to do something like this:

[ \t\n]?\.foobar\.[ \t\n]?

It should work without it the whitespace matching, but it doesn't. If you remove
the whitespace matching it will only work if there are non-whitespace characters
on either side. For example, this works:
this is some text with.foobar.in it.

And this fails:
this is some text with .foobar. in it.
Comment 4 Paolo Maggi 2006-07-26 10:02:19 UTC
It is not a bug in gtksourceview.
See scheme.lang to see how to solve your problem.
Comment 5 John Spray 2006-08-05 21:49:50 UTC
Created attachment 70280 [details] [review]
Patch to fix fortran syntax highlighting

Thanks for the pointer, patch for fortran highlighting in a similar vein attached.
Comment 6 Paolo Borelli 2006-08-06 09:11:00 UTC
Thanks John... I have not tried the patch but from a look it seems that it would match something like 'foo.OR.bar', if it's true, is that valid? should the beginning and end regex be something like '[ \t]\.' ?
Comment 7 John Spray 2006-08-06 09:21:15 UTC
Just tried "if (foo.and.bar) then" in both intel and GNU fortran compilers, both were happy with it, so I think it's fine the way it is.
Comment 8 Paolo Borelli 2006-08-06 09:27:40 UTC
awesome, thanks. I'll commit this afternoon