cvs: ZendEngine2 / zend_compile.c zend_language_parser.y
| From: | Marcus Boerger | Date: | Thu, 29 May 2003 19:27:11 +0000 |
| Subject: | cvs: ZendEngine2 / zend_compile.c zend_language_parser.y | ||
| Groups: | php.zend-engine.cvs | ||
| Request: | Send a blank email to php-zend-engine-cvs+get-1283@lists.php.net to get a copy of this message | ||
helly Thu May 29 15:27:11 2003 EDT
Modified files:
/ZendEngine2 zend_compile.c zend_language_parser.y
Log:
Fix ~ operator in class constants.
Index: ZendEngine2/zend_compile.c
diff -u ZendEngine2/zend_compile.c:1.421 ZendEngine2/zend_compile.c:1.422
--- ZendEngine2/zend_compile.c:1.421 Thu May 29 15:00:40 2003
+++ ZendEngine2/zend_compile.c Thu May 29 15:27:11 2003
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_compile.c,v 1.421 2003/05/29 19:00:40 helly Exp $ */
+/* $Id: zend_compile.c,v 1.422 2003/05/29 19:27:11 helly Exp $ */
#include "zend_language_parser.h"
#include "zend.h"
@@ -191,7 +191,10 @@
FOLD_CASE(ZEND_BOOL_XOR, boolean_xor_function)
case ZEND_BW_NOT:
bitwise_not_function(&result->u.constant, &op1->u.constant TSRMLS_CC);
- break;
+ return;
+ default:
+ zend_error(E_COMPILE_ERROR, "Unknown binary op opcode %d", op);
+ return;
}
do_op(&result->u.constant, &op1->u.constant, &op2->u.constant TSRMLS_CC);
Index: ZendEngine2/zend_language_parser.y
diff -u ZendEngine2/zend_language_parser.y:1.114 ZendEngine2/zend_language_parser.y:1.115
--- ZendEngine2/zend_language_parser.y:1.114 Thu Apr 10 11:43:47 2003
+++ ZendEngine2/zend_language_parser.y Thu May 29 15:27:11 2003
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_language_parser.y,v 1.114 2003/04/10 15:43:47 sterling Exp $ */
+/* $Id: zend_language_parser.y,v 1.115 2003/05/29 19:27:11 helly Exp $ */
/*
* LALR shift/reduce conflicts and how they are resolved:
@@ -457,6 +457,7 @@
| fully_qualified_class_name { $$ = $1; }
;
+
function_call_parameter_list:
non_empty_function_call_parameter_list { $$ = $1; }
| /* empty */ { $$.u.constant.value.lval = 0; }
@@ -718,7 +719,7 @@
| const_scalar_expr '*' const_scalar_expr { zend_do_fold_binary_op(ZEND_MUL, &$$,
&$1, &$3 TSRMLS_CC); }
| const_scalar_expr '/' const_scalar_expr { zend_do_fold_binary_op(ZEND_DIV, &$$,
&$1, &$3 TSRMLS_CC); }
| const_scalar_expr '%' const_scalar_expr { zend_do_fold_binary_op(ZEND_MOD, &$$,
&$1, &$3 TSRMLS_CC); }
- | const_scalar_expr '~' const_scalar_expr { zend_do_fold_binary_op(ZEND_BW_NOT,
&$$, &$1, &$3 TSRMLS_CC); }
+ | '~' const_scalar_expr { zend_do_fold_binary_op(ZEND_BW_NOT,
&$$, &$2, NULL TSRMLS_CC); }
| '(' const_scalar_expr ')' { $$ = $2; }
;