blob: 2a7ce881fce4fa509bac808aa4f495d24350917d (
plain)
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
|
############################################################################
#
# File: parscond.icn
#
# Subject: Procedure to condense parse tree
#
# Author: Ralph E. Griswold
#
# Date: March 31, 1992
#
############################################################################
#
# This file is in the public domain.
#
############################################################################
#
# Procedure to condense a parse tree produced by the output of pargen.icn
# and produce the string that was parsed.
#
# The necessary record declaration is provided by the program with which
# is linked.
#
############################################################################
#
# See also: parsgen.icn
#
############################################################################
procedure parscond(R)
local result, x
result := ""
every x := !(R.alts) do
result ||:= string(x) | parscond(x)
return result
end
|