mirror of
https://github.com/danog/phpdoc-parser.git
synced 2024-12-04 10:28:28 +01:00
29 lines
375 B
EBNF
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]*
|