Team Fortress 2 Source Code as on 22/4/2020
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

461 lines
9.9 KiB

  1. /* -----------------------------------------------------------------------------
  2. * See the LICENSE file for information on copyright, usage and redistribution
  3. * of SWIG, and the README file for authors - http://www.swig.org/release.html.
  4. *
  5. * php4kw.swg
  6. *
  7. * The 'keywords' in PHP are global, ie, the following names are fine
  8. * when used as class methods.
  9. * ----------------------------------------------------------------------------- */
  10. #define PHPKW(x) %keywordwarn(`x` " is a php keyword, renamed as c_"`x`,sourcefmt="%(lower)s", rename="c_%s",fullname=1) `x`
  11. %define PHPCN(x)
  12. %keywordwarn(`x` " is a php reserved class name, class renamed as c_"`x`,%$isclass,rename="c_%s") `x`;
  13. %keywordwarn(`x` " is a php reserved class name, constructor renamed as c_"`x`,%$isconstructor,rename="c_%s") `x`;
  14. %enddef
  15. #define PHPBN1(x) %builtinwarn(`x` " conflicts with a built-in name in php",sourcefmt="%(lower)s",fullname=1) `x`
  16. #define PHPBN2(x) %builtinwarn(`x` " conflicts with a built-in name in php") "::" `x`
  17. /*
  18. From
  19. http://aspn.activestate.com/ASPN/docs/PHP/reserved.html
  20. and reviewed by Olly Betts.
  21. Further updates from the PHP manual on php.net.
  22. */
  23. /* We classify these as kw since PHP will not run if used globally. */
  24. /* case insensitive */
  25. PHPKW(and);
  26. PHPKW(array);
  27. PHPKW(as);
  28. PHPKW(break);
  29. PHPKW(case);
  30. PHPKW(cfunction); /* No longer reserved in PHP5 */
  31. PHPKW(class);
  32. PHPKW(const);
  33. PHPKW(continue);
  34. PHPKW(declare);
  35. PHPKW(default);
  36. PHPKW(die);
  37. PHPKW(do);
  38. PHPKW(echo);
  39. PHPKW(else);
  40. PHPKW(elseif);
  41. PHPKW(empty);
  42. PHPKW(enddeclare);
  43. PHPKW(endfor);
  44. PHPKW(endforeach);
  45. PHPKW(endif);
  46. PHPKW(endswitch);
  47. PHPKW(endwhile);
  48. PHPKW(eval);
  49. PHPKW(exit);
  50. PHPKW(extends);
  51. PHPKW(for);
  52. PHPKW(foreach);
  53. PHPKW(function);
  54. PHPKW(global);
  55. PHPKW(if);
  56. PHPKW(include);
  57. PHPKW(include_once);
  58. PHPKW(isset);
  59. PHPKW(list);
  60. PHPKW(new);
  61. PHPKW(old_function); /* No longer reserved in PHP5 */
  62. PHPKW(or);
  63. PHPKW(print);
  64. PHPKW(require);
  65. PHPKW(require_once);
  66. PHPKW(return);
  67. PHPKW(static);
  68. PHPKW(switch);
  69. PHPKW(unset);
  70. PHPKW(use);
  71. PHPKW(var);
  72. PHPKW(while);
  73. PHPKW(xor);
  74. PHPKW(__FILE__);
  75. PHPKW(__LINE__);
  76. PHPKW(__FUNCTION__);
  77. PHPKW(__CLASS__);
  78. /* Added in PHP5 */
  79. PHPKW(__halt_compiler);
  80. PHPKW(abstract);
  81. PHPKW(catch);
  82. PHPKW(clone);
  83. PHPKW(final);
  84. PHPKW(implements);
  85. PHPKW(instanceof);
  86. PHPKW(interface);
  87. PHPKW(private);
  88. PHPKW(protected);
  89. PHPKW(public);
  90. PHPKW(throw);
  91. PHPKW(try);
  92. PHPKW(__METHOD__);
  93. /* We classify these as built-in names since they conflict, but PHP still runs */
  94. /* Type 1: case insensitive */
  95. PHPBN1(__sleep);
  96. PHPBN1(__wakeup);
  97. PHPBN1(not);
  98. PHPBN1(parent);
  99. PHPBN1(virtual);
  100. PHPBN1(NULL);
  101. PHPBN1(TRUE);
  102. PHPBN1(FALSE);
  103. /* Type 2: case sensitive */
  104. /* "Core Predefined Constants" from http://uk2.php.net/manual/en/reserved.constants.php */
  105. PHPBN2(E_ALL);
  106. PHPBN2(E_ERROR);
  107. PHPBN2(E_PARSE);
  108. PHPBN2(E_WARNING);
  109. PHPBN2(E_NOTICE);
  110. PHPBN2(E_CORE_ERROR);
  111. PHPBN2(E_CORE_WARNING);
  112. PHPBN2(E_COMPILE_ERROR);
  113. PHPBN2(E_COMPILE_WARNING);
  114. PHPBN2(E_USER_ERROR);
  115. PHPBN2(E_USER_WARNING);
  116. PHPBN2(E_USER_NOTICE);
  117. PHPBN2(PHP_OS);
  118. PHPBN2(PHP_VERSION);
  119. PHPBN2(PHP_SAPI);
  120. PHPBN2(PHP_EOL);
  121. PHPBN2(PHP_INT_MAX);
  122. PHPBN2(PHP_INT_SIZE);
  123. PHPBN2(DEFAULT_INCLUDE_PATH);
  124. PHPBN2(PEAR_INSTALL_DIR);
  125. PHPBN2(PEAR_EXTENSION_DIR);
  126. PHPBN2(PHP_EXTENSION_DIR);
  127. PHPBN2(PHP_PREFIX);
  128. PHPBN2(PHP_BINDIR);
  129. PHPBN2(PHP_LIBDIR);
  130. PHPBN2(PHP_DATADIR);
  131. PHPBN2(PHP_SYSCONFDIR);
  132. PHPBN2(PHP_LOCALSTATEDIR);
  133. PHPBN2(PHP_CONFIG_FILE_PATH);
  134. PHPBN2(PHP_CONFIG_FILE_SCAN_DIR);
  135. PHPBN2(PHP_SHLIB_SUFFIX);
  136. PHPBN2(PHP_OUTPUT_HANDLER_START);
  137. PHPBN2(PHP_OUTPUT_HANDLER_CONT);
  138. PHPBN2(PHP_OUTPUT_HANDLER_END);
  139. /* "Standard Predefined Constants" from http://uk2.php.net/manual/en/reserved.constants.php */
  140. PHPBN2(EXTR_OVERWRITE);
  141. PHPBN2(EXTR_SKIP);
  142. PHPBN2(EXTR_PREFIX_SAME);
  143. PHPBN2(EXTR_PREFIX_ALL);
  144. PHPBN2(EXTR_PREFIX_INVALID);
  145. PHPBN2(EXTR_PREFIX_IF_EXISTS);
  146. PHPBN2(EXTR_IF_EXISTS);
  147. PHPBN2(SORT_ASC);
  148. PHPBN2(SORT_DESC);
  149. PHPBN2(SORT_REGULAR);
  150. PHPBN2(SORT_NUMERIC);
  151. PHPBN2(SORT_STRING);
  152. PHPBN2(CASE_LOWER);
  153. PHPBN2(CASE_UPPER);
  154. PHPBN2(COUNT_NORMAL);
  155. PHPBN2(COUNT_RECURSIVE);
  156. PHPBN2(ASSERT_ACTIVE);
  157. PHPBN2(ASSERT_CALLBACK);
  158. PHPBN2(ASSERT_BAIL);
  159. PHPBN2(ASSERT_WARNING);
  160. PHPBN2(ASSERT_QUIET_EVAL);
  161. PHPBN2(CONNECTION_ABORTED);
  162. PHPBN2(CONNECTION_NORMAL);
  163. PHPBN2(CONNECTION_TIMEOUT);
  164. PHPBN2(INI_USER);
  165. PHPBN2(INI_PERDIR);
  166. PHPBN2(INI_SYSTEM);
  167. PHPBN2(INI_ALL);
  168. PHPBN2(M_E);
  169. PHPBN2(M_LOG2E);
  170. PHPBN2(M_LOG10E);
  171. PHPBN2(M_LN2);
  172. PHPBN2(M_LN10);
  173. PHPBN2(M_PI);
  174. PHPBN2(M_PI_2);
  175. PHPBN2(M_PI_4);
  176. PHPBN2(M_1_PI);
  177. PHPBN2(M_2_PI);
  178. PHPBN2(M_2_SQRTPI);
  179. PHPBN2(M_SQRT2);
  180. PHPBN2(M_SQRT1_2);
  181. PHPBN2(CRYPT_SALT_LENGTH);
  182. PHPBN2(CRYPT_STD_DES);
  183. PHPBN2(CRYPT_EXT_DES);
  184. PHPBN2(CRYPT_MD5);
  185. PHPBN2(CRYPT_BLOWFISH);
  186. PHPBN2(DIRECTORY_SEPARATOR);
  187. PHPBN2(SEEK_SET);
  188. PHPBN2(SEEK_CUR);
  189. PHPBN2(SEEK_END);
  190. PHPBN2(LOCK_SH);
  191. PHPBN2(LOCK_EX);
  192. PHPBN2(LOCK_UN);
  193. PHPBN2(LOCK_NB);
  194. PHPBN2(HTML_SPECIALCHARS);
  195. PHPBN2(HTML_ENTITIES);
  196. PHPBN2(ENT_COMPAT);
  197. PHPBN2(ENT_QUOTES);
  198. PHPBN2(ENT_NOQUOTES);
  199. PHPBN2(INFO_GENERAL);
  200. PHPBN2(INFO_CREDITS);
  201. PHPBN2(INFO_CONFIGURATION);
  202. PHPBN2(INFO_MODULES);
  203. PHPBN2(INFO_ENVIRONMENT);
  204. PHPBN2(INFO_VARIABLES);
  205. PHPBN2(INFO_LICENSE);
  206. PHPBN2(INFO_ALL);
  207. PHPBN2(CREDITS_GROUP);
  208. PHPBN2(CREDITS_GENERAL);
  209. PHPBN2(CREDITS_SAPI);
  210. PHPBN2(CREDITS_MODULES);
  211. PHPBN2(CREDITS_DOCS);
  212. PHPBN2(CREDITS_FULLPAGE);
  213. PHPBN2(CREDITS_QA);
  214. PHPBN2(CREDITS_ALL);
  215. PHPBN2(STR_PAD_LEFT);
  216. PHPBN2(STR_PAD_RIGHT);
  217. PHPBN2(STR_PAD_BOTH);
  218. PHPBN2(PATHINFO_DIRNAME);
  219. PHPBN2(PATHINFO_BASENAME);
  220. PHPBN2(PATHINFO_EXTENSION);
  221. PHPBN2(PATH_SEPARATOR);
  222. PHPBN2(CHAR_MAX);
  223. PHPBN2(LC_CTYPE);
  224. PHPBN2(LC_NUMERIC);
  225. PHPBN2(LC_TIME);
  226. PHPBN2(LC_COLLATE);
  227. PHPBN2(LC_MONETARY);
  228. PHPBN2(LC_ALL);
  229. PHPBN2(LC_MESSAGES);
  230. PHPBN2(ABDAY_1);
  231. PHPBN2(ABDAY_2);
  232. PHPBN2(ABDAY_3);
  233. PHPBN2(ABDAY_4);
  234. PHPBN2(ABDAY_5);
  235. PHPBN2(ABDAY_6);
  236. PHPBN2(ABDAY_7);
  237. PHPBN2(DAY_1);
  238. PHPBN2(DAY_2);
  239. PHPBN2(DAY_3);
  240. PHPBN2(DAY_4);
  241. PHPBN2(DAY_5);
  242. PHPBN2(DAY_6);
  243. PHPBN2(DAY_7);
  244. PHPBN2(ABMON_1);
  245. PHPBN2(ABMON_2);
  246. PHPBN2(ABMON_3);
  247. PHPBN2(ABMON_4);
  248. PHPBN2(ABMON_5);
  249. PHPBN2(ABMON_6);
  250. PHPBN2(ABMON_7);
  251. PHPBN2(ABMON_8);
  252. PHPBN2(ABMON_9);
  253. PHPBN2(ABMON_10);
  254. PHPBN2(ABMON_11);
  255. PHPBN2(ABMON_12);
  256. PHPBN2(MON_1);
  257. PHPBN2(MON_2);
  258. PHPBN2(MON_3);
  259. PHPBN2(MON_4);
  260. PHPBN2(MON_5);
  261. PHPBN2(MON_6);
  262. PHPBN2(MON_7);
  263. PHPBN2(MON_8);
  264. PHPBN2(MON_9);
  265. PHPBN2(MON_10);
  266. PHPBN2(MON_11);
  267. PHPBN2(MON_12);
  268. PHPBN2(AM_STR);
  269. PHPBN2(PM_STR);
  270. PHPBN2(D_T_FMT);
  271. PHPBN2(D_FMT);
  272. PHPBN2(T_FMT);
  273. PHPBN2(T_FMT_AMPM);
  274. PHPBN2(ERA);
  275. PHPBN2(ERA_YEAR);
  276. PHPBN2(ERA_D_T_FMT);
  277. PHPBN2(ERA_D_FMT);
  278. PHPBN2(ERA_T_FMT);
  279. PHPBN2(ALT_DIGITS);
  280. PHPBN2(INT_CURR_SYMBOL);
  281. PHPBN2(CURRENCY_SYMBOL);
  282. PHPBN2(CRNCYSTR);
  283. PHPBN2(MON_DECIMAL_POINT);
  284. PHPBN2(MON_THOUSANDS_SEP);
  285. PHPBN2(MON_GROUPING);
  286. PHPBN2(POSITIVE_SIGN);
  287. PHPBN2(NEGATIVE_SIGN);
  288. PHPBN2(INT_FRAC_DIGITS);
  289. PHPBN2(FRAC_DIGITS);
  290. PHPBN2(P_CS_PRECEDES);
  291. PHPBN2(P_SEP_BY_SPACE);
  292. PHPBN2(N_CS_PRECEDES);
  293. PHPBN2(N_SEP_BY_SPACE);
  294. PHPBN2(P_SIGN_POSN);
  295. PHPBN2(N_SIGN_POSN);
  296. PHPBN2(DECIMAL_POINT);
  297. PHPBN2(RADIXCHAR);
  298. PHPBN2(THOUSANDS_SEP);
  299. PHPBN2(THOUSEP);
  300. PHPBN2(GROUPING);
  301. PHPBN2(YESEXPR);
  302. PHPBN2(NOEXPR);
  303. PHPBN2(YESSTR);
  304. PHPBN2(NOSTR);
  305. PHPBN2(CODESET);
  306. PHPBN2(LOG_EMERG);
  307. PHPBN2(LOG_ALERT);
  308. PHPBN2(LOG_CRIT);
  309. PHPBN2(LOG_ERR);
  310. PHPBN2(LOG_WARNING);
  311. PHPBN2(LOG_NOTICE);
  312. PHPBN2(LOG_INFO);
  313. PHPBN2(LOG_DEBUG);
  314. PHPBN2(LOG_KERN);
  315. PHPBN2(LOG_USER);
  316. PHPBN2(LOG_MAIL);
  317. PHPBN2(LOG_DAEMON);
  318. PHPBN2(LOG_AUTH);
  319. PHPBN2(LOG_SYSLOG);
  320. PHPBN2(LOG_LPR);
  321. PHPBN2(LOG_NEWS);
  322. PHPBN2(LOG_UUCP);
  323. PHPBN2(LOG_CRON);
  324. PHPBN2(LOG_AUTHPRIV);
  325. PHPBN2(LOG_LOCAL0);
  326. PHPBN2(LOG_LOCAL1);
  327. PHPBN2(LOG_LOCAL2);
  328. PHPBN2(LOG_LOCAL3);
  329. PHPBN2(LOG_LOCAL4);
  330. PHPBN2(LOG_LOCAL5);
  331. PHPBN2(LOG_LOCAL6);
  332. PHPBN2(LOG_LOCAL7);
  333. PHPBN2(LOG_PID);
  334. PHPBN2(LOG_CONS);
  335. PHPBN2(LOG_ODELAY);
  336. PHPBN2(LOG_NDELAY);
  337. PHPBN2(LOG_NOWAIT);
  338. PHPBN2(LOG_PERROR);
  339. /* Added in PHP5 */
  340. PHPBN2(E_STRICT);
  341. PHPBN2(__COMPILER_HALT_OFFSET__);
  342. /* Class names reserved by PHP */
  343. PHPCN(stdClass);
  344. PHPCN(__PHP_Incomplete_Class);
  345. PHPCN(Directory);
  346. /* Added in PHP5 (this list apparently depends which extensions you load by default). */
  347. PHPCN(parent);
  348. PHPCN(self);
  349. PHPCN(Exception);
  350. PHPCN(php_user_filter);
  351. PHPCN(ErrorException);
  352. PHPCN(XMLWriter);
  353. PHPCN(LibXMLError);
  354. PHPCN(SimpleXMLElement);
  355. PHPCN(SoapClient);
  356. PHPCN(SoapVar);
  357. PHPCN(SoapServer);
  358. PHPCN(SoapFault);
  359. PHPCN(SoapParam);
  360. PHPCN(SoapHeader);
  361. PHPCN(RecursiveIteratorIterator);
  362. PHPCN(FilterIterator);
  363. PHPCN(RecursiveFilterIterator);
  364. PHPCN(ParentIterator);
  365. PHPCN(LimitIterator);
  366. PHPCN(CachingIterator);
  367. PHPCN(RecursiveCachingIterator);
  368. PHPCN(IteratorIterator);
  369. PHPCN(NoRewindIterator);
  370. PHPCN(AppendIterator);
  371. PHPCN(InfiniteIterator);
  372. PHPCN(EmptyIterator);
  373. PHPCN(ArrayObject);
  374. PHPCN(ArrayIterator);
  375. PHPCN(RecursiveArrayIterator);
  376. PHPCN(SplFileInfo);
  377. PHPCN(DirectoryIterator);
  378. PHPCN(RecursiveDirectoryIterator);
  379. PHPCN(SplFileObject);
  380. PHPCN(SplTempFileObject);
  381. PHPCN(SimpleXMLIterator);
  382. PHPCN(LogicException);
  383. PHPCN(BadFunctionCallException);
  384. PHPCN(BadMethodCallException);
  385. PHPCN(DomainException);
  386. PHPCN(InvalidArgumentException);
  387. PHPCN(LengthException);
  388. PHPCN(OutOfRangeException);
  389. PHPCN(RuntimeException);
  390. PHPCN(OutOfBoundsException);
  391. PHPCN(OverflowException);
  392. PHPCN(RangeException);
  393. PHPCN(UnderflowException);
  394. PHPCN(UnexpectedValueException);
  395. PHPCN(SplObjectStorage);
  396. PHPCN(ReflectionException);
  397. PHPCN(Reflection);
  398. PHPCN(ReflectionFunction);
  399. PHPCN(ReflectionParameter);
  400. PHPCN(ReflectionMethod);
  401. PHPCN(ReflectionClass);
  402. PHPCN(ReflectionObject);
  403. PHPCN(ReflectionProperty);
  404. PHPCN(ReflectionExtension);
  405. PHPCN(DOMException);
  406. PHPCN(DOMStringList);
  407. PHPCN(DOMNameList);
  408. PHPCN(DOMImplementationList);
  409. PHPCN(DOMImplementationSource);
  410. PHPCN(DOMImplementation);
  411. PHPCN(DOMNode);
  412. PHPCN(DOMNameSpaceNode);
  413. PHPCN(DOMDocumentFragment);
  414. PHPCN(DOMDocument);
  415. PHPCN(DOMNodeList);
  416. PHPCN(DOMNamedNodeMap);
  417. PHPCN(DOMCharacterData);
  418. PHPCN(DOMAttr);
  419. PHPCN(DOMElement);
  420. PHPCN(DOMText);
  421. PHPCN(DOMComment);
  422. PHPCN(DOMTypeinfo);
  423. PHPCN(DOMUserDataHandler);
  424. PHPCN(DOMDomError);
  425. PHPCN(DOMErrorHandler);
  426. PHPCN(DOMLocator);
  427. PHPCN(DOMConfiguration);
  428. PHPCN(DOMCdataSection);
  429. PHPCN(DOMDocumentType);
  430. PHPCN(DOMNotation);
  431. PHPCN(DOMEntity);
  432. PHPCN(DOMEntityReference);
  433. PHPCN(DOMProcessingInstruction);
  434. PHPCN(DOMStringExtend);
  435. PHPCN(DOMXPath);
  436. PHPCN(XMLReader);
  437. PHPCN(SQLiteDatabase);
  438. PHPCN(SQLiteResult);
  439. PHPCN(SQLiteUnbuffered);
  440. PHPCN(SQLiteException);
  441. #undef PHPKW
  442. #undef PHPBN1
  443. #undef PHPBN2
  444. #undef PHPCN