]> granicus.if.org Git - flex/commitdiff
Added alignment flag for future use.
authorJohn Millaway <john43@users.sourceforge.net>
Sat, 10 Aug 2002 17:22:00 +0000 (17:22 +0000)
committerJohn Millaway <john43@users.sourceforge.net>
Sat, 10 Aug 2002 17:22:00 +0000 (17:22 +0000)
dfa.c
main.c

diff --git a/dfa.c b/dfa.c
index fab78451ceb6a01e85284316a1ea97e3ce17ddbc..28e2e69a616628e6d6155287e40dd3a1fcc6bd0d 100644 (file)
--- 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 fbc734425ffbc79f6d9670f1b202c0f4dfa17225..538d9869a5cbaa11a70171e1f3911954f093ef38 100644 (file)
--- 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();
        }