summaryrefslogtreecommitdiffhomepage
path: root/mixlib/mix_scanner.l
diff options
context:
space:
mode:
Diffstat (limited to 'mixlib/mix_scanner.l')
-rw-r--r--mixlib/mix_scanner.l18
1 files changed, 13 insertions, 5 deletions
diff --git a/mixlib/mix_scanner.l b/mixlib/mix_scanner.l
index 084686f..4a6c1a3 100644
--- a/mixlib/mix_scanner.l
+++ b/mixlib/mix_scanner.l
@@ -1,4 +1,4 @@
-/* -*-flex-*- ------------------ mix_scanner.l :
+/* ------------------ mix_scanner.l :
* Lexical scanner used by mix_parser_t
* ------------------------------------------------------------------
* Copyright (C) 2000 jose antonio ortega ruiz <jaortega@acm.org>
@@ -70,8 +70,16 @@
#define ENTER_EVAL() \
do { \
- expr_val = MIX_WORD_ZERO; \
- yyless (0); \
+ if (yytext[0] != '*') \
+ { \
+ expr_val = MIX_WORD_ZERO; \
+ yyless (0); \
+ } \
+ else \
+ { \
+ expr_val = mix_short_to_word_fast (parser->loc_count); \
+ yyless (1); \
+ } \
yy_push_state (EVAL); \
} while (FALSE)
@@ -457,8 +465,8 @@ wexpr {expr}({fpart})?(,{expr}({fpart})?)*
wexpr_val = mix_word_store_field (mix_byte_new (val), wexpr_val_tmp,
wexpr_val);
}
- {number} wexpr_val = mix_word_new (atol (yytext));
- {expr} ENTER_EVAL ();
+ {number}/[,()\n\t ] wexpr_val = mix_word_new (atol (yytext));
+ {expr}/[,()\n\t ] ENTER_EVAL ();
,/{expr} /* eat comma if followed by expression */
[\n\t ] { /* ok if not inside an f-part */
if ( is_fp ) {