[ragel-users] Anchoring to the EOF

Adrian Thurston thurston at complang.org
Fri Jan 23 23:35:25 UTC 2009

In short, there isn't!

Ragel does not make any assumption about the input, and this includes 
not assuming line-based input. If you want to anchor to something you 
just put that something into the grammar at the end. If you want to see 
if the machine finished in a final state (and thus consumed that 
something) you test cs against machine_first_final.

Hope this helps,

Julian Morrison wrote:
> Hii, could somebody help me figure out what's the Ragel equivalent of 
> regex "$"?
> I'd like to be able to specify that the machine demands the whole input 
> match and then that's EOF.
> Doing "main := header (line*) footer ;" doesn't seem to work - it's 
> happy to quit without seeing the footer.
> ------------------------------------------------------------------------
> _______________________________________________
> 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