Example #1
0
 /**
  * ArrayEntry ::= Value | KeyValuePair
  * KeyValuePair ::= Key "=" PlainValue
  * Key ::= string | integer
  *
  * @return array
  */
 public function ArrayEntry()
 {
     $peek = $this->lexer->glimpse();
     if ($peek['value'] == '=') {
         $this->match($this->lexer->isNextToken(Lexer::T_INTEGER) ? Lexer::T_INTEGER : Lexer::T_STRING);
         $key = $this->lexer->token['value'];
         $this->match(Lexer::T_EQUALS);
         return array($key, $this->PlainValue());
     }
     return array(null, $this->Value());
 }