I find myself drawn to the Parsing Expression Grammar formalism for describing domain specific languages, but so far the implementation code I\'ve found has been written in
php PEG https://github.com/maetl/php-peg
This post is really old but I found it through google, and It should have been answered