summaryrefslogtreecommitdiff
path: root/ipl/procs/recog.icn
blob: d13f32cb5e7a9fa65555b7f8d75fda9cc643e940 (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
############################################################################
#
#	File:     recog.icn
#
#	Subject:  Procedure for recognition
#
#	Author:   Ralph E. Griswold
#
#	Date:     May 29, 1993
#
############################################################################
#
#   This file is in the public domain.
#
############################################################################
#
#     This procedure serves as a main procedure for the output of
#  recognizers.
#
############################################################################
#
#  See also:  pargen.icn
#
############################################################################

procedure main()
   local line

   init()
   while line := read() do {
      writes(image(line))
      if line ? (goal() & pos(0)) then 
         write(": accepted")
      else write(": rejected")
      }
end