|
@@ 2704-2709 (lines=6) @@
|
| 2701 |
|
|
| 2702 |
|
} elseif ((isset(self::$_operators[$opCharacter]) or $isOperandOrFunction) && $expectingOperator) { // Are we putting an operator on the stack? |
| 2703 |
|
// echo 'Element with value '.$opCharacter.' is an Operator<br />'; |
| 2704 |
|
while($stack->count() > 0 && |
| 2705 |
|
($o2 = $stack->last()) && |
| 2706 |
|
isset(self::$_operators[$o2['value']]) && |
| 2707 |
|
@($operatorAssociativity[$opCharacter] ? $operatorPrecedence[$opCharacter] < $operatorPrecedence[$o2['value']] : $operatorPrecedence[$opCharacter] <= $operatorPrecedence[$o2['value']])) { |
| 2708 |
|
$output[] = $stack->pop(); // Swap operands and higher precedence operators from the stack to the output |
| 2709 |
|
} |
| 2710 |
|
$stack->push('Binary Operator',$opCharacter); // Finally put our current operator onto the stack |
| 2711 |
|
++$index; |
| 2712 |
|
$expectingOperator = false; |
|
@@ 2967-2972 (lines=6) @@
|
| 2964 |
|
if (($expectingOperator) && (preg_match('/^'.self::CALCULATION_REGEXP_CELLREF.'.*/Ui', substr($formula, $index), $match)) && |
| 2965 |
|
($output[count($output)-1]['type'] == 'Cell Reference')) { |
| 2966 |
|
// echo 'Element is an Intersect Operator<br />'; |
| 2967 |
|
while($stack->count() > 0 && |
| 2968 |
|
($o2 = $stack->last()) && |
| 2969 |
|
isset(self::$_operators[$o2['value']]) && |
| 2970 |
|
@($operatorAssociativity[$opCharacter] ? $operatorPrecedence[$opCharacter] < $operatorPrecedence[$o2['value']] : $operatorPrecedence[$opCharacter] <= $operatorPrecedence[$o2['value']])) { |
| 2971 |
|
$output[] = $stack->pop(); // Swap operands and higher precedence operators from the stack to the output |
| 2972 |
|
} |
| 2973 |
|
$stack->push('Binary Operator','|'); // Put an Intersect Operator on the stack |
| 2974 |
|
$expectingOperator = false; |
| 2975 |
|
} |