+ return setuint(v);
+ }
+}
+
+static inline int handlehex()
+{
+ char l = (yytext[0]=='-');
+
+ if(yyleng-l>8)
+ syntaxerror("integer overflow");
+ int t;
+ unsigned int v = 0;
+ for(t=l;t<yyleng;t++) {
+ v<<=4;
+ char c = yytext[t];
+ if(c>='0' && c<='9')
+ v|=(c&15);
+ else if(c>='a' && c<='f' ||
+ c>='A' && c<='F')
+ v|=(c&0x0f)+9;
+ }
+ if(l && v>1073741824)
+ syntaxerror("signed integer overflow");
+ if(!l && v>2147483647)
+ syntaxerror("unsigned integer overflow");
+
+ if(l) {
+ return setint(-(int)v);
+ } else {
+ return setuint(v);