Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

EBNF grammar definitions for PHP?

Tags:

php

grammar

ebnf

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.

like image 743
Azmisov Avatar asked Jan 19 '12 18:01

Azmisov


1 Answers

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.

like image 143
NikiC Avatar answered Oct 06 '22 00:10

NikiC