Parser
class Parser
Parsers a token stream.
This parser implements a "Precedence climbing" algorithm.
Constants
OPERATOR_LEFT |
|
OPERATOR_RIGHT |
|
Methods
__construct(array $functions)
No description
parseExpression($precedence)
No description
parsePrimaryExpression()
No description
parseArrayExpression()
No description
parseHashExpression()
No description
parsePostfixExpression($node)
No description
parseArguments()
Parses arguments.
Details
at line line 35
__construct(array $functions)
at line line 95
Node
parse(TokenStream $stream, array $names = array())
Converts a token stream to a node tree.
The valid names is an array where the values are the names that the user can use in an expression.
If the variable name in the compiled PHP code must be different, define it as the key.
For instance, ['this' => 'container'] means that the variable 'container' can be used in the expression but the compiled code will use 'this'.
at line line 108
parseExpression($precedence)
at line line 176
parsePrimaryExpression()
at line line 237
parseArrayExpression()
at line line 261
parseHashExpression()
at line line 305
parsePostfixExpression($node)
at line line 365
parseArguments()
Parses arguments.