From c42c40874a6f7f01904ac4ac7d6c70d1ab64aa77 Mon Sep 17 00:00:00 2001 From: John Millaway Date: Tue, 14 Feb 2006 19:38:11 +0000 Subject: [PATCH] Changed symbol INFINITE to fix conflict with C math symbol. --- flexdef.h | 2 +- nfa.c | 4 ++-- parse.y | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/flexdef.h b/flexdef.h index b50bbd5..2f887f4 100644 --- a/flexdef.h +++ b/flexdef.h @@ -202,7 +202,7 @@ #define JAM -1 /* to mark a missing DFA transition */ #define NO_TRANSITION NIL #define UNIQUE -1 /* marks a symbol as an e.c. representative */ -#define INFINITY -1 /* for x{5,} constructions */ +#define INFINITE_REPEAT -1 /* for x{5,} constructions */ #define INITIAL_MAX_CCLS 100 /* max number of unique character classes */ #define MAX_CCLS_INCREMENT 100 diff --git a/nfa.c b/nfa.c index d140f59..09fedcf 100644 --- a/nfa.c +++ b/nfa.c @@ -539,7 +539,7 @@ int mkposcl (state) * number of times to "ub" number of times * * note - * if "ub" is INFINITY then "new" matches "lb" or more occurrences of "mach" + * if "ub" is INFINITE_REPEAT then "new" matches "lb" or more occurrences of "mach" */ int mkrep (mach, lb, ub) @@ -549,7 +549,7 @@ int mkrep (mach, lb, ub) base_mach = copysingl (mach, lb - 1); - if (ub == INFINITY) { + if (ub == INFINITE_REPEAT) { copy = dupmachine (mach); mach = link_machines (mach, link_machines (base_mach, diff --git a/parse.y b/parse.y index 4cde223..c40d75b 100644 --- a/parse.y +++ b/parse.y @@ -604,7 +604,7 @@ series : series singleton } else - $$ = mkrep( $1, $3, INFINITY ); + $$ = mkrep( $1, $3, INFINITE_REPEAT ); } | series BEGIN_REPEAT_POSIX NUMBER END_REPEAT_POSIX @@ -687,7 +687,7 @@ singleton : singleton '*' } else - $$ = mkrep( $1, $3, INFINITY ); + $$ = mkrep( $1, $3, INFINITE_REPEAT ); } | singleton BEGIN_REPEAT_FLEX NUMBER END_REPEAT_FLEX -- 2.40.0