WACT_TEMPLATE
[ class tree: WACT_TEMPLATE ] [ index: WACT_TEMPLATE ] [ all elements ]

Class: ExpressionValueParser

Source Location: /framework/template/compiler/expression.inc.php

Class Overview


Searches expression strings for constant values

Variables

Methods


Inherited Variables

Inherited Methods


Class Details

Searches expression strings for constant values

WARNING: this parser defaults to data binding expressions. That means if it doest recognise a integer, float or string constant, what it calls a data binding expression may not in fact be a data binding expression. It assumes that Expression::createValue asks it a parse a valid value string

access:  protected

Class Variables


$Value =

var:  constant value (string/int/float)
access:  protected
Type:   mixed

$ValueType = EXPRESSION_VALUE_DATABINDING

var:  constant identifying type of value
access:  protected
Type:   int

Class Methods


constructor ExpressionValueParser

Invokes the Lexer to parse the expression

ExpressionValueParser ExpressionValueParser( string $expression)

Parameters:

string   $expression   expression to parse

method acceptDatabinding

Lexer callback - accepts the default data binding expression - called if no constants found

boolean acceptDatabinding( string $expression, int $state)

API Tags:

return:  TRUE
access:  private

Parameters:

string   $expression   parsed expression
int   $state   expression lexer state

method acceptFloat

Lexer callback - called for float constants

boolean acceptFloat( string $float, int $state)

API Tags:

return:  TRUE
access:  private

Parameters:

string   $float   matched float
int   $state   expression lexer state

method acceptInteger

Lexer callback - called for integer constants

boolean acceptInteger( string $int, int $state)

API Tags:

return:  TRUE
access:  private

Parameters:

string   $int   matched integer
int   $state   expression lexer state

method acceptString

Lexer callback - called for string constants

boolean acceptString( string $string, int $state)

API Tags:

return:  TRUE
access:  private

Parameters:

string   $string   matched string
int   $state   expression lexer state

method getLexer

Creates the Lexer.

Ideally this should be a static instance for performance but Lexer left in strange state after parsing if static



ExpressionLexer &getLexer( )

API Tags:

access:  private
WACT: Copyright 2003 Procata, Inc. Released under the LGPL license (http://www.gnu.org/copyleft/lesser.html)
Documentation generated on Sun, 28 Nov 2004 19:46:23 -0800 by phpDocumentor 1.2.3