File tree 11 files changed +3704
-0
lines changed
11 files changed +3704
-0
lines changed Original file line number Diff line number Diff line change
1
+
2
+
3
+ LIB_SOURCES =$(wildcard * /* .* .c * /* .c * .c * .* .c)
4
+ LIB_SOURCES =
5
+ LANG_SOURCES =parser.c lexer.c main.c kernel.c
6
+ BISON =bison
7
+ FLEX =flex
8
+
9
+ et : clean bison flex build run compile
10
+
11
+ bison : parser.y
12
+ $(BISON ) -d parser.y -o parser.c
13
+
14
+ flex : lexer.l
15
+ $(FLEX ) -o lexer.c lexer.l
16
+
17
+ build :
18
+ $(CC ) $(LIB_SOURCES ) $(LANG_SOURCES ) -w -o et
19
+ @rm -f parser.c
20
+ @rm -f parser.h
21
+ @rm -f lexer.c
22
+
23
+ clean :
24
+ @rm -f parser.c
25
+ @rm -f parser.h
26
+ @rm -f lexer.c
27
+ @rm -f ./et
28
+ @rm -f temp.c
29
+ @rm -f temp
30
+
31
+ run :
32
+ ./et input
33
+
34
+ compile :
35
+ @gcc temp.c -o temp
36
+ @./temp
37
+ @# rm temp
38
+
Original file line number Diff line number Diff line change
1
+
2
+
3
+ //__ (-3-2)*2;
4
+ //__ -3-2*2;
5
+ //__ 11 - 2 * (43 + 7);//-89
6
+
7
+ __ 20-2*(4+5);//2
8
+
9
+
10
+
11
+
12
+
Original file line number Diff line number Diff line change
1
+ /*
2
+ __ 9;
3
+ __ 4.5;
4
+ __ (9).4.5."!";
5
+ __ true . 1 . null . false;
6
+
7
+ __ 5*3 + 6 -4;
8
+
9
+ __ "hello" . "!";
10
+
11
+ __ 5+5;
12
+ __ "hello" + true;
13
+ __ "hello " + null;
14
+
15
+ __ 5+5.3;
16
+ */
17
+ __ 5 - (3*9);
18
+ //__ (5-3)*9;
19
+ //age=8;
20
+
21
+
22
+
23
+
24
+
25
+ __ 5 - (1+5*1);
26
+
27
+
28
+
You can’t perform that action at this time.
0 commit comments