[ragel-users] Solving ambiguity

Husam Senussi husam at senussi.com
Wed May 26 01:59:56 UTC 2010


Hi,

Thanks fot the response it seems now the grammar having problem matching "a.mydomain.com  b.mydomain.com " where I would expect

1. "a.mydomain.com"
2. "b.mydomain.com "

instead I'm getting

1. "a.mydomain.com"
2. "b.mydomain.com"

and the parser not reaching the end for example if having "(host (sep_fws host)*) %{printf("Done\n");};" in the grammar
I would expect to see "Done" but with the above example I don't see it until I remove the space at the end.


Thanks.

On 25 May 2010, at 23:06, Adrian Thurston wrote:

> opt_fws        = ( fws? )$(fws,0);
>    sep_fws        = ( fws )$(fws,1);
> 
>    field          = (opt_fws alpha+ opt_fws);
>    host           = (field ('.' field)*) >mark %print;
>    main          := host (sep_fws host)*;


_______________________________________________
ragel-users mailing list
ragel-users at complang.org
http://www.complang.org/mailman/listinfo/ragel-users



More information about the ragel-users mailing list