[ragel-users] union operator and thread-local variables

Devin Bayer web at t-0.be
Wed Oct 28 16:40:15 UTC 2009

On Wed, 2009-10-28, at 17:32, Adrian Thurston wrote:

> Store away to different variables using different actions.

In my real grammar I have a pattern that occurs in several parallel  
machines and I need to extract several substrings from that pattern.  
Using a separate action for every substring and every parent machine  
would make my grammar unusable.

Even so, it seems the 'mon' expression will always use the same  
actions. How can I use different actions on different invocations?

I thought about:

	m1 = a1 mon >{ in = "m1" } b1;
	m2 = a2 mon >{ in = "m2" } b1;

but this will not work if the 'mon' machines overlap.

That's why I thought about thread-local variables.  If we have local  
error actions can't we export some local context?


More information about the ragel-users mailing list