]> granicus.if.org Git - flex/commitdiff
Documented YY_NUM_RULES
authorVern Paxson <vern@ee.lbl.gov>
Tue, 10 Jan 1995 10:43:22 +0000 (10:43 +0000)
committerVern Paxson <vern@ee.lbl.gov>
Tue, 10 Jan 1995 10:43:22 +0000 (10:43 +0000)
flex.1

diff --git a/flex.1 b/flex.1
index 7d585b9d37c1311bd15044a7be0ff159b59df84e..68461c0a30d546277ba911cc196ac818a86bceaf 100644 (file)
--- a/flex.1
+++ b/flex.1
@@ -1785,7 +1785,20 @@ following would do the trick:
 .fi
 where
 .I ctr
-is an array to hold the counts for the different rules.
+is an array to hold the counts for the different rules.  Note that
+the macro
+.B YY_NUM_RULES
+gives the total number of rules (including the default rule, even if
+you use
+.B \-s),
+so a correct declaration for
+.I ctr
+is:
+.nf
+
+    int ctr[YY_NUM_RULES];
+
+.fi
 .PP
 The macro
 .B YY_USER_INIT