]> granicus.if.org Git - yasm/commitdiff
Fix duplicate line at the end of list output.
authorPeter Johnson <peter@tortall.net>
Mon, 25 Sep 2006 05:42:09 +0000 (05:42 -0000)
committerPeter Johnson <peter@tortall.net>
Mon, 25 Sep 2006 05:42:09 +0000 (05:42 -0000)
Reported by: Danny Reeves <danny_reeves@hotmail.com>

svn path=/trunk/yasm/; revision=1631

modules/parsers/gas/gas-token.re
modules/parsers/nasm/nasm-token.re

index 6edbc4c358a9476c375a7a40f3da206e1ab50f0b..bb65ae08041bce6d23b1304d85b0294577bedfb1 100644 (file)
@@ -483,7 +483,7 @@ scan:
        ws+                     { goto scan; }
 
        "\n"                    {
-           if (parser_gas->save_input && cursor != s->eof)
+           if (parser_gas->save_input)
                cursor = save_line(parser_gas, cursor);
            parser_gas->state = INITIAL;
            RETURN(s->tok[0]);
@@ -518,7 +518,7 @@ section_directive:
        }
 
        "\n"                    {
-           if (parser_gas->save_input && cursor != s->eof)
+           if (parser_gas->save_input)
                cursor = save_line(parser_gas, cursor);
            parser_gas->state = INITIAL;
            RETURN(s->tok[0]);
index b8f9b135749385b1d7ba99568eed84239058176b..58ff5ea8b021553888a5eef0a53d0574e356b4bf 100644 (file)
@@ -422,7 +422,7 @@ scan:
        ws+                     { goto scan; }
 
        "\n"                    {
-           if (parser_nasm->save_input && cursor != s->eof)
+           if (parser_nasm->save_input)
                cursor = save_line(parser_nasm, cursor);
            parser_nasm->state = INITIAL;
            RETURN(s->tok[0]);
@@ -451,7 +451,7 @@ linechg:
        }
 
        "\n" {
-           if (parser_nasm->save_input && cursor != s->eof)
+           if (parser_nasm->save_input)
                cursor = save_line(parser_nasm, cursor);
            parser_nasm->state = INITIAL;
            RETURN(s->tok[0]);
@@ -482,7 +482,7 @@ linechg2:
 
     /*!re2c
        "\n" {
-           if (parser_nasm->save_input && cursor != s->eof)
+           if (parser_nasm->save_input)
                cursor = save_line(parser_nasm, cursor);
            parser_nasm->state = INITIAL;
            RETURN(s->tok[0]);
@@ -503,7 +503,7 @@ directive:
 
     /*!re2c
        [\]\n] {
-           if (parser_nasm->save_input && cursor != s->eof)
+           if (parser_nasm->save_input)
                cursor = save_line(parser_nasm, cursor);
            parser_nasm->state = INITIAL;
            RETURN(s->tok[0]);
@@ -542,7 +542,7 @@ stringconst_scan:
            strbuf[count] = '\0';
            lvalp->str.contents = (char *)strbuf;
            lvalp->str.len = count;
-           if (parser_nasm->save_input && cursor != s->eof)
+           if (parser_nasm->save_input)
                cursor = save_line(parser_nasm, cursor);
            if (count == 1)
                RETURN(ONECHARSTR);