I am wondering if someone has compiled an EBNF for PHP somewhere. I found both this site and this site. Both seem like they are incomplete, though. This question is very similar, but it's a year old. I would like to know if there has been any progress made.
You may want to have a look at the yacc grammar PHP uses internally. I know, it's not EBNF, but maybe it's okay for your needs.
You may also want to look at the re2c lexer definition.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With