--- btyacc-3.0.orig/skel2c
+++ btyacc-3.0/skel2c
@@ -20,7 +20,11 @@
 	next; 
       }
       { if (havesection) {
-	    gsub(/\\/, "\\\\");
+	    # Could use 'gsub(/\\/, "\\\\")' instead of the following
+	    # two lines, but there's a bug in mawk and the original
+	    # awk (not in gawk) which is triggered by that.
+	    gsub(/\\/, "\\\1");
+	    gsub(/\1/, "\\");
 	    gsub(/\t/, "\\t");
 	    gsub(/\"/, "\\\"");
 	    printf "    \"%s\",\n", $0; 
