Skip to content

Commit

Permalink
Update to 1.1.
Browse files Browse the repository at this point in the history
Fix canonify bug for 0*1"a" 0*1"b" 0*1"c" not noticing that
 the repeats mean you can't coalesce them.
  • Loading branch information
fenner committed Dec 7, 2006
1 parent 0c35448 commit 732e656
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions main.c
Original file line number Diff line number Diff line change
@@ -1,6 1,6 @@
/*
* Bill's ABNF Parser
* Copyright 2002-2004 William C. Fenner <fenner@research.att.com>
* Copyright 2002-2006 William C. Fenner <fenner@fenron.com>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -37,8 37,8 @@
#include "common.h"

static const char rcsid[] =
"$Fenner: abnf-parser/main.c,v 1.21 2004/09/17 01:34:45 fenner Exp $";
static const char versionstring[] = "1.0";
"$Fenner: abnf-parser/main.c,v 1.22 2004/10/11 17:14:11 fenner Exp $";
static const char versionstring[] = "1.1";

static void printobj_r(object *, int, int);
static void canonify(struct rule *);
Expand Down Expand Up @@ -186,6 186,8 @@ canonify_r(struct object **op)
break;
case T_TERMSTR:
while (o->next && o->next->type == T_TERMSTR &&
o->u.e.repetition.lo == 1 && o->u.e.repetition.hi == 1 &&
o->next->u.e.repetition.lo == 1 && o->next->u.e.repetition.hi == 1 &&
((o->u.e.e.termstr.flags & F_CASESENSITIVE) ==
(o->next->u.e.e.termstr.flags & F_CASESENSITIVE))) {
int len = strlen(o->u.e.e.termstr.str) strlen(o->next->u.e.e.termstr.str);
Expand Down

0 comments on commit 732e656

Please sign in to comment.