Skip to content

Commit

Permalink
imported peg-0.1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
gpakosz committed Sep 12, 2007
1 parent dbe7868 commit 752930c
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 6 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ distribute them any way you like.

## Version history

* **0.1.3** ([zip](peg/zipball/0.1.3), [tar.gz](peg/tarball/0.1.3)) — 2007-09-13
Allow matched braces inside `leg` actions.
Handle empty rules.
Handle empty grammars.
* **0.1.2** ([zip](peg/zipball/0.1.2), [tar.gz](peg/tarball/0.1.2)) — 2007-08-31
Grow buffers while (not if) they are too small.
Remove dependencies on grammar files.
Expand Down
5 changes: 3 additions & 2 deletions leg.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* A recursive-descent parser generated by peg 0.1.0 */
/* A recursive-descent parser generated by peg 0.1.1 */

#include <stdio.h>
#include <stdlib.h>
Expand Down Expand Up @@ -1048,7 +1048,8 @@ int main(int argc, char **argv)
for (; headers; headers= headers->next)
fprintf(output, "%s\n", headers->text);

Rule_compile_c(rules);
if (rules)
Rule_compile_c(rules);

if (trailer)
fprintf(output, "%s\n", trailer);
Expand Down
5 changes: 3 additions & 2 deletions leg.leg
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#
# THE SOFTWARE IS PROVIDED 'AS IS'. USE ENTIRELY AT YOUR OWN RISK.
#
# Last edited: 2007-05-15 10:34:05 by piumarta on emilia
# Last edited: 2007-09-12 00:22:41 by piumarta on emilia.local

%{
# include "tree.h"
Expand Down Expand Up @@ -279,7 +279,8 @@ int main(int argc, char **argv)
for (; headers; headers= headers->next)
fprintf(output, "%s\n", headers->text);

Rule_compile_c(rules);
if (rules)
Rule_compile_c(rules);

if (trailer)
fprintf(output, "%s\n", trailer);
Expand Down
4 changes: 2 additions & 2 deletions peg.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*
* THE SOFTWARE IS PROVIDED 'AS IS'. USE ENTIRELY AT YOUR OWN RISK.
*
* Last edited: 2007-05-15 10:34:42 by piumarta on emilia
* Last edited: 2007-09-12 00:27:30 by piumarta on vps2.piumarta.com
*/

#include "tree.h"
Expand Down Expand Up @@ -167,7 +167,7 @@ int main(int argc, char **argv)
Rule_print(n);

Rule_compile_c_header();
Rule_compile_c(rules);
if (rules) Rule_compile_c(rules);

return 0;
}

0 comments on commit 752930c

Please sign in to comment.