
Stuart Dootson wrote:
Lynn - it might be interesting to use re2c (http://re2c.org/) to generate regex machines and see what their performance is like - after all, they do clain 're2c generates warning free code that is equal to hand-written code in terms of size, speed and quality.' (I'm offering no opinion on the veracity of that statement....), so (allegedly) they'd give a reasonable hand-code analogue....
I took a look at it, and it looks like it could possibly be quite useful if executable size was a concern .... but it is pretty obscure (at least to me) .... the only example this dummy could make any sense out of at all was to recognize a number .... and that was missing/obscuring the important illustration of how to invoke and use the generated scanner code. Were you able to get it to work to do anything even close to recognizing Days-of-the-Week (full and abbreviations)? Did you find actual compilable examples with "main" invoking the generated scanners with a test-string to crunch? <alert comment="whining"> I really wish developers would provide COMPLETE "baby steps with training wheels" examples to flatten the learning curve. Eric N. did a great job of documenting and providing examples for xpressive .... that could be a model for other projects (not just boost). I've subscribed to their sourceforge list and will swallow my pride and ask the newbie question: "This dummy doesn't expect to be able to figure out your project in 30 minutes ... how do you get it to something basic like recognize:"? ((Sunday|Sun)|(Monday|Mon)....(Saturday|Sat)) </alert>