[ Index ]

PHP Cross Reference of MediaWiki-1.24.0

title

Body

[close]

/extensions/ParserFunctions/ -> Expr.php (summary)

(no description)

File Size: 678 lines (18 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 2 classes

ExprError:: (1 method):
  __construct()

ExprParser:: (2 methods):
  doExpression()
  doOperation()


Class: ExprError  - X-Ref

__construct( $msg, $parameter = '' )   X-Ref

param: $msg string
param: $parameter string

Class: ExprParser  - X-Ref

doExpression( $expr )   X-Ref
Evaluate a mathematical expression

The algorithm here is based on the infix to RPN algorithm given in
http://montcs.bloomu.edu/~bobmon/Information/RPN/infix2rpn.shtml
It's essentially the same as Dijkstra's shunting yard algorithm.
param: $expr string
return: string

doOperation( $op, &$stack )   X-Ref

param: $op int
param: $stack array



Generated: Fri Nov 28 14:03:12 2014 Cross-referenced by PHPXref 0.7.1