abadi wrote on Sat Oct 28 13:43:44 MEST 2006:
Is it possible to customize the groupings of keywords which govern syntax highlighting in EPIC 0.5x? I can't find anything equivalent to EPIC 0.3x modes/perl.xml file which enabled you to do this as well as add keywords to the ones defined by EPIC. Thanks.
jploski wrote on Sat Oct 28 13:56:35 MEST 2006:
The current parser is ANTLR-based and not intended to be customizable. If you wish, you can try the procedure described at http://e-p-i-c.sourceforge.net/devguide/devguide.html and have a look at org.epic.core.parser (files perl.g and PerlLexerBase.java; keyword sets are defined in the latter one). The perl.g code is unintuitive, basically a series of evolving tweaks necessary to 1) support the syntax highlighting test cases from org.epic.perleditor-test/workspace/EPICTest/syntax.pl and 2) keep the performance at an acceptable level.
abadi wrote on Sat Oct 28 15:32:06 MEST 2006:
Thanks for the info. I see from the code that you dropped the KEYWORD3 set, which is a problem if, like me, you prefer core Perl functions and vars to have different highlighting. Was KEYWORD£ dropped for performance reasons?
jploski wrote on Sat Oct 28 15:55:23 MEST 2006:
The contents of KEYWORD3 were merged into KEYWORD2. For instance, I do not see why one would want to highlight differently 'printf' (used to be KEYWORD2) and 'sprintf' (used to be KEYWORD3)?
abadi wrote on Sat Oct 28 16:43:40 MEST 2006:
I agree that it does not make much sense to highlight 'printf' and 'sprintf' differently but I find that highlighting schemes which distinguish between variables and core functions make the code more readable. Still, this is only a minor quibble which does not diminish my appreciation of the effort you put into making Perl work under Eclipse. Thanks.
jploski wrote on Sat Oct 28 16:56:17 MEST 2006:
So you just want to be able to make variables appear another color than keywords? This is an easy fix (indeed, I see that Keyword3 still appears in the Preferences; I can easily add 'Variable' there).
abadi wrote on Sat Oct 28 17:16:24 MEST 2006:
Yes, this is what I was suggesting. Adding it as a 'Variable' item to the prefs dialog will make it even clearer.
Note: The above is an archived snapshot of a forum thread. Use the original thread at sf.net to post comments.