The unified diff between revisions [76aea49e..] and [81f2a8bb..] is displayed below. It can also be downloaded as a raw diff.

This diff has been restricted to the following files: 'src/lsc/lexer.l'

#
# old_revision [76aea49e8393c839b573eaac31eb8e2fb218d2d6]
# new_revision [81f2a8bbe94638a22f5651ee07112ceabd50285c]
#
# patch "src/lsc/lexer.l"
#  from [c84e522ab7268008c572c8d1670438471d7287e1]
#    to [abb8ad18ba69e18853d003ba9da3ab968f58d165]
#
============================================================
--- src/lsc/lexer.l	c84e522ab7268008c572c8d1670438471d7287e1
+++ src/lsc/lexer.l	abb8ad18ba69e18853d003ba9da3ab968f58d165
@@ -86,6 +86,7 @@ fndefint	return TOKFNDEFINT;
 
 function	return TOKFUNCTION;
 fndefint	return TOKFNDEFINT;
+fndefint_v	return TOKFNDEFINT_V;
 fndefext	return TOKFNDEFEXT;
 constant	return TOKCONSTANT;
 while		return TOKWHILE;
@@ -105,8 +106,10 @@ return		return TOKRETURN;
 
 [0-9]+          yylval.Tinteger = atoi(yytext); return NUMBER;
 -[0-9]+         yylval.Tinteger = atoi(yytext); return NUMBER;
-0x[0-9]+        yylval.Tinteger = strtol(yytext+2, (char **)NULL, 16); return NUMBER;
--0x[0-9]+       yylval.Tinteger = strtol(yytext+2, (char **)NULL, 16); return NUMBER;
+		/* Cater for the possibility that things might be signed or
+		   unsigned. This is horrible and ugly, but might just work. */
+0x[0-9a-fA-F]+        yylval.Tinteger = strtoul(yytext+2, (char **)NULL, 16); return NUMBER;
+-0x[0-9a-fA-F]+       yylval.Tinteger = strtol(yytext+2, (char **)NULL, 16); return NUMBER;
 [0-9]+\.[0-9]+	yylval.Treal = atof(yytext); return REAL;
 -[0-9]+\.[0-9]+	yylval.Treal = atof(yytext); return REAL;
 [_a-zA-Z0-9]+	yylval.Tstring = strdup(yytext); return IDENTIFIER;