[ragel-users] How to solve this Indetermination [SOLVED]

Iñaki Baz Castillo ibc at aliax.net
Sun Feb 22 18:29:52 UTC 2009


El Sábado, 21 de Febrero de 2009, Adrian Thurston escribió:
> Does that work okay with the following input?
>
> sip:mydomain:45
>
> I suspect it might not. The problem with this grammar is that you don't
> know what a colon after "sip:word" means. It could either end a host and
> start a port, or end a username and start a password. The presence of @
> will tell you, as will one more chacter of lookahead (if a number then
> it's the former). This is where the one-pass model of ragel gets into
> trouble! You might want to try just recording what you see in the
> actions, but not doing anything about it until some action at the very
> end. At that time you can check which parts you have.

You are right, thanks a lot.


-- 
Iñaki Baz Castillo




More information about the ragel-users mailing list