1
0
mirror of synced 2025-03-23 16:33:54 +03:00

[2.0] Grammar rule fixes to prevent possibility to do key=field=identifier as a correct parseable grammar

This commit is contained in:
guilhermeblanco 2009-10-17 02:09:02 +00:00
parent b8208211ff
commit bf68273a2a

View File

@ -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());