Hi Adrian, Thanks. I'd missed the longest-match kleene star documentation.
Sorry if this is a stupid question -- I'm looking for the best of both worlds. How do I get a longest-match kleene star machine to start over if there is an error? For example, a document of "mailto:ema...@x ... mailto:ema...@y ... mailto:invalid_email ... mailto:ema...@z" will find the first two but will exit on the third invalid_email when I really want it to keep going and find ema...@z. Thanks, Eric On Feb 21, 2010, at 11:42 , Adrian Thurston wrote: > Use: > > mail := (any | mailto)**; > > For the answer why, please see chapter four of the manual. > > Regards, > Adrian > > > > Eric Brown wrote: >> If I have two ORed machines, is there a leaving action I can get when a >> machine is finally exiting? >> For example, I believe this is a simplified form of my parser: >> host = [A-Za-z0-9\-.]+; >> mailto = (/mailto:/i sender_chars+ '@' (host %mailto_end)) $mailto; >> mail := (any | mailto)*; >> The %mailto_end will get executed on every single character of host. I just >> want it to pick up the last character of host. Is there a way? >> Cheers, >> Eric >> _______________________________________________ >> ragel-users mailing list >> [email protected] >> http://www.complang.org/mailman/listinfo/ragel-users > > _______________________________________________ > ragel-users mailing list > [email protected] > http://www.complang.org/mailman/listinfo/ragel-users _______________________________________________ ragel-users mailing list [email protected] http://www.complang.org/mailman/listinfo/ragel-users
