fix warning
[m6w6/ext-psi] / scripts / _include.php
1 <?php
2 ob_start(function($s) {
3 return preg_replace("/(?<=[^ \t])[ \t]+\$/m", "", $s);
4 });
5
6 $types = [
7 "INT8" => "i8",
8 "UINT8" => "u8",
9 "INT16" => "i16",
10 "UINT16" => "u16",
11 "INT32" => "i32",
12 "UINT32" => "u32",
13 "INT64" => "i64",
14 "UINT64" => "u64",
15 "INT128" => "i128",
16 "UINT128" => "u128",
17 "FLOAT" => "fval",
18 "DOUBLE" => "dval",
19 "LONG_DOUBLE" => "ldval",
20 ];
21
22 function t_is_int($t) {
23 switch ($t{0}) {
24 case "U":
25 case "I":
26 return true;
27 default:
28 return false;
29 }
30 }
31
32 function t_is_special($t) {
33 switch ($t) {
34 case "INT128":
35 case "UINT128":
36 case "LONG_DOUBLE":
37 return true;
38 default:
39 return false;
40 }
41 }
42
43 ?>
44 /*******************************************************************************
45 Copyright (c) 2016, Michael Wallner <mike@php.net>.
46 All rights reserved.
47
48 Redistribution and use in source and binary forms, with or without
49 modification, are permitted provided that the following conditions are met:
50
51 * Redistributions of source code must retain the above copyright notice,
52 this list of conditions and the following disclaimer.
53 * Redistributions in binary form must reproduce the above copyright
54 notice, this list of conditions and the following disclaimer in the
55 documentation and/or other materials provided with the distribution.
56
57 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
58 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
59 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
60 DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
61 FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
62 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
63 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
64 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
65 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
66 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
67 *******************************************************************************/
68
69 #include "php_psi_stdinc.h"
70 #include <assert.h>
71
72 #include "token.h"