I\'ve got a number of stored procedures made with the MySQL Workbench. They work just fine when use MySQL workbench to put them into my test DB.
Now I am preparing
DELIMITER is something that the mysql client application actually uses. I believe that the client application is responsible for breaking up the queries that it sends to Mysql. That is what PHPMyAdmin does, for example.
Instead of spending a whole night writing a script to parse MySQL into queries, use the code I wrote. You will find it in the scriptToQueries function, here:
http://wush.net/svn/luckyapps/pie/trunk/framework/classes/Db/Mysql.php
ENJOY
EDIT: Since writing this answer I have ported the code into the free Q platform in which you can study the code: https://github.com/EGreg/Platform/blob/master/platform/classes/Db/Mysql.php#L824