in reply to
Recursing in XS?
break the XS code in two layers: in one side a set of C functions implementing the parser logic and on the other side the XS wrapping code (you can put all the code in the XS file, if you wish). That way, from you C code, you can call the C functions directly, without going through Perl.
If you have several XS modules and want to call from one into other, you may like to use Module::CAPIMaker, that provides an efficient and portable way to expose a C API from a module.