the tables are better aligned for memory access and computation. On some
RISC architectures, fetching and manipulating longwords is more efficient
than with smaller-sized units such as shortwords. This option can
-double the size of the tables used by your scanner.
+quadruple the size of the tables used by your scanner.
@item -Ce, --ecs
directs @code{flex} to construct @dfn{equivalence classes}, i.e., sets
/* Maximum number of NFA states. */
#define MAXIMUM_MNS 31999
+#define MAXIMUM_MNS_LONG 1999999999
/* Enough so that if it's subtracted from an NFA state number, the result
* is guaranteed to be negative.
*/
-#define MARKER_DIFFERENCE (MAXIMUM_MNS+2)
+#define MARKER_DIFFERENCE (maximum_mns+2)
/* Maximum number of nxt/chk pairs for non-templates. */
#define INITIAL_MAX_XPAIRS 2000
/* Variables for nfa machine data:
+ * maximum_mns - maximal number of NFA states supported by tables
* current_mns - current maximum on number of NFA states
* num_rules - number of the last accepting state; also is number of
* rules created so far
* rule_useful - true if we've determined that the rule can be matched
*/
-extern int current_mns, current_max_rules;
+extern int maximum_mns, current_mns, current_max_rules;
extern int num_rules, num_eof_rules, default_rule, lastnfa;
extern int *firstst, *lastst, *finalst, *transchar, *trans1, *trans2;
extern int *accptnum, *assoc_rule, *state_type;
int do_stdinit, use_stdout;
int onestate[ONE_STACK_SIZE], onesym[ONE_STACK_SIZE];
int onenext[ONE_STACK_SIZE], onedef[ONE_STACK_SIZE], onesp;
-int current_mns, current_max_rules;
+int maximum_mns, current_mns, current_max_rules;
int num_rules, num_eof_rules, default_rule, lastnfa;
int *firstst, *lastst, *finalst, *transchar, *trans1, *trans2;
int *accptnum, *assoc_rule, *state_type;
void set_up_initial_allocations()
{
+ maximum_mns = (long_align ? MAXIMUM_MNS_LONG : MAXIMUM_MNS);
current_mns = INITIAL_MNS;
firstst = allocate_integer_array( current_mns );
lastst = allocate_integer_array( current_mns );
{
if ( ++lastnfa >= current_mns )
{
- if ( (current_mns += MNS_INCREMENT) >= MAXIMUM_MNS )
+ if ( (current_mns += MNS_INCREMENT) >= maximum_mns )
lerrif(
_( "input rules are too complicated (>= %d NFA states)" ),
current_mns );