[ragel-users] eof error

Adrian Thurston thurston at complang.org
Tue Apr 14 03:00:05 UTC 2009

Hi Max,

No error, you just need to supply eof since there is a final state with 
an action to execute on the EOF event. In this case it's caused by the 
error action in the Enumerator machine and would also be caused by the 
leaving action applied to Enumerator if Enumerator had any final states. 
You just need to tell Ragel when it's got to the end of the input by 
setting char *eof = pe.


Max Suraev wrote:
> Hello.
> I'm trying to implement simple FSM describing protocol logic.
> ragel gave me no errors and successfully compiled machine but I got
> error from gcc while trying to compile resuls:
> eof not defined.
> Since I do not use such variable in .rl file I guess there is something
> wrong with the way I use code generated by ragel.
> Could you please take a look and point towards possible error?
> Machine is quite simple (3 states, actions are just stubs doing nothing
> but printing) so I'm pretty much stuck at this point.
> Any general critics\recommendations are more than welcome.
> best regards,
> Max.
> ------------------------------------------------------------------------
> _______________________________________________
> 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