home: hub: minipeg

Download patch

ref: 74bd921fc755aefb20c8171d83758bc3f5d0877b
parent: cdc5bd4585cf5226c2b6a9fe0b08b7fab8461454
author: Gregory Pakosz <gregory.pakosz@gmail.com>
date: Mon Dec 23 06:10:41 CST 2013

imported peg-0.1.15

--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2013-12-18  piumarta  <com -dot- gmail -at- piumarta (backwards)>
+
+	* src/version.h: 0.1.15
+
+	* src/compile.c: YY_FREE takes context and pointer as arguments.
+
+	* YYRELEASE: Pass yyctx and pointer to YY_FREE.
+
 2013-12-01  Ian Piumarta  <com -dot- gmail -at- piumarta (backwards)>
 
 	* src/version.h: 0.1.14
--- a/README.md
+++ b/README.md
@@ -26,6 +26,8 @@
 
 ## Version history
 
+* **0.1.15** ([zip](../../archive/0.1.15.zip), [tar.gz](../../archive/0.1.15.tar.gz)) &mdash; 2013-12-17  
+Calls to `YY_FREE` fixed (thanks to Andrew Dunham).
 * **0.1.14** ([zip](../../archive/0.1.14.zip), [tar.gz](../../archive/0.1.14.tar.gz)) &mdash; 2013-12-01  
 Documentation typos fixed (thanks to Giulio Paci).
 * **0.1.13** ([zip](../../archive/0.1.13.zip), [tar.gz](../../archive/0.1.13.tar.gz)) &mdash; 2013-08-16  
--- a/src/compile.c
+++ b/src/compile.c
@@ -13,7 +13,7 @@
  * 
  * THE SOFTWARE IS PROVIDED 'AS IS'.  USE ENTIRELY AT YOUR OWN RISK.
  * 
- * Last edited: 2013-08-16 00:58:47 by piumarta on emilia
+ * Last edited: 2013-12-18 10:09:42 by piumarta on linux32
  */
 
 #include <stdio.h>
@@ -406,7 +406,7 @@
 #define YY_REALLOC(C, P, N)	realloc(P, N)\n\
 #endif\n\
 #ifndef YY_FREE\n\
-#define YY_FREE free\n\
+#define YY_FREE(C, P)		free(P)\n\
 #endif\n\
 #ifndef YY_LOCAL\n\
 #define YY_LOCAL(T)	static T\n\
@@ -709,10 +709,10 @@
   if (yyctx->__buflen)\n\
     {\n\
       yyctx->__buflen= 0;\n\
-      YY_FREE(yyctx->__buf);\n\
-      YY_FREE(yyctx->__text);\n\
-      YY_FREE(yyctx->__thunks);\n\
-      YY_FREE(yyctx->__vals);\n\
+      YY_FREE(yyctx, yyctx->__buf);\n\
+      YY_FREE(yyctx, yyctx->__text);\n\
+      YY_FREE(yyctx, yyctx->__thunks);\n\
+      YY_FREE(yyctx, yyctx->__vals);\n\
     }\n\
   return yyctx;\n\
 }\n\
--- a/src/leg.c
+++ b/src/leg.c
@@ -1,4 +1,4 @@
-/* A recursive-descent parser generated by peg 0.1.14 */
+/* A recursive-descent parser generated by peg 0.1.15 */
 
 #include <stdio.h>
 #include <stdlib.h>
@@ -53,7 +53,7 @@
 #define YY_REALLOC(C, P, N)	realloc(P, N)
 #endif
 #ifndef YY_FREE
-#define YY_FREE free
+#define YY_FREE(C, P)		free(P)
 #endif
 #ifndef YY_LOCAL
 #define YY_LOCAL(T)	static T
@@ -1269,10 +1269,10 @@
   if (yyctx->__buflen)
     {
       yyctx->__buflen= 0;
-      YY_FREE(yyctx->__buf);
-      YY_FREE(yyctx->__text);
-      YY_FREE(yyctx->__thunks);
-      YY_FREE(yyctx->__vals);
+      YY_FREE(yyctx, yyctx->__buf);
+      YY_FREE(yyctx, yyctx->__text);
+      YY_FREE(yyctx, yyctx->__thunks);
+      YY_FREE(yyctx, yyctx->__vals);
     }
   return yyctx;
 }
--- a/src/peg.peg-c
+++ b/src/peg.peg-c
@@ -1,4 +1,4 @@
-/* A recursive-descent parser generated by peg 0.1.14 */
+/* A recursive-descent parser generated by peg 0.1.15 */
 
 #include <stdio.h>
 #include <stdlib.h>
@@ -11,7 +11,7 @@
 #define YY_REALLOC(C, P, N)	realloc(P, N)
 #endif
 #ifndef YY_FREE
-#define YY_FREE free
+#define YY_FREE(C, P)		free(P)
 #endif
 #ifndef YY_LOCAL
 #define YY_LOCAL(T)	static T
@@ -1057,10 +1057,10 @@
   if (yyctx->__buflen)
     {
       yyctx->__buflen= 0;
-      YY_FREE(yyctx->__buf);
-      YY_FREE(yyctx->__text);
-      YY_FREE(yyctx->__thunks);
-      YY_FREE(yyctx->__vals);
+      YY_FREE(yyctx, yyctx->__buf);
+      YY_FREE(yyctx, yyctx->__text);
+      YY_FREE(yyctx, yyctx->__thunks);
+      YY_FREE(yyctx, yyctx->__vals);
     }
   return yyctx;
 }
--- a/src/version.h
+++ b/src/version.h
@@ -1,3 +1,3 @@
 #define PEG_MAJOR	0
 #define PEG_MINOR	1
-#define PEG_LEVEL	14
+#define PEG_LEVEL	15