PEEL Shopping
Open source ecommerce : PEEL Shopping
Public Member Functions | Data Fields | Protected Member Functions | Protected Attributes
Twig_ExpressionParser Class Reference

Parses expressions. More...

Public Member Functions

 __construct (Twig_Parser $parser, array $unaryOperators, array $binaryOperators)
 
 parseExpression ($precedence=0)
 
 parsePrimaryExpression ()
 
 parseStringExpression ()
 
 parseArrayExpression ()
 
 parseHashExpression ()
 
 parsePostfixExpression ($node)
 
 getFunctionNode ($name, $line)
 
 parseSubscriptExpression ($node)
 
 parseFilterExpression ($node)
 
 parseFilterExpressionRaw ($node, $tag=null)
 
 parseArguments ($namedArguments=false, $definition=false)
 Parses arguments. More...
 
 parseAssignmentExpression ()
 
 parseMultitargetExpression ()
 

Data Fields

const OPERATOR_LEFT = 1
 
const OPERATOR_RIGHT = 2
 

Protected Member Functions

 getPrimary ()
 
 parseConditionalExpression ($expr)
 
 isUnary (Twig_Token $token)
 
 isBinary (Twig_Token $token)
 
 getFunctionNodeClass ($name, $line)
 
 getFilterNodeClass ($name, $line)
 
 checkConstantExpression (Twig_NodeInterface $node)
 

Protected Attributes

 $parser
 
 $unaryOperators
 
 $binaryOperators
 

Detailed Description

Parses expressions.

This parser implements a "Precedence climbing" algorithm.

See also
http://www.engr.mun.ca/~theo/Misc/exp_parsing.htm
http://en.wikipedia.org/wiki/Operator-precedence_parser
Author
Fabien Potencier fabie.nosp@m.n@sy.nosp@m.mfony.nosp@m..com

Definition at line 23 of file ExpressionParser.php.

Constructor & Destructor Documentation

__construct ( Twig_Parser  $parser,
array  $unaryOperators,
array  $binaryOperators 
)

Definition at line 32 of file ExpressionParser.php.

Member Function Documentation

checkConstantExpression ( Twig_NodeInterface  $node)
protected

Definition at line 586 of file ExpressionParser.php.

getFilterNodeClass (   $name,
  $line 
)
protected

Definition at line 565 of file ExpressionParser.php.

getFunctionNode (   $name,
  $line 
)

Definition at line 297 of file ExpressionParser.php.

getFunctionNodeClass (   $name,
  $line 
)
protected

Definition at line 545 of file ExpressionParser.php.

getPrimary ( )
protected

Definition at line 65 of file ExpressionParser.php.

isBinary ( Twig_Token  $token)
protected

Definition at line 116 of file ExpressionParser.php.

isUnary ( Twig_Token  $token)
protected

Definition at line 111 of file ExpressionParser.php.

parseArguments (   $namedArguments = false,
  $definition = false 
)

Parses arguments.

Parameters
Boolean$namedArgumentsWhether to allow named arguments or not
Boolean$definitionWhether we are parsing arguments for a function definition

Definition at line 456 of file ExpressionParser.php.

parseArrayExpression ( )

Definition at line 207 of file ExpressionParser.php.

parseAssignmentExpression ( )

Definition at line 512 of file ExpressionParser.php.

parseConditionalExpression (   $expr)
protected

Definition at line 87 of file ExpressionParser.php.

parseExpression (   $precedence = 0)

Definition at line 39 of file ExpressionParser.php.

parseFilterExpression (   $node)

Definition at line 417 of file ExpressionParser.php.

parseFilterExpressionRaw (   $node,
  $tag = null 
)

Definition at line 424 of file ExpressionParser.php.

parseHashExpression ( )

Definition at line 232 of file ExpressionParser.php.

parseMultitargetExpression ( )

Definition at line 531 of file ExpressionParser.php.

parsePostfixExpression (   $node)

Definition at line 277 of file ExpressionParser.php.

parsePrimaryExpression ( )

Definition at line 121 of file ExpressionParser.php.

parseStringExpression ( )

Definition at line 177 of file ExpressionParser.php.

parseSubscriptExpression (   $node)

Definition at line 340 of file ExpressionParser.php.

Field Documentation

$binaryOperators
protected

Definition at line 30 of file ExpressionParser.php.

$parser
protected

Definition at line 28 of file ExpressionParser.php.

$unaryOperators
protected

Definition at line 29 of file ExpressionParser.php.

const OPERATOR_LEFT = 1

Definition at line 25 of file ExpressionParser.php.

const OPERATOR_RIGHT = 2

Definition at line 26 of file ExpressionParser.php.


The documentation for this class was generated from the following file:

This documentation for Open ecommerce PEEL Shopping and PEEL.fr has been generated by Doxygen on Thu Oct 15 2015 14:41:44 - Peel ecommerce is a product of Agence web Advisto SAS. All rights reserved.