1 /*******************************************************************************
2 Copyright (c) 2016, Michael Wallner <mike@php.net>.
5 Redistribution and use in source and binary forms, with or without
6 modification, are permitted provided that the following conditions are met:
8 * Redistributions of source code must retain the above copyright notice,
9 this list of conditions and the following disclaimer.
10 * Redistributions in binary form must reproduce the above copyright
11 notice, this list of conditions and the following disclaimer in the
12 documentation and/or other materials provided with the distribution.
14 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
15 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
17 DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
18 FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
20 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
21 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
22 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
23 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 *******************************************************************************/
26 #include "php_psi_stdinc.h"
31 static inline int psi_calc_oper(token_t op1
, token_t op2
)
33 if (PSI_T_LPAREN
== op2
) {
35 } else if (PSI_T_LPAREN
== op1
) {
37 } else if (op1
== op2
) {
122 case PSI_T_AMPERSAND
:
170 case PSI_T_AMPERSAND
:
218 case PSI_T_AMPERSAND
:
266 case PSI_T_AMPERSAND
:
314 case PSI_T_AMPERSAND
:
362 case PSI_T_AMPERSAND
:
410 case PSI_T_AMPERSAND
:
458 case PSI_T_AMPERSAND
:
506 case PSI_T_AMPERSAND
:
554 case PSI_T_AMPERSAND
:
602 case PSI_T_AMPERSAND
:
650 case PSI_T_AMPERSAND
:
670 case PSI_T_AMPERSAND
:
698 case PSI_T_AMPERSAND
:
746 case PSI_T_AMPERSAND
:
794 case PSI_T_AMPERSAND
:
842 case PSI_T_AMPERSAND
:
890 case PSI_T_AMPERSAND
:
938 case PSI_T_AMPERSAND
:
986 case PSI_T_AMPERSAND
: