summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/scanner.l2
-rwxr-xr-xtests/shell/testcases/comments/comments_02
2 files changed, 3 insertions, 1 deletions
diff --git a/src/scanner.l b/src/scanner.l
index e72a427a..7e8748f5 100644
--- a/src/scanner.l
+++ b/src/scanner.l
@@ -858,10 +858,10 @@ addrstring ({macaddr}|{ip4addr}|{ip6addr})
{tab}+
{space}+
-{comment}
{comment_line} {
reset_pos(yyget_extra(yyscanner), yylloc);
}
+{comment}
<<EOF>> {
update_pos(yyget_extra(yyscanner), yylloc, 1);
diff --git a/tests/shell/testcases/comments/comments_0 b/tests/shell/testcases/comments/comments_0
index b272ad67..a50387d6 100755
--- a/tests/shell/testcases/comments/comments_0
+++ b/tests/shell/testcases/comments/comments_0
@@ -10,6 +10,7 @@ RULESET="table inet x { # comment
2.2.2.2, # comment
# more comments
3.3.3.3, # comment
+# comment
}
# comment
}
@@ -23,6 +24,7 @@ RULESET="table inet x { # comment
} accept
icmp type {
+# comment
1,
# comments also allowed here
2,