From 81182037667220d3e274e655141663121856b592 Mon Sep 17 00:00:00 2001 From: steve Date: Tue, 20 Mar 2001 02:45:25 +0000 Subject: [PATCH] Lexical numbers may be signed. --- vvp/lexor.lex | 4 ++-- vvp/parse.y | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/vvp/lexor.lex b/vvp/lexor.lex index 435307601..310fefc45 100644 --- a/vvp/lexor.lex +++ b/vvp/lexor.lex @@ -40,11 +40,11 @@ return T_INSTR; } [0-9][0-9]* { - yylval.numb = strtoul(yytext, 0, 0); + yylval.numb = strtol(yytext, 0, 0); return T_NUMBER; } "0x"[0-9a-fA-F]+ { - yylval.numb = strtoul(yytext, 0, 0); + yylval.numb = strtol(yytext, 0, 0); return T_NUMBER; } diff --git a/vvp/parse.y b/vvp/parse.y index ea507e415..6e07a926b 100644 --- a/vvp/parse.y +++ b/vvp/parse.y @@ -15,7 +15,7 @@ extern FILE*yyin; %union { char*text; - unsigned long numb; + long numb; struct textv_s textv; comp_operands_t opa;