Skip to content

Commit

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

## Version history

* **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.
Add more basic examples.
* **0.1.1** ([zip](peg/zipball/0.1.1), [tar.gz](peg/tarball/0.1.1)) — 2007-05-15
First public release.
8 changes: 4 additions & 4 deletions compile.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:31:16 by piumarta on emilia
* Last edited: 2007-08-31 13:55:23 by piumarta on emilia.local
*/

#include <stdio.h>
Expand Down Expand Up @@ -387,7 +387,7 @@ YY_VARIABLE(int ) yyvalslen= 0;\n\
YY_LOCAL(int) yyrefill(void)\n\
{\n\
int yyn;\n\
if (yybuflen - yypos < 512)\n\
while (yybuflen - yypos < 512)\n\
{\n\
yybuflen *= 2;\n\
yybuf= realloc(yybuf, yybuflen);\n\
Expand Down Expand Up @@ -452,7 +452,7 @@ YY_LOCAL(int) yymatchClass(unsigned char *bits)\n\
\n\
YY_LOCAL(void) yyDo(yyaction action, int begin, int end)\n\
{\n\
if (yythunkpos >= yythunkslen)\n\
while (yythunkpos >= yythunkslen)\n\
{\n\
yythunkslen *= 2;\n\
yythunks= realloc(yythunks, sizeof(yythunk) * yythunkslen);\n\
Expand All @@ -470,7 +470,7 @@ YY_LOCAL(int) yyText(int begin, int end)\n\
yyleng= 0;\n\
else\n\
{\n\
if (yytextlen < (yyleng - 1))\n\
while (yytextlen < (yyleng - 1))\n\
{\n\
yytextlen *= 2;\n\
yytext= realloc(yytext, yytextlen);\n\
Expand Down
6 changes: 3 additions & 3 deletions leg.c
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ YY_VARIABLE(int ) yyvalslen= 0;
YY_LOCAL(int) yyrefill(void)
{
int yyn;
if (yybuflen - yypos < 512)
while (yybuflen - yypos < 512)
{
yybuflen *= 2;
yybuf= realloc(yybuf, yybuflen);
Expand Down Expand Up @@ -180,7 +180,7 @@ YY_LOCAL(int) yymatchClass(unsigned char *bits)

YY_LOCAL(void) yyDo(yyaction action, int begin, int end)
{
if (yythunkpos >= yythunkslen)
while (yythunkpos >= yythunkslen)
{
yythunkslen *= 2;
yythunks= realloc(yythunks, sizeof(yythunk) * yythunkslen);
Expand All @@ -198,7 +198,7 @@ YY_LOCAL(int) yyText(int begin, int end)
yyleng= 0;
else
{
if (yytextlen < (yyleng - 1))
while (yytextlen < (yyleng - 1))
{
yytextlen *= 2;
yytext= realloc(yytext, yytextlen);
Expand Down
2 changes: 1 addition & 1 deletion version.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#define PEG_MAJOR 0
#define PEG_MINOR 1
#define PEG_LEVEL 1
#define PEG_LEVEL 2

0 comments on commit dbe7868

Please sign in to comment.