GNOME Bugzilla – Bug 634648
Syntax highlighting for COBOL
Last modified: 2011-01-11 23:42:59 UTC
gedit does not have syntax highlighting for COBOL.
Created attachment 175167 [details] Cobol.lang file and 2 COBOL source code examples
Hello, I currently working on that - Google Code In (http://www.google-melange.com/gci/task/show/google/gci2010/gnome/t129020358041)- and I think I am done. Can anyone think on any other "feature"? Some screenshots: http://img528.imageshack.us/img528/7208/pic1t.png http://img686.imageshack.us/img686/34/pic2oa.png What do you guys think?
hey, can you attach teh files separately, so it is easier to review.
Ooops, sorry :) And by the way, I forgot to check for "bad line comment" in my old (tar.gz) attachment. Compare pic2 (http://img686.imageshack.us/img686/34/pic2oa.png) with this one: http://img13.imageshack.us/img13/1013/pic3gi.png I am now going to attach the (new) files separately.
Created attachment 175168 [details] (new) cobol.lang file
Created attachment 175169 [details] cobol source file with some errors
Created attachment 175170 [details] cobol source file that works
Looks good nice work.
Are the programs lgpl? if not can you provide a small test lgpl?
Another thing, does cobol support escaped chars in strings? if not just remove it. and this line is not needed: <define-regex id="symbolchar">[-!+\\|=:&><]</define-regex>
Created attachment 175171 [details] cobol source file made by me Oh, good point :o I took the previous examples from here: http://www.csis.ul.ie/cobol/examples/default.htm#SimplePrograms "These programs are the copyright property of Michael Coughlan. You have permission to use these programs for your own personal use but you may not reproduce them in any published work without written permission from the author." Wikipedia has a Hello World (http://en.wikipedia.org/wiki/COBOL#Hello.2C_world), but I think it is too simple. I did a birth year guesser (attached). ================================================ brito@brito-ubuntu /home/brito/gci/cbl: $ cobc -x bday.cbl brito@brito-ubuntu /home/brito/gci/cbl: $ ./bday ==> How old are you? 18 ==> Had you already had birthday this year (y or n)? y Let me guess... You were born in 1992 ================================================ And COBOL can scape quotation marks putting another quotation mark before it (http://newsgroups.derkeiler.com/Archive/Comp/comp.sys.tandem/2008-02/msg00055.html). Ex: DISPLAY "Quotations marks: "" there" I am testing with another special characters.
Created attachment 175173 [details] (new 2) cobol.lang file Changelog: - Took out unnecessary line that I forgot to remove when copied from prolog.lang (thanks Ignacio) - Took out regex to scape chars - Added credits to regex on bad-comment-line
I made minor cleanup and I pushed it. Thanks a lot for it.
For the records: http://git.gnome.org/browse/gtksourceview/commit/?id=7a66e39041776bacaa7a151cc7510e0612173dec http://git.gnome.org/browse/gtksourceview/commit/?id=9b17bbb38e0728591aec7cdca684d9a928570658