X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=assembler%2Fparser.y;h=4bdb9ec6dc8516b2335961057a3a61decdd1760d;hb=e882e360ba16d2eed103adffdd1809076ee98017;hp=c589195369c2ce536afecff77a8a460031238326;hpb=3f723ef8180329e5ca5f750e12a278191053af66;p=b43-tools.git diff --git a/assembler/parser.y b/assembler/parser.y index c589195..4bdb9ec 100644 --- a/assembler/parser.y +++ b/assembler/parser.y @@ -38,7 +38,7 @@ extern struct initvals_sect *cur_initvals_sect; %token SECTION_TEXT SECTION_IVALS -%token ASM_ARCH ASM_START SPR GPR OFFR LR COMMA BRACK_OPEN BRACK_CLOSE PAREN_OPEN PAREN_CLOSE HEXNUM DECNUM ARCH_NEWWORLD ARCH_OLDWORLD LABEL IDENT LABELREF +%token ASM_ARCH ASM_START SPR GPR OFFR LR COMMA SEMICOLON BRACK_OPEN BRACK_CLOSE PAREN_OPEN PAREN_CLOSE HEXNUM DECNUM ARCH_NEWWORLD ARCH_OLDWORLD LABEL IDENT LABELREF %token PLUS MINUS MULTIPLY DIVIDE BITW_OR BITW_AND BITW_XOR BITW_NOT LEFTSHIFT RIGHTSHIFT @@ -72,9 +72,9 @@ line : line_terminator { } ; -/* Allow terminating lines with the "|" char */ +/* Allow terminating lines with the ";" char */ line_terminator : /* Nothing */ - | BITW_OR line_terminator + | SEMICOLON line_terminator ; section_switch : SECTION_TEXT { @@ -1004,15 +1004,13 @@ extended_operlist : decnum COMMA decnum COMMA operand COMMA operand COMMA operan } ; -external_jump_operands : imm COMMA operand COMMA operand COMMA labelref { +external_jump_operands : imm COMMA labelref { struct operlist *ol = xmalloc(sizeof(struct operlist)); struct operand *cond = xmalloc(sizeof(struct operand)); cond->type = OPER_IMM; cond->u.imm = $1; ol->oper[0] = cond; ol->oper[1] = $3; - ol->oper[2] = $5; - ol->oper[3] = $7; $$ = ol; } ;