. */ namespace Doctrine\ORM\Query\Parser; /** * FromClause ::= "FROM" IdentificationVariableDeclaration {"," IdentificationVariableDeclaration} * * @author Guilherme Blanco * @author Janne Vanhala * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @link http://www.phpdoctrine.org * @since 1.0 * @version $Revision$ */ class FromClause extends \Doctrine\ORM\Query\ParserRule { protected $_AST = null; public function syntax() { // FromClause ::= "FROM" IdentificationVariableDeclaration {"," IdentificationVariableDeclaration} $this->_AST = $this->AST('FromClause'); $this->_parser->match(\Doctrine\ORM\Query\Token::T_FROM); $this->_AST->addIdentificationVariableDeclaration( $this->parse('IdentificationVariableDeclaration') ); while ($this->_isNextToken(',')) { $this->_parser->match(','); $this->_AST->addIdentificationVariableDeclaration( $this->parse('IdentificationVariableDeclaration') ); } // Return AST node return $this->_AST; } }