[ragel-users] Consuming input
thurston at complang.org
Thu Apr 7 14:11:26 PDT 2011
See the attached code. Note the "| any*". This is a trick to make ragel
accept any prefix of the machine. But it only works in this case because
you want the machine to accept any string at all. What is really needed
is an any-prefix operator (in the TODO for years).
If this is too cryptic, you may want to consider using state charts.
On 04/06/2011 06:47 AM, Wilson Barros wrote:
> main:='O'@init ((any-[CTRDH])*
> |'H'$hibOn(any-'A')*'A'$hibOff #)
Adrian D. Thurston
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
More information about the ragel-users