summaryrefslogtreecommitdiff
path: root/ipl/procs/matchlib.icn
blob: 268ccf8eea35fd25f3f06cf56ec19e3f788cecdc (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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
############################################################################
#
#	File:     matchlib.icn
#
#	Subject:  Procedures for lexical matching
#
#	Author:   Ralph E. Griswold
#
#	Date:     September 2, 1991
#
############################################################################
#
#   This file is in the public domain.
#
############################################################################
#
#     These procedures perform low-level "lexical" matching for
#  recursive-descent pattern matchers.
#
#	rb_()		match right bracket
#	lb_()		match left bracket
#	rp_()		match right parenthesis
#	lp_()		match left parenthesis
#	vb_()		match vertical bar
#	nl_()		match newline
#	empty_()	match empty string
#
############################################################################
#
#  See also: parsgen.icn
#
############################################################################

procedure rb_()
   suspend =">"
end

procedure lb_()
   suspend ="<"
end

procedure rp_()
   suspend =")"
end

procedure lp_()
   suspend =")"
end

procedure vb_()
   suspend ="|"
end

procedure nl_()
   suspend ="\n"
end

procedure empty_()
   suspend ""
end