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 641573 - Does not apply syntax highlighting to .lex files
Does not apply syntax highlighting to .lex files
Status: RESOLVED FIXED
Product: gtksourceview
Classification: Platform
Component: General
unspecified
Other Linux
: Normal normal
: ---
Assigned To: GTK Sourceview maintainers
GTK Sourceview maintainers
Depends on:
Blocks:
 
 
Reported: 2011-02-05 00:44 UTC by Moo
Modified: 2014-02-05 12:02 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
lex lang definition file (7.11 KB, patch)
2012-12-24 18:44 UTC, pogliamarci
none Details | Review
Flex/Lex language file (6.35 KB, patch)
2013-03-23 01:13 UTC, pogliamarci
none Details | Review
Lex spec file - patch (7.88 KB, patch)
2013-03-23 12:31 UTC, pogliamarci
none Details | Review
lex spec file - .lang file (6.17 KB, text/plain)
2013-03-23 12:32 UTC, pogliamarci
  Details
Lex spec file - patch (7.87 KB, patch)
2013-09-29 09:47 UTC, pogliamarci
none Details | Review
Lex spec file - .lang file (6.17 KB, application/octet-stream)
2013-09-29 09:48 UTC, pogliamarci
  Details

Comment 2 pogliamarci 2012-12-24 18:44:47 UTC
Created attachment 232203 [details] [review]
lex lang definition file

Hi,
As gtksourceview support highlighting only on yacc/bison files and not on lex/flex ones, I tried to make a .lang file for Lex/Flex lexical analyzer. It seems to highlight ok with the files linked by Moo and some other one. Hope it helps!

The patch has been created by git format-patch. If that's not the right way, let me know...
Comment 3 pogliamarci 2013-03-23 01:13:50 UTC
Created attachment 239597 [details] [review]
Flex/Lex language file

The same as the patch, just this is the pure .lang file without the git patch stuff
Comment 4 pogliamarci 2013-03-23 01:16:05 UTC
Hi,
I attached also the .lang file directly, and not the patch generated by the git tool, as I don't know what is the best format for you to review my stuff, in case it's useful. However, the content of the file is the same as the patch.
Comment 5 Paolo Borelli 2013-03-23 11:16:56 UTC
Hi Marcello, at a first glance the file looks pretty good, and attaching both the patch and the file has been a good choice (the patch allows us to apply it preserving the commit message etc, but the standalone file is useful for testing or for people who want to download the file)


Some minor comments

 - it probably belongs in "Sources" not in "Other"
 - please use two-space indentation
 - in the patch version make sure to also add the file to Makefile.am and po/POTFILES.in so that it is built and translated


Also keep in mind that we are in code-freeze for the upcoming release, so this we'll have to wait a bit before going in
Comment 6 Moo 2013-03-23 12:20:41 UTC
Why should code-freeze matter in this case?
This doesn't change existing functionality, and does not in any way risk causing instability.
I propose an exception and merge it it anyway.
Comment 7 pogliamarci 2013-03-23 12:31:52 UTC
Created attachment 239624 [details] [review]
Lex spec file - patch

Git commit patch containing lex specification file.
Changed indentation to two spaces, and added the file in Makefile.am and po/POTFILES.in
Comment 8 pogliamarci 2013-03-23 12:32:36 UTC
Created attachment 239625 [details]
lex spec file - .lang file

.lang file only (not the complete patch to the source tree)
Comment 9 pogliamarci 2013-03-23 12:34:16 UTC
Hi Paolo, I changed the two attachments according to what you said. I don't understand what you do mean as <<it probably belongs in "Sources" not in "Other">>
Comment 10 Sébastien Wilmet 2013-09-28 18:28:05 UTC
(In reply to comment #9)
> I don't
> understand what you do mean as <<it probably belongs in "Sources" not in
> "Other">>

It is the category of the lang file. Although nowadays gedit doesn't use the categories for choosing the highlighting mode.
Comment 11 pogliamarci 2013-09-29 09:47:51 UTC
Created attachment 256006 [details] [review]
Lex spec file - patch
Comment 12 pogliamarci 2013-09-29 09:48:25 UTC
Created attachment 256007 [details]
Lex spec file - .lang file
Comment 13 Sébastien Wilmet 2014-02-05 12:02:46 UTC
I've modified a bit the commit for the indentation and trailing spaces, and pushed it to the master branch:

https://git.gnome.org/browse/gtksourceview/commit/?id=06e032204a4af5776f17582e0bdd344fe3416934

Thanks.