From: Vern Paxson Date: Tue, 10 Jan 1995 10:43:22 +0000 (+0000) Subject: Documented YY_NUM_RULES X-Git-Tag: flex-2-5-5b~114 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7f475f9bdfea2e4f42446805c77221b5a5c860c0;p=flex Documented YY_NUM_RULES --- diff --git a/flex.1 b/flex.1 index 7d585b9..68461c0 100644 --- 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