public function parseExpression() {
        $token = $this->peek();
        // check first token
        $type = $token[0];

        switch($type) {
        case 'IF_OPEN':
            return $this->parseIf();
        case 'FOR_OPEN':
            return $this->parseFor();
        case 'FILTERED_VALUE':
            return $this->parseFilteredValue();
        case 'VALUE':
            return $this->parseValue();
        case 'HTML':
            return $this->parseHTML();
        case 'ESCAPE':
            return $this->parseEscape();
        case 'INCLUDE':
            return $this->parseInclude();
        default:
            throw new SyntaxErrorException(
                "Could not parse expression, invalid token '$type'");
        }
    }
public function parseExpression() {
        $token = $this->peek();
        // check first token
        $type = $token[0];

        switch($type) {
        case 'IF_OPEN':
            return $this->parseIf();
        case 'FOR_OPEN':
            return $this->parseFor();
        case 'FILTERED_VALUE':
            return $this->parseFilteredValue();
        case 'VALUE':
            return $this->parseValue();
        case 'HTML':
            return $this->parseHTML();
        case 'ESCAPE':
            return $this->parseEscape();
        case 'INCLUDE':
            return $this->parseInclude();
        default:
            throw new SyntaxErrorException(
                "Could not parse expression, invalid token '$type'");
        }
    }
public function parseExpression ( ) { $ token = $ this -> peek ( ) ; // check first token $ type = $ token [ 0 ] ; switch ( $ type ) { case 'IF_OPEN' : return $ this -> parseIf ( ) ; case 'FOR_OPEN' : return $ this -> parseFor ( ) ; case 'FILTERED_VALUE' : return $ this -> parseFilteredValue ( ) ; case 'VALUE' : return $ this -> parseValue ( ) ; case 'HTML' : return $ this -> parseHTML ( ) ; case 'ESCAPE' : return $ this -> parseEscape ( ) ; case 'INCLUDE' : return $ this -> parseInclude ( ) ; default : throw new SyntaxErrorException ( "Could not parse expression, invalid token '$type'" ) ; } }
Parses an EXPRESSION

Expression: (IF_OPEN | FOR_OPEN | FILTERED_VALUE | VALUE | HTML
| ESCAPE)
Parses an EXPRESSION