
trubilo
New User
Jul 28, 2013, 7:10 AM
Post #1 of 4
(2576 views)
|
Hi, there! 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? Thank you in advance.
(This post was edited by trubilo on Jul 28, 2013, 7:20 AM)
|