private function processTable()
{
$key = '';
$quotesKey = false;
while ($this->isTokenValidForTablename($this->lexer->getToken()) == true) {
if (Lexer::TOKEN_QUOTES === $this->lexer->getCurrentToken()->getType()) {
if (Lexer::TOKEN_STRING !== $this->lexer->getToken()->getType()) {
throw new ParseException(sprintf('Syntax error: expected string. Key: %s', $key), $this->currentLine, $this->lexer->getCurrentToken()->getValue());
}
$key .= str_replace('.', '/./', $this->lexer->getCurrentToken()->getValue());
if (Lexer::TOKEN_QUOTES !== $this->lexer->getToken()->getType()) {
throw new ParseException(sprintf('Syntax error: expected quotes for closing key: %s', $key), $this->currentLine, $this->lexer->getCurrentToken()->getValue());
}
} else {
$subkey = $this->lexer->getCurrentToken()->getValue();
if (false === $this->isValidKey($subkey, false)) {
throw new ParseException(sprintf('Syntax error: the key %s is invalid. A key without embraces can not contains white spaces', $key), $this->currentLine, $subkey);
}
$key .= $subkey;
}
}
$this->setTable($key);
if (Lexer::TOKEN_RBRANK !== $this->lexer->getCurrentToken()->getType()) {
throw new ParseException('Syntax error: expected close brank', $this->currentLine, $this->lexer->getCurrentToken()->getValue());
}
}