Am I misinterpreting the purpose of fbreak?

David Waite dwa... at
Sat Jan 5 07:55:42 UTC 2008

(Simple sample attached for C and Java)

My hope is to make a pull parser for a document format (JSON), which will
update the parser object to represent a new 'state' after processing some
atom of information from the input source. It thus is almost like an
enumeration of events that you iterate over by calling a 'next()' style
method. Examples would include Java stream xml (STAX) interfaces (see ) or the .Net Framework's XmlReader (see ). To do this, I am trying to break out everytime
I process a feature in my document, but I quickly realized this was not
working for me every-time.

It appears the main problem is in having multiple breaking actions off of a
single character transition. The system doesn't appear to be able to recover
from such behavior, instead immediately exiting the execution loop when you
attempt to resume processing. The end result for the C and Java examples
supplied is that the pointer never moves forward, eof is never reached and
the sample infinitely outputs its message.

Is it possible to do what I want to do?

-David Waite
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>
-------------- next part --------------
A non-text attachment was scrubbed...
Type: application/zip
Size: 1599 bytes
Desc: not available
URL: <>

More information about the ragel-users mailing list