We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 414fc0e commit 708da2fCopy full SHA for 708da2f
decaf.l
@@ -6,12 +6,12 @@
6
7
#include <string.h>
8
9
-#include "sym.h"
+#include "defs.h"
10
#include "decaf.h"
11
12
#define TOKEN(t) return t
13
-#define SAVE {yylval.text = malloc(strlen(yytext)+1); \
14
- strcpy(yylval.text, yytext);}
+#define SAVE {yylval = malloc(sizeof(struct semantics)); yylval->text = malloc(strlen(yytext)+1); \
+ strcpy(yylval->text, yytext);}
15
#define YY_USER_ACTION { if (yylineno != lineno) \
16
{ col = 1;\
17
lineno = yylineno; \
0 commit comments