other people's code

Published November 16, 2004
Advertisement
So, I finally got around to starting to implement syntax highlighting for source blocks, so like a good programmer my first instinct was to look for components to reuse. Since I'm using C#, I first looked for C# syntax highlighting programs, but I couldn't find one with the level of customization I wanted, so I turned to C/C++ programs that I might be able to repackage as a .NET assembly.

The first C++ package I looked at was ancient, but updated incrementally over the years. Consequently it was a mess. Some source files were written in C, some were in C++. There were multiple flex generated parsers mixed in the same program, and a lot of communication was performed using global variables. Needless to say I passed on that one.

The second one I looked at seemed clean at first, but contained a lot of simple C++ mistakes like passing std::string objects by value instead of const references, out of bounds array access and memory leakss. However, it seems to do what I want, and seems well enough contained that I should be able to extract the actual parsing parts without too much trouble. Now the question is if I try to go through and clean things up on the insides.
Previous Entry House keeping
Next Entry warning levels
0 likes 0 comments

Comments

Nobody has left a comment. You can be the first!
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement

Latest Entries

New bug to me

1674 views

Week/Class 9

1515 views

Week/Class 8

1553 views

Week/Class 7

1603 views

The promised files

1830 views

Week/Class 6

1298 views

Week/Session 5

1352 views

Week/Session 4

1292 views

On the soapbox

1394 views

Week/Session 3

1269 views
Advertisement