mirror of
https://github.com/danog/phpdoc-parser.git
synced 2024-12-02 17:38:35 +01:00
25 lines
329 B
EBNF
25 lines
329 B
EBNF
|
Type
|
||
|
::= Atomic (Union | Intersection)?
|
||
|
|
||
|
Union
|
||
|
::= ('|' Atomic)+
|
||
|
|
||
|
Intersection
|
||
|
::= ('&' 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]*
|