in reply to using Perl with EBNF grammar

There's also the evocatively named Parse::EBNF. Although JavaFan's observation that every EBNF grammar is a recursive-descent grammar makes Parse::RecDescent a natural fit, note also that it's famously slow, which may not be what you want. (On the other hand, I have no idea how fast Parse::EBNF is.)