[ragel-users] question about kleene-star

Adrian Thurston thurs... at cs.queensu.ca
Mon Mar 31 16:25:17 UTC 2008


The * operator doesn't imply any management of ambiguities. It is the
pure kleene star from language theory. It will generate a machine that
simultaneously extends a match and restarts it if there is any ambiguity
between these two activities.

The ** operator on the other hand favours extending a machine over
completing it and restarting.

-Adrian

Manoj Rajagopalan wrote:
> Hi all,
> 
>    According to the kleene-star documentation, it is an operator that 
> grants greater priority to transitions within the machine and hence aims 
> for the longest match. While I can see its utility in deciding between 
> pattern-alternates, how is it to be used on a single-string?
> 
>    To be more clear, suppose I want to match the longest string of 
> lower-case characters at least one character long. Should I use "lower 
> lower**" or "(lower+)**". In other words, is the ** a qualifier to an 
> existing expression or is it an operator by itself?
> 
> Thanks,
> Manoj
> 
> > 
> 



More information about the ragel-users mailing list