It depends on the input model. If you're parsing data in one block it's easy, just adjust "p" from embedded code blocks. If you're going in buffers, you need to be a bit more careful not to backup over the buffer block. See sections 3.4, 6.3 and 6.6 in the manual.

-Adrian

Richard Osborn wrote:
I'm curious if there is a recommended way to implement lookahead in Ragel? Are 
there any built in constructs or must it be done via external control 
structures?
For example, I have a grammar:
FOO = 'foo' ' '+  BAR BAZ >execute_once;
BAR = alpha+ ('.' alpha+)*;
BAZ = ' '* '.' ' '* newline;
If the input is "foo bar.baz.\n", is there any way to know when Ragel has 
finished with bar.baz for sure?
Thanks,
Rich

_______________________________________________
ragel-users mailing list
[email protected]
http://www.complang.org/mailman/listinfo/ragel-users


_______________________________________________
ragel-users mailing list
[email protected]
http://www.complang.org/mailman/listinfo/ragel-users

Reply via email to