renee.rtf.xaf




\f2\b global
\f3\b0
\f7\i a
\f3\i0
\f7\i dfont
\f3\i0
\f7\i input line
\f3\i0
\f7\i tagclass
\f3\i0 \

\f2\b if
\f3\b0 \{[
\f2\b gets
\f3\b0 $
\f7\i input x
\f3\i0 ]<0\} \{
\f2\b set
\f3\b0
\f7\i x
\f3\i0 \{<tag> EOI\}\}\

\f2\b array
\f3\b0
\f2\b unset
\f3\b0
\f7\i a
\f3\i0 *\

\f2\b array
\f3\b0
\f2\b set
\f3\b0
\f7\i a
\f3\i0 \{\
bold false\
docfont false\
header false\
tag NONE\
unicode false\
unique false\
\}\

\f2\b array
\f3\b0
\f2\b set
\f3\b0
\f7\i A
\f3\i0 \{<tag> NONE <hasparam> 0 <param> 0\}\

\f2\b foreach
\f3\b0 \{
\f7\i p
\f3\i0
\f7\i v
\f3\i0 \} $
\f7\i x
\f3\i0 \{\

\f2\b switch
\f3\b0 $
\f7\i p
\f3\i0 \{\
<hasparam> - <param> - <bytecode> \{\

\f2\b set
\f3\b0
\f7\i A
\f3\i0 ($
\f7\i p
\f3\i0 ) $
\f7\i v
\f3\i0 \
\}\
<tag> \{\

\f2\b set
\f3\b0
\f7\i a
\f3\i0 (tag) $
\f7\i v
\f3\i0 \

\f2\b set
\f3\b0
\f7\i A
\f3\i0 ($
\f7\i p
\f3\i0 ) $
\f7\i v
\f3\i0 \

\f2\b if
\f3\b0 \{[
\f2\b info
\f3\b0
\f2\b exists
\f3\b0
\f7\i tagclass
\f3\i0 ($
\f7\i v
\f3\i0 )]\} \{
\f2\b set
\f3\b0
\f7\i a
\f3\i0 ($
\f7\i tagclass
\f3\i0 ($
\f7\i v
\f3\i0 )) true\}\

\f4\i So if tagclass[TAG] is set "header", this will set a(header) to true.\
And similarily for other tagclassess. The
\f11\b array se
\f4\b0 t a above defines\
all these flags to false.
\f3\i0 \
\}\
b \{\

\f2\b set
\f3\b0
\f7\i a
\f3\i0 (bold) $
\f7\i v
\f3\i0 \
\}\
<familyname> \{\

\f2\b set
\f3\b0
\f7\i a
\f3\i0 (docfont) [
\f2\b info
\f3\b0
\f2\b exists
\f3\b0
\f7\i dfont
\f3\i0 ($
\f7\i v
\f3\i0 )]\
\}\
<unicode> \{\

\f2\b set
\f3\b0
\f7\i a
\f3\i0 (char) [
\f2\b format
\f3\b0 %c $
\f7\i v
\f3\i0 ]\

\f2\b set
\f3\b0
\f7\i a
\f3\i0 (unicode) true\
\}\
\}\
\}\

\f2\b set
\f3\b0
\f7\i line
\f3\i0 [
\f2\b array
\f3\b0
\f2\b get
\f3\b0
\f7\i A
\f3\i0 ]\
\}\
\
\pard\tx1080\tx1440\tx1800\tx2160\tx2520\tx2880\tx3240\tx3600\tx3960\tx4320\tx4680\tx5040\tx5400\tx5760\tx6120\tx6480\tx6840\tx7200\tx7560\tx7920\tx8280\tx8640\li720\ql\qnatural\pardirnatural

\f1 \cf0 The first line of the document is expected to be a BEGIN. Special case this BEGIN; this becomes the bottommost "utter"
\f4\i z
\f1\i0 stack entry which is never popped.\
\pard\tx360\tx720\tx1080\tx1440\tx1800\tx2160\tx2520\tx2880\tx3240\tx3600\tx3960\tx4320\tx4680\tx5040\tx5400\tx5760\tx6120\tx6480\tx6840\tx7200\tx7560\tx7920\tx8280\tx8640\ql\qnatural\pardirnatural

\f3 \cf0 \

\f2\b set
\f3\b0
\f7\i headers
\f3\i0 \{\}
\f4\i All header lines, including the initial BEGIN.
\f3\i0 \

\f2\b while
\f3\b0 1 \{\

\f2\b get
\f3\b0 \

\f2\b if
\f3\b0 \{$
\f7\i a
\f3\i0 (tag) eq "BEGIN"\} \{\

\f2\b lappend
\f3\b0
\f7\i headers
\f3\i0 $
\f7\i line
\f3\i0 ;
\f2\b break
\f3\b0 \
\}
\f2\b elseif
\f3\b0 \{$
\f7\i a
\f3\i0 (tag) eq "EOI"\} \{\

\f2\b break
\f3\b0 \
\}\
\}\
\
\pard\tx1080\tx1440\tx1800\tx2160\tx2520\tx2880\tx3240\tx3600\tx3960\tx4320\tx4680\tx5040\tx5400\tx5760\tx6120\tx6480\tx6840\tx7200\tx7560\tx7920\tx8280\tx8640\li720\ql\qnatural\pardirnatural

\f4\i \cf0 z
\f1\i0 is a stack of groups and control word buffers of those groups. More or less. Besides filterring out non-document font characters,
\f0\b rei
\f1\b0 also tries to filter out irrelevant control words and groups. The
\f4\i z
\f1\i0 stack is a stack of groups enterred but not exitted which have not yet had any document text. Once a group has document text, that group, and all enclosing groups will contribute to the output documents; therefore their contents is popped to the output.\
\
The document header is uneditted and the complete header is written to each output document. The only problem is deciding where the header ends.
\f0\b rei
\f1\b0 looks for control words that can only appear in headers: once found those and all enclosing groups are part of the header, marked as such and saved to the
\f4\i headers
\f1\i0 list.\
\
The subscripts of
\f4\i z
\f1\i0 are\

\f4\i sp
\f1\i0 .class \'d1 Stack entry class.\
utter \'d1 The bottom of the stack, always exists.\
BEGIN \'d1 A document group that is still being bufferred.\
header \'d1 A header group; its buffers are already copied to
\f4\i headers
\f1\i0 .\

\f4\i sp
\f1\i0 .buffer \'d1 Control words awaiting the appearance of document text.\

\f4\i sp
\f1\i0 :
\f4\i tag
\f1\i0 \'d1 Control words awaiting document text; only the last value is retained.\
\pard\tx360\tx720\tx1080\tx1440\tx1800\tx2160\tx2520\tx2880\tx3240\tx3600\tx3960\tx4320\tx4680\tx5040\tx5400\tx5760\tx6120\tx6480\tx6840\tx7200\tx7560\tx7920\tx8280\tx8640\ql\qnatural\pardirnatural

\f3 \cf0 \

\f2\b set
\f3\b0
\f7\i sp
\f3\i0 0
\f4\i z stack stack pointer.
\f3\i0 \

\f2\b array
\f3\b0
\f2\b set
\f3\b0
\f7\i z
\f3\i0 \{0.class utter 0.buffer \{\}\}
\f4\i z stack.
\f3\i0 \
\

\f2\b set
\f3\b0
\f7\i filedirective
\f3\i0 0
\f4\i Whether parsing
\f11\b [[
\f4\b0 .
\f3\i0 \

\f2\b set
\f3\b0
\f7\i fileundirective
\f3\i0 0
\f4\i Whether parsing
\f11\b ]]
\f4\b0 .
\f3\i0 \

\f2\b set
\f3\b0
\f7\i opath
\f3\i0 ""
\f4\i File directive current output path.
\f3\i0 \

\f2\b set
\f3\b0
\f7\i opaths
\f3\i0 \{\}
\f4\i File directive current output paths.
\f3\i0 \

\f2\b set
\f3\b0
\f7\i allfonts
\f3\i0 false
\f4\i Whether parsed file directive \'ba*\'ba.
\f3\i0 \
\

\f2\b set
\f3\b0
\f7\i outputs
\f3\i0 \{\}
\f4\i Current output channels. \{\} if none.
\f3\i0 \

\f2\b array
\f3\b0
\f2\b set
\f3\b0
\f7\i omap
\f3\i0 \{\}
\f4\i All open output documents.
\f3\i0 \

\f2\b set
\f3\b0
\f7\i depth
\f3\i0 0
\f4\i BEGIN-END counter. Used to balance BEGINs/ENDs.
\f3\i0 \
\

\f2\b while
\f3\b0 1 \{\

\f2\b incr
\f3\b0
\f7\i fileundirective
\f3\i0 -1\

\f2\b get
\f3\b0 \

\f2\b if
\f3\b0 \{$
\f7\i a
\f3\i0 (tag) eq "NONE"\} \{\

\f2\b puts
\f3\b0 stderr "bad line from $
\f7\i renee
\f3\i0 ";
\f2\b exit
\f3\b0 1\
\}
\f2\b elseif
\f3\b0 \{$
\f7\i a
\f3\i0 (tag) eq "EOS"\} \{\
;\
\}
\f2\b elseif
\f3\b0 \{$
\f7\i a
\f3\i0 (tag) eq "EOI"\} \{\

\f2\b break
\f3\b0 \
\

\f4\i Begin a group. Push its buffers on the z stack pending further information.\

\f3\i0 \
\}
\f2\b elseif
\f3\b0 \{$
\f7\i a
\f3\i0 (tag) eq "BEGIN"\} \{\

\f2\b incr
\f3\b0
\f7\i sp
\f3\i0 ;
\f2\b array
\f3\b0
\f2\b set
\f3\b0
\f7\i z
\f3\i0 [
\f2\b list
\f3\b0 $
\f7\i sp
\f3\i0 .class BEGIN $
\f7\i sp
\f3\i0 .buffer [
\f2\b list
\f3\b0 $
\f7\i line
\f3\i0 ]]\
\

\f4\i Document header.\

\f3\i0 \
\}
\f2\b elseif
\f3\b0 \{$
\f7\i a
\f3\i0 (header)\} \{\

\f4\i This is a header control word. Pop the z stack to the headers. Mark all open\
groups as "header" to ensure everything else in the group goes to the header.\

\f3\i0
\f2\b for
\f3\b0 \{
\f2\b set
\f3\b0
\f7\i i
\f3\i0 0\} \{$
\f7\i i
\f3\i0 \'b2$
\f7\i sp
\f3\i0 \} \{
\f2\b incr
\f3\b0
\f7\i i
\f3\i0 \} \{\

\f2\b foreach
\f3\b0
\f7\i header
\f3\i0 $
\f7\i z
\f3\i0 ($
\f7\i sp
\f3\i0 .buffer) \{
\f2\b lappend
\f3\b0
\f7\i headers
\f3\i0 $
\f7\i header
\f3\i0 \}\

\f2\b set
\f3\b0
\f7\i z
\f3\i0 ($
\f7\i sp
\f3\i0 .buffer) \{\}\

\f2\b foreach
\f3\b0 \{
\f7\i p
\f3\i0
\f7\i header
\f3\i0 \} [
\f2\b array
\f3\b0
\f2\b get
\f3\b0
\f7\i z
\f3\i0 $
\f7\i sp
\f3\i0 :*] \{
\f2\b lappend
\f3\b0
\f7\i headers
\f3\i0 $
\f7\i header
\f3\i0 \}\

\f2\b array
\f3\b0
\f2\b unset
\f3\b0
\f7\i z
\f3\i0 $
\f7\i sp
\f3\i0 :*\

\f2\b if
\f3\b0 \{$
\f7\i z
\f3\i0 ($
\f7\i sp
\f3\i0 .class) eq "BEGIN"\} \{
\f2\b set
\f3\b0
\f7\i z
\f3\i0 ($
\f7\i sp
\f3\i0 .class) header\}\
\}\

\f2\b lappend
\f3\b0
\f7\i headers
\f3\i0 $
\f7\i line
\f3\i0 \
\}
\f2\b elseif
\f3\b0 \{$
\f7\i a
\f3\i0 (tag) eq "END"
\f6 \uc0\u8743
\f3 $
\f7\i z
\f3\i0 ($
\f7\i sp
\f3\i0 .class) eq "header"\} \{\

\f4\i End of header group. Pop the stack entry.\

\f3\i0
\f2\b array
\f3\b0
\f2\b unset
\f3\b0
\f7\i z
\f3\i0 $
\f7\i sp
\f3\i0 .*\

\f2\b array
\f3\b0
\f2\b unset
\f3\b0
\f7\i z
\f3\i0 $
\f7\i sp
\f3\i0 :*\

\f2\b incr
\f3\b0
\f7\i sp
\f3\i0 -1\

\f2\b lappend
\f3\b0
\f7\i headers
\f3\i0 $
\f7\i line
\f3\i0 \
\}
\f2\b elseif
\f3\b0 \{$
\f7\i z
\f3\i0 ($
\f7\i sp
\f3\i0 .class) eq "header"\} \{\

\f4\i This is in a header group. Add to the headers. This covers things like font names\
in the fonttbl; the \\fonttbl destination should appear first and set the z stack class\
to "header".\

\f3\i0
\f2\b lappend
\f3\b0
\f7\i headers
\f3\i0 $
\f7\i line
\f3\i0 \
\

\f4\i File directive. This is not particularly rigourous parser.\

\f3\i0 \
\}
\f2\b elseif
\f3\b0 \{$
\f7\i a
\f3\i0 (unicode)
\f6 \uc0\u8743
\f3 $
\f7\i a
\f3\i0 (char) eq "\\x5B"
\f6 \uc0\u8743
\f3 $
\f7\i a
\f3\i0 (bold)\

\f6 \uc0\u8743
\f3 $
\f7\i a
\f3\i0 (docfont)
\f6 \uc0\u8743
\f3 $
\f7\i filedirective
\f3\i0 ==0\
\} \{\

\f4\i Openning
\f11\b [
\f4\b0 detected.\

\f3\i0
\f2\b set
\f3\b0
\f7\i filedirective
\f3\i0 1\
\}
\f2\b elseif
\f3\b0 \{$
\f7\i a
\f3\i0 (unicode)
\f6 \uc0\u8743
\f3 $
\f7\i a
\f3\i0 (char) eq "\\x5B"
\f6 \uc0\u8743
\f3 $
\f7\i a
\f3\i0 (bold)\

\f6 \uc0\u8743
\f3 $
\f7\i a
\f3\i0 (docfont)
\f6 \uc0\u8743
\f3 $
\f7\i filedirective
\f3\i0 ==1\
\} \{\

\f4\i Found the second
\f11\b [
\f4\b0 . Match any missing END, then clear the current outputs\
in preparation of the next subdocument.\

\f3\i0
\f2\b if
\f3\b0 \{[
\f2\b llength
\f3\b0 $
\f7\i outputs
\f3\i0 ]\} \{\

\f2\b while
\f3\b0 \{$
\f7\i depth
\f3\i0 >0\} \{\

\f2\b foreach
\f3\b0
\f7\i output
\f3\i0 $
\f7\i outputs
\f3\i0 \{
\f2\b puts
\f3\b0 $
\f7\i output
\f3\i0 \{<tag> END\}\}\

\f2\b incr
\f3\b0
\f7\i depth
\f3\i0 -1\
\}\
\}\

\f2\b set
\f3\b0
\f7\i allfonts
\f3\i0 false\

\f2\b set
\f3\b0
\f7\i filedirective
\f3\i0 2;
\f2\b set
\f3\b0
\f7\i opath
\f3\i0 "";
\f2\b set
\f3\b0
\f7\i opaths
\f3\i0 \{\}\
\}
\f2\b elseif
\f3\b0 \{$
\f7\i a
\f3\i0 (unicode)
\f6 \uc0\u8743
\f3 $
\f7\i a
\f3\i0 (char) eq ";"
\f6 \uc0\u8743
\f3 $
\f7\i a
\f3\i0 (bold)
\f6 \uc0\u8743
\f3 $
\f7\i a
\f3\i0 (docfont)
\f6 \uc0\u8743
\f3 $
\f7\i filedirective
\f3\i0 ==2\} \{\

\f4\i Begin another file path in the file directive.\

\f3\i0
\f2\b lappend
\f3\b0
\f7\i opaths
\f3\i0 $
\f7\i opath
\f3\i0 ;
\f2\b set
\f3\b0
\f7\i opath
\f3\i0 ""\
\}
\f2\b elseif
\f3\b0 \{$
\f7\i a
\f3\i0 (unicode)
\f6 \uc0\u8743
\f3 $
\f7\i a
\f3\i0 (char) eq "*"
\f6 \uc0\u8743
\f3 $
\f7\i a
\f3\i0 (bold)\

\f6 \uc0\u8743
\f3 $
\f7\i a
\f3\i0 (docfont)
\f6 \uc0\u8743
\f3 $
\f7\i filedirective
\f3\i0 ==2\
\} \{\

\f4\i Mark include all text, regardless of font, in the output documents.\

\f3\i0
\f2\b set
\f3\b0
\f7\i allfonts
\f3\i0 true\
\}
\f2\b elseif
\f3\b0 \{$
\f7\i a
\f3\i0 (unicode)
\f6 \uc0\u8743
\f3 $
\f7\i a
\f3\i0 (char) eq "\\x5d"
\f6 \uc0\u8743
\f3 $
\f7\i a
\f3\i0 (bold)\

\f6 \uc0\u8743
\f3 $
\f7\i a
\f3\i0 (docfont)
\f6 \uc0\u8743
\f3 $
\f7\i filedirective
\f3\i0 ==2\
\} \{\

\f4\i End of file directive. The directive is ended immediately, without waiting for\
the second
\f11\b ]
\f4\b0 . Go through the output paths of the directive, relative to the output\
directory. If
\f11\b rei
\f4\b0 has already openned the output file, it is resumed. Otherwise\

\f11\b rei
\f4\b0 creates the folder and file and writes the header to it; it can be subsequently\
resumed.\

\f3\i0
\f2\b set
\f3\b0
\f7\i fileundirective
\f3\i0 1\

\f2\b set
\f3\b0
\f7\i filedirective
\f3\i0 0\

\f2\b lappend
\f3\b0
\f7\i opaths
\f3\i0 $
\f7\i opath
\f3\i0 ;
\f2\b set
\f3\b0
\f7\i opath
\f3\i0 ""\

\f2\b set
\f3\b0
\f7\i outputs
\f3\i0 \{\}\

\f2\b foreach
\f3\b0
\f7\i opath
\f3\i0 $
\f7\i opaths
\f3\i0 \{\

\f2\b set
\f3\b0
\f7\i opath
\f3\i0 [
\f2\b string
\f3\b0
\f2\b trim
\f3\b0 $
\f7\i opath
\f3\i0 ]\

\f2\b if
\f3\b0 \{$
\f7\i opath
\f3\i0 eq ""\}
\f2\b continue
\f3\b0 \

\f2\b set
\f3\b0
\f7\i opath
\f3\i0 [
\f2\b file
\f3\b0
\f2\b join
\f3\b0 $
\f7\i odir
\f3\i0 $
\f7\i opath
\f3\i0 ]\

\f2\b if
\f3\b0 \{\'c2[
\f2\b info
\f3\b0
\f2\b exists
\f3\b0
\f7\i omap
\f3\i0 ($
\f7\i opath
\f3\i0 )]\} \{\

\f2\b file
\f3\b0
\f2\b mkdir
\f3\b0 [
\f2\b file
\f3\b0
\f2\b dirname
\f3\b0 $
\f7\i opath
\f3\i0 ]\

\f2\b if
\f3\b0 \{[
\f2\b catch
\f3\b0 \{
\f2\b open
\f3\b0 "|$
\f7\i renee
\f3\i0 -s > [
\f2\b list
\f3\b0 $
\f7\i opath
\f3\i0 ]" w\}
\f7\i output
\f3\i0 ]\} \{\

\f2\b puts
\f3\b0 stderr "open subdocument: $
\f7\i opath
\f3\i0 : $
\f7\i output
\f3\i0 ";
\f2\b exit
\f3\b0 1\
\}\

\f2\b set
\f3\b0
\f7\i omap
\f3\i0 ($
\f7\i opath
\f3\i0 ) $
\f7\i output
\f3\i0 \

\f2\b foreach
\f3\b0
\f7\i header
\f3\i0 $
\f7\i headers
\f3\i0 \{
\f2\b puts
\f3\b0 $
\f7\i output
\f3\i0 $
\f7\i header
\f3\i0 \}\
\}\

\f2\b lappend
\f3\b0
\f7\i outputs
\f3\i0 $
\f7\i omap
\f3\i0 ($
\f7\i opath
\f3\i0 )\
\}\

\f2\b set
\f3\b0
\f7\i depth
\f3\i0 0\
\}
\f2\b elseif
\f3\b0 \{$
\f7\i a
\f3\i0 (unicode)
\f6 \uc0\u8743
\f3 $
\f7\i a
\f3\i0 (char) eq "\\x5d"
\f6 \uc0\u8743
\f3 $
\f7\i a
\f3\i0 (bold)\

\f6 \uc0\u8743
\f3 $
\f7\i a
\f3\i0 (docfont)
\f6 \uc0\u8743
\f3 $
\f7\i filedirective
\f3\i0 ==0
\f6 \uc0\u8743
\f3 $
\f7\i fileundirective
\f3\i0 ==0\
\} \{\

\f4\i This detects the second
\f11\b ]
\f4\b0 ending a file directive. Because of the way\
fileundirective is set and decremented, it will only be 0 for the character\
immediately after the first closing
\f11\b ]
\f4\b0 above. A bold
\f11\b ]
\f4\b0 in that position is\
ignored.\

\f3\i0 ;\
\}
\f2\b elseif
\f3\b0 \{$
\f7\i a
\f3\i0 (unicode)
\f6 \uc0\u8743
\f3 $
\f7\i a
\f3\i0 (docfont)
\f6 \uc0\u8743
\f3 $
\f7\i filedirective
\f3\i0 ==2\} \{\

\f4\i A character added to the path in the file directive. These characterss\
do not have to be bold. Nonbold [, ], and * are file name characters.\

\f3\i0
\f2\b append
\f3\b0
\f7\i opath
\f3\i0 $
\f7\i a
\f3\i0 (char)\
\

\f4\i Document text.\

\f3\i0 \
\}
\f2\b elseif
\f3\b0 \{$
\f7\i a
\f3\i0 (unicode)
\f6 \uc0\u8743
\f3 ($
\f7\i allfonts
\f3\i0
\f6 \uc0\u8744
\f3 $
\f7\i a
\f3\i0 (docfont))
\f6 \uc0\u8743
\f3 [
\f2\b llength
\f3\b0 $
\f7\i outputs
\f3\i0 ]\} \{\
\pard\tx360\tx720\tx1080\tx1440\tx1800\tx2160\tx2520\tx2880\tx3240\tx3600\tx3960\tx4320\tx4680\tx5040\tx5400\tx5760\tx6120\tx6480\tx6840\tx7200\tx7560\tx7920\tx8280\tx8640\ql\qnatural\pardirnatural

\f4\i \cf0 \'d0 A document character.\
\'d0 It is in the document font or all fonts (
\f11\b *
\f4\b0 in directive) are copied.\
\'d0 There are current output files.\
Pop the group buffers, if any, to the output documents then write\
this character. Subsequent characters in the same group will see\
an empty z stack.\
\pard\tx360\tx720\tx1080\tx1440\tx1800\tx2160\tx2520\tx2880\tx3240\tx3600\tx3960\tx4320\tx4680\tx5040\tx5400\tx5760\tx6120\tx6480\tx6840\tx7200\tx7560\tx7920\tx8280\tx8640\ql\qnatural\pardirnatural

\f3\i0 \cf0
\f2\b set
\f3\b0
\f7\i filedirective
\f3\i0 0
\f4\i Ignore a stray
\f11\b [.
\f3\i0\b0 \

\f2\b for
\f3\b0 \{
\f2\b set
\f3\b0
\f7\i i
\f3\i0 0\} \{$
\f7\i i
\f3\i0 \'b2$
\f7\i sp
\f3\i0 \} \{
\f2\b incr
\f3\b0
\f7\i i
\f3\i0 \} \{\

\f2\b if
\f3\b0 \{$
\f7\i z
\f3\i0 ($
\f7\i sp
\f3\i0 .class) eq "BEGIN"\} \{
\f2\b incr
\f3\b0
\f7\i depth
\f3\i0 \}\

\f2\b foreach
\f3\b0
\f7\i elem
\f3\i0 $
\f7\i z
\f3\i0 ($
\f7\i sp
\f3\i0 .buffer) \{\

\f2\b foreach
\f3\b0
\f7\i output
\f3\i0 $
\f7\i outputs
\f3\i0 \{\

\f2\b puts
\f3\b0 $
\f7\i output
\f3\i0 $
\f7\i elem
\f3\i0 \
\}\
\}\

\f2\b foreach
\f3\b0 \{
\f7\i p
\f3\i0
\f7\i elem
\f3\i0 \} [
\f2\b array
\f3\b0
\f2\b get
\f3\b0
\f7\i z
\f3\i0 $
\f7\i sp
\f3\i0 :*] \{\

\f2\b foreach
\f3\b0
\f7\i output
\f3\i0 $
\f7\i outputs
\f3\i0 \{\

\f2\b puts
\f3\b0 $
\f7\i output
\f3\i0 $
\f7\i elem
\f3\i0 \
\}\
\}\
\}\

\f4\i Technically, this is pop to the bottom without popping the bottom,\
but it is easier to pop everything and recreate the z stack.\

\f3\i0
\f2\b array
\f3\b0
\f2\b unset
\f3\b0
\f7\i z
\f3\i0 \

\f2\b set
\f3\b0
\f7\i sp
\f3\i0 0;
\f2\b array
\f3\b0
\f2\b set
\f3\b0
\f7\i z
\f3\i0 \{0.class utter 0.buffer \{\}\}\

\f2\b foreach
\f3\b0
\f7\i output
\f3\i0 $
\f7\i outputs
\f3\i0 \{\

\f2\b puts
\f3\b0 $
\f7\i output
\f3\i0 $
\f7\i line
\f3\i0 \
\}\
\}
\f2\b elseif
\f3\b0 \{$
\f7\i a
\f3\i0 (unicode)\} \{\

\f4\i This character will for whatever reason not to be printed. It is ignored.\

\f3\i0
\f2\b set
\f3\b0
\f7\i filedirective
\f3\i0 0
\f4\i Ignore a stray
\f11\b [.
\f3\i0\b0 \
\

\f4\i End a non-header group.\

\f3\i0 \
\}
\f2\b elseif
\f3\b0 \{$
\f7\i a
\f3\i0 (tag) eq "END"
\f6 \uc0\u8743
\f3 $
\f7\i z
\f3\i0 ($
\f7\i sp
\f3\i0 .class) eq "BEGIN"\} \{\

\f4\i The top group had no document text. It is popped and discarded.\

\f3\i0
\f2\b array
\f3\b0
\f2\b unset
\f3\b0
\f7\i z
\f3\i0 $
\f7\i sp
\f3\i0 .*\

\f2\b array
\f3\b0
\f2\b unset
\f3\b0
\f7\i z
\f3\i0 $
\f7\i sp
\f3\i0 :*\

\f2\b incr
\f3\b0
\f7\i sp
\f3\i0 -1\
\}
\f2\b elseif
\f3\b0 \{$
\f7\i a
\f3\i0 (tag) eq "END"
\f6 \uc0\u8743
\f3 $
\f7\i z
\f3\i0 ($
\f7\i sp
\f3\i0 .class) eq "utter"\

\f6 \uc0\u8743
\f3 [
\f2\b llength
\f3\b0 $
\f7\i outputs
\f3\i0 ]
\f6 \uc0\u8743
\f3 $
\f7\i depth
\f3\i0 >0\
\} \{\

\f4\i This an END and a matching BEGIN has already been written.\
Write the END.\

\f3\i0
\f2\b incr
\f3\b0
\f7\i depth
\f3\i0 -1\

\f2\b foreach
\f3\b0
\f7\i output
\f3\i0 $
\f7\i outputs
\f3\i0 \{\

\f2\b puts
\f3\b0 $
\f7\i output
\f3\i0 $
\f7\i line
\f3\i0 \
\}\
\}
\f2\b elseif
\f3\b0 \{$
\f7\i a
\f3\i0 (tag) eq "END"\} \{\

\f4\i This is an END which is unbalanced or will not be written in any case.\
It is ignored.\

\f3\i0 ;\
\

\f4\i Some other control words.\

\f3\i0 \
\}
\f2\b elseif
\f3\b0 \{$
\f7\i a
\f3\i0 (unique)\} \{\

\f4\i Buffer unique control words. If the word is already bufferred for the group,\
the previous value is overwritten.\

\f3\i0
\f2\b set
\f3\b0
\f7\i z
\f3\i0 ($
\f7\i sp
\f3\i0 :$
\f7\i a
\f3\i0 (tag)) $
\f7\i line
\f3\i0 \
\}
\f2\b else
\f3\b0 \{\

\f4\i Buffer other control words. If it is control word no sufficiently analyzed\
by
\f11\b rei
\f4\b0 , duplicate or useless control words may be written. Tough luck.\

\f3\i0
\f2\b lappend
\f3\b0
\f7\i z
\f3\i0 ($
\f7\i sp
\f3\i0 .buffer) $
\f7\i line
\f3\i0 \
\}\
\}\
\
\pard\tx1080\tx1440\tx1800\tx2160\tx2520\tx2880\tx3240\tx3600\tx3960\tx4320\tx4680\tx5040\tx5400\tx5760\tx6120\tx6480\tx6840\tx7200\tx7560\tx7920\tx8280\tx8640\li720\ql\qnatural\pardirnatural

\f1 \cf0 Flush out current outputs. Then write the primordial END to each output file and close it.\
\pard\tx1080\tx1440\tx1800\tx2160\tx2520\tx2880\tx3240\tx3600\tx3960\tx4320\tx4680\tx5040\tx5400\tx5760\tx6120\tx6480\tx6840\tx7200\tx7560\tx7920\tx8280\tx8640\li720\ql\qnatural\pardirnatural

\f4\i \cf0
\f3\i0 \
\pard\tx360\tx720\tx1080\tx1440\tx1800\tx2160\tx2520\tx2880\tx3240\tx3600\tx3960\tx4320\tx4680\tx5040\tx5400\tx5760\tx6120\tx6480\tx6840\tx7200\tx7560\tx7920\tx8280\tx8640\ql\qnatural\pardirnatural
\cf0
\f2\b if
\f3\b0 \{[
\f2\b llength
\f3\b0 $
\f7\i outputs
\f3\i0 ]\} \{\

\f2\b while
\f3\b0 \{$
\f7\i depth
\f3\i0 >0\} \{\

\f2\b foreach
\f3\b0
\f7\i output
\f3\i0 $
\f7\i outputs
\f3\i0 \{
\f2\b puts
\f3\b0 $
\f7\i output
\f3\i0 \{<tag> END\}\}\

\f2\b incr
\f3\b0
\f7\i depth
\f3\i0 -1\
\}\
\}\

\f2\b foreach
\f3\b0 \{
\f7\i opath
\f3\i0
\f7\i output
\f3\i0 \} [
\f2\b array
\f3\b0
\f2\b get
\f3\b0
\f7\i omap
\f3\i0 ] \{\

\f2\b puts
\f3\b0 $
\f7\i output
\f3\i0 \{<tag> END\}\

\f2\b close
\f3\b0 $
\f7\i output
\f3\i0 \
\}\
}
.



Relevant Pages

  • Re: Passing an array of structuresfrom a pointer?
    ... I've tried an attempt to do that, and I tried to "clean" the header and main ..c file. ... int LIST_NUMBER; ... typedef struct ddListBox{ ... DDLB_COLL1array! ...
    (microsoft.public.vc.language)
  • Re: Complex query and PHP handling advice sought
    ... What I have done so far writes the top three header rows based on the events table and all that works fine. ... Or perhaps an array of row arrays to be written out row by row. ... // first connect to the database table ... First of all, this is a PHP newsgroup, not a SQL newsgroup. ...
    (alt.php)
  • Re: which object orient language is most suitable for embedded programming?
    ... global data is a process I tend to find illuminating. ... I use the typedef enum name as a data type, ... Yes indeed - the header for the module which contains the class. ... array of instances. ...
    (comp.arch.embedded)
  • Re: Raw image in header file
    ... Raw image in header file's a cool scene! ... initialiser for an array. ... FILE *cfp, *hfp; ... Dig the even newer still, yet more improved, sig! ...
    (comp.lang.c)