On 11 Feb 2007, at 21:05, Yen-Ju Chen wrote:
Ragel help you write a XML parser.
It matches a string/regex and fire a function/method call you
assigned.
So if a '<message><bod' is received,
you can matches '<message>' and fire call_message_tag()
and keep '<bod' in buffer for the next iteration.
If you have a home-made XML parser,
it basically replace the part where you need to match string
using strcmp or NSScanner.
Here is another description:
http://www.zedshaw.com/tips/ragel_state_charts.html
Just read the top introduction part.
The rest is not very useful in this discussion.
Aha! Yes, it does seem like it would be useful. My XML parser code
is quite ugly in places (lots of C preprocessor stuff), so it would
be nice to be able to replace all of that with something simpler to
maintain. I shall have a play with Ragel at some point.
_______________________________________________
Etoile-dev mailing list
[email protected]
https://mail.gna.org/listinfo/etoile-dev