t = yylex();
if (t != T_TIMES)
- fail("Expected a times keyword after db directive");
-
+ fail("Expected a times keyword or a string after db directive");
+
t = yylex();
if (t != NUMBER)
current_offset += atoi(yytext);
break;
+ case STRING:
+ current_offset += strlen(yytext);
+ break;
+
default:
current_offset++;
for(i = 1; i <= max_iter; i++)
writeint(val, outfp);
+
break;
+
+ case STRING:
+ /* output the string in raw form to the file */
+ for(i = 0; i < strlen(yytext); i++)
+ writeint(yytext[i], outfp);
+ break;
default:
fail("unexpected %s in input at line %d", yytext, yylineno);
break;
[0-9]+ { return NUMBER; }
[a-zA-Z][a-zA-Z0-9]*: { return T_LABEL; }
[a-zA-Z][a-zA-Z0-9]* { return WORD; }
+\".+\" { return STRING; }
<<EOF>> { return -1; }