I know of two such libraries
2. PHP shortcode https://github.com/simplicitylab/php-shortcode
Please try both libraries to see if any of them can be of help
Here is a good article on shortcode creation especially for non worpress usage.
I think you should take a look. You might get some ideas