%x CHANNEL
%x REG
%x DOTSEL
+%x LABEL
%%
/* eat up single line comment */
/* Eat up JIP and UIP token, their values will be parsed
* in numeric section
*/
-"JIP: " { }
-"UIP: " { }
+"JIP: " { BEGIN(LABEL); }
+"UIP: " { BEGIN(LABEL); }
"Jump: " { }
"Pop: " { }
[ \t]+ { }
return LONG;
}
+ /* jump label target */
+[a-zA-Z_][0-9a-zA-Z_]*":" {
+ yylval.string = ralloc_strdup(p->mem_ctx, yytext);
+ /* Stomp the trailing ':' */
+ yylval.string[yyleng - 1] = '\0';
+ return JUMP_LABEL_TARGET;
+}
+
+ /* jump label */
+<LABEL>[a-zA-Z_][0-9a-zA-Z_]* {
+ yylval.string = ralloc_strdup(p->mem_ctx, yytext);
+ BEGIN(INITIAL);
+ return JUMP_LABEL;
+}
+
\n { yycolumn = 1; }
. {