proc lsmap
	filen	lsystem.icn
	local	0,001000,s1
	local	1,001000,T
	local	2,000020,s
	local	3,000000,type
	local	4,000000,stop
	local	5,000000,move
	con	0,010000,5,164,141,142,154,145
	con	1,010000,38,154,163,155,141,160,050,051,040,055,040,163,145,143,157,156,144,040,141,162,147,165,155,145,156,164,040,156,157,164,040,141,040,164,141,142,154,145,041
	con	2,010000,0
	con	3,002000,1,1
	declend
	line	45
	colm	11
	mark	L1
	mark0
	pnull
	var	3
	var	1
	line	48
	colm	11
	invoke	1
	str	0
	line	48
	colm	15
	lexne
	unmark
	var	4
	str	1
	line	49
	colm	11
	invoke	1
	unmark
lab L1
	mark	L2
	pnull
	var	2
	str	2
	line	51
	colm	6
	asgn
	unmark
lab L2
	mark	L3
	var	0
	line	52
	colm	7
	bscan
lab L4
	mark0
	pnull
	var	2
	dup
	mark	L7
	pnull
	pnull
	var	1
	var	5
	int	3
	line	52
	colm	30
	invoke	1
	line	52
	colm	25
	subsc
	line	52
	colm	23
	nonnull
	esusp
	goto	L8
lab L7
	var	5
	int	3
	line	52
	colm	41
	invoke	1
lab L8
	line	52
	colm	17
	cat
	asgn
lab L5
	unmark
	goto	L4
lab L6
	line	52
	colm	7
	escan
	unmark
lab L3
	mark	L9
	mark	L10
	var	2
	line	54
	colm	4
	pret
lab L10
	pfail
	unmark
lab L9
	pnull
	line	55
	colm	1
	pfail
	end
proc mk_map
	local	0,001000,L
	local	1,000020,a
	local	2,000020,t
	local	3,000000,table
	con	0,002000,1,1
	con	1,002000,1,2
	declend
	line	59
	colm	11
	mark	L1
	pnull
	var	2
	var	3
	line	62
	colm	14
	invoke	0
	line	62
	colm	6
	asgn
	unmark
lab L1
	mark	L2
	mark0
	pnull
	var	1
	pnull
	var	0
	line	63
	colm	15
	bang
	line	63
	colm	12
	asgn
	pop
	mark0
	pnull
	pnull
	var	2
	pnull
	var	1
	int	0
	line	64
	colm	10
	subsc
	line	64
	colm	8
	subsc
	pnull
	var	1
	int	1
	line	64
	colm	19
	subsc
	line	64
	colm	15
	asgn
	unmark
lab L3
	efail
lab L4
	unmark
lab L2
	mark	L5
	mark	L6
	var	2
	line	67
	colm	4
	pret
lab L6
	pfail
	unmark
lab L5
	pnull
	line	68
	colm	1
	pfail
	end
proc read_Lsystem
	local	0,001000,f
	local	1,000020,ls
	local	2,000020,line
	local	3,000020,next_token
	local	4,000000,Lsys
	local	5,000000,table
	local	6,000000,read
	local	7,000000,gen_tokens
	local	8,000000,map
	local	9,000000,integer
	local	10,000000,numeric
	con	0,002000,1,0
	con	1,002000,2,10
	con	2,002000,2,90
	con	3,010000,0
	con	4,010000,6,157,162,144,145,162,072
	con	5,010000,5,144,151,163,164,072
	con	6,010000,6,144,145,154,164,141,072
	con	7,010000,6,141,170,151,157,155,072
	con	8,010000,4,155,141,160,072
	declend
	line	79
	colm	11
	mark	L1
	pnull
	var	1
	var	4
	int	0
	int	1
	int	2
	str	3
	var	5
	line	82
	colm	31
	invoke	0
	line	82
	colm	14
	invoke	5
	line	82
	colm	7
	asgn
	unmark
lab L1
	mark	L2
lab L3
	mark0
	pnull
	var	2
	var	6
	var	0
	line	84
	colm	22
	invoke	1
	line	84
	colm	15
	asgn
	unmark
	mark	L3
	mark	L6
	pnull
	var	3
	goto	L9
lab L7
	pop
	mark	L8
	var	7
	var	2
	line	85
	colm	38
	invoke	1
	line	85
	colm	21
	coret
	efail
lab L8
	cofail
	goto	L8
lab L9
	create	L7
	line	85
	colm	18
	asgn
	unmark
lab L6
	mark0
	var	8
	pnull
	var	3
	line	87
	colm	16
	coact
	line	87
	colm	15
	invoke	1
	eret
	mark	L11
	ccase
	str	4
	line	88
	colm	18
	eqv
	unmark
	pop
	pnull
	pnull
	var	1
	line	88
	colm	22
	field	order
	var	9
	pnull
	var	3
	line	88
	colm	40
	coact
	line	88
	colm	39
	invoke	1
	line	88
	colm	29
	asgn
	goto	L10
lab L11
	mark	L12
	ccase
	str	5
	line	89
	colm	18
	eqv
	unmark
	pop
	pnull
	pnull
	var	1
	line	89
	colm	22
	field	dist
	var	9
	pnull
	var	3
	line	89
	colm	40
	coact
	line	89
	colm	39
	invoke	1
	line	89
	colm	29
	asgn
	goto	L10
lab L12
	mark	L13
	ccase
	str	6
	line	90
	colm	18
	eqv
	unmark
	pop
	pnull
	pnull
	var	1
	line	90
	colm	22
	field	delta
	var	10
	pnull
	var	3
	line	90
	colm	40
	coact
	line	90
	colm	39
	invoke	1
	line	90
	colm	29
	asgn
	goto	L10
lab L13
	mark	L14
	ccase
	str	7
	line	91
	colm	18
	eqv
	unmark
	pop
	pnull
	pnull
	var	1
	line	91
	colm	22
	field	axiom
	pnull
	var	3
	line	91
	colm	32
	coact
	line	91
	colm	29
	asgn
	goto	L10
lab L14
	mark	L15
	ccase
	str	8
	line	92
	colm	18
	eqv
	unmark
	pop
	pnull
	pnull
	pnull
	var	1
	line	92
	colm	22
	field	rewrite
	pnull
	var	3
	line	92
	colm	31
	coact
	line	92
	colm	30
	subsc
	pushn1
	pnull
	var	3
	line	92
	colm	48
	coact
	pnull
	var	3
	line	92
	colm	61
	coact
	line	92
	colm	47
	invoke	2
	line	92
	colm	44
	asgn
	goto	L10
lab L15
	efail
lab L10
lab L4
	unmark
	goto	L3
lab L5
	unmark
lab L2
	mark	L16
	mark	L17
	var	1
	line	96
	colm	4
	pret
lab L17
	pfail
	unmark
lab L16
	pnull
	line	97
	colm	1
	pfail
	end
proc write_Lsystem
	local	0,001000,ls
	local	1,000000,write
	local	2,000000,key
	con	0,010000,9,114,055,163,171,163,164,145,155,072
	con	1,010000,8,011,157,162,144,145,162,072,040
	con	2,010000,8,011,040,144,151,163,164,072,040
	con	3,010000,8,011,144,145,154,164,141,072,040
	con	4,010000,8,011,141,170,151,157,155,072,040
	con	5,010000,8,011,040,040,155,141,160,072,040
	con	6,010000,4,040,055,076,040
	declend
	line	102
	colm	12
	mark	L1
	var	1
	str	0
	line	103
	colm	9
	invoke	1
	unmark
lab L1
	mark	L2
	var	1
	str	1
	pnull
	var	0
	line	104
	colm	24
	field	order
	line	104
	colm	9
	invoke	2
	unmark
lab L2
	mark	L3
	var	1
	str	2
	pnull
	var	0
	line	105
	colm	24
	field	dist
	line	105
	colm	9
	invoke	2
	unmark
lab L3
	mark	L4
	var	1
	str	3
	pnull
	var	0
	line	106
	colm	24
	field	delta
	line	106
	colm	9
	invoke	2
	unmark
lab L4
	mark	L5
	var	1
	str	4
	pnull
	var	0
	line	107
	colm	24
	field	axiom
	line	107
	colm	9
	invoke	2
	unmark
lab L5
	mark	L6
	mark0
	pnull
	var	2
	var	2
	pnull
	var	0
	line	108
	colm	23
	field	rewrite
	line	108
	colm	20
	invoke	1
	line	108
	colm	14
	asgn
	pop
	mark0
	var	1
	str	5
	var	2
	str	6
	pnull
	pnull
	var	0
	line	109
	colm	39
	field	rewrite
	var	2
	line	109
	colm	47
	subsc
	line	109
	colm	13
	invoke	4
	unmark
lab L7
	efail
lab L8
	unmark
lab L6
	mark	L9
	mark	L10
	pnull
	line	110
	colm	4
	pret
lab L10
	pfail
	unmark
lab L9
	pnull
	line	111
	colm	1
	pfail
	end
proc build_cmd
	local	0,001000,ls
	local	1,000020,s
	local	2,000000,lsmap
	con	0,002000,1,1
	declend
	line	117
	colm	11
	mark	L1
	pnull
	var	1
	pnull
	var	0
	line	120
	colm	11
	field	axiom
	line	120
	colm	6
	asgn
	unmark
lab L1
	mark	L2
	mark0
	pnull
	int	0
	pnull
	var	0
	line	121
	colm	17
	field	order
	push1
	line	121
	colm	12
	toby
	pop
	mark0
	pnull
	var	1
	var	2
	var	1
	pnull
	var	0
	line	122
	colm	23
	field	rewrite
	line	122
	colm	17
	invoke	2
	line	122
	colm	9
	asgn
	unmark
lab L3
	efail
lab L4
	unmark
lab L2
	mark	L5
	mark	L6
	var	1
	line	123
	colm	4
	pret
lab L6
	pfail
	unmark
lab L5
	pnull
	line	125
	colm	1
	pfail
	end
proc eval_cmd
	local	0,001000,t
	local	1,001000,s
	local	2,001000,dist
	local	3,001000,delta
	local	4,000000,obey
	local	5,000000,move
	con	0,002000,1,1
	declend
	line	129
	colm	11
	mark	L1
	var	1
	line	131
	colm	6
	bscan
lab L2
	mark0
	var	4
	var	0
	var	5
	int	0
	line	131
	colm	25
	invoke	1
	var	2
	var	3
	line	131
	colm	18
	invoke	4
lab L3
	unmark
	goto	L2
lab L4
	line	131
	colm	6
	escan
	unmark
lab L1
	mark	L5
	mark	L6
	pnull
	line	133
	colm	4
	pret
lab L6
	pfail
	unmark
lab L5
	pnull
	line	134
	colm	1
	pfail
	end
proc eval_lsys
	local	0,001000,t
	local	1,001000,ls
	local	2,000000,evaluate
	declend
	line	141
	colm	11
	mark	L1
	var	2
	var	0
	pnull
	var	1
	line	142
	colm	17
	field	axiom
	pnull
	var	1
	line	142
	colm	27
	field	rewrite
	pnull
	var	1
	line	142
	colm	39
	field	order
	pnull
	var	1
	line	142
	colm	49
	field	delta
	pnull
	var	1
	line	142
	colm	59
	field	dist
	line	142
	colm	12
	invoke	6
	unmark
lab L1
	pnull
	line	143
	colm	1
	pfail
	end
proc evaluate
	local	0,001000,t
	local	1,001000,s
	local	2,001000,Ls_map
	local	3,001000,n
	local	4,001000,delta
	local	5,001000,dist
	local	6,000000,eval_cmd
	local	7,000000,evaluate
	local	8,000000,lsmap
	local	9,000000,move
	con	0,002000,1,0
	con	1,002000,1,1
	declend
	line	147
	colm	11
	mark	L1
	mark0
	pnull
	var	3
	int	0
	line	149
	colm	10
	numeq
	unmark
	mark	L2
	var	6
	var	0
	var	1
	var	5
	var	4
	line	149
	colm	34
	invoke	4
	line	149
	colm	19
	pret
lab L2
	pfail
	unmark
lab L1
	mark	L3
	var	1
	line	151
	colm	7
	bscan
lab L4
	mark0
	var	7
	var	0
	var	8
	var	9
	int	1
	line	151
	colm	37
	invoke	1
	var	2
	line	151
	colm	32
	invoke	2
	var	2
	pnull
	var	3
	int	1
	line	151
	colm	60
	minus
	var	4
	var	5
	line	151
	colm	23
	invoke	6
lab L5
	unmark
	goto	L4
lab L6
	line	151
	colm	7
	escan
	unmark
lab L3
	mark	L7
	mark	L8
	pnull
	line	152
	colm	5
	pret
lab L8
	pfail
	unmark
lab L7
	pnull
	line	153
	colm	1
	pfail
	end
proc obey
	local	0,001000,t
	local	1,001000,c
	local	2,001000,dist
	local	3,001000,delta
	local	4,000000,Move_Forward
	local	5,000000,Left
	local	6,000000,Right
	local	7,000000,Line_Forward
	con	0,010000,1,146
	con	1,010000,1,053
	con	2,010000,1,055
	declend
	line	158
	colm	11
	mark	L1
	mark0
	var	1
	eret
	mark	L3
	ccase
	str	0
	line	161
	colm	12
	eqv
	unmark
	pop
	var	4
	var	0
	var	2
	line	161
	colm	26
	invoke	2
	goto	L2
lab L3
	mark	L4
	ccase
	str	1
	line	162
	colm	12
	eqv
	unmark
	pop
	var	5
	var	0
	var	3
	line	162
	colm	18
	invoke	2
	goto	L2
lab L4
	mark	L5
	ccase
	str	2
	line	163
	colm	12
	eqv
	unmark
	pop
	var	6
	var	0
	var	3
	line	163
	colm	19
	invoke	2
	goto	L2
lab L5
	pop
	var	7
	var	0
	var	2
	line	164
	colm	29
	invoke	2
lab L2
	unmark
lab L1
	mark	L6
	mark	L7
	pnull
	line	167
	colm	4
	pret
lab L7
	pfail
	unmark
lab L6
	pnull
	line	168
	colm	1
	pfail
	end
proc gen_tokens
	local	0,001000,s
	local	1,001000,ws
	local	2,000020,nws
	local	3,000000,tab
	local	4,000000,upto
	local	5,000000,many
	con	0,020000,2,040,011
	con	1,002000,1,1
	declend
	line	172
	colm	11
	mark	L1
	pnull
	pnull
	var	1
	line	175
	colm	4
	null
	cset	0
	line	175
	colm	8
	asgn
	unmark
lab L1
	mark	L2
	pnull
	var	2
	pnull
	var	1
	line	176
	colm	11
	compl
	line	176
	colm	8
	asgn
	unmark
lab L2
	mark	L3
	var	0
	line	178
	colm	6
	bscan
lab L4
	mark0
	var	3
	var	4
	var	2
	line	178
	colm	22
	invoke	1
	line	178
	colm	17
	invoke	1
	unmark
	mark	L4
	mark0
	int	1
	line	179
	colm	22
	limit
	var	3
	var	5
	var	2
	line	179
	colm	27
	invoke	1
	line	179
	colm	22
	invoke	1
	lsusp
	line	179
	colm	11
	psusp
	pop
lab L7
	efail
lab L8
lab L5
	unmark
	goto	L4
lab L6
	line	178
	colm	6
	escan
	unmark
lab L3
	pnull
	line	181
	colm	1
	pfail
	end
