aboutsummaryrefslogtreecommitdiffstats
path: root/ui/text_import_scanner.l
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2019-03-20 09:06:13 -0700
committerGuy Harris <guy@alum.mit.edu>2019-03-20 16:06:57 +0000
commit38f348bbb0bc829a5f5cdda5f374f7b73809a160 (patch)
treef6efea88a8654eb014a2665c9981a257f1cd1f1d /ui/text_import_scanner.l
parent8b8fc662d8e82634bcf5f5d610e5a88419a5a500 (diff)
Put back EOF rule, but without exporting write_current_packet().
Instead, add a new T_EOF token type, call parse_token() with it when we get an EOF, and, in parse_token(), write the current packet if we get a T_EOF token. That's a bit simpler, and would let us treat EOFs in different places differently, if, for example, we want to report warnings for half-finished packets. Change-Id: Ie41a8a1dedf91c34300468e073f18bf806e01892 Reviewed-on: https://code.wireshark.org/review/32489 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'ui/text_import_scanner.l')
-rw-r--r--ui/text_import_scanner.l2
1 files changed, 2 insertions, 0 deletions
diff --git a/ui/text_import_scanner.l b/ui/text_import_scanner.l
index 9bc812edc8..d3ec5d067a 100644
--- a/ui/text_import_scanner.l
+++ b/ui/text_import_scanner.l
@@ -122,6 +122,8 @@ eol \r?\n\r?
{comment} { parse_token(T_EOL, NULL); }
{text} { parse_token(T_TEXT, yytext); }
+<<EOF>> { parse_token(T_EOF, NULL); yyterminate(); }
+
%%
/*