I've been given an exercise to create a simple PHP parser according to the EBNF grammar which can be found here. Basically the task is to list all the classes, included files, functions, methods and variables.

When I got this task, my mentor recommended me to use PERL, so I began studying Perl.

So, now that I've got some Perl knowledge (using O'Reilly's book Learning Perl 6th Edition) , and I know PHP very well, I am wondering, what is the simplest way to start?

Is it to convert EBNF to many subroutines with regex, or is there a more elegant way?

Just to add to what has been said before now. While you are it, please look into References and Data Structure those are very important too, IMHO. From you CLI, you can do like thus, to read these documentations:

Code

perldoc perlref perldoc perldsc perldoc perllol

Moreover, you can also pick up Intermediate Perl by the same Authors who wrote Learning Perl