Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/tests/lib/libcurses/director tests/libcurses: allow end-of-l...
details: https://anonhg.NetBSD.org/src/rev/8efe8b28fbb2
branches: trunk
changeset: 1018549:8efe8b28fbb2
user: rillig <rillig%NetBSD.org@localhost>
date: Sun Feb 07 12:05:36 2021 +0000
description:
tests/libcurses: allow end-of-line comments in data lines as well
This makes it possible to write small remarks directly in the affected
line, which not only makes for a clean visual appearance but also shows
up prominently in "cvs annotate" or "git blame", showing when such a
remark has been modified.
diffstat:
tests/lib/libcurses/director/testlang_conf.l | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diffs (30 lines):
diff -r 84bf42a6d4b2 -r 8efe8b28fbb2 tests/lib/libcurses/director/testlang_conf.l
--- a/tests/lib/libcurses/director/testlang_conf.l Sun Feb 07 11:52:43 2021 +0000
+++ b/tests/lib/libcurses/director/testlang_conf.l Sun Feb 07 12:05:36 2021 +0000
@@ -1,5 +1,5 @@
%{
-/* $NetBSD: testlang_conf.l,v 1.10 2021/02/07 11:52:43 rillig Exp $ */
+/* $NetBSD: testlang_conf.l,v 1.11 2021/02/07 12:05:36 rillig Exp $ */
/*-
* Copyright 2009 Brett Lymn <blymn%NetBSD.org@localhost>
@@ -364,15 +364,16 @@
return VARIABLE;
}
- /* comments, white-outs */
+ /* whitespace, comments */
[ \t\r] |
#.* ;
-^#.*\n |
-#.*\n |
+
+^[ \t\r]*#.*\n |
\\\n |
^\n line++;
/* eol on a line with data. need to process, return eol */
+#.*\n |
\n {
line++;
return EOL;
Home |
Main Index |
Thread Index |
Old Index