summaryrefslogtreecommitdiff
path: root/ipl/procs/matchlib.icn
diff options
context:
space:
mode:
Diffstat (limited to 'ipl/procs/matchlib.icn')
-rw-r--r--ipl/procs/matchlib.icn60
1 files changed, 60 insertions, 0 deletions
diff --git a/ipl/procs/matchlib.icn b/ipl/procs/matchlib.icn
new file mode 100644
index 0000000..268ccf8
--- /dev/null
+++ b/ipl/procs/matchlib.icn
@@ -0,0 +1,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