- action push_ref { PUSHTOK(REF, ttov, ref); }
- action push_val { PUSHTOK(NUM, ttov, val); }
+ action push_ref { te = NULL; errno = 0;
+ yylval.ref = strtoll((char*)ts,(char**)&te,16);
+ if (errno | (te != NULL))
+ { fprintf(stderr, "Invalid hex number in file %s\n",(char*)str);
+ if (te != NULL)
+ { while (str++ < te)
+ fputc(' ', stderr);
+ fputc('^', stderr);
+ }
+ exit(1);
+ }
+ lexer_pushtok(REF, yylval); ntok++;
+ }
+ action push_link { lexer_pushtok(LINK,(YYSTYPE)0); ntok++; }
+ action push_val { te = NULL; errno = 0;
+ yylval.val = strtoll((char*)ts,(char**)&te,10);
+ if (errno)
+ { fprintf(stderr, "strtoll could not parse %s\n", (char*)str);
+ exit(1);
+ }
+ lexer_pushtok(NUM, yylval);
+ }