Control of efficiency of pattern-matching

Manoj Rajagopalan ma... at nanorex.com
Sat Mar 29 23:42:30 UTC 2008


Hi Adrian,

   Suppose I'd like to detect a bunch of lower-case character that come 
after a bunch of whitespaces. I could use

   space* lower+

Would the machine generated be any more efficient if I used the 
following instead?

   space* <: lower+

The left-guard should place higher priority on staying in the 
"space-eater" pattern but I'm guessing the machines will be equally 
efficient and the <: only helps in disambiguation which isn't the case 
here. Am I correct?

Thanks,
Manoj



More information about the ragel-users mailing list