diff options
author | Eelco Dolstra <e.dolstra@tudelft.nl> | 2004-01-30T17·06+0000 |
---|---|---|
committer | Eelco Dolstra <e.dolstra@tudelft.nl> | 2004-01-30T17·06+0000 |
commit | 619f20775dae99ad5cd04ff6e7f7cde693d912f0 (patch) | |
tree | e6d9084d9f7efa2b110ab160cb63cf4f69827f71 /src/libexpr/lexer.l | |
parent | c6257185139bf5f298b19177867f3afa8e5472b7 (diff) |
* Parser numbers again.
* Include missing files in distributions.
Diffstat (limited to 'src/libexpr/lexer.l')
-rw-r--r-- | src/libexpr/lexer.l | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/libexpr/lexer.l b/src/libexpr/lexer.l index 705b31b41a77..3b6e0bb657c2 100644 --- a/src/libexpr/lexer.l +++ b/src/libexpr/lexer.l @@ -58,7 +58,10 @@ rec { return REC; } \-\> { return IMPL; } {ID} { yylval->t = ATmake("<str>", yytext); return ID; /* !!! alloc */ } -{INT} { return INT; } +{INT} { int n = atoi(yytext); /* !!! overflow */ + yylval->t = ATmake("<int>", n); + return INT; + } {STR} { int len = strlen(yytext); yytext[len - 1] = 0; yylval->t = ATmake("<str>", yytext + 1); |