I made a mistake in summarizing my programs.
The nested parse_file(fd,"nrel","end") is contained
inside the "interpret_symbol" procedure, not the
"parse_file" procedure. There are actually several
intermediate procedures.
interpret_symbol()
calls state()
calls do_begin()
calls do_tail()
calls parse_file()
Dick McCullough
http://mkrmke.org
----- Original Message -----
From: Richard H. McCullough
To: Unicon group
Cc: KR-language
Sent: Thursday, May 14, 2009 7:48 AM
Subject: Windows Unicon 11.3: nested suspend bug ???
This behavior is so strange & repeatable
that I suspect a bug. In essence, my program
uses a nested level of suspends to process
"begin" - "end" groups of relations or hierarchies.
The nested parse_file()/prompt() always exits
when it is supposed to suspend the 2nd line
following "begin".
procedure main()
parse_file(fd,"ku","exit")
end
procedure parse_file(fd,gtype,option)
every proptoken := get_prop(fd) do {
propsymbol := get_symbol(proptoken)
if propsymbol.firstword == "begin" then
parse_file(fd,"nrel","end")
else
interpret_symbol(propsymbol)
}
end
procedure get_prop(fd)
every token := get_token(fd) do {
put(proptoken,token)
if proptoken.lastword == ";" then
suspend proptoken
end
procedure get_token(fd)
every word := get_word(fd) do
suspend token
end
procedure get_word(fd)
every line := prompt(fd) do
suspend word
end
procedure prompt(fd)
while line := read(fd) do
suspend line
end
Dick McCullough
http://mkrmke.org
------------------------------------------------------------------------------
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image
processing features enabled. http://p.sf.net/sfu/kodak-com
_______________________________________________
Unicon-group mailing list
Unicon-group@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/unicon-group