1 /* 2 +----------------------------------------------------------------------+ 3 | Copyright (c) The PHP Group | 4 +----------------------------------------------------------------------+ 5 | This source file is subject to version 3.01 of the PHP license, | 6 | that is bundled with this package in the file LICENSE, and is | 7 | available through the world-wide-web at the following url: | 8 | https://www.php.net/license/3_01.txt | 9 | If you did not receive a copy of the PHP license and are unable to | 10 | obtain it through the world-wide-web, please send a note to | 11 | license@php.net so we can mail you a copy immediately. | 12 +----------------------------------------------------------------------+ 13 | Author: George Schlossnagle <george@omniti.com> | 14 +----------------------------------------------------------------------+ 15 */ 16 17 #define PDO_PARSER_TEXT 1 18 #define PDO_PARSER_BIND 2 19 #define PDO_PARSER_BIND_POS 3 20 #define PDO_PARSER_ESCAPED_QUESTION 4 21 #define PDO_PARSER_CUSTOM_QUOTE 5 22 #define PDO_PARSER_EOI 6 23 24 #define PDO_PARSER_BINDNO_ESCAPED_CHAR -1 25 26 #define RET(i) {s->cur = cursor; return i; } 27 #define SKIP_ONE(i) {s->cur = s->tok + 1; return i; } 28 29 #define YYCTYPE unsigned char 30 #define YYCURSOR cursor 31 #define YYLIMIT s->end 32 #define YYMARKER s->ptr 33 #define YYFILL(n) { if (YYLIMIT - 1 <= YYCURSOR) RET(PDO_PARSER_EOI); } 34