-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathnotes.txt
56 lines (51 loc) · 2.68 KB
/
notes.txt
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
2011-11-28 10:38:41
思维有点乱了
2011-11-28 08:29:39
昨夜偶得一梦,醒来发现在网络时代可以发展成一项事业:夜里在一处,几人围坐一处。我的座位后被一个女孩撒了一地图案,好像是个长耳兔子。我为了不破坏图案,就只好从空洞的地方跳到座位上。后来我说这个兔子的样子要是改改就好了。居然这个女孩就把兔子拿起来(梦的荒诞:突然兔子变成了一个毛绒兔子),把兔子脸上的拉链接口,重新把脸扣成了另一种样式。醒来后我突然想到,可以开个网站,用户自己设计各种玩具,或者是服装,其它用品也可以。设计过程就像现在的游戏,厂家按样定制。
2011-11-27 11:43:47
from the use of 'item_matched', 'matched' in optional, any, some and so on, use global and outer variables is necessary.
local variable: @var, outer variable ^var, global variable ^^variable
var = 1: local assign, assign value 1 to var in local env, if not exist, add new variable
@var = 1: same as above.
^var = 1: outer assign, assign value 1 to var in outer env, if not exist, error raised.
^^var = 1: global assign, assign value 1 to var in global env, if not exist, error raised.
x = @var: get value of var in local env, if not exist, error raised.
x = var: get value of var in most inner env, include local env
x = ^var: get value of var in most inner env, exclude local env and global env
x = ^^var: get value of var in global environment
2011-11-27 10:33:20
def old_scont(value, solver):
old_scont_things
def old_fcont(value, solver):
old_fcont_things
|def apply_parallel_cont(value, solver):
| parse_state = solver.parse_state
| call1
| def parallel_cont(value, solver): # should be defined in apply_parallel_cont
| right = solver.parse_state[1]
| solver.parse_state = parse_state
| call2
def parallel_finish_cont(value, solver): # should be defined in parallel_cont
if solver.parse_state[1]==right: return value
| else: return old_fcont(value, solver)
|=>else: return old_fcont_things
| return parallel_finish_cont(value, solver)
|| return parallel_cont(value, solver)
|=>
| if solver.parse_state[1]==right: return value
| else: solver.scont = solver.fcont
|=>
|| right = solver.parse_state[1]
||| solver.parse_state = parse_state
|| call2
|| if solver.parse_state[1]==right: return value
|| else: old_fcont_things
|=>
|def apply_parallel_cont(value, solver):
| parse_state = solver.parse_state
| call1
| right = solver.parse_state[1]
| solver.parse_state = parse_state
| call2
| if solver.parse_state[1]==right: return value
| else: old_fcont_things