case insensitivity where we can

additional param types
This commit is contained in:
krakjoe 2014-02-17 08:53:47 +00:00
parent 1fce0887a3
commit 1641d2afbe
7 changed files with 401 additions and 286 deletions

View file

@ -21,16 +21,17 @@
%option reentrant noyywrap never-interactive nounistd
%option bison-bridge
C_TRUE "true"
C_YES "yes"
C_ON "on"
C_ENABLED "enabled"
C_FALSE "false"
C_NO "no"
C_OFF "off"
C_DISABLED "disabled"
C_EVAL "eval"
C_SHELL "shell"
C_TRUE ?i:"true"
C_YES ?i:"yes"
C_ON ?i:"on"
C_ENABLED ?i:"enabled"
C_FALSE ?i:"false"
C_NO ?i:"no"
C_OFF ?i:"off"
C_DISABLED ?i:"disabled"
C_EVAL ?i:"eval"
C_SHELL ?i:"shell"
C_IF ?i:"if"
DIGITS [0-9]+
ID [a-zA-Z_\x7f-\xff\-][a-zA-Z0-9_\x7f-\xff\-]*
@ -44,6 +45,21 @@ INPUT [^\n]+
%%
<INITIAL>
{
{C_EVAL} {
BEGIN(RAW);
phpdbg_init_param(yylval, EMPTY_PARAM);
return C_EVAL;
}
{C_SHELL} {
BEGIN(RAW);
phpdbg_init_param(yylval, EMPTY_PARAM);
return C_SHELL;
}
{C_IF} {
BEGIN(RAW);
phpdbg_init_param(yylval, EMPTY_PARAM);
return C_IF;
}
{C_YES}|{C_ON}|{C_ENABLED}|{C_TRUE} {
phpdbg_init_param(yylval, NUMERIC_PARAM);
yylval->num = 1;
@ -54,20 +70,6 @@ INPUT [^\n]+
yylval->num = 0;
return C_FALSY;
}
{C_EVAL} {
BEGIN(RAW);
phpdbg_init_param(yylval, STR_PARAM);
yylval->str = strndup(yytext, yyleng);
yylval->len = yyleng;
return C_EVAL;
}
{C_SHELL} {
BEGIN(RAW);
phpdbg_init_param(yylval, STR_PARAM);
yylval->str = strndup(yytext, yyleng);
yylval->len = yyleng;
return C_SHELL;
}
{DIGITS} {
phpdbg_init_param(yylval, NUMERIC_PARAM);
yylval->num = atoi(yytext);
@ -96,7 +98,7 @@ INPUT [^\n]+
yylval->len = yyleng;
return T_LITERAL;
}
{ID} {
{NSID} {
phpdbg_init_param(yylval, STR_PARAM);
yylval->str = strndup(yytext, yyleng);
yylval->len = yyleng;

View file

@ -45,6 +45,10 @@ void phpdbg_debug_param(const phpdbg_param_t *param, const char *msg) {
case NUMERIC_PARAM:
fprintf(stderr, "%s NUMERIC_PARAM(%ld)\n", msg, param->num);
break;
case COND_PARAM:
fprintf(stderr, "%s COND_PARAM(%s=%d)\n", msg, param->str, param->len);
break;
}
}
}
@ -119,16 +123,28 @@ int phpdbg_stack_execute(phpdbg_param_t *stack, char **why) {
}
command = params = (phpdbg_param_t*) stack->next;
if (command->type != STR_PARAM) {
asprintf(
why, "the first parameter is expected to be a string !!");
return FAILURE;
switch (command->type) {
case EVAL_PARAM:
phpdbg_notice("eval (%s)", command->str);
break;
case SHELL_PARAM:
phpdbg_notice("shell (%s)", command->str);
break;
case STR_PARAM: {
/* do resolve command(s) */
} break;
default:
asprintf(
why, "the first parameter makes no sense !!");
return FAILURE;
}
/* do resolve command(s) */
/* do prepare params for function */
while (params) {
phpdbg_debug_param(params, "-> ...");
params = params->next;
@ -161,6 +177,7 @@ typedef void* yyscan_t;
%token C_STRING "string (some input, perhaps)"
%token C_EVAL "eval"
%token C_SHELL "shell"
%token C_IF "if (condition)"
%token T_DIGITS "digits (numbers)"
%token T_LITERAL "literal (string)"
@ -187,18 +204,18 @@ params
;
normal
: T_ID { phpdbg_stack_push(stack, &$1); }
| normal T_ID { phpdbg_stack_push(stack, &$2); }
: T_ID { $$ = $1; }
| normal T_ID { $$ = $2; }
;
special
: C_EVAL T_INPUT { phpdbg_stack_push(stack, &$1); phpdbg_stack_push(stack, &$2); }
| C_SHELL T_INPUT { phpdbg_stack_push(stack, &$1); phpdbg_stack_push(stack, &$2); }
: C_EVAL T_INPUT { $$ = $2; $$.type = EVAL_PARAM; }
| C_SHELL T_INPUT { $$ = $2; $$.type = SHELL_PARAM;; }
;
command
: normal
| special
: normal { phpdbg_stack_push(stack, &$1); }
| special { phpdbg_stack_push(stack, &$1); }
;
parameter
@ -210,6 +227,7 @@ parameter
| T_LITERAL { $$ = $1; }
| C_TRUTHY { $$ = $1; }
| C_FALSY { $$ = $1; }
| C_IF T_INPUT { $$ = $2; $$.type = COND_PARAM; }
;
handler

View file

@ -41,7 +41,11 @@ typedef enum {
NUMERIC_PARAM,
NUMERIC_FUNCTION_PARAM,
NUMERIC_METHOD_PARAM,
STACK_PARAM
STACK_PARAM,
EVAL_PARAM,
SHELL_PARAM,
COND_PARAM,
ORIG_PARAM
} phpdbg_param_type;
typedef struct _phpdbg_input_t phpdbg_input_t;

View file

@ -349,8 +349,8 @@ static void yy_fatal_error (yyconst char msg[] ,yyscan_t yyscanner );
*yy_cp = '\0'; \
yyg->yy_c_buf_p = yy_cp;
#define YY_NUM_RULES 14
#define YY_END_OF_BUFFER 15
#define YY_NUM_RULES 15
#define YY_END_OF_BUFFER 16
/* This struct is not used in this scanner,
but its presence is necessary. */
struct yy_trans_info
@ -358,17 +358,19 @@ struct yy_trans_info
flex_int32_t yy_verify;
flex_int32_t yy_nxt;
};
static yyconst flex_int16_t yy_accept[83] =
static yyconst flex_int16_t yy_accept[92] =
{ 0,
0, 0, 0, 0, 15, 13, 12, 12, 12, 13,
10, 5, 5, 13, 13, 10, 10, 10, 10, 10,
10, 10, 10, 11, 11, 12, 0, 0, 12, 12,
0, 0, 9, 0, 0, 10, 10, 0, 0, 5,
0, 0, 10, 10, 10, 10, 2, 10, 1, 10,
10, 10, 11, 11, 7, 9, 0, 7, 0, 8,
0, 0, 10, 10, 10, 10, 10, 10, 6, 10,
10, 3, 10, 10, 6, 10, 10, 4, 10, 10,
10, 0
0, 0, 0, 0, 16, 14, 13, 13, 13, 14,
11, 6, 6, 14, 11, 11, 11, 11, 11, 11,
11, 11, 11, 14, 12, 12, 13, 0, 0, 13,
13, 0, 0, 10, 0, 0, 11, 11, 0, 0,
6, 0, 11, 11, 11, 11, 3, 5, 11, 4,
11, 11, 11, 11, 12, 12, 8, 10, 0, 8,
0, 0, 9, 11, 11, 11, 11, 5, 11, 11,
4, 7, 0, 0, 11, 11, 1, 11, 11, 4,
7, 11, 11, 5, 2, 11, 11, 11, 4, 5,
0
} ;
static yyconst flex_int32_t yy_ec[256] =
@ -379,14 +381,14 @@ static yyconst flex_int32_t yy_ec[256] =
1, 4, 1, 5, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 6, 1, 1, 7, 8, 8,
8, 8, 8, 8, 8, 8, 8, 9, 1, 1,
1, 1, 1, 1, 10, 10, 10, 10, 10, 10,
6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
1, 11, 1, 1, 6, 1, 12, 13, 10, 14,
1, 1, 1, 1, 10, 11, 12, 13, 14, 15,
6, 16, 17, 6, 6, 18, 6, 19, 20, 6,
6, 21, 22, 23, 24, 25, 6, 6, 26, 6,
1, 27, 1, 1, 6, 1, 28, 29, 12, 30,
15, 16, 6, 17, 18, 6, 6, 19, 6, 20,
21, 6, 6, 22, 23, 24, 25, 26, 6, 27,
28, 6, 1, 1, 1, 1, 6, 6, 6, 6,
31, 32, 6, 33, 34, 6, 6, 35, 6, 36,
37, 6, 6, 38, 39, 40, 41, 42, 6, 43,
44, 6, 1, 1, 1, 1, 6, 6, 6, 6,
6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
@ -403,115 +405,157 @@ static yyconst flex_int32_t yy_ec[256] =
6, 6, 6, 6, 6
} ;
static yyconst flex_int32_t yy_meta[29] =
static yyconst flex_int32_t yy_meta[45] =
{ 0,
1, 1, 2, 3, 1, 4, 5, 5, 1, 4,
1, 4, 4, 4, 4, 4, 4, 4, 4, 4,
4, 4, 4, 4, 4, 4, 4, 4
4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
4, 4, 4, 4, 4, 4, 1, 4, 4, 4,
4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
4, 4, 4, 4
} ;
static yyconst flex_int16_t yy_base[93] =
static yyconst flex_int16_t yy_base[103] =
{ 0,
0, 0, 27, 30, 247, 228, 33, 36, 44, 45,
56, 44, 61, 272, 71, 82, 68, 48, 23, 79,
84, 59, 88, 0, 105, 108, 219, 97, 111, 114,
117, 87, 208, 122, 128, 179, 144, 116, 137, 127,
142, 158, 150, 129, 152, 153, 135, 158, 125, 160,
37, 159, 0, 177, 176, 272, 116, 180, 0, 0,
191, 0, 177, 188, 185, 187, 189, 194, 0, 198,
195, 78, 200, 201, 0, 203, 208, 57, 209, 172,
211, 272, 229, 234, 239, 244, 249, 254, 259, 264,
39, 266
0, 0, 43, 46, 161, 150, 49, 52, 60, 61,
88, 60, 64, 433, 115, 58, 70, 42, 65, 93,
97, 116, 121, 155, 0, 103, 137, 125, 71, 142,
163, 164, 116, 77, 167, 144, 67, 92, 169, 194,
172, 215, 166, 176, 203, 172, 94, 102, 200, 153,
202, 218, 231, 175, 0, 236, 177, 433, 78, 249,
0, 276, 0, 241, 238, 256, 265, 246, 271, 278,
276, 0, 312, 339, 316, 290, 277, 318, 319, 284,
0, 338, 343, 309, 317, 344, 346, 351, 345, 348,
433, 385, 390, 395, 400, 405, 410, 415, 420, 56,
425, 427
} ;
static yyconst flex_int16_t yy_def[93] =
static yyconst flex_int16_t yy_def[103] =
{ 0,
82, 1, 83, 83, 82, 84, 84, 84, 82, 85,
86, 84, 84, 82, 87, 86, 16, 16, 16, 16,
16, 16, 16, 88, 88, 82, 84, 82, 84, 82,
85, 89, 84, 89, 85, 16, 16, 82, 87, 84,
84, 90, 16, 16, 16, 16, 16, 16, 16, 16,
16, 16, 88, 88, 82, 82, 89, 89, 91, 41,
90, 61, 16, 16, 16, 16, 16, 16, 92, 16,
16, 16, 16, 16, 92, 16, 16, 16, 16, 16,
16, 0, 82, 82, 82, 82, 82, 82, 82, 82,
82, 82
91, 1, 92, 92, 91, 93, 93, 93, 91, 94,
95, 93, 93, 91, 95, 15, 15, 15, 15, 15,
15, 15, 15, 96, 97, 97, 91, 93, 91, 93,
91, 94, 98, 93, 98, 94, 15, 15, 91, 99,
93, 93, 15, 15, 15, 15, 15, 15, 15, 15,
15, 15, 15, 15, 97, 97, 91, 91, 98, 98,
100, 101, 42, 15, 15, 15, 15, 15, 15, 15,
15, 102, 101, 101, 15, 15, 15, 15, 15, 15,
102, 15, 15, 15, 15, 15, 15, 15, 15, 15,
0, 91, 91, 91, 91, 91, 91, 91, 91, 91,
91, 91
} ;
static yyconst flex_int16_t yy_nxt[301] =
static yyconst flex_int16_t yy_nxt[478] =
{ 0,
6, 7, 8, 9, 10, 11, 12, 13, 14, 11,
15, 11, 11, 16, 17, 18, 11, 11, 11, 19,
20, 11, 21, 22, 11, 11, 11, 23, 25, 26,
25, 25, 26, 25, 29, 29, 30, 29, 29, 30,
36, 28, 69, 47, 28, 30, 30, 30, 32, 33,
40, 40, 28, 34, 36, 35, 27, 27, 27, 46,
27, 68, 37, 37, 38, 36, 39, 40, 40, 28,
41, 27, 27, 27, 36, 27, 36, 27, 27, 28,
51, 27, 27, 27, 27, 36, 27, 44, 37, 37,
38, 56, 39, 45, 48, 36, 36, 57, 49, 43,
11, 11, 15, 16, 17, 11, 18, 11, 19, 20,
11, 21, 22, 11, 11, 23, 24, 11, 11, 15,
16, 17, 11, 18, 11, 19, 20, 11, 21, 22,
11, 11, 11, 23, 26, 27, 26, 26, 27, 26,
30, 30, 31, 30, 30, 31, 47, 29, 37, 72,
29, 31, 31, 31, 33, 34, 41, 41, 29, 35,
41, 41, 29, 47, 37, 37, 44, 57, 57, 46,
91, 37, 45, 37, 48, 29, 37, 36, 28, 28,
28, 37, 28, 44, 38, 38, 39, 46, 37, 45,
50, 36, 52, 55, 55, 36, 54, 30, 54, 30,
30, 30, 29, 29, 30, 30, 30, 30, 82, 28,
32, 33, 55, 55, 59, 34, 56, 35, 58, 58,
27, 32, 57, 40, 40, 28, 34, 27, 27, 27,
64, 27, 36, 27, 27, 28, 36, 27, 60, 60,
28, 60, 36, 60, 60, 60, 60, 60, 27, 27,
27, 36, 27, 65, 62, 62, 38, 36, 39, 36,
36, 66, 63, 47, 67, 36, 36, 36, 54, 30,
54, 49, 55, 55, 56, 49, 58, 58, 70, 36,
57, 27, 27, 27, 36, 27, 36, 62, 62, 38,
37, 48, 42, 37, 56, 31, 56, 49, 37, 37,
37, 50, 51, 37, 40, 28, 28, 28, 37, 28,
58, 38, 38, 39, 49, 37, 37, 37, 50, 51,
37, 43, 37, 29, 53, 37, 52, 37, 31, 31,
31, 40, 59, 30, 30, 31, 28, 33, 43, 37,
29, 53, 35, 52, 37, 28, 28, 28, 29, 28,
91, 28, 28, 29, 31, 31, 31, 33, 34, 37,
91, 58, 35, 60, 60, 57, 57, 61, 41, 41,
29, 28, 37, 57, 57, 65, 37, 64, 37, 67,
36, 37, 37, 59, 28, 28, 28, 91, 28, 37,
71, 39, 36, 72, 36, 36, 36, 74, 49, 73,
76, 36, 36, 77, 47, 36, 28, 36, 36, 78,
36, 79, 80, 81, 47, 36, 36, 28, 36, 24,
24, 24, 24, 24, 27, 27, 28, 27, 27, 31,
31, 31, 31, 31, 36, 36, 82, 36, 36, 42,
42, 82, 42, 42, 53, 82, 53, 53, 53, 32,
32, 32, 32, 32, 61, 61, 82, 61, 61, 75,
75, 5, 82, 82, 82, 82, 82, 82, 82, 82,
82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
82, 82, 82, 82, 82, 82, 82, 82, 82, 82
28, 28, 29, 65, 64, 37, 67, 91, 37, 37,
91, 91, 66, 91, 68, 69, 37, 91, 37, 37,
28, 63, 63, 29, 63, 63, 63, 63, 63, 63,
66, 68, 69, 37, 37, 37, 37, 56, 31, 56,
91, 70, 63, 63, 63, 63, 63, 37, 76, 91,
75, 37, 71, 58, 37, 60, 60, 37, 70, 91,
91, 91, 37, 91, 37, 91, 76, 91, 75, 71,
91, 37, 37, 77, 37, 59, 28, 28, 28, 37,
28, 37, 74, 74, 39, 91, 78, 37, 79, 37,
77, 80, 37, 37, 37, 91, 91, 91, 37, 91,
37, 91, 40, 78, 37, 79, 37, 83, 80, 37,
37, 37, 28, 28, 28, 91, 28, 37, 74, 74,
39, 91, 91, 37, 83, 37, 82, 91, 91, 91,
91, 84, 37, 37, 37, 37, 85, 91, 40, 28,
28, 28, 37, 28, 82, 74, 74, 39, 84, 37,
37, 37, 37, 85, 37, 86, 87, 88, 89, 37,
37, 37, 37, 90, 37, 40, 91, 37, 91, 91,
91, 37, 86, 87, 88, 89, 37, 37, 37, 37,
90, 37, 91, 91, 37, 25, 25, 25, 25, 25,
28, 28, 91, 28, 28, 32, 32, 32, 32, 32,
37, 37, 91, 37, 37, 54, 54, 91, 54, 54,
55, 91, 55, 55, 55, 33, 33, 33, 33, 33,
62, 62, 91, 62, 62, 73, 73, 91, 73, 73,
81, 81, 5, 91, 91, 91, 91, 91, 91, 91,
91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
91, 91, 91, 91, 91, 91, 91
} ;
static yyconst flex_int16_t yy_chk[301] =
static yyconst flex_int16_t yy_chk[478] =
{ 0,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 3, 3,
3, 4, 4, 4, 7, 7, 7, 8, 8, 8,
19, 7, 91, 19, 8, 9, 9, 9, 10, 10,
12, 12, 12, 10, 51, 10, 11, 11, 11, 18,
11, 51, 11, 11, 11, 18, 11, 13, 13, 13,
12, 15, 15, 15, 78, 15, 22, 15, 15, 15,
22, 15, 16, 16, 16, 17, 16, 17, 16, 16,
16, 32, 16, 17, 20, 72, 20, 32, 20, 16,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 3, 3, 3, 4, 4, 4,
7, 7, 7, 8, 8, 8, 18, 7, 18, 100,
8, 9, 9, 9, 10, 10, 12, 12, 12, 10,
13, 13, 13, 18, 16, 18, 16, 29, 29, 17,
59, 19, 16, 37, 19, 34, 17, 10, 11, 11,
11, 16, 11, 16, 11, 11, 11, 17, 19, 16,
21, 21, 23, 28, 28, 23, 25, 25, 25, 26,
26, 26, 29, 29, 29, 30, 30, 30, 57, 29,
31, 31, 38, 38, 38, 31, 34, 31, 34, 34,
35, 35, 34, 40, 40, 40, 35, 39, 39, 39,
44, 39, 49, 39, 39, 39, 44, 39, 41, 41,
41, 41, 47, 41, 41, 41, 41, 41, 42, 42,
42, 37, 42, 45, 42, 42, 42, 43, 42, 45,
46, 46, 43, 48, 50, 48, 52, 50, 54, 54,
54, 52, 55, 55, 58, 80, 58, 58, 63, 80,
58, 61, 61, 61, 63, 61, 36, 61, 61, 61,
37, 19, 12, 17, 26, 26, 26, 20, 38, 20,
47, 20, 21, 21, 11, 15, 15, 15, 48, 15,
33, 15, 15, 15, 20, 38, 20, 47, 20, 21,
21, 15, 22, 28, 23, 48, 22, 23, 27, 27,
27, 15, 33, 30, 30, 30, 36, 36, 15, 22,
30, 23, 36, 22, 23, 24, 24, 24, 6, 24,
5, 24, 24, 24, 31, 31, 31, 32, 32, 50,
0, 35, 32, 35, 35, 39, 39, 39, 41, 41,
41, 24, 43, 57, 57, 44, 50, 43, 46, 46,
32, 54, 44, 35, 40, 40, 40, 0, 40, 43,
64, 61, 65, 65, 66, 64, 67, 67, 68, 66,
70, 68, 71, 71, 73, 70, 33, 73, 74, 74,
76, 76, 77, 79, 81, 77, 79, 27, 81, 83,
83, 83, 83, 83, 84, 84, 6, 84, 84, 85,
85, 85, 85, 85, 86, 86, 5, 86, 86, 87,
87, 0, 87, 87, 88, 0, 88, 88, 88, 89,
89, 89, 89, 89, 90, 90, 0, 90, 90, 92,
92, 82, 82, 82, 82, 82, 82, 82, 82, 82,
82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
82, 82, 82, 82, 82, 82, 82, 82, 82, 82
40, 40, 40, 44, 43, 46, 46, 0, 54, 44,
0, 0, 45, 0, 49, 51, 49, 0, 51, 45,
40, 42, 42, 42, 42, 42, 42, 42, 42, 42,
45, 49, 51, 49, 52, 51, 45, 56, 56, 56,
0, 52, 42, 42, 42, 42, 42, 53, 65, 0,
64, 52, 53, 60, 65, 60, 60, 64, 52, 0,
0, 0, 68, 0, 53, 0, 65, 0, 64, 53,
0, 65, 66, 66, 64, 60, 62, 62, 62, 68,
62, 67, 62, 62, 62, 0, 67, 69, 69, 66,
66, 70, 71, 77, 70, 0, 0, 0, 67, 0,
80, 0, 62, 67, 69, 69, 76, 76, 70, 71,
77, 70, 73, 73, 73, 0, 73, 80, 73, 73,
73, 0, 0, 76, 76, 84, 75, 0, 0, 0,
0, 78, 75, 85, 78, 79, 79, 0, 73, 74,
74, 74, 84, 74, 75, 74, 74, 74, 78, 75,
85, 78, 79, 79, 82, 82, 83, 86, 87, 83,
86, 89, 87, 88, 90, 74, 0, 88, 0, 0,
0, 82, 82, 83, 86, 87, 83, 86, 89, 87,
88, 90, 0, 0, 88, 92, 92, 92, 92, 92,
93, 93, 0, 93, 93, 94, 94, 94, 94, 94,
95, 95, 0, 95, 95, 96, 96, 0, 96, 96,
97, 0, 97, 97, 97, 98, 98, 98, 98, 98,
99, 99, 0, 99, 99, 101, 101, 0, 101, 101,
102, 102, 91, 91, 91, 91, 91, 91, 91, 91,
91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
91, 91, 91, 91, 91, 91, 91
} ;
/* The intent behind this definition is that it'll catch
@ -537,7 +581,7 @@ static yyconst flex_int16_t yy_chk[301] =
#include <string.h>
#define YY_NO_UNISTD_H 1
#line 541 "sapi/phpdbg/phpdbg_lexer.c"
#line 585 "sapi/phpdbg/phpdbg_lexer.c"
#define INITIAL 0
#define RAW 1
@ -775,9 +819,9 @@ YY_DECL
register int yy_act;
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
#line 44 "sapi/phpdbg/dev/phpdbg_lexer.l"
#line 45 "sapi/phpdbg/dev/phpdbg_lexer.l"
#line 781 "sapi/phpdbg/phpdbg_lexer.c"
#line 825 "sapi/phpdbg/phpdbg_lexer.c"
yylval = yylval_param;
@ -832,13 +876,13 @@ yy_match:
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 83 )
if ( yy_current_state >= 92 )
yy_c = yy_meta[(unsigned int) yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
++yy_cp;
}
while ( yy_current_state != 82 );
while ( yy_current_state != 91 );
yy_cp = yyg->yy_last_accepting_cpos;
yy_current_state = yyg->yy_last_accepting_state;
@ -860,56 +904,61 @@ do_action: /* This label is used only to access EOF actions. */
case 1:
YY_RULE_SETUP
#line 47 "sapi/phpdbg/dev/phpdbg_lexer.l"
#line 48 "sapi/phpdbg/dev/phpdbg_lexer.l"
{
BEGIN(RAW);
phpdbg_init_param(yylval, EMPTY_PARAM);
return C_EVAL;
}
YY_BREAK
case 2:
YY_RULE_SETUP
#line 53 "sapi/phpdbg/dev/phpdbg_lexer.l"
{
BEGIN(RAW);
phpdbg_init_param(yylval, EMPTY_PARAM);
return C_SHELL;
}
YY_BREAK
case 3:
YY_RULE_SETUP
#line 58 "sapi/phpdbg/dev/phpdbg_lexer.l"
{
BEGIN(RAW);
phpdbg_init_param(yylval, EMPTY_PARAM);
return C_IF;
}
YY_BREAK
case 4:
YY_RULE_SETUP
#line 63 "sapi/phpdbg/dev/phpdbg_lexer.l"
{
phpdbg_init_param(yylval, NUMERIC_PARAM);
yylval->num = 1;
return C_TRUTHY;
}
YY_BREAK
case 2:
case 5:
YY_RULE_SETUP
#line 52 "sapi/phpdbg/dev/phpdbg_lexer.l"
#line 68 "sapi/phpdbg/dev/phpdbg_lexer.l"
{
phpdbg_init_param(yylval, NUMERIC_PARAM);
yylval->num = 0;
return C_FALSY;
}
YY_BREAK
case 3:
case 6:
YY_RULE_SETUP
#line 57 "sapi/phpdbg/dev/phpdbg_lexer.l"
{
BEGIN(RAW);
phpdbg_init_param(yylval, STR_PARAM);
yylval->str = strndup(yytext, yyleng);
yylval->len = yyleng;
return C_EVAL;
}
YY_BREAK
case 4:
YY_RULE_SETUP
#line 64 "sapi/phpdbg/dev/phpdbg_lexer.l"
{
BEGIN(RAW);
phpdbg_init_param(yylval, STR_PARAM);
yylval->str = strndup(yytext, yyleng);
yylval->len = yyleng;
return C_SHELL;
}
YY_BREAK
case 5:
YY_RULE_SETUP
#line 71 "sapi/phpdbg/dev/phpdbg_lexer.l"
#line 73 "sapi/phpdbg/dev/phpdbg_lexer.l"
{
phpdbg_init_param(yylval, NUMERIC_PARAM);
yylval->num = atoi(yytext);
return T_DIGITS;
}
YY_BREAK
case 6:
case 7:
YY_RULE_SETUP
#line 76 "sapi/phpdbg/dev/phpdbg_lexer.l"
#line 78 "sapi/phpdbg/dev/phpdbg_lexer.l"
{
phpdbg_init_param(yylval, METHOD_PARAM);
yylval->method.class = "class";
@ -917,10 +966,10 @@ YY_RULE_SETUP
return T_METHOD;
}
YY_BREAK
case 7:
/* rule 7 can match eol */
case 8:
/* rule 8 can match eol */
YY_RULE_SETUP
#line 82 "sapi/phpdbg/dev/phpdbg_lexer.l"
#line 84 "sapi/phpdbg/dev/phpdbg_lexer.l"
{
phpdbg_init_param(yylval, FILE_PARAM);
yylval->file.name = strndup(yytext, yyleng);
@ -928,19 +977,19 @@ YY_RULE_SETUP
return T_FILE;
}
YY_BREAK
case 8:
case 9:
YY_RULE_SETUP
#line 88 "sapi/phpdbg/dev/phpdbg_lexer.l"
#line 90 "sapi/phpdbg/dev/phpdbg_lexer.l"
{
phpdbg_init_param(yylval, ADDR_PARAM);
yylval->addr = strtoul(yytext, NULL, 10);
return T_OPLINE;
}
YY_BREAK
case 9:
/* rule 9 can match eol */
case 10:
/* rule 10 can match eol */
YY_RULE_SETUP
#line 93 "sapi/phpdbg/dev/phpdbg_lexer.l"
#line 95 "sapi/phpdbg/dev/phpdbg_lexer.l"
{
phpdbg_init_param(yylval, STR_PARAM);
yylval->str = strndup(yytext, yyleng);
@ -948,9 +997,9 @@ YY_RULE_SETUP
return T_LITERAL;
}
YY_BREAK
case 10:
case 11:
YY_RULE_SETUP
#line 99 "sapi/phpdbg/dev/phpdbg_lexer.l"
#line 101 "sapi/phpdbg/dev/phpdbg_lexer.l"
{
phpdbg_init_param(yylval, STR_PARAM);
yylval->str = strndup(yytext, yyleng);
@ -959,9 +1008,9 @@ YY_RULE_SETUP
}
YY_BREAK
case 11:
case 12:
YY_RULE_SETUP
#line 106 "sapi/phpdbg/dev/phpdbg_lexer.l"
#line 108 "sapi/phpdbg/dev/phpdbg_lexer.l"
{
phpdbg_init_param(yylval, STR_PARAM);
yylval->str = strndup(yytext, yyleng);
@ -970,26 +1019,26 @@ YY_RULE_SETUP
return T_INPUT;
}
YY_BREAK
case 12:
/* rule 12 can match eol */
case 13:
/* rule 13 can match eol */
YY_RULE_SETUP
#line 113 "sapi/phpdbg/dev/phpdbg_lexer.l"
#line 115 "sapi/phpdbg/dev/phpdbg_lexer.l"
{ /* ignore whitespace */ }
YY_BREAK
case 13:
case 14:
YY_RULE_SETUP
#line 114 "sapi/phpdbg/dev/phpdbg_lexer.l"
#line 116 "sapi/phpdbg/dev/phpdbg_lexer.l"
{
phpdbg_init_param(yylval, EMPTY_PARAM);
return T_UNEXPECTED;
}
YY_BREAK
case 14:
case 15:
YY_RULE_SETUP
#line 118 "sapi/phpdbg/dev/phpdbg_lexer.l"
#line 120 "sapi/phpdbg/dev/phpdbg_lexer.l"
YY_FATAL_ERROR( "flex scanner jammed" );
YY_BREAK
#line 993 "sapi/phpdbg/phpdbg_lexer.c"
#line 1042 "sapi/phpdbg/phpdbg_lexer.c"
case YY_STATE_EOF(INITIAL):
case YY_STATE_EOF(RAW):
yyterminate();
@ -1285,7 +1334,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 83 )
if ( yy_current_state >= 92 )
yy_c = yy_meta[(unsigned int) yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
@ -1314,11 +1363,11 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 83 )
if ( yy_current_state >= 92 )
yy_c = yy_meta[(unsigned int) yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
yy_is_jam = (yy_current_state == 82);
yy_is_jam = (yy_current_state == 91);
return yy_is_jam ? 0 : yy_current_state;
}
@ -2154,7 +2203,7 @@ void yyfree (void * ptr , yyscan_t yyscanner)
#define YYTABLES_NAME "yytables"
#line 118 "sapi/phpdbg/dev/phpdbg_lexer.l"
#line 120 "sapi/phpdbg/dev/phpdbg_lexer.l"

View file

@ -338,7 +338,7 @@ extern int yylex \
#undef YY_DECL
#endif
#line 118 "sapi/phpdbg/dev/phpdbg_lexer.l"
#line 120 "sapi/phpdbg/dev/phpdbg_lexer.l"
#line 345 "sapi/phpdbg/phpdbg_lexer.h"

View file

@ -113,6 +113,10 @@ void phpdbg_debug_param(const phpdbg_param_t *param, const char *msg) {
case NUMERIC_PARAM:
fprintf(stderr, "%s NUMERIC_PARAM(%ld)\n", msg, param->num);
break;
case COND_PARAM:
fprintf(stderr, "%s COND_PARAM(%s=%d)\n", msg, param->str, param->len);
break;
}
}
}
@ -187,16 +191,28 @@ int phpdbg_stack_execute(phpdbg_param_t *stack, char **why) {
}
command = params = (phpdbg_param_t*) stack->next;
if (command->type != STR_PARAM) {
asprintf(
why, "the first parameter is expected to be a string !!");
return FAILURE;
switch (command->type) {
case EVAL_PARAM:
phpdbg_notice("eval (%s)", command->str);
break;
case SHELL_PARAM:
phpdbg_notice("shell (%s)", command->str);
break;
case STR_PARAM: {
/* do resolve command(s) */
} break;
default:
asprintf(
why, "the first parameter makes no sense !!");
return FAILURE;
}
/* do resolve command(s) */
/* do prepare params for function */
while (params) {
phpdbg_debug_param(params, "-> ...");
params = params->next;
@ -209,7 +225,7 @@ int phpdbg_stack_execute(phpdbg_param_t *stack, char **why) {
/* Line 268 of yacc.c */
#line 213 "sapi/phpdbg/phpdbg_parser.c"
#line 229 "sapi/phpdbg/phpdbg_parser.c"
/* Enabling traces. */
#ifndef YYDEBUG
@ -232,7 +248,7 @@ int phpdbg_stack_execute(phpdbg_param_t *stack, char **why) {
/* "%code requires" blocks. */
/* Line 288 of yacc.c */
#line 143 "sapi/phpdbg/dev/phpdbg_parser.y"
#line 159 "sapi/phpdbg/dev/phpdbg_parser.y"
#include "phpdbg.h"
#ifndef YY_TYPEDEF_YY_SCANNER_T
@ -243,7 +259,7 @@ typedef void* yyscan_t;
/* Line 288 of yacc.c */
#line 247 "sapi/phpdbg/phpdbg_parser.c"
#line 263 "sapi/phpdbg/phpdbg_parser.c"
/* Tokens. */
#ifndef YYTOKENTYPE
@ -256,14 +272,15 @@ typedef void* yyscan_t;
C_STRING = 260,
C_EVAL = 261,
C_SHELL = 262,
T_DIGITS = 263,
T_LITERAL = 264,
T_METHOD = 265,
T_OPLINE = 266,
T_FILE = 267,
T_ID = 268,
T_INPUT = 269,
T_UNEXPECTED = 270
C_IF = 263,
T_DIGITS = 264,
T_LITERAL = 265,
T_METHOD = 266,
T_OPLINE = 267,
T_FILE = 268,
T_ID = 269,
T_INPUT = 270,
T_UNEXPECTED = 271
};
#endif
@ -281,7 +298,7 @@ typedef int YYSTYPE;
/* Line 343 of yacc.c */
#line 285 "sapi/phpdbg/phpdbg_parser.c"
#line 302 "sapi/phpdbg/phpdbg_parser.c"
#ifdef short
# undef short
@ -500,20 +517,20 @@ union yyalloc
/* YYFINAL -- State number of the termination state. */
#define YYFINAL 11
/* YYLAST -- Last index in YYTABLE. */
#define YYLAST 18
#define YYLAST 20
/* YYNTOKENS -- Number of terminals. */
#define YYNTOKENS 16
#define YYNTOKENS 17
/* YYNNTS -- Number of nonterminals. */
#define YYNNTS 9
/* YYNRULES -- Number of rules. */
#define YYNRULES 21
#define YYNRULES 22
/* YYNRULES -- Number of states. */
#define YYNSTATES 25
#define YYNSTATES 27
/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
#define YYUNDEFTOK 2
#define YYMAXUTOK 270
#define YYMAXUTOK 271
#define YYTRANSLATE(YYX) \
((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
@ -548,7 +565,7 @@ static const yytype_uint8 yytranslate[] =
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
15
15, 16
};
#if YYDEBUG
@ -558,25 +575,25 @@ static const yytype_uint8 yyprhs[] =
{
0, 0, 3, 5, 7, 10, 11, 13, 15, 18,
21, 24, 26, 28, 30, 32, 34, 36, 38, 40,
42, 44
42, 44, 47
};
/* YYRHS -- A `-1'-separated list of the rules' RHS. */
static const yytype_int8 yyrhs[] =
{
17, 0, -1, 24, -1, 23, -1, 18, 23, -1,
-1, 18, -1, 13, -1, 20, 13, -1, 6, 14,
-1, 7, 14, -1, 20, -1, 21, -1, 8, -1,
12, -1, 10, -1, 11, -1, 13, -1, 9, -1,
3, -1, 4, -1, 22, 19, -1
18, 0, -1, 25, -1, 24, -1, 19, 24, -1,
-1, 19, -1, 14, -1, 21, 14, -1, 6, 15,
-1, 7, 15, -1, 21, -1, 22, -1, 9, -1,
13, -1, 11, -1, 12, -1, 14, -1, 10, -1,
3, -1, 4, -1, 8, 15, -1, 23, 20, -1
};
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
static const yytype_uint8 yyrline[] =
{
0, 176, 176, 180, 181, 184, 186, 190, 191, 195,
196, 200, 201, 205, 206, 207, 208, 209, 210, 211,
212, 216
0, 193, 193, 197, 198, 201, 203, 207, 208, 212,
213, 217, 218, 222, 223, 224, 225, 226, 227, 228,
229, 230, 234
};
#endif
@ -588,8 +605,9 @@ static const char *const yytname[] =
"$end", "error", "$undefined", "\"truthy (true, on, yes or enabled)\"",
"\"falsy (false, off, no or disabled)\"",
"\"string (some input, perhaps)\"", "\"eval\"", "\"shell\"",
"\"digits (numbers)\"", "\"literal (string)\"", "\"method\"",
"\"opline\"", "\"file\"", "\"identifier (command or function name)\"",
"\"if (condition)\"", "\"digits (numbers)\"", "\"literal (string)\"",
"\"method\"", "\"opline\"", "\"file\"",
"\"identifier (command or function name)\"",
"\"input (input string or data)\"", "\"input\"", "$accept", "input",
"parameters", "params", "normal", "special", "command", "parameter",
"handler", 0
@ -602,16 +620,16 @@ static const char *const yytname[] =
static const yytype_uint16 yytoknum[] =
{
0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
265, 266, 267, 268, 269, 270
265, 266, 267, 268, 269, 270, 271
};
# endif
/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
static const yytype_uint8 yyr1[] =
{
0, 16, 17, 18, 18, 19, 19, 20, 20, 21,
21, 22, 22, 23, 23, 23, 23, 23, 23, 23,
23, 24
0, 17, 18, 19, 19, 20, 20, 21, 21, 22,
22, 23, 23, 24, 24, 24, 24, 24, 24, 24,
24, 24, 25
};
/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
@ -619,7 +637,7 @@ static const yytype_uint8 yyr2[] =
{
0, 2, 1, 1, 2, 0, 1, 1, 2, 2,
2, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 2
1, 2, 2
};
/* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM.
@ -628,30 +646,30 @@ static const yytype_uint8 yyr2[] =
static const yytype_uint8 yydefact[] =
{
0, 0, 0, 7, 0, 11, 12, 5, 2, 9,
10, 1, 8, 19, 20, 13, 18, 15, 16, 14,
17, 6, 21, 3, 4
10, 1, 8, 19, 20, 0, 13, 18, 15, 16,
14, 17, 6, 22, 3, 21, 4
};
/* YYDEFGOTO[NTERM-NUM]. */
static const yytype_int8 yydefgoto[] =
{
-1, 4, 21, 22, 5, 6, 7, 23, 8
-1, 4, 22, 23, 5, 6, 7, 24, 8
};
/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
STATE-NUM. */
#define YYPACT_NINF -13
#define YYPACT_NINF -14
static const yytype_int8 yypact[] =
{
5, -12, -11, -13, 4, 0, -13, -3, -13, -13,
-13, -13, -13, -13, -13, -13, -13, -13, -13, -13,
-13, -3, -13, -13, -13
6, -13, -12, -14, 4, 0, -14, -3, -14, -14,
-14, -14, -14, -14, -14, 1, -14, -14, -14, -14,
-14, -14, -3, -14, -14, -14, -14
};
/* YYPGOTO[NTERM-NUM]. */
static const yytype_int8 yypgoto[] =
{
-13, -13, -13, -13, -13, -13, -13, -7, -13
-14, -14, -14, -14, -14, -14, -14, -7, -14
};
/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
@ -661,28 +679,30 @@ static const yytype_int8 yypgoto[] =
static const yytype_uint8 yytable[] =
{
13, 14, 9, 10, 11, 15, 16, 17, 18, 19,
20, 1, 2, 12, 24, 0, 0, 0, 3
20, 21, 1, 2, 12, 26, 25, 0, 0, 0,
3
};
#define yypact_value_is_default(yystate) \
((yystate) == (-13))
((yystate) == (-14))
#define yytable_value_is_error(yytable_value) \
YYID (0)
static const yytype_int8 yycheck[] =
{
3, 4, 14, 14, 0, 8, 9, 10, 11, 12,
13, 6, 7, 13, 21, -1, -1, -1, 13
3, 4, 15, 15, 0, 8, 9, 10, 11, 12,
13, 14, 6, 7, 14, 22, 15, -1, -1, -1,
14
};
/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
symbol of state STATE-NUM. */
static const yytype_uint8 yystos[] =
{
0, 6, 7, 13, 17, 20, 21, 22, 24, 14,
14, 0, 13, 3, 4, 8, 9, 10, 11, 12,
13, 18, 19, 23, 23
0, 6, 7, 14, 18, 21, 22, 23, 25, 15,
15, 0, 14, 3, 4, 8, 9, 10, 11, 12,
13, 14, 19, 20, 24, 15, 24
};
#define yyerrok (yyerrstatus = 0)
@ -1531,105 +1551,126 @@ yyreduce:
case 3:
/* Line 1806 of yacc.c */
#line 180 "sapi/phpdbg/dev/phpdbg_parser.y"
#line 197 "sapi/phpdbg/dev/phpdbg_parser.y"
{ phpdbg_stack_push(stack, &(yyvsp[(1) - (1)])); }
break;
case 4:
/* Line 1806 of yacc.c */
#line 181 "sapi/phpdbg/dev/phpdbg_parser.y"
#line 198 "sapi/phpdbg/dev/phpdbg_parser.y"
{ phpdbg_stack_push(stack, &(yyvsp[(2) - (2)])); }
break;
case 7:
/* Line 1806 of yacc.c */
#line 190 "sapi/phpdbg/dev/phpdbg_parser.y"
{ phpdbg_stack_push(stack, &(yyvsp[(1) - (1)])); }
#line 207 "sapi/phpdbg/dev/phpdbg_parser.y"
{ (yyval) = (yyvsp[(1) - (1)]); }
break;
case 8:
/* Line 1806 of yacc.c */
#line 191 "sapi/phpdbg/dev/phpdbg_parser.y"
{ phpdbg_stack_push(stack, &(yyvsp[(2) - (2)])); }
#line 208 "sapi/phpdbg/dev/phpdbg_parser.y"
{ (yyval) = (yyvsp[(2) - (2)]); }
break;
case 9:
/* Line 1806 of yacc.c */
#line 195 "sapi/phpdbg/dev/phpdbg_parser.y"
{ phpdbg_stack_push(stack, &(yyvsp[(1) - (2)])); phpdbg_stack_push(stack, &(yyvsp[(2) - (2)])); }
#line 212 "sapi/phpdbg/dev/phpdbg_parser.y"
{ (yyval) = (yyvsp[(2) - (2)]); (yyval).type = EVAL_PARAM; }
break;
case 10:
/* Line 1806 of yacc.c */
#line 196 "sapi/phpdbg/dev/phpdbg_parser.y"
{ phpdbg_stack_push(stack, &(yyvsp[(1) - (2)])); phpdbg_stack_push(stack, &(yyvsp[(2) - (2)])); }
#line 213 "sapi/phpdbg/dev/phpdbg_parser.y"
{ (yyval) = (yyvsp[(2) - (2)]); (yyval).type = SHELL_PARAM;; }
break;
case 11:
/* Line 1806 of yacc.c */
#line 217 "sapi/phpdbg/dev/phpdbg_parser.y"
{ phpdbg_stack_push(stack, &(yyvsp[(1) - (1)])); }
break;
case 12:
/* Line 1806 of yacc.c */
#line 218 "sapi/phpdbg/dev/phpdbg_parser.y"
{ phpdbg_stack_push(stack, &(yyvsp[(1) - (1)])); }
break;
case 13:
/* Line 1806 of yacc.c */
#line 205 "sapi/phpdbg/dev/phpdbg_parser.y"
#line 222 "sapi/phpdbg/dev/phpdbg_parser.y"
{ (yyval) = (yyvsp[(1) - (1)]); }
break;
case 14:
/* Line 1806 of yacc.c */
#line 206 "sapi/phpdbg/dev/phpdbg_parser.y"
#line 223 "sapi/phpdbg/dev/phpdbg_parser.y"
{ (yyval) = (yyvsp[(1) - (1)]); }
break;
case 15:
/* Line 1806 of yacc.c */
#line 207 "sapi/phpdbg/dev/phpdbg_parser.y"
#line 224 "sapi/phpdbg/dev/phpdbg_parser.y"
{ (yyval) = (yyvsp[(1) - (1)]); }
break;
case 16:
/* Line 1806 of yacc.c */
#line 208 "sapi/phpdbg/dev/phpdbg_parser.y"
#line 225 "sapi/phpdbg/dev/phpdbg_parser.y"
{ (yyval) = (yyvsp[(1) - (1)]); }
break;
case 17:
/* Line 1806 of yacc.c */
#line 209 "sapi/phpdbg/dev/phpdbg_parser.y"
#line 226 "sapi/phpdbg/dev/phpdbg_parser.y"
{ (yyval) = (yyvsp[(1) - (1)]); }
break;
case 18:
/* Line 1806 of yacc.c */
#line 210 "sapi/phpdbg/dev/phpdbg_parser.y"
#line 227 "sapi/phpdbg/dev/phpdbg_parser.y"
{ (yyval) = (yyvsp[(1) - (1)]); }
break;
case 19:
/* Line 1806 of yacc.c */
#line 211 "sapi/phpdbg/dev/phpdbg_parser.y"
#line 228 "sapi/phpdbg/dev/phpdbg_parser.y"
{ (yyval) = (yyvsp[(1) - (1)]); }
break;
case 20:
/* Line 1806 of yacc.c */
#line 212 "sapi/phpdbg/dev/phpdbg_parser.y"
#line 229 "sapi/phpdbg/dev/phpdbg_parser.y"
{ (yyval) = (yyvsp[(1) - (1)]); }
break;
case 21:
/* Line 1806 of yacc.c */
#line 230 "sapi/phpdbg/dev/phpdbg_parser.y"
{ (yyval) = (yyvsp[(2) - (2)]); (yyval).type = COND_PARAM; }
break;
/* Line 1806 of yacc.c */
#line 1633 "sapi/phpdbg/phpdbg_parser.c"
#line 1674 "sapi/phpdbg/phpdbg_parser.c"
default: break;
}
/* User semantic actions sometimes alter yychar, and that requires
@ -1860,6 +1901,6 @@ yyreturn:
/* Line 2067 of yacc.c */
#line 218 "sapi/phpdbg/dev/phpdbg_parser.y"
#line 236 "sapi/phpdbg/dev/phpdbg_parser.y"

View file

@ -33,7 +33,7 @@
/* "%code requires" blocks. */
/* Line 2068 of yacc.c */
#line 143 "sapi/phpdbg/dev/phpdbg_parser.y"
#line 159 "sapi/phpdbg/dev/phpdbg_parser.y"
#include "phpdbg.h"
#ifndef YY_TYPEDEF_YY_SCANNER_T
@ -57,14 +57,15 @@ typedef void* yyscan_t;
C_STRING = 260,
C_EVAL = 261,
C_SHELL = 262,
T_DIGITS = 263,
T_LITERAL = 264,
T_METHOD = 265,
T_OPLINE = 266,
T_FILE = 267,
T_ID = 268,
T_INPUT = 269,
T_UNEXPECTED = 270
C_IF = 263,
T_DIGITS = 264,
T_LITERAL = 265,
T_METHOD = 266,
T_OPLINE = 267,
T_FILE = 268,
T_ID = 269,
T_INPUT = 270,
T_UNEXPECTED = 271
};
#endif