summaryrefslogtreecommitdiff
path: root/sapi/phpdbg/phpdbg_lexer.l
diff options
context:
space:
mode:
Diffstat (limited to 'sapi/phpdbg/phpdbg_lexer.l')
-rw-r--r--sapi/phpdbg/phpdbg_lexer.l24
1 files changed, 13 insertions, 11 deletions
diff --git a/sapi/phpdbg/phpdbg_lexer.l b/sapi/phpdbg/phpdbg_lexer.l
index 7fca70f57a..35ca744400 100644
--- a/sapi/phpdbg/phpdbg_lexer.l
+++ b/sapi/phpdbg/phpdbg_lexer.l
@@ -60,6 +60,7 @@ T_RUN_SHORT "r"
WS [ \r\n\t]+
DIGITS [-]?[0-9\.]+
ID [^ \r\n\t:#\000]+
+GENERIC_ID ([^ \r\n\t:#\000]|":\\")+
ADDR [0][x][a-fA-F0-9]+
OPCODE (ZEND_|zend_)([A-Za-z])+
INPUT [^\n\000]+
@@ -70,7 +71,7 @@ INPUT [^\n\000]+
return 0;
}
-<PRE_RAW, NORMAL>[-][r]{WS}?{DIGITS} {
+<PRE_RAW, NORMAL>"-r"{WS}?{DIGITS} {
char *text = yytext + 2;
while (*++text < '0');
yylval->num = atoi(text);
@@ -83,22 +84,23 @@ INPUT [^\n\000]+
return T_IF;
}
-<NORMAL>{ID}[:]{1}[//]{2} {
- phpdbg_init_param(yylval, STR_PARAM);
- yylval->str = zend_strndup(yytext, yyleng);
- yylval->len = yyleng;
- return T_PROTO;
-}
-<NORMAL>[#]{1} {
+<NORMAL>"#" {
return T_POUND;
}
-<NORMAL>[:]{2} {
+<NORMAL>"::" {
return T_DCOLON;
}
-<NORMAL>[:]{1}/[^\\] {
+<NORMAL>":"/[^\\] {
return T_COLON;
}
+<NORMAL>{ID}"://" {
+ phpdbg_init_param(yylval, STR_PARAM);
+ yylval->str = zend_strndup(yytext, yyleng);
+ yylval->len = yyleng;
+ return T_PROTO;
+}
+
<NORMAL>({T_YES}|{T_ON}|{T_ENABLED}|{T_TRUE}){WS} {
phpdbg_init_param(yylval, NUMERIC_PARAM);
yylval->num = 1;
@@ -130,7 +132,7 @@ INPUT [^\n\000]+
return T_OPCODE;
}
-<NORMAL>{ID} {
+<NORMAL>{GENERIC_ID} {
phpdbg_init_param(yylval, STR_PARAM);
yylval->str = zend_strndup(yytext, yyleng);
yylval->len = yyleng;