Skip to content

Commit c9128ea

Browse files
committed
upload old files it's for 3-4 years ago
1 parent b99a2ac commit c9128ea

11 files changed

+3704
-0
lines changed

Makefile

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
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+

et

107 KB
Binary file not shown.

input

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
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+

input-

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
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+

0 commit comments

Comments
 (0)