[ragel-users] recursion with ragel

Adrian Thurston thurston at complang.org
Tue Dec 2 14:53:15 UTC 2008


Gaspard Bucher wrote:
> I just found the solution: add an 'fhold' in the "hash_value" action.
> My understanding is that >hash_value is executed "before" the pointer
> is advanced to the next char. So I need to hold it back so that the
> pointer is not advanced twice (since I do p++).

You're right. The p pointer is advanced after the action to guarantee
that it points to the character that the transition is moving over. You
can just take out the p++. The fhold just translates to p--;

-Adrian




More information about the ragel-users mailing list