diff options
Diffstat (limited to 'c_compiler/src/c_lexer.flex')
-rw-r--r-- | c_compiler/src/c_lexer.flex | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/c_compiler/src/c_lexer.flex b/c_compiler/src/c_lexer.flex index f6f2dd3..716e1ac 100644 --- a/c_compiler/src/c_lexer.flex +++ b/c_compiler/src/c_lexer.flex @@ -59,9 +59,9 @@ ALL . [!][=] { return T_EQUALITY_OP; } ([<>][=])|[<>] { return T_REL_OP; } [<>][<>] { return T_SHIFT_OP; } -[*] { return T_MULT; } -[\/] { return T_DIV; } -[%] { return T_REM; } +[*] { yylval.string = new std::string(yytext); return T_MULT; } +[\/] { yylval.string = new std::string(yytext); return T_DIV; } +[%] { yylval.string = new std::string(yytext); return T_REM; } [~] { return T_TILDE; } [!] { return T_NOT; } [.] { return T_DOT; } |