Hello list,
I am attempting to add filetype and highlighting support for COBOL but I am running into an error:
../scintilla/libscintilla.a(KeyWords.o): In function `Scintilla_LinkLexers()': ../scintilla/KeyWords.cxx:177: undefined reference to `lmCOBOL' collect2: ld returned 1 exit status
Copying most of the SQL lexer, because it is the closest in type to COBOL, I did a grep for "lmSQL" and got: scintilla/LexSQL.cxx:LexerModule lmSQL(SCLEX_SQL, ColouriseSQLDoc, "sql", FoldSQLDoc, sqlWordListDesc); scintilla/KeyWords.cxx: LINK_LEXER(lmSQL);
Also, my grep of lmCOBOL: scintilla/LexCOBOL.cxx:LexerModule lmCOBOL(SCLEX_COBOL, ColouriseCOBOLDoc, "cobol", FoldCOBOLDoc, cobolWordListDesc); scintilla/KeyWords.cxx: LINK_LEXER(lmCOBOL);
Provided in the attachment is the svn diff. Can someone maybe point me in the right direction with this code, please? I would like to see this in before 0.19 is released.
Thank you for your time, Seth Keiper
On Thu, 10 Sep 2009 12:06:54 -0400 Seth Keiper erstazi@gmail.com wrote:
I am attempting to add filetype and highlighting support for COBOL but I am running into an error:
../scintilla/libscintilla.a(KeyWords.o): In function `Scintilla_LinkLexers()': ../scintilla/KeyWords.cxx:177: undefined reference to `lmCOBOL' collect2: ld returned 1 exit status
Not sure. Maybe run ./autogen.sh again?
...
Provided in the attachment is the svn diff. Can someone maybe point me in the right direction with this code, please? I would like to see this in before 0.19 is released.
Have you seen the HACKING file?
A few points: We use an unmodified version of Scintilla - any changes to the COBOL lexer should be passed to Scintilla before we apply them. Using the C lexer style constants also means we don't have to update and maintain the cobol copies in editor.c.
Also, can you use: filetype_make_title(ft, TITLE_FILE);
Instead of: ft->title = g_strdup(_("COBOL file"));
Because the former saves another translation entry.
filetypes.cob should be called filetypes.cobol IIRC so Geany can see it.
Was including filetypes.cpy in the patch a mistake?
Regards, Nick
On Thu, Sep 10, 2009 at 12:27 PM, Nick Treleaven nick.treleaven@btinternet.com wrote:
On Thu, 10 Sep 2009 12:06:54 -0400 Seth Keiper erstazi@gmail.com wrote:
I am attempting to add filetype and highlighting support for COBOL but I am running into an error:
../scintilla/libscintilla.a(KeyWords.o): In function `Scintilla_LinkLexers()': ../scintilla/KeyWords.cxx:177: undefined reference to `lmCOBOL' collect2: ld returned 1 exit status
Not sure. Maybe run ./autogen.sh again?
Will do.
...
Provided in the attachment is the svn diff. Can someone maybe point me in the right direction with this code, please? I would like to see this in before 0.19 is released.
Have you seen the HACKING file?
Yes, this is where I got the info to add the COBOL lexr
A few points: We use an unmodified version of Scintilla - any changes to the COBOL lexer should be passed to Scintilla before we apply them. Using the C lexer style constants also means we don't have to update and maintain the cobol copies in editor.c.
I will submit this new lexer to the Scintilla project after the changes are made.
Also, can you use: filetype_make_title(ft, TITLE_FILE);
Instead of: ft->title = g_strdup(_("COBOL file"));
Because the former saves another translation entry.
filetypes.cob should be called filetypes.cobol IIRC so Geany can see it.
Changing.
Was including filetypes.cpy in the patch a mistake?
Yes, this was a mistake.
Regards, Nick
Thank you, Seth
On Thu, 10 Sep 2009 18:57:11 -0400 Seth Keiper erstazi@gmail.com wrote:
Have you seen the HACKING file?
Yes, this is where I got the info to add the COBOL lexr
OK, it mentions about checking the Scintilla project first, but after several recent patches I just added a clearer warning.
A few points: We use an unmodified version of Scintilla - any changes to the COBOL lexer should be passed to Scintilla before we apply them. Using the C lexer style constants also means we don't have to update and maintain the cobol copies in editor.c.
I will submit this new lexer to the Scintilla project after the changes are made.
I wasn't clear; there's already a COBOL scintilla lexer - so I think the Scintilla maintainer would only accept a patch to improve the existing one.
Regards, Nick
On Sat, Sep 12, 2009 at 12:32 PM, Nick Treleaven nick.treleaven@btinternet.com wrote:
On Thu, 10 Sep 2009 18:57:11 -0400 Seth Keiper erstazi@gmail.com wrote:
Have you seen the HACKING file?
Yes, this is where I got the info to add the COBOL lexr
OK, it mentions about checking the Scintilla project first, but after several recent patches I just added a clearer warning.
Thanks, I really just want to contribute back as much as I am possible.
A few points: We use an unmodified version of Scintilla - any changes to the COBOL lexer should be passed to Scintilla before we apply them. Using the C lexer style constants also means we don't have to update and maintain the cobol copies in editor.c.
I will submit this new lexer to the Scintilla project after the changes are made.
I wasn't clear; there's already a COBOL scintilla lexer - so I think the Scintilla maintainer would only accept a patch to improve the existing one.
Awesome, I see this in scintzilla 2.01. what needs to happen to get this merged?
Hi Seth,
Since you top posted I've lost the thread.
Have you submitted a patch that successfully integrates either your own or the scintilla lexer into geany? Including the filetype code & a filetypes.??? file (what is the extension for cobol?)
Cheers Lex
2009/9/15 Seth Keiper erstazi@gmail.com:
On Sat, Sep 12, 2009 at 12:32 PM, Nick Treleaven nick.treleaven@btinternet.com wrote:
On Thu, 10 Sep 2009 18:57:11 -0400 Seth Keiper erstazi@gmail.com wrote:
Have you seen the HACKING file?
Yes, this is where I got the info to add the COBOL lexr
OK, it mentions about checking the Scintilla project first, but after several recent patches I just added a clearer warning.
Thanks, I really just want to contribute back as much as I am possible.
A few points: We use an unmodified version of Scintilla - any changes to the COBOL lexer should be passed to Scintilla before we apply them. Using the C lexer style constants also means we don't have to update and maintain the cobol copies in editor.c.
I will submit this new lexer to the Scintilla project after the changes are made.
I wasn't clear; there's already a COBOL scintilla lexer - so I think the Scintilla maintainer would only accept a patch to improve the existing one.
Awesome, I see this in scintzilla 2.01. what needs to happen to get this merged? _______________________________________________ Geany-devel mailing list Geany-devel@uvena.de http://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel
On Tue, 15 Sep 2009 11:26:29 +1000 Lex Trotman elextr@gmail.com wrote:
Have you submitted a patch that successfully integrates either your own or the scintilla lexer into geany? Including the filetype code & a filetypes.??? file (what is the extension for cobol?)
For most filetypes the conf file is just the lowercase filetype name - filetypes.cobol.
A few points: We use an unmodified version of Scintilla - any changes to the COBOL lexer should be passed to Scintilla before we apply them. Using the C lexer style constants also means we don't have to update and maintain the cobol copies in editor.c.
I will submit this new lexer to the Scintilla project after the changes are made.
I wasn't clear; there's already a COBOL scintilla lexer - so I think the Scintilla maintainer would only accept a patch to improve the existing one.
Awesome, I see this in scintzilla 2.01. what needs to happen to get this merged?
We decided to wait for the 2.02 release. Isn't there a LexCOBOL.cxx in a pre-2.0 Scintilla release?
[nmt@localhost geany]$ fgrep COBOL scintilla/include/SciLexer.h #define SCLEX_COBOL 92
You could change your patch to use the official COBOL lexer and send it here, then (optionally) send a patch for any enhancements for the lexer to the Scintilla project. Then when we next merge Scintilla, we'll automatically inherit the new enhancements.
Regards, Nick