Skip to content

Commit

Permalink
imported peg-0.1.7
Browse files Browse the repository at this point in the history
  • Loading branch information
gpakosz committed Nov 24, 2011
1 parent 889ac45 commit da7f049
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ distribute them any way you like.

## Version history

* **0.1.7** ([zip](peg/zipball/0.1.7), [tar.gz](peg/tarball/0.1.7)) — 2011-11-25
Fix matching of 8-bit chars to allow utf-8 sequences in matching expressions (thanks to Grégory Pakosz).
* **0.1.6** ([zip](peg/zipball/0.1.6), [tar.gz](peg/tarball/0.1.6)) — 2011-11-24
Allow octal escapes in character classes.
* **0.1.5** ([zip](peg/zipball/0.1.5), [tar.gz](peg/tarball/0.1.5)) — 2011-11-24
Expand Down
6 changes: 3 additions & 3 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: 2011-11-24 10:10:20 by piumarta on emilia
* Last edited: 2011-11-25 11:16:57 by piumarta on emilia
*/

#include <stdio.h>
Expand Down Expand Up @@ -440,7 +440,7 @@ YY_LOCAL(int) yymatchDot(void)\n\
YY_LOCAL(int) yymatchChar(int c)\n\
{\n\
if (yypos >= yylimit && !yyrefill()) return 0;\n\
if (yybuf[yypos] == c)\n\
if ((unsigned char)yybuf[yypos] == c)\n\
{\n\
++yypos;\n\
yyprintf((stderr, \" ok yymatchChar(%c) @ %s\\n\", c, yybuf+yypos));\n\
Expand Down Expand Up @@ -471,7 +471,7 @@ YY_LOCAL(int) yymatchClass(unsigned char *bits)\n\
{\n\
int c;\n\
if (yypos >= yylimit && !yyrefill()) return 0;\n\
c= yybuf[yypos];\n\
c= (unsigned char)yybuf[yypos];\n\
if (bits[c >> 3] & (1 << (c & 7)))\n\
{\n\
++yypos;\n\
Expand Down
6 changes: 3 additions & 3 deletions peg.peg-c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* A recursive-descent parser generated by peg 0.1.6 */
/* A recursive-descent parser generated by peg 0.1.7 */

#include <stdio.h>
#include <stdlib.h>
Expand Down Expand Up @@ -94,7 +94,7 @@ YY_LOCAL(int) yymatchDot(void)
YY_LOCAL(int) yymatchChar(int c)
{
if (yypos >= yylimit && !yyrefill()) return 0;
if (yybuf[yypos] == c)
if ((unsigned char)yybuf[yypos] == c)
{
++yypos;
yyprintf((stderr, " ok yymatchChar(%c) @ %s\n", c, yybuf+yypos));
Expand Down Expand Up @@ -125,7 +125,7 @@ YY_LOCAL(int) yymatchClass(unsigned char *bits)
{
int c;
if (yypos >= yylimit && !yyrefill()) return 0;
c= yybuf[yypos];
c= (unsigned char)yybuf[yypos];
if (bits[c >> 3] & (1 << (c & 7)))
{
++yypos;
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 6
#define PEG_LEVEL 7

0 comments on commit da7f049

Please sign in to comment.