[ragel-users] Actions embedded into unexpected transitions?

Adrian Thurston thurston at complang.org
Sun Jan 25 01:11:42 UTC 2009

Sorry I went to fast and didn't see your problem. My mail program was 
highlighting the lines beginning with ">", causing some confusion for me.

The bit of info that you're missing is that action embedding operators 
bind more tightly than concatenation. Use:

b := ( a 'b'+ ) >{print} %{print};

and I think you'll get what you want.


Dmitry Marakasov wrote:
> * Adrian Thurston (thurston at complang.org) wrote:
>> This is a common mistake when people start with Ragel. Leaving actions 
>> require one character of lookahead, or, if they should be executed at 
>> the end of the input, for you to tell the machine that there is no more 
>> input by setting eof = pe.
> Yeah, regarding missing leaving actions I thought it was something
> like that. But what's more interesting for me is why's enter actions
> execution order like this.

More information about the ragel-users mailing list