[ragel-users] access variable in expression?

Larry Edelstein ribs at acm.org
Fri Oct 31 03:07:44 UTC 2008


Am I able to use the value of a variable as an expression, and if so, how?

I am trying to parse a language like this:

number = digit+ >start_capture_number_of_names
%end_capture_number_of_names '\n';
name = ^[\n]* '\n';
main := number name{number_of_names}

where number_of_names is the number I captured earlier.

Can I do it this way, or do I need to iterate using actions and the
statements defined in 3.4 of the manual?

Larry Edelstein
San Francisco, CA
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.colm.net/pipermail/ragel-users/attachments/20081030/8b7c0306/attachment-0001.html>


More information about the ragel-users mailing list