I need to parse a small \'mini language\' which users can type on my site. I was wondering what the counterparts of lex and jacc or antlr are for the world of php.
I advise you to write your own parser, as it is quite easy today.
The easiest way to do so would be in my opinion to create one class for every syntax type possible (expression, test, loop, etc.).
Then in each class, code the following methods:
a+b is of type 'expression', if(b) is not)a+b will return a->run() + b->run(), and a->run() will return a value)