Would this interest anyone?
-
I need to make some code to make some code, and basically I'm wondering if this tool I will create would be of interest to anyone, despite the fact that right now I'm building it as a throwaway tool for one purpose. If there's interest I'll make it a bit cleaner. Here's the issue I'm facing that the tool helps solve: It's a lexer - it takes a series of regular expressions and returns a value indicating which regular expression the content under the cursor most recently matched. What I need it for is this: I need to create an encoder for SGML/HTML/XML encoded attribute text, like
or"
for example. I need the code to be as efficient as possible so it should create a state machine. It should scan incrementally until it matches, and then ideally return the encoded character represented by the escape. Basically what the tool would do is take a series of regular expression/integer pairs and return some C++ code to lex utf8 content off of a streaming source (probably implemented as a callback or otherwise an insertable line of code in the output) I've written something like this before but it wasn't well received and had some bugs. I started a second version of it but I lost it somewhere along the way. If anyone feels like they might be able to use something like this down the road give me a shout in the replies. If I get even one or two people who are interested I'll go ahead and write this the hard/proper/reusable way.Real programmers use butterflies