phpdoc-parser/doc/grammer.ebnf
Jan Tvrdik 65d08ecc82 init
2017-07-10 15:16:28 +02:00

29 lines
375 B
EBNF

Type
::= Atomic (Union | Intersection)?
| Complement
Union
::= ('|' Atomic)+
Intersection
::= ('&' Atomic)+
Complement
::= '~' Atomic
Atomic
::= Identifier (Generic | Array)?
| '(' Type ')' Array?
Generic
::= '<' Type (',' Type)* '>'
Array
::= ('[' ']')+
Identifier
::= ('\'? Word)+
Word
::= [a-zA-Z_#x7F-#x10FFFF][0-9a-zA-Z_#x7F-#x10FFFF]*