[ragel-users] Re: Ragel for network protocols?
thurs... at cs.queensu.ca
Mon Nov 13 01:41:36 UTC 2006
If you look in example 2.1, the main machine has the null character on
the end of its pattern. That's why in that example the driver sends the
null character by adding one to pe. I'm not sure what else could be
wrong. When I remove the + 1 from the setting of pe it seems to work okay.
[age at reaves] tmp: ./tmp O C O
Step 1: input O, current state 0... New state is 2
Step 2: input C, current state 2... New state is 0
Step 3: input O, current state 0... New state is 2
result = 0
Stéphane Bortzmeyer wrote:
> 2006/11/9, Adrian Thurston <thurs... at cs.queensu.ca>:
>> > pe = p + strlen(p) + 1;
>> This is probably why. The +1 sends the machine the null character
> Well, replacing the statement by:
> pe = p + strlen(p);
> changes nothing. And my statement came from the manual, figure 2.1.
More information about the ragel-users