]> git.draconx.ca Git - cdecl99.git/blobdiff - src/namespecs.sed
Generate the specifier switch statement automatically.
[cdecl99.git] / src / namespecs.sed
diff --git a/src/namespecs.sed b/src/namespecs.sed
new file mode 100644 (file)
index 0000000..9cb4f6d
--- /dev/null
@@ -0,0 +1,23 @@
+1i\
+/*\
+ * Copyright © 2011 Nick Bowler\
+ *\
+ * License WTFPL2: Do What The Fuck You Want To Public License, version 2.\
+ * This is free software: you are free to do what the fuck you want to.\
+ * There is NO WARRANTY, to the extent permitted by law.\
+ */
+1i\
+/*\
+ * This file is automatically generated by namespecs.sed.\
+ */
+/[^_[:alpha:][:space:]]/b
+s/[[:space:]][[:space:]]*/ /g
+h
+s/_//g
+y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/
+s/\([[:upper:]]*\) \([[:upper:]]*\)/case CDECL_\1_\2:/
+p
+x
+s/.* //
+s/ident//
+s/.*/  return "&";/