[ragel-users] Re: Action at the Beginning of Starred Expression

Adrian Thurston thurs... at cs.queensu.ca
Sat Aug 23 20:01:17 UTC 2008

Hey Manfred,

So you can't write something like:

e=(ax >action)*y;


What do you know about e? If you know that a only occurs at the start you
can write:

e | (any | a at action)*;


On Sat, 23 Aug 2008, Manfred_Nowak wrote:

> > Depending on the placement of the >{} action it is either
> > executed every time a is found or only on the first a.
> Arne, thank you for this suggestion, but it requires to know about the
> decomposition of `e', which I gave for explanation only.
> I understand Adrian's design decision, for excluding by default the
> start state of a machine from some inner loops, as your example shows.
> But your example also shows, that you also seems to be unaware of a
> possibility to overwrite this default.
> I need to overwrite this default, because I want to use ragel as a
> code generator and I do not know about the composition of the regular
> expression in general. Of course I can decompose it in a preprocessing
> step :-(
> -manfred
> >

More information about the ragel-users mailing list