From: Vern Paxson Date: Sun, 26 Dec 1993 15:04:06 +0000 (+0000) Subject: Added in_rule, deleted actvsc X-Git-Tag: flex-2-5-5b~226 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a09b607cfb81e034eeda6aa5c6cf73cccd908840;p=flex Added in_rule, deleted actvsc --- diff --git a/flexdef.h b/flexdef.h index 30003ec..562af3a 100644 --- a/flexdef.h +++ b/flexdef.h @@ -341,6 +341,7 @@ extern struct hash_entry *ccltab[CCL_HASH_SIZE]; * having "reject" set for variable trailing context) * continued_action - true if this rule's action is to "fall through" to * the next rule's action (i.e., the '|' action) + * in_rule - true if we're inside an individual rule, false if not. * yymore_really_used - has a REALLY_xxx value indicating whether a * %used or %notused was used with yymore() * reject_really_used - same for REJECT @@ -350,7 +351,7 @@ extern int printstats, syntaxerror, eofseen, ddebug, trace, nowarn, spprdflt; extern int interactive, caseins, lex_compat, useecs, fulltbl, usemecs; extern int fullspd, gen_line_dirs, performance_report, backing_up_report; extern int C_plus_plus, long_align, use_read, yytext_is_array, csize; -extern int yymore_used, reject, real_reject, continued_action; +extern int yymore_used, reject, real_reject, continued_action, in_rule; #define REALLY_NOT_DETERMINED 0 #define REALLY_USED 1 @@ -515,16 +516,9 @@ extern int tecfwd[CSIZE + 1], tecbck[CSIZE + 1]; * scxclu - true if start condition is exclusive * sceof - true if start condition has EOF rule * scname - start condition name - * actvsc - stack of active start conditions for the current rule; - * a negative entry means that the start condition is *not* - * active for the current rule. Start conditions may appear - * multiple times on the stack; the entry for it closest - * to the top of the stack (i.e., actvsc[actvp]) is the - * one to use. Others are present from "{" scoping - * constructs. */ -extern int lastsc, current_max_scs, *scset, *scbol, *scxclu, *sceof, *actvsc; +extern int lastsc, current_max_scs, *scset, *scbol, *scxclu, *sceof; extern char **scname; diff --git a/main.c b/main.c index 7fa5e6a..3ca92b9 100644 --- a/main.c +++ b/main.c @@ -53,7 +53,7 @@ int printstats, syntaxerror, eofseen, ddebug, trace, nowarn, spprdflt; int interactive, caseins, lex_compat, useecs, fulltbl, usemecs; int fullspd, gen_line_dirs, performance_report, backing_up_report; int C_plus_plus, long_align, use_read, yytext_is_array, csize; -int yymore_used, reject, real_reject, continued_action; +int yymore_used, reject, real_reject, continued_action, in_rule; int yymore_really_used, reject_really_used; int datapos, dataline, linenum, out_linenum; FILE *skelfile = NULL; @@ -74,7 +74,7 @@ int numtemps, numprots, protprev[MSP], protnext[MSP], prottbl[MSP]; int protcomst[MSP], firstprot, lastprot, protsave[PROT_SAVE_SIZE]; int numecs, nextecm[CSIZE + 1], ecgroup[CSIZE + 1], nummecs, tecfwd[CSIZE + 1]; int tecbck[CSIZE + 1]; -int lastsc, current_max_scs, *scset, *scbol, *scxclu, *sceof, *actvsc; +int lastsc, current_max_scs, *scset, *scbol, *scxclu, *sceof; char **scname; int current_max_dfa_size, current_max_xpairs; int current_max_template_xpairs, current_max_dfas; @@ -373,9 +373,9 @@ char **argv; char *arg, *mktemp(); printstats = syntaxerror = trace = spprdflt = caseins = false; - lex_compat = false; - C_plus_plus = backing_up_report = ddebug = fulltbl = fullspd = false; - long_align = nowarn = yymore_used = continued_action = reject = false; + lex_compat = C_plus_plus = backing_up_report = ddebug = fulltbl = false; + fullspd = long_align = nowarn = yymore_used = continued_action = false; + in_rule = reject = false; yytext_is_array = yymore_really_used = reject_really_used = false; gen_line_dirs = usemecs = useecs = true; performance_report = 0; @@ -928,7 +928,6 @@ void set_up_initial_allocations() scxclu = allocate_integer_array( current_max_scs ); sceof = allocate_integer_array( current_max_scs ); scname = allocate_char_ptr_array( current_max_scs ); - actvsc = allocate_integer_array( current_max_scs ); current_maxccls = INITIAL_MAX_CCLS; cclmap = allocate_integer_array( current_maxccls );