summaryrefslogtreecommitdiff
path: root/web/noweb/src/icon/yaccdefs.nw
diff options
context:
space:
mode:
Diffstat (limited to 'web/noweb/src/icon/yaccdefs.nw')
-rw-r--r--web/noweb/src/icon/yaccdefs.nw26
1 files changed, 26 insertions, 0 deletions
diff --git a/web/noweb/src/icon/yaccdefs.nw b/web/noweb/src/icon/yaccdefs.nw
new file mode 100644
index 0000000000..596090cff5
--- /dev/null
+++ b/web/noweb/src/icon/yaccdefs.nw
@@ -0,0 +1,26 @@
+\section{Finding {\tt yacc} definitions}
+<<*>>=
+procedure rcsinfo ()
+ return "$Id: yaccdefs.nw,v 1.18 2008/10/06 01:03:05 nr Exp nr $" ||
+ "$Name: v2_12 $"
+end
+procedure main(args)
+ go()
+end
+
+procedure postpass(name, arg)
+ static kind
+ case name of {
+ "begin" : arg ? kind := tab(upto(' ')|0)
+ "text" : if kind == "code" then arg ?
+ if id := tab(many(&letters)) then {
+ tab(many(' \t'))
+ if =":" & any(&letters ++ ' ([{') then writedefn(id)
+ }
+ }
+ return
+end
+
+procedure prepass(name, arg)
+ if name == "end" then writedefn(&null) # force newline
+end