home: hub: minipeg

Download patch

ref: 43e436fe16dc8e3d18e15c03be8ff32124ff0f94
parent: 64fa13b1222be96154d573b5082e7f5a2f37a5f7
author: Andrew Chambers <ac@acha.ninja>
date: Tue Apr 12 17:29:14 CDT 2022

Make line directive more portable.

--- a/amalg.sh
+++ b/amalg.sh
@@ -21,6 +21,6 @@
 
 for f in "$@"
 do
-  echo "#line 0 \"$f\""
+  echo "#line 1 \"$f\""
   grep -v '^#include' "$f"
 done
--- a/minipeg.c
+++ b/minipeg.c
@@ -26,9 +26,9 @@
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
-#line 0 "version.h"
+#line 1 "version.h"
 #define MINIPEG_VERSION "4e9111b"
-#line 0 "tree.h"
+#line 1 "tree.h"
 
 enum { Unknown= 0, Rule, Variable, Name, Dot, Character, String, Class, Action, Inline, Predicate, Error, Alternate, Sequence, PeekFor, PeekNot, Query, Star, Plus };
 
@@ -124,7 +124,7 @@
 
 extern void  Node_print(Node *node);
 extern void  Rule_print(Node *node);
-#line 0 "compile.c"
+#line 1 "compile.c"
 
 #ifdef WIN32
 # undef inline
@@ -931,7 +931,7 @@
   Rule_compile_c2(node);
   fprintf(output, footer, start->rule.name);
 }
-#line 0 "tree.c"
+#line 1 "tree.c"
 
 #ifdef WIN32
 # undef inline
@@ -1272,7 +1272,7 @@
 }
 
 void Rule_print(Node *node)	{ Rule_fprint(stderr, node); }
-#line 0 "peg.c"
+#line 1 "peg.c"
 /* Parser generated by minipeg 4e9111b */
 
 #define YYRULECOUNT 38