Skip to content

Commit 5a23d3b

Browse files
authored
Update lexer.l
1 parent 4d02b70 commit 5a23d3b

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

lexer.l

+1-6
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,7 @@ int idx =0 ;
88

99
[a-z]+ {c[idx++]='i';}
1010
[0-9]+ {c[idx++]='n';}
11-
"(" {c[idx++]='(';}
12-
")" {c[idx++]=')';}
13-
"+" {c[idx++]='+';}
14-
"-" {c[idx++]='-';}
15-
"*" {c[idx++]='*';}
16-
"/" {c[idx++]='/';}
11+
[(,),+,-,*,/] {c[idx++]=*yytext;}
1712

1813
%%
1914
void yyerror(char *s) {

0 commit comments

Comments
 (0)