%%
-line : /* empty */
- | line statement {
+line : line_terminator {
+ /* empty */
+ }
+ | line statement line_terminator {
struct statement *s = $2;
if (section != SECTION_TEXT)
yyerror("Microcode text instruction in non .text section");
memcpy(&s->info, &cur_lineinfo, sizeof(struct lineinfo));
list_add_tail(&s->list, &infile.sl);
}
- | line section_switch {
+ | line section_switch line_terminator {
}
- | line ivals_write {
+ | line ivals_write line_terminator {
struct initval_op *io = $2;
if (section != SECTION_IVALS)
yyerror("InitVals write in non .initvals section");
}
;
+/* Allow terminating lines with the "|" char */
+line_terminator : /* Nothing */
+ | BITW_OR line_terminator
+
section_switch : SECTION_TEXT {
section = SECTION_TEXT;
}
}
;
-external_jump_operands : hexnum COMMA operand COMMA operand COMMA labelref {
+external_jump_operands : imm COMMA operand COMMA operand COMMA labelref {
struct operlist *ol = xmalloc(sizeof(struct operlist));
struct operand *cond = xmalloc(sizeof(struct operand));
- cond->type = OPER_RAW;
- cond->u.raw = (unsigned long)$1;
+ cond->type = OPER_IMM;
+ cond->u.imm = $1;
ol->oper[0] = cond;
ol->oper[1] = $3;
ol->oper[2] = $5;