aboutsummaryrefslogtreecommitdiffstats
path: root/c_compiler/src/c_lexer.flex
diff options
context:
space:
mode:
authorYann Herklotz <ymherklotz@gmail.com>2017-03-17 15:32:22 +0000
committerYann Herklotz <ymherklotz@gmail.com>2017-03-17 15:32:22 +0000
commit3d846f1ef6fa03a075e3b1f6cd2f021856d2846f (patch)
tree8710b643a58a782403a7b179b6d3abe2fb09c356 /c_compiler/src/c_lexer.flex
parent3d77964b5739146a5285d10543df7b51e066c239 (diff)
downloadCompiler-3d846f1ef6fa03a075e3b1f6cd2f021856d2846f.tar.gz
Compiler-3d846f1ef6fa03a075e3b1f6cd2f021856d2846f.zip
Trying to fix segfault
Diffstat (limited to 'c_compiler/src/c_lexer.flex')
-rw-r--r--c_compiler/src/c_lexer.flex4
1 files changed, 2 insertions, 2 deletions
diff --git a/c_compiler/src/c_lexer.flex b/c_compiler/src/c_lexer.flex
index 716e1ac..6f0262e 100644
--- a/c_compiler/src/c_lexer.flex
+++ b/c_compiler/src/c_lexer.flex
@@ -55,8 +55,8 @@ ALL .
[|] { return T_OR; }
[\^] { return T_XOR; }
[&] { return T_AND; }
-[=][=] { return T_EQUALITY_OP; }
-[!][=] { return T_EQUALITY_OP; }
+[=][=] { yylval.string = new std::string(yytext); return T_EQUALITY_OP; }
+[!][=] { yylval.string = new std::string(yytext); return T_EQUALITY_OP; }
([<>][=])|[<>] { return T_REL_OP; }
[<>][<>] { return T_SHIFT_OP; }
[*] { yylval.string = new std::string(yytext); return T_MULT; }