]> granicus.if.org Git - flex/commitdiff
Changed symbol INFINITE to fix conflict with C math symbol.
authorJohn Millaway <john43@users.sourceforge.net>
Tue, 14 Feb 2006 19:38:11 +0000 (19:38 +0000)
committerJohn Millaway <john43@users.sourceforge.net>
Tue, 14 Feb 2006 19:38:11 +0000 (19:38 +0000)
flexdef.h
nfa.c
parse.y

index b50bbd5453faee87046cee92c3ebbddb1aec920c..2f887f4d3102fe6c40819e29bb52fdfac466230b 100644 (file)
--- a/flexdef.h
+++ b/flexdef.h
 #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 d140f59afa3d189ad88eaec324a2190aba52934c..09fedcf65a494c106fcdae3be80600f5cce76c37 100644 (file)
--- 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 4cde223a9f4c8eefe8e46b1307c4ee9e3cf26097..c40d75b7f0ef20db1b1613dd480bbe700a2202cf 100644 (file)
--- 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