Monday, January 09, 2012

Syntax highlighting

I have used the ply.py package by David Beazley (http://www.dabeaz.com/ply/) to implement syntax highlighting in my ebe IDE.  Ply.py is "lex and yacc for Python".  I only needed the lex part of break out the different categories of tokens.  It was fairly easy to implement highlighting code for C/C++, Fortran and Assembly.  I like the appearance of the colorful assembly code.  There was apparently a tab before the 56 in the code which I did not notice when I took the screenshot, but the colors are still nice.


No comments: