--- /home/sammy/src/trunk/gcalctool/lr_tokeniser.l	2007-09-12 21:22:28.000000000 +0300
+++ ./lr_tokeniser.l	2007-09-12 22:33:18.000000000 +0300
@@ -41,6 +41,7 @@
 OCT     [0-7]
 NUMBER  [DIGIT}*{DECIMAL}{DIGIT}+|{DIGIT}
 SEPARATOR "e+"|"e-"
+HEXS [0-9]|[A-F]|" "
 
 %%
 
@@ -87,19 +88,19 @@
 "Sto" {return tSTO;}
 "Clr" {return tCLR;}
 
-{DIGIT}+ {
+{HEXS}+ {
   if (strlen(yytext) > 40) parser_state.error = EINVAL;
   MPstr_to_num(yytext, v->base, lrlval.int_t);
   return tINUMBER;
 }
 
-{DIGIT}*{DECIMAL}{DIGIT}+ {
+{HEXS}*{DECIMAL}{HEXS}+ {
   if (strlen(yytext) > 40) parser_state.error = EINVAL;
   MPstr_to_num(yytext, v->base, lrlval.int_t);
   return tDNUMBER;
 }
 
-{DIGIT}+{SEPARATOR}{DIGIT}+ {
+{HEXS}+{SEPARATOR}{HEXS}+ {
   MPstr_to_num(yytext, v->base, lrlval.int_t);
   return tDNUMBER;
 }
