Lines Matching refs:stack
87 $stack = array ();
92 if (count($stack) < 2) throw new Exception("RPN stack underflow"); //FIXME: Position
95 $b = array_pop($stack);
96 $a = array_pop($stack);
98 array_push($stack, $r);
102 if (count($stack) < 2) throw new Exception("RPN stack underflow"); //FIXME: Position
105 $b = array_pop($stack);
106 $a = array_pop($stack);
108 array_push($stack, $r);
112 if (count($stack) < 2) throw new Exception("RPN stack underflow"); //FIXME: Position
115 $b = array_pop($stack);
116 $a = array_pop($stack);
118 array_push($stack, $r);
122 if (count($stack) < 2) throw new Exception("RPN stack underflow"); //FIXME: Position
125 $b = array_pop($stack);
126 $a = array_pop($stack);
129 array_push($stack, $r);
133 if (count($stack) < 2) throw new Exception("RPN stack underflow"); //FIXME: Position
136 $b = array_pop($stack);
137 $a = array_pop($stack);
140 array_push($stack, $r);
148 array_push($stack, $this->constants[$v]);
150 array_push($stack, $v);
155 if (count($stack) > 1) throw new Exception("Unused parameters on RPN stack.");
157 return array_pop($stack);