[ragel-users] Re: fexec bug in v5.15?

Adrian Thurston thurs... at cs.queensu.ca
Thu Nov 9 21:45:43 UTC 2006

Hi Carlos,

If you were to take the flag-based approach, it would be better to use 
it to make fhold safe in pattern actions by using a variable to indicate 
that after the pattern has been consumed and p is consistent, then shift 
it back one. Though I guess that has the same effect as what you're 
saying. I've never been a fan of the flag-based approach to implementing 
the fsm statements in action code, but maybe I should reconsider in this 


Carlos Antunes wrote:
> On 11/9/06, Adrian Thurston <thurs... at cs.queensu.ca> wrote:
>>> Hmm, from the point of view of the ragel end user, things would
>>> automagically work as "expected", no? I don't see where the change in
>>> semantics is in this case...
>> fhold would become a control flow statement because of the jump
>> necessary to immediately restart. The remainder of the action would
>> become unreachable. It's a subtle difference, but I think it's the kind
>> of thing that causes people to become confused about the meaning the
>> statements.
> Adrian,
> No, that's not the idea. For example, an fhold would set a flag called
> "need_to_restart". At the *END* of the action, the restart would
> happen if "need_to_restart" was set.
> Carlos

More information about the ragel-users mailing list