diff options
Diffstat (limited to 'src/config.l')
-rw-r--r-- | src/config.l | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/config.l b/src/config.l index 295352f..c9f25d8 100644 --- a/src/config.l +++ b/src/config.l @@ -55,7 +55,21 @@ %} <INITIAL>{ -[0-9]+ { UPDATE_LOCATION; yylval->num = atoi(yytext); BEGIN(NEEDSPACE); return TOK_INTEGER; } +[0-9]+ { + char *endptr; + + UPDATE_LOCATION; + + yylval->uint64 = strtoull(yytext, &endptr, 10); + if (*endptr) { + yylval->error = "invalid integer constant"; + return -1; + } + + + BEGIN(NEEDSPACE); + return TOK_UINT; +} interface { TOKEN(TOK_INTERFACE); } bind { TOKEN(TOK_BIND); } |