tuliob / jsyntaxpane

Automatically exported from code.google.com/p/jsyntaxpane
0 stars 0 forks source link

Unable to change language keywords #27

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Unless I am mistaken, there is no way to change the keyword for a language.
This is a very useful feature because, for example, by changing the
keywords most of C++ based languages can be supported (the same lexer as
Java can be used)

Original issue reported on code.google.com by mavroprovato on 5 Sep 2008 at 1:23

GoogleCodeExporter commented 9 years ago
You can change the language by changing the Lexer.  It will be the most 
effecient,
and best performing solution.  JFLex generates very fast lexers, and adding the
keywords at run-time may degrade the performance.
One of the reasons for moving the latest source into maven was ease of 
rebuilding. 
All you need to do is change the lexer (or create a new one), and a re build 
will
rebuild the lexer class for you.
Having said that, I'm actually working on such an implemenation.  I'll need to 
verify
the performance.

Original comment by ayman.al...@gmail.com on 7 Sep 2008 at 6:51