mirror of
https://github.com/danog/phpdoc-parser.git
synced 2024-12-02 09:28:02 +01:00
33 lines
424 B
EBNF
33 lines
424 B
EBNF
Type
|
|
::= Atomic (Union | Intersection)?
|
|
| Nullable
|
|
|
|
Union
|
|
::= ('|' Atomic)+
|
|
|
|
Intersection
|
|
::= ('&' Atomic)+
|
|
|
|
Nullable
|
|
::= '?' Identifier Generic?
|
|
|
|
Atomic
|
|
::= Identifier (Generic | Array)?
|
|
| ThisType
|
|
| '(' Type ')' Array?
|
|
|
|
Generic
|
|
::= '<' Type (',' Type)* '>'
|
|
|
|
Array
|
|
::= ('[' ']')+
|
|
|
|
ThisType
|
|
::= '$this'
|
|
|
|
Identifier
|
|
::= ('\\'? Word)+
|
|
|
|
Word
|
|
::= [a-zA-Z_#x7F-#x10FFFF][0-9a-zA-Z_#x7F-#x10FFFF]*
|