diff options
Diffstat (limited to 'mixlib/mix_scanner.l')
-rw-r--r-- | mixlib/mix_scanner.l | 32 |
1 files changed, 15 insertions, 17 deletions
diff --git a/mixlib/mix_scanner.l b/mixlib/mix_scanner.l index fcd6054..e85b6c8 100644 --- a/mixlib/mix_scanner.l +++ b/mixlib/mix_scanner.l @@ -106,29 +106,15 @@ } while (FALSE) -static mix_word_t -eval_binop_ (const gchar *op, mix_word_t x, mix_word_t y); - -static void yyunput(int, char*); +static mix_word_t eval_binop_ (const gchar *op, mix_word_t x, mix_word_t y); -static void -unput_word_ (mix_word_t word) - { - gchar *value; - gint k; - value = g_strdup_printf ("%s%ld", - mix_word_is_negative (word)? "-":"+", - mix_word_magnitude (word)); - for (k = strlen (value) - 1; k >= 0; --k) - unput (value[k]); - g_free (value); - } +static void unput_word_ (mix_word_t word); %} %option nomain %option caseless -%option pointer +%option array %option stack %option noyywrap %option noyy_top_state @@ -557,3 +543,15 @@ eval_binop_ (const gchar *op, mix_word_t x, mix_word_t y) return result; } +static void +unput_word_ (mix_word_t word) +{ + gchar *value; + gint k; + value = g_strdup_printf ("%s%ld", + mix_word_is_negative (word)? "-":"+", + mix_word_magnitude (word)); + for (k = strlen (value) - 1; k >= 0; --k) + unput (value[k]); + g_free (value); +} |