summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Millaway <john43@users.sourceforge.net>2006-02-14 19:38:11 +0000
committerJohn Millaway <john43@users.sourceforge.net>2006-02-14 19:38:11 +0000
commitc42c40874a6f7f01904ac4ac7d6c70d1ab64aa77 (patch)
treecfc37d0a4336261ea9ffe0adab103c747e1aeb40
parent2eeca899c860ec186eecadadee7742e985334d01 (diff)
Changed symbol INFINITE to fix conflict with C math symbol.
-rw-r--r--flexdef.h2
-rw-r--r--nfa.c4
-rw-r--r--parse.y4
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