[2.0] Grammar rule fixes to prevent possibility to do key=field=identifier as a correct parseable grammar
This commit is contained in:
parent
b8208211ff
commit
bf68273a2a
@ -201,7 +201,7 @@ class Parser
|
||||
}
|
||||
|
||||
/**
|
||||
* Annotation ::= "@" AnnotationName [ "(" [Values] ")" ]
|
||||
* Annotation ::= "@" AnnotationName ["(" [Values] ")"]
|
||||
* AnnotationName ::= QualifiedName | SimpleName
|
||||
* QualifiedName ::= NameSpacePart "\" {NameSpacePart "\"}* SimpleName
|
||||
* NameSpacePart ::= identifier
|
||||
@ -262,7 +262,7 @@ class Parser
|
||||
}
|
||||
|
||||
/**
|
||||
* Values ::= Value {"," Value}*
|
||||
* Values ::= Array | Value {"," Value}*
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
@ -320,7 +320,7 @@ class Parser
|
||||
}
|
||||
|
||||
/**
|
||||
* PlainValue ::= integer | string | float | Array | Annotation
|
||||
* PlainValue ::= integer | string | float | boolean | Array | Annotation
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
@ -410,7 +410,7 @@ class Parser
|
||||
|
||||
/**
|
||||
* ArrayEntry ::= Value | KeyValuePair
|
||||
* KeyValuePair ::= Key "=" Value
|
||||
* KeyValuePair ::= Key "=" PlainValue
|
||||
* Key ::= string | integer
|
||||
*
|
||||
* @return array
|
||||
@ -429,7 +429,7 @@ class Parser
|
||||
$key = $this->_lexer->token['value'];
|
||||
$this->match('=');
|
||||
|
||||
return array($key => $this->Value());
|
||||
return array($key => $this->PlainValue());
|
||||
}
|
||||
|
||||
return array($this->Value());
|
||||
|
Loading…
x
Reference in New Issue
Block a user