Commit bf68273a authored by guilhermeblanco's avatar guilhermeblanco

[2.0] Grammar rule fixes to prevent possibility to do key=field=identifier as...

[2.0] Grammar rule fixes to prevent possibility to do key=field=identifier as a correct parseable grammar
parent b8208211
......@@ -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());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment