// test-parse.txt

to init_all =
	initSom
	init_list
	initcell
	def = list newatom OPER tkBB
	im = list newatom OPER tkBB
	initkeysym
	initlex
	startlex
	FI = 0

to parse | f e =
	lex
	while tok != tkEOF
		if (tok == tkTO) | (tok == tkCOLON)
			f = top		// throw away flag
			e = ypop
			def = append def e
		else
			f = top
			e = ypop
			im = append im e

to testlex | cnt =
	init_all
	for cnt 1 100
		lex
		if tok == tkEOF break
//		prtoken tok space

to testparse | cnt =
	init_all
	parse
	prlist def nl
	prlist im nl

testparse
//testlex

to testfi | cnt i pos =
	init_all
	for cnt 1 30
		fgets FI inbuf
		pos = 0
		while inbuf[pos] != 0
			printc inbuf[pos]
			pos = pos + 1

//testfi

//to main = testparse


