forked from dingdongnigetou/shell
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Journal
85 lines (67 loc) · 3.5 KB
/
Journal
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
(C) 2014 HuangJinDong
This is the journal of my project, it will be updated until my project is finished.
-- Mon Jan 20, 2014
Today I configure the git environment of project's and update
it to GitHub. At the same time, I also learn some knowledge
about shell. This project will be more interesting and difficult.
But, I will do my best to finish it. See you tomorrow!
-- Tue Jan 21, 2014
Tonight, I learn more about shell grammar and some functions it
has, such as background control and so on. I think it is better
to finish a simple shell. And add more functions day after day.
So, I will code at next time.
-- Thu Jan 23, 2014
Since the parsing is more difficult than lexical analysis, so, I
plan to implement lexical analysis first, after this, I will ss
finish the parsing. By the way, I finish the DFA of shell command
tonight. I believe that everything will be interesting if I stick to.
-- Thu Jan 30, 2014
Today is New Year's Eve. I still code this day, just now, I'm coding
the scanner of ddsh. Of course, it is not finished. But, I think I
will finish it in the next and then continue to go ahead.
-- Sun Feb 2, 2014
I code parts of DFA program. I think I should code more in one time.
-- Mon Feb 3, 2014
I has been finished the essential DFA program and compile successfully.
But there were some problem occur when program run. Fix them next
time!
-- FRI Feb 14, 2014
It can't execute a program with parameters yet, but tonight I find
that if I input lots of test command then the shell can identify parts
of parameters. This problem is puzzled me few days. At the some time,
when I fight with this problem, I find out other problems and fix them.
I will fix it finally!!!
-- Tue Feb 18, 2014
Today is my lucky day. I fix that problem eventually! By some tips. You
can see in my program. Now, the ddsh can execute commands from stdin
or files. I will add some internal commands for ddsh at the next time.
In addition, I will implement the function of '|', ';' and so on.
-- Wed Feb 19, 2014
I write a general framework for build-in commands, and it works well.
Next time, I will implement them in detail.
-- Thu Feb 20, 2014
Finish the "cd" and "pwd" and write historical commands into .history.
I learn that you should use fflush(stream) to write the data into file
when you operate a stream.
-- Fri Feb 21, 2014
Finish the code of build-in command. Next time will complete the key
processor(e: up, down, left, right) and the cursor processor.
-- Sun Feb 23, 2014
The key process is so difficult. Now, it only can identify which one
is up or down or left or right. Fight!
-- Thu Feb 25, 2014
OK, I use readline instead of keyprocess because the readline is more
simply and powerful. I implement the TAB and UP and DOWN and LEFT and
RIGHT. But, the tab only can polishing the file and directory but the
command, I will finish it next time.
-- Thu Feb 25, 2014
Tonight, I finish the auto-completion of command and write an error
processor for execute command. Next time, I will begin to code the
parse of ddsh. It is the most difficult.
-- Sat Mar 1, 2014
Finish lots parts of the parser, it occur two or more problem now,
I try to fix them at next time.
-- Sun Mar 2, 2014
Oh yes! I spent almost a month in coding the ddsh, and now, it is finished
momentarily. Maybe I will improve it in the future! Or, you can make it
better too!