Browse Source

barf on unexpected input

pull/661/head
krakjoe 13 years ago
parent
commit
cdf1dcc497
  1. 6
      phpdbg_lexer.l
  2. 1
      phpdbg_parser.y

6
phpdbg_lexer.l

@ -41,7 +41,6 @@ LITERAL \"(\\.|[^\\"])*\"
WS [ \r\n\t]+
INPUT [^\n]+
%%
{WS} { }
<INITIAL>
{
{C_YES}|{C_ON}|{C_ENABLED}|{C_TRUE} {
@ -104,7 +103,6 @@ INPUT [^\n]+
BEGIN(INITIAL);
return T_INPUT;
}
. {
/** command detection here **/
}
{WS} { /* ignore whitespace */ }
. { return T_UNEXPECTED; }
%%

1
phpdbg_parser.y

@ -104,6 +104,7 @@ typedef void* yyscan_t;
%token T_FILE "file (T_FILE)"
%token T_ID "identifier (T_ID)"
%token T_INPUT "input (input string or data)"
%token T_UNEXPECTED "unexpected input (input string or data)"
%%
input

Loading…
Cancel
Save