phpdoc-parser/doc/grammer.ebnf

25 lines
329 B
EBNF
Raw Normal View History

2017-07-10 15:16:28 +02:00
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]*