From 20d517084de3f9a9d7af7d9edeba5373359c0e37 Mon Sep 17 00:00:00 2001 From: Peter Johnson Date: Mon, 25 Sep 2006 05:42:09 +0000 Subject: [PATCH] Fix duplicate line at the end of list output. Reported by: Danny Reeves svn path=/trunk/yasm/; revision=1631 --- modules/parsers/gas/gas-token.re | 4 ++-- modules/parsers/nasm/nasm-token.re | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/modules/parsers/gas/gas-token.re b/modules/parsers/gas/gas-token.re index 6edbc4c3..bb65ae08 100644 --- a/modules/parsers/gas/gas-token.re +++ b/modules/parsers/gas/gas-token.re @@ -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]); diff --git a/modules/parsers/nasm/nasm-token.re b/modules/parsers/nasm/nasm-token.re index b8f9b135..58ff5ea8 100644 --- a/modules/parsers/nasm/nasm-token.re +++ b/modules/parsers/nasm/nasm-token.re @@ -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); -- 2.40.0