[ragel-users] Re: Simple URL parser

hsanson hsan... at gmail.com
Mon May 26 01:35:44 UTC 2008


Adrian Thurston wrote:
> Hi Horacio,
>
> The machine is not succeeding. It looks like hsegment is missing a
> repetition operator.
>
> Yep, that's right, in version 6 the backend is called automatically.
>
> -Adrian
>
>   
Adrian,  thanks very much for your support... I appreciate it. 
Unfortunately I am unable to grasp how Ragel works. I added the eof 
variable definition and created a very simple machine:

main := ("http") $eof{ printf("reached eof\n"); };

If I understand correctly I should see "reached eof" printed on console 
as soon as the parser finishes testing for the last "p" of "http". 
Running this under a debugger (gdb) I can see the eof condition is never 
tested and I get no output in console. And of course the url parser I am 
trying to implement also never reaches eof.

Am I misunderstanding how ragel is supposed to work??

thanks
Horacio
> Horacio Sanson wrote:
>   
>> Strange, I installed ragel 6.2 and tried your last recommendation (use
>> char *eof = pe) but I get the same behavior. The last write action
>> never gets executed....
>>
>> BTW, this new version of ragel directly generates the C code (no xml
>> in between) is this correct behavior or am I doing something wrong??
>>     
>
>
> >
>   

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: test_url2.rl
URL: <http://www.colm.net/pipermail/ragel-users/attachments/20080526/8d52302e/attachment-0001.ksh>


More information about the ragel-users mailing list