From: John Millaway Date: Sat, 10 Aug 2002 17:22:00 +0000 (+0000) Subject: Added alignment flag for future use. X-Git-Tag: flex-2-5-13~9 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=43843ddad0cb55efd2763578d965b3f7eacfc57b;p=flex Added alignment flag for future use. --- diff --git a/dfa.c b/dfa.c index fab7845..28e2e69 100644 --- a/dfa.c +++ b/dfa.c @@ -537,7 +537,6 @@ void ntod() * long-shot that that won't be large enough. */ out_str_dec( "static yyconst %s yy_nxt[][%d] =\n {\n", - /* '}' so vi doesn't get too confused */ long_align ? "long" : "short", num_full_table_rows ); outn( " {" ); diff --git a/main.c b/main.c index fbc7344..538d986 100644 --- a/main.c +++ b/main.c @@ -417,6 +417,14 @@ void check_options() if ( do_yylineno ) buf_strdefine(&userdef_buf,"YY_USE_LINENO","1"); + /* Create the alignment type. */ + buf_strdefine(&userdef_buf,"YY_INT_ALIGNED", + long_align ? "long int" : "short int"); + + /* Now map the equivalence class for NUL to its expected place. */ + ecgroup[0] = ecgroup[csize]; + NUL_ec = ABS( ecgroup[0] ); + /* Dump the user defined preproc directives. */ if (userdef_buf.elts) outn( (char*)(userdef_buf.elts) ); @@ -583,6 +591,7 @@ int exit_status; fprintf(header_out,"#undef YY_FLUSH_BUFFER\n"); fprintf(header_out,"#undef YY_G\n"); fprintf(header_out,"#undef YY_INPUT\n"); + fprintf(header_out,"#undef YY_INT_ALIGNED\n"); fprintf(header_out,"#undef YY_INTERACTIVE\n"); fprintf(header_out,"#undef YY_LAST_ARG\n"); fprintf(header_out,"#undef YY_LEX_ARGS\n"); @@ -1650,10 +1659,6 @@ _( "Variable trailing context rules entail a large performance penalty\n" ) ); else numecs = csize; - /* Now map the equivalence class for NUL to its expected place. */ - ecgroup[0] = ecgroup[csize]; - NUL_ec = ABS( ecgroup[0] ); - if ( useecs ) ccl2ecl(); }