Leaving actions are always executed on a following character (one char
of lookahead) so either there needs to be something after the number or
you need to set eof = pe to induce the action.

-Adrian

Gaspard Bucher wrote:
> Hi there !
> 
> This might look like a silly question.
> 
> I cannot seem to get this right: parse "1.24"
> 
> real      = ([\-+]? $num_a ('0'..'9' digit* '.' digit+) $num_a );
> integer   = ([\-+]? $num_a ('0'..'9' digit*) $num_a );
> number    = real | integer;
> 
> main     := ws* (string %string | number %number | hash %hash);
> 
> %number is never executed...
> 
> If I use @number, it is called several times.
> 
> I sure am missing something...
> 
> Thanks for your help.
> 
> Gaspard
> 
> _______________________________________________
> ragel-users mailing list
> [email protected]
> http://www.complang.org/mailman/listinfo/ragel-users

_______________________________________________
ragel-users mailing list
[email protected]
http://www.complang.org/mailman/listinfo/ragel-users

Reply via email to