Skip to content
Snippets Groups Projects
Commit a49df526 authored by Neal Cardwell's avatar Neal Cardwell
Browse files

net-test: packetdrill: fix lexical scanning of hex integers

Properly recognize hex integers.

Change-Id: I23b002e06ec21a445e66e82d47e72a65071b9a01
parent 281d8ab8
No related branches found
No related tags found
No related merge requests found
...@@ -199,7 +199,7 @@ ce return CE; ...@@ -199,7 +199,7 @@ ce return CE;
--[a-zA-Z0-9_]+ yylval.string = option(yytext); return OPTION; --[a-zA-Z0-9_]+ yylval.string = option(yytext); return OPTION;
[-]?[0-9]*[.][0-9]+ yylval.floating = atof(yytext); return FLOAT; [-]?[0-9]*[.][0-9]+ yylval.floating = atof(yytext); return FLOAT;
[-]?[0-9]+ yylval.integer = atoll(yytext); return INTEGER; [-]?[0-9]+ yylval.integer = atoll(yytext); return INTEGER;
0x[0-9]+ yylval.integer = hextol(yytext); return HEX_INTEGER; 0x[0-9a-fA-F]+ yylval.integer = hextol(yytext); return HEX_INTEGER;
[a-zA-Z0-9_]+ yylval.string = strdup(yytext); return WORD; [a-zA-Z0-9_]+ yylval.string = strdup(yytext); return WORD;
\"(\\.|[^"])*\" yylval.string = quoted(yytext); return STRING; \"(\\.|[^"])*\" yylval.string = quoted(yytext); return STRING;
\`(\\.|[^`])*\` yylval.string = quoted(yytext); return BACK_QUOTED; \`(\\.|[^`])*\` yylval.string = quoted(yytext); return BACK_QUOTED;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment