%token DIR_TFLOAT DIR_TYPE DIR_QUAD DIR_ULEB128 DIR_VALUE DIR_WEAK DIR_WORD
%token DIR_ZERO
-%type <bc> line lineexp instr
+%type <bc> lineexp instr
%type <str_val> expr_id label_id
%type <ea> memaddr
%%
input: /* empty */
| input line {
- parser_gas->temp_bc =
- yasm_section_bcs_append(parser_gas->cur_section, $2);
- if (parser_gas->temp_bc)
- parser_gas->prev_bc = parser_gas->temp_bc;
if (parser_gas->save_input)
yasm_linemap_add_source(parser_gas->linemap,
- parser_gas->temp_bc,
+ parser_gas->prev_bc,
parser_gas->save_line[parser_gas->save_last ^ 1]);
yasm_linemap_goto_next(parser_gas->linemap);
}
;
-line: '\n' { $$ = (yasm_bytecode *)NULL; }
- | lineexp '\n'
+line: '\n'
+ | linebcs '\n'
| error '\n' {
yasm__error(cur_line,
N_("label or instruction expected at start of line"));
- $$ = (yasm_bytecode *)NULL;
yyerrok;
}
;
+linebcs: linebc
+ | linebc ';' linebcs
+;
+
+linebc: lineexp {
+ parser_gas->temp_bc =
+ yasm_section_bcs_append(parser_gas->cur_section, $1);
+ if (parser_gas->temp_bc)
+ parser_gas->prev_bc = parser_gas->temp_bc;
+ }
+;
+
lineexp: instr
| label_id ':' {
$$ = (yasm_bytecode *)NULL;
">>" { RETURN(RIGHT_OP); }
"<" { RETURN(LEFT_OP); }
">" { RETURN(RIGHT_OP); }
- [-+|^!*&/~$():@=,] { RETURN(s->tok[0]); }
+ [-+|^!*&/~$():;@=,] { RETURN(s->tok[0]); }
/* arch-independent directives */
'.2byte' { RETURN(DIR_2BYTE); }
EXTRA_DIST += modules/parsers/gas/tests/datavis2.asm
EXTRA_DIST += modules/parsers/gas/tests/datavis2.errwarn
EXTRA_DIST += modules/parsers/gas/tests/datavis2.hex
+EXTRA_DIST += modules/parsers/gas/tests/gas-semi.asm
+EXTRA_DIST += modules/parsers/gas/tests/gas-semi.errwarn
+EXTRA_DIST += modules/parsers/gas/tests/gas-semi.hex
EXTRA_DIST += modules/parsers/gas/tests/jmpcall.asm
EXTRA_DIST += modules/parsers/gas/tests/jmpcall.errwarn
EXTRA_DIST += modules/parsers/gas/tests/jmpcall.hex