summaryrefslogtreecommitdiffhomepage
path: root/mixlib
diff options
context:
space:
mode:
Diffstat (limited to 'mixlib')
-rw-r--r--mixlib/mix_scanner.l17
1 files changed, 17 insertions, 0 deletions
diff --git a/mixlib/mix_scanner.l b/mixlib/mix_scanner.l
index 2d097ca..aaa3146 100644
--- a/mixlib/mix_scanner.l
+++ b/mixlib/mix_scanner.l
@@ -352,8 +352,18 @@ wexpr {expr}({fpart})?(,{expr}({fpart})?)*
[+-]?{number}={ws}+.*\n {
if (!lsf) RETURN_ERROR (MIX_PERR_INV_ADDRESS, yytext);
mix_parser_define_ls (parser, mix_word_new (atol (yytext)));
+ lsf = FALSE;
ADD_INS ();
}
+ [+-]?{number}=[(,] {
+ int pos = yyleng - 3;
+ if (!lsf) RETURN_ERROR (MIX_PERR_INV_ADDRESS, yytext);
+ unput (yytext[yyleng - 1]);
+ while (pos >= 0) {
+ unput (yytext[pos]);
+ --pos;
+ }
+ }
[+-]?{number}{ws}+.*\n |
[+-]?{number}[(,\n] {
ins.address = mix_short_new (atol (yytext));
@@ -426,6 +436,13 @@ wexpr {expr}({fpart})?(,{expr}({fpart})?)*
else
{
ins.fspec = mix_byte_new (val);
+ if (lsf)
+ {
+ mix_parser_define_ls (parser,
+ mix_short_to_word_fast (ins.address));
+ ins.address = MIX_WORD_ZERO;
+ lsf = FALSE;
+ }
ADD_INS ();
}
}