Extract a parse function out of the generate fn

This allows a third-party user of the library
to use the not yet compiled strings for certain things.

In my case I want to extract some parts of the generated messages.js(on) to an own file in order to have a slimmer file for the browser to download.