diff options
author | Stanislav Malyshev <stas@php.net> | 2015-01-27 13:48:02 -0800 |
---|---|---|
committer | Stanislav Malyshev <stas@php.net> | 2015-01-27 13:48:24 -0800 |
commit | 598c935245eca96ce93d1cc112cd8bbd1cf412c9 (patch) | |
tree | 652cf9da133dd010b290217310c0903fbde624c0 /ext/pdo | |
parent | 7d663aa90cee76a6cdcfdfdc9bcf730ac2029ee0 (diff) | |
download | php-git-598c935245eca96ce93d1cc112cd8bbd1cf412c9.tar.gz |
update the .re file for PDO
Diffstat (limited to 'ext/pdo')
-rw-r--r-- | ext/pdo/pdo_sql_parser.c | 35 | ||||
-rw-r--r-- | ext/pdo/pdo_sql_parser.re | 10 |
2 files changed, 33 insertions, 12 deletions
diff --git a/ext/pdo/pdo_sql_parser.c b/ext/pdo/pdo_sql_parser.c index e1acc171e4..d29e3b13b7 100644 --- a/ext/pdo/pdo_sql_parser.c +++ b/ext/pdo/pdo_sql_parser.c @@ -1,4 +1,5 @@ -/* Generated by re2c 0.13.5 */ +/* Generated by re2c 0.13.7.5 */ +#line 1 "ext/pdo/pdo_sql_parser.re" /* +----------------------------------------------------------------------+ | PHP Version 7 | @@ -46,9 +47,11 @@ static int scan(Scanner *s) char *cursor = s->cur; s->tok = cursor; + #line 55 "ext/pdo/pdo_sql_parser.re" - + +#line 55 "ext/pdo/pdo_sql_parser.c" { YYCTYPE yych; unsigned int yyaccept = 0; @@ -67,16 +70,19 @@ static int scan(Scanner *s) } yy2: YYCURSOR = YYMARKER; - switch (yyaccept) { - case 0: goto yy4; - case 1: goto yy10; + if (yyaccept == 0) { + goto yy4; + } else { + goto yy10; } yy3: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); if (yych >= 0x01) goto yy43; yy4: +#line 63 "ext/pdo/pdo_sql_parser.re" { SKIP_ONE(PDO_PARSER_TEXT); } +#line 86 "ext/pdo/pdo_sql_parser.c" yy5: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); @@ -158,7 +164,9 @@ yy7: default: goto yy8; } yy8: +#line 62 "ext/pdo/pdo_sql_parser.re" { RET(PDO_PARSER_BIND_POS); } +#line 170 "ext/pdo/pdo_sql_parser.c" yy9: ++YYCURSOR; switch ((yych = *YYCURSOR)) { @@ -166,7 +174,9 @@ yy9: default: goto yy13; } yy10: +#line 65 "ext/pdo/pdo_sql_parser.re" { RET(PDO_PARSER_TEXT); } +#line 180 "ext/pdo/pdo_sql_parser.c" yy11: yych = *++YYCURSOR; switch (yych) { @@ -201,7 +211,9 @@ yy14: default: goto yy14; } yy16: +#line 64 "ext/pdo/pdo_sql_parser.re" { RET(PDO_PARSER_TEXT); } +#line 217 "ext/pdo/pdo_sql_parser.c" yy17: ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); @@ -279,7 +291,9 @@ yy29: default: goto yy31; } yy31: +#line 60 "ext/pdo/pdo_sql_parser.re" { RET(PDO_PARSER_TEXT); } +#line 297 "ext/pdo/pdo_sql_parser.c" yy32: ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); @@ -351,7 +365,9 @@ yy32: default: goto yy34; } yy34: +#line 61 "ext/pdo/pdo_sql_parser.re" { RET(PDO_PARSER_BIND); } +#line 371 "ext/pdo/pdo_sql_parser.c" yy35: ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); @@ -379,7 +395,9 @@ yy39: goto yy37; yy40: ++YYCURSOR; +#line 59 "ext/pdo/pdo_sql_parser.re" { RET(PDO_PARSER_TEXT); } +#line 401 "ext/pdo/pdo_sql_parser.c" yy42: ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); @@ -399,17 +417,20 @@ yy44: goto yy42; yy45: ++YYCURSOR; +#line 58 "ext/pdo/pdo_sql_parser.re" { RET(PDO_PARSER_TEXT); } +#line 423 "ext/pdo/pdo_sql_parser.c" } +#line 66 "ext/pdo/pdo_sql_parser.re" } struct placeholder { char *pos; - char *quoted; /* quoted value */ size_t len; int bindno; size_t qlen; /* quoted length of value */ + char *quoted; /* quoted value */ int freeq; struct placeholder *next; }; @@ -419,7 +440,7 @@ static void free_param_name(zval *el) { } PDO_API int pdo_parse_params(pdo_stmt_t *stmt, char *inquery, size_t inquery_len, - char **outquery, size_t *outquery_len) + char **outquery, size_t *outquery_len) { Scanner s; char *ptr, *newbuffer; diff --git a/ext/pdo/pdo_sql_parser.re b/ext/pdo/pdo_sql_parser.re index 17f51e5c25..ef989d35c4 100644 --- a/ext/pdo/pdo_sql_parser.re +++ b/ext/pdo/pdo_sql_parser.re @@ -68,9 +68,9 @@ static int scan(Scanner *s) struct placeholder { char *pos; - int len; + size_t len; int bindno; - int qlen; /* quoted length of value */ + size_t qlen; /* quoted length of value */ char *quoted; /* quoted value */ int freeq; struct placeholder *next; @@ -80,15 +80,15 @@ static void free_param_name(zval *el) { efree(Z_PTR_P(el)); } -PDO_API int pdo_parse_params(pdo_stmt_t *stmt, char *inquery, int inquery_len, - char **outquery, int *outquery_len) +PDO_API int pdo_parse_params(pdo_stmt_t *stmt, char *inquery, size_t inquery_len, + char **outquery, size_t *outquery_len) { Scanner s; char *ptr, *newbuffer; int t; int bindno = 0; int ret = 0; - int newbuffer_len; + size_t newbuffer_len; HashTable *params; struct pdo_bound_param_data *param; int query_type = PDO_PLACEHOLDER_NONE; |