@@ -103,7 +103,7 @@ static void add_version(const char *verstring);
static int is_download_const(expression_t *immed);
static int is_location_address(symbol_t *symbol);
void yyerror(const char *string);
-
+int yylex(void);
#define SRAM_SYMNAME "SRAM_BASE"
#define SCB_SYMNAME "SCB_BASE"
%}
@@ -62,7 +62,7 @@ static symbol_t *macro_symbol;
static void add_macro_arg(const char *argtext, int position);
void mmerror(const char *string);
-
+int mmlex(void);
%}
%union {
@@ -56,6 +56,7 @@
#include "aicasm.h"
#include "aicasm_symbol.h"
#include "aicasm_gram.h"
+#include "aicasm_macro_gram.h"
/* This is used for macro body capture too, so err on the large size. */
#define MAX_STR_CONST 4096
@@ -414,11 +415,11 @@ nop { return T_NOP; }
yy_create_buffer(stdin,
YY_BUF_SIZE);
yy_switch_to_buffer(temp_state);
- mm_switch_to_buffer(old_state);
+ yy_switch_to_buffer(old_state);
mmparse();
- mm_switch_to_buffer(temp_state);
+ yy_switch_to_buffer(temp_state);
yy_switch_to_buffer(old_state);
- mm_delete_buffer(temp_state);
+ yy_delete_buffer(temp_state);
expand_macro(yylval.sym);
} else {
if (yylval.sym->type == UNINITIALIZED) {