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 636512 - COBOL syntax hilighting for GtkSourceView-2.x
COBOL syntax hilighting for GtkSourceView-2.x
Status: RESOLVED FIXED
Product: gtksourceview
Classification: Platform
Component: Syntax files
unspecified
Other Linux
: Normal normal
: ---
Assigned To: GTK Sourceview maintainers
GTK Sourceview maintainers
Depends on:
Blocks:
 
 
Reported: 2010-12-05 12:12 UTC by bader.terra
Modified: 2014-02-15 12:53 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
COBOL lang file (20.65 KB, application/octet-stream)
2010-12-05 12:12 UTC, bader.terra
Details
COBOL lang file, II. (21.16 KB, application/octet-stream)
2011-01-25 14:53 UTC, bader.terra
Details
COBOL lang file III. (21.07 KB, application/octet-stream)
2011-02-19 07:10 UTC, bader.terra
Details
COBOL lang file, IV. (21.07 KB, text/plain)
2011-02-19 07:18 UTC, bader.terra
Details

Description bader.terra 2010-12-05 12:12:36 UTC
Created attachment 175869 [details]
COBOL lang file

Hi,

the file attached adds support for syntax hilighting for the COBOL programming lanuage. I wrote it some time ago and I'd like to contribute it.

Short question: Are there any differences between gtksourceview-2.x and 3.x?
I guess, but what kind of differences?

Greetings!
Comment 1 Ignacio Casal Quinteiro (nacho) 2010-12-05 22:12:50 UTC
This has been already added in master, http://git.gnome.org/browse/gtksourceview/commit/?id=157c6cd04df1352bf5ca9a3b6a36d29cbf4ea726

please check if you want the file and if something is missing feel free to provide a patch against it.
In relation to lang files there is no difference between 2.x and 3.x.
Comment 2 bader.terra 2010-12-07 14:55:59 UTC
First of all: Thanks for the response.

But I don't get it right now:
The file I provided adds support for COBOL (introduced 1960s) where the file you provided shows syntax hilighting for Go (the language Google introduced a while ago).

Maybe I'm just blind ;-)

Or shall the Go-file help me to assure quality?
Comment 3 Ignacio Casal Quinteiro (nacho) 2010-12-07 15:17:14 UTC
ups, sorry wrong link:
http://git.gnome.org/browse/gtksourceview/tree/data/language-specs/cobol.lang
Comment 4 Krzesimir Nowak 2010-12-07 19:57:17 UTC
Cobol lang file indeed does exist in master branch (gtksourceview-3.0), but it does not exist in gnome-2-30 branch (gtksourceview-2.0). Maybe it should be backported?
Comment 5 Ignacio Casal Quinteiro (nacho) 2010-12-19 01:16:49 UTC
Marking this as needinfo. Let us know if you want to improve the current cobol lang file.
Comment 6 bader.terra 2011-01-02 01:27:40 UTC
I hope everybody had a nice christmas and a good start.

I am sorry that my answer took a little longer. I had only limited time before christmas ;-)
Yeah, I want to improve the file. I will start in the next few days.

But I would be glad if someone could tell me how to do it correctly.
Shall I download it from the git repository and upload it here when I am done? Or is there a simpler method?

Greetings :-)
Comment 7 Ignacio Casal Quinteiro (nacho) 2011-01-02 11:50:19 UTC
Yep using git and attaching it here is the way to do it.
Comment 8 bader.terra 2011-01-25 14:52:00 UTC
So,

it took a while because I had some busy weeks.
The biggest change are many many many new keywords. Furthermore I did use small-case letters so that I could use my old keywords from the previous file and the new one has a consistent feel (but I will undo it if you prefer the upper-case style ;-) ).

I like the error style if you are writing in the first 6 columns ore behind the 80. column but compilers like OpenCOBOL have a flag '-free' that allows to write in these before or behind these columns. Does it make sense to remove it because of this point?

Greetings :-)
Comment 9 bader.terra 2011-01-25 14:53:09 UTC
Created attachment 179293 [details]
COBOL lang file, II.
Comment 10 Ignacio Casal Quinteiro (nacho) 2011-01-26 14:44:43 UTC
dunno, if cobol doesn't allow lowercase I think the keywords should be always uppercase. Also let's leave the error thingie for now, if somebody complains we can always remove it.
Comment 11 bader.terra 2011-01-26 17:43:06 UTC
Oh oh oh, I read my last comment... this english is... seems that I was a little dizzy yesterday :-)

> dunno, if cobol doesn't allow lowercase I think the keywords should be always
uppercase.

COBOL supports lowercase letters. You can write COBOL as you like but most (mainframe) developers use the uppercase style; it's like an unwritten law.

> Also let's leave the error thingie for now, if somebody complains we
can always remove it.

It's ok for the moment but I'm not very happy with this solution! In my opinion it should be supported also it's not default in COBOL programming.

So long :-)
Comment 12 Ignacio Casal Quinteiro (nacho) 2011-01-27 12:40:03 UTC
(In reply to comment #11)
> Oh oh oh, I read my last comment... this english is... seems that I was a
> little dizzy yesterday :-)
> 
> > dunno, if cobol doesn't allow lowercase I think the keywords should be always
> uppercase.
> 
> COBOL supports lowercase letters. You can write COBOL as you like but most
> (mainframe) developers use the uppercase style; it's like an unwritten law.
So then let's support both, I'd rather have it in uppercase but with the option of case-sensitive=false, see the pascal.lang to know how to do this.

> 
> > Also let's leave the error thingie for now, if somebody complains we
> can always remove it.
> 
> It's ok for the moment but I'm not very happy with this solution! In my opinion
> it should be supported also it's not default in COBOL programming.
> 
> So long :-)
Comment 13 bader.terra 2011-01-29 10:21:42 UTC
> So then let's support both, I'd rather have it in uppercase but with the option
> of case-sensitive=false, see the pascal.lang to know how to do this.

The case-sensitive=false option is already implemented in the file.
And is it really necessary to write all keywords in uppercase, too?
I only ask because that's a lot of keywords I'd have to change ;-)
Comment 14 Ignacio Casal Quinteiro (nacho) 2011-02-01 14:53:35 UTC
Oh! well I guess we can leave it in lower case :)
Comment 15 Ignacio Casal Quinteiro (nacho) 2011-02-09 22:13:58 UTC
So, is the latest patch ok? Haven't checked the diff though, I just want to know if it is the one to review or should I wait for an updated one?
Comment 16 bader.terra 2011-02-19 07:09:02 UTC
Sorry it took some time; I had no internet last week :'(

I have uploaded a new file which changes my mail adress. Otherwise there are no further changes and it's ready to review!

:-)
Comment 17 bader.terra 2011-02-19 07:10:26 UTC
Created attachment 181305 [details]
COBOL lang file III.

newest file
Comment 18 bader.terra 2011-02-19 07:18:23 UTC
Created attachment 181306 [details]
COBOL lang file, IV.
Comment 19 Ignacio Casal Quinteiro (nacho) 2011-04-12 12:49:36 UTC
The file looks good, let's put it in once we can add new features again. Just one comment I'd say to change this:

<default-regex-options case-sensitive="false">
  </default-regex-options>

to:
<default-regex-options case-sensitive="false"/>