X-Git-Url: https://jxself.org/git/?p=b43-tools.git;a=blobdiff_plain;f=assembler%2Fparser.y;h=f00b2da4dec31266d2e64b6e6599514525ace4e8;hp=e55c2b7734617c88d26d2c6e92bc44972d42f1f1;hb=be06ecf2322ad87005e2d3f18eb6dbb08da7e92c;hpb=05e57ce6fbe1ebf597ab5a7e4d10e6f275f47e44 diff --git a/assembler/parser.y b/assembler/parser.y index e55c2b7..f00b2da 100644 --- a/assembler/parser.y +++ b/assembler/parser.y @@ -50,17 +50,19 @@ extern struct initvals_sect *cur_initvals_sect; %% -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"); @@ -70,6 +72,10 @@ line : /* empty */ } ; +/* Allow terminating lines with the "|" char */ +line_terminator : /* Nothing */ + | BITW_OR line_terminator + section_switch : SECTION_TEXT { section = SECTION_TEXT; }